libZSservicesZSamazonka-kmsZSamazonka-kms
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.KMS.EnableKey

Description

Sets the key state of a KMS key to enabled. This allows you to use the KMS key for cryptographic operations.

The KMS key that you use for this operation must be in a compatible key state. For details, see Key state: Effect on your KMS key 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:EnableKey (key policy)

Related operations: DisableKey

Synopsis

Creating a Request

data EnableKey Source #

See: newEnableKey smart constructor.

Constructors

EnableKey' 

Fields

  • keyId :: Text

    Identifies the KMS key to enable.

    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
Eq EnableKey Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

Read EnableKey Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

Show EnableKey Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

Generic EnableKey Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

Associated Types

type Rep EnableKey :: Type -> Type #

NFData EnableKey Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

Methods

rnf :: EnableKey -> () #

Hashable EnableKey Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

ToJSON EnableKey Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

AWSRequest EnableKey Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

Associated Types

type AWSResponse EnableKey #

ToHeaders EnableKey Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

Methods

toHeaders :: EnableKey -> [Header] #

ToPath EnableKey Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

ToQuery EnableKey Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

type Rep EnableKey Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

type Rep EnableKey = D1 ('MetaData "EnableKey" "Amazonka.KMS.EnableKey" "libZSservicesZSamazonka-kmsZSamazonka-kms" 'False) (C1 ('MetaCons "EnableKey'" 'PrefixI 'True) (S1 ('MetaSel ('Just "keyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))
type AWSResponse EnableKey Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

newEnableKey Source #

Create a value of EnableKey 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:

$sel:keyId:EnableKey', enableKey_keyId - Identifies the KMS key to enable.

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

enableKey_keyId :: Lens' EnableKey Text Source #

Identifies the KMS key to enable.

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 EnableKeyResponse Source #

See: newEnableKeyResponse smart constructor.

Constructors

EnableKeyResponse' 

Instances

Instances details
Eq EnableKeyResponse Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

Read EnableKeyResponse Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

Show EnableKeyResponse Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

Generic EnableKeyResponse Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

Associated Types

type Rep EnableKeyResponse :: Type -> Type #

NFData EnableKeyResponse Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

Methods

rnf :: EnableKeyResponse -> () #

type Rep EnableKeyResponse Source # 
Instance details

Defined in Amazonka.KMS.EnableKey

type Rep EnableKeyResponse = D1 ('MetaData "EnableKeyResponse" "Amazonka.KMS.EnableKey" "libZSservicesZSamazonka-kmsZSamazonka-kms" 'False) (C1 ('MetaCons "EnableKeyResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newEnableKeyResponse :: EnableKeyResponse Source #

Create a value of EnableKeyResponse with all optional fields omitted.

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