public class PutRetentionPolicyRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
PutRetentionPolicy operation
.
Sets the retention of the specified log group. A retention policy allows you to configure the number of days you want to retain log events in the specified log group.
NOOP
Constructor and Description |
---|
PutRetentionPolicyRequest()
Default constructor for a new PutRetentionPolicyRequest object.
|
PutRetentionPolicyRequest(String logGroupName,
Integer retentionInDays)
Constructs a new PutRetentionPolicyRequest object.
|
Modifier and Type | Method and Description |
---|---|
PutRetentionPolicyRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(Object obj) |
String |
getLogGroupName()
The name of the log group to associate the retention policy with.
|
Integer |
getRetentionInDays()
Specifies the number of days you want to retain log events in the
specified log group.
|
int |
hashCode() |
void |
setLogGroupName(String logGroupName)
The name of the log group to associate the retention policy with.
|
void |
setRetentionInDays(Integer retentionInDays)
Specifies the number of days you want to retain log events in the
specified log group.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
PutRetentionPolicyRequest |
withLogGroupName(String logGroupName)
The name of the log group to associate the retention policy with.
|
PutRetentionPolicyRequest |
withRetentionInDays(Integer retentionInDays)
Specifies the number of days you want to retain log events in the
specified log group.
|
copyBaseTo, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public PutRetentionPolicyRequest()
public PutRetentionPolicyRequest(String logGroupName, Integer retentionInDays)
logGroupName
- The name of the log group to associate the
retention policy with.retentionInDays
- Specifies the number of days you want to retain
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, 3653.public String getLogGroupName()
Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+
public void setLogGroupName(String logGroupName)
Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+
logGroupName
- The name of the log group to associate the retention policy with.public PutRetentionPolicyRequest withLogGroupName(String logGroupName)
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 to associate the retention policy with.public Integer getRetentionInDays()
public void setRetentionInDays(Integer retentionInDays)
retentionInDays
- Specifies the number of days you want to retain 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, 3653.public PutRetentionPolicyRequest withRetentionInDays(Integer retentionInDays)
Returns a reference to this object so that method calls can be chained together.
retentionInDays
- Specifies the number of days you want to retain 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, 3653.public String toString()
toString
in class Object
Object.toString()
public PutRetentionPolicyRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()
Copyright © 2015. All rights reserved.