tencent cloud

文档反馈

DescribeSubscribeDetail

最后更新时间:2024-12-04 15:34:40

1. API Description

Domain name for API request: dts.intl.tencentcloudapi.com.

This API is used to get the configuration information of the data subscription instance.

A maximum of 20 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: DescribeSubscribeDetail.
Version Yes String Common Params. The value used for this API: 2021-12-06.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
SubscribeId Yes String Subscription instance ID

3. Output Parameters

Parameter Name Type Description
SubscribeId String The ID of the data subscription, such as subs-b6x64o31tm
SubscribeName String Data subscription instance name
Product String Subscription database type. Currently, cynosdbmysql, mariadb, mongodb, mysql, percona, tdpg, tdsqlpercona are supported.
InstanceId String The subscribed cloud database instance ID. This value only makes sense if cloud database is subscribed. Note: This field may return null, indicating that no valid values can be obtained.
InstanceStatus String The subscribed cloud database instance status. This value only makes sense if cloud database is subscribed. Valid values: running, isolated, offline.Note: This field may return null, indicating that no valid values can be obtained.
Status String Subscription task billing status. Valid values: normal, isolating, isolated, offline, post2PrePayIng.
SubsStatus String Subscription task status. Valid values: notStarted, checking, checkNotPass, checkPass, starting, running, error.
ModifyTime String Modification time, the format is: Y-m-d h:m:s.Note: This field may return null, indicating that no valid values can be obtained.
CreateTime String Creation time, the format is: Y-m-d h:m:s.Note: This field may return null, indicating that no valid values can be obtained.
IsolateTime String Isolation time, the format is: Y-m-d h:m:s. Default time: 0000-00-00 00:00:00.Note: This field may return null, indicating that no valid values can be obtained.
ExpireTime String Expiration time for monthly subscription tasks, the format is: Y-m-d h:m:s. Default time: 0000-00-00 00:00:00.Note: This field may return null, indicating that no valid values can be obtained.
OfflineTime String Offline time, the format is: Y-m-d h:m:s. Default time: 0000-00-00 00:00:00.Note: This field may return null, indicating that no valid values can be obtained.
PayType Integer Payment method. Valid values: 0 (monthly subscription); 1 (pay-as-you-go).
AutoRenewFlag Integer Auto-renewal flag. It is meaningful only when PayType=0. Valid values: 0 (auto-renewal disabled); 1 (auto-renewal enabled).
Region String The region where the task is located
Topic String Kafka topic
Note: This field may return null, indicating that no valid values can be obtained.
Broker String Broker address of Kafka serviceNote: This field may return null, indicating that no valid values can be obtained.
SubscribeMode String Data subscription type. Valid values for non-mongo Product: all (full instance update); dml (data update); ddl (structure update); dmlAndDdl (data + structure update). Valid values for mongo Product: all (full instance update); database (subscribe to a table); collection (subscribe to a collection).Note: This field may return null, indicating that no valid values can be obtained.
Protocol String Subscription data format. If it is empty, the default format is used: mysql\cynosdbmysql\mariadb\percona\tdsqlpercona\tdpg is protobuf, mongo is json. When DatabaseType is mysql and cynosdbmysql, there are three optional protocols: protobuf\avro\json. For details on data format, please refer to the consumption demo documentation on the official website.Note: This field may return null, indicating that no valid values can be obtained.
SubscribeObjects Array of SubscribeObject Information of subscribed tableNote: This field may return null, indicating that no valid values can be obtained.
KafkaConfig SubscribeKafkaConfig Kafka configuration information
Note: This field may return null, indicating that no valid values can be obtained.
AccessType String Source database access type. Valid values: extranet (public network); vpncloud (VPN access); dcg (Direct Connect); ccn (CCN); cdb (database); cvm (self-build on CVM); intranet (intranet); vpc (VPC). Note: The specific optional values depend on the current link support capabilities.Note: This field may return null, indicating that no valid values can be obtained.
Endpoints Array of EndpointItem Access type information
Note: This field may return null, indicating that no valid values can be obtained.
PipelineInfo Array of PipelineInfo Mongo output aggregation settings
Note: This field may return null, indicating that no valid values can be obtained.
Tags Array of TagItem TagNote: This field may return null, indicating that no valid values can be obtained.
Errors Array of SubsErr Subscription task error information
Note: This field may return null, indicating that no valid values can be obtained.
ExtraAttr Array of KeyValuePairOption Additional information added for the business. The parameter name is called key, and the parameter value is called value.Optional parameters for mysql: ProcessXA. Fill in true to process, others will not be processed.Optional parameters for mongo: SubscribeType. Currently only changeStream is supported.Note: This field may return null, indicating that no valid values can be obtained.
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 Quering the details of a subscription task

Input Example

POST / HTTP/1.1
Host: dts.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeSubscribeDetail
<Common Request Parameters>

{
    "SubscribeId": "subs-0b2up6hk4u"
}

Output Example

{
    "Response": {
        "Region": "ap-guangzhou",
        "AccessType": "cdb",
        "AutoRenewFlag": 0,
        "Broker": "guangzhoutest-kafka-3.cdb-dts.tencentcs.com.cn:32339",
        "CreateTime": "2023-12-06 14:31:27",
        "Endpoints": [
            {
                "DatabaseRegion": "ap-guangzhou",
                "EncryptConn": "UnEncrypted",
                "InstanceId": "cdb-kdxona7h",
                "User": "root"
            }
        ],
        "ExpireTime": "0000-00-00 00:00:00",
        "InstanceId": "cdb-kdxona7h",
        "InstanceStatus": "running",
        "IsolateTime": "0000-00-00 00:00:00",
        "KafkaConfig": {
            "DistributeRules": [
                {
                    "DbPattern": "db1",
                    "RuleType": "cols",
                    "TablePattern": "table1",
                    "Columns": [
                        "id"
                    ]
                },
                {
                    "DbPattern": ".*",
                    "RuleType": "table",
                    "TablePattern": ".*",
                    "Columns": null
                }
            ],
            "NumberOfPartitions": 8
        },
        "ModifyTime": "2023-12-06 14:33:47",
        "OfflineTime": "0000-00-00 00:00:00",
        "PayType": 0,
        "Product": "mysql",
        "Protocol": "json",
        "Status": "normal",
        "SubsStatus": "running",
        "SubscribeId": "subs-0b2up6hk4u",
        "SubscribeName": "test",
        "SubscribeMode": "all",
        "Topic": "topic-subs-0b2up6hk4u-cdb-kdxona7h",
        "RequestId": "7bd11a40-9406-11ee-9689-216abbbe2107"
    }
}

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
AuthFailure The CAM signature/authentication information is incorrect.
AuthFailure.AuthFailureError Authentication failed.
FailedOperation Operation failed.
FailedOperation.FailedOperationError The operation failed.
InternalError An internal error occurred.
InternalError.InternalErrorError An internal error occurred.
InvalidParameter The parameter is incorrect.
InvalidParameter.InvalidParameterError The parameter is invalid.
InvalidParameterValue Invalid parameter value.
InvalidParameterValue.InvalidParameterValueError The parameter is invalid.
OperationDenied The operation was denied.
OperationDenied.OperationDeniedError The operation was denied.
ResourceNotFound The resource does not exist.
ResourceNotFound.ResourceNotFoundError The resource was not found.
UnauthorizedOperation The operation is unauthorized.
UnauthorizedOperation.UnauthorizedOperationError The operation is unauthorized.
UnsupportedOperation The operation is not supported.
UnsupportedOperation.UnsupportedOperationError The operation is not supported.