Queries PolarDB-X 1.0 instances that meet the specified conditions.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeDrdsInstances

The operation that you want to perform. Set the value to DescribeDrdsInstances.

Type String No 1

The type of the instances that you want to query. Valid values:

  • 0: shared instances
  • 1: dedicated instances
Description String No drds_test

The description of the instance.

Expired Boolean No false

Specifies whether the instances that you want to query expire.

PageNumber Integer No 1

The number of the page to return.

PageSize Integer No 20

The number of instances returned on each page.

ResourceGroupId String No NULL

The ID of the resource group to which the instances you want to query belong. The value of this parameter can be NULL.

RegionId String No cn-hangzhou

The ID of the region in which the instances you want to query are created.

Mix Boolean No FALSE

Specifies whether hybrid queries are supported.

ProductVersion String No V1/V2

The version of the service.

Tag.N.Key String No acs:newretail:domain

The key of the tag configured for the instances you want to query.

Tag.N.Value String No NEW_RETAIL

The value of the tag configured for the instances you want to query.

Response parameters

Parameter Type Example Description
RequestId String 8734773E-7B21-4A22-9106-CBD245F8****

The ID of the request.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 20

The number of instances returned on each page.

Total Integer 1

The total number of returned instances.

Instances Array of Instance

The list of the returned instances.

Instance
VpcId String vpc-bp**********

The ID of the VPC to which the instance belongs.

Status String RUN

The state of the instance.

Type String PRIVATE

The type of the instance. Valid values:

  • PUBLIC: The returned instance is a shared instance.
  • PRIVATE: The returned instance is a dedicated instance.
CommodityCode String drdsPost

The commodity code of the service.

MachineType String ecs

The machine type of the instance. Valid values: ecs.

CreateTime Long 1568620311000

The timestamp that indicates when the instance is created.

VersionAction String Upgradable

Indicates whether the version of the instance can be upgraded.

InstanceSeries String drds.sn2.4c16g

The instance series of the instance.

NetworkType String CLASSIC

The network type of the instance. Valid values:

  • CLASSIC
  • VPC
Label String NORMAL

The label of the instance. Valid values:

  • NORMAL: The instance is a standard instance.
  • HA: The instance is a high-availability (HA) instance.
  • VPC: The instance is a VPC-based instance.
ProductVersion String V1/V2

The version of the service.

InstanceSpec String drds.sn2.4c16g.8C32G

The specification of the instance.

RegionId String cn-hangzhou-e

The ID of the region in which the instance is created.

VpcCloudInstanceId String drdssen12****

The ID of the instance that is deployed in the VPC.

Description String drds_test

The description of the instance.

Version Long 0

The version of the instance.

ResourceGroupId String rg-aek2ljh3ye4****

The ID of the resource group to which the instance belongs.

ZoneId String vsw-bpxxxxxxxxxxxxx96

The ID of the zone in which the resource is located.

DrdsInstanceId String drdssen12****

The ID of the instance.

ExpireDate Long 4724323200000

The timestamp that indicates when the instance expires.

MasterInstanceId String drdssen12****

The ID of the primary instance.

OrderInstanceId String drdssen12****

The ID of the purchased instance.

InstRole String MASTER

The role of the instance. Valid values:

  • MASTER: The instance is a primary instance.
  • SLAVE: The instance is a read-only instance to analyze complex queries
  • SLAVE_FLOW: The instance is a read-only instance for high-concurrency scenarios
Vips Array of Vip

The list of returned virtual IP addresses (VIPs).

Vip
VpcId String vpc-bpxxxxxxxxxxxy

The ID of the VPC.

Type String intranet

The type of the VIP. Valid values: intranet and internet.

VswitchId String vsw-bpxxxxxxxxxxxxx96

The ID of the vSwitch.

Port String 3306

The ports that are opened on the VIP.

IP String 10.23.***.***

The virtual IP address.

ReadOnlyDBInstanceIds Array of String drdssen12****

