@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class RetainRule extends Object implements Serializable, Cloneable, StructuredPojo
Specifies the retention rule for a lifecycle policy. You can retain snapshots based on either a count or a time interval.
| Constructor and Description |
|---|
RetainRule() |
| Modifier and Type | Method and Description |
|---|---|
RetainRule |
clone() |
boolean |
equals(Object obj) |
Integer |
getCount()
The number of snapshots to retain for each volume, up to a maximum of 1000.
|
Integer |
getInterval()
The amount of time to retain each snapshot.
|
String |
getIntervalUnit()
The unit of time for time-based retention.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller) |
void |
setCount(Integer count)
The number of snapshots to retain for each volume, up to a maximum of 1000.
|
void |
setInterval(Integer interval)
The amount of time to retain each snapshot.
|
void |
setIntervalUnit(String intervalUnit)
The unit of time for time-based retention.
|
String |
toString()
Returns a string representation of this object.
|
RetainRule |
withCount(Integer count)
The number of snapshots to retain for each volume, up to a maximum of 1000.
|
RetainRule |
withInterval(Integer interval)
The amount of time to retain each snapshot.
|
RetainRule |
withIntervalUnit(RetentionIntervalUnitValues intervalUnit)
The unit of time for time-based retention.
|
RetainRule |
withIntervalUnit(String intervalUnit)
The unit of time for time-based retention.
|
public void setCount(Integer count)
The number of snapshots to retain for each volume, up to a maximum of 1000.
count - The number of snapshots to retain for each volume, up to a maximum of 1000.public Integer getCount()
The number of snapshots to retain for each volume, up to a maximum of 1000.
public RetainRule withCount(Integer count)
The number of snapshots to retain for each volume, up to a maximum of 1000.
count - The number of snapshots to retain for each volume, up to a maximum of 1000.public void setInterval(Integer interval)
The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.
interval - The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months,
5200 weeks, or 36500 days.public Integer getInterval()
The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.
public RetainRule withInterval(Integer interval)
The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.
interval - The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months,
5200 weeks, or 36500 days.public void setIntervalUnit(String intervalUnit)
The unit of time for time-based retention.
intervalUnit - The unit of time for time-based retention.RetentionIntervalUnitValuespublic String getIntervalUnit()
The unit of time for time-based retention.
RetentionIntervalUnitValuespublic RetainRule withIntervalUnit(String intervalUnit)
The unit of time for time-based retention.
intervalUnit - The unit of time for time-based retention.RetentionIntervalUnitValuespublic RetainRule withIntervalUnit(RetentionIntervalUnitValues intervalUnit)
The unit of time for time-based retention.
intervalUnit - The unit of time for time-based retention.RetentionIntervalUnitValuespublic String toString()
toString in class ObjectObject.toString()public RetainRule clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
marshall in interface StructuredPojoCopyright © 2019. All rights reserved.