@Generated(value="software.amazon.awssdk:codegen") public final class RetainRule extends Object implements SdkPojo, Serializable, ToCopyableBuilder<RetainRule.Builder,RetainRule>
Specifies the retention rule for a lifecycle policy. You can retain snapshots based on either a count or a time interval.
| Modifier and Type | Class and Description |
|---|---|
static interface |
RetainRule.Builder |
| Modifier and Type | Method and Description |
|---|---|
static RetainRule.Builder |
builder() |
Integer |
count()
The number of snapshots to retain for each volume, up to a maximum of 1000.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
Integer |
interval()
The amount of time to retain each snapshot.
|
RetentionIntervalUnitValues |
intervalUnit()
The unit of time for time-based retention.
|
String |
intervalUnitAsString()
The unit of time for time-based retention.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends RetainRule.Builder> |
serializableBuilderClass() |
RetainRule.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final Integer count()
The number of snapshots to retain for each volume, up to a maximum of 1000.
public final 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.
public final RetentionIntervalUnitValues intervalUnit()
The unit of time for time-based retention.
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 for time-based retention.
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 RetainRule.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<RetainRule.Builder,RetainRule>public static RetainRule.Builder builder()
public static Class<? extends RetainRule.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2022. All rights reserved.