Interface Schedule.Builder

    • Method Detail

      • name

        Schedule.Builder name​(String 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

        Schedule.Builder copyTags​(Boolean 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

        Schedule.Builder tagsToAdd​(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.

        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

        Schedule.Builder tagsToAdd​(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.

        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

        Schedule.Builder tagsToAdd​(Consumer<Tag.Builder>... 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 the Tag.Builder avoiding the need to create one manually via Tag.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #tagsToAdd(List).

        Parameters:
        tagsToAdd - a consumer that will call methods on Tag.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #tagsToAdd(java.util.Collection)
      • variableTags

        Schedule.Builder 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. 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

        Schedule.Builder 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. 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

        Schedule.Builder 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. 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.

        This is a convenience method that creates an instance of the Tag.Builder avoiding the need to create one manually via Tag.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #variableTags(List).

        Parameters:
        variableTags - a consumer that will call methods on Tag.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #variableTags(java.util.Collection)
      • createRule

        Schedule.Builder createRule​(CreateRule createRule)

        The creation rule.

        Parameters:
        createRule - The creation rule.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • retainRule

        Schedule.Builder retainRule​(RetainRule 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.
      • fastRestoreRule

        Schedule.Builder fastRestoreRule​(FastRestoreRule 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.
      • crossRegionCopyRules

        Schedule.Builder crossRegionCopyRules​(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.

        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​(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.

        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.

        This is a convenience method that creates an instance of the CrossRegionCopyRule.Builder avoiding the need to create one manually via CrossRegionCopyRule.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #crossRegionCopyRules(List).

        Parameters:
        crossRegionCopyRules - a consumer that will call methods on CrossRegionCopyRule.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #crossRegionCopyRules(java.util.Collection)
      • shareRules

        Schedule.Builder shareRules​(Collection<ShareRule> shareRules)

        [Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.

        Parameters:
        shareRules - [Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • shareRules

        Schedule.Builder shareRules​(ShareRule... shareRules)

        [Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.

        Parameters:
        shareRules - [Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • shareRules

        Schedule.Builder shareRules​(Consumer<ShareRule.Builder>... shareRules)

        [Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.

        This is a convenience method that creates an instance of the ShareRule.Builder avoiding the need to create one manually via ShareRule.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #shareRules(List).

        Parameters:
        shareRules - a consumer that will call methods on ShareRule.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #shareRules(java.util.Collection)
      • deprecateRule

        Schedule.Builder deprecateRule​(DeprecateRule 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.
      • archiveRule

        Schedule.Builder archiveRule​(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.

        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.