RestoreKey - AWS Payment Cryptography Control Plane


Cancels a scheduled key deletion during the waiting period. Use this operation to restore a Key that is scheduled for deletion.

During the waiting period, the KeyState is DELETE_PENDING and deletePendingTimestamp contains the date and time after which the Key will be deleted. After Key is restored, the KeyState is CREATE_COMPLETE, and the value for deletePendingTimestamp is removed.

Cross-account use: This operation can't be used across different AWS accounts.

Related operations:

Request Syntax

{ "KeyIdentifier": "string" }

Request Parameters

The request accepts the following data in JSON format.


The KeyARN of the key to be restored within AWS Payment Cryptography.

Type: String

Length Constraints: Minimum length of 7. Maximum length of 322.

Pattern: arn:aws:payment-cryptography:[a-z]{2}-[a-z]{1,16}-[0-9]+:[0-9]{12}:(key/[0-9a-zA-Z]{16,64}|alias/[a-zA-Z0-9/_-]+)$|^alias/[a-zA-Z0-9/_-]+

Required: Yes

Response Syntax

{ "Key": { "CreateTimestamp": number, "DeletePendingTimestamp": number, "DeleteTimestamp": number, "Enabled": boolean, "Exportable": boolean, "KeyArn": "string", "KeyAttributes": { "KeyAlgorithm": "string", "KeyClass": "string", "KeyModesOfUse": { "Decrypt": boolean, "DeriveKey": boolean, "Encrypt": boolean, "Generate": boolean, "NoRestrictions": boolean, "Sign": boolean, "Unwrap": boolean, "Verify": boolean, "Wrap": boolean }, "KeyUsage": "string" }, "KeyCheckValue": "string", "KeyCheckValueAlgorithm": "string", "KeyOrigin": "string", "KeyState": "string", "UsageStartTimestamp": number, "UsageStopTimestamp": number } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


The key material of the restored key. The KeyState will change to CREATE_COMPLETE and value for DeletePendingTimestamp gets removed.

Type: Key object



You do not have sufficient access to perform this action.

HTTP Status Code: 400


This request can cause an inconsistent state for the resource.

HTTP Status Code: 400


The request processing has failed because of an unknown error, exception, or failure.

HTTP Status Code: 500


The request was denied due to an invalid resource error.

HTTP Status Code: 400


This request would cause a service quota to be exceeded.

HTTP Status Code: 400


The service cannot complete the request.

HTTP Status Code: 500


The request was denied due to request throttling.

HTTP Status Code: 400


The request was denied due to an invalid request error.

HTTP Status Code: 400

See Also

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