Docs
api
Cloud Database(UDB)
DescribeUDBInstance

Get UDB Information - DescribeUDBInstance

Overview

Retrieve UDB instance information, supporting two types of operations: (1) Specify DBId to get the information of that db; (2) Specify ClassType, Offset, Limit for list operations, to query a certain type of db.

💡 When specifying DBId, there is no need to fill in ClassType, Offset, Limit. If DBId is not specified, then it is necessary to fill in.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is DescribeUDBInstance.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ZonestringAvailability Zone, defaults to all availability zones if not filled in. See Availability Zone ListNo
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.No
ClassTypestringType of DB, if it is a list operation, it needs to be specified, case insensitive, its values are as follows: mysql: SQL; mongo: NOSQL; postgresql: postgresqlNo
OffsetintStarting offset position for pagination display, required for list operationsNo
LimitintNumber of items displayed per page, required when operating the listNo
DBIdstringDB instance id, if specified, the description of a single db instance is obtained, otherwise it is a list operation. When specifying DBId, there is no need to fill in ClassType, Offset, Limit.No
IsInUDBCbooleanCheck DB in the special area?No
UDBCIdstringIf IsInUDBC is True and UDBCId is empty, it means viewing the db of the special zone in the entire available zone. If UDBId is not empty, it only views the db under this special zone.No
IncludeSlavesbooleanWhen only fetching information for this specific DBId, if this option is available, then pull and return all the information of the slave instances for this DBId together.No
VPCIdstringFilter DB according to VPCIdNo
TagstringFilter DB according to Business GroupNo

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
DataSetarray[UDBInstanceSet]DB Instance Information List UDBInstanceSetNo
TotalCountintThe number of user db groups, for mysql: the number of master-slave pairs, if there is no slave, then there is only master. mongodb: the number of replica sets.No

Data Model

UDBInstanceSet

