调用DescribeDBClusterAttribute接口查看PolarDB集群的详细属性。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeDBClusterAttribute

系统规定参数。取值:DescribeDBClusterAttribute

DBClusterId String pc-*****************

集群ID。

说明 您可以通过DescribeDBClusters接口查看账号下所有集群的详细信息,包括集群ID。

返回数据

名称 类型 示例值 描述
DeletionLock Integer 0

集群删除的锁定状态,取值范围如下:

  • 0:未锁定,可删除集群。
  • 1:锁定,不可删除集群。
Category String Normal

产品系列,取值范围如下:

  • Normal:集群版
  • Basic:单节点
  • Archive:高压缩引擎(X-Engine)
  • NormalMultimaster:多主架构集群版
  • SENormal:标准版
说明
  • 仅PolarDB MySQL版支持单节点产品系列。
    说明
    • 仅PolarDB MySQL版8.0.1版本的集群,支持标准版产品系列。
      说明
      • 仅PolarDB MySQL版8.0版本的集群,支持高压缩引擎(X-Engine)和多主架构集群版产品系列。
ResourceGroupId String rg-***************

资源组ID。

DataLevel1BackupChainSize Long 74448896

一级备份(快照)总大小,单位为Byte。

DBClusterId String pc-*****************

集群ID。

DBType String MySQL

数据库引擎类型。

DBClusterNetworkType String VPC

集群的网络类型。

IsLatestVersion Boolean false

是否为最新内核版本。取值范围如下:

  • true:是
  • false:否
StorageMax Long 10995116277760

当前集群规格的最大存储容量,单位为Byte。

DBVersion String 8.0

数据库引擎版本。

DBNodes Array of DBNode

节点信息详情。

CreationTime String 2020-03-23T21:35:43Z

节点创建时间。

FailoverPriority Integer 1

Failover优先级。每个节点都有一个Failover优先级,决定了当故障切换时,该节点被选举为主节点的概率高低。数值越大,优先级越高,取值范围为1~15。

MaxIOPS Integer 32000

最大I/O请求次数,即IOPS。

DBNodeClass String polar.mysql.x4.large

节点规格。

DBNodeRole String Reader

节点角色,取值范围如下:

  • Writer:主节点。
  • Reader:只读节点。
ZoneId String cn-hangzhou-i

可用区ID。

MaxConnections Integer 8000

最大集群并发连接数。

DBNodeStatus String Running

节点状态,取值范围如下:

  • Creating:创建中
  • Running:运行中
  • Deleting:删除中
  • Rebooting:重启中
  • DBNodeCreating:正在增加节点
  • DBNodeDeleting:正在删除节点
  • ClassChanging:正在变更节点规格
  • NetAddressCreating:正在创建网络连接
  • NetAddressDeleting:正在删除网络连接
  • NetAddressModifying:正在修改网络连接
  • MinorVersionUpgrading:小版本升级中
  • Maintaining:实例维护中
  • Switching:切换中
DBNodeId String pi-****************

节点ID。

ImciSwitch String ON

是否开启列存索引。取值范围:

  • ON:开启
  • OFF:关闭
HotReplicaMode String ON

是否开启热备。取值范围:

  • ON:开启
  • OFF:关闭
AddedCpuCores String 6

秒级弹性扩核的CPU核数。

MasterId String pi-bp18z52akld3*****

多主架构集群版的主节点ID。

SccMode String ON

节点是否开启全局一致性(高性能模式)功能。取值范围:

  • ON:开启全局一致性(高性能模式)功能。
  • OFF:关闭全局一致性(高性能模式)功能。
ServerWeight String 1

路由权重。取值范围:1~100。默认值为1。

ServerlessType String AgileServerless

Serverless类型。当前取值固定为AgileServerless(敏态)。

说明 仅Serverless集群支持该参数。
ZoneIds String cn-hangzhou-i,cn-hangzhou-g

可用区ID。

MaintainTime String 18:00Z-19:00Z

集群的可维护时间段,格式为HH:mmZ-HH:mmZ(UTC时间)。例如16:00Z-17:00Z表示,0点到1点(UTC+08:00)可以进行例行维护。

Engine String POLARDB

集群引擎。

Tags Array of Tag

标签信息详情。

Key String test

标签键。

Value String MySQL

标签值。

RequestId String 074467EF-86B9-4C23-ACBF-E9B81A******

请求ID。

VPCId String vpc-*******************

专有网络ID。

DBClusterStatus String Running

集群状态,取值范围请参见集群状态表

VSwitchId String vsw-*********************

虚拟交换机ID。

DBClusterDescription String test

集群描述。

Expired String false

集群是否到期。

说明 仅付费方式为Prepaid(包年包月)的集群支持返回该参数。
PayType String Prepaid

付费类型。取值范围:

  • Postpaid:按量付费。
  • Prepaid:预付费(包年包月)。
StoragePayType String Prepaid

