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 Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is DescribeUDBInstance . | Yes |
PublicKey | string | The user’s public key can be obtained from Console | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
Zone | string | Availability Zone, defaults to all availability zones if not filled in. See Availability Zone List | No |
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | No |
ClassType | string | Type 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: postgresql | No |
Offset | int | Starting offset position for pagination display, required for list operations | No |
Limit | int | Number of items displayed per page, required when operating the list | No |
DBId | string | DB 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 |
IsInUDBC | boolean | Check DB in the special area? | No |
UDBCId | string | If 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 |
IncludeSlaves | boolean | When 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 |
VPCId | string | Filter DB according to VPCId | No |
Tag | string | Filter DB according to Business Group | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
DataSet | array[UDBInstanceSet] | DB Instance Information List UDBInstanceSet | No |
TotalCount | int | The 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 Name | Type | Description Information | Required |
---|---|---|---|
Zone | string | Availability Zone of the DB Instance | No |
CaseSensitivityParam | int | 0 is case sensitive, 1 is case insensitive | No |
ClusterRole | string | When 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 |
DBId | string | DB Instance id | No |
Name | string | Instance name, at least 6 characters | No |
DBTypeId | string | DB 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 |
ParamGroupId | int | Configuration parameter group id used by the DB instance | No |
AdminUser | string | Administrator account name, default is root | No |
VirtualIP | string | DB Instance Virtual IP | No |
VirtualIPMac | string | MAC address of the DB instance virtual IP | No |
VPCId | string | ID of VPC | No |
SubnetId | string | Subnet ID | No |
InstanceType | string | UDB Database Machine Type | No |
InstanceTypeId | int | UDB Database Model ID (Deprecated) | No |
Tag | string | Obtain Other Resource Information | No |
Port | int | Port number, mysql default 3306, mongodb default 27017 | No |
SrcDBId | string | For 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 |
BackupCount | int | Backup strategy, cannot be modified, the number of backup files retained, default is 7 times | No |
BackupBeginTime | int | Backup strategy, unmodifiable, start time, calculated in units of hours, default is 3 o’clock | No |
BackupDuration | int | Backup strategy, backup time interval within a day, unit in hours, default is 24 hours | No |
BackupBlacklist | string | Backup strategy, backup blacklist, mongodb is not applicable | No |
State | string | DB 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, MajorVersionUpgradeFail | No |
CreateTime | int | DB instance creation time, using UTC timestamp | No |
ModifyTime | int | DB instance modification time, using UTC timestamp | No |
ExpiredTime | int | Expiration time of the DB instance, using UTC timestamp | No |
ChargeType | string | Yearly, Monthly, Dynamic, Trial, Default: Dynamic | No |
MemoryLimit | int | Memory Limit (MB), default based on configuration model | No |
DiskSpace | int | Disk Space (GB), default according to configuration model | No |
UseSSD | boolean | Use SSD? | No |
SSDType | string | SSD Type, SATA/PCI-E/NVMe | No |
Role | string | DB instance roles, mysql distinguishes master/slave, mongodb has multiple roles | No |
DiskUsedSize | float | Used space of DB instance disk, unit GB | No |
DataFileSize | float | Size of DB instance data file, in GB | No |
SystemFileSize | float | Size of DB instance system file, unit GB | No |
LogFileSize | float | Size of DB instance log file, in GB | No |
BackupDate | string | Backup 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 |
InstanceMode | string | UDB instance mode types, optional values are as follows: “Normal”: Standard edition UDB instance “HA”: High-availability edition UDB instance | No |
DataSet | array[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 |
BackupZone | string | Cross-Availability Zone High Availability Backup Library Availability Zone | No |
IPv6Address | string | The IPv6 address of this instance | No |
UserUFileData | UFileDataSet | User backs up to their own UFILE configuration, structure refers to UFileDataSet | No |
DBSubVersion | string | MySQL instance provides specific minor version information | No |
EnableSSL | int | Is SSL enabled in MySQL; 1-> Not enabled 2-> Enabled | No |
SSLExpirationTime | int | SSL Expiration Time | No |
BackupMethod | string | The default backup method, ‘nobackup’ means no backup, ‘snapshot’ means using snapshot backup, ‘logic’ means using logical backup, ‘xtrabackup’ means using physical backup. | No |
MachineType | string | Database Machine Specifications | No |
SpecificationType | int | Use optional CPU type specifications? | No |
CPU | int | CPU Cores | No |
UDBSlaveInstanceSet
Field Name | Type | Description Information | Required |
---|---|---|---|
Zone | string | Availability Zone | No |
ReplicationDelaySeconds | int | Delay Duration of Slave Database | No |
DBId | string | DB Instance id | No |
Name | string | Instance name, at least 6 characters | No |
DBTypeId | string | DB 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 |
ParamGroupId | int | Configuration parameter group id used by the DB instance | No |
AdminUser | string | Administrator account name, default is root | No |
VirtualIP | string | DB Instance Virtual IP | No |
VirtualIPMac | string | MAC address of the DB instance virtual IP | No |
Port | int | Port number, mysql default 3306, mongodb default 27017 | No |
SrcDBId | string | For 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 |
BackupCount | int | Backup strategy, cannot be modified, the number of backup files retained, default is 7 times | No |
BackupBeginTime | int | Backup strategy, unmodifiable, start time, calculated in units of hours, default is 3 o’clock | No |
BackupDuration | int | Backup strategy, backup time interval within a day, unit in hours, default is 24 hours | No |
BackupBlacklist | string | Backup strategy, backup blacklist, mongodb is not applicable | No |
State | string | DB 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 Failed | No |
CreateTime | int | DB instance creation time, using UTC timestamp | No |
ModifyTime | int | DB instance modification time, using UTC timestamp | No |
ExpiredTime | int | Expiration time of the DB instance, using UTC timestamp | No |
ChargeType | string | Yearly, Monthly, Dynamic, Trial, Default: Dynamic | No |
MemoryLimit | int | Memory Limit (MB), default based on configuration model | No |
DiskSpace | int | Disk Space (GB), default according to configuration model | No |
UseSSD | boolean | Use SSD? | No |
SSDType | string | SSD Type, SATA/PCI-E | No |
Role | string | DB instance roles, mysql distinguishes master/slave, mongodb has multiple roles | No |
DiskUsedSize | float | Used space of DB instance disk, unit GB | No |
DataFileSize | float | Size of DB instance data file, in GB | No |
SystemFileSize | float | Size of DB instance system file, unit GB | No |
LogFileSize | float | Size of DB instance log file, in GB | No |
BackupDate | string | Backup 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 |
InstanceMode | string | UDB instance mode type, optional values are as follows: “Normal”: Standard edition UDB instance; “HA”: High-availability edition UDB instance | No |
ClusterRole | string | When 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 |
SubnetId | string | Subnet ID | No |
VPCId | string | ID of VPC | No |
InstanceType | string | UDB Database Machine Type | No |
InstanceTypeId | int | UDB Database Model ID | No |
Tag | string | Obtain Other Resource Information | No |
CaseSensitivityParam | int | 0 is case sensitive, 1 is not, only for mysql8.0 | No |
SpecificationType | int | The 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 |
MachineType | string | Specification Type ID, valid when SpecificationType is 1 | No |
UFileDataSet
Field Name | Type | Description Information | Required |
---|---|---|---|
TokenID | string | Tokenid of Ufile | No |
Bucket | string | Bucket Name | No |
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
}