Interface Schedule.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<Schedule.Builder,
,Schedule> SdkBuilder<Schedule.Builder,
,Schedule> SdkPojo
- Enclosing class:
Schedule
-
Method Summary
Modifier and TypeMethodDescriptiondefault Schedule.Builder
archiveRule
(Consumer<ArchiveRule.Builder> archiveRule) [Custom snapshot policies that target volumes only] The snapshot archiving rule for the schedule.archiveRule
(ArchiveRule archiveRule) [Custom snapshot policies that target volumes only] The snapshot archiving rule for the schedule.Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.default Schedule.Builder
createRule
(Consumer<CreateRule.Builder> createRule) The creation rule.createRule
(CreateRule createRule) The creation rule.crossRegionCopyRules
(Collection<CrossRegionCopyRule> crossRegionCopyRules) Specifies a rule for copying snapshots or AMIs across regions.crossRegionCopyRules
(Consumer<CrossRegionCopyRule.Builder>... crossRegionCopyRules) Specifies a rule for copying snapshots or AMIs across regions.crossRegionCopyRules
(CrossRegionCopyRule... crossRegionCopyRules) Specifies a rule for copying snapshots or AMIs across regions.default Schedule.Builder
deprecateRule
(Consumer<DeprecateRule.Builder> deprecateRule) [Custom AMI policies only] The AMI deprecation rule for the schedule.deprecateRule
(DeprecateRule deprecateRule) [Custom AMI policies only] The AMI deprecation rule for the schedule.default Schedule.Builder
fastRestoreRule
(Consumer<FastRestoreRule.Builder> fastRestoreRule) [Custom snapshot policies only] The rule for enabling fast snapshot restore.fastRestoreRule
(FastRestoreRule fastRestoreRule) [Custom snapshot policies only] The rule for enabling fast snapshot restore.The name of the schedule.default Schedule.Builder
retainRule
(Consumer<RetainRule.Builder> retainRule) The retention rule for snapshots or AMIs created by the policy.retainRule
(RetainRule retainRule) The retention rule for snapshots or AMIs created by the policy.shareRules
(Collection<ShareRule> shareRules) [Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.shareRules
(Consumer<ShareRule.Builder>... shareRules) [Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.shareRules
(ShareRule... shareRules) [Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.tagsToAdd
(Collection<Tag> tagsToAdd) The tags to apply to policy-created resources.tagsToAdd
(Consumer<Tag.Builder>... tagsToAdd) The tags to apply to policy-created resources.The tags to apply to policy-created resources.variableTags
(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.variableTags
(Consumer<Tag.Builder>... 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.variableTags
(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.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
name
The name of the schedule.
- Parameters:
name
- The name of the schedule.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
copyTags
Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
- Parameters:
copyTags
- Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tagsToAdd
The tags to apply to policy-created resources. These user-defined tags are in addition to the Amazon Web Services-added lifecycle tags.
- Parameters:
tagsToAdd
- The tags to apply to policy-created resources. These user-defined tags are in addition to the Amazon Web Services-added lifecycle tags.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tagsToAdd
The tags to apply to policy-created resources. These user-defined tags are in addition to the Amazon Web Services-added lifecycle tags.
- Parameters:
tagsToAdd
- The tags to apply to policy-created resources. These user-defined tags are in addition to the Amazon Web Services-added lifecycle tags.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tagsToAdd
The tags to apply to policy-created resources. These user-defined tags are in addition to the Amazon Web Services-added lifecycle tags.
This is a convenience method that creates an instance of theTag.Builder
avoiding the need to create one manually viaTag.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed totagsToAdd(List<Tag>)
.- Parameters:
tagsToAdd
- a consumer that will call methods onTag.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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.- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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.- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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:
This is a convenience method that creates an instance of the$(instance-id)
or$(timestamp)
. Variable tags are only valid for EBS Snapshot Management – Instance policies.Tag.Builder
avoiding the need to create one manually viaTag.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tovariableTags(List<Tag>)
.- Parameters:
variableTags
- a consumer that will call methods onTag.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
createRule
The creation rule.
- Parameters:
createRule
- The creation rule.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
createRule
The creation rule.
This is a convenience method that creates an instance of theCreateRule.Builder
avoiding the need to create one manually viaCreateRule.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tocreateRule(CreateRule)
.- Parameters:
createRule
- a consumer that will call methods onCreateRule.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
retainRule
The retention rule for snapshots or AMIs created by the policy.
- Parameters:
retainRule
- The retention rule for snapshots or AMIs created by the policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
retainRule
The retention rule for snapshots or AMIs created by the policy.
This is a convenience method that creates an instance of theRetainRule.Builder
avoiding the need to create one manually viaRetainRule.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toretainRule(RetainRule)
.- Parameters:
retainRule
- a consumer that will call methods onRetainRule.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
fastRestoreRule
[Custom snapshot policies only] The rule for enabling fast snapshot restore.
- Parameters:
fastRestoreRule
- [Custom snapshot policies only] The rule for enabling fast snapshot restore.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
fastRestoreRule
[Custom snapshot policies only] The rule for enabling fast snapshot restore.
This is a convenience method that creates an instance of theFastRestoreRule.Builder
avoiding the need to create one manually viaFastRestoreRule.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tofastRestoreRule(FastRestoreRule)
.- Parameters:
fastRestoreRule
- a consumer that will call methods onFastRestoreRule.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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.
- Parameters:
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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.
- Parameters:
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
crossRegionCopyRules
Schedule.Builder crossRegionCopyRules(Consumer<CrossRegionCopyRule.Builder>... 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.
CrossRegionCopyRule.Builder
avoiding the need to create one manually viaCrossRegionCopyRule.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tocrossRegionCopyRules(List<CrossRegionCopyRule>)
.- Parameters:
crossRegionCopyRules
- a consumer that will call methods onCrossRegionCopyRule.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
deprecateRule
[Custom AMI policies only] The AMI deprecation rule for the schedule.
- Parameters:
deprecateRule
- [Custom AMI policies only] The AMI deprecation rule for the schedule.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
deprecateRule
[Custom AMI policies only] The AMI deprecation rule for the schedule.
This is a convenience method that creates an instance of theDeprecateRule.Builder
avoiding the need to create one manually viaDeprecateRule.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed todeprecateRule(DeprecateRule)
.- Parameters:
deprecateRule
- a consumer that will call methods onDeprecateRule.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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.
- Parameters:
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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.
This is a convenience method that creates an instance of theArchiveRule.Builder
avoiding the need to create one manually viaArchiveRule.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toarchiveRule(ArchiveRule)
.- Parameters:
archiveRule
- a consumer that will call methods onArchiveRule.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-