Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data AssociateKmsKey = AssociateKmsKey' {
- logGroupName :: Text
- kmsKeyId :: Text
- newAssociateKmsKey :: Text -> Text -> AssociateKmsKey
- associateKmsKey_logGroupName :: Lens' AssociateKmsKey Text
- associateKmsKey_kmsKeyId :: Lens' AssociateKmsKey Text
- data AssociateKmsKeyResponse = AssociateKmsKeyResponse' {
- newAssociateKmsKeyResponse :: AssociateKmsKeyResponse
Creating a Request
data AssociateKmsKey Source #
See: newAssociateKmsKey
smart constructor.
AssociateKmsKey' | |
|
Instances
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_logGroupName :: Lens' AssociateKmsKey Text Source #
The name of the log group.
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
Generic AssociateKmsKeyResponse Source # | |
Defined in Amazonka.CloudWatchLogs.AssociateKmsKey type Rep AssociateKmsKeyResponse :: Type -> Type # | |
Read AssociateKmsKeyResponse Source # | |
Show AssociateKmsKeyResponse Source # | |
Defined in Amazonka.CloudWatchLogs.AssociateKmsKey showsPrec :: Int -> AssociateKmsKeyResponse -> ShowS # show :: AssociateKmsKeyResponse -> String # showList :: [AssociateKmsKeyResponse] -> ShowS # | |
NFData AssociateKmsKeyResponse Source # | |
Defined in Amazonka.CloudWatchLogs.AssociateKmsKey rnf :: AssociateKmsKeyResponse -> () # | |
Eq AssociateKmsKeyResponse Source # | |
Defined in Amazonka.CloudWatchLogs.AssociateKmsKey | |
type Rep AssociateKmsKeyResponse Source # | |
Defined in Amazonka.CloudWatchLogs.AssociateKmsKey |
newAssociateKmsKeyResponse :: AssociateKmsKeyResponse Source #
Create a value of AssociateKmsKeyResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.