tencent cloud

ListDataKeyDetail
最后更新时间:2025-12-04 15:44:10
ListDataKeyDetail
最后更新时间: 2025-12-04 15:44:10

1. API Description

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

This API is used to retrieve data key list details based on specified Offset and Limit.

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: ListDataKeyDetail.
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 by creator role. default 0 means data keys created by the user, 1 means data keys automatically created by authorized cloud services.
OrderType No Integer Sorts according to the creation time of DataKey. 0 indicates descending sort. 1 indicates ascending sort.
KeyState No Integer Filter based on DataKey state. 0 means all datakeys, 1 means querying only Enabled datakeys, 2 means querying only Disabled datakeys, 3 means querying datakeys in PendingDelete state (keys in scheduled deletion status).
SearchKeyAlias No String Performs a fuzzy match query based on DataKeyId or DataKeyName.
Origin No String Filters data keys by DateKey type. "TENCENT_KMS" filters data keys with key material created by KMS. "EXTERNAL" filters EXTERNAL type data keys requiring user-imported key material. "ALL" or leave unset queries both types. case-sensitive.
HsmClusterId No String HSM cluster ID corresponding to KMS advanced edition.
KeyId No String Specifies the globally unique identifier of the root key.
DataKeyLen No Integer Length of the data key.
TagFilters.N No Array of TagFilter Tag filtering conditions.

3. Output Parameters

Parameter Name Type Description
DataKeyMetadatas Array of DataKeyMetadata Returns the attribute information list.
TotalCount Integer Total number of datakeys.
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 Retrieving Data Key List Details Example

Input Example

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

{
    "SearchKeyAlias": "e6c1f360-4ceb-11f0-8428-52540073b995"
}

Output Example

{
    "Response": {
        "DataKeyMetadatas": [
            {
                "CreateTime": 1750323652,
                "CreatorUin": 100000007998,
                "DataKeyId": "e6c1f360-4ceb-11f0-8428-52540073b995",
                "DataKeyName": "eY66EuC61oAhm6qXyjZAPWhX0Gn9oe8g",
                "DeletionDate": 1750928452,
                "Description": "TestDateKey_01",
                "HsmClusterId": "",
                "KeyId": "0397abd8-4029-11f0-aa65-52540064acab",
                "KeyState": "PendingDelete",
                "NumberOfBytes": 1024,
                "Origin": "TENCENT_KMS",
                "Owner": "user",
                "ResourceId": "creatorUin/100000007998/e6c1f360-4ceb-11f0-8428-52540073b995"
            }
        ],
        "RequestId": "75bd39cb-1e80-4b54-9b83-b991b6f684d6",
        "TotalCount": 1
    }
}

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.UnauthorizedOperation Unauthorized operation.
InternalError Internal error.
InvalidParameter Invalid parameter.
InvalidParameterValue.InvalidHsmClusterId Invalid HSM cluster ID.
InvalidParameterValue.InvalidKeyId Invalid KeyId.
ResourceUnavailable.CmkNotFound The CMK does not exist.
UnauthorizedOperation Unauthorized operation.
本页内容是否解决了您的问题?
您也可以 联系销售 提交工单 以寻求帮助。

文档反馈