存储计费类型。取值范围如下:

  • Postpaid:按容量计费(按量付费)。
  • Prepaid:按空间计费(包年包月)。
LockMode String Unlock

锁定模式,取值范围:

  • Unlock:未锁定。
  • ManualLock:手动触发锁定。
  • LockByExpiration:集群过期自动锁定。
StorageUsed Long 3012558848

存储空间的使用量,单位为Byte。

StorageSpace Long 50

按空间计费(包年包月)的存储空间。单位:Byte。

DBVersionStatus String Stable

当前数据库小版本状态,取值范围如下:

  • Stable:当前版本状态稳定。
  • Old:当前版本过旧,建议升级到最新版本。
  • HighRisk:当前版本有严重缺陷,请立即升级到最新的版本。
说明 关于如何升级数据库小版本,请参见版本升级
CreationTime String 2020-08-14T05:58:42Z

集群创建时间。

SQLSize Long 0

SQL的存储量,单位为Byte。若数值为-1,则表示没有数据。

InodeTotal Long 6,291,456

文件系统最大inode数。

InodeUsed Long 4,194,304

当前inode使用量。

BlktagTotal Long 7,864,320

文件系统最大blktag数。

BlktagUsed Long 5,242,880

当前blktag使用量。

RegionId String cn-hangzhou

地域ID。

ExpireTime String 2020-11-14T16:00:00Z

集群到期时间。

说明 仅付费方式为Prepaid(包年包月)的集群会返回具体参数值,Postpaid(按量付费)集群则返回空值。
SubCategory String Exclusive

计算节点的规格类型,取值范围如下:

  • Exclusive:独享规格
  • General:通用规格
说明 仅PolarDB MySQL版且产品系列为集群版时,支持返回该参数。
IsProxyLatestVersion Boolean false

是否为数据库代理最新版本,取值范围如下:

  • true:是
  • false:否
StorageType String HighPerformance

存储类型,取值固定为HighPerformance

ServerlessType String AgileServerless

Serverless类型。当前取值固定为AgileServerless(敏态)。

StrictConsistency String ON

集群是否开启了多可用区数据强一致。取值范围:

  • ON:表示开启了多可用区数据强一致,适用于标准版3AZ场景。
  • OFF:表示未开启多可用区数据强一致。
ProxyCpuCores String 4

数据库代理CPU核数。

ProxyStandardCpuCores String 2

数据库代理标准配置CPU核数。

ProxyType String Exclusive

数据库代理类型,取值范围:

  • Exclusive:企业独享版
  • General :企业通用版
ProxyStatus String Running

数据库代理的状态。取值范围:

  • Creating:创建中
  • Running:运行中
  • Deleting:释放中
  • Rebooting:重启中
  • DBNodeCreating:正在增加节点
  • DBNodeDeleting:正在删除节点
  • ClassChanging:正在变更节点规格
  • NetAddressCreating:正在创建网络连接
  • NetAddressDeleting:正在删除网络连接
  • NetAddressModifying:正在修改网络连接
  • Deleted:已释放
ProxyServerlessType String AgileServerless

数据库代理Serverless类型。当前取值固定为AgileServerless。

示例

请求示例

http(s)://polardb.aliyuncs.com/?Action=DescribeDBClusterAttribute
&DBClusterId=pc-*****************
&<公共请求参数>

正常返回示例

XML格式

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

