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.
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). |
| 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. |
This example shows you how to retrieve the data key.
POST / HTTP/1.1
Host: kms.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ListDataKeys
<Common request parameters>
{}{
"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
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
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. |
Feedback