Queries 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

ParameterTypeRequiredExampleDescription
ActionStringYesDescribeDrdsInstances

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

TypeStringNo1

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

  • 0: shared instances
  • 1: dedicated instances
DescriptionStringNodrds_test

The description of the instances.

ExpiredBooleanNofalse

Specifies whether the instances that you want to query expire.

PageNumberIntegerNo1

The number of the page to return.

PageSizeIntegerNo20

The number of instances returned on each page.

ResourceGroupIdStringNoNULL

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

RegionIdStringYescn-hangzhou

The ID of the region.

MixBooleanNoFALSE

Specifies whether hybrid queries are supported.

ProductVersionStringNoV1

The version of the service.

Tag.N.KeyStringNoacs:newretail:domain

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

Tag.N.ValueStringNoNEW_RETAIL

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

Response parameters

ParameterTypeExampleDescription
RequestIdString8734773E-7B21-4A22-9106-CBD245F8****

The ID of the request.

PageNumberInteger1

The page number of the returned page.

PageSizeInteger20

The number of instances returned on each page.

TotalInteger1

The total number of instances returned.

InstancesArray of Instance

The list of returned instances.

Instance
VpcIdStringvpc-bp**********

The ID of the VPC to which the instance belongs.

StatusStringRUN

The status of the instance.

TypeStringPRIVATE

The type of the instance. Valid values:

  • PUBLIC: The returned instance is a shared instance.
  • PRIVATE: The returned instance is a dedicated instance.
CommodityCodeStringdrdsPost

The commodity code of the service.

MachineTypeStringecs

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

CreateTimeLong1568620311000

The timestamp that indicates when the instance is created.

VersionActionStringUpgradable

Indicates whether the version of the instance can be upgraded.

InstanceSeriesStringdrds.sn2.4c16g

The instance series.

NetworkTypeStringCLASSIC

The network type of the instance. Valid values:

  • CLASSIC
  • VPC
LabelStringNORMAL

The tag 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.
ProductVersionStringV1

The version of the service.

InstanceSpecStringdrds.sn2.4c16g.8C32G

The specification of the instance.

RegionIdStringcn-hangzhou-e

The ID of the region.

VpcCloudInstanceIdStringdrdssen12****

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

DescriptionStringdrds_test

The description of the instance.

VersionLong0

The version of the instance.

ResourceGroupIdStringrg-aek2ljh3ye4****

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

ZoneIdStringvsw-bpxxxxxxxxxxxxx96

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

DrdsInstanceIdStringdrdssen12****

The ID of the instance.

ExpireDateLong4724323200000

The timestamp that indicates when the instance expires.

MasterInstanceIdStringdrdssen12****

The ID of the primary instance.

OrderInstanceIdStringdrdssen12****

The ID of the purchased instance.

InstRoleStringMASTER

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.
VipsArray of Vip

The list of returned virtual IP addresses (VIPs).

Vip
VpcIdStringvpc-bpxxxxxxxxxxxy

The ID of the VPC.

TypeStringintranet

The type of the VIP. Valid values:

  • intranet: a private IP address
  • internet: a public IP address
VswitchIdStringvsw-bpxxxxxxxxxxxxx96

The ID of the vSwitch.

PortString3306

The ports that are opened on the VIP.

IPString10.23.***.***

The virtual IP address.

dnsStringdrdssen1243as.drds.aliyuncs.com

The domain name that is mapped to the VIP.

ReadOnlyDBInstanceIdsArray of Stringdrdssen12****

The IDs of read-only instances that are associated with the instance.

seriesStringenterprise

The edition of the instance. Valid values:

  • starter: Starter Edition
  • enterprise: Enterprise Edition
  • standard: Standard Edition

Examples

Sample requests

http(s)://[drds.aliyuncs.com]/?Action=DescribeDrdsInstances
&Type=1
&Description=drds_test
&Expired=false
&PageNumber=1
&PageSize=20
&ResourceGroupId=NULL
&RegionId=cn-hangzhou
&Mix=false
&ProductVersion=V1
&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</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>
            <dns>drdssen1243as.drds.aliyuncs.com</dns>
        </Vips>
        <ReadOnlyDBInstanceIds>drdssen12****</ReadOnlyDBInstanceIds>
        <series>enterprise</series>
    </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",
    "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.***.***",
      "dns" : "drdssen1243as.drds.aliyuncs.com"
    } ],
    "ReadOnlyDBInstanceIds" : [ "drdssen12****" ],
    "series" : "enterprise"
  } ]
}

Error codes

HttpCodeError codeError messageDescription
400ActionUnauthorizedThe specified action is not available for youThe error message returned because you are not authorized to perform this operation. Grant the required permissions to the RAM user first.
500InternalErrorThe 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.