tencent cloud

文档反馈

DescribeReadOnlyGroups

最后更新时间:2024-06-17 14:25:54

    1. API Description

    Domain name for API request: postgres.tencentcloudapi.com.

    This API is used to query the list of RO groups.

    A maximum of 1000 requests can be initiated per second for this API.

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common Params. The value used for this API: DescribeReadOnlyGroups.
    Version Yes String Common Params. The value used for this API: 2017-03-12.
    Region No String Common Params. This parameter is not required for this API.
    Filters.N No Array of Filter Filter instances by using one or more filters. Valid values: db-master-instance-id (filter by the primary instance ID in string), read-only-group-id (filter by the read-only group ID in string),
    PageSize No Integer The number of results per page. Default value: 10.
    PageNumber No Integer Specify which page is displayed. Default value: 1 (the first page).
    OrderBy No String Sorting criterion. Valid values: ROGroupId, CreateTime, Name.
    OrderByType No String Sorting order. Valid values: desc, asc.

    3. Output Parameters

    Parameter Name Type Description
    ReadOnlyGroupList Array of ReadOnlyGroup RO group list
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Querying the list of read-only groups under a primary instance

    This example shows you how to filter the list of read-only groups by specifying the primary instance ID postgres-kpol3zgp as a condition for the query.

    Input Example

    POST / HTTP/1.1Host: postgres.tencentcloudapi.comContent-Type: application/jsonX-TC-Action: DescribeReadOnlyGroups<common request parameters>{    "Filters": [        {            "Name": "db-master-instance-id",            "Values": [                "postgres-kpol3zgp"            ]        }    ]}
    

    Output Example

    {
        "Response": {
            "ReadOnlyGroupList": [
                {
                    "DBInstanceNetInfo": [
                        {
                            "Address": "",
                            "Ip": "172.16.0.88",
                            "NetType": "private",
                            "Port": 5432,
                            "ProtocolType": "postgresql",
                            "Status": "opened",
                            "SubnetId": "subnet-7aheme8u",
                            "VpcId": "vpc-ql6jst9h"
                        }
                    ],
                    "MasterDBInstanceId": "postgres-kpol3zgp",
                    "MaxReplayLag": 0,
                    "MaxReplayLatency": 0,
                    "MinDelayEliminateReserve": 0,
                    "NetworkAccessList": null,
                    "ProjectId": 1076910,
                    "ReadOnlyDBInstanceList": [
                        {
                            "AppId": 251197262,
                            "AutoRenew": 0,
                            "CreateTime": "2023-05-17 15:24:26",
                            "DBCharset": "UTF8",
                            "DBEngine": "postgresql",
                            "DBEngineConfig": "",
                            "DBInstanceClass": "cdb.pg.sh1.2g",
                            "DBInstanceCpu": 1,
                            "DBInstanceId": "pgro-5objz9hu",
                            "DBInstanceMemory": 2,
                            "DBInstanceName": "auto_rotest",
                            "DBInstanceNetInfo": [
                                {
                                    "Address": "",
                                    "Ip": "172.16.0.134",
                                    "NetType": "private",
                                    "Port": 5432,
                                    "ProtocolType": "postgresql",
                                    "Status": "opened",
                                    "SubnetId": "subnet-7aheme8u",
                                    "VpcId": "vpc-ql6jst9h"
                                }
                            ],
                            "DBInstanceStatus": "running",
                            "DBInstanceStorage": 10,
                            "DBInstanceType": "readonly",
                            "DBInstanceVersion": "standard",
                            "DBKernelVersion": "v9.5.25_r1.5",
                            "DBMajorVersion": "9.5",
                            "DBNodeSet": null,
                            "DBVersion": "9.5.25",
                            "ExpireTime": "0000-00-00 00:00:00",
                            "IsSupportTDE": 0,
                            "IsolatedTime": "0000-00-00 00:00:00",
                            "MasterDBInstanceId": "postgres-kpol3zgp",
                            "NetworkAccessList": null,
                            "OfflineTime": "0001-01-04 00:00:00",
                            "PayType": "postpaid",
                            "ProjectId": 0,
                            "ReadOnlyInstanceNum": 0,
                            "Region": "ap-guangzhou",
                            "StatusInReadonlyGroup": "running",
                            "SubnetId": "subnet-7aheme8u",
                            "SupportIpv6": 0,
                            "TagList": [],
                            "Type": "SH02",
                            "Uid": 49,
                            "UpdateTime": "2023-05-17 07:25:35",
                            "VpcId": "vpc-ql6jst9h",
                            "Zone": "ap-guangzhou-3"
                        }
                    ],
                    "ReadOnlyGroupId": "pgrogrp-htrtddr0",
                    "ReadOnlyGroupName": "autotest",
                    "Rebalance": 0,
                    "Region": "ap-guangzhou",
                    "ReplayLagEliminate": 0,
                    "ReplayLatencyEliminate": 0,
                    "Status": "ok",
                    "SubnetId": "subnet-7aheme8u",
                    "VpcId": "vpc-ql6jst9h",
                    "Zone": "ap-guangzhou-3"
                }
            ],
            "RequestId": "a28a102a-8c70-451c-96d7-04291218fbc1"
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    FailedOperation.CamAuthFailed CAM authentication failed.
    FailedOperation.CamCheckResourceError Failed to get permissions. Please try again later. If the problem persists, please contact customer service.
    FailedOperation.CamSigAndAuthError Authentication failed. Please try again later. If the problem persists, please contact customer service.
    FailedOperation.DatabaseAccessError Failed to access database management service. Please try again later. If the problem persists, please contact customer service.
    FailedOperation.DatabaseAffectedError Data operation failed. Please contact customer service.
    FailedOperation.FailedOperationError Operation failed. Please try again later.
    InternalError.DBError Backend database execution error.
    InternalError.InternalHttpServerError An exception occurred while executing the request.
    InternalError.SystemError System error. When this error occurs, please contact customer service for assistance.
    InvalidParameterValue.DataConvertError Failed to convert data format. Please contact customer service.
    InvalidParameterValue.InterfaceNameNotFound Incorrect ACTION.
    InvalidParameterValue.InvalidParameterValueError Incorrect parameter value
    InvalidParameterValue.ParameterHandleError Failed to process the parameter. Please check if the parameter value is valid.
    OperationDenied.CamDeniedError This operation cannot be performed.
    ResourceNotFound.InstanceNotFoundError The instance does not exist.
    联系我们

    联系我们,为您的业务提供专属服务。

    技术支持

    如果你想寻求进一步的帮助,通过工单与我们进行联络。我们提供7x24的工单服务。

    7x24 电话支持