/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #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.

See Also:

* AWS * API Reference

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

The display name of a resource selection document.

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

The display name of a resource selection document.

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

The display name of a resource selection document.

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

The display name of a resource selection document.

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

The display name of a resource selection document.

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

The display name of a resource selection document.

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

The display name of a resource selection document.

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

The display name of a resource selection document.

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

The ARN of the IAM role that AWS Backup uses to authenticate when restoring * 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 AWS Backup uses to authenticate when restoring * 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 AWS Backup uses to authenticate when restoring * 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 AWS Backup uses to authenticate when restoring * 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 AWS Backup uses to authenticate when restoring * 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 AWS Backup uses to authenticate when restoring * 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 AWS Backup uses to authenticate when restoring * 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 AWS Backup uses to authenticate when restoring * the target resource; for example, * arn:aws:iam::123456789012:role/S3Access.

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

An array of strings that contain Amazon Resource Names (ARNs) of resources to * assign to a backup plan.

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

An array of strings that contain Amazon Resource Names (ARNs) of resources to * assign to a backup plan.

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

An array of strings that contain Amazon Resource Names (ARNs) of resources to * assign to a backup plan.

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

An array of strings that contain Amazon Resource Names (ARNs) of resources to * assign to a backup plan.

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

An array of strings that contain Amazon Resource Names (ARNs) of resources to * assign to a backup plan.

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

An array of strings that contain Amazon Resource Names (ARNs) of resources to * assign to a backup plan.

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

An array of strings that contain Amazon Resource Names (ARNs) of resources to * assign to a backup plan.

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

An array of strings that contain Amazon Resource Names (ARNs) of resources to * assign to a backup plan.

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

An array of strings that contain Amazon Resource Names (ARNs) of resources to * assign to a backup plan.

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

An array of conditions used to specify a set of resources to assign to a * backup plan; for example, "STRINGEQUALS": {"ec2:ResourceTag/Department": * "accounting".

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

An array of conditions used to specify a set of resources to assign to a * backup plan; for example, "STRINGEQUALS": {"ec2:ResourceTag/Department": * "accounting".

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

An array of conditions used to specify a set of resources to assign to a * backup plan; for example, "STRINGEQUALS": {"ec2:ResourceTag/Department": * "accounting".

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

An array of conditions used to specify a set of resources to assign to a * backup plan; for example, "STRINGEQUALS": {"ec2:ResourceTag/Department": * "accounting".

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

An array of conditions used to specify a set of resources to assign to a * backup plan; for example, "STRINGEQUALS": {"ec2:ResourceTag/Department": * "accounting".

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

An array of conditions used to specify a set of resources to assign to a * backup plan; for example, "STRINGEQUALS": {"ec2:ResourceTag/Department": * "accounting".

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

An array of conditions used to specify a set of resources to assign to a * backup plan; for example, "STRINGEQUALS": {"ec2:ResourceTag/Department": * "accounting".

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

An array of conditions used to specify a set of resources to assign to a * backup plan; for example, "STRINGEQUALS": {"ec2:ResourceTag/Department": * "accounting".

*/ inline BackupSelection& AddListOfTags(Condition&& value) { m_listOfTagsHasBeenSet = true; m_listOfTags.push_back(std::move(value)); return *this; } private: Aws::String m_selectionName; bool m_selectionNameHasBeenSet; Aws::String m_iamRoleArn; bool m_iamRoleArnHasBeenSet; Aws::Vector m_resources; bool m_resourcesHasBeenSet; Aws::Vector m_listOfTags; bool m_listOfTagsHasBeenSet; }; } // namespace Model } // namespace Backup } // namespace Aws