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

Provides the CustomPolicyDetails, the rule owner (Amazon Web * Services for managed rules, CUSTOM_POLICY for Custom Policy * rules, and CUSTOM_LAMBDA for Custom Lambda rules), the rule * identifier, and the events that cause the evaluation of your Amazon Web Services * resources.

See Also:

AWS API * Reference

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

Indicates whether Amazon Web Services or the customer owns and manages the * Config rule.

Config Managed Rules are predefined rules owned by Amazon * Web Services. For more information, see Config * Managed Rules in the Config developer guide.

Config Custom * Rules are rules that you can develop either with Guard * (CUSTOM_POLICY) or Lambda (CUSTOM_LAMBDA). For more * information, see Config * Custom Rules in the Config developer guide.

*/ inline const Owner& GetOwner() const{ return m_owner; } /** *

Indicates whether Amazon Web Services or the customer owns and manages the * Config rule.

Config Managed Rules are predefined rules owned by Amazon * Web Services. For more information, see Config * Managed Rules in the Config developer guide.

Config Custom * Rules are rules that you can develop either with Guard * (CUSTOM_POLICY) or Lambda (CUSTOM_LAMBDA). For more * information, see Config * Custom Rules in the Config developer guide.

*/ inline bool OwnerHasBeenSet() const { return m_ownerHasBeenSet; } /** *

Indicates whether Amazon Web Services or the customer owns and manages the * Config rule.

Config Managed Rules are predefined rules owned by Amazon * Web Services. For more information, see Config * Managed Rules in the Config developer guide.

Config Custom * Rules are rules that you can develop either with Guard * (CUSTOM_POLICY) or Lambda (CUSTOM_LAMBDA). For more * information, see Config * Custom Rules in the Config developer guide.

*/ inline void SetOwner(const Owner& value) { m_ownerHasBeenSet = true; m_owner = value; } /** *

Indicates whether Amazon Web Services or the customer owns and manages the * Config rule.

Config Managed Rules are predefined rules owned by Amazon * Web Services. For more information, see Config * Managed Rules in the Config developer guide.

Config Custom * Rules are rules that you can develop either with Guard * (CUSTOM_POLICY) or Lambda (CUSTOM_LAMBDA). For more * information, see Config * Custom Rules in the Config developer guide.

*/ inline void SetOwner(Owner&& value) { m_ownerHasBeenSet = true; m_owner = std::move(value); } /** *

Indicates whether Amazon Web Services or the customer owns and manages the * Config rule.

Config Managed Rules are predefined rules owned by Amazon * Web Services. For more information, see Config * Managed Rules in the Config developer guide.

Config Custom * Rules are rules that you can develop either with Guard * (CUSTOM_POLICY) or Lambda (CUSTOM_LAMBDA). For more * information, see Config * Custom Rules in the Config developer guide.

*/ inline Source& WithOwner(const Owner& value) { SetOwner(value); return *this;} /** *

Indicates whether Amazon Web Services or the customer owns and manages the * Config rule.

Config Managed Rules are predefined rules owned by Amazon * Web Services. For more information, see Config * Managed Rules in the Config developer guide.

Config Custom * Rules are rules that you can develop either with Guard * (CUSTOM_POLICY) or Lambda (CUSTOM_LAMBDA). For more * information, see Config * Custom Rules in the Config developer guide.

*/ inline Source& WithOwner(Owner&& value) { SetOwner(std::move(value)); return *this;} /** *

For Config Managed rules, a predefined identifier from a list. For example, * IAM_PASSWORD_POLICY is a managed rule. To reference a managed rule, * see List * of Config Managed Rules.

For Config Custom Lambda rules, the * identifier is the Amazon Resource Name (ARN) of the rule's Lambda function, such * as * arn:aws:lambda:us-east-2:123456789012:function:custom_rule_name.

*

For Config Custom Policy rules, this field will be ignored.

*/ inline const Aws::String& GetSourceIdentifier() const{ return m_sourceIdentifier; } /** *

For Config Managed rules, a predefined identifier from a list. For example, * IAM_PASSWORD_POLICY is a managed rule. To reference a managed rule, * see List * of Config Managed Rules.

For Config Custom Lambda rules, the * identifier is the Amazon Resource Name (ARN) of the rule's Lambda function, such * as * arn:aws:lambda:us-east-2:123456789012:function:custom_rule_name.

*

For Config Custom Policy rules, this field will be ignored.

*/ inline bool SourceIdentifierHasBeenSet() const { return m_sourceIdentifierHasBeenSet; } /** *

For Config Managed rules, a predefined identifier from a list. For example, * IAM_PASSWORD_POLICY is a managed rule. To reference a managed rule, * see List * of Config Managed Rules.

For Config Custom Lambda rules, the * identifier is the Amazon Resource Name (ARN) of the rule's Lambda function, such * as * arn:aws:lambda:us-east-2:123456789012:function:custom_rule_name.

*

For Config Custom Policy rules, this field will be ignored.

*/ inline void SetSourceIdentifier(const Aws::String& value) { m_sourceIdentifierHasBeenSet = true; m_sourceIdentifier = value; } /** *

For Config Managed rules, a predefined identifier from a list. For example, * IAM_PASSWORD_POLICY is a managed rule. To reference a managed rule, * see List * of Config Managed Rules.

For Config Custom Lambda rules, the * identifier is the Amazon Resource Name (ARN) of the rule's Lambda function, such * as * arn:aws:lambda:us-east-2:123456789012:function:custom_rule_name.

*

For Config Custom Policy rules, this field will be ignored.

*/ inline void SetSourceIdentifier(Aws::String&& value) { m_sourceIdentifierHasBeenSet = true; m_sourceIdentifier = std::move(value); } /** *

For Config Managed rules, a predefined identifier from a list. For example, * IAM_PASSWORD_POLICY is a managed rule. To reference a managed rule, * see List * of Config Managed Rules.

For Config Custom Lambda rules, the * identifier is the Amazon Resource Name (ARN) of the rule's Lambda function, such * as * arn:aws:lambda:us-east-2:123456789012:function:custom_rule_name.

*

For Config Custom Policy rules, this field will be ignored.

*/ inline void SetSourceIdentifier(const char* value) { m_sourceIdentifierHasBeenSet = true; m_sourceIdentifier.assign(value); } /** *

For Config Managed rules, a predefined identifier from a list. For example, * IAM_PASSWORD_POLICY is a managed rule. To reference a managed rule, * see List * of Config Managed Rules.

For Config Custom Lambda rules, the * identifier is the Amazon Resource Name (ARN) of the rule's Lambda function, such * as * arn:aws:lambda:us-east-2:123456789012:function:custom_rule_name.

*

For Config Custom Policy rules, this field will be ignored.

*/ inline Source& WithSourceIdentifier(const Aws::String& value) { SetSourceIdentifier(value); return *this;} /** *

For Config Managed rules, a predefined identifier from a list. For example, * IAM_PASSWORD_POLICY is a managed rule. To reference a managed rule, * see List * of Config Managed Rules.

For Config Custom Lambda rules, the * identifier is the Amazon Resource Name (ARN) of the rule's Lambda function, such * as * arn:aws:lambda:us-east-2:123456789012:function:custom_rule_name.

*

For Config Custom Policy rules, this field will be ignored.

*/ inline Source& WithSourceIdentifier(Aws::String&& value) { SetSourceIdentifier(std::move(value)); return *this;} /** *

For Config Managed rules, a predefined identifier from a list. For example, * IAM_PASSWORD_POLICY is a managed rule. To reference a managed rule, * see List * of Config Managed Rules.

For Config Custom Lambda rules, the * identifier is the Amazon Resource Name (ARN) of the rule's Lambda function, such * as * arn:aws:lambda:us-east-2:123456789012:function:custom_rule_name.

*

For Config Custom Policy rules, this field will be ignored.

*/ inline Source& WithSourceIdentifier(const char* value) { SetSourceIdentifier(value); return *this;} /** *

Provides the source and the message types that cause Config to evaluate your * Amazon Web Services resources against a rule. It also provides the frequency * with which you want Config to run evaluations for the rule if the trigger type * is periodic.

If the owner is set to CUSTOM_POLICY, the only * acceptable values for the Config rule trigger message type are * ConfigurationItemChangeNotification and * OversizedConfigurationItemChangeNotification.

*/ inline const Aws::Vector& GetSourceDetails() const{ return m_sourceDetails; } /** *

Provides the source and the message types that cause Config to evaluate your * Amazon Web Services resources against a rule. It also provides the frequency * with which you want Config to run evaluations for the rule if the trigger type * is periodic.

If the owner is set to CUSTOM_POLICY, the only * acceptable values for the Config rule trigger message type are * ConfigurationItemChangeNotification and * OversizedConfigurationItemChangeNotification.

*/ inline bool SourceDetailsHasBeenSet() const { return m_sourceDetailsHasBeenSet; } /** *

Provides the source and the message types that cause Config to evaluate your * Amazon Web Services resources against a rule. It also provides the frequency * with which you want Config to run evaluations for the rule if the trigger type * is periodic.

If the owner is set to CUSTOM_POLICY, the only * acceptable values for the Config rule trigger message type are * ConfigurationItemChangeNotification and * OversizedConfigurationItemChangeNotification.

*/ inline void SetSourceDetails(const Aws::Vector& value) { m_sourceDetailsHasBeenSet = true; m_sourceDetails = value; } /** *

Provides the source and the message types that cause Config to evaluate your * Amazon Web Services resources against a rule. It also provides the frequency * with which you want Config to run evaluations for the rule if the trigger type * is periodic.

If the owner is set to CUSTOM_POLICY, the only * acceptable values for the Config rule trigger message type are * ConfigurationItemChangeNotification and * OversizedConfigurationItemChangeNotification.

*/ inline void SetSourceDetails(Aws::Vector&& value) { m_sourceDetailsHasBeenSet = true; m_sourceDetails = std::move(value); } /** *

Provides the source and the message types that cause Config to evaluate your * Amazon Web Services resources against a rule. It also provides the frequency * with which you want Config to run evaluations for the rule if the trigger type * is periodic.

If the owner is set to CUSTOM_POLICY, the only * acceptable values for the Config rule trigger message type are * ConfigurationItemChangeNotification and * OversizedConfigurationItemChangeNotification.

*/ inline Source& WithSourceDetails(const Aws::Vector& value) { SetSourceDetails(value); return *this;} /** *

Provides the source and the message types that cause Config to evaluate your * Amazon Web Services resources against a rule. It also provides the frequency * with which you want Config to run evaluations for the rule if the trigger type * is periodic.

If the owner is set to CUSTOM_POLICY, the only * acceptable values for the Config rule trigger message type are * ConfigurationItemChangeNotification and * OversizedConfigurationItemChangeNotification.

*/ inline Source& WithSourceDetails(Aws::Vector&& value) { SetSourceDetails(std::move(value)); return *this;} /** *

Provides the source and the message types that cause Config to evaluate your * Amazon Web Services resources against a rule. It also provides the frequency * with which you want Config to run evaluations for the rule if the trigger type * is periodic.

If the owner is set to CUSTOM_POLICY, the only * acceptable values for the Config rule trigger message type are * ConfigurationItemChangeNotification and * OversizedConfigurationItemChangeNotification.

*/ inline Source& AddSourceDetails(const SourceDetail& value) { m_sourceDetailsHasBeenSet = true; m_sourceDetails.push_back(value); return *this; } /** *

Provides the source and the message types that cause Config to evaluate your * Amazon Web Services resources against a rule. It also provides the frequency * with which you want Config to run evaluations for the rule if the trigger type * is periodic.

If the owner is set to CUSTOM_POLICY, the only * acceptable values for the Config rule trigger message type are * ConfigurationItemChangeNotification and * OversizedConfigurationItemChangeNotification.

*/ inline Source& AddSourceDetails(SourceDetail&& value) { m_sourceDetailsHasBeenSet = true; m_sourceDetails.push_back(std::move(value)); return *this; } /** *

Provides the runtime system, policy definition, and whether debug logging is * enabled. Required when owner is set to CUSTOM_POLICY.

*/ inline const CustomPolicyDetails& GetCustomPolicyDetails() const{ return m_customPolicyDetails; } /** *

Provides the runtime system, policy definition, and whether debug logging is * enabled. Required when owner is set to CUSTOM_POLICY.

*/ inline bool CustomPolicyDetailsHasBeenSet() const { return m_customPolicyDetailsHasBeenSet; } /** *

Provides the runtime system, policy definition, and whether debug logging is * enabled. Required when owner is set to CUSTOM_POLICY.

*/ inline void SetCustomPolicyDetails(const CustomPolicyDetails& value) { m_customPolicyDetailsHasBeenSet = true; m_customPolicyDetails = value; } /** *

Provides the runtime system, policy definition, and whether debug logging is * enabled. Required when owner is set to CUSTOM_POLICY.

*/ inline void SetCustomPolicyDetails(CustomPolicyDetails&& value) { m_customPolicyDetailsHasBeenSet = true; m_customPolicyDetails = std::move(value); } /** *

Provides the runtime system, policy definition, and whether debug logging is * enabled. Required when owner is set to CUSTOM_POLICY.

*/ inline Source& WithCustomPolicyDetails(const CustomPolicyDetails& value) { SetCustomPolicyDetails(value); return *this;} /** *

Provides the runtime system, policy definition, and whether debug logging is * enabled. Required when owner is set to CUSTOM_POLICY.

*/ inline Source& WithCustomPolicyDetails(CustomPolicyDetails&& value) { SetCustomPolicyDetails(std::move(value)); return *this;} private: Owner m_owner; bool m_ownerHasBeenSet = false; Aws::String m_sourceIdentifier; bool m_sourceIdentifierHasBeenSet = false; Aws::Vector m_sourceDetails; bool m_sourceDetailsHasBeenSet = false; CustomPolicyDetails m_customPolicyDetails; bool m_customPolicyDetailsHasBeenSet = false; }; } // namespace Model } // namespace ConfigService } // namespace Aws