public class PutRetentionPolicyRequest extends AmazonWebServiceRequest implements Serializable
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 |
---|---|
boolean |
equals(Object obj) |
String |
getLogGroupName()
Returns the value of the LogGroupName property for this object.
|
Integer |
getRetentionInDays()
Specifies the number of days you want to retain log events in the
specified log group.
|
int |
hashCode() |
void |
setLogGroupName(String logGroupName)
Sets the value of the LogGroupName property for this object.
|
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)
Sets the value of the LogGroupName property for this object.
|
PutRetentionPolicyRequest |
withRetentionInDays(Integer retentionInDays)
Specifies the number of days you want to retain log events in the
specified log group.
|
copyPrivateRequestParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public PutRetentionPolicyRequest()
public PutRetentionPolicyRequest(String logGroupName, Integer retentionInDays)
logGroupName
- 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, 547, 730.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 new value for the LogGroupName property for this object.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 new value for the LogGroupName property for this object.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, 547, 730.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, 547, 730.public String toString()
toString
in class Object
Object.toString()
Copyright © 2014. All rights reserved.