Skip to main content

UpdatePrimaryRegion

Updates the primary region of a multi-Region key.

Description

The UpdatePrimaryRegion operation changes the primary region of a multi-Region key to a different region. When you update the primary region, KMS creates a new primary key in the specified region and updates the key material and metadata of all related multi-Region keys to match the new primary key.

note
  • This operation is only valid for multi-Region keys.
  • The specified Region must already have a replica key.
  • You cannot perform this operation on a key in a Region that is scheduled for deletion.
  • While the operation is in progress, the key state of all affected multi-Region keys is UPDATING.
  • This operation can take several minutes to complete.

Request Syntax

Headers

NameDescriptionRequiredType
Content-TypeMust be "application/x-amz-json-1.1"Yesstring
X-Amz-TargetMust be "TrentService.UpdatePrimaryRegion"Yesstring

Request Body

NameDescriptionRequiredType
KeyIdIdentifies the current primary key. You can use the key ID or key ARN of the primary key.Yesstring
PrimaryRegionThe Region of the current replica key that you want to make the primary key.Yesstring
POST / HTTP/1.1
Content-Type: application/x-amz-json-1.1
X-Amz-Target: TrentService.UpdatePrimaryRegion
{ "KeyId": "mrk-1234abcd12ab34cd56ef1234567890ab", "PrimaryRegion": "us-west-2" }
Values in italics indicate user input and should be replaced with actual values.

Response Elements

This operation returns no response data.

Special Errors

Error CodeDescription
DependencyTimeoutExceptionThe system timed out while trying to fulfill the request.
InvalidArnExceptionThe request was rejected because a specified ARN was not valid.
KMSInternalExceptionAn internal error occurred.
KMSInvalidStateExceptionThe request was rejected because the key state is not valid for this operation.
NotFoundExceptionThe request was rejected because the specified entity or resource could not be found.
UnsupportedOperationExceptionThe request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation.

Permissions

To use the UpdatePrimaryRegion operation, you must have the following permissions:

  • kms:UpdatePrimaryRegion on both the current primary key and the new primary key

Try It Out

Test UpdatePrimaryRegion

Update the primary region of a multi-Region key.

Coming Soon

This feature is currently under development and will be available soon.