Queries the attribute details about a PolarDB-X instance.

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 DescribeDBInstanceAttribute

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

RegionId String Yes cn-hangzhou

The region ID of the instance.

DBInstanceName String Yes pxc-********

The name of the instance.

Response parameters

Parameter Type Example Description
RequestId String 9B2F3840-5C98-475C-B269-2D5C3A31797C

The ID of the request.

DBInstance Object

The information about the database instance.

Type String ReadWrite

The role of the instance. Valid values:

  • ReadWrite: The instance is a primary instance.
  • ReadOnly: The instance is a read-only instance.
Status String Running

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

RightsSeparationStatus String disabled

The state of the three-role mode. Valid values:

  • disabled: The three-role mode is disabled.
  • enabled: The three-role mode is enabled.
  • processing: The three-role mode is being configured.
  • unknown: An unknown error has occurred. This state may be returned if the instance cannot be connected.
DBNodeCount Integer 2

The number of instance nodes.

Expired String false

Indicates whether the instance has expired. Valid values:

  • true: The instance has expired.
  • false: The instance has not expired.
CreateTime String 2021-08-31T08:56:25.000+0000

The time when the instance was created.

PayType String Postpaid

The billing method of the instance. Valid values:

  • Postpaid: pay-as-you-go
  • Prepaid: subscription
Port String 3306

The port that is used to connect to the instance over an internal network.

LockMode String Unlock

The lock state of the instance. Valid values:

  • Unlock: The cluster is not locked.
  • ManualLock: The cluster is manually locked.
  • LockByExpiration: The cluster is automatically locked upon expiration.
  • LockByRestoration: The cluster is automatically locked before a rollback.
  • LockByDiskQuota: The instance is automatically locked because the disk space is exhausted.
  • LockReadInstanceByDiskQuota: The instance is a read-only instance that is automatically locked when the disk space is full.
Description String test instance

The description of the instance.

ConnectionString String pxc-sprpx766vo62nh.polarx.singapore.rds.aliyuncs.com

The domain name that is used to connect to the instance over an internal network.

StorageUsed Long 17042505728

The storage space that are used.

ExpireDate String 2022-08-31T16:00:00.000+0000

The time at which the instance expires. The time is in the yyyy-MM-ddTHH:mm:ss.sss+0000 format. The time is displayed in UTC.

CommodityCode String drds_polarxpost_public_cn

The commodity code of the instance.

MaintainStartTime String 06:00

The beginning of the maintenance window of the instance. This time is displayed in UTC. In the PolarDB-X console, this time is displayed in UTC+8.

DBInstanceType String ReadWrite

The role of the instance. Valid values:

  • ReadWrite: The instance is a primary instance.
  • ReadOnly: The instance is a read-only instance.
DBNodeClass String polarx.x4.large.2e

The instance type of each node for the instance.

LatestMinorVersion String polarx-kernel_5.4.11-16301083_xcluster-20210805

The latest minor kernel version that is supported by the instance.

MaintainEndTime String 06:00

The end of the maintenance window of the instance. This time is displayed in UTC. In the PolarDB-X console, this time is displayed in UTC+8.

DBType String polarx

The database engine that is run by the instance.

RightsSeparationEnabled Boolean false

The state of the three-role mode. Valid values:

  • false: The three-role mode is disabled.
  • true: The three-role mode is enabled.
VPCId String vpc-xxxxx

The ID of the virtual private cloud (VPC) to which the instances belong.

MinorVersion String polarx-kernel_5.4.11-16301083_xcluster-20210805

The minor engine version that is run by the instance.

RegionId String cn-hangzhou

The region ID of the instance.

Network String VPC

The network type of the instance. Valid values:

  • Classic: indicates that the instance is deployed in the classic network.
  • VPC: indicates that the instance is deployed in a VPC.
DBVersion String 5.5

The version of the database engine that is run by the instance.

VSwitchId String vsw-xxxxxx

The ID of the vSwitch that serves the instance.

ZoneId String cn-hangzhou-a

The zone ID of the instance.

Engine String MySQL

The database engine that is run by the instance.

KindCode Integer 18

The version of the engine that is run by the instance. This parameter is an internal parameter.

Id String rm-uf6wjk5xxxxxxxxxx

The ID of the primary instance. If this parameter is not returned, the instance is a primary instance.

DBNodes Array of DBNode

The details about the database nodes of the instance.

ComputeNodeId String pxc-i-xxxxxx

The name of the compute node.

NodeClass String polarx.x4.large.2e

The specifications of the node.

DataNodeId String pxc-xdb-xxxxxx

The name of the data node.

ZoneId String cn-hangzhou-a

The region name of the node.

Id String pxi-xxxxxx

The ID of the logical node.

RegionId String cn-hangzhou

The region ID of the node.

ConnAddrs Array of ConnAddr
Type String VPC

The connection type. A value of VPC indicates that the instance is connected by using VPCs. A value of PUBLIC indicates that the instance is connected by using the Internet.

VSwitchId String vsw-xxxxxx

The ID of the vSwitch that serves the instance.

Port Long 3306

The port number that is used to connect to the instance.

VPCId String vpc-xxxxxx

The ID of the VPC to which the instance belongs.

ConnectionString String polardbx-xxx.aliyuncs.com

The domain name that is used to connect to the instance.

ReadDBInstances Array of String pxr-xxxxxx

The names of read-only instances.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeDBInstanceAttribute
&RegionId=cn-hangzhou
&DBInstanceName=pxc-********
&<Common request parameters>

Sample success responses

XML format

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

<DescribeDBInstanceAttributeResponse>
    <RequestId>9B2F3840-5C98-475C-B269-2D5C3A31797C</RequestId>
    <DBInstance>
        <Type>ReadWrite</Type>
        <Status>Running</Status>
        <RightsSeparationStatus>disabled</RightsSeparationStatus>
        <DBNodeCount>2</DBNodeCount>
        <Expired>false</Expired>
        <CreateTime>2021-08-31T08:56:25.000+0000</CreateTime>
        <PayType>Postpaid</PayType>
        <Port>3306</Port>
        <LockMode>Unlock</LockMode>
        <Description>test instance</Description>
        <ConnectionString>pxc-sprpx766vo62nh.polarx.singapore.rds.aliyuncs.com</ConnectionString>
        <StorageUsed>17042505728</StorageUsed>
        <ExpireDate>2022-08-31T16:00:00.000+0000</ExpireDate>
        <CommodityCode>drds_polarxpost_public_cn</CommodityCode>
        <MaintainStartTime>06:00</MaintainStartTime>
        <DBInstanceType>ReadWrite</DBInstanceType>
        <DBNodeClass>polarx.x4.large.2e</DBNodeClass>
        <LatestMinorVersion>polarx-kernel_5.4.11-16301083_xcluster-20210805</LatestMinorVersion>
        <MaintainEndTime>06:00</MaintainEndTime>
        <DBType>polarx</DBType>
        <RightsSeparationEnabled>false</RightsSeparationEnabled>
        <VPCId>vpc-xxxxx</VPCId>
        <MinorVersion>polarx-kernel_5.4.11-16301083_xcluster-20210805</MinorVersion>
        <RegionId>cn-hangzhou</RegionId>
        <Network>VPC</Network>
        <DBVersion>5.5</DBVersion>
        <VSwitchId>vsw-xxxxxx</VSwitchId>
        <ZoneId>cn-hangzhou-a</ZoneId>
        <Engine>MySQL</Engine>
        <KindCode>18</KindCode>
        <Id>rm-uf6wjk5xxxxxxxxxx</Id>
        <DBNodes>
            <ComputeNodeId>pxc-i-xxxxxx</ComputeNodeId>
            <NodeClass>polarx.x4.large.2e</NodeClass>
            <DataNodeId>pxc-xdb-xxxxxx</DataNodeId>
            <ZoneId>cn-hangzhou-a</ZoneId>
            <Id>pxi-xxxxxx</Id>
            <RegionId>cn-hangzhou</RegionId>
        </DBNodes>
        <ConnAddrs>
            <Type>VPC</Type>
            <VSwitchId>vsw-xxxxxx</VSwitchId>
            <Port>3306</Port>
            <VPCId>vpc-xxxxxx</VPCId>
            <ConnectionString>polardbx-xxx.aliyuncs.com</ConnectionString>
        </ConnAddrs>
        <ReadDBInstances>pxr-xxxxxx</ReadDBInstances>
    </DBInstance>
</DescribeDBInstanceAttributeResponse>

JSON format

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

{
  "RequestId" : "9B2F3840-5C98-475C-B269-2D5C3A31797C",
  "DBInstance" : {
    "Type" : "ReadWrite",
    "Status" : "Running",
    "RightsSeparationStatus" : "disabled",
    "DBNodeCount" : 2,
    "Expired" : "false",
    "CreateTime" : "2021-08-31T08:56:25.000+0000",
    "PayType" : "Postpaid",
    "Port" : "3306",
    "LockMode" : "Unlock",
    "Description" : "test instance",
    "ConnectionString" : "pxc-sprpx766vo62nh.polarx.singapore.rds.aliyuncs.com",
    "StorageUsed" : 17042505728,
    "ExpireDate" : "2022-08-31T16:00:00.000+0000",
    "CommodityCode" : "drds_polarxpost_public_cn",
    "MaintainStartTime" : "06:00",
    "DBInstanceType" : "ReadWrite",
    "DBNodeClass" : "polarx.x4.large.2e",
    "LatestMinorVersion" : "polarx-kernel_5.4.11-16301083_xcluster-20210805",
    "MaintainEndTime" : "06:00",
    "DBType" : "polarx",
    "RightsSeparationEnabled" : false,
    "VPCId" : "vpc-xxxxx",
    "MinorVersion" : "polarx-kernel_5.4.11-16301083_xcluster-20210805",
    "RegionId" : "cn-hangzhou",
    "Network" : "VPC",
    "DBVersion" : "5.5",
    "VSwitchId" : "vsw-xxxxxx",
    "ZoneId" : "cn-hangzhou-a",
    "Engine" : "MySQL",
    "KindCode" : 18,
    "Id" : "rm-uf6wjk5xxxxxxxxxx",
    "DBNodes" : [ {
      "ComputeNodeId" : "pxc-i-xxxxxx",
      "NodeClass" : "polarx.x4.large.2e",
      "DataNodeId" : "pxc-xdb-xxxxxx",
      "ZoneId" : "cn-hangzhou-a",
      "Id" : "pxi-xxxxxx",
      "RegionId" : "cn-hangzhou"
    } ],
    "ConnAddrs" : [ {
      "Type" : "VPC",
      "VSwitchId" : "vsw-xxxxxx",
      "Port" : 3306,
      "VPCId" : "vpc-xxxxxx",
      "ConnectionString" : "polardbx-xxx.aliyuncs.com"
    } ],
    "ReadDBInstances" : [ "pxr-xxxxxx" ]
  }
}

Error codes

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