Documentation ¶
Index ¶
Constants ¶
const DefaultInternetChargeType = "PayByTraffic"
DefaultInternetChargeType is used for EIP
Variables ¶
This section is empty.
Functions ¶
func CompositeDomainName ¶ added in v1.31.0
CompositeDomainName composes and returns a composite domain name from the given domain name and id, in the format <domainName>:<domainId>
func ComputeStorageEndpoint ¶
ComputeStorageEndpoint computes the OSS storage endpoint based on the given region.
func DomainNameAndId ¶ added in v1.31.0
DomainNameAndId decomposes the given composite domain name in the format <domainName>:<domainId> into its constituent domain name and id.
Types ¶
type ClientFactory ¶
type ClientFactory interface { NewECSClient(region, accessKeyID, accessKeySecret string) (ECS, error) NewSTSClient(region, accessKeyID, accessKeySecret string) (STS, error) NewSLBClient(region, accessKeyID, accessKeySecret string) (SLB, error) NewVPCClient(region, accessKeyID, accessKeySecret string) (VPC, error) NewRAMClient(region, accessKeyID, accessKeySecret string) (RAM, error) NewROSClient(region, accessKeyID, accessKeySecret string) (ROS, error) NewOSSClient(endpoint, accessKeyID, accessKeySecret string) (OSS, error) NewOSSClientFromSecretRef(ctx context.Context, client client.Client, secretRef *corev1.SecretReference, region string) (OSS, error) NewDNSClient(region, accessKeyID, accessKeySecret string) (DNS, error) }
ClientFactory is the new factory to instantiate Alicloud clients.
func NewClientFactory ¶
func NewClientFactory() ClientFactory
NewClientFactory creates a new clientFactory instance that can be used to instantiate Alicloud clients.
type DNS ¶ added in v1.26.0
type DNS interface { GetDomainNames(context.Context) (map[string]string, error) GetDomainName(context.Context, string) (string, error) CreateOrUpdateDomainRecords(context.Context, string, string, string, []string, int64) error DeleteDomainRecords(context.Context, string, string, string) error }
DNS is an interface which declares DNS related methods.
type ECS ¶
type ECS interface { CheckIfImageExists(ctx context.Context, imageID string) (bool, error) CheckIfImageOwnedByAliCloud(imageID string) (bool, error) DescribeSecurityGroups(request *ecs.DescribeSecurityGroupsRequest) (response *ecs.DescribeSecurityGroupsResponse, err error) DescribeSecurityGroupAttribute(request *ecs.DescribeSecurityGroupAttributeRequest) (response *ecs.DescribeSecurityGroupAttributeResponse, err error) DescribeKeyPairs(request *ecs.DescribeKeyPairsRequest) (response *ecs.DescribeKeyPairsResponse, err error) DetachECSInstancesFromSSHKeyPair(keyName string) error }
ECS is an interface which declares ECS related methods.
type OSS ¶ added in v1.24.0
type OSS interface { DeleteObjectsWithPrefix(ctx context.Context, bucketName, prefix string) error CreateBucketIfNotExists(ctx context.Context, bucketName string) error DeleteBucketIfExists(ctx context.Context, bucketName string) error }
OSS is an interface which declares OSS related methods.
type RAM ¶ added in v1.21.0
type RAM interface { CreateServiceLinkedRole(regionID, serviceName string) error GetServiceLinkedRole(roleName string) (*ram.Role, error) }
RAM is an interface which declares RAM related methods.
type ROS ¶ added in v1.25.0
type ROS interface { ListStacks(request *ros.ListStacksRequest) (response *ros.ListStacksResponse, err error) GetStack(request *ros.GetStackRequest) (response *ros.GetStackResponse, err error) CreateStack(request *ros.CreateStackRequest) (response *ros.CreateStackResponse, err error) DeleteStack(request *ros.DeleteStackRequest) (response *ros.DeleteStackResponse, err error) }
ROS is an interface which declares ROS related methods.
type SLB ¶
type SLB interface { GetLoadBalancerIDs(ctx context.Context, region string) ([]string, error) GetFirstVServerGroupName(ctx context.Context, region, loadBalancerID string) (string, error) DeleteLoadBalancer(ctx context.Context, region, loadBalancerID string) error SetLoadBalancerDeleteProtection(ctx context.Context, region, loadBalancerID string, protection bool) error }
SLB is an interface which declares SLB related methods.
type VPC ¶
type VPC interface { GetVPCWithID(ctx context.Context, vpcID string) ([]vpc.Vpc, error) GetNatGatewaysWithVPCID(ctx context.Context, vpcID string) ([]vpc.NatGateway, error) GetEIPWithID(ctx context.Context, eipID string) ([]vpc.EipAddress, error) GetVPCInfo(ctx context.Context, vpcID string) (*VPCInfo, error) FetchEIPInternetChargeType(ctx context.Context, natGateway *vpc.NatGateway, vpcID string) (string, error) CreateVpc(request *vpc.CreateVpcRequest) (response *vpc.CreateVpcResponse, err error) DescribeVpcs(request *vpc.DescribeVpcsRequest) (response *vpc.DescribeVpcsResponse, err error) DeleteVpc(request *vpc.DeleteVpcRequest) (response *vpc.DeleteVpcResponse, err error) CreateVSwitch(request *vpc.CreateVSwitchRequest) (response *vpc.CreateVSwitchResponse, err error) DescribeVSwitches(request *vpc.DescribeVSwitchesRequest) (response *vpc.DescribeVSwitchesResponse, err error) DeleteVSwitch(request *vpc.DeleteVSwitchRequest) (response *vpc.DeleteVSwitchResponse, err error) CreateNatGateway(request *vpc.CreateNatGatewayRequest) (response *vpc.CreateNatGatewayResponse, err error) DescribeNatGateways(request *vpc.DescribeNatGatewaysRequest) (response *vpc.DescribeNatGatewaysResponse, err error) DeleteNatGateway(request *vpc.DeleteNatGatewayRequest) (response *vpc.DeleteNatGatewayResponse, err error) DescribeSnatTableEntries(request *vpc.DescribeSnatTableEntriesRequest) (response *vpc.DescribeSnatTableEntriesResponse, err error) DescribeEipAddresses(request *vpc.DescribeEipAddressesRequest) (response *vpc.DescribeEipAddressesResponse, err error) }
VPC is an interface which declares VPC related methods.