amazonka-ec2-2.0: Amazon Elastic Compute Cloud 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.EC2.ModifyEbsDefaultKmsKeyId

Description

Changes the default KMS key for EBS encryption by default for your account in this Region.

Amazon Web Services creates a unique Amazon Web Services managed KMS key in each Region for use with encryption by default. If you change the default KMS key to a symmetric customer managed KMS key, it is used instead of the Amazon Web Services managed KMS key. To reset the default KMS key to the Amazon Web Services managed KMS key for EBS, use ResetEbsDefaultKmsKeyId. Amazon EBS does not support asymmetric KMS keys.

If you delete or disable the customer managed KMS key that you specified for use with encryption by default, your instances will fail to launch.

For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide.

Synopsis

Creating a Request

data ModifyEbsDefaultKmsKeyId Source #

See: newModifyEbsDefaultKmsKeyId smart constructor.

Constructors

ModifyEbsDefaultKmsKeyId' 

Fields

  • dryRun :: Maybe Bool

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • kmsKeyId :: Text

    The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS is used. If KmsKeyId is specified, the encrypted state must be true.

    You can specify the KMS key using any of the following:

    • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.
    • Key alias. For example, alias/ExampleAlias.
    • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
    • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

    Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

    Amazon EBS does not support asymmetric KMS keys.

Instances

Instances details
ToHeaders ModifyEbsDefaultKmsKeyId Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

ToPath ModifyEbsDefaultKmsKeyId Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

ToQuery ModifyEbsDefaultKmsKeyId Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

AWSRequest ModifyEbsDefaultKmsKeyId Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

Generic ModifyEbsDefaultKmsKeyId Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

Associated Types

type Rep ModifyEbsDefaultKmsKeyId :: Type -> Type #

Read ModifyEbsDefaultKmsKeyId Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

Show ModifyEbsDefaultKmsKeyId Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

NFData ModifyEbsDefaultKmsKeyId Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

Eq ModifyEbsDefaultKmsKeyId Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

Hashable ModifyEbsDefaultKmsKeyId Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

type AWSResponse ModifyEbsDefaultKmsKeyId Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

type Rep ModifyEbsDefaultKmsKeyId Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

type Rep ModifyEbsDefaultKmsKeyId = D1 ('MetaData "ModifyEbsDefaultKmsKeyId" "Amazonka.EC2.ModifyEbsDefaultKmsKeyId" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "ModifyEbsDefaultKmsKeyId'" 'PrefixI 'True) (S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "kmsKeyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newModifyEbsDefaultKmsKeyId Source #

Create a value of ModifyEbsDefaultKmsKeyId 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:dryRun:ModifyEbsDefaultKmsKeyId', modifyEbsDefaultKmsKeyId_dryRun - Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

ModifyEbsDefaultKmsKeyId, modifyEbsDefaultKmsKeyId_kmsKeyId - The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS is used. If KmsKeyId is specified, the encrypted state must be true.

You can specify the KMS key using any of the following:

  • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.
  • Key alias. For example, alias/ExampleAlias.
  • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
  • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

Amazon EBS does not support asymmetric KMS keys.

Request Lenses

modifyEbsDefaultKmsKeyId_dryRun :: Lens' ModifyEbsDefaultKmsKeyId (Maybe Bool) Source #

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

modifyEbsDefaultKmsKeyId_kmsKeyId :: Lens' ModifyEbsDefaultKmsKeyId Text Source #

The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS is used. If KmsKeyId is specified, the encrypted state must be true.

You can specify the KMS key using any of the following:

  • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.
  • Key alias. For example, alias/ExampleAlias.
  • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
  • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

Amazon EBS does not support asymmetric KMS keys.

Destructuring the Response

data ModifyEbsDefaultKmsKeyIdResponse Source #

See: newModifyEbsDefaultKmsKeyIdResponse smart constructor.

Constructors

ModifyEbsDefaultKmsKeyIdResponse' 

Fields

  • kmsKeyId :: Maybe Text

    The Amazon Resource Name (ARN) of the default KMS key for encryption by default.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic ModifyEbsDefaultKmsKeyIdResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

Associated Types

type Rep ModifyEbsDefaultKmsKeyIdResponse :: Type -> Type #

Read ModifyEbsDefaultKmsKeyIdResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

Show ModifyEbsDefaultKmsKeyIdResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

NFData ModifyEbsDefaultKmsKeyIdResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

Eq ModifyEbsDefaultKmsKeyIdResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

type Rep ModifyEbsDefaultKmsKeyIdResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyEbsDefaultKmsKeyId

type Rep ModifyEbsDefaultKmsKeyIdResponse = D1 ('MetaData "ModifyEbsDefaultKmsKeyIdResponse" "Amazonka.EC2.ModifyEbsDefaultKmsKeyId" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "ModifyEbsDefaultKmsKeyIdResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "kmsKeyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newModifyEbsDefaultKmsKeyIdResponse Source #

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

ModifyEbsDefaultKmsKeyId, modifyEbsDefaultKmsKeyIdResponse_kmsKeyId - The Amazon Resource Name (ARN) of the default KMS key for encryption by default.

$sel:httpStatus:ModifyEbsDefaultKmsKeyIdResponse', modifyEbsDefaultKmsKeyIdResponse_httpStatus - The response's http status code.

Response Lenses

modifyEbsDefaultKmsKeyIdResponse_kmsKeyId :: Lens' ModifyEbsDefaultKmsKeyIdResponse (Maybe Text) Source #

The Amazon Resource Name (ARN) of the default KMS key for encryption by default.