/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Backup { namespace Model { /** *

Used to specify a set of resources to a backup plan.

Specifying your * desired Conditions, ListOfTags, * NotResources, and/or Resources is recommended. If none * of these are specified, Backup will attempt to select all supported and opted-in * storage resources, which could have unintended cost implications.

See * Also:

AWS * API Reference

*/ class BackupSelection { public: AWS_BACKUP_API BackupSelection(); AWS_BACKUP_API BackupSelection(Aws::Utils::Json::JsonView jsonValue); AWS_BACKUP_API BackupSelection& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_BACKUP_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The display name of a resource selection document. Must contain 1 to 50 * alphanumeric or '-_.' characters.

*/ inline const Aws::String& GetSelectionName() const{ return m_selectionName; } /** *

The display name of a resource selection document. Must contain 1 to 50 * alphanumeric or '-_.' characters.

*/ inline bool SelectionNameHasBeenSet() const { return m_selectionNameHasBeenSet; } /** *

The display name of a resource selection document. Must contain 1 to 50 * alphanumeric or '-_.' characters.

*/ inline void SetSelectionName(const Aws::String& value) { m_selectionNameHasBeenSet = true; m_selectionName = value; } /** *

The display name of a resource selection document. Must contain 1 to 50 * alphanumeric or '-_.' characters.

*/ inline void SetSelectionName(Aws::String&& value) { m_selectionNameHasBeenSet = true; m_selectionName = std::move(value); } /** *

The display name of a resource selection document. Must contain 1 to 50 * alphanumeric or '-_.' characters.

*/ inline void SetSelectionName(const char* value) { m_selectionNameHasBeenSet = true; m_selectionName.assign(value); } /** *

The display name of a resource selection document. Must contain 1 to 50 * alphanumeric or '-_.' characters.

*/ inline BackupSelection& WithSelectionName(const Aws::String& value) { SetSelectionName(value); return *this;} /** *

The display name of a resource selection document. Must contain 1 to 50 * alphanumeric or '-_.' characters.

*/ inline BackupSelection& WithSelectionName(Aws::String&& value) { SetSelectionName(std::move(value)); return *this;} /** *

The display name of a resource selection document. Must contain 1 to 50 * alphanumeric or '-_.' characters.

*/ inline BackupSelection& WithSelectionName(const char* value) { SetSelectionName(value); return *this;} /** *

The ARN of the IAM role that Backup uses to authenticate when backing up the * target resource; for example, * arn:aws:iam::123456789012:role/S3Access.

*/ inline const Aws::String& GetIamRoleArn() const{ return m_iamRoleArn; } /** *

The ARN of the IAM role that Backup uses to authenticate when backing up the * target resource; for example, * arn:aws:iam::123456789012:role/S3Access.

*/ inline bool IamRoleArnHasBeenSet() const { return m_iamRoleArnHasBeenSet; } /** *

The ARN of the IAM role that Backup uses to authenticate when backing up the * target resource; for example, * arn:aws:iam::123456789012:role/S3Access.

*/ inline void SetIamRoleArn(const Aws::String& value) { m_iamRoleArnHasBeenSet = true; m_iamRoleArn = value; } /** *

The ARN of the IAM role that Backup uses to authenticate when backing up the * target resource; for example, * arn:aws:iam::123456789012:role/S3Access.

*/ inline void SetIamRoleArn(Aws::String&& value) { m_iamRoleArnHasBeenSet = true; m_iamRoleArn = std::move(value); } /** *

The ARN of the IAM role that Backup uses to authenticate when backing up the * target resource; for example, * arn:aws:iam::123456789012:role/S3Access.

*/ inline void SetIamRoleArn(const char* value) { m_iamRoleArnHasBeenSet = true; m_iamRoleArn.assign(value); } /** *

The ARN of the IAM role that Backup uses to authenticate when backing up the * target resource; for example, * arn:aws:iam::123456789012:role/S3Access.

*/ inline BackupSelection& WithIamRoleArn(const Aws::String& value) { SetIamRoleArn(value); return *this;} /** *

The ARN of the IAM role that Backup uses to authenticate when backing up the * target resource; for example, * arn:aws:iam::123456789012:role/S3Access.

*/ inline BackupSelection& WithIamRoleArn(Aws::String&& value) { SetIamRoleArn(std::move(value)); return *this;} /** *

The ARN of the IAM role that Backup uses to authenticate when backing up the * target resource; for example, * arn:aws:iam::123456789012:role/S3Access.

*/ inline BackupSelection& WithIamRoleArn(const char* value) { SetIamRoleArn(value); return *this;} /** *

A list of Amazon Resource Names (ARNs) to assign to a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to assign many resources to a backup plan, consider a different * resource selection strategy, such as assigning all resources of a resource type * or refining your resource selection using tags.

*/ inline const Aws::Vector& GetResources() const{ return m_resources; } /** *

A list of Amazon Resource Names (ARNs) to assign to a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to assign many resources to a backup plan, consider a different * resource selection strategy, such as assigning all resources of a resource type * or refining your resource selection using tags.

*/ inline bool ResourcesHasBeenSet() const { return m_resourcesHasBeenSet; } /** *

A list of Amazon Resource Names (ARNs) to assign to a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to assign many resources to a backup plan, consider a different * resource selection strategy, such as assigning all resources of a resource type * or refining your resource selection using tags.

*/ inline void SetResources(const Aws::Vector& value) { m_resourcesHasBeenSet = true; m_resources = value; } /** *

A list of Amazon Resource Names (ARNs) to assign to a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to assign many resources to a backup plan, consider a different * resource selection strategy, such as assigning all resources of a resource type * or refining your resource selection using tags.

*/ inline void SetResources(Aws::Vector&& value) { m_resourcesHasBeenSet = true; m_resources = std::move(value); } /** *

A list of Amazon Resource Names (ARNs) to assign to a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to assign many resources to a backup plan, consider a different * resource selection strategy, such as assigning all resources of a resource type * or refining your resource selection using tags.

*/ inline BackupSelection& WithResources(const Aws::Vector& value) { SetResources(value); return *this;} /** *

A list of Amazon Resource Names (ARNs) to assign to a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to assign many resources to a backup plan, consider a different * resource selection strategy, such as assigning all resources of a resource type * or refining your resource selection using tags.

*/ inline BackupSelection& WithResources(Aws::Vector&& value) { SetResources(std::move(value)); return *this;} /** *

A list of Amazon Resource Names (ARNs) to assign to a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to assign many resources to a backup plan, consider a different * resource selection strategy, such as assigning all resources of a resource type * or refining your resource selection using tags.

*/ inline BackupSelection& AddResources(const Aws::String& value) { m_resourcesHasBeenSet = true; m_resources.push_back(value); return *this; } /** *

A list of Amazon Resource Names (ARNs) to assign to a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to assign many resources to a backup plan, consider a different * resource selection strategy, such as assigning all resources of a resource type * or refining your resource selection using tags.

*/ inline BackupSelection& AddResources(Aws::String&& value) { m_resourcesHasBeenSet = true; m_resources.push_back(std::move(value)); return *this; } /** *

A list of Amazon Resource Names (ARNs) to assign to a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to assign many resources to a backup plan, consider a different * resource selection strategy, such as assigning all resources of a resource type * or refining your resource selection using tags.

*/ inline BackupSelection& AddResources(const char* value) { m_resourcesHasBeenSet = true; m_resources.push_back(value); return *this; } /** *

A list of conditions that you define to assign resources to your backup plans * using tags. For example, "StringEquals": { "ConditionKey": * "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" },. Condition * operators are case sensitive.

ListOfTags differs from * Conditions as follows:

  • When you specify more than * one condition, you assign all resources that match AT LEAST ONE condition (using * OR logic).

  • ListOfTags only supports * StringEquals. Conditions supports * StringEquals, StringLike, * StringNotEquals, and StringNotLike.

*/ inline const Aws::Vector& GetListOfTags() const{ return m_listOfTags; } /** *

A list of conditions that you define to assign resources to your backup plans * using tags. For example, "StringEquals": { "ConditionKey": * "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" },. Condition * operators are case sensitive.

ListOfTags differs from * Conditions as follows:

  • When you specify more than * one condition, you assign all resources that match AT LEAST ONE condition (using * OR logic).

  • ListOfTags only supports * StringEquals. Conditions supports * StringEquals, StringLike, * StringNotEquals, and StringNotLike.

*/ inline bool ListOfTagsHasBeenSet() const { return m_listOfTagsHasBeenSet; } /** *

A list of conditions that you define to assign resources to your backup plans * using tags. For example, "StringEquals": { "ConditionKey": * "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" },. Condition * operators are case sensitive.

ListOfTags differs from * Conditions as follows:

  • When you specify more than * one condition, you assign all resources that match AT LEAST ONE condition (using * OR logic).

  • ListOfTags only supports * StringEquals. Conditions supports * StringEquals, StringLike, * StringNotEquals, and StringNotLike.

*/ inline void SetListOfTags(const Aws::Vector& value) { m_listOfTagsHasBeenSet = true; m_listOfTags = value; } /** *

A list of conditions that you define to assign resources to your backup plans * using tags. For example, "StringEquals": { "ConditionKey": * "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" },. Condition * operators are case sensitive.

ListOfTags differs from * Conditions as follows:

  • When you specify more than * one condition, you assign all resources that match AT LEAST ONE condition (using * OR logic).

  • ListOfTags only supports * StringEquals. Conditions supports * StringEquals, StringLike, * StringNotEquals, and StringNotLike.

*/ inline void SetListOfTags(Aws::Vector&& value) { m_listOfTagsHasBeenSet = true; m_listOfTags = std::move(value); } /** *

A list of conditions that you define to assign resources to your backup plans * using tags. For example, "StringEquals": { "ConditionKey": * "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" },. Condition * operators are case sensitive.

ListOfTags differs from * Conditions as follows:

  • When you specify more than * one condition, you assign all resources that match AT LEAST ONE condition (using * OR logic).

  • ListOfTags only supports * StringEquals. Conditions supports * StringEquals, StringLike, * StringNotEquals, and StringNotLike.

*/ inline BackupSelection& WithListOfTags(const Aws::Vector& value) { SetListOfTags(value); return *this;} /** *

A list of conditions that you define to assign resources to your backup plans * using tags. For example, "StringEquals": { "ConditionKey": * "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" },. Condition * operators are case sensitive.

ListOfTags differs from * Conditions as follows:

  • When you specify more than * one condition, you assign all resources that match AT LEAST ONE condition (using * OR logic).

  • ListOfTags only supports * StringEquals. Conditions supports * StringEquals, StringLike, * StringNotEquals, and StringNotLike.

*/ inline BackupSelection& WithListOfTags(Aws::Vector&& value) { SetListOfTags(std::move(value)); return *this;} /** *

A list of conditions that you define to assign resources to your backup plans * using tags. For example, "StringEquals": { "ConditionKey": * "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" },. Condition * operators are case sensitive.

ListOfTags differs from * Conditions as follows:

  • When you specify more than * one condition, you assign all resources that match AT LEAST ONE condition (using * OR logic).

  • ListOfTags only supports * StringEquals. Conditions supports * StringEquals, StringLike, * StringNotEquals, and StringNotLike.

*/ inline BackupSelection& AddListOfTags(const Condition& value) { m_listOfTagsHasBeenSet = true; m_listOfTags.push_back(value); return *this; } /** *

A list of conditions that you define to assign resources to your backup plans * using tags. For example, "StringEquals": { "ConditionKey": * "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" },. Condition * operators are case sensitive.

ListOfTags differs from * Conditions as follows:

  • When you specify more than * one condition, you assign all resources that match AT LEAST ONE condition (using * OR logic).

  • ListOfTags only supports * StringEquals. Conditions supports * StringEquals, StringLike, * StringNotEquals, and StringNotLike.

*/ inline BackupSelection& AddListOfTags(Condition&& value) { m_listOfTagsHasBeenSet = true; m_listOfTags.push_back(std::move(value)); return *this; } /** *

A list of Amazon Resource Names (ARNs) to exclude from a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to exclude many resources from a backup plan, consider a * different resource selection strategy, such as assigning only one or a few * resource types or refining your resource selection using tags.

*/ inline const Aws::Vector& GetNotResources() const{ return m_notResources; } /** *

A list of Amazon Resource Names (ARNs) to exclude from a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to exclude many resources from a backup plan, consider a * different resource selection strategy, such as assigning only one or a few * resource types or refining your resource selection using tags.

*/ inline bool NotResourcesHasBeenSet() const { return m_notResourcesHasBeenSet; } /** *

A list of Amazon Resource Names (ARNs) to exclude from a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to exclude many resources from a backup plan, consider a * different resource selection strategy, such as assigning only one or a few * resource types or refining your resource selection using tags.

*/ inline void SetNotResources(const Aws::Vector& value) { m_notResourcesHasBeenSet = true; m_notResources = value; } /** *

A list of Amazon Resource Names (ARNs) to exclude from a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to exclude many resources from a backup plan, consider a * different resource selection strategy, such as assigning only one or a few * resource types or refining your resource selection using tags.

*/ inline void SetNotResources(Aws::Vector&& value) { m_notResourcesHasBeenSet = true; m_notResources = std::move(value); } /** *

A list of Amazon Resource Names (ARNs) to exclude from a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to exclude many resources from a backup plan, consider a * different resource selection strategy, such as assigning only one or a few * resource types or refining your resource selection using tags.

*/ inline BackupSelection& WithNotResources(const Aws::Vector& value) { SetNotResources(value); return *this;} /** *

A list of Amazon Resource Names (ARNs) to exclude from a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to exclude many resources from a backup plan, consider a * different resource selection strategy, such as assigning only one or a few * resource types or refining your resource selection using tags.

*/ inline BackupSelection& WithNotResources(Aws::Vector&& value) { SetNotResources(std::move(value)); return *this;} /** *

A list of Amazon Resource Names (ARNs) to exclude from a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to exclude many resources from a backup plan, consider a * different resource selection strategy, such as assigning only one or a few * resource types or refining your resource selection using tags.

*/ inline BackupSelection& AddNotResources(const Aws::String& value) { m_notResourcesHasBeenSet = true; m_notResources.push_back(value); return *this; } /** *

A list of Amazon Resource Names (ARNs) to exclude from a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to exclude many resources from a backup plan, consider a * different resource selection strategy, such as assigning only one or a few * resource types or refining your resource selection using tags.

*/ inline BackupSelection& AddNotResources(Aws::String&& value) { m_notResourcesHasBeenSet = true; m_notResources.push_back(std::move(value)); return *this; } /** *

A list of Amazon Resource Names (ARNs) to exclude from a backup plan. The * maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

*

If you need to exclude many resources from a backup plan, consider a * different resource selection strategy, such as assigning only one or a few * resource types or refining your resource selection using tags.

*/ inline BackupSelection& AddNotResources(const char* value) { m_notResourcesHasBeenSet = true; m_notResources.push_back(value); return *this; } /** *

A list of conditions that you define to assign resources to your backup plans * using tags. For example, "StringEquals": { "ConditionKey": * "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" },. Condition * operators are case sensitive.

Conditions differs from * ListOfTags as follows:

  • When you specify more than * one condition, you only assign the resources that match ALL conditions (using * AND logic).

  • Conditions supports * StringEquals, StringLike, * StringNotEquals, and StringNotLike. * ListOfTags only supports StringEquals.

*/ inline const Conditions& GetConditions() const{ return m_conditions; } /** *

A list of conditions that you define to assign resources to your backup plans * using tags. For example, "StringEquals": { "ConditionKey": * "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" },. Condition * operators are case sensitive.

Conditions differs from * ListOfTags as follows:

  • When you specify more than * one condition, you only assign the resources that match ALL conditions (using * AND logic).

  • Conditions supports * StringEquals, StringLike, * StringNotEquals, and StringNotLike. * ListOfTags only supports StringEquals.

*/ inline bool ConditionsHasBeenSet() const { return m_conditionsHasBeenSet; } /** *

A list of conditions that you define to assign resources to your backup plans * using tags. For example, "StringEquals": { "ConditionKey": * "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" },. Condition * operators are case sensitive.

Conditions differs from * ListOfTags as follows:

  • When you specify more than * one condition, you only assign the resources that match ALL conditions (using * AND logic).

  • Conditions supports * StringEquals, StringLike, * StringNotEquals, and StringNotLike. * ListOfTags only supports StringEquals.

*/ inline void SetConditions(const Conditions& value) { m_conditionsHasBeenSet = true; m_conditions = value; } /** *

A list of conditions that you define to assign resources to your backup plans * using tags. For example, "StringEquals": { "ConditionKey": * "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" },. Condition * operators are case sensitive.

Conditions differs from * ListOfTags as follows:

  • When you specify more than * one condition, you only assign the resources that match ALL conditions (using * AND logic).

  • Conditions supports * StringEquals, StringLike, * StringNotEquals, and StringNotLike. * ListOfTags only supports StringEquals.

*/ inline void SetConditions(Conditions&& value) { m_conditionsHasBeenSet = true; m_conditions = std::move(value); } /** *

A list of conditions that you define to assign resources to your backup plans * using tags. For example, "StringEquals": { "ConditionKey": * "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" },. Condition * operators are case sensitive.

Conditions differs from * ListOfTags as follows:

  • When you specify more than * one condition, you only assign the resources that match ALL conditions (using * AND logic).

  • Conditions supports * StringEquals, StringLike, * StringNotEquals, and StringNotLike. * ListOfTags only supports StringEquals.

*/ inline BackupSelection& WithConditions(const Conditions& value) { SetConditions(value); return *this;} /** *

A list of conditions that you define to assign resources to your backup plans * using tags. For example, "StringEquals": { "ConditionKey": * "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" },. Condition * operators are case sensitive.

Conditions differs from * ListOfTags as follows:

  • When you specify more than * one condition, you only assign the resources that match ALL conditions (using * AND logic).

  • Conditions supports * StringEquals, StringLike, * StringNotEquals, and StringNotLike. * ListOfTags only supports StringEquals.

*/ inline BackupSelection& WithConditions(Conditions&& value) { SetConditions(std::move(value)); return *this;} private: Aws::String m_selectionName; bool m_selectionNameHasBeenSet = false; Aws::String m_iamRoleArn; bool m_iamRoleArnHasBeenSet = false; Aws::Vector m_resources; bool m_resourcesHasBeenSet = false; Aws::Vector m_listOfTags; bool m_listOfTagsHasBeenSet = false; Aws::Vector m_notResources; bool m_notResourcesHasBeenSet = false; Conditions m_conditions; bool m_conditionsHasBeenSet = false; }; } // namespace Model } // namespace Backup } // namespace Aws