@Generated(value="software.amazon.awssdk:codegen") public final class Schedule extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Schedule.Builder,Schedule>
[Snapshot and AMI policies only] Specifies a schedule for a snapshot or AMI lifecycle policy.
| Modifier and Type | Class and Description |
|---|---|
static interface |
Schedule.Builder |
| Modifier and Type | Method and Description |
|---|---|
ArchiveRule |
archiveRule()
[Snapshot policies that target volumes only] The snapshot archiving rule for the schedule.
|
static Schedule.Builder |
builder() |
Boolean |
copyTags()
Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
|
CreateRule |
createRule()
The creation rule.
|
List<CrossRegionCopyRule> |
crossRegionCopyRules()
Specifies a rule for copying snapshots or AMIs across regions.
|
DeprecateRule |
deprecateRule()
[AMI policies only] The AMI deprecation rule for the schedule.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
FastRestoreRule |
fastRestoreRule()
[Snapshot policies only] The rule for enabling fast snapshot restore.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasCrossRegionCopyRules()
For responses, this returns true if the service returned a value for the CrossRegionCopyRules property.
|
int |
hashCode() |
boolean |
hasShareRules()
For responses, this returns true if the service returned a value for the ShareRules property.
|
boolean |
hasTagsToAdd()
For responses, this returns true if the service returned a value for the TagsToAdd property.
|
boolean |
hasVariableTags()
For responses, this returns true if the service returned a value for the VariableTags property.
|
String |
name()
The name of the schedule.
|
RetainRule |
retainRule()
The retention rule for snapshots or AMIs created by the policy.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends Schedule.Builder> |
serializableBuilderClass() |
List<ShareRule> |
shareRules()
[Snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.
|
List<Tag> |
tagsToAdd()
The tags to apply to policy-created resources.
|
Schedule.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
List<Tag> |
variableTags()
[AMI policies and snapshot policies that target instances only] A collection of key/value pairs with
values determined dynamically when the policy is executed.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final String name()
The name of the schedule.
public final Boolean copyTags()
Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
public final boolean hasTagsToAdd()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final List<Tag> tagsToAdd()
The tags to apply to policy-created resources. These user-defined tags are in addition to the Amazon Web Services-added lifecycle tags.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasTagsToAdd() method.
public final boolean hasVariableTags()
isEmpty() method on the property).
This is useful because the SDK will never return a null collection or map, but you may need to differentiate
between the service returning nothing (or null) and the service returning an empty collection or map. For
requests, this returns true if a value for the property was specified in the request builder, and false if a
value was not specified.public final List<Tag> variableTags()
[AMI policies and snapshot policies that target instances only] A collection of key/value pairs with
values determined dynamically when the policy is executed. Keys may be any valid Amazon EC2 tag key. Values must
be in one of the two following formats: $(instance-id) or $(timestamp). Variable tags
are only valid for EBS Snapshot Management – Instance policies.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasVariableTags() method.
$(instance-id) or
$(timestamp). Variable tags are only valid for EBS Snapshot Management – Instance policies.public final CreateRule createRule()
The creation rule.
public final RetainRule retainRule()
The retention rule for snapshots or AMIs created by the policy.
public final FastRestoreRule fastRestoreRule()
[Snapshot policies only] The rule for enabling fast snapshot restore.
public final boolean hasCrossRegionCopyRules()
isEmpty() method on the property).
This is useful because the SDK will never return a null collection or map, but you may need to differentiate
between the service returning nothing (or null) and the service returning an empty collection or map. For
requests, this returns true if a value for the property was specified in the request builder, and false if a
value was not specified.public final List<CrossRegionCopyRule> crossRegionCopyRules()
Specifies a rule for copying snapshots or AMIs across regions.
You can't specify cross-Region copy rules for policies that create snapshots on an Outpost. If the policy creates snapshots in a Region, then snapshots can be copied to up to three Regions or Outposts.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasCrossRegionCopyRules() method.
You can't specify cross-Region copy rules for policies that create snapshots on an Outpost. If the policy creates snapshots in a Region, then snapshots can be copied to up to three Regions or Outposts.
public final boolean hasShareRules()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final List<ShareRule> shareRules()
[Snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasShareRules() method.
public final DeprecateRule deprecateRule()
[AMI policies only] The AMI deprecation rule for the schedule.
public final ArchiveRule archiveRule()
[Snapshot policies that target volumes only] The snapshot archiving rule for the schedule. When you specify an archiving rule, snapshots are automatically moved from the standard tier to the archive tier once the schedule's retention threshold is met. Snapshots are then retained in the archive tier for the archive retention period that you specify.
For more information about using snapshot archiving, see Considerations for snapshot lifecycle policies.
For more information about using snapshot archiving, see Considerations for snapshot lifecycle policies.
public Schedule.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<Schedule.Builder,Schedule>public static Schedule.Builder builder()
public static Class<? extends Schedule.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2023. All rights reserved.