Field NameTypeDescription InformationRequired
ZonestringAvailability Zone of the DB InstanceNo
CaseSensitivityParamint0 is case sensitive, 1 is case insensitiveNo
ClusterRolestringWhen the DB type is mongodb, it returns the role in the cluster where the instance is located, including: mongos, configsrv_sccc, configsrv_csrs, shardsrv_datanode, shardsrv_arbiter. Among them, congfigsrv is divided into sccc and csrs modes, and shardsrv is divided into datanode and arbiter modes.No
DBIdstringDB Instance idNo
NamestringInstance name, at least 6 charactersNo
DBTypeIdstringDB type id, mysql/mongodb each have an id subdivided by version. The current range of id values is [1,7], the corresponding versions are as follows: 1: mysql-5.5, 2: mysql-5.1, 3: percona-5.5, 4: mongodb-2.4, 5: mongodb-2.6, 6: mysql-5.6, 7: percona-5.6.No
ParamGroupIdintConfiguration parameter group id used by the DB instanceNo
AdminUserstringAdministrator account name, default is rootNo
VirtualIPstringDB Instance Virtual IPNo
VirtualIPMacstringMAC address of the DB instance virtual IPNo
VPCIdstringID of VPCNo
SubnetIdstringSubnet IDNo
InstanceTypestringUDB Database Machine TypeNo
InstanceTypeIdintUDB Database Model ID (Deprecated)No
TagstringObtain Other Resource InformationNo
PortintPort number, mysql default 3306, mongodb default 27017No
SrcDBIdstringFor MySQL’s slave, it is the DBId of the master, for the master it is empty, for MongoDB it is the replica set id.No
BackupCountintBackup strategy, cannot be modified, the number of backup files retained, default is 7 timesNo
BackupBeginTimeintBackup strategy, unmodifiable, start time, calculated in units of hours, default is 3 o’clockNo
BackupDurationintBackup strategy, backup time interval within a day, unit in hours, default is 24 hoursNo
BackupBlackliststringBackup strategy, backup blacklist, mongodb is not applicableNo
StatestringDB Status Tags: Init: Initializing, Fail: Installation Failed, Starting: Starting Up, Running: Running, Shutdown: Shutting Down, Shutoff: Shut Off, Delete: Deleted, Upgrading: Upgrading, Promoting: Promoting to Standalone Database in Progress, Recovering: Recovering, Recover fail: Recovery Failed, Remakeing: Remaking, RemakeFail: Remake Failed, VersionUpgrading: Minor Version Upgrading, VersionUpgradeWaitForSwitch: High Availability Waiting for Switch, VersionUpgradeFail: Minor Version Upgrade Failed, UpdatingSSL: Modifying SSL in Progress, UpdateSSLFail: SSL Modification Failed, MajorVersionUpgrading: Major Version Upgrading, MajorVersionUpgradeWaitForSwitch: High Availability Waiting for Switch, MajorVersionUpgradeFailNo
CreateTimeintDB instance creation time, using UTC timestampNo
ModifyTimeintDB instance modification time, using UTC timestampNo
ExpiredTimeintExpiration time of the DB instance, using UTC timestampNo
ChargeTypestringYearly, Monthly, Dynamic, Trial, Default: DynamicNo
MemoryLimitintMemory Limit (MB), default based on configuration modelNo
DiskSpaceintDisk Space (GB), default according to configuration modelNo
UseSSDbooleanUse SSD?No
SSDTypestringSSD Type, SATA/PCI-E/NVMeNo
RolestringDB instance roles, mysql distinguishes master/slave, mongodb has multiple rolesNo
DiskUsedSizefloatUsed space of DB instance disk, unit GBNo
DataFileSizefloatSize of DB instance data file, in GBNo
SystemFileSizefloatSize of DB instance system file, unit GBNo
LogFileSizefloatSize of DB instance log file, in GBNo
BackupDatestringBackup date marker. There are 7 bits, each bit represents the backup situation for one day of the week. 0 indicates that the backup is turned off for the day, 1 indicates that the backup is turned on for the day. The rightmost bit is the backup switch for Sunday, and the rest from right to left are the backup configuration switches for Monday to Saturday, respectively. At least two days of backup must be set each week. For example: 1100000 means that the automatic backup function for Saturday and Friday is turned on.No
InstanceModestringUDB instance mode types, optional values are as follows: “Normal”: Standard edition UDB instance “HA”: High-availability edition UDB instanceNo
DataSetarray[UDBSlaveInstanceSet]If in a scenario where a slave database needs to be returned, return the list of all slave DB instance information for this DB instance. The content of each element in the list is the same as UDBSlaveInstanceSet. If this DB instance does not have a slave, an empty list is returned at this time.No
BackupZonestringCross-Availability Zone High Availability Backup Library Availability ZoneNo
IPv6AddressstringThe IPv6 address of this instanceNo
UserUFileDataUFileDataSetUser backs up to their own UFILE configuration, structure refers to UFileDataSetNo
DBSubVersionstringMySQL instance provides specific minor version informationNo
EnableSSLintIs SSL enabled in MySQL; 1-> Not enabled 2-> EnabledNo
SSLExpirationTimeintSSL Expiration TimeNo
BackupMethodstringThe default backup method, ‘nobackup’ means no backup, ‘snapshot’ means using snapshot backup, ‘logic’ means using logical backup, ‘xtrabackup’ means using physical backup.No
MachineTypestringDatabase Machine SpecificationsNo
SpecificationTypeintUse optional CPU type specifications?No
CPUintCPU CoresNo

UDBSlaveInstanceSet

