/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include [All policy types] Specifies the configuration of a lifecycle
* policy.See Also:
AWS
* API Reference
[All policy types] The valid target resource types and actions a
* policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT
to create a
* lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify
* IMAGE_MANAGEMENT
to create a lifecycle policy that manages the
* lifecycle of EBS-backed AMIs. Specify EVENT_BASED_POLICY
to create
* an event-based policy that performs specific actions when a defined event occurs
* in your Amazon Web Services account.
The default is
* EBS_SNAPSHOT_MANAGEMENT
.
[All policy types] The valid target resource types and actions a
* policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT
to create a
* lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify
* IMAGE_MANAGEMENT
to create a lifecycle policy that manages the
* lifecycle of EBS-backed AMIs. Specify EVENT_BASED_POLICY
to create
* an event-based policy that performs specific actions when a defined event occurs
* in your Amazon Web Services account.
The default is
* EBS_SNAPSHOT_MANAGEMENT
.
[All policy types] The valid target resource types and actions a
* policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT
to create a
* lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify
* IMAGE_MANAGEMENT
to create a lifecycle policy that manages the
* lifecycle of EBS-backed AMIs. Specify EVENT_BASED_POLICY
to create
* an event-based policy that performs specific actions when a defined event occurs
* in your Amazon Web Services account.
The default is
* EBS_SNAPSHOT_MANAGEMENT
.
[All policy types] The valid target resource types and actions a
* policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT
to create a
* lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify
* IMAGE_MANAGEMENT
to create a lifecycle policy that manages the
* lifecycle of EBS-backed AMIs. Specify EVENT_BASED_POLICY
to create
* an event-based policy that performs specific actions when a defined event occurs
* in your Amazon Web Services account.
The default is
* EBS_SNAPSHOT_MANAGEMENT
.
[All policy types] The valid target resource types and actions a
* policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT
to create a
* lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify
* IMAGE_MANAGEMENT
to create a lifecycle policy that manages the
* lifecycle of EBS-backed AMIs. Specify EVENT_BASED_POLICY
to create
* an event-based policy that performs specific actions when a defined event occurs
* in your Amazon Web Services account.
The default is
* EBS_SNAPSHOT_MANAGEMENT
.
[All policy types] The valid target resource types and actions a
* policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT
to create a
* lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify
* IMAGE_MANAGEMENT
to create a lifecycle policy that manages the
* lifecycle of EBS-backed AMIs. Specify EVENT_BASED_POLICY
to create
* an event-based policy that performs specific actions when a defined event occurs
* in your Amazon Web Services account.
The default is
* EBS_SNAPSHOT_MANAGEMENT
.
[Snapshot policies only] The target resource type for snapshot and
* AMI lifecycle policies. Use VOLUME
to create snapshots of
* individual volumes or use INSTANCE
to create multi-volume snapshots
* from the volumes for an instance.
[Snapshot policies only] The target resource type for snapshot and
* AMI lifecycle policies. Use VOLUME
to create snapshots of
* individual volumes or use INSTANCE
to create multi-volume snapshots
* from the volumes for an instance.
[Snapshot policies only] The target resource type for snapshot and
* AMI lifecycle policies. Use VOLUME
to create snapshots of
* individual volumes or use INSTANCE
to create multi-volume snapshots
* from the volumes for an instance.
[Snapshot policies only] The target resource type for snapshot and
* AMI lifecycle policies. Use VOLUME
to create snapshots of
* individual volumes or use INSTANCE
to create multi-volume snapshots
* from the volumes for an instance.
[Snapshot policies only] The target resource type for snapshot and
* AMI lifecycle policies. Use VOLUME
to create snapshots of
* individual volumes or use INSTANCE
to create multi-volume snapshots
* from the volumes for an instance.
[Snapshot policies only] The target resource type for snapshot and
* AMI lifecycle policies. Use VOLUME
to create snapshots of
* individual volumes or use INSTANCE
to create multi-volume snapshots
* from the volumes for an instance.
[Snapshot policies only] The target resource type for snapshot and
* AMI lifecycle policies. Use VOLUME
to create snapshots of
* individual volumes or use INSTANCE
to create multi-volume snapshots
* from the volumes for an instance.
[Snapshot policies only] The target resource type for snapshot and
* AMI lifecycle policies. Use VOLUME
to create snapshots of
* individual volumes or use INSTANCE
to create multi-volume snapshots
* from the volumes for an instance.
[Snapshot and AMI policies only] The location of the resources to
* backup. If the source resources are located in an Amazon Web Services Region,
* specify CLOUD
. If the source resources are located on an Outpost in
* your account, specify OUTPOST
.
If you specify
* OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of
* the specified type with matching target tags across all of the Outposts in your
* account.
[Snapshot and AMI policies only] The location of the resources to
* backup. If the source resources are located in an Amazon Web Services Region,
* specify CLOUD
. If the source resources are located on an Outpost in
* your account, specify OUTPOST
.
If you specify
* OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of
* the specified type with matching target tags across all of the Outposts in your
* account.
[Snapshot and AMI policies only] The location of the resources to
* backup. If the source resources are located in an Amazon Web Services Region,
* specify CLOUD
. If the source resources are located on an Outpost in
* your account, specify OUTPOST
.
If you specify
* OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of
* the specified type with matching target tags across all of the Outposts in your
* account.
[Snapshot and AMI policies only] The location of the resources to
* backup. If the source resources are located in an Amazon Web Services Region,
* specify CLOUD
. If the source resources are located on an Outpost in
* your account, specify OUTPOST
.
If you specify
* OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of
* the specified type with matching target tags across all of the Outposts in your
* account.
[Snapshot and AMI policies only] The location of the resources to
* backup. If the source resources are located in an Amazon Web Services Region,
* specify CLOUD
. If the source resources are located on an Outpost in
* your account, specify OUTPOST
.
If you specify
* OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of
* the specified type with matching target tags across all of the Outposts in your
* account.
[Snapshot and AMI policies only] The location of the resources to
* backup. If the source resources are located in an Amazon Web Services Region,
* specify CLOUD
. If the source resources are located on an Outpost in
* your account, specify OUTPOST
.
If you specify
* OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of
* the specified type with matching target tags across all of the Outposts in your
* account.
[Snapshot and AMI policies only] The location of the resources to
* backup. If the source resources are located in an Amazon Web Services Region,
* specify CLOUD
. If the source resources are located on an Outpost in
* your account, specify OUTPOST
.
If you specify
* OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of
* the specified type with matching target tags across all of the Outposts in your
* account.
[Snapshot and AMI policies only] The location of the resources to
* backup. If the source resources are located in an Amazon Web Services Region,
* specify CLOUD
. If the source resources are located on an Outpost in
* your account, specify OUTPOST
.
If you specify
* OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of
* the specified type with matching target tags across all of the Outposts in your
* account.
[Snapshot and AMI policies only] The single tag that identifies * targeted resources for this policy.
*/ inline const Aws::Vector[Snapshot and AMI policies only] The single tag that identifies * targeted resources for this policy.
*/ inline bool TargetTagsHasBeenSet() const { return m_targetTagsHasBeenSet; } /** *[Snapshot and AMI policies only] The single tag that identifies * targeted resources for this policy.
*/ inline void SetTargetTags(const Aws::Vector[Snapshot and AMI policies only] The single tag that identifies * targeted resources for this policy.
*/ inline void SetTargetTags(Aws::Vector[Snapshot and AMI policies only] The single tag that identifies * targeted resources for this policy.
*/ inline PolicyDetails& WithTargetTags(const Aws::Vector[Snapshot and AMI policies only] The single tag that identifies * targeted resources for this policy.
*/ inline PolicyDetails& WithTargetTags(Aws::Vector[Snapshot and AMI policies only] The single tag that identifies * targeted resources for this policy.
*/ inline PolicyDetails& AddTargetTags(const Tag& value) { m_targetTagsHasBeenSet = true; m_targetTags.push_back(value); return *this; } /** *[Snapshot and AMI policies only] The single tag that identifies * targeted resources for this policy.
*/ inline PolicyDetails& AddTargetTags(Tag&& value) { m_targetTagsHasBeenSet = true; m_targetTags.push_back(std::move(value)); return *this; } /** *[Snapshot and AMI policies only] The schedules of policy-defined * actions for snapshot and AMI lifecycle policies. A policy can have up to four * schedules—one mandatory schedule and up to three optional schedules.
*/ inline const Aws::Vector[Snapshot and AMI policies only] The schedules of policy-defined * actions for snapshot and AMI lifecycle policies. A policy can have up to four * schedules—one mandatory schedule and up to three optional schedules.
*/ inline bool SchedulesHasBeenSet() const { return m_schedulesHasBeenSet; } /** *[Snapshot and AMI policies only] The schedules of policy-defined * actions for snapshot and AMI lifecycle policies. A policy can have up to four * schedules—one mandatory schedule and up to three optional schedules.
*/ inline void SetSchedules(const Aws::Vector[Snapshot and AMI policies only] The schedules of policy-defined * actions for snapshot and AMI lifecycle policies. A policy can have up to four * schedules—one mandatory schedule and up to three optional schedules.
*/ inline void SetSchedules(Aws::Vector[Snapshot and AMI policies only] The schedules of policy-defined * actions for snapshot and AMI lifecycle policies. A policy can have up to four * schedules—one mandatory schedule and up to three optional schedules.
*/ inline PolicyDetails& WithSchedules(const Aws::Vector[Snapshot and AMI policies only] The schedules of policy-defined * actions for snapshot and AMI lifecycle policies. A policy can have up to four * schedules—one mandatory schedule and up to three optional schedules.
*/ inline PolicyDetails& WithSchedules(Aws::Vector[Snapshot and AMI policies only] The schedules of policy-defined * actions for snapshot and AMI lifecycle policies. A policy can have up to four * schedules—one mandatory schedule and up to three optional schedules.
*/ inline PolicyDetails& AddSchedules(const Schedule& value) { m_schedulesHasBeenSet = true; m_schedules.push_back(value); return *this; } /** *[Snapshot and AMI policies only] The schedules of policy-defined * actions for snapshot and AMI lifecycle policies. A policy can have up to four * schedules—one mandatory schedule and up to three optional schedules.
*/ inline PolicyDetails& AddSchedules(Schedule&& value) { m_schedulesHasBeenSet = true; m_schedules.push_back(std::move(value)); return *this; } /** *[Snapshot and AMI policies only] A set of optional parameters for * snapshot and AMI lifecycle policies.
If you are modifying a * policy that was created or previously modified using the Amazon Data Lifecycle * Manager console, then you must include this parameter and specify either the * default values or the new values that you require. You can't omit this parameter * or set its values to null.
*/ inline const Parameters& GetParameters() const{ return m_parameters; } /** *[Snapshot and AMI policies only] A set of optional parameters for * snapshot and AMI lifecycle policies.
If you are modifying a * policy that was created or previously modified using the Amazon Data Lifecycle * Manager console, then you must include this parameter and specify either the * default values or the new values that you require. You can't omit this parameter * or set its values to null.
*/ inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; } /** *[Snapshot and AMI policies only] A set of optional parameters for * snapshot and AMI lifecycle policies.
If you are modifying a * policy that was created or previously modified using the Amazon Data Lifecycle * Manager console, then you must include this parameter and specify either the * default values or the new values that you require. You can't omit this parameter * or set its values to null.
*/ inline void SetParameters(const Parameters& value) { m_parametersHasBeenSet = true; m_parameters = value; } /** *[Snapshot and AMI policies only] A set of optional parameters for * snapshot and AMI lifecycle policies.
If you are modifying a * policy that was created or previously modified using the Amazon Data Lifecycle * Manager console, then you must include this parameter and specify either the * default values or the new values that you require. You can't omit this parameter * or set its values to null.
*/ inline void SetParameters(Parameters&& value) { m_parametersHasBeenSet = true; m_parameters = std::move(value); } /** *[Snapshot and AMI policies only] A set of optional parameters for * snapshot and AMI lifecycle policies.
If you are modifying a * policy that was created or previously modified using the Amazon Data Lifecycle * Manager console, then you must include this parameter and specify either the * default values or the new values that you require. You can't omit this parameter * or set its values to null.
*/ inline PolicyDetails& WithParameters(const Parameters& value) { SetParameters(value); return *this;} /** *[Snapshot and AMI policies only] A set of optional parameters for * snapshot and AMI lifecycle policies.
If you are modifying a * policy that was created or previously modified using the Amazon Data Lifecycle * Manager console, then you must include this parameter and specify either the * default values or the new values that you require. You can't omit this parameter * or set its values to null.
*/ inline PolicyDetails& WithParameters(Parameters&& value) { SetParameters(std::move(value)); return *this;} /** *[Event-based policies only] The event that activates the event-based * policy.
*/ inline const EventSource& GetEventSource() const{ return m_eventSource; } /** *[Event-based policies only] The event that activates the event-based * policy.
*/ inline bool EventSourceHasBeenSet() const { return m_eventSourceHasBeenSet; } /** *[Event-based policies only] The event that activates the event-based * policy.
*/ inline void SetEventSource(const EventSource& value) { m_eventSourceHasBeenSet = true; m_eventSource = value; } /** *[Event-based policies only] The event that activates the event-based * policy.
*/ inline void SetEventSource(EventSource&& value) { m_eventSourceHasBeenSet = true; m_eventSource = std::move(value); } /** *[Event-based policies only] The event that activates the event-based * policy.
*/ inline PolicyDetails& WithEventSource(const EventSource& value) { SetEventSource(value); return *this;} /** *[Event-based policies only] The event that activates the event-based * policy.
*/ inline PolicyDetails& WithEventSource(EventSource&& value) { SetEventSource(std::move(value)); return *this;} /** *[Event-based policies only] The actions to be performed when the * event-based policy is activated. You can specify only one action per policy.
*/ inline const Aws::Vector[Event-based policies only] The actions to be performed when the * event-based policy is activated. You can specify only one action per policy.
*/ inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; } /** *[Event-based policies only] The actions to be performed when the * event-based policy is activated. You can specify only one action per policy.
*/ inline void SetActions(const Aws::Vector[Event-based policies only] The actions to be performed when the * event-based policy is activated. You can specify only one action per policy.
*/ inline void SetActions(Aws::Vector[Event-based policies only] The actions to be performed when the * event-based policy is activated. You can specify only one action per policy.
*/ inline PolicyDetails& WithActions(const Aws::Vector[Event-based policies only] The actions to be performed when the * event-based policy is activated. You can specify only one action per policy.
*/ inline PolicyDetails& WithActions(Aws::Vector[Event-based policies only] The actions to be performed when the * event-based policy is activated. You can specify only one action per policy.
*/ inline PolicyDetails& AddActions(const Action& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; } /** *[Event-based policies only] The actions to be performed when the * event-based policy is activated. You can specify only one action per policy.
*/ inline PolicyDetails& AddActions(Action&& value) { m_actionsHasBeenSet = true; m_actions.push_back(std::move(value)); return *this; } private: PolicyTypeValues m_policyType; bool m_policyTypeHasBeenSet = false; Aws::Vector