GenerateDataKey
GET /?Action=GenerateDataKey
Description
Generates a data key using a Customer Master Key (CMK).
This method returns the data in both encrypted form and decrypted form.
Body parameter
Required: false
Name: GenerateDataKeyRequest
Name | Description | Required | Schema | Default | Example |
---|---|---|---|---|---|
EncryptionContext |
A context for the encryption, in the form of one or more |
false |
object |
||
KeyId |
The ID of the CMK. |
true |
string |
||
KeySpec |
The length of the data key you want to generate, in the AES standard: |
false |
string |
||
NumberOfBytes |
The length of the data key you want to generate, in bytes (between |
false |
integer |
Responses
HTTP Code 200
HTTP Code | Description | Schema |
---|---|---|
200 |
GenerateDataKeyResult |
Response 200
Name | Description | Required | Schema | Default | Example |
---|---|---|---|---|---|
CiphertextBlob |
The encrypted data key, encoded in base64. |
false |
string |
||
KeyId |
The ID of the CMK. |
false |
string |
||
Plaintext |
The decrypted data key, encoded in base64. |
false |
string |