View a markdown version of this page

AssociateKmsKeyId - Amazon Elastic Compute Cloud

AssociateKmsKeyId

Associates an additional AWS KMS key with an encrypted Amazon EBS snapshot. With the associated key, you have a second, independent way to access the snapshot's data, in addition to the key the snapshot is already encrypted under. Associating a key doesn't re-encrypt the snapshot or grant access to its original key.

For more information, see Associated KMS keys in the Amazon EBS User Guide.

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.

DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Type: Boolean

Required: No

KmsKeyId

The ID, alias, or ARN of the AWS KMS key to associate with the snapshot. You can specify a key ID, key alias, key ARN, or alias ARN.

Type: String

Required: Yes

SnapshotId

The ID of the Amazon EBS snapshot.

Type: String

Required: No

Response Elements

The following elements are returned by the service.

requestId

The ID of the request.

Type: String

return

Returns true if the request succeeds; otherwise, it returns an error.

Type: Boolean

Errors

For information about the errors that are common to all actions, see Common Error Types.

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: