Data Types

Last updated: 2021-03-22 18:06:42

AccountCreateInfo

Account creation information

Used by actions: CreateAccount.

Name Type Required Description
UserName String Yes Instance username
Password String Yes Instance password
DBPrivileges Array of DBPrivilege No List of database permissions
Remark String No Account remarks
IsAdmin Boolean No Whether it is an admin account. Default value: no

AccountDetail

Account details

Used by actions: DescribeAccounts.

Name Type Description
Name String Account name
Remark String Account remarks
CreateTime Timestamp Account creation time
Status Integer Account status. 1: creating, 2: normal, 3: modifying, 4: resetting password, -1: deleting
UpdateTime Timestamp Account update time
PassTime Timestamp Password update time
InternalStatus String Internal account status, which should be enable normally
Dbs Array of DBPrivilege Information of read and write permissions of this account on relevant databases
IsAdmin Boolean Whether it is an admin account

AccountPassword

Instance account password information

Used by actions: ResetAccountPassword.

Name Type Required Description
UserName String Yes Username
Password String Yes Password

AccountPrivilege

Database account permission information, which is set when the database is created

Used by actions: CreateDB, DescribeDBs.

Name Type Required Description
UserName String Yes Database username
Privilege String Yes Database permissions. ReadWrite: read/write, ReadOnly: read-only

AccountPrivilegeModifyInfo

Database account permission change information

Used by actions: ModifyAccountPrivilege.

Name Type Required Description
UserName String Yes Database username
DBPrivileges Array of DBPrivilegeModifyInfo Yes Account permission change information

AccountRemark

Account remarks

Used by actions: ModifyAccountRemark.

Name Type Description
UserName String Account name
Remark String New remarks of account

Backup

Backup file details

Used by actions: DescribeBackups.

Name Type Description
FileName String Filename
Size Integer File size in KB
StartTime Timestamp Backup start time
EndTime Timestamp Backup end time
InternalAddr String Download address for private network
ExternalAddr String Download address for public network
Id Integer Unique ID of backup file, which will be used by the RestoreInstance API
Status Integer Backup file status (0: creating, 1: succeeded, 2: failed)
DBs Array of String List of databases for multi-database backup
Strategy Integer Backup policy (0: instance backup, 1: multi-database backup)
BackupWay Integer Backup mode. 0: scheduled, 1: manual
BackupName String Backup name, which can be customized.

CosUploadBackupFile

Querying the size of uploaded backup files.

Used by actions: DescribeBackupUploadSize.

Name Type Description
FileName String Backup name
Size Integer Backup size

DBCreateInfo

Database creation information

Used by actions: CreateDB.

Name Type Required Description
DBName String Yes Database name
Charset String No Character set, which can be queried by the DescribeDBCharsets API. Default value: Chinese_PRC_CI_AS.
Accounts Array of AccountPrivilege No Database account permission information
Remark String No Remarks

DBDetail

Database information

Used by actions: DescribeDBs.

Name Type Description
Name String Database name
Charset String Character set
Remark String Remarks
CreateTime Timestamp Database creation time
Status Integer Database status. 1: creating, 2: running, 3: modifying, -1: dropping
Accounts Array of AccountPrivilege Database account permission information
InternalStatus String Internal status. ONLINE: running

DBInstance

Instance details

Used by actions: DescribeDBInstances.

Name Type Description
InstanceId String Instance ID
Name String Instance name
ProjectId Integer Project ID of instance
RegionId Integer Instance region ID
ZoneId Integer Instance AZ ID
VpcId Integer Instance VPC ID, which will be 0 if the basic network is used
SubnetId Integer Instance VPC subnet ID, which will be 0 if the basic network is used
Status Integer Instance status. Valid values:
  • 1: applying
  • 2: running
  • 3: restrictedly running (primary/secondary switching)