public class CreateLogGroupRequest extends AmazonWebServiceRequest implements java.io.Serializable
Creates a log group with the specified name.
You can create up to 5000 log groups per account.
You must use the following guidelines when naming a log group:
Log group names must be unique within a region for an AWS account.
Log group names can be between 1 and 512 characters long.
Log group names consist of the following characters: a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), '/' (forward slash), and '.' (period).
If you associate a AWS Key Management Service (AWS KMS) customer master key (CMK) with the log group, ingested data 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.
If you attempt to associate a CMK with the log group but the CMK does not
exist or the CMK is disabled, you will receive an
InvalidParameterException
error.
Constructor and Description |
---|
CreateLogGroupRequest()
Default constructor for CreateLogGroupRequest object.
|
CreateLogGroupRequest(java.lang.String logGroupName)
Constructs a new CreateLogGroupRequest object.
|
Modifier and Type | Method and Description |
---|---|
CreateLogGroupRequest |
addtagsEntry(java.lang.String key,
java.lang.String value)
The key-value pairs to use for the tags.
|
CreateLogGroupRequest |
cleartagsEntries()
Removes all the entries added into tags.
|
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.
|
java.util.Map<java.lang.String,java.lang.String> |
getTags()
The key-value pairs to use for the tags.
|
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.
|
void |
setTags(java.util.Map<java.lang.String,java.lang.String> tags)
The key-value pairs to use for the tags.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateLogGroupRequest |
withKmsKeyId(java.lang.String kmsKeyId)
The Amazon Resource Name (ARN) of the CMK to use when encrypting log
data.
|
CreateLogGroupRequest |
withLogGroupName(java.lang.String logGroupName)
The name of the log group.
|
CreateLogGroupRequest |
withTags(java.util.Map<java.lang.String,java.lang.String> tags)
The key-value pairs to use for the tags.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public CreateLogGroupRequest()
public CreateLogGroupRequest(java.lang.String logGroupName)
logGroupName
- The name of the log group.
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 CreateLogGroupRequest 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 CreateLogGroupRequest 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.util.Map<java.lang.String,java.lang.String> getTags()
The key-value pairs to use for the tags.
The key-value pairs to use for the tags.
public void setTags(java.util.Map<java.lang.String,java.lang.String> tags)
The key-value pairs to use for the tags.
tags
- The key-value pairs to use for the tags.
public CreateLogGroupRequest withTags(java.util.Map<java.lang.String,java.lang.String> tags)
The key-value pairs to use for the tags.
Returns a reference to this object so that method calls can be chained together.
tags
- The key-value pairs to use for the tags.
public CreateLogGroupRequest addtagsEntry(java.lang.String key, java.lang.String value)
The key-value pairs to use for the tags.
The method adds a new key-value pair into tags parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into tags.value
- The corresponding value of the entry to be added into tags.public CreateLogGroupRequest cleartagsEntries()
Returns a reference to this object so that method calls can be chained together.
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.