tencent cloud

ListDataKeys
Last updated: 2025-12-04 15:44:10
ListDataKeys
Last updated: 2025-12-04 15:44:10

1. API Description

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

This API is used to query the list of data keys.

A maximum of 100 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: ListDataKeys.
Version Yes String Common Params. The value used for this API: 2019-01-18.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Offset No Integer Meaning matches the Offset in SQL queries, indicates the retrieval starts from the Offset-th element in a sequentially arranged array, defaults to 0.
Limit No Integer Specifies the maximum number of elements to retrieve, same as the Limit in SQL queries. default value is 10. maximum value is 200.
Role No Integer Filter criteria based on the creator role. default 0 means data key created by oneself, 1 means data key automatically created by other cloud services.
HsmClusterId No String HSM cluster ID corresponding to KMS advanced edition (only applicable to KMS exclusive/managed service instance).

3. Output Parameters

Parameter Name Type Description
DataKeys Array of DataKey Specifies the list array of data key ids.
TotalCount Integer Total number of data keys.
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 Get Key List

This example shows you how to retrieve the data key.

Input Example

POST / HTTP/1.1
Host: kms.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ListDataKeys
<Common request parameters>

{}

Output Example

{
    "Response": {
        "DataKeys": [
            {
                "DataKeyId": "50cc8e9f-4f44-11f0-ace9-525400eb1719"
            },
            {
                "DataKeyId": "32e9bd2c-4f44-11f0-ace9-525400eb1719"
            },
            {
                "DataKeyId": "d02ea923-4f43-11f0-b672-52540073b995"
            },
            {
                "DataKeyId": "1a6a8465-4dc8-11f0-b672-52540073b995"
            },
            {
                "DataKeyId": "f3fd3a12-4dba-11f0-ace9-525400eb1719"
            },
            {
                "DataKeyId": "d6e6cf2d-4ceb-11f0-8428-52540073b995"
            },
            {
                "DataKeyId": "c0fb30d1-4ceb-11f0-bcaa-525400eb1719"
            },
            {
                "DataKeyId": "72da485a-4ceb-11f0-bcaa-525400eb1719"
            },
            {
                "DataKeyId": "602b4824-4ceb-11f0-bcaa-525400eb1719"
            },
            {
                "DataKeyId": "52293da7-4cc1-11f0-a29a-525400eb1719"
            }
        ],
        "RequestId": "e9033eb2-e7ba-46a6-b83e-3bc2fc8d906c",
        "TotalCount": 132
    }
}

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
InternalError Internal error.
InvalidParameterValue Incorrect parameter value.
InvalidParameterValue.InvalidHsmClusterId Invalid HSM cluster ID.
UnauthorizedOperation Unauthorized operation.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback