Encrypt

GET /?Action=Encrypt
Description

Encrypts plaintext into ciphertext using a Customer Master Key (CMK).

Body parameter

Required: false
Name: EncryptRequest

Name Description Required Schema Default Example

EncryptionContext

A context for the encryption, in the form of one or more '{"string": "string"}' pairs.
When decrypting the data, you must specify the same context that was specified during encryption (if any), or the decryption will fail.

false

object

KeyId

The ID of the CMK.

true

string

Plaintext

The plaintext you want to encrypt, encoded in base64.
This base64-encoded plaintext must contain between 1 and 4096 characters.

true

string

Responses
HTTP Code 200
HTTP Code Description Schema

200

EncryptResult

Response 200

Response 200

Name Description Required Schema Default Example

CiphertextBlob

The encrypted plaintext.

false

string

KeyId

The ID of the CMK.

false

string