/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include [Snapshot and AMI policies only] Specifies a schedule for a snapshot
* or AMI lifecycle policy.See Also:
AWS API
* Reference
The name of the schedule.
*/ inline const Aws::String& GetName() const{ return m_name; } /** *The name of the schedule.
*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *The name of the schedule.
*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *The name of the schedule.
*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *The name of the schedule.
*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *The name of the schedule.
*/ inline Schedule& WithName(const Aws::String& value) { SetName(value); return *this;} /** *The name of the schedule.
*/ inline Schedule& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *The name of the schedule.
*/ inline Schedule& WithName(const char* value) { SetName(value); return *this;} /** *Copy all user-defined tags on a source volume to snapshots of the volume * created by this policy.
*/ inline bool GetCopyTags() const{ return m_copyTags; } /** *Copy all user-defined tags on a source volume to snapshots of the volume * created by this policy.
*/ inline bool CopyTagsHasBeenSet() const { return m_copyTagsHasBeenSet; } /** *Copy all user-defined tags on a source volume to snapshots of the volume * created by this policy.
*/ inline void SetCopyTags(bool value) { m_copyTagsHasBeenSet = true; m_copyTags = value; } /** *Copy all user-defined tags on a source volume to snapshots of the volume * created by this policy.
*/ inline Schedule& WithCopyTags(bool value) { SetCopyTags(value); return *this;} /** *The tags to apply to policy-created resources. These user-defined tags are in * addition to the Amazon Web Services-added lifecycle tags.
*/ inline const Aws::VectorThe tags to apply to policy-created resources. These user-defined tags are in * addition to the Amazon Web Services-added lifecycle tags.
*/ inline bool TagsToAddHasBeenSet() const { return m_tagsToAddHasBeenSet; } /** *The tags to apply to policy-created resources. These user-defined tags are in * addition to the Amazon Web Services-added lifecycle tags.
*/ inline void SetTagsToAdd(const Aws::VectorThe tags to apply to policy-created resources. These user-defined tags are in * addition to the Amazon Web Services-added lifecycle tags.
*/ inline void SetTagsToAdd(Aws::VectorThe tags to apply to policy-created resources. These user-defined tags are in * addition to the Amazon Web Services-added lifecycle tags.
*/ inline Schedule& WithTagsToAdd(const Aws::VectorThe tags to apply to policy-created resources. These user-defined tags are in * addition to the Amazon Web Services-added lifecycle tags.
*/ inline Schedule& WithTagsToAdd(Aws::VectorThe tags to apply to policy-created resources. These user-defined tags are in * addition to the Amazon Web Services-added lifecycle tags.
*/ inline Schedule& AddTagsToAdd(const Tag& value) { m_tagsToAddHasBeenSet = true; m_tagsToAdd.push_back(value); return *this; } /** *The tags to apply to policy-created resources. These user-defined tags are in * addition to the Amazon Web Services-added lifecycle tags.
*/ inline Schedule& AddTagsToAdd(Tag&& value) { m_tagsToAddHasBeenSet = true; m_tagsToAdd.push_back(std::move(value)); return *this; } /** * [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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
The creation rule.
*/ inline const CreateRule& GetCreateRule() const{ return m_createRule; } /** *The creation rule.
*/ inline bool CreateRuleHasBeenSet() const { return m_createRuleHasBeenSet; } /** *The creation rule.
*/ inline void SetCreateRule(const CreateRule& value) { m_createRuleHasBeenSet = true; m_createRule = value; } /** *The creation rule.
*/ inline void SetCreateRule(CreateRule&& value) { m_createRuleHasBeenSet = true; m_createRule = std::move(value); } /** *The creation rule.
*/ inline Schedule& WithCreateRule(const CreateRule& value) { SetCreateRule(value); return *this;} /** *The creation rule.
*/ inline Schedule& WithCreateRule(CreateRule&& value) { SetCreateRule(std::move(value)); return *this;} /** *The retention rule for snapshots or AMIs created by the policy.
*/ inline const RetainRule& GetRetainRule() const{ return m_retainRule; } /** *The retention rule for snapshots or AMIs created by the policy.
*/ inline bool RetainRuleHasBeenSet() const { return m_retainRuleHasBeenSet; } /** *The retention rule for snapshots or AMIs created by the policy.
*/ inline void SetRetainRule(const RetainRule& value) { m_retainRuleHasBeenSet = true; m_retainRule = value; } /** *The retention rule for snapshots or AMIs created by the policy.
*/ inline void SetRetainRule(RetainRule&& value) { m_retainRuleHasBeenSet = true; m_retainRule = std::move(value); } /** *The retention rule for snapshots or AMIs created by the policy.
*/ inline Schedule& WithRetainRule(const RetainRule& value) { SetRetainRule(value); return *this;} /** *The retention rule for snapshots or AMIs created by the policy.
*/ inline Schedule& WithRetainRule(RetainRule&& value) { SetRetainRule(std::move(value)); return *this;} /** *[Snapshot policies only] The rule for enabling fast snapshot * restore.
*/ inline const FastRestoreRule& GetFastRestoreRule() const{ return m_fastRestoreRule; } /** *[Snapshot policies only] The rule for enabling fast snapshot * restore.
*/ inline bool FastRestoreRuleHasBeenSet() const { return m_fastRestoreRuleHasBeenSet; } /** *[Snapshot policies only] The rule for enabling fast snapshot * restore.
*/ inline void SetFastRestoreRule(const FastRestoreRule& value) { m_fastRestoreRuleHasBeenSet = true; m_fastRestoreRule = value; } /** *[Snapshot policies only] The rule for enabling fast snapshot * restore.
*/ inline void SetFastRestoreRule(FastRestoreRule&& value) { m_fastRestoreRuleHasBeenSet = true; m_fastRestoreRule = std::move(value); } /** *[Snapshot policies only] The rule for enabling fast snapshot * restore.
*/ inline Schedule& WithFastRestoreRule(const FastRestoreRule& value) { SetFastRestoreRule(value); return *this;} /** *[Snapshot policies only] The rule for enabling fast snapshot * restore.
*/ inline Schedule& WithFastRestoreRule(FastRestoreRule&& value) { SetFastRestoreRule(std::move(value)); return *this;} /** *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.
*/ inline const Aws::VectorSpecifies 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.
*/ inline bool CrossRegionCopyRulesHasBeenSet() const { return m_crossRegionCopyRulesHasBeenSet; } /** *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.
*/ inline void SetCrossRegionCopyRules(const Aws::VectorSpecifies 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.
*/ inline void SetCrossRegionCopyRules(Aws::VectorSpecifies 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.
*/ inline Schedule& WithCrossRegionCopyRules(const Aws::VectorSpecifies 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.
*/ inline Schedule& WithCrossRegionCopyRules(Aws::VectorSpecifies 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.
*/ inline Schedule& AddCrossRegionCopyRules(const CrossRegionCopyRule& value) { m_crossRegionCopyRulesHasBeenSet = true; m_crossRegionCopyRules.push_back(value); return *this; } /** *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.
*/ inline Schedule& AddCrossRegionCopyRules(CrossRegionCopyRule&& value) { m_crossRegionCopyRulesHasBeenSet = true; m_crossRegionCopyRules.push_back(std::move(value)); return *this; } /** *[Snapshot policies only] The rule for sharing snapshots with other * Amazon Web Services accounts.
*/ inline const Aws::Vector[Snapshot policies only] The rule for sharing snapshots with other * Amazon Web Services accounts.
*/ inline bool ShareRulesHasBeenSet() const { return m_shareRulesHasBeenSet; } /** *[Snapshot policies only] The rule for sharing snapshots with other * Amazon Web Services accounts.
*/ inline void SetShareRules(const Aws::Vector[Snapshot policies only] The rule for sharing snapshots with other * Amazon Web Services accounts.
*/ inline void SetShareRules(Aws::Vector[Snapshot policies only] The rule for sharing snapshots with other * Amazon Web Services accounts.
*/ inline Schedule& WithShareRules(const Aws::Vector[Snapshot policies only] The rule for sharing snapshots with other * Amazon Web Services accounts.
*/ inline Schedule& WithShareRules(Aws::Vector[Snapshot policies only] The rule for sharing snapshots with other * Amazon Web Services accounts.
*/ inline Schedule& AddShareRules(const ShareRule& value) { m_shareRulesHasBeenSet = true; m_shareRules.push_back(value); return *this; } /** *[Snapshot policies only] The rule for sharing snapshots with other * Amazon Web Services accounts.
*/ inline Schedule& AddShareRules(ShareRule&& value) { m_shareRulesHasBeenSet = true; m_shareRules.push_back(std::move(value)); return *this; } /** *[AMI policies only] The AMI deprecation rule for the schedule.
*/ inline const DeprecateRule& GetDeprecateRule() const{ return m_deprecateRule; } /** *[AMI policies only] The AMI deprecation rule for the schedule.
*/ inline bool DeprecateRuleHasBeenSet() const { return m_deprecateRuleHasBeenSet; } /** *[AMI policies only] The AMI deprecation rule for the schedule.
*/ inline void SetDeprecateRule(const DeprecateRule& value) { m_deprecateRuleHasBeenSet = true; m_deprecateRule = value; } /** *[AMI policies only] The AMI deprecation rule for the schedule.
*/ inline void SetDeprecateRule(DeprecateRule&& value) { m_deprecateRuleHasBeenSet = true; m_deprecateRule = std::move(value); } /** *[AMI policies only] The AMI deprecation rule for the schedule.
*/ inline Schedule& WithDeprecateRule(const DeprecateRule& value) { SetDeprecateRule(value); return *this;} /** *[AMI policies only] The AMI deprecation rule for the schedule.
*/ inline Schedule& WithDeprecateRule(DeprecateRule&& value) { SetDeprecateRule(std::move(value)); return *this;} /** *[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.
*/ inline const ArchiveRule& GetArchiveRule() const{ return m_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.
*/ inline bool ArchiveRuleHasBeenSet() const { return m_archiveRuleHasBeenSet; } /** *[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.
*/ inline void SetArchiveRule(const ArchiveRule& value) { m_archiveRuleHasBeenSet = true; m_archiveRule = value; } /** *[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.
*/ inline void SetArchiveRule(ArchiveRule&& value) { m_archiveRuleHasBeenSet = true; m_archiveRule = std::move(value); } /** *[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.
*/ inline Schedule& WithArchiveRule(const ArchiveRule& value) { SetArchiveRule(value); return *this;} /** *[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.
*/ inline Schedule& WithArchiveRule(ArchiveRule&& value) { SetArchiveRule(std::move(value)); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; bool m_copyTags; bool m_copyTagsHasBeenSet = false; Aws::Vector