Data Types

Last updated: 2020-04-02 18:42:32

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

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

DBCreateInfo

Database creation information

Used by actions: CreateDB.

Name Type Required Description
DBName String Yes Database name
Charset String Yes Character set. Valid values: Chinese_PRC_CI_AS, Chinese_PRC_CS_AS, Chinese_PRC_BIN, Chinese_Taiwan_Stroke_CI_AS, SQL_Latin1_General_CP1_CI_AS, and SQL_Latin1_General_CP1_CS_AS. If this parameter is left empty, Chinese_PRC_CI_AS will be used by default
Accounts Array of AccountPrivilege Yes Database account permission information
Remark String Yes 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 (master/slave switching)
  • 4: isolated
  • 5: repossessing
  • 6: repossessed
  • 7: task running (e.g., backing up or rolling back the instance)
  • 8: decommissioned
  • 9: scaling
  • 10: migrating
  • 11: read-only
  • 12: restarting
  • Vip String Instance access IP
    Vport Integer Instance access port
    CreateTime Timestamp Instance creation time
    UpdateTime Timestamp Instance update time
    StartTime Timestamp Instance billing start time
    EndTime Timestamp Instance billing end time
    IsolateTime Timestamp Instance isolation time
    Memory Integer Instance memory size in GB
    UsedStorage Integer Used storage capacity of instance in GB
    Storage Integer Instance storage capacity in GB
    VersionName String Instance version
    RenewFlag Integer Instance renewal flag
    Model Integer Instance high availability status. 1: dual-server high-availability, 2: single-server
    Region String Instance region name, such as ap-guangzhou
    Zone String Instance AZ name, such as ap-guangzhou-1
    BackupTime String Backup time point
    PayMode Integer Instance billing mode. 0: pay-as-you-go
    Uid String Instance UID
    Cpu Integer Number of CPU cores of instance
    Version String Instance version code
    Type String Physical server code
    Pid Integer Billing ID
    UniqVpcId String Unique string-type ID of instance VPC in the format of vpc-xxx, which is an empty string if the basic network is used
    UniqSubnetId String Unique string-type ID of instance subnet in the format of subnet-xxx, which is an empty string if the basic network is used

    DBPrivilege

    Database permission information of account

    Used by actions: CreateAccount、DescribeAccounts.

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

    DBPrivilegeModifyInfo

    Database permission change information

    Used by actions: ModifyAccountPrivilege.

    Name Type Required Description
    DBName String Yes Database name
    Privilege String Yes Permission change information. ReadWrite: read/write, ReadOnly: read-only, Delete: the account has the permission to delete this database

    DBRemark

    Database remarks

    Used by actions: ModifyDBRemark.

    Name Type Required Description
    Name String Yes Database name
    Remark String Yes Remarks

    DbRollbackTimeInfo

    Information of time range available for database rollback

    Used by actions: DescribeRollbackTime.

    Name Type Description
    DBName String Database name
    StartTime Timestamp Start time of time range available for rollback
    EndTime Timestamp End time of time range available for rollback

    DealInfo

    Order information

    Used by actions: DescribeOrders.

    Name Type Description
    DealName String Order name
    Count Integer Number of items
    FlowId Integer ID of associated flow, which can be used to query the flow execution status
    InstanceIdSet Array of String This field is required only for an order that creates an instance, indicating the ID of the instance created by the order
    OwnerUin String Account
    InstanceChargeType String Instance billing type

    InstanceDBDetail

    Instance database information

    Used by actions: DescribeDBs.

    Name Type Description
    InstanceId String Instance ID
    DBDetails Array of DBDetail Database information list

    MigrateDB

    List of databases to be migrated

    Used by actions: CreateMigration、DescribeMigrationDetail、ModifyMigration.

    Name Type Required Description
    DBName String No Name of migrated database

    MigrateDetail

    Migration progress details

    Used by actions: DescribeMigrations.

    Name Type Description
    StepName String Name of current step
    Progress Integer Progress of current step in %

    MigrateSource

    Source type of migration task

    Used by actions: CreateMigration、DescribeMigrationDetail、ModifyMigration.

    Name Type Required Description
    InstanceId String No Source instance ID in the format of mssql-si2823jyl, which is used when MigrateType is 1 (TencentDB for SQL Server)
    CvmId String No ID of source CVM instance, which is used when MigrateType is 2 (CVM-based self-created SQL Server database)
    VpcId String No VPC ID of source CVM instance in the format of vpc-6ys9ont9, which is used when MigrateType is 2 (CVM-based self-created SQL Server database)
    SubnetId String No VPC subnet ID of source CVM instance in the format of subnet-h9extioi, which is used when MigrateType is 2 (CVM-based self-created SQL Server database)
    UserName String No Username, which is used when MigrateType is 1 or 2
    Password String No Password, which is used when MigrateType is 1 or 2
    Ip String No Private IP of source CVM database, which is used when MigrateType is 2 (CVM-based self-created SQL Server database)
    Port Integer No Port number of source CVM database, which is used when MigrateType is 2 (CVM-based self-created SQL Server database)
    Url Array of String No Source backup address for offline migration, which is used when MigrateType is 4 or 5
    UrlPassword String No Source backup password for offline migration, which is used when MigrateType is 4 or 5

    MigrateTarget

    Target type of migration task

    Used by actions: CreateMigration、DescribeMigrationDetail、ModifyMigration.

    Name Type Required Description
    InstanceId String No ID of target instance in the format of mssql-si2823jyl
    UserName String No Username of migration target instance
    Password String No Password of migration target instance

    MigrateTask

    Migration task type

    Used by actions: DescribeMigrations.

    Name Type Description
    MigrateId Integer Migration task ID
    MigrateName String Migration task name
    AppId Integer User ID of migration task
    Region String Migration task region
    SourceType Integer Migration source type. 1: TencentDB for SQL Server, 2: CVM-based self-created SQL Server database; 3: SQL Server backup restoration, 4: SQL Server backup restoration (in COS mode)
    CreateTime Timestamp Migration task creation time
    StartTime Timestamp Migration task start time
    EndTime Timestamp Migration task end time
    Status Integer Migration task status (1: initializing, 4: migrating, 5: migration failed, 6: migration succeeded)
    Message String Information
    CheckFlag Integer Whether migration task has been checked (0: not checked, 1: check succeeded, 2: check failed, 3: checking)
    Progress Integer Migration task progress in %
    MigrateDetail MigrateDetail Migration task progress details

    RegionInfo

    Region information

    Used by actions: DescribeRegions.

    Name Type Description
    Region String Region ID in the format of ap-guangzhou
    RegionName String Region name
    RegionId Integer Numeric ID of region
    RegionState String Current purchasability of this region. UNAVAILABLE: not purchasable, AVAILABLE: purchasable

    SlowlogInfo

    Slow query log file information

    Used by actions: DescribeSlowlogs.

    Name Type Description
    Id Integer Unique ID of slow query log file
    StartTime Timestamp File generation start time
    EndTime Timestamp File generation end time
    Size Integer File size in KB
    Count Integer Number of logs in file
    InternalAddr String Download address for private network
    ExternalAddr String Download address for public network
    Status Integer Status (1: success, 2: failure)
    Note: this field may return null, indicating that no valid values can be obtained.

    SpecInfo

    Information of purchasable specification for an instance

    Used by actions: DescribeProductConfig.

    Name Type Description
    SpecId Integer Instance specification ID. The SpecId returned by DescribeZones together with the purchasable specification information returned by DescribeProductConfig can be used to find out what specifications can be purchased in a specified AZ
    MachineType String Model ID
    MachineTypeName String Model name
    Version String Database version information. Valid values: 2008R2 (SQL Server 2008 Enterprise), 2012SP3 (SQL Server 2012 Enterprise), 2016SP1 (SQL Server 2016 Enterprise), 201602 (SQL Server 2016 Standard), 2017 (SQL Server 2017 Enterprise)
    VersionName String Version name corresponding to the Version field
    Memory Integer Memory size in GB
    CPU Integer Number of CPU cores
    MinStorage Integer Minimum disk size under this specification in GB
    MaxStorage Integer Maximum disk size under this specification in GB
    QPS Integer QPS of this specification
    SuitInfo String Description of this specification
    Pid Integer Pid of this specification
    PostPid Array of Integer Pay-as-you-go Pid list corresponding to this specification
    Note: this field may return null, indicating that no valid values can be obtained.
    PayModeStatus String Billing mode under this specification. POST: pay-as-you-go

    ZoneInfo

    AZ information

    Used by actions: DescribeZones.

    Name Type Description
    Zone String AZ ID in the format of ap-guangzhou-1 (i.e., Guangzhou Zone 1)
    ZoneName String AZ name
    ZoneId Integer Numeric ID of AZ
    SpecId Integer ID of specification purchasable in this AZ, which, together with the returned value of the DescribeProductConfig API, can be used to find out the specifications currently purchasable in the AZ
    Version String Information of database versions purchasable under the current AZ and specification. Valid values: 2008R2 (SQL Server 2008 Enterprise), 2012SP3 (SQL Server 2012 Enterprise), 2016SP1 (SQL Server 2016 Enterprise), 201602 (SQL Server 2016 Standard), 2017 (SQL Server 2017 Enterprise)