public class PutRetentionPolicyRequest extends AmazonWebServiceRequest implements java.io.Serializable
Sets the retention of the specified log group. A retention policy allows you to configure the number of days for which to retain log events in the specified log group.
Constructor and Description |
---|
PutRetentionPolicyRequest()
Default constructor for PutRetentionPolicyRequest object.
|
PutRetentionPolicyRequest(java.lang.String logGroupName,
java.lang.Integer retentionInDays)
Constructs a new PutRetentionPolicyRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getLogGroupName()
The name of the log group.
|
java.lang.Integer |
getRetentionInDays()
The number of days to retain the log events in the specified log group.
|
int |
hashCode() |
void |
setLogGroupName(java.lang.String logGroupName)
The name of the log group.
|
void |
setRetentionInDays(java.lang.Integer retentionInDays)
The number of days to retain the log events in the specified log group.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
PutRetentionPolicyRequest |
withLogGroupName(java.lang.String logGroupName)
The name of the log group.
|
PutRetentionPolicyRequest |
withRetentionInDays(java.lang.Integer retentionInDays)
The number of days to retain the log events in the specified log group.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public PutRetentionPolicyRequest()
public PutRetentionPolicyRequest(java.lang.String logGroupName, java.lang.Integer retentionInDays)
logGroupName
- The name of the log group.
retentionInDays
- The number of days to retain the log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.
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 PutRetentionPolicyRequest 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.Integer getRetentionInDays()
The number of days to retain the log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.
The number of days to retain the log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.
public void setRetentionInDays(java.lang.Integer retentionInDays)
The number of days to retain the log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.
retentionInDays
- The number of days to retain the log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.
public PutRetentionPolicyRequest withRetentionInDays(java.lang.Integer retentionInDays)
The number of days to retain the log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.
Returns a reference to this object so that method calls can be chained together.
retentionInDays
- The number of days to retain the log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.
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.