Field NameTypeDescription InformationRequired
ZonestringAvailability ZoneNo
ReplicationDelaySecondsintDelay Duration of Slave DatabaseNo
DBIdstringDB Instance idNo
NamestringInstance name, at least 6 charactersNo
DBTypeIdstringDB type id, mysql/mongodb each have an id subdivided by version. The current range of id values is [1,7], the corresponding versions are as follows: 1: mysql-5.5, 2: mysql-5.1, 3: percona-5.5, 4: mongodb-2.4, 5: mongodb-2.6, 6: mysql-5.6, 7: percona-5.6.No
ParamGroupIdintConfiguration parameter group id used by the DB instanceNo
AdminUserstringAdministrator account name, default is rootNo
VirtualIPstringDB Instance Virtual IPNo
VirtualIPMacstringMAC address of the DB instance virtual IPNo
PortintPort number, mysql default 3306, mongodb default 27017No
SrcDBIdstringFor MySQL’s slave, it is the DBId of the master, for the master it is empty, for MongoDB it is the replica set id.No
BackupCountintBackup strategy, cannot be modified, the number of backup files retained, default is 7 timesNo
BackupBeginTimeintBackup strategy, unmodifiable, start time, calculated in units of hours, default is 3 o’clockNo
BackupDurationintBackup strategy, backup time interval within a day, unit in hours, default is 24 hoursNo
BackupBlackliststringBackup strategy, backup blacklist, mongodb is not applicableNo
StatestringDB Status Tags: Init: Initializing, Fail: Installation Failed, Starting: Starting Up, Running: Running, Shutdown: Shutting Down, Shutoff: Shut Off, Delete: Deleted, Upgrading: Upgrading, Promoting: Promoting to Standalone Database in Progress, Recovering: Recovering, Recover fail: Recovery Failed, Remakeing: Remaking, RemakeFail: Remake Failed, MajorVersionUpgrading: Minor Version Upgrading, MajorVersionUpgradeWaitForSwitch: High Availability Waiting for Switch, MajorVersionUpgradeFail: Major Version Upgrade FailedNo
CreateTimeintDB instance creation time, using UTC timestampNo
ModifyTimeintDB instance modification time, using UTC timestampNo
ExpiredTimeintExpiration time of the DB instance, using UTC timestampNo
ChargeTypestringYearly, Monthly, Dynamic, Trial, Default: DynamicNo
MemoryLimitintMemory Limit (MB), default based on configuration modelNo
DiskSpaceintDisk Space (GB), default according to configuration modelNo
UseSSDbooleanUse SSD?No
SSDTypestringSSD Type, SATA/PCI-ENo
RolestringDB instance roles, mysql distinguishes master/slave, mongodb has multiple rolesNo
DiskUsedSizefloatUsed space of DB instance disk, unit GBNo
DataFileSizefloatSize of DB instance data file, in GBNo
SystemFileSizefloatSize of DB instance system file, unit GBNo
LogFileSizefloatSize of DB instance log file, in GBNo
BackupDatestringBackup date marker. There are 7 bits, each bit represents the backup situation for one day of the week. 0 indicates that the backup is turned off for the day, 1 indicates that the backup is turned on for the day. The rightmost bit is the backup switch for Sunday, and the rest from right to left are the backup configuration switches for Monday to Saturday, respectively. At least two days of backup must be set each week. For example: 1100000 means that the automatic backup function for Saturday and Friday is turned on.No
InstanceModestringUDB instance mode type, optional values are as follows: “Normal”: Standard edition UDB instance; “HA”: High-availability edition UDB instanceNo
ClusterRolestringWhen the DB type is mongodb, it returns the role in the cluster where the instance is located, including: mongos, configsrv_sccc, configsrv_csrs, shardsrv_datanode, shardsrv_arbiter. Among them, congfigsrv is divided into sccc and csrs modes, and shardsrv is divided into datanode and arbiter modes.No
SubnetIdstringSubnet IDNo
VPCIdstringID of VPCNo
InstanceTypestringUDB Database Machine TypeNo
InstanceTypeIdintUDB Database Model IDNo
TagstringObtain Other Resource InformationNo
CaseSensitivityParamint0 is case sensitive, 1 is not, only for mysql8.0No
SpecificationTypeintThe type of instance computing specification, 0 or no transmission means purchasing by memory method, 1 means purchasing by optional memory-cpu ratio method, need to fill in MachineType.No
MachineTypestringSpecification Type ID, valid when SpecificationType is 1No

UFileDataSet

Field NameTypeDescription InformationRequired
TokenIDstringTokenid of UfileNo
BucketstringBucket NameNo

Example

Request Example

https://api.dezai.com/?Action=DescribeUDBInstance
&Region=cn-bj2
&Zone=cn-bj2-04
&ClassType=sql
&Offset=0     
&Limit=3    
&VPCId=HXzwVLcy
&Tag=VEUDumDL

Response Example

