Documentation ¶
Index ¶
- Constants
- Variables
- type AccountPrivilege
- type AccountPrivilegeInfo
- type AccountStatus
- type AccountType
- type AllocateInstancePublicConnectionArgs
- type AllocateInstancePublicConnectionResponse
- type BackupPolicy
- type Client
- func NewClient(accessKeyId, accessKeySecret string) *Client
- func NewClientWithEndpoint(endpoint string, accessKeyId, accessKeySecret string) *Client
- func NewClientWithRegion(endpoint string, accessKeyId, accessKeySecret string, regionID common.Region) *Client
- func NewRDSClient(accessKeyId, accessKeySecret string, regionID common.Region) *Client
- func (client *Client) AllocateInstancePublicConnection(args *AllocateInstancePublicConnectionArgs) (resp *AllocateInstancePublicConnectionResponse, err error)
- func (client *Client) CreateAccount(args *CreateAccountArgs) (resp *CreateAccountResponse, err error)
- func (client *Client) CreateDatabase(args *CreateDatabaseArgs) (resp *CreateDatabaseResponse, err error)
- func (client *Client) CreateOrder(args *CreateOrderArgs) (resp CreateOrderResponse, err error)
- func (client *Client) DeleteAccount(instanceId, accountName string) (resp *DeleteAccountResponse, err error)
- func (client *Client) DeleteDatabase(instanceId, dbName string) error
- func (client *Client) DeleteInstance(instanceId string) error
- func (client *Client) DescribeAccounts(args *DescribeAccountsArgs) (resp *DescribeAccountsResponse, err error)
- func (client *Client) DescribeBackupPolicy(args *DescribeBackupPolicyArgs) (resp *DescribeBackupPolicyResponse, err error)
- func (client *Client) DescribeDBInstanceAttribute(args *DescribeDBInstancesArgs) (resp *DescribeDBInstanceAttributeResponse, err error)
- func (client *Client) DescribeDBInstanceIPs(args *DescribeDBInstanceIPsArgs) (resp *DescribeDBInstanceIPsResponse, err error)
- func (client *Client) DescribeDBInstanceNetInfo(args *DescribeDBInstanceNetInfoArgs) (resp *DescribeDBInstanceNetInfoResponse, err error)
- func (client *Client) DescribeDBInstancePerformance(args *DescribeDBInstancePerformanceArgs) (resp DescribeDBInstancePerformanceResponse, err error)
- func (client *Client) DescribeDatabases(args *DescribeDatabasesArgs) (resp *DescribeDatabasesResponse, err error)
- func (client *Client) DescribeRegions() (resp *DescribeRegionsResponse, err error)
- func (client *Client) GrantAccountPrivilege(args *GrantAccountPrivilegeArgs) (resp *GrantAccountPrivilegeResponse, err error)
- func (client *Client) ModifyBackupPolicy(args *ModifyBackupPolicyArgs) (resp *ModifyBackupPolicyResponse, err error)
- func (client *Client) ModifyDBInstanceSpec(args *ModifyDBInstanceSpecArgs) (resp *ModifyDBInstanceSpecResponse, err error)
- func (client *Client) ModifySecurityIps(args *ModifySecurityIpsArgs) (resp common.Response, err error)
- func (client *Client) WaitForAccount(instanceId string, accountName string, status AccountStatus, timeout int) error
- func (client *Client) WaitForAccountPrivilege(instanceId, accountName, dbName string, privilege AccountPrivilege, ...) error
- func (client *Client) WaitForAllDatabase(instanceId string, databaseNames []string, status InstanceStatus, timeout int) error
- func (client *Client) WaitForInstance(instanceId string, status InstanceStatus, timeout int) error
- func (client *Client) WaitForInstanceAsyn(instanceId string, status InstanceStatus, timeout int) error
- func (client *Client) WaitForPublicConnection(instanceId string, timeout int) error
- type CommodityCode
- type ConnectionMode
- type CreateAccountArgs
- type CreateAccountResponse
- type CreateDatabaseArgs
- type CreateDatabaseResponse
- type CreateOrderArgs
- type CreateOrderResponse
- type DBInstanceAccount
- type DBInstanceAttribute
- type DBInstanceIPArray
- type DBInstanceIPList
- type DBInstanceNetInfo
- type DBPayType
- type Database
- type DatabasePrivilege
- type DeleteAccountArgs
- type DeleteAccountResponse
- type DeleteDBInstanceArgs
- type DeleteDBInstanceResponse
- type DeleteDatabaseArgs
- type DeleteDatabaseResponse
- type DescribeAccountsArgs
- type DescribeAccountsResponse
- type DescribeBackupPolicyArgs
- type DescribeBackupPolicyResponse
- type DescribeDBInstanceAttributeResponse
- type DescribeDBInstanceIPsArgs
- type DescribeDBInstanceIPsResponse
- type DescribeDBInstanceNetInfoArgs
- type DescribeDBInstanceNetInfoResponse
- type DescribeDBInstancePerformanceArgs
- type DescribeDBInstancePerformanceResponse
- type DescribeDBInstancesArgs
- type DescribeDatabasesArgs
- type DescribeDatabasesResponse
- type DescribeRegionsArgs
- type DescribeRegionsResponse
- type Engine
- type GrantAccountPrivilegeArgs
- type GrantAccountPrivilegeResponse
- type IPType
- type InstanceStatus
- type ModifyBackupPolicyArgs
- type ModifyBackupPolicyResponse
- type ModifyDBInstanceSpecArgs
- type ModifyDBInstanceSpecResponse
- type ModifySecurityIpsArgs
- type PerformanceKeyType
- type PerformanceValueType
- type RDSRegion
- type ReadOnlyDBInstanceIds
Constants ¶
const ( // ECSDefaultEndpoint is the default API endpoint of RDS services RDSDefaultEndpoint = "https://rds.aliyuncs.com" RDSAPIVersion = "2014-08-15" RDSServiceCode = "rds" )
const ( Creating = InstanceStatus("Creating") // For backward compatability Running = InstanceStatus("Running") Deleting = InstanceStatus("Deleting") Rebooting = InstanceStatus("Rebooting") Restoring = InstanceStatus("Restoring") Importing = InstanceStatus("Importing") DBInstanceNetTypeChanging = InstanceStatus("DBInstanceNetTypeChanging") )
Constants of InstanceStatus
const ( Prepaid = DBPayType("Prepaid") Postpaid = DBPayType("Postpaid") )
const ( Rds = CommodityCode("rds") Bards = CommodityCode("bards") Rords = CommodityCode("rords") )
const ( MySQL = Engine("MySQL") SQLServer = Engine("SQLServer") PPAS = Engine("PPAS") PG = Engine("PG") )
const ( Performance = ConnectionMode("Performance") Safty = ConnectionMode("Safty") )
const ( Available = AccountStatus("Available") )
const ( ReadOnly = AccountPrivilege("ReadOnly") ReadWrite = AccountPrivilege("ReadWrite") )
const ( Inner = IPType("Inner") Private = IPType("Private") Public = IPType("Public") )
const DefaultResource = "buy"
default resource value for create order
const DefaultWaitForInterval = 10
const InstanceDefaultTimeout = 120
Default timeout value for WaitForInstance method
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 WEEK_ENUM = []string{"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}
Functions ¶
This section is empty.
Types ¶
type AccountPrivilege ¶
type AccountPrivilege string
type AccountPrivilegeInfo ¶
type AccountStatus ¶
type AccountStatus string
type AccountType ¶
type BackupPolicy ¶
type Client ¶
func NewClientWithEndpoint ¶
func NewClientWithRegion ¶
func NewRDSClient ¶
func (*Client) AllocateInstancePublicConnection ¶
func (client *Client) AllocateInstancePublicConnection(args *AllocateInstancePublicConnectionArgs) (resp *AllocateInstancePublicConnectionResponse, err error)
AllocateInstancePublicConnection allocate public connection
You can read doc at https://help.aliyun.com/document_detail/26234.html?spm=5176.doc26265.6.708.PdsJnL
func (*Client) CreateAccount ¶
func (client *Client) CreateAccount(args *CreateAccountArgs) (resp *CreateAccountResponse, err error)
CreateAccount create rds account
You can read doc at https://help.aliyun.com/document_detail/26263.html?spm=5176.doc26240.6.736.ZDihok
func (*Client) CreateDatabase ¶
func (client *Client) CreateDatabase(args *CreateDatabaseArgs) (resp *CreateDatabaseResponse, err error)
CreateDatabase create rds database
You can read doc at https://help.aliyun.com/document_detail/26243.html?spm=5176.doc26244.6.715.OSNUa8
func (*Client) CreateOrder ¶
func (client *Client) CreateOrder(args *CreateOrderArgs) (resp CreateOrderResponse, err error)
CreateOrder create db instance order you can read doc at http://docs.alibaba-inc.com/pages/viewpage.action?pageId=259349053
func (*Client) DeleteAccount ¶
func (client *Client) DeleteAccount(instanceId, accountName string) (resp *DeleteAccountResponse, err error)
DeleteAccount delete account
You can read doc at https://help.aliyun.com/document_detail/26264.html?spm=5176.doc26269.6.737.CvlZp6
func (*Client) DeleteDatabase ¶
DeleteInstance deletes database
You can read doc at https://help.aliyun.com/document_detail/26259.html?spm=5176.doc26260.6.731.Abjwne
func (*Client) DeleteInstance ¶
DeleteInstance deletes db instance
You can read doc at https://help.aliyun.com/document_detail/26229.html?spm=5176.doc26315.6.700.7SmyAT
func (*Client) DescribeAccounts ¶
func (client *Client) DescribeAccounts(args *DescribeAccountsArgs) (resp *DescribeAccountsResponse, err error)
DescribeAccounts describes db accounts
You can read doc at https://help.aliyun.com/document_detail/26265.html?spm=5176.doc26266.6.739.UjtjaI
func (*Client) DescribeBackupPolicy ¶
func (client *Client) DescribeBackupPolicy(args *DescribeBackupPolicyArgs) (resp *DescribeBackupPolicyResponse, err error)
DescribeBackupPolicy describe backup policy
You can read doc at https://help.aliyun.com/document_detail/26275.html?spm=5176.doc26276.6.750.CUqjDn
func (*Client) DescribeDBInstanceAttribute ¶
func (client *Client) DescribeDBInstanceAttribute(args *DescribeDBInstancesArgs) (resp *DescribeDBInstanceAttributeResponse, err error)
DescribeDBInstanceAttribute describes db instance
You can read doc at https://help.aliyun.com/document_detail/26231.html?spm=5176.doc26228.6.702.uhzm31
func (*Client) DescribeDBInstanceIPs ¶
func (client *Client) DescribeDBInstanceIPs(args *DescribeDBInstanceIPsArgs) (resp *DescribeDBInstanceIPsResponse, err error)
DescribeDBInstanceIPArrayList describe security ips
You can read doc at https://help.aliyun.com/document_detail/26241.html?spm=5176.doc26242.6.715.d9pxvr
func (*Client) DescribeDBInstanceNetInfo ¶
func (client *Client) DescribeDBInstanceNetInfo(args *DescribeDBInstanceNetInfoArgs) (resp *DescribeDBInstanceNetInfoResponse, err error)
DescribeDBInstanceNetInfo describe rds net info
You can read doc at https://help.aliyun.com/document_detail/26237.html?spm=5176.doc26234.6.711.vHOktx
func (*Client) DescribeDBInstancePerformance ¶
func (client *Client) DescribeDBInstancePerformance(args *DescribeDBInstancePerformanceArgs) (resp DescribeDBInstancePerformanceResponse, err error)
func (*Client) DescribeDatabases ¶
func (client *Client) DescribeDatabases(args *DescribeDatabasesArgs) (resp *DescribeDatabasesResponse, err error)
DescribeDatabases describes db database
You can read doc at https://help.aliyun.com/document_detail/26260.html?spm=5176.doc26258.6.732.gCx1a3
func (*Client) DescribeRegions ¶
func (client *Client) DescribeRegions() (resp *DescribeRegionsResponse, err error)
DescribeRegions describe rds regions
You can read doc at https://help.aliyun.com/document_detail/26243.html?spm=5176.doc26244.6.715.OSNUa8
func (*Client) GrantAccountPrivilege ¶
func (client *Client) GrantAccountPrivilege(args *GrantAccountPrivilegeArgs) (resp *GrantAccountPrivilegeResponse, err error)
GrantAccountPrivilege grant database privilege to account
You can read doc at https://help.aliyun.com/document_detail/26266.html?spm=5176.doc26264.6.739.o2y01n
func (*Client) ModifyBackupPolicy ¶
func (client *Client) ModifyBackupPolicy(args *ModifyBackupPolicyArgs) (resp *ModifyBackupPolicyResponse, err error)
ModifyBackupPolicy modify backup policy
You can read doc at https://help.aliyun.com/document_detail/26276.html?spm=5176.doc26250.6.751.KOew21
func (*Client) ModifyDBInstanceSpec ¶
func (client *Client) ModifyDBInstanceSpec(args *ModifyDBInstanceSpecArgs) (resp *ModifyDBInstanceSpecResponse, err error)
ModifyDBInstanceSpec modify db instance spec
You can read doc at https://help.aliyun.com/document_detail/26233.html?spm=5176.doc26258.6.707.2QOLrM
func (*Client) ModifySecurityIps ¶
func (client *Client) ModifySecurityIps(args *ModifySecurityIpsArgs) (resp common.Response, err error)
func (*Client) WaitForAccount ¶
func (*Client) WaitForAccountPrivilege ¶
func (client *Client) WaitForAccountPrivilege(instanceId, accountName, dbName string, privilege AccountPrivilege, timeout int) error
func (*Client) WaitForAllDatabase ¶
func (*Client) WaitForInstance ¶
func (client *Client) WaitForInstance(instanceId string, status InstanceStatus, timeout int) error
WaitForInstance waits for instance to given status
func (*Client) WaitForInstanceAsyn ¶
func (client *Client) WaitForInstanceAsyn(instanceId string, status InstanceStatus, timeout int) error
WaitForInstance waits for instance to given status
type CommodityCode ¶
type CommodityCode string
type ConnectionMode ¶
type ConnectionMode string
type CreateAccountArgs ¶
type CreateAccountArgs struct { DBInstanceId string AccountName string AccountPassword string AccountType AccountType AccountDescription string }
type CreateAccountResponse ¶
type CreateDatabaseArgs ¶
type CreateDatabaseResponse ¶
type CreateOrderArgs ¶
type CreateOrderArgs struct { CommodityCode CommodityCode RegionId common.Region ZoneId string Engine Engine EngineVersion string PayType DBPayType DBInstanceClass string DBInstanceStorage int DBInstanceNetType common.NetType InstanceNetworkType common.NetworkType VPCId string VSwitchId string UsedTime int TimeType common.TimeType Quantity int InstanceUsedType string Resource string AutoPay string AutoRenew string BackupId string RestoreTime string SecurityIPList string BusinessInfo string }
type CreateOrderResponse ¶
type DBInstanceAccount ¶
type DBInstanceAccount struct { DBInstanceId string AccountName string AccountStatus AccountStatus AccountDescription string DatabasePrivileges struct { DatabasePrivilege []DatabasePrivilege } }
type DBInstanceAttribute ¶
type DBInstanceAttribute struct { DBInstanceId string PayType DBPayType DBInstanceType string InstanceNetworkType string ConnectionMode string RegionId string ZoneId string ConnectionString string Port string Engine Engine EngineVersion string DBInstanceClass string DBInstanceMemory int64 DBInstanceStorage int DBInstanceNetType string DBInstanceStatus InstanceStatus DBInstanceDescription string LockMode string LockReason string DBMaxQuantity int AccountMaxQuantity int CreationTime string ExpireTime string MaintainTime string AvailabilityValue string MaxIOPS int MaxConnections int MasterInstanceId string IncrementSourceDBInstanceId string GuardDBInstanceId string TempDBInstanceId string ReadOnlyDBInstanceIds ReadOnlyDBInstanceIds SecurityIPList string }
type DBInstanceIPArray ¶
type DBInstanceIPList ¶
type DBInstanceNetInfo ¶
type Database ¶
type Database struct { DBName string DBInstanceId string Engine string DBStatus InstanceStatus CharacterSetName InstanceStatus DBDescription InstanceStatus Account InstanceStatus AccountPrivilege InstanceStatus Accounts struct { AccountPrivilegeInfo []AccountPrivilegeInfo } }
type DatabasePrivilege ¶
type DatabasePrivilege struct { DBName string AccountPrivilege AccountPrivilege }
type DeleteAccountArgs ¶
type DeleteAccountResponse ¶
type DeleteDBInstanceArgs ¶
type DeleteDBInstanceArgs struct {
DBInstanceId string
}
type DeleteDatabaseArgs ¶
type DeleteDatabaseResponse ¶
type DescribeAccountsArgs ¶
type DescribeAccountsResponse ¶
type DescribeAccountsResponse struct { common.Response Accounts struct { DBInstanceAccount []DBInstanceAccount } }
type DescribeBackupPolicyArgs ¶
type DescribeBackupPolicyArgs struct {
DBInstanceId string
}
type DescribeBackupPolicyResponse ¶
type DescribeBackupPolicyResponse struct { common.Response BackupPolicy }
type DescribeDBInstanceAttributeResponse ¶
type DescribeDBInstanceAttributeResponse struct { common.Response Items struct { DBInstanceAttribute []DBInstanceAttribute } }
type DescribeDBInstanceIPsArgs ¶
type DescribeDBInstanceIPsArgs struct {
DBInstanceId string
}
type DescribeDBInstanceIPsResponse ¶
type DescribeDBInstanceIPsResponse struct { common.Response Items struct { DBInstanceIPArray []DBInstanceIPList } }
type DescribeDBInstanceNetInfoArgs ¶
type DescribeDBInstanceNetInfoArgs struct {
DBInstanceId string
}
type DescribeDBInstanceNetInfoResponse ¶
type DescribeDBInstanceNetInfoResponse struct { common.Response InstanceNetworkType string DBInstanceNetInfos struct { DBInstanceNetInfo []DBInstanceNetInfo } }
type DescribeDBInstancePerformanceArgs ¶
type DescribeDBInstancePerformanceArgs struct { DBInstanceId string StartTime string EndTime string // contains filtered or unexported fields }
func (*DescribeDBInstancePerformanceArgs) Setkey ¶
func (client *DescribeDBInstancePerformanceArgs) Setkey(key string)
type DescribeDBInstancePerformanceResponse ¶
type DescribeDBInstancePerformanceResponse struct { common.Response DBInstanceId string Engine string StartTime util.ISO6801Time EndTime util.ISO6801Time PerformanceKeys struct { PerformanceKey []PerformanceKeyType } }
type DescribeDBInstancesArgs ¶
type DescribeDBInstancesArgs struct {
DBInstanceId string
}
type DescribeDatabasesArgs ¶
type DescribeDatabasesArgs struct { DBInstanceId string DBName string DBStatus InstanceStatus }
type DescribeRegionsArgs ¶
type DescribeRegionsArgs struct { }
type DescribeRegionsResponse ¶
type DescribeRegionsResponse struct { Regions struct { RDSRegion []RDSRegion } }
type GrantAccountPrivilegeArgs ¶
type GrantAccountPrivilegeArgs struct { DBInstanceId string AccountName string DBName string AccountPrivilege AccountPrivilege }
type ModifyBackupPolicyArgs ¶
type ModifyBackupPolicyArgs struct { DBInstanceId string BackupPolicy }
type ModifySecurityIpsArgs ¶
type ModifySecurityIpsArgs struct { DBInstanceId string DBInstanceIPArray }
type PerformanceKeyType ¶
type PerformanceKeyType struct { Key string Unit string ValueFormat string Values struct { PerformanceValue []PerformanceValueType } }
type PerformanceValueType ¶
type PerformanceValueType struct { Value string Date util.ISO6801Time }
type ReadOnlyDBInstanceIds ¶
type ReadOnlyDBInstanceIds struct {
ReadOnlyDBInstanceId []string
}