@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class CrossRegionCopyRetainRule extends Object implements Serializable, Cloneable, StructuredPojo
Specifies a retention rule for cross-Region snapshot copies created by snapshot or event-based policies, or cross-Region AMI copies created by AMI policies. After the retention period expires, the cross-Region copy is deleted.
| Constructor and Description |
|---|
CrossRegionCopyRetainRule() |
| Modifier and Type | Method and Description |
|---|---|
CrossRegionCopyRetainRule |
clone() |
boolean |
equals(Object obj) |
Integer |
getInterval()
The amount of time to retain a cross-Region snapshot or AMI copy.
|
String |
getIntervalUnit()
The unit of time for time-based retention.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller. |
void |
setInterval(Integer interval)
The amount of time to retain a cross-Region snapshot or AMI copy.
|
void |
setIntervalUnit(String intervalUnit)
The unit of time for time-based retention.
|
String |
toString()
Returns a string representation of this object.
|
CrossRegionCopyRetainRule |
withInterval(Integer interval)
The amount of time to retain a cross-Region snapshot or AMI copy.
|
CrossRegionCopyRetainRule |
withIntervalUnit(RetentionIntervalUnitValues intervalUnit)
The unit of time for time-based retention.
|
CrossRegionCopyRetainRule |
withIntervalUnit(String intervalUnit)
The unit of time for time-based retention.
|
public void setInterval(Integer interval)
The amount of time to retain a cross-Region snapshot or AMI copy. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.
interval - The amount of time to retain a cross-Region snapshot or AMI copy. 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 a cross-Region snapshot or AMI copy. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.
public CrossRegionCopyRetainRule withInterval(Integer interval)
The amount of time to retain a cross-Region snapshot or AMI copy. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.
interval - The amount of time to retain a cross-Region snapshot or AMI copy. 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. For example, to retain a cross-Region copy for 3 months, specify
Interval=3 and IntervalUnit=MONTHS.
intervalUnit - The unit of time for time-based retention. For example, to retain a cross-Region copy for 3 months,
specify Interval=3 and IntervalUnit=MONTHS.RetentionIntervalUnitValuespublic String getIntervalUnit()
The unit of time for time-based retention. For example, to retain a cross-Region copy for 3 months, specify
Interval=3 and IntervalUnit=MONTHS.
Interval=3 and IntervalUnit=MONTHS.RetentionIntervalUnitValuespublic CrossRegionCopyRetainRule withIntervalUnit(String intervalUnit)
The unit of time for time-based retention. For example, to retain a cross-Region copy for 3 months, specify
Interval=3 and IntervalUnit=MONTHS.
intervalUnit - The unit of time for time-based retention. For example, to retain a cross-Region copy for 3 months,
specify Interval=3 and IntervalUnit=MONTHS.RetentionIntervalUnitValuespublic CrossRegionCopyRetainRule withIntervalUnit(RetentionIntervalUnitValues intervalUnit)
The unit of time for time-based retention. For example, to retain a cross-Region copy for 3 months, specify
Interval=3 and IntervalUnit=MONTHS.
intervalUnit - The unit of time for time-based retention. For example, to retain a cross-Region copy for 3 months,
specify Interval=3 and IntervalUnit=MONTHS.RetentionIntervalUnitValuespublic String toString()
toString in class ObjectObject.toString()public CrossRegionCopyRetainRule clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojoProtocolMarshaller.marshall in interface StructuredPojoprotocolMarshaller - Implementation of ProtocolMarshaller used to marshall this object's data.