Retrieves the plaintext of a managed data key (DK).
Operation description
For information about the access policy that must be granted to a RAM user or RAM role to call this operation, refer to access control.
This operation can be called through a shared gateway. For more information, refer to Alibaba Cloud SDK.
Shared gateway: Access KMS through public or VPC endpoints.
Try it now
Test
RAM authorization
Request syntax
GET HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DataKeyName |
string |
No |
The name of the managed data key (DK). This parameter is required. |
example-data-key |
| DataKeyVersionId |
string |
No |
The version number of the managed data key (DK). This parameter is optional. If you set this parameter to a specific version number, the plaintext of the specified version of the managed data key (DK) is returned. |
xH6OPUmz |
| UseLatest |
boolean |
No |
Specifies whether to use the latest version of the managed data key (DK) when no version number is provided. Valid values:
Default value: false. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. Alibaba Cloud generates a unique identifier for each request. You can use the request ID to troubleshoot issues. |
4bd560a1-729e-45f1-a3d9-b2a33d61046b |
| DataKeyName |
string |
The name of the managed data key (DK). |
example-data-key |
| DataKeyVersionName |
string |
The credential name that stores the key material of the returned managed data key (DK) version. |
kms-datakeyversion!example-data-key!xH6OPUmz |
| DataKeyVersionId |
string |
The version number of the returned managed data key (DK). |
xH6OPUmz |
| Plaintext |
string |
The Base64-encoding plaintext value of the data key (DK). |
CYueyVmZJ2MfA1VSZV2jCbFT8bO7StAvBnHacplr9aI= |
Examples
Success response
JSON format
{
"RequestId": "4bd560a1-729e-45f1-a3d9-b2a33d61046b",
"DataKeyName": "example-data-key",
"DataKeyVersionName": "kms-datakeyversion!example-data-key!xH6OPUmz",
"DataKeyVersionId": "xH6OPUmz\n",
"Plaintext": "CYueyVmZJ2MfA1VSZV2jCbFT8bO7StAvBnHacplr9aI="
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.