@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class DeprecateRule extends Object implements Serializable, Cloneable, StructuredPojo
[Custom AMI policies only] Specifies an AMI deprecation rule for AMIs created by an AMI lifecycle policy.
For age-based schedules, you must specify Interval and IntervalUnit. For count-based schedules, you must specify Count.
Constructor and Description |
---|
DeprecateRule() |
Modifier and Type | Method and Description |
---|---|
DeprecateRule |
clone() |
boolean |
equals(Object obj) |
Integer |
getCount()
If the schedule has a count-based retention rule, this parameter specifies the number of oldest AMIs to
deprecate.
|
Integer |
getInterval()
If the schedule has an age-based retention rule, this parameter specifies the period after which to deprecate
AMIs created by the schedule.
|
String |
getIntervalUnit()
The unit of time in which to measure the Interval.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setCount(Integer count)
If the schedule has a count-based retention rule, this parameter specifies the number of oldest AMIs to
deprecate.
|
void |
setInterval(Integer interval)
If the schedule has an age-based retention rule, this parameter specifies the period after which to deprecate
AMIs created by the schedule.
|
void |
setIntervalUnit(String intervalUnit)
The unit of time in which to measure the Interval.
|
String |
toString()
Returns a string representation of this object.
|
DeprecateRule |
withCount(Integer count)
If the schedule has a count-based retention rule, this parameter specifies the number of oldest AMIs to
deprecate.
|
DeprecateRule |
withInterval(Integer interval)
If the schedule has an age-based retention rule, this parameter specifies the period after which to deprecate
AMIs created by the schedule.
|
DeprecateRule |
withIntervalUnit(RetentionIntervalUnitValues intervalUnit)
The unit of time in which to measure the Interval.
|
DeprecateRule |
withIntervalUnit(String intervalUnit)
The unit of time in which to measure the Interval.
|
public void setCount(Integer count)
If the schedule has a count-based retention rule, this parameter specifies the number of oldest AMIs to deprecate. The count must be less than or equal to the schedule's retention count, and it can't be greater than 1000.
count
- If the schedule has a count-based retention rule, this parameter specifies the number of oldest AMIs to
deprecate. The count must be less than or equal to the schedule's retention count, and it can't be greater
than 1000.public Integer getCount()
If the schedule has a count-based retention rule, this parameter specifies the number of oldest AMIs to deprecate. The count must be less than or equal to the schedule's retention count, and it can't be greater than 1000.
public DeprecateRule withCount(Integer count)
If the schedule has a count-based retention rule, this parameter specifies the number of oldest AMIs to deprecate. The count must be less than or equal to the schedule's retention count, and it can't be greater than 1000.
count
- If the schedule has a count-based retention rule, this parameter specifies the number of oldest AMIs to
deprecate. The count must be less than or equal to the schedule's retention count, and it can't be greater
than 1000.public void setInterval(Integer interval)
If the schedule has an age-based retention rule, this parameter specifies the period after which to deprecate AMIs created by the schedule. The period must be less than or equal to the schedule's retention period, and it can't be greater than 10 years. This is equivalent to 120 months, 520 weeks, or 3650 days.
interval
- If the schedule has an age-based retention rule, this parameter specifies the period after which to
deprecate AMIs created by the schedule. The period must be less than or equal to the schedule's retention
period, and it can't be greater than 10 years. This is equivalent to 120 months, 520 weeks, or 3650 days.public Integer getInterval()
If the schedule has an age-based retention rule, this parameter specifies the period after which to deprecate AMIs created by the schedule. The period must be less than or equal to the schedule's retention period, and it can't be greater than 10 years. This is equivalent to 120 months, 520 weeks, or 3650 days.
public DeprecateRule withInterval(Integer interval)
If the schedule has an age-based retention rule, this parameter specifies the period after which to deprecate AMIs created by the schedule. The period must be less than or equal to the schedule's retention period, and it can't be greater than 10 years. This is equivalent to 120 months, 520 weeks, or 3650 days.
interval
- If the schedule has an age-based retention rule, this parameter specifies the period after which to
deprecate AMIs created by the schedule. The period must be less than or equal to the schedule's retention
period, and it can't be greater than 10 years. This is equivalent to 120 months, 520 weeks, or 3650 days.public void setIntervalUnit(String intervalUnit)
The unit of time in which to measure the Interval.
intervalUnit
- The unit of time in which to measure the Interval.RetentionIntervalUnitValues
public String getIntervalUnit()
The unit of time in which to measure the Interval.
RetentionIntervalUnitValues
public DeprecateRule withIntervalUnit(String intervalUnit)
The unit of time in which to measure the Interval.
intervalUnit
- The unit of time in which to measure the Interval.RetentionIntervalUnitValues
public DeprecateRule withIntervalUnit(RetentionIntervalUnitValues intervalUnit)
The unit of time in which to measure the Interval.
intervalUnit
- The unit of time in which to measure the Interval.RetentionIntervalUnitValues
public String toString()
toString
in class Object
Object.toString()
public DeprecateRule clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.