Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DeleteImportedKeyMaterialCommand

Deletes key material that you previously imported. This operation makes the specified KMS key unusable. For more information about importing key material into KMS, see Importing Key Material in the Key Management Service Developer Guide.

When the specified KMS key is in the PendingDeletion state, this operation does not change the KMS key's state. Otherwise, it changes the KMS key's state to PendingImport.

After you delete key material, you can use ImportKeyMaterial to reimport the same key material into the KMS key.

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:DeleteImportedKeyMaterial (key policy)

Related operations:

example

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

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

DeleteImportedKeyMaterialCommandInput for command's input shape.

see

DeleteImportedKeyMaterialCommandOutput for command's response shape.

see

config for KMSClient's config shape.

Hierarchy

Implements

Index

Constructors

Properties

Constructors

constructor

Properties

Readonly input

input: DeleteImportedKeyMaterialCommandInput

Readonly middlewareStack