<DescribeDBClusterAttributeResponse>
    <DeletionLock>0</DeletionLock>
    <Category>Normal</Category>
    <ResourceGroupId>rg-***************</ResourceGroupId>
    <DataLevel1BackupChainSize>74448896</DataLevel1BackupChainSize>
    <DBClusterId>pc-*****************</DBClusterId>
    <DBType>MySQL</DBType>
    <DBClusterNetworkType>VPC</DBClusterNetworkType>
    <IsLatestVersion>false</IsLatestVersion>
    <StorageMax>10995116277760</StorageMax>
    <DBVersion>8.0</DBVersion>
    <DBNodes>
        <CreationTime>2020-03-23T21:35:43Z</CreationTime>
        <FailoverPriority>1</FailoverPriority>
        <MaxIOPS>32000</MaxIOPS>
        <DBNodeClass>polar.mysql.x4.large</DBNodeClass>
        <DBNodeRole>Reader</DBNodeRole>
        <ZoneId>cn-hangzhou-i</ZoneId>
        <MaxConnections>8000</MaxConnections>
        <DBNodeStatus>Running</DBNodeStatus>
        <DBNodeId>pi-****************</DBNodeId>
        <ImciSwitch>ON</ImciSwitch>
        <HotReplicaMode>ON</HotReplicaMode>
        <AddedCpuCores>6</AddedCpuCores>
        <MasterId>pi-bp18z52akld3*****</MasterId>
        <SccMode>ON</SccMode>
        <ServerWeight>1</ServerWeight>
        <ServerlessType>AgileServerless</ServerlessType>
    </DBNodes>
    <ZoneIds>cn-hangzhou-i,cn-hangzhou-g</ZoneIds>
    <MaintainTime>18:00Z-19:00Z</MaintainTime>
    <Engine>POLARDB</Engine>
    <Tags>
        <Key>test</Key>
        <Value>MySQL</Value>
    </Tags>
    <RequestId>074467EF-86B9-4C23-ACBF-E9B81A******</RequestId>
    <VPCId>vpc-*******************</VPCId>
    <DBClusterStatus>Running</DBClusterStatus>
    <VSwitchId>vsw-*********************</VSwitchId>
    <DBClusterDescription>test</DBClusterDescription>
    <Expired>false</Expired>
    <PayType>Prepaid</PayType>
    <StoragePayType>Prepaid</StoragePayType>
    <LockMode>Unlock</LockMode>
    <StorageUsed>3012558848</StorageUsed>
    <StorageSpace>50</StorageSpace>
    <DBVersionStatus>Stable</DBVersionStatus>
    <CreationTime>2020-08-14T05:58:42Z</CreationTime>
    <SQLSize>0</SQLSize>
    <RegionId>cn-hangzhou</RegionId>
    <ExpireTime>2020-11-14T16:00:00Z</ExpireTime>
    <SubCategory>Exclusive</SubCategory>
    <IsProxyLatestVersion>false</IsProxyLatestVersion>
    <StorageType>HighPerformance</StorageType>
    <ServerlessType>AgileServerless</ServerlessType>
    <StrictConsistency>ON</StrictConsistency>
    <ProxyCpuCores>4</ProxyCpuCores>
    <ProxyStandardCpuCores>2</ProxyStandardCpuCores>
    <ProxyType>Exclusive</ProxyType>
    <ProxyStatus>Running</ProxyStatus>
    <ProxyServerlessType>AgileServerless</ProxyServerlessType>
</DescribeDBClusterAttributeResponse>

JSON格式

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

{
  "DeletionLock" : 0,
  "Category" : "Normal",
  "ResourceGroupId" : "rg-***************",
  "DataLevel1BackupChainSize" : 74448896,
  "DBClusterId" : "pc-*****************",
  "DBType" : "MySQL",
  "DBClusterNetworkType" : "VPC",
  "IsLatestVersion" : false,
  "StorageMax" : 10995116277760,
  "DBVersion" : "8.0",
  "DBNodes" : [ {
    "CreationTime" : "2020-03-23T21:35:43Z",
    "FailoverPriority" : 1,
    "MaxIOPS" : 32000,
    "DBNodeClass" : "polar.mysql.x4.large",
    "DBNodeRole" : "Reader",
    "ZoneId" : "cn-hangzhou-i",
    "MaxConnections" : 8000,
    "DBNodeStatus" : "Running",
    "DBNodeId" : "pi-****************",
    "ImciSwitch" : "ON",
    "HotReplicaMode" : "ON",
    "AddedCpuCores" : "6",
    "MasterId" : "pi-bp18z52akld3*****",
    "SccMode" : "ON",
    "ServerWeight" : "1",
    "ServerlessType" : "AgileServerless"
  } ],
  "ZoneIds" : "cn-hangzhou-i,cn-hangzhou-g",
  "MaintainTime" : "18:00Z-19:00Z",
  "Engine" : "POLARDB",
  "Tags" : [ {
    "Key" : "test",
    "Value" : "MySQL"
  } ],
  "RequestId" : "074467EF-86B9-4C23-ACBF-E9B81A******",
  "VPCId" : "vpc-*******************",
  "DBClusterStatus" : "Running",
  "VSwitchId" : "vsw-*********************",
  "DBClusterDescription" : "test",
  "Expired" : "false",
  "PayType" : "Prepaid",
  "StoragePayType" : "Prepaid",
  "LockMode" : "Unlock",
  "StorageUsed" : 3012558848,
  "StorageSpace" : 50,
  "DBVersionStatus" : "Stable",
  "CreationTime" : "2020-08-14T05:58:42Z",
  "SQLSize" : 0,
  "RegionId" : "cn-hangzhou",
  "ExpireTime" : "2020-11-14T16:00:00Z",
  "SubCategory" : "Exclusive",
  "IsProxyLatestVersion" : false,
  "StorageType" : "HighPerformance",
  "ServerlessType" : "AgileServerless",
  "StrictConsistency" : "ON",
  "ProxyCpuCores" : "4",
  "ProxyStandardCpuCores" : "2",
  "ProxyType" : "Exclusive",
  "ProxyStatus" : "Running",
  "ProxyServerlessType" : "AgileServerless"
}

错误码

HttpCode 错误码 错误信息 描述
400 InvalidDBClusterId.Malformed The specified parameter DBClusterId is not valid. 指定的参数DBClusterId无效
403 Forbidden.RAM User not authorized to operate on the specified resource, or this API does not support RAM. 用户无权操作指定资源,或此API不支持RAM。
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. 当前的记录中不存在提供的DBClusterId。

访问错误中心查看更多错误码。