public class AssociateKmsKeyRequest extends AmazonWebServiceRequest implements java.io.Serializable
Associates the specified AWS Key Management Service (AWS KMS) customer master key (CMK) with the specified log group.
Associating an AWS 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 Amazon CloudWatch Logs. This enables Amazon CloudWatch Logs to decrypt this data whenever it is requested.
Note that 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 will receive an
InvalidParameterException
error.
Constructor and Description |
---|
AssociateKmsKeyRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getKmsKeyId()
The Amazon Resource Name (ARN) of the CMK to use when encrypting log
data.
|
java.lang.String |
getLogGroupName()
The name of the log group.
|
int |
hashCode() |
void |
setKmsKeyId(java.lang.String kmsKeyId)
The Amazon Resource Name (ARN) of the CMK to use when encrypting log
data.
|
void |
setLogGroupName(java.lang.String logGroupName)
The name of the log group.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
AssociateKmsKeyRequest |
withKmsKeyId(java.lang.String kmsKeyId)
The Amazon Resource Name (ARN) of the CMK to use when encrypting log
data.
|
AssociateKmsKeyRequest |
withLogGroupName(java.lang.String logGroupName)
The name of the log group.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.lang.String getLogGroupName()
The name of the log group.
Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+
The name of the log group.
public void setLogGroupName(java.lang.String logGroupName)
The name of the log group.
Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+
logGroupName
- The name of the log group.
public AssociateKmsKeyRequest withLogGroupName(java.lang.String logGroupName)
The name of the log group.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+
logGroupName
- The name of the log group.
public java.lang.String getKmsKeyId()
The Amazon Resource Name (ARN) of the CMK to use when encrypting log data. For more information, see Amazon Resource Names - AWS Key Management Service (AWS KMS).
Constraints:
Length: - 256
The Amazon Resource Name (ARN) of the CMK to use when encrypting log data. For more information, see Amazon Resource Names - AWS Key Management Service (AWS KMS).
public void setKmsKeyId(java.lang.String kmsKeyId)
The Amazon Resource Name (ARN) of the CMK to use when encrypting log data. For more information, see Amazon Resource Names - AWS Key Management Service (AWS KMS).
Constraints:
Length: - 256
kmsKeyId
- The Amazon Resource Name (ARN) of the CMK to use when encrypting log data. For more information, see Amazon Resource Names - AWS Key Management Service (AWS KMS).
public AssociateKmsKeyRequest withKmsKeyId(java.lang.String kmsKeyId)
The Amazon Resource Name (ARN) of the CMK to use when encrypting log data. For more information, see Amazon Resource Names - AWS Key Management Service (AWS KMS).
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: - 256
kmsKeyId
- The Amazon Resource Name (ARN) of the CMK to use when encrypting log data. For more information, see Amazon Resource Names - AWS Key Management Service (AWS KMS).
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.