You need to enable JavaScript to run this app.
导航
DescribeDBInstanceShards
最近更新时间:2023.12.07 21:15:17首次发布时间:2023.09.22 11:08:37

调用 DescribeDBInstanceShards 接口查询指定实例下各 Shard 分片的 Server 节点详情。

请求类型

同步请求。

请求参数

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

InstanceId

String

redis-cn0212gzmh2xs****

实例 ID。

说明

您可以调用 DescribeDBInstances 接口查询目标地域下所有 Redis 实例的基本信息,包括实例 ID。

PageNumberInteger1实例信息列表的页码,取值为不超过 Integer 数据类型的最大值,起始值为 1。
PageSizeInteger10每页记录数。取值为 1~100 间的整数。

返回数据

名称类型示例值描述
TotalInteger1当前实例中的分片总数量。
InstanceShardsArray of InstanceShardInfo请参见返回示例实例中所有 Shard 分片的详情列表。关于 InstanceShards 的详细说明,请参见数据结构

请求示例

POST https://redis.volcengineapi.com/?Action=DescribeDBInstanceShards&Version=2020-12-07 HTTP/1.1
Host: redis.volcengineapi.com
Content-Type: application/json; charset=utf-8
X-Date: 20201103T104027Z
Authorization: HMAC-SHA256 Credential=AK****/20201103/cn-beijing/Redis/request,SignedHeaders=content-type;host;x-date,Signature=****
{
    "InstanceId": "redis-cn0212gzmh2xs****",
    "PageNumber": 1,
    "PageSize": 10
}

返回示例

正常返回示例

{
    "ResponseMetadata": {
        "RequestId": "202309211602263758842C63CA00E****",
        "Action": "DescribeDBInstanceShards",
        "Version": "2020-12-07",
        "Service": "Redis",
        "Region": "cn-beijing"
    },
    "Result": {
        "InstanceShards": [
            {
                "NodeNumber": 2,
                "ServerNodes": [
                    {
                        "CurrentRole": "PrimaryNode",
                        "NodeId": "server-redis-cn0212gzmh2xs****-0-0",
                        "Status": "running",
                        "ZoneId": "cn-beijing-a"
                    },
                    {
                        "CurrentRole": "SecondaryNode",
                        "NodeId": "server-redis-cn0212gzmh2xs****-0-1",
                        "Status": "running",
                        "ZoneId": "cn-beijing-a"
                    }
                ],
                "ShardId": "server-redis-cn0212gzmh2xs****-0"
            },
            {
                "NodeNumber": 2,
                "ServerNodes": [
                    {
                        "CurrentRole": "PrimaryNode",
                        "NodeId": "server-redis-cn0212gzmh2xs****-1-0",
                        "Status": "running",
                        "ZoneId": "cn-beijing-a"
                    },
                    {
                        "CurrentRole": "SecondaryNode",
                        "NodeId": "server-redis-cn0212gzmh2xs****-1-1",
                        "Status": "running",
                        "ZoneId": "cn-beijing-a"
                    }
                ],
                "ShardId": "server-redis-cn0212gzmh2xs****-1"
            }
        ],
        "Total": 2
    }
}

错误码

更多详情,请参见错误码