{
  "Action": "DescribeUDBInstanceResponse",
  "DataSet": [
    {
      "AdminUser": "root",
      "BackupBeginTime": 2,
      "BackupBlacklist": "",
      "BackupCount": 7,
      "BackupDate": "0000110",
      "BackupDuration": 24,
      "CPU": 6,
      "ChargeType": "Month",
      "CreateTime": 1344810776,
      "DBId": "udbha-xxxxx",
      "DBTypeId": "mysql-5.6",
      "DataFileSize": 2.58837890625,
      "DataSet": [
        {
          "AdminUser": "root",
          "BackupBeginTime": 2,
          "BackupCount": 7,
          "BackupDate": "0000110",
          "BackupDuration": 24,
          "CPU": 6,
          "ChargeType": "Month",
          "CreateTime": 1416970612,
          "DBId": "udb-xxxxx",
          "DBTypeId": "mysql-5.6",
          "DataFileSize": 2.568817138671875,
          "DiskSpace": 30,
          "DiskUsedSize": 3.8427772521972656,
          "ExpiredTime": 1410374400,
          "InstanceMode": "Normal",
          "InstanceType": "Normal",
          "InstanceTypeId": 7,
          "IsForceDump": 0,
          "LogFileSize": 0.6138687133789062,
          "MemoryLimit": 1500,
          "ModifyTime": 1418107163,
          "Name": "slave_01",
          "ParamGroupId": 10,
          "Port": 3306,
          "Role": "slave",
          "SSDType": "",
          "SrcDBId": "udbha-xxxxx",
          "State": "Running",
          "SubnetId": "subnet-xxxx",
          "SystemFileSize": 0.6600914001464844,
          "Tag": "Default",
          "UDBCId": null,
          "UseSSD": false,
          "VPCId": "uvnet-xxxxx",
          "VirtualIP": "10.10.xxx.xxx",
          "VirtualIPMac": "52:54:00:xx:xx:xx",
          "Zone": "cn-bj2-04"
        }
      ],
      "DiskSpace": 30,
      "DiskUsedSize": 3.3991432189941406,
      "EnableRWSplitting": true,
      "ExpiredTime": 1410374400,
      "InstanceMode": "HA",
      "InstanceType": "SATA_SSD",
      "InstanceTypeId": 7,
      "IsForceDump": 0,
      "LogFileSize": 0.6411094665527344,
      "MemoryLimit": 1500,
      "ModifyTime": 1458107159,
      "Name": "james_loaddata",
      "ParamGroupId": 5829,
      "Port": 3306,
      "Role": "master",
      "SSDType": "SATA",
      "SrcDBId": "0eebb346-f2ba-4d05-adc7-xxxxxxxx",
      "State": "Running",
      "SubnetId": "subnet-xxxxxx",
      "SystemFileSize": 0.16965484619140625,
      "Tag": "Default",
      "UDBCId": null,
      "UseSSD": true,
      "VPCId": "uvnet-xxxx",
      "VirtualIP": "10.10.xx.xx",
      "VirtualIPMac": "52:54:xx:xx:xx:xx",
      "Zone": "cn-bj2-04"
    },
    {
      "AdminUser": "root",
      "BackupBeginTime": 4,
      "BackupBlacklist": "",
      "BackupCount": 7,
      "BackupDate": "1111111",
      "BackupDuration": 24,
      "CPU": 6,
      "ChargeType": "Month",
      "CreateTime": 1429465675,
      "DBId": "udbha-xxxxxx",
      "DBTypeId": "mysql-5.6",
      "DataFileSize": 1.0998306274414062,
      "DataSet": [],
      "DiskSpace": 20,
      "DiskUsedSize": 1.2706451416015625,
      "EnableRWSplitting": false,
      "ExpiredTime": 1470374400,
      "InstanceMode": "HA",
      "InstanceType": "SATA_SSD",
      "InstanceTypeId": 7,
      "IsForceDump": 0,
      "LogFileSize": 0.001251220703125,
      "MemoryLimit": 1000,
      "ModifyTime": 1469488504,
      "Name": "test_linshi",
      "ParamGroupId": 10,
      "Port": 3306,
      "Role": "master",
      "SSDType": "SATA",
      "SrcDBId": "c0de49d4-11ef-442a-b36f-xxxxxxxx",
      "State": "Running",
      "SubnetId": "subnet-xxxxx",
      "SystemFileSize": 0.16956329345703125,
      "Tag": "Default",
      "UDBCId": null,
      "UseSSD": true,
      "VPCId": "uvnet-xxxxx",
      "VirtualIP": "10.17.xx.xx",
      "VirtualIPMac": "52:54:00:xx:xx:xx",
      "Zone": "cn-bj2-04"
    }
  ],
  "RetCode": 0,
  "TotalCount": 2
}