amazonka-cloudwatch-logs-2.0: Amazon CloudWatch Logs 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.CloudWatchLogs.AssociateKmsKey

Description

Associates the specified KMS key with the specified log group.

Associating a KMS key with a log group overrides any existing associations between the log group and a KMS key. After a KMS key is associated with a log group, all newly ingested data for the log group is encrypted using the KMS key. This association is stored as long as the data encrypted with the KMS keyis still within CloudWatch Logs. This enables CloudWatch Logs to decrypt this data whenever it is requested.

CloudWatch Logs supports only symmetric KMS keys. Do not use an associate an asymmetric KMS key with your log group. For more information, see Using Symmetric and Asymmetric Keys.

It can take up to 5 minutes for this operation to take effect.

If you attempt to associate a KMS key with a log group but the KMS key does not exist or the KMS key is disabled, you receive an InvalidParameterException error.

Synopsis

Creating a Request

data AssociateKmsKey Source #

See: newAssociateKmsKey smart constructor.

Constructors

AssociateKmsKey' 

Fields

Instances

Instances details
ToJSON AssociateKmsKey Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

ToHeaders AssociateKmsKey Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

ToPath AssociateKmsKey Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

ToQuery AssociateKmsKey Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

AWSRequest AssociateKmsKey Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

Associated Types

type AWSResponse AssociateKmsKey #

Generic AssociateKmsKey Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

Associated Types

type Rep AssociateKmsKey :: Type -> Type #

Read AssociateKmsKey Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

Show AssociateKmsKey Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

NFData AssociateKmsKey Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

Methods

rnf :: AssociateKmsKey -> () #

Eq AssociateKmsKey Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

Hashable AssociateKmsKey Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

type AWSResponse AssociateKmsKey Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

type Rep AssociateKmsKey Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

type Rep AssociateKmsKey = D1 ('MetaData "AssociateKmsKey" "Amazonka.CloudWatchLogs.AssociateKmsKey" "amazonka-cloudwatch-logs-2.0-6gvDalNFsfE8djZ4aTfA4V" 'False) (C1 ('MetaCons "AssociateKmsKey'" 'PrefixI 'True) (S1 ('MetaSel ('Just "logGroupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "kmsKeyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newAssociateKmsKey Source #

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

AssociateKmsKey, associateKmsKey_logGroupName - The name of the log group.

AssociateKmsKey, associateKmsKey_kmsKeyId - The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. This must be a symmetric KMS key. For more information, see Amazon Resource Names and Using Symmetric and Asymmetric Keys.

Request Lenses

associateKmsKey_kmsKeyId :: Lens' AssociateKmsKey Text Source #

The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. This must be a symmetric KMS key. For more information, see Amazon Resource Names and Using Symmetric and Asymmetric Keys.

Destructuring the Response

data AssociateKmsKeyResponse Source #

See: newAssociateKmsKeyResponse smart constructor.

Instances

Instances details
Generic AssociateKmsKeyResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

Associated Types

type Rep AssociateKmsKeyResponse :: Type -> Type #

Read AssociateKmsKeyResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

Show AssociateKmsKeyResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

NFData AssociateKmsKeyResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

Methods

rnf :: AssociateKmsKeyResponse -> () #

Eq AssociateKmsKeyResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

type Rep AssociateKmsKeyResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.AssociateKmsKey

type Rep AssociateKmsKeyResponse = D1 ('MetaData "AssociateKmsKeyResponse" "Amazonka.CloudWatchLogs.AssociateKmsKey" "amazonka-cloudwatch-logs-2.0-6gvDalNFsfE8djZ4aTfA4V" 'False) (C1 ('MetaCons "AssociateKmsKeyResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newAssociateKmsKeyResponse :: AssociateKmsKeyResponse Source #

Create a value of AssociateKmsKeyResponse with all optional fields omitted.

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