amazonka-kms-2.0: Amazon Key Management Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.KMS.CancelKeyDeletion

Description

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

Synopsis

Creating a Request

data CancelKeyDeletion Source #

See: newCancelKeyDeletion smart constructor.

Constructors

CancelKeyDeletion' 

Fields

  • keyId :: Text

    Identifies the KMS key whose deletion is being canceled.

    Specify the key ID or key ARN of the KMS key.

    For example:

    • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
    • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

    To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

Instances

Instances details
ToJSON CancelKeyDeletion Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

ToHeaders CancelKeyDeletion Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

ToPath CancelKeyDeletion Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

ToQuery CancelKeyDeletion Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

AWSRequest CancelKeyDeletion Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

Associated Types

type AWSResponse CancelKeyDeletion #

Generic CancelKeyDeletion Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

Associated Types

type Rep CancelKeyDeletion :: Type -> Type #

Read CancelKeyDeletion Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

Show CancelKeyDeletion Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

NFData CancelKeyDeletion Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

Methods

rnf :: CancelKeyDeletion -> () #

Eq CancelKeyDeletion Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

Hashable CancelKeyDeletion Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

type AWSResponse CancelKeyDeletion Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

type Rep CancelKeyDeletion Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

type Rep CancelKeyDeletion = D1 ('MetaData "CancelKeyDeletion" "Amazonka.KMS.CancelKeyDeletion" "amazonka-kms-2.0-6YhT3Ymbf9Z5PoaGoz7tbG" 'False) (C1 ('MetaCons "CancelKeyDeletion'" 'PrefixI 'True) (S1 ('MetaSel ('Just "keyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newCancelKeyDeletion Source #

Create a value of CancelKeyDeletion with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

CancelKeyDeletion, cancelKeyDeletion_keyId - Identifies the KMS key whose deletion is being canceled.

Specify the key ID or key ARN of the KMS key.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

Request Lenses

cancelKeyDeletion_keyId :: Lens' CancelKeyDeletion Text Source #

Identifies the KMS key whose deletion is being canceled.

Specify the key ID or key ARN of the KMS key.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

Destructuring the Response

data CancelKeyDeletionResponse Source #

See: newCancelKeyDeletionResponse smart constructor.

Constructors

CancelKeyDeletionResponse' 

Fields

Instances

Instances details
Generic CancelKeyDeletionResponse Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

Associated Types

type Rep CancelKeyDeletionResponse :: Type -> Type #

Read CancelKeyDeletionResponse Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

Show CancelKeyDeletionResponse Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

NFData CancelKeyDeletionResponse Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

Eq CancelKeyDeletionResponse Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

type Rep CancelKeyDeletionResponse Source # 
Instance details

Defined in Amazonka.KMS.CancelKeyDeletion

type Rep CancelKeyDeletionResponse = D1 ('MetaData "CancelKeyDeletionResponse" "Amazonka.KMS.CancelKeyDeletion" "amazonka-kms-2.0-6YhT3Ymbf9Z5PoaGoz7tbG" 'False) (C1 ('MetaCons "CancelKeyDeletionResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "keyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCancelKeyDeletionResponse Source #

Create a value of CancelKeyDeletionResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

CancelKeyDeletion, cancelKeyDeletionResponse_keyId - The Amazon Resource Name (key ARN) of the KMS key whose deletion is canceled.

$sel:httpStatus:CancelKeyDeletionResponse', cancelKeyDeletionResponse_httpStatus - The response's http status code.

Response Lenses

cancelKeyDeletionResponse_keyId :: Lens' CancelKeyDeletionResponse (Maybe Text) Source #

The Amazon Resource Name (key ARN) of the KMS key whose deletion is canceled.