@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Schedule extends Object implements Serializable, Cloneable, StructuredPojo
[Custom snapshot and AMI policies only] Specifies a schedule for a snapshot or AMI lifecycle policy.
Constructor and Description |
---|
Schedule() |
Modifier and Type | Method and Description |
---|---|
Schedule |
clone() |
boolean |
equals(Object obj) |
ArchiveRule |
getArchiveRule()
[Custom snapshot policies that target volumes only] The snapshot archiving rule for the schedule.
|
Boolean |
getCopyTags()
Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
|
CreateRule |
getCreateRule()
The creation rule.
|
List<CrossRegionCopyRule> |
getCrossRegionCopyRules()
Specifies a rule for copying snapshots or AMIs across regions.
|
DeprecateRule |
getDeprecateRule()
[Custom AMI policies only] The AMI deprecation rule for the schedule.
|
FastRestoreRule |
getFastRestoreRule()
[Custom snapshot policies only] The rule for enabling fast snapshot restore.
|
String |
getName()
The name of the schedule.
|
RetainRule |
getRetainRule()
The retention rule for snapshots or AMIs created by the policy.
|
List<ShareRule> |
getShareRules()
[Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.
|
List<Tag> |
getTagsToAdd()
The tags to apply to policy-created resources.
|
List<Tag> |
getVariableTags()
[AMI policies and snapshot policies that target instances only] A collection of key/value pairs with
values determined dynamically when the policy is executed.
|
int |
hashCode() |
Boolean |
isCopyTags()
Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setArchiveRule(ArchiveRule archiveRule)
[Custom snapshot policies that target volumes only] The snapshot archiving rule for the schedule.
|
void |
setCopyTags(Boolean copyTags)
Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
|
void |
setCreateRule(CreateRule createRule)
The creation rule.
|
void |
setCrossRegionCopyRules(Collection<CrossRegionCopyRule> crossRegionCopyRules)
Specifies a rule for copying snapshots or AMIs across regions.
|
void |
setDeprecateRule(DeprecateRule deprecateRule)
[Custom AMI policies only] The AMI deprecation rule for the schedule.
|
void |
setFastRestoreRule(FastRestoreRule fastRestoreRule)
[Custom snapshot policies only] The rule for enabling fast snapshot restore.
|
void |
setName(String name)
The name of the schedule.
|
void |
setRetainRule(RetainRule retainRule)
The retention rule for snapshots or AMIs created by the policy.
|
void |
setShareRules(Collection<ShareRule> shareRules)
[Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.
|
void |
setTagsToAdd(Collection<Tag> tagsToAdd)
The tags to apply to policy-created resources.
|
void |
setVariableTags(Collection<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.
|
String |
toString()
Returns a string representation of this object.
|
Schedule |
withArchiveRule(ArchiveRule archiveRule)
[Custom snapshot policies that target volumes only] The snapshot archiving rule for the schedule.
|
Schedule |
withCopyTags(Boolean copyTags)
Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
|
Schedule |
withCreateRule(CreateRule createRule)
The creation rule.
|
Schedule |
withCrossRegionCopyRules(Collection<CrossRegionCopyRule> crossRegionCopyRules)
Specifies a rule for copying snapshots or AMIs across regions.
|
Schedule |
withCrossRegionCopyRules(CrossRegionCopyRule... crossRegionCopyRules)
Specifies a rule for copying snapshots or AMIs across regions.
|
Schedule |
withDeprecateRule(DeprecateRule deprecateRule)
[Custom AMI policies only] The AMI deprecation rule for the schedule.
|
Schedule |
withFastRestoreRule(FastRestoreRule fastRestoreRule)
[Custom snapshot policies only] The rule for enabling fast snapshot restore.
|
Schedule |
withName(String name)
The name of the schedule.
|
Schedule |
withRetainRule(RetainRule retainRule)
The retention rule for snapshots or AMIs created by the policy.
|
Schedule |
withShareRules(Collection<ShareRule> shareRules)
[Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.
|
Schedule |
withShareRules(ShareRule... shareRules)
[Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.
|
Schedule |
withTagsToAdd(Collection<Tag> tagsToAdd)
The tags to apply to policy-created resources.
|
Schedule |
withTagsToAdd(Tag... tagsToAdd)
The tags to apply to policy-created resources.
|
Schedule |
withVariableTags(Collection<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.
|
Schedule |
withVariableTags(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.
|
public void setName(String name)
The name of the schedule.
name
- The name of the schedule.public String getName()
The name of the schedule.
public Schedule withName(String name)
The name of the schedule.
name
- The name of the schedule.public void setCopyTags(Boolean copyTags)
Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
copyTags
- Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.public Boolean getCopyTags()
Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
public Schedule withCopyTags(Boolean copyTags)
Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
copyTags
- Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.public Boolean isCopyTags()
Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
public List<Tag> getTagsToAdd()
The tags to apply to policy-created resources. These user-defined tags are in addition to the Amazon Web Services-added lifecycle tags.
public void setTagsToAdd(Collection<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.
tagsToAdd
- The tags to apply to policy-created resources. These user-defined tags are in addition to the Amazon Web
Services-added lifecycle tags.public Schedule withTagsToAdd(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.
NOTE: This method appends the values to the existing list (if any). Use
setTagsToAdd(java.util.Collection)
or withTagsToAdd(java.util.Collection)
if you want to
override the existing values.
tagsToAdd
- The tags to apply to policy-created resources. These user-defined tags are in addition to the Amazon Web
Services-added lifecycle tags.public Schedule withTagsToAdd(Collection<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.
tagsToAdd
- The tags to apply to policy-created resources. These user-defined tags are in addition to the Amazon Web
Services-added lifecycle tags.public List<Tag> getVariableTags()
[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.
$(instance-id)
or
$(timestamp)
. Variable tags are only valid for EBS Snapshot Management – Instance policies.public void setVariableTags(Collection<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.
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.public Schedule withVariableTags(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.
NOTE: This method appends the values to the existing list (if any). Use
setVariableTags(java.util.Collection)
or withVariableTags(java.util.Collection)
if you want to
override the existing values.
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.public Schedule withVariableTags(Collection<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.
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.public void setCreateRule(CreateRule createRule)
The creation rule.
createRule
- The creation rule.public CreateRule getCreateRule()
The creation rule.
public Schedule withCreateRule(CreateRule createRule)
The creation rule.
createRule
- The creation rule.public void setRetainRule(RetainRule retainRule)
The retention rule for snapshots or AMIs created by the policy.
retainRule
- The retention rule for snapshots or AMIs created by the policy.public RetainRule getRetainRule()
The retention rule for snapshots or AMIs created by the policy.
public Schedule withRetainRule(RetainRule retainRule)
The retention rule for snapshots or AMIs created by the policy.
retainRule
- The retention rule for snapshots or AMIs created by the policy.public void setFastRestoreRule(FastRestoreRule fastRestoreRule)
[Custom snapshot policies only] The rule for enabling fast snapshot restore.
fastRestoreRule
- [Custom snapshot policies only] The rule for enabling fast snapshot restore.public FastRestoreRule getFastRestoreRule()
[Custom snapshot policies only] The rule for enabling fast snapshot restore.
public Schedule withFastRestoreRule(FastRestoreRule fastRestoreRule)
[Custom snapshot policies only] The rule for enabling fast snapshot restore.
fastRestoreRule
- [Custom snapshot policies only] The rule for enabling fast snapshot restore.public List<CrossRegionCopyRule> getCrossRegionCopyRules()
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.
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 void setCrossRegionCopyRules(Collection<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.
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.
public Schedule withCrossRegionCopyRules(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.
NOTE: This method appends the values to the existing list (if any). Use
setCrossRegionCopyRules(java.util.Collection)
or withCrossRegionCopyRules(java.util.Collection)
if you want to override the existing values.
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.
public Schedule withCrossRegionCopyRules(Collection<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.
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.
public List<ShareRule> getShareRules()
[Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.
public void setShareRules(Collection<ShareRule> shareRules)
[Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.
shareRules
- [Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services
accounts.public Schedule withShareRules(ShareRule... shareRules)
[Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.
NOTE: This method appends the values to the existing list (if any). Use
setShareRules(java.util.Collection)
or withShareRules(java.util.Collection)
if you want to
override the existing values.
shareRules
- [Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services
accounts.public Schedule withShareRules(Collection<ShareRule> shareRules)
[Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.
shareRules
- [Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services
accounts.public void setDeprecateRule(DeprecateRule deprecateRule)
[Custom AMI policies only] The AMI deprecation rule for the schedule.
deprecateRule
- [Custom AMI policies only] The AMI deprecation rule for the schedule.public DeprecateRule getDeprecateRule()
[Custom AMI policies only] The AMI deprecation rule for the schedule.
public Schedule withDeprecateRule(DeprecateRule deprecateRule)
[Custom AMI policies only] The AMI deprecation rule for the schedule.
deprecateRule
- [Custom AMI policies only] The AMI deprecation rule for the schedule.public void setArchiveRule(ArchiveRule archiveRule)
[Custom 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.
archiveRule
- [Custom 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.
public ArchiveRule getArchiveRule()
[Custom 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 withArchiveRule(ArchiveRule archiveRule)
[Custom 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.
archiveRule
- [Custom 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.
public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.