You need to enable JavaScript to run this app.
导航
DescribeDBInstanceShards
最近更新时间:2024.07.18 22:55:13首次发布时间:2023.09.22 11:08:37

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

请求类型

同步请求。

请求参数

参数
类型
是否必选
示例值
描述
InstanceId
String
redis-cn0212gzmh2xs****

实例 ID。

说明

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

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

返回参数

参数
类型
示例值
描述
Total
Integer
1
当前实例中的分片总数量。
InstanceShards
Object[]
实例中所有 Shard 分片的详情列表。

示例

请求示例

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
    }
}

错误码

更多详情,请参见错误码