/** * 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 { /** *

A framework consists of one or more controls. Each control has its own * control scope. The control scope can include one or more resource types, a * combination of a tag key and value, or a combination of one resource type and * one resource ID. If no scope is specified, evaluations for the rule are * triggered when any resource in your recording group changes in * configuration.

To set a control scope that includes all of a * particular resource, leave the ControlScope empty or do not pass it * when calling CreateFramework.

See Also:

AWS * API Reference

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

The ID of the only Amazon Web Services resource that you want your control * scope to contain.

*/ inline const Aws::Vector& GetComplianceResourceIds() const{ return m_complianceResourceIds; } /** *

The ID of the only Amazon Web Services resource that you want your control * scope to contain.

*/ inline bool ComplianceResourceIdsHasBeenSet() const { return m_complianceResourceIdsHasBeenSet; } /** *

The ID of the only Amazon Web Services resource that you want your control * scope to contain.

*/ inline void SetComplianceResourceIds(const Aws::Vector& value) { m_complianceResourceIdsHasBeenSet = true; m_complianceResourceIds = value; } /** *

The ID of the only Amazon Web Services resource that you want your control * scope to contain.

*/ inline void SetComplianceResourceIds(Aws::Vector&& value) { m_complianceResourceIdsHasBeenSet = true; m_complianceResourceIds = std::move(value); } /** *

The ID of the only Amazon Web Services resource that you want your control * scope to contain.

*/ inline ControlScope& WithComplianceResourceIds(const Aws::Vector& value) { SetComplianceResourceIds(value); return *this;} /** *

The ID of the only Amazon Web Services resource that you want your control * scope to contain.

*/ inline ControlScope& WithComplianceResourceIds(Aws::Vector&& value) { SetComplianceResourceIds(std::move(value)); return *this;} /** *

The ID of the only Amazon Web Services resource that you want your control * scope to contain.

*/ inline ControlScope& AddComplianceResourceIds(const Aws::String& value) { m_complianceResourceIdsHasBeenSet = true; m_complianceResourceIds.push_back(value); return *this; } /** *

The ID of the only Amazon Web Services resource that you want your control * scope to contain.

*/ inline ControlScope& AddComplianceResourceIds(Aws::String&& value) { m_complianceResourceIdsHasBeenSet = true; m_complianceResourceIds.push_back(std::move(value)); return *this; } /** *

The ID of the only Amazon Web Services resource that you want your control * scope to contain.

*/ inline ControlScope& AddComplianceResourceIds(const char* value) { m_complianceResourceIdsHasBeenSet = true; m_complianceResourceIds.push_back(value); return *this; } /** *

Describes whether the control scope includes one or more types of resources, * such as EFS or RDS.

*/ inline const Aws::Vector& GetComplianceResourceTypes() const{ return m_complianceResourceTypes; } /** *

Describes whether the control scope includes one or more types of resources, * such as EFS or RDS.

*/ inline bool ComplianceResourceTypesHasBeenSet() const { return m_complianceResourceTypesHasBeenSet; } /** *

Describes whether the control scope includes one or more types of resources, * such as EFS or RDS.

*/ inline void SetComplianceResourceTypes(const Aws::Vector& value) { m_complianceResourceTypesHasBeenSet = true; m_complianceResourceTypes = value; } /** *

Describes whether the control scope includes one or more types of resources, * such as EFS or RDS.

*/ inline void SetComplianceResourceTypes(Aws::Vector&& value) { m_complianceResourceTypesHasBeenSet = true; m_complianceResourceTypes = std::move(value); } /** *

Describes whether the control scope includes one or more types of resources, * such as EFS or RDS.

*/ inline ControlScope& WithComplianceResourceTypes(const Aws::Vector& value) { SetComplianceResourceTypes(value); return *this;} /** *

Describes whether the control scope includes one or more types of resources, * such as EFS or RDS.

*/ inline ControlScope& WithComplianceResourceTypes(Aws::Vector&& value) { SetComplianceResourceTypes(std::move(value)); return *this;} /** *

Describes whether the control scope includes one or more types of resources, * such as EFS or RDS.

*/ inline ControlScope& AddComplianceResourceTypes(const Aws::String& value) { m_complianceResourceTypesHasBeenSet = true; m_complianceResourceTypes.push_back(value); return *this; } /** *

Describes whether the control scope includes one or more types of resources, * such as EFS or RDS.

*/ inline ControlScope& AddComplianceResourceTypes(Aws::String&& value) { m_complianceResourceTypesHasBeenSet = true; m_complianceResourceTypes.push_back(std::move(value)); return *this; } /** *

Describes whether the control scope includes one or more types of resources, * such as EFS or RDS.

*/ inline ControlScope& AddComplianceResourceTypes(const char* value) { m_complianceResourceTypesHasBeenSet = true; m_complianceResourceTypes.push_back(value); return *this; } /** *

The tag key-value pair applied to those Amazon Web Services resources that * you want to trigger an evaluation for a rule. A maximum of one key-value pair * can be provided. The tag value is optional, but it cannot be an empty string. * The structure to assign a tag is: * [{"Key":"string","Value":"string"}].

*/ inline const Aws::Map& GetTags() const{ return m_tags; } /** *

The tag key-value pair applied to those Amazon Web Services resources that * you want to trigger an evaluation for a rule. A maximum of one key-value pair * can be provided. The tag value is optional, but it cannot be an empty string. * The structure to assign a tag is: * [{"Key":"string","Value":"string"}].

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The tag key-value pair applied to those Amazon Web Services resources that * you want to trigger an evaluation for a rule. A maximum of one key-value pair * can be provided. The tag value is optional, but it cannot be an empty string. * The structure to assign a tag is: * [{"Key":"string","Value":"string"}].

*/ inline void SetTags(const Aws::Map& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The tag key-value pair applied to those Amazon Web Services resources that * you want to trigger an evaluation for a rule. A maximum of one key-value pair * can be provided. The tag value is optional, but it cannot be an empty string. * The structure to assign a tag is: * [{"Key":"string","Value":"string"}].

*/ inline void SetTags(Aws::Map&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The tag key-value pair applied to those Amazon Web Services resources that * you want to trigger an evaluation for a rule. A maximum of one key-value pair * can be provided. The tag value is optional, but it cannot be an empty string. * The structure to assign a tag is: * [{"Key":"string","Value":"string"}].

*/ inline ControlScope& WithTags(const Aws::Map& value) { SetTags(value); return *this;} /** *

The tag key-value pair applied to those Amazon Web Services resources that * you want to trigger an evaluation for a rule. A maximum of one key-value pair * can be provided. The tag value is optional, but it cannot be an empty string. * The structure to assign a tag is: * [{"Key":"string","Value":"string"}].

*/ inline ControlScope& WithTags(Aws::Map&& value) { SetTags(std::move(value)); return *this;} /** *

The tag key-value pair applied to those Amazon Web Services resources that * you want to trigger an evaluation for a rule. A maximum of one key-value pair * can be provided. The tag value is optional, but it cannot be an empty string. * The structure to assign a tag is: * [{"Key":"string","Value":"string"}].

*/ inline ControlScope& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

The tag key-value pair applied to those Amazon Web Services resources that * you want to trigger an evaluation for a rule. A maximum of one key-value pair * can be provided. The tag value is optional, but it cannot be an empty string. * The structure to assign a tag is: * [{"Key":"string","Value":"string"}].

*/ inline ControlScope& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

The tag key-value pair applied to those Amazon Web Services resources that * you want to trigger an evaluation for a rule. A maximum of one key-value pair * can be provided. The tag value is optional, but it cannot be an empty string. * The structure to assign a tag is: * [{"Key":"string","Value":"string"}].

*/ inline ControlScope& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

The tag key-value pair applied to those Amazon Web Services resources that * you want to trigger an evaluation for a rule. A maximum of one key-value pair * can be provided. The tag value is optional, but it cannot be an empty string. * The structure to assign a tag is: * [{"Key":"string","Value":"string"}].

*/ inline ControlScope& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } /** *

The tag key-value pair applied to those Amazon Web Services resources that * you want to trigger an evaluation for a rule. A maximum of one key-value pair * can be provided. The tag value is optional, but it cannot be an empty string. * The structure to assign a tag is: * [{"Key":"string","Value":"string"}].

*/ inline ControlScope& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

The tag key-value pair applied to those Amazon Web Services resources that * you want to trigger an evaluation for a rule. A maximum of one key-value pair * can be provided. The tag value is optional, but it cannot be an empty string. * The structure to assign a tag is: * [{"Key":"string","Value":"string"}].

*/ inline ControlScope& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

The tag key-value pair applied to those Amazon Web Services resources that * you want to trigger an evaluation for a rule. A maximum of one key-value pair * can be provided. The tag value is optional, but it cannot be an empty string. * The structure to assign a tag is: * [{"Key":"string","Value":"string"}].

*/ inline ControlScope& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } private: Aws::Vector m_complianceResourceIds; bool m_complianceResourceIdsHasBeenSet = false; Aws::Vector m_complianceResourceTypes; bool m_complianceResourceTypesHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace Backup } // namespace Aws