All Products
Search
Document Center

ApsaraDB RDS:DescribeDBInstancesForClone

Last Updated:Dec 05, 2024

Queries a list of instances.

Operation description

This operation is phased out.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
rds:DescribeDBInstancesForCloneget
*DBInstance
acs:rds:{#regionId}:{#accountId}:dbinstance/{#DbInstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

ETnLKlblzczshOTUbOCzxxxxxxxxxx
proxyIdstringNo

The ID of the proxy mode.

API
EnginestringNo

The database engine of the instance. Valid values:

  • MySQL
  • SQLServer
  • PostgreSQL
  • PPAS
  • MariaDB

By default, this operation queries the instances that run any of the supported database engine types.

MySQL
ZoneIdstringNo

The zone ID of the instance.

cn-hangzhou-h
DBInstanceStatusstringNo

The status of the instance. For more information, see Instance state table.

Running
ExpiredstringNo

Specifies whether the instance expires. Valid values:

  • True: queries the instances that have expired.
  • False: does not query instances that have expired.
True
SearchKeystringNo

The keyword that is used for the search. The keyword can be part of an instance ID or an instance description.

rm-uf6w
DBInstanceIdstringNo

The ID of the instance.

rm-uf6wjk5xxxxxxxxxx
DBInstanceTypestringNo

The role of the instance that you want to query. Valid values:

  • Primary: primary instance
  • Readonly: read-only instance
  • Guard: disaster recovery instance
  • Temp: temporary instance

By default, this operation queries the instances of all roles.

Primary
RegionIdstringYes

The region ID of the instance.

cn-hangzhou
PageSizeintegerNo

The number of entries to return on each page. Valid values: 1 to 100.

Default value: 30.

30
PageNumberintegerNo

The number of the page to return.

1
InstanceNetworkTypestringNo

The network type of the instance. Valid values:

  • Classic
  • VPC
Classic
VpcIdstringNo

The ID of the virtual private cloud (VPC).

vpc-j6cjvqms29yxxxxxxxxxx
VSwitchIdstringNo

The ID of the vSwitch.

vsw-j6csw46bgrgkxxxxxxxxxx
DBInstanceClassstringNo

The instance type of the instance. For more information, see Instance types.

mysql.n1.micro.1
EngineVersionstringNo

The version of the database engine.

5.7
NodeTypestringNo

The type of the database node. Valid values:

  • Master: the primary node
  • Slave: the secondary node
Master
PayTypestringNo

The billing method of the instance. Valid values:

  • Postpaid: pay-as-you-go
  • Prepaid: subscription

By default, this operation queries the instances that use any of the supported billing methods.

Postpaid
ConnectionModestringNo

The connection mode of the instance. Valid values:

  • Standard: standard mode
  • Safe: database proxy mode

By default, this operation queries the instances that use any of the supported connection modes.

Standard
CurrentInstanceIdstringNo

The ID of the current instance.

rm-uf6wjk5xxxxxxxxxx
ResourceGroupIdstringNo

The ID of the resource group.

rg-acfmy*****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

1E43AAE0-BEE8-43DA-860D-EAF2AA0724DC
PageNumberinteger

The page number of the returned page.

12
PageRecordCountinteger

The number of entries returned on the current page.

10
TotalRecordCountinteger

The total number of entries returned.

120
Itemsarray<object>

An array that consists of the details about the instances.

DBInstanceobject
VpcIdstring

The ID of the virtual private cloud (VPC).

vpc-bp1opxu1zkhxxxxxxxxxx
ReplicateIdstring

None.

N/A
TempDBInstanceIdstring

The ID of the temporary instance.

sub138xxxxx_rm-xxxxx
DBInstanceStorageTypestring

The storage type of the instance. Valid values:

  • local_ssd/ephemeral_ssd: local SSD
  • cloud_ssd: standard SSD.
  • cloud_essd: enhanced SSD (ESSD)
local_ssd
CreateTimestring

The time when the instance was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2018-11-05T11:26:02Z
PayTypestring

The billing method of the instance. Valid values:

  • Postpaid: pay-as-you-go
  • Prepaid: subscription
Postpaid
MutriORsignleboolean

Indicates whether multi-region deployment is used. Valid values:

  • true: Multi-region deployment is used.
  • false: Multi-region deployment is not used.
false
ConnectionModestring

The connection mode of the instance. Valid values:

  • Standard: standard mode
  • Safe: database proxy mode
Standard
LockModestring

The lock method of the instance. Valid values:

  • Unlock: The instance is not locked.
  • ManualLock: The instance is manually locked.
  • LockByExpiration: The instance is automatically locked after it expires.
  • LockByRestoration: The instance is automatically locked before a rollback.
  • LockByDiskQuota: The instance is automatically locked because its storage capacity is exhausted and the instance is inaccessible.
Unlock
EngineVersionstring

The version of the database engine.

5.7
VpcCloudInstanceIdstring

The ID of the instance in the VPC.

rm-uf6wjk5xxxxxxxxxx
InsIdinteger

The ID of the instance role.

1
InstanceNetworkTypestring

The network type of the instance. Valid values:

  • Classic
  • VPC
Classic
MasterInstanceIdstring

The ID of the primary instance. If the value of this parameter is null, the instance is a primary instance.

rm-uf6wjk5xxxxxxxxxx
DBInstanceDescriptionstring

The name of the instance. It must be 2 to 256 characters in length. The value can contain letters, digits, underscores (_), and hyphens (-). The value must start with a letter.

Note The value cannot start with http:// or https://.
Test
ExpireTimestring

The time when the instance expired. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2018-11-28T11:26:02Z
DBInstanceNetTypestring

The network connection type of the instance. Valid values:

  • Internet
  • Intranet
Intranet
DBInstanceTypestring

The role of the instance. Valid values:

  • Primary: primary instance
  • Readonly: read-only instance
  • Guard: disaster recovery instance
  • Temp: temporary instance
Primary
DestroyTimestring

The time when the instance was destroyed. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2018-12-05T11:26:02Z
LockReasonstring

The reason why the instance was locked.

instance_expired
DBInstanceStatusstring

The status of the instance. For more information, see Instance state table.

Running
GuardDBInstanceIdstring

The ID of the disaster recovery instance. This parameter is returned only when the instance is a primary instance and has a disaster recovery instance.

rm-uf64zsuxxxxxxxxxx
RegionIdstring

The region ID of the instance.

cn-hangzhou
VSwitchIdstring

The ID of the vSwitch.

vsw-uf6adz52c2pxxxxxxxxxx
ResourceGroupIdstring

The ID of the resource group.

rg-acfmyxxxxx
ZoneIdstring

The zone ID of the instance.

cn-hangzhou-h
DBInstanceIdstring

The ID of the instance.

rm-uf6wjk5xxxxxxxxxx
Categorystring

The RDS edition of the instance. Valid values:

  • Basic: RDS Basic Edition
  • HighAvailability: RDS High-availability Edition
  • Finance: RDS Enterprise Edition
HighAvailability
Enginestring

The database engine of the instance. Valid values:

  • MySQL
  • SQLServer
  • PostgreSQL
  • PPAS
  • MariaDB
MySQL
DBInstanceClassstring

The instance type of the instance. For more information, see Instance types.

mysql.n1.micro.1
ReadOnlyDBInstanceIdsarray<object>

An array consisting of the IDs of the read-only instances that are attached to the primary instance.

ReadOnlyDBInstanceIdobject
DBInstanceIdstring

The ID of the read-only instance.

rm-bpxxxxxxxxx

Examples

Sample success responses

JSONformat

{
  "RequestId": "1E43AAE0-BEE8-43DA-860D-EAF2AA0724DC",
  "PageNumber": 12,
  "PageRecordCount": 10,
  "TotalRecordCount": 120,
  "Items": {
    "DBInstance": [
      {
        "VpcId": "vpc-bp1opxu1zkhxxxxxxxxxx",
        "ReplicateId": "N/A\n",
        "TempDBInstanceId": "sub138xxxxx_rm-xxxxx",
        "DBInstanceStorageType": "local_ssd",
        "CreateTime": "2018-11-05T11:26:02Z",
        "PayType": "Postpaid",
        "MutriORsignle": false,
        "ConnectionMode": "Standard",
        "LockMode": "Unlock",
        "EngineVersion": "5.7",
        "VpcCloudInstanceId": "rm-uf6wjk5xxxxxxxxxx",
        "InsId": 1,
        "InstanceNetworkType": "Classic",
        "MasterInstanceId": "rm-uf6wjk5xxxxxxxxxx",
        "DBInstanceDescription": "Test",
        "ExpireTime": "2018-11-28T11:26:02Z",
        "DBInstanceNetType": "Intranet",
        "DBInstanceType": "Primary",
        "DestroyTime": "2018-12-05T11:26:02Z",
        "LockReason": "instance_expired",
        "DBInstanceStatus": "Running",
        "GuardDBInstanceId": "rm-uf64zsuxxxxxxxxxx",
        "RegionId": "cn-hangzhou",
        "VSwitchId": "vsw-uf6adz52c2pxxxxxxxxxx\t",
        "ResourceGroupId": "rg-acfmyxxxxx",
        "ZoneId": "cn-hangzhou-h",
        "DBInstanceId": "rm-uf6wjk5xxxxxxxxxx",
        "Category": "HighAvailability",
        "Engine": "MySQL",
        "DBInstanceClass": "mysql.n1.micro.1",
        "ReadOnlyDBInstanceIds": {
          "ReadOnlyDBInstanceId": [
            {
              "DBInstanceId": "rm-bpxxxxxxxxx"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidDBInstanceType.ValueNotSupportThe specified parameter"DBInstanceType" is not valid.The operation failed. The instance type is invalid. Specify a valid instance type.
400ApiErrorAPI error.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-11-20API Description Update. The Error code has changedView Change Details