Encrypts data on the server side with a new customer master key (CMK) without exposing the plaintext of the data on the client side. The data is first decrypted and then reencrypted. You can also use this operation to change the encryption context of a ciphertext.
Unlike other operations, ReEncrypt
is authorized twice, once as ReEncryptFrom
on the source CMK and once as ReEncryptTo
on the destination CMK. We recommend that you include the "kms:ReEncrypt*"
permission in your key policies to permit reencryption from or to the CMK. This permission is automatically included in the key policy when you create a CMK through the console, but you must include it manually when you create a CMK programmatically or when you set a key policy with the PutKeyPolicy operation.
/// The system timed out while trying to fulfill the request. The request can be retried.
///
/// The request was rejected because the specified CMK is not enabled.
///
/// The request was rejected because the specified ciphertext has been corrupted or is
/// otherwise invalid.
///
/// The request was rejected because the specified grant token is not valid.
///
/// The request was rejected because the specified
KeySpec
value is not valid.
///
/// The request was rejected because the specified CMK was not available. The request
/// can be retried.
///
/// The request was rejected because an internal exception occurred. The request can be
/// retried.
///
/// The request was rejected because the state of the specified resource is not valid
/// for this request.
///
///
///
/// For more information about how key state affects the use of a CMK, see How
/// Key State Affects Use of a Customer Master Key in the AWS Key Management Service
/// Developer Guide.
///
///
/// The request was rejected because the specified entity or resource could not be found.
///