Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Associates the specified Key Management Service customer master key (CMK) with the specified log group.
Associating an KMS CMK with a log group overrides any existing associations between the log group and a CMK. After a CMK is associated with a log group, all newly ingested data for the log group is encrypted using the CMK. This association is stored as long as the data encrypted with the CMK is still within CloudWatch Logs. This enables CloudWatch Logs to decrypt this data whenever it is requested.
CloudWatch Logs supports only symmetric CMKs. Do not use an associate an asymmetric CMK 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 CMK with a log group but the CMK does not
exist or the CMK 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:
$sel:logGroupName:AssociateKmsKey'
, associateKmsKey_logGroupName
- The name of the log group.
$sel:kmsKeyId:AssociateKmsKey'
, associateKmsKey_kmsKeyId
- The Amazon Resource Name (ARN) of the CMK to use when encrypting log
data. This must be a symmetric CMK. For more information, see
Amazon Resource Names - Key Management Service
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 CMK to use when encrypting log data. This must be a symmetric CMK. For more information, see Amazon Resource Names - Key Management Service and Using Symmetric and Asymmetric Keys.
Destructuring the Response
data AssociateKmsKeyResponse Source #
See: newAssociateKmsKeyResponse
smart constructor.
Instances
Eq AssociateKmsKeyResponse Source # | |
Defined in Amazonka.CloudWatchLogs.AssociateKmsKey | |
Read AssociateKmsKeyResponse Source # | |
Show AssociateKmsKeyResponse Source # | |
Defined in Amazonka.CloudWatchLogs.AssociateKmsKey showsPrec :: Int -> AssociateKmsKeyResponse -> ShowS # show :: AssociateKmsKeyResponse -> String # showList :: [AssociateKmsKeyResponse] -> ShowS # | |
Generic AssociateKmsKeyResponse Source # | |
Defined in Amazonka.CloudWatchLogs.AssociateKmsKey type Rep AssociateKmsKeyResponse :: Type -> Type # | |
NFData AssociateKmsKeyResponse Source # | |
Defined in Amazonka.CloudWatchLogs.AssociateKmsKey rnf :: AssociateKmsKeyResponse -> () # | |
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.