Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CancelKeyDeletionCommand

Cancels the deletion of a KMS key. When this operation succeeds, the key state of the KMS key is Disabled. To enable the KMS key, use EnableKey.

For more information about scheduling and canceling deletion of a KMS key, see Deleting KMS keys in the Key Management Service Developer Guide.

The KMS key that you use for this operation must be in a compatible key state. For details, see Key states of KMS keys in the Key Management Service Developer Guide.

Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

Required permissions: kms:CancelKeyDeletion (key policy)

Related operations: ScheduleKeyDeletion

example

Use a bare-bones client and the command you need to make an API call.

import { KMSClient, CancelKeyDeletionCommand } from "@aws-sdk/client-kms"; // ES Modules import
// const { KMSClient, CancelKeyDeletionCommand } = require("@aws-sdk/client-kms"); // CommonJS import
const client = new KMSClient(config);
const command = new CancelKeyDeletionCommand(input);
const response = await client.send(command);
see

CancelKeyDeletionCommandInput for command's input shape.

see

CancelKeyDeletionCommandOutput for command's response shape.

see

config for KMSClient's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: CancelKeyDeletionCommandInput

Readonly middlewareStack

Methods

Static getEndpointParameterInstructions