@Generated(value="software.amazon.awssdk:codegen") public final class DeprecateRule extends Object implements SdkPojo, Serializable, ToCopyableBuilder<DeprecateRule.Builder,DeprecateRule>
[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.
| Modifier and Type | Class and Description |
|---|---|
static interface |
DeprecateRule.Builder |
| Modifier and Type | Method and Description |
|---|---|
static DeprecateRule.Builder |
builder() |
Integer |
count()
If the schedule has a count-based retention rule, this parameter specifies the number of oldest AMIs to
deprecate.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
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.
|
RetentionIntervalUnitValues |
intervalUnit()
The unit of time in which to measure the Interval.
|
String |
intervalUnitAsString()
The unit of time in which to measure the Interval.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends DeprecateRule.Builder> |
serializableBuilderClass() |
DeprecateRule.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final 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.
public final 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.
public final RetentionIntervalUnitValues intervalUnit()
The unit of time in which to measure the Interval.
If the service returns an enum value that is not available in the current SDK version, intervalUnit will
return RetentionIntervalUnitValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is
available from intervalUnitAsString().
RetentionIntervalUnitValuespublic final String intervalUnitAsString()
The unit of time in which to measure the Interval.
If the service returns an enum value that is not available in the current SDK version, intervalUnit will
return RetentionIntervalUnitValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is
available from intervalUnitAsString().
RetentionIntervalUnitValuespublic DeprecateRule.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<DeprecateRule.Builder,DeprecateRule>public static DeprecateRule.Builder builder()
public static Class<? extends DeprecateRule.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2023. All rights reserved.