You need to enable JavaScript to run this app.
导航
DescribeSlots
最近更新时间:2024.10.11 17:16:05首次发布时间:2024.07.31 14:12:09

调用 DescribeSlots 接口查询复制槽列表。

请求类型

同步请求。

请求参数

参数
类型
是否必选
示例值
描述
InstanceId
String
postgres-96138f57****
复制槽所属实例的 ID。
SlotName
String
ExampleOfSlotName
要查询的复制槽的名称。
SlotType
String
logical

复制槽的类型。取值:

  • physical:物理复制槽。
  • logical:逻辑复制槽。
Plugin
String
pgoutput

逻辑复制槽配合解析 WAL 日志的插件名称。

说明

当 SlotType 取值为 physical 时,不需为该字段传值。

Database
String
postgres

复制槽所处的数据库。

说明

当 SlotType 取值为 physical 时,不需为该字段传值。

Temporary
Boolean
true

是否为临时的复制槽。取值:

  • true:是。
  • false:否。
SlotStatus
String
ACTIVE

复制槽的状态。取值:

  • ACTIVE:活跃。
  • INACTIVE:不活跃。

返回参数

参数
类型
示例值
描述
Total
Integer
3
实例的复制槽数量。
ReplicationSlots
Object[]
请参见返回示例。
实例中指定查询条件下的复制槽。

示例

请求示例

POST /?Action=DescribeSlots&Version=2022-01-01 HTTP/1.1
Content-Type: application/json
Host: rds.volcengineapi.com
X-Date: 20231002T101010Z
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_postgresql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****
{
    "InstanceId":"postgres-96138f57****"
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202407181601463F9A69D65646D0A65A1B-262141",
        "Action": "DescribeSlots",
        "Version": "2022-01-01",
        "Service": "rds_postgresql",
        "Region": "cn-beijing"
    },
    "Result": {
        "ReplicationSlots": [
            {
                "Database": "null",
                "Plugin": "null",
                "SlotName": "Slot000001",
                "SlotStatus": "INACTIVE",
                "SlotType": "physical",
                "Temporary": false,
                "WalDelay": 0
            },
            {
                "Database": "null",
                "Plugin": "null",
                "SlotName": "Slot000002",
                "SlotStatus": "INACTIVE",
                "SlotType": "physical",
                "Temporary": false,
                "WalDelay": 50331608
            },
            {
                "Database": "postgres",
                "Plugin": "pgoutput",
                "SlotName": "Slot000003",
                "SlotStatus": "INACTIVE",
                "SlotType": "logical",
                "Temporary": false,
                "WalDelay": 50327792
            },
            {
                "Database": "postgres",
                "Plugin": "pgoutput",
                "SlotName": "Slot000004",
                "SlotStatus": "INACTIVE",
                "SlotType": "logical",
                "Temporary": false,
                "WalDelay": 50327736
            },
            {
                "Database": "postgres",
                "Plugin": "pgoutput",
                "SlotName": "Slot000005",
                "SlotStatus": "ACTIVE",
                "SlotType": "logical",
                "Temporary": true,
                "WalDelay": 50327624
            }
        ],
        "Total": 5
    }
}