Documentation ¶
Index ¶
- Constants
- Variables
- func AddTags(client *ecs.Client, args *AddTagsArgs) error
- func AssemblePolicyDocument(document []interface{}, version string) (string, error)
- func AssembleRolePolicyDocument(ramUser, service []interface{}, version string) (string, error)
- func GetAllRouterInterfaceSpec() (specifications []string)
- func GetIntersection(dataMap []map[string]interface{}, allDataMap map[string]interface{}) (allData []interface{})
- func GetNotFoundErrorFromString(str string) error
- func GetNotFoundMessage(product, id string) string
- func GetTimeErrorFromString(str string) error
- func GetTimeoutMessage(product, status string) string
- func IsExceptedError(err error, expectCode string) bool
- func NotFoundDBInstance(err error) bool
- func NotFoundError(err error) bool
- func ParsePolicyDocument(policyDocument string) (statement []map[string]interface{}, version string, err error)
- func Provider() terraform.ResourceProvider
- func RamEntityNotExist(err error) bool
- func RemoveTags(client *ecs.Client, args *RemoveTagsArgs) error
- func String(v string) *string
- func TransformPeriod2Time(period int, chargeType string) (ut int, tt common.TimeType)
- func TransformTime2Period(ut int, tt common.TimeType) (period int)
- func Trim(v string) string
- func VSwitchesDecriptionAttributes(d *schema.ResourceData, vsws []vpc.VSwitch, meta interface{}) error
- type AddTagsArgs
- type AliyunClient
- func (client *AliyunClient) ActiveScalingConfigurationById(sgId, configId string) error
- func (client *AliyunClient) AllocateDBPublicConnection(instanceId, prefix, port string) error
- func (client *AliyunClient) CheckParameterValidity(d *schema.ResourceData, meta interface{}) (map[ResourceKeyType]interface{}, error)
- func (client *AliyunClient) DeleteScalingGroupById(sgId string) error
- func (client *AliyunClient) DeleteScalingRuleById(ruleId string) error
- func (client *AliyunClient) DeleteScheduleById(scheduleId string) error
- func (client *AliyunClient) DescribeBackupPolicy(instanceId string) (policy *rds.DescribeBackupPolicyResponse, err error)
- func (client *AliyunClient) DescribeDBInstanceById(id string) (instance *rds.DBInstanceAttribute, err error)
- func (client *AliyunClient) DescribeDBInstanceNetInfoByIpType(instanceId string, ipType IPType) (*rds.DBInstanceNetInfo, error)
- func (client *AliyunClient) DescribeDBInstanceNetInfos(instanceId string) ([]rds.DBInstanceNetInfo, error)
- func (client *AliyunClient) DescribeDBSecurityIps(instanceId string) (ips []rds.DBInstanceIPArray, err error)
- func (client *AliyunClient) DescribeDatabaseAccount(instanceId, accountName string) (ds *rds.DBInstanceAccount, err error)
- func (client *AliyunClient) DescribeDatabaseByName(instanceId, dbName string) (ds *rds.Database, err error)
- func (client *AliyunClient) DescribeEipAddress(allocationId string) (eip vpc.EipAddress, err error)
- func (client *AliyunClient) DescribeForwardEntry(forwardTableId string, forwardEntryId string) (entry vpc.ForwardTableEntry, err error)
- func (client *AliyunClient) DescribeImage(imageId string) (*ecs.ImageType, error)
- func (client *AliyunClient) DescribeLoadBalancerAttribute(slbId string) (*slb.LoadBalancerType, error)
- func (client *AliyunClient) DescribeLoadBalancerRuleId(slbId string, port int, domain, url string) (string, error)
- func (client *AliyunClient) DescribeMultiIZByRegion() (izs []string, err error)
- func (client *AliyunClient) DescribeNatGateway(natGatewayId string) (nat vpc.NatGateway, err error)
- func (client *AliyunClient) DescribeRouterInterface(interfaceId string) (ri vpc.RouterInterfaceTypeInDescribeRouterInterfaces, err error)
- func (client *AliyunClient) DescribeScalingConfigurationById(configId string) (*ess.ScalingConfigurationItemType, error)
- func (client *AliyunClient) DescribeScalingGroupById(sgId string) (*ess.ScalingGroupItemType, error)
- func (client *AliyunClient) DescribeScalingRuleById(sgId, ruleId string) (*ess.ScalingRuleItemType, error)
- func (client *AliyunClient) DescribeScheduleById(scheduleId string) (*ess.ScheduledTaskItemType, error)
- func (client *AliyunClient) DescribeSecurity(securityGroupId string) (*ecs.DescribeSecurityGroupAttributeResponse, error)
- func (client *AliyunClient) DescribeSecurityGroupRule(groupId, direction, ipProtocol, portRange, nicType, cidr_ip, policy string, ...) (*ecs.PermissionType, error)
- func (client *AliyunClient) DescribeSnatEntry(snatTableId string, snatEntryId string) (snat vpc.SnatTableEntry, err error)
- func (client *AliyunClient) DescribeVpc(vpcId string) (v vpc.DescribeVpcAttributeResponse, err error)
- func (client *AliyunClient) DescribeVswitch(vswitchId string) (v vpc.DescribeVSwitchAttributesResponse, err error)
- func (client *AliyunClient) DescribeZone(zoneID string) (*ecs.ZoneType, error)
- func (client *AliyunClient) DiskAvailable(zone *ecs.ZoneType, diskCategory ecs.DiskCategory) error
- func (client *AliyunClient) EssRemoveInstances(groupId string, instanceIds []string) error
- func (client *AliyunClient) FetchSpecifiedInstanceTypeFamily(regionId common.Region, zoneId string, generations []string, ...) (map[string]ecs.InstanceTypeFamily, map[string]ecs.InstanceTypeFamily, error)
- func (client *AliyunClient) FetchSpecifiedInstanceTypesByFamily(zoneId, instanceTypeFamily string, all_zones []ecs.ZoneType) (map[string]ecs.InstanceTypeItemType, error)
- func (client *AliyunClient) GetSecurityIps(instanceId string) ([]string, error)
- func (client *AliyunClient) GrantAccountPrivilege(instanceId, account, dbName, privilege string) error
- func (client *AliyunClient) JoinSecurityGroups(instanceId string, securityGroupIds []string) error
- func (client *AliyunClient) JudgeRegionValidation(key string, region common.Region) error
- func (client *AliyunClient) JudgeRolePolicyPrincipal(roleName string) error
- func (client *AliyunClient) LeaveSecurityGroups(instanceId string, securityGroupIds []string) error
- func (client *AliyunClient) ModifyDBBackupPolicy(instanceId, backupTime, backupPeriod, retentionPeriod, backupLog, ... string) error
- func (client *AliyunClient) ModifyDBSecurityIps(instanceId, ips string) error
- func (client *AliyunClient) QueryInstanceSystemDisk(id string) (disk *ecs.DiskItemType, err error)
- func (client *AliyunClient) QueryInstancesById(id string) (instance *ecs.InstanceAttributesType, err error)
- func (client *AliyunClient) QueryInstancesByIds(ids []string) (instances []ecs.InstanceAttributesType, err error)
- func (client *AliyunClient) QueryInstancesWithKeyPair(region common.Region, instanceIds, keypair string) ([]interface{}, []ecs.InstanceAttributesType, error)
- func (client *AliyunClient) QueryOssBucketById(id string) (info *oss.BucketInfo, err error)
- func (client *AliyunClient) QueryRouteEntry(routeTableId, cidrBlock, nextHopType, nextHopId string) (rn vpc.RouteEntry, err error)
- func (client *AliyunClient) QueryRouteTableById(routeTableId string) (rt vpc.RouteTable, err error)
- func (client *AliyunClient) ReleaseDBPublicConnection(instanceId, connection string) error
- func (client *AliyunClient) ResourceAvailable(zone *ecs.ZoneType, resourceType ecs.ResourceType) error
- func (client *AliyunClient) RevokeAccountPrivilege(instanceId, account, dbName string) error
- func (client *AliyunClient) RevokeSecurityGroup(args *ecs.RevokeSecurityGroupArgs) error
- func (client *AliyunClient) RevokeSecurityGroupEgress(args *ecs.RevokeSecurityGroupEgressArgs) error
- func (client *AliyunClient) WaitForAccount(instanceId string, accountName string, status Status, timeout int) error
- func (client *AliyunClient) WaitForAccountPrivilege(instanceId, accountName, dbName, privilege string, timeout int) error
- func (client *AliyunClient) WaitForAccountPrivilegeRevoked(instanceId, accountName, dbName string, timeout int) error
- func (client *AliyunClient) WaitForAllRouteEntries(routeTableId string, status Status, timeout int) error
- func (client *AliyunClient) WaitForDBConnection(instanceId string, netType IPType, timeout int) error
- func (client *AliyunClient) WaitForDBInstance(instanceId string, status Status, timeout int) error
- func (client *AliyunClient) WaitForEip(allocationId string, status Status, timeout int) error
- func (client *AliyunClient) WaitForRouterInterface(interfaceId string, status Status, timeout int) error
- func (client *AliyunClient) WaitForVSwitch(vswitchId string, status Status, timeout int) error
- func (client *AliyunClient) WaitForVpc(vpcId string, status Status, timeout int) error
- type Config
- type DBAccountPrivilege
- type DBAccountType
- type Effect
- type Engine
- type GroupRuleNicType
- type GroupRulePolicy
- type IPType
- type InstanceNetWork
- type InternetChargeType
- type KeyState
- type LifecycleRuleStatus
- type Listener
- type ListenerErr
- type NatGatewaySpec
- type NetType
- type NetworkType
- type PayType
- type Policy
- type PolicyStatement
- type Principal
- type Protocol
- type ProviderError
- type RemoveTagsArgs
- type ResourceKeyType
- type ResourceType
- type Role
- type RolePolicy
- type RolePolicyStatement
- type RouterType
- type SecurityGroup
- type Spec
- type Status
- type Tag
- type TimeType
Constants ¶
const ( ClassicNet = InstanceNetWork("classic") VpcNet = InstanceNetWork("vpc") )
const ( PrePaid = PayType("PrePaid") PostPaid = PayType("PostPaid") Prepaid = PayType("Prepaid") Postpaid = PayType("Postpaid") )
const ( Internet = NetType("Internet") Intranet = NetType("Intranet") )
const ( Classic = NetworkType("Classic") VPC = NetworkType("VPC") )
const ( Hour = TimeType("Hour") Day = TimeType("Day") Week = TimeType("Week") Month = TimeType("Month") Year = TimeType("Year") )
const ( Pending = Status("Pending") Creating = Status("Creating") Running = Status("Running") Available = Status("Available") Modifying = Status("Modifying") Deleting = Status("Deleting") Associating = Status("Associating") Unassociating = Status("Unassociating") InUse = Status("InUse") Active = Status("Active") Inactive = Status("Inactive") Idle = Status("Idle") )
const ( Inner = IPType("Inner") Private = IPType("Private") Public = IPType("Public") )
const ( ResourceTypeInstance = ResourceType("Instance") ResourceTypeDisk = ResourceType("Disk") ResourceTypeVSwitch = ResourceType("VSwitch") ResourceTypeRds = ResourceType("Rds") IoOptimized = ResourceType("IoOptimized") )
const ( PayByBandwidth = InternetChargeType("PayByBandwidth") PayByTraffic = InternetChargeType("PayByTraffic") )
const ( PageSizeSmall = 10 PageSizeMedium = 20 PageSizeLarge = 50 )
const ( Http = Protocol("http") Https = Protocol("https") Tcp = Protocol("tcp") Udp = Protocol("udp") )
Constants of protocol definition
const ( ZoneKey = ResourceKeyType("zones") InstanceTypeKey = ResourceKeyType("instanceTypes") OutdatedInstanceTypeKey = ResourceKeyType("outdatedInstanceTypes") UpgradedInstanceTypeKey = ResourceKeyType("upgradedInstanceTypes") InstanceTypeFamilyKey = ResourceKeyType("instanceTypeFamilies") OutdatedInstanceTypeFamilyKey = ResourceKeyType("outdatedInstanceTypeFamilies") UpgradedInstanceTypeFamilyKey = ResourceKeyType("upgradedInstanceTypeFamilies") DiskCategoryKey = ResourceKeyType("diskCatetories") OutdatedDiskCategoryKey = ResourceKeyType("outdatedDiskCatetories") IoOptimizedKey = ResourceKeyType("optimized") )
const ( // common Notfound = "Not found" WaitForTimeout = "WaitForTimeout" // ecs InstanceNotFound = "Instance.Notfound" MessageInstanceNotFound = "instance is not found" EcsThrottling = "Throttling" EcsInternalError = "InternalError" // disk DiskIncorrectStatus = "IncorrectDiskStatus" DiskCreatingSnapshot = "DiskCreatingSnapshot" InstanceLockedForSecurity = "InstanceLockedForSecurity" SystemDiskNotFound = "SystemDiskNotFound" DiskOperationConflict = "OperationConflict" DiskInternalError = "InternalError" DiskInvalidOperation = "InvalidOperation.Conflict" // eip EipIncorrectStatus = "IncorrectEipStatus" InstanceIncorrectStatus = "IncorrectInstanceStatus" HaVipIncorrectStatus = "IncorrectHaVipStatus" COMMODITYINVALID_COMPONENT = "COMMODITY.INVALID_COMPONENT" // slb LoadBalancerNotFound = "InvalidLoadBalancerId.NotFound" UnsupportedProtocalPort = "UnsupportedOperationonfixedprotocalport" ListenerNotFound = "The specified resource does not exist" ListenerAlreadyExists = "ListenerAlreadyExists" ServiceIsConfiguring = "ServiceIsConfiguring" ServiceIsStopping = "ServiceIsStopping" BackendServerconfiguring = "BackendServer.configuring" SystemBusy = "SystemBusy" SlbOrderFailed = "OrderFailed" VServerGroupNotFoundMessage = "The specified VServerGroupId does not exist" RspoolVipExist = "RspoolVipExist" InvalidParameter = "InvalidParameter" InvalidRuleIdNotFound = "InvalidRuleId.NotFound" RuleDomainExist = "DomainExist" // security_group InvalidInstanceIdAlreadyExists = "InvalidInstanceId.AlreadyExists" InvalidSecurityGroupIdNotFound = "InvalidSecurityGroupId.NotFound" SgDependencyViolation = "DependencyViolation" //Nat gateway NatGatewayInvalidRegionId = "Invalid.RegionId" DependencyViolationBandwidthPackages = "DependencyViolation.BandwidthPackages" VswitchStatusError = "VswitchStatusError" EIP_NOT_IN_GATEWAY = "EIP_NOT_IN_GATEWAY" InvalidNatGatewayIdNotFound = "InvalidNatGatewayId.NotFound" // vpc VpcQuotaExceeded = "QuotaExceeded.Vpc" InvalidVpcIDNotFound = "InvalidVpcID.NotFound" // vswitch VswitcInvalidRegionId = "InvalidRegionId.NotFound" InvalidVswitchIDNotFound = "InvalidVswitchID.NotFound" //vroute entry IncorrectRouteEntryStatus = "IncorrectRouteEntryStatus" TaskConflict = "TaskConflict" RouterEntryForbbiden = "Forbbiden" RouterEntryConflictDuplicated = "RouterEntryConflict.Duplicated" InvalidSnatTableIdNotFound = "InvalidSnatTableId.NotFound" // Forward InvalidIpNotInNatgw = "InvalidIp.NotInNatgw" InvalidForwardTableIdNotFound = "InvalidForwardTableId.NotFound" InvalidForwardEntryIdNotFound = "InvalidForwardEntryId.NotFound" // ess InvalidScalingGroupIdNotFound = "InvalidScalingGroupId.NotFound" IncorrectScalingConfigurationLifecycleState = "IncorrectScalingConfigurationLifecycleState" IncorrectScalingGroupStatus = "IncorrectScalingGroupStatus" IncorrectCapacityMaxSize = "IncorrectCapacity.MaxSize" IncorrectCapacityMinSize = "IncorrectCapacity.MinSize" ScalingActivityInProgress = "ScalingActivityInProgress" EssThrottling = "Throttling" // rds InvalidDBInstanceIdNotFound = "InvalidDBInstanceId.NotFound" InvalidDBNameNotFound = "InvalidDBName.NotFound" InvalidDBInstanceNameNotFound = "InvalidDBInstanceName.NotFound" InvalidCurrentConnectionStringNotFound = "InvalidCurrentConnectionString.NotFound" NetTypeExists = "NetTypeExists" InvalidAccountNameDuplicate = "InvalidAccountName.Duplicate" InvalidAccountNameNotFound = "InvalidAccountName.NotFound" OperationDeniedDBInstanceStatus = "OperationDenied.DBInstanceStatus" InvalidConnectionStringDuplicate = "InvalidConnectionString.Duplicate" AtLeastOneNetTypeExists = "AtLeastOneNetTypeExists" ConnectionOperationDenied = "OperationDenied" ConnectionConflictMessage = "The requested resource is sold out in the specified zone; try other types of resources or other regions and zones" DBInternalError = "InternalError" // oss OssBucketNotFound = "NoSuchBucket" OssBodyNotFound = "404 Not Found" // RAM Instance Not Found RamInstanceNotFound = "Forbidden.InstanceNotFound" AliyunGoClientFailure = "AliyunGoClientFailure" // dns RecordForbiddenDNSChange = "RecordForbidden.DNSChange" FobiddenNotEmptyGroup = "Fobidden.NotEmptyGroup" DomainRecordNotBelongToUser = "DomainRecordNotBelongToUser" // ram user DeleteConflictUserGroup = "DeleteConflict.User.Group" DeleteConflictUserAccessKey = "DeleteConflict.User.AccessKey" DeleteConflictUserLoginProfile = "DeleteConflict.User.LoginProfile" DeleteConflictUserMFADevice = "DeleteConflict.User.MFADevice" DeleteConflictUserPolicy = "DeleteConflict.User.Policy" // ram mfa DeleteConflictVirtualMFADeviceUser = "DeleteConflict.VirtualMFADevice.User" // ram group DeleteConflictGroupUser = "DeleteConflict.Group.User" DeleteConflictGroupPolicy = "DeleteConflict.Group.Policy" // ram role DeleteConflictRolePolicy = "DeleteConflict.Role.Policy" // ram policy DeleteConflictPolicyUser = "DeleteConflict.Policy.User" DeleteConflictPolicyGroup = "DeleteConflict.Policy.Group" DeleteConflictPolicyVersion = "DeleteConflict.Policy.Version" //unknown Error UnknownError = "UnknownError" // Keypair error KeyPairNotFound = "InvalidKeyPair.NotFound" // Container ErrorClusterNotFound = "ErrorClusterNotFound" // cdn ServiceBusy = "ServiceBusy" // KMS ForbiddenKeyNotFound = "Forbidden.KeyNotFound" // RAM InvalidRamRoleNotFound = "InvalidRamRole.NotFound" RoleAttachmentUnExpectedJson = "unexpected end of JSON input" InvalidInstanceIdNotFound = "InvalidInstanceId.NotFound" RouterInterfaceIncorrectStatus = "IncorrectStatus" DependencyViolationRouterInterfaceReferedByRouteEntry = "DependencyViolation.RouterInterfaceReferedByRouteEntry" // CS ErrorClusterNameAlreadyExist = "ErrorClusterNameAlreadyExist" )
const ( GroupRuleInternet = GroupRuleNicType("internet") GroupRuleIntranet = GroupRuleNicType("intranet") )
const ( GroupRulePolicyAccept = GroupRulePolicy("accept") GroupRulePolicyDrop = GroupRulePolicy("drop") )
const ( EcsApiVersion20160314 = "2016-03-14" EcsApiVersion20140526 = "2014-05-26" )
const ( KubernetesImageId = "centos_7" KubernetesMasterNumber = 3 KubernetesVersion = "1.9.3" KubernetesDockerVersion = "17.06.2-ce-1" )
const ( Enabled = KeyState("Enabled") Disabled = KeyState("Disabled") PendingDeletion = KeyState("PendingDeletion") )
const ( ExpirationStatusEnabled = LifecycleRuleStatus("Enabled") ExpirationStatusDisabled = LifecycleRuleStatus("Disabled") )
const ( MySQL = Engine("MySQL") SQLServer = Engine("SQLServer") PPAS = Engine("PPAS") PG = Engine("PG") )
const ( ReadOnly = DBAccountPrivilege("ReadOnly") ReadWrite = DBAccountPrivilege("ReadWrite") )
const ( Normal = DBAccountType("Normal") Super = DBAccountType("Super") )
const ( NatGatewaySmallSpec = NatGatewaySpec("Small") NatGatewayMiddleSpec = NatGatewaySpec("Middle") NatGatewayLargeSpec = NatGatewaySpec("Large") )
const ( EcsInstance = "EcsInstance" SlbInstance = "SlbInstance" Nat = "Nat" HaVip = "HaVip" )
const ( VRouter = RouterType("VRouter") VBR = RouterType("VBR") InitiatingSide = Role("InitiatingSide") AcceptingSide = Role("AcceptingSide") Small1 = Spec("Small.1") Small2 = Spec("Small.2") Small5 = Spec("Small.5") Middle1 = Spec("Middle.1") Middle2 = Spec("Middle.2") Middle5 = Spec("Middle.5") Large1 = Spec("Large.1") Large2 = Spec("Large.2") )
const AllPortRange = "-1/-1"
const BusinessInfoKey = "Terraform"
const COLON_SEPARATED = ":"
const COMMA_SEPARATED = ","
const CharityPageUrl = "http://promotion.alicdn.com/help/oss/error.html"
const DBConnectionSuffix = ".mysql.rds.aliyuncs.com"
const DB_DEFAULT_CONNECT_PORT = "3306"
default connect port of db
const DEFAULT_DB_SECURITY_IP = "127.0.0.1"
default security ip for db
const DEFAULT_INSTANCE_COUNT = 1
we the count of create instance is only one
const DEFAULT_REGION = "cn-beijing"
default region for all resource
const DOT_SEPARATED = "."
const DefaultIntervalLong = 20
const DefaultIntervalMedium = 10
const DefaultIntervalShort = 5
const DefaultLongTimeout = 1000
timeout for long time progerss product, rds e.g.
const DefaultTimeout = 120
timeout for common product, ecs e.g.
const GenerationFour = "ecs-4"
const GenerationOne = "ecs-1"
const GenerationThree = "ecs-3"
const GenerationTwo = "ecs-2"
const LOCAL_HOST_IP = "127.0.0.1"
const MULTI_IZ_SYMBOL = "MAZ"
symbol of multiIZ
const Negative = ecs.Spec("Negative")
const ServerSideEncryptionAes256 = "AES256"
Variables ¶
var BACKUP_TIME = []string{
"00:00Z-01:00Z", "01:00Z-02:00Z", "02:00Z-03:00Z", "03:00Z-04:00Z", "04:00Z-05:00Z",
"05:00Z-06:00Z", "06:00Z-07:00Z", "07:00Z-08:00Z", "08:00Z-09:00Z", "09:00Z-10:00Z",
"10:00Z-11:00Z", "11:00Z-12:00Z", "12:00Z-13:00Z", "13:00Z-14:00Z", "14:00Z-15:00Z",
"15:00Z-16:00Z", "16:00Z-17:00Z", "17:00Z-18:00Z", "18:00Z-19:00Z", "19:00Z-20:00Z",
"20:00Z-21:00Z", "21:00Z-22:00Z", "22:00Z-23:00Z", "23:00Z-24:00Z",
}
var CHARACTER_SET_NAME = []string{
"utf8", "gbk", "latin1", "utf8mb4",
"Chinese_PRC_CI_AS", "Chinese_PRC_CS_AS", "SQL_Latin1_General_CP1_CI_AS", "SQL_Latin1_General_CP1_CS_AS", "Chinese_PRC_BIN",
}
var DefaultBusinessInfo = ecs.BusinessInfo{
Pack: "terraform",
}
var HalfIoOptimizedFamily = map[string]string{"ecs.s2": "", "ecs.s3": "", "ecs.m1": "", "ecs.m2": "", "ecs.c1": "", "ecs.c2": ""}
var NoneIoOptimizedFamily = map[string]string{"ecs.t1": "", "ecs.t2": "", "ecs.s1": ""}
var NoneIoOptimizedInstanceType = map[string]string{"ecs.s2.small": ""}
var OutdatedDiskCategory = map[ecs.DiskCategory]ecs.DiskCategory{ ecs.DiskCategoryCloud: ecs.DiskCategoryCloud}
var SupportedDiskCategory = map[ecs.DiskCategory]ecs.DiskCategory{ ecs.DiskCategoryCloudSSD: ecs.DiskCategoryCloudSSD, ecs.DiskCategoryCloudEfficiency: ecs.DiskCategoryCloudEfficiency, ecs.DiskCategoryCloud: ecs.DiskCategoryCloud}
ValidProtocols network protocol list
var WEEK_ENUM = []string{"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}
Functions ¶
func AssemblePolicyDocument ¶ added in v1.2.0
func AssembleRolePolicyDocument ¶ added in v1.2.0
func GetAllRouterInterfaceSpec ¶ added in v0.1.1
func GetAllRouterInterfaceSpec() (specifications []string)
func GetIntersection ¶ added in v1.2.0
func GetNotFoundMessage ¶ added in v1.8.1
func GetTimeErrorFromString ¶ added in v1.8.1
func GetTimeoutMessage ¶ added in v1.8.1
func IsExceptedError ¶ added in v0.1.1
func NotFoundDBInstance ¶ added in v1.8.0
func NotFoundError ¶ added in v0.1.1
func ParsePolicyDocument ¶ added in v1.2.0
func Provider ¶
func Provider() terraform.ResourceProvider
Provider returns a schema.Provider for alicloud
func RamEntityNotExist ¶ added in v1.2.0
func RemoveTags ¶
func RemoveTags(client *ecs.Client, args *RemoveTagsArgs) error
func TransformPeriod2Time ¶
turn period to TimeType
func TransformTime2Period ¶
turn TimeType to Period
func VSwitchesDecriptionAttributes ¶ added in v1.7.2
func VSwitchesDecriptionAttributes(d *schema.ResourceData, vsws []vpc.VSwitch, meta interface{}) error
Types ¶
type AddTagsArgs ¶
type AliyunClient ¶
AliyunClient of aliyun
func (*AliyunClient) ActiveScalingConfigurationById ¶
func (client *AliyunClient) ActiveScalingConfigurationById(sgId, configId string) error
func (*AliyunClient) AllocateDBPublicConnection ¶
func (client *AliyunClient) AllocateDBPublicConnection(instanceId, prefix, port string) error
func (*AliyunClient) CheckParameterValidity ¶ added in v0.1.1
func (client *AliyunClient) CheckParameterValidity(d *schema.ResourceData, meta interface{}) (map[ResourceKeyType]interface{}, error)
func (*AliyunClient) DeleteScalingGroupById ¶
func (client *AliyunClient) DeleteScalingGroupById(sgId string) error
func (*AliyunClient) DeleteScalingRuleById ¶
func (client *AliyunClient) DeleteScalingRuleById(ruleId string) error
func (*AliyunClient) DeleteScheduleById ¶
func (client *AliyunClient) DeleteScheduleById(scheduleId string) error
func (*AliyunClient) DescribeBackupPolicy ¶ added in v1.8.0
func (client *AliyunClient) DescribeBackupPolicy(instanceId string) (policy *rds.DescribeBackupPolicyResponse, err error)
func (*AliyunClient) DescribeDBInstanceById ¶
func (client *AliyunClient) DescribeDBInstanceById(id string) (instance *rds.DBInstanceAttribute, err error)
_______________ _______________ _______________ | | ______param______\ | | _____request_____\ | | | Business | | Service | | SDK/API | | | __________________ | | __________________ | | |______________| \ (obj, err) |______________| \ (status, cont) |______________| | | |A. {instance, nil} |a. {200, content} |B. {nil, error} |b. {200, nil} |c. {4xx, nil}
The API return 200 for resource not found. When getInstance is empty, then throw InstanceNotfound error. That the business layer only need to check error.
func (*AliyunClient) DescribeDBInstanceNetInfoByIpType ¶ added in v1.5.0
func (client *AliyunClient) DescribeDBInstanceNetInfoByIpType(instanceId string, ipType IPType) (*rds.DBInstanceNetInfo, error)
func (*AliyunClient) DescribeDBInstanceNetInfos ¶ added in v1.5.0
func (client *AliyunClient) DescribeDBInstanceNetInfos(instanceId string) ([]rds.DBInstanceNetInfo, error)
func (*AliyunClient) DescribeDBSecurityIps ¶
func (client *AliyunClient) DescribeDBSecurityIps(instanceId string) (ips []rds.DBInstanceIPArray, err error)
func (*AliyunClient) DescribeDatabaseAccount ¶ added in v1.5.0
func (client *AliyunClient) DescribeDatabaseAccount(instanceId, accountName string) (ds *rds.DBInstanceAccount, err error)
func (*AliyunClient) DescribeDatabaseByName ¶
func (client *AliyunClient) DescribeDatabaseByName(instanceId, dbName string) (ds *rds.Database, err error)
func (*AliyunClient) DescribeEipAddress ¶
func (client *AliyunClient) DescribeEipAddress(allocationId string) (eip vpc.EipAddress, err error)
func (*AliyunClient) DescribeForwardEntry ¶
func (client *AliyunClient) DescribeForwardEntry(forwardTableId string, forwardEntryId string) (entry vpc.ForwardTableEntry, err error)
func (*AliyunClient) DescribeImage ¶
func (client *AliyunClient) DescribeImage(imageId string) (*ecs.ImageType, error)
func (*AliyunClient) DescribeLoadBalancerAttribute ¶
func (client *AliyunClient) DescribeLoadBalancerAttribute(slbId string) (*slb.LoadBalancerType, error)
func (*AliyunClient) DescribeLoadBalancerRuleId ¶ added in v1.7.0
func (*AliyunClient) DescribeMultiIZByRegion ¶
func (client *AliyunClient) DescribeMultiIZByRegion() (izs []string, err error)
return multiIZ list of current region
func (*AliyunClient) DescribeNatGateway ¶
func (client *AliyunClient) DescribeNatGateway(natGatewayId string) (nat vpc.NatGateway, err error)
func (*AliyunClient) DescribeRouterInterface ¶ added in v1.8.1
func (client *AliyunClient) DescribeRouterInterface(interfaceId string) (ri vpc.RouterInterfaceTypeInDescribeRouterInterfaces, err error)
func (*AliyunClient) DescribeScalingConfigurationById ¶
func (client *AliyunClient) DescribeScalingConfigurationById(configId string) (*ess.ScalingConfigurationItemType, error)
func (*AliyunClient) DescribeScalingGroupById ¶
func (client *AliyunClient) DescribeScalingGroupById(sgId string) (*ess.ScalingGroupItemType, error)
func (*AliyunClient) DescribeScalingRuleById ¶
func (client *AliyunClient) DescribeScalingRuleById(sgId, ruleId string) (*ess.ScalingRuleItemType, error)
func (*AliyunClient) DescribeScheduleById ¶
func (client *AliyunClient) DescribeScheduleById(scheduleId string) (*ess.ScheduledTaskItemType, error)
func (*AliyunClient) DescribeSecurity ¶
func (client *AliyunClient) DescribeSecurity(securityGroupId string) (*ecs.DescribeSecurityGroupAttributeResponse, error)
func (*AliyunClient) DescribeSecurityGroupRule ¶
func (client *AliyunClient) DescribeSecurityGroupRule(groupId, direction, ipProtocol, portRange, nicType, cidr_ip, policy string, priority int) (*ecs.PermissionType, error)
func (*AliyunClient) DescribeSnatEntry ¶
func (client *AliyunClient) DescribeSnatEntry(snatTableId string, snatEntryId string) (snat vpc.SnatTableEntry, err error)
func (*AliyunClient) DescribeVpc ¶
func (client *AliyunClient) DescribeVpc(vpcId string) (v vpc.DescribeVpcAttributeResponse, err error)
func (*AliyunClient) DescribeVswitch ¶ added in v1.8.1
func (client *AliyunClient) DescribeVswitch(vswitchId string) (v vpc.DescribeVSwitchAttributesResponse, err error)
func (*AliyunClient) DescribeZone ¶
func (client *AliyunClient) DescribeZone(zoneID string) (*ecs.ZoneType, error)
DescribeZone validate zoneId is valid in region
func (*AliyunClient) DiskAvailable ¶
func (client *AliyunClient) DiskAvailable(zone *ecs.ZoneType, diskCategory ecs.DiskCategory) error
func (*AliyunClient) EssRemoveInstances ¶ added in v1.7.0
func (client *AliyunClient) EssRemoveInstances(groupId string, instanceIds []string) error
func (*AliyunClient) FetchSpecifiedInstanceTypeFamily ¶ added in v0.1.1
func (client *AliyunClient) FetchSpecifiedInstanceTypeFamily(regionId common.Region, zoneId string, generations []string, all_zones []ecs.ZoneType) (map[string]ecs.InstanceTypeFamily, map[string]ecs.InstanceTypeFamily, error)
func (*AliyunClient) FetchSpecifiedInstanceTypesByFamily ¶ added in v0.1.1
func (client *AliyunClient) FetchSpecifiedInstanceTypesByFamily(zoneId, instanceTypeFamily string, all_zones []ecs.ZoneType) (map[string]ecs.InstanceTypeItemType, error)
func (*AliyunClient) GetSecurityIps ¶
func (client *AliyunClient) GetSecurityIps(instanceId string) ([]string, error)
func (*AliyunClient) GrantAccountPrivilege ¶ added in v1.5.0
func (client *AliyunClient) GrantAccountPrivilege(instanceId, account, dbName, privilege string) error
func (*AliyunClient) JoinSecurityGroups ¶
func (client *AliyunClient) JoinSecurityGroups(instanceId string, securityGroupIds []string) error
todo: support syc
func (*AliyunClient) JudgeRegionValidation ¶ added in v0.1.1
func (client *AliyunClient) JudgeRegionValidation(key string, region common.Region) error
func (*AliyunClient) JudgeRolePolicyPrincipal ¶ added in v1.2.0
func (client *AliyunClient) JudgeRolePolicyPrincipal(roleName string) error
Judge whether the role policy contains service "ecs.aliyuncs.com"
func (*AliyunClient) LeaveSecurityGroups ¶
func (client *AliyunClient) LeaveSecurityGroups(instanceId string, securityGroupIds []string) error
func (*AliyunClient) ModifyDBBackupPolicy ¶ added in v1.8.0
func (client *AliyunClient) ModifyDBBackupPolicy(instanceId, backupTime, backupPeriod, retentionPeriod, backupLog, LogBackupRetentionPeriod string) error
func (*AliyunClient) ModifyDBSecurityIps ¶
func (client *AliyunClient) ModifyDBSecurityIps(instanceId, ips string) error
func (*AliyunClient) QueryInstanceSystemDisk ¶
func (client *AliyunClient) QueryInstanceSystemDisk(id string) (disk *ecs.DiskItemType, err error)
func (*AliyunClient) QueryInstancesById ¶
func (client *AliyunClient) QueryInstancesById(id string) (instance *ecs.InstanceAttributesType, err error)
func (*AliyunClient) QueryInstancesByIds ¶
func (client *AliyunClient) QueryInstancesByIds(ids []string) (instances []ecs.InstanceAttributesType, err error)
func (*AliyunClient) QueryInstancesWithKeyPair ¶ added in v0.1.1
func (client *AliyunClient) QueryInstancesWithKeyPair(region common.Region, instanceIds, keypair string) ([]interface{}, []ecs.InstanceAttributesType, error)
func (*AliyunClient) QueryOssBucketById ¶ added in v0.1.1
func (client *AliyunClient) QueryOssBucketById(id string) (info *oss.BucketInfo, err error)
func (*AliyunClient) QueryRouteEntry ¶
func (client *AliyunClient) QueryRouteEntry(routeTableId, cidrBlock, nextHopType, nextHopId string) (rn vpc.RouteEntry, err error)
func (*AliyunClient) QueryRouteTableById ¶
func (client *AliyunClient) QueryRouteTableById(routeTableId string) (rt vpc.RouteTable, err error)
func (*AliyunClient) ReleaseDBPublicConnection ¶ added in v1.5.0
func (client *AliyunClient) ReleaseDBPublicConnection(instanceId, connection string) error
func (*AliyunClient) ResourceAvailable ¶
func (client *AliyunClient) ResourceAvailable(zone *ecs.ZoneType, resourceType ecs.ResourceType) error
ResourceAvailable check resource available for zone
func (*AliyunClient) RevokeAccountPrivilege ¶ added in v1.5.0
func (client *AliyunClient) RevokeAccountPrivilege(instanceId, account, dbName string) error
func (*AliyunClient) RevokeSecurityGroup ¶
func (client *AliyunClient) RevokeSecurityGroup(args *ecs.RevokeSecurityGroupArgs) error
func (*AliyunClient) RevokeSecurityGroupEgress ¶
func (client *AliyunClient) RevokeSecurityGroupEgress(args *ecs.RevokeSecurityGroupEgressArgs) error
func (*AliyunClient) WaitForAccount ¶ added in v1.8.0
func (*AliyunClient) WaitForAccountPrivilege ¶ added in v1.8.0
func (client *AliyunClient) WaitForAccountPrivilege(instanceId, accountName, dbName, privilege string, timeout int) error
func (*AliyunClient) WaitForAccountPrivilegeRevoked ¶ added in v1.8.0
func (client *AliyunClient) WaitForAccountPrivilegeRevoked(instanceId, accountName, dbName string, timeout int) error
func (*AliyunClient) WaitForAllRouteEntries ¶ added in v1.8.1
func (client *AliyunClient) WaitForAllRouteEntries(routeTableId string, status Status, timeout int) error
func (*AliyunClient) WaitForDBConnection ¶ added in v1.8.0
func (client *AliyunClient) WaitForDBConnection(instanceId string, netType IPType, timeout int) error
func (*AliyunClient) WaitForDBInstance ¶ added in v1.8.0
func (client *AliyunClient) WaitForDBInstance(instanceId string, status Status, timeout int) error
WaitForInstance waits for instance to given status
func (*AliyunClient) WaitForEip ¶ added in v1.8.1
func (client *AliyunClient) WaitForEip(allocationId string, status Status, timeout int) error
func (*AliyunClient) WaitForRouterInterface ¶ added in v1.8.1
func (client *AliyunClient) WaitForRouterInterface(interfaceId string, status Status, timeout int) error
func (*AliyunClient) WaitForVSwitch ¶ added in v1.8.1
func (client *AliyunClient) WaitForVSwitch(vswitchId string, status Status, timeout int) error
func (*AliyunClient) WaitForVpc ¶ added in v1.8.1
func (client *AliyunClient) WaitForVpc(vpcId string, status Status, timeout int) error
type Config ¶
type Config struct { AccessKey string SecretKey string Region common.Region RegionId string SecurityToken string }
Config of aliyun
type DBAccountPrivilege ¶ added in v1.8.0
type DBAccountPrivilege string
type DBAccountType ¶ added in v1.8.0
type DBAccountType string
type GroupRuleNicType ¶
type GroupRuleNicType string
type GroupRulePolicy ¶
type GroupRulePolicy string
type InstanceNetWork ¶
type InstanceNetWork string
type InternetChargeType ¶ added in v1.8.1
type InternetChargeType string
type LifecycleRuleStatus ¶ added in v0.1.1
type LifecycleRuleStatus string
type Listener ¶
type Listener struct { slb.HTTPListenerType InstancePort int LoadBalancerPort int Protocol string //tcp & udp PersistenceTimeout int //https SSLCertificateId string //tcp HealthCheckType slb.HealthCheckType //api interface: http & https is HealthCheckTimeout, tcp & udp is HealthCheckConnectTimeout HealthCheckConnectTimeout int }
type ListenerErr ¶
func (*ListenerErr) Error ¶
func (e *ListenerErr) Error() string
type NatGatewaySpec ¶ added in v1.8.1
type NatGatewaySpec string
type NetworkType ¶ added in v1.8.0
type NetworkType string
type Policy ¶ added in v1.2.0
type Policy struct { Statement []PolicyStatement Version string }
type PolicyStatement ¶ added in v1.2.0
type PolicyStatement struct { Effect Effect Action interface{} Resource interface{} }
type ProviderError ¶ added in v1.8.1
type ProviderError struct {
// contains filtered or unexported fields
}
An Error represents a custom error for Terraform failure response
func (*ProviderError) Error ¶ added in v1.8.1
func (e *ProviderError) Error() string
func (*ProviderError) ErrorCode ¶ added in v1.8.1
func (err *ProviderError) ErrorCode() string
func (*ProviderError) Message ¶ added in v1.8.1
func (err *ProviderError) Message() string
type RemoveTagsArgs ¶
type ResourceKeyType ¶ added in v0.1.1
type ResourceKeyType string
type ResourceType ¶ added in v1.8.0
type ResourceType string
type RolePolicy ¶ added in v1.2.0
type RolePolicy struct { Statement []RolePolicyStatement Version string }
func ParseRolePolicyDocument ¶ added in v1.2.0
func ParseRolePolicyDocument(policyDocument string) (RolePolicy, error)
type RolePolicyStatement ¶ added in v1.2.0
type RouterType ¶ added in v1.8.1
type RouterType string
type SecurityGroup ¶ added in v1.9.0
type SecurityGroup struct { Attributes ecs.DescribeSecurityGroupAttributeResponse CreationTime util.ISO6801Time }
Source Files ¶
- common.go
- config.go
- data_source_alicloud_common.go
- data_source_alicloud_dns_domains.go
- data_source_alicloud_dns_groups.go
- data_source_alicloud_dns_records.go
- data_source_alicloud_eips.go
- data_source_alicloud_images.go
- data_source_alicloud_instance_types.go
- data_source_alicloud_instances.go
- data_source_alicloud_key_pairs.go
- data_source_alicloud_kms_keys.go
- data_source_alicloud_ram_account_alias.go
- data_source_alicloud_ram_groups.go
- data_source_alicloud_ram_policies.go
- data_source_alicloud_ram_roles.go
- data_source_alicloud_ram_users.go
- data_source_alicloud_regions.go
- data_source_alicloud_security_groups.go
- data_source_alicloud_vpcs.go
- data_source_alicloud_vswitches.go
- data_source_alicloud_zones.go
- diff_suppress_funcs.go
- errors.go
- extension_ecs.go
- extension_kms.go
- extension_oss.go
- extension_rds.go
- extension_slb.go
- extension_tags.go
- extension_vpc.go
- provider.go
- resource_alicloud_cdn_domain.go
- resource_alicloud_cs_kubernetes.go
- resource_alicloud_cs_swarm.go
- resource_alicloud_db_account.go
- resource_alicloud_db_account_privilege.go
- resource_alicloud_db_backup_policy.go
- resource_alicloud_db_connection.go
- resource_alicloud_db_database.go
- resource_alicloud_db_instance.go
- resource_alicloud_disk.go
- resource_alicloud_disk_attachment.go
- resource_alicloud_dns.go
- resource_alicloud_dns_group.go
- resource_alicloud_dns_record.go
- resource_alicloud_eip.go
- resource_alicloud_eip_association.go
- resource_alicloud_ess_attachment.go
- resource_alicloud_ess_scalingconfiguration.go
- resource_alicloud_ess_scalinggroup.go
- resource_alicloud_ess_scalingrule.go
- resource_alicloud_ess_schedule.go
- resource_alicloud_forward.go
- resource_alicloud_instance.go
- resource_alicloud_key_pair.go
- resource_alicloud_key_pair_attachment.go
- resource_alicloud_kms_key.go
- resource_alicloud_nat_gateway.go
- resource_alicloud_oss_bucket.go
- resource_alicloud_oss_bucket_object.go
- resource_alicloud_ram_access_key.go
- resource_alicloud_ram_account_alias.go
- resource_alicloud_ram_alias.go
- resource_alicloud_ram_group.go
- resource_alicloud_ram_group_membership.go
- resource_alicloud_ram_group_policy_attachment.go
- resource_alicloud_ram_login_profile.go
- resource_alicloud_ram_policy.go
- resource_alicloud_ram_role.go
- resource_alicloud_ram_role_attachment.go
- resource_alicloud_ram_role_policy_attachment.go
- resource_alicloud_ram_user.go
- resource_alicloud_ram_user_policy_attachment.go
- resource_alicloud_router_interface.go
- resource_alicloud_security_group.go
- resource_alicloud_security_group_rule.go
- resource_alicloud_slb.go
- resource_alicloud_slb_attachment.go
- resource_alicloud_slb_listener.go
- resource_alicloud_slb_rule.go
- resource_alicloud_slb_server_group.go
- resource_alicloud_snat.go
- resource_alicloud_vpc.go
- resource_alicloud_vroute_entry.go
- resource_alicloud_vswitch.go
- service_alicloud_ecs.go
- service_alicloud_ess.go
- service_alicloud_oss.go
- service_alicloud_ram.go
- service_alicloud_rds.go
- service_alicloud_slb.go
- service_alicloud_vpc.go
- tags.go
- validators.go