The details about each read-only instance that is associated with the instance.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeDrdsInstances
&Type=1
&Description=drds_test
&Expired=false
&PageNumber=1
&PageSize=20
&ResourceGroupId=NULL
&RegionId=cn-hangzhou
&Mix=false
&ProductVersion=V1/V2
&Tag=[{"Key":"acs:newretail:domain","Value":"NEW_RETAIL"}]
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDrdsInstancesResponse>
    <RequestId>8734773E-7B21-4A22-9106-CBD245F8****</RequestId>
    <PageNumber>1</PageNumber>
    <PageSize>20</PageSize>
    <Total>1</Total>
    <Instances>
        <VpcId>vpc-bp**********</VpcId>
        <Status>RUN</Status>
        <Type>PRIVATE</Type>
        <CommodityCode>drdsPost</CommodityCode>
        <MachineType>ecs</MachineType>
        <CreateTime>1568620311000</CreateTime>
        <VersionAction>Upgradable</VersionAction>
        <InstanceSeries>drds.sn2.4c16g</InstanceSeries>
        <NetworkType>CLASSIC</NetworkType>
        <Label>NORMAL</Label>
        <ProductVersion>V1/V2</ProductVersion>
        <InstanceSpec>drds.sn2.4c16g.8C32G</InstanceSpec>
        <RegionId>cn-hangzhou-e</RegionId>
        <VpcCloudInstanceId>drdssen12****</VpcCloudInstanceId>
        <Description>drds_test</Description>
        <Version>0</Version>
        <ResourceGroupId>rg-aek2ljh3ye4****</ResourceGroupId>
        <ZoneId>vsw-bpxxxxxxxxxxxxx96</ZoneId>
        <DrdsInstanceId>drdssen12****</DrdsInstanceId>
        <ExpireDate>4724323200000</ExpireDate>
        <MasterInstanceId>drdssen12****</MasterInstanceId>
        <OrderInstanceId>drdssen12****</OrderInstanceId>
        <InstRole>MASTER</InstRole>
        <Vips>
            <VpcId>vpc-bpxxxxxxxxxxxy</VpcId>
            <Type>intranet</Type>
            <VswitchId>vsw-bpxxxxxxxxxxxxx96</VswitchId>
            <Port>3306</Port>
            <IP>10.23.***.***</IP>
        </Vips>
        <ReadOnlyDBInstanceIds>drdssen12****</ReadOnlyDBInstanceIds>
    </Instances>
</DescribeDrdsInstancesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "8734773E-7B21-4A22-9106-CBD245F8****",
  "PageNumber" : 1,
  "PageSize" : 20,
  "Total" : 1,
  "Instances" : [ {
    "VpcId" : "vpc-bp**********",
    "Status" : "RUN",
    "Type" : "PRIVATE",
    "CommodityCode" : "drdsPost",
    "MachineType" : "ecs",
    "CreateTime" : 1568620311000,
    "VersionAction" : "Upgradable",
    "InstanceSeries" : "drds.sn2.4c16g",
    "NetworkType" : "CLASSIC",
    "Label" : "NORMAL",
    "ProductVersion" : "V1/V2",
    "InstanceSpec" : "drds.sn2.4c16g.8C32G",
    "RegionId" : "cn-hangzhou-e",
    "VpcCloudInstanceId" : "drdssen12****",
    "Description" : "drds_test",
    "Version" : 0,
    "ResourceGroupId" : "rg-aek2ljh3ye4****",
    "ZoneId" : "vsw-bpxxxxxxxxxxxxx96",
    "DrdsInstanceId" : "drdssen12****",
    "ExpireDate" : 4724323200000,
    "MasterInstanceId" : "drdssen12****",
    "OrderInstanceId" : "drdssen12****",
    "InstRole" : "MASTER",
    "Vips" : [ {
      "VpcId" : "vpc-bpxxxxxxxxxxxy",
      "Type" : "intranet",
      "VswitchId" : "vsw-bpxxxxxxxxxxxxx96",
      "Port" : "3306",
      "IP" : "10.23.***.***"
    } ],
    "ReadOnlyDBInstanceIds" : [ "drdssen12****" ]
  } ]
}

Error codes

HttpCode Error code Error message Description
400 ActionUnauthorized The specified action is not available for you The error message returned because you are not authorized to perform this operation. Grant the required permissions to the RAM user first.
500 InternalError The request processing has failed due to some unknown error. The error message returned because an internal error has occurred and the request failed.

For a list of error codes, visit the API Error Center.