/** * 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 CloudWatch { namespace Model { /** */ class PutInsightRuleRequest : public CloudWatchRequest { public: AWS_CLOUDWATCH_API PutInsightRuleRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "PutInsightRule"; } AWS_CLOUDWATCH_API Aws::String SerializePayload() const override; protected: AWS_CLOUDWATCH_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

A unique name for the rule.

*/ inline const Aws::String& GetRuleName() const{ return m_ruleName; } /** *

A unique name for the rule.

*/ inline bool RuleNameHasBeenSet() const { return m_ruleNameHasBeenSet; } /** *

A unique name for the rule.

*/ inline void SetRuleName(const Aws::String& value) { m_ruleNameHasBeenSet = true; m_ruleName = value; } /** *

A unique name for the rule.

*/ inline void SetRuleName(Aws::String&& value) { m_ruleNameHasBeenSet = true; m_ruleName = std::move(value); } /** *

A unique name for the rule.

*/ inline void SetRuleName(const char* value) { m_ruleNameHasBeenSet = true; m_ruleName.assign(value); } /** *

A unique name for the rule.

*/ inline PutInsightRuleRequest& WithRuleName(const Aws::String& value) { SetRuleName(value); return *this;} /** *

A unique name for the rule.

*/ inline PutInsightRuleRequest& WithRuleName(Aws::String&& value) { SetRuleName(std::move(value)); return *this;} /** *

A unique name for the rule.

*/ inline PutInsightRuleRequest& WithRuleName(const char* value) { SetRuleName(value); return *this;} /** *

The state of the rule. Valid values are ENABLED and DISABLED.

*/ inline const Aws::String& GetRuleState() const{ return m_ruleState; } /** *

The state of the rule. Valid values are ENABLED and DISABLED.

*/ inline bool RuleStateHasBeenSet() const { return m_ruleStateHasBeenSet; } /** *

The state of the rule. Valid values are ENABLED and DISABLED.

*/ inline void SetRuleState(const Aws::String& value) { m_ruleStateHasBeenSet = true; m_ruleState = value; } /** *

The state of the rule. Valid values are ENABLED and DISABLED.

*/ inline void SetRuleState(Aws::String&& value) { m_ruleStateHasBeenSet = true; m_ruleState = std::move(value); } /** *

The state of the rule. Valid values are ENABLED and DISABLED.

*/ inline void SetRuleState(const char* value) { m_ruleStateHasBeenSet = true; m_ruleState.assign(value); } /** *

The state of the rule. Valid values are ENABLED and DISABLED.

*/ inline PutInsightRuleRequest& WithRuleState(const Aws::String& value) { SetRuleState(value); return *this;} /** *

The state of the rule. Valid values are ENABLED and DISABLED.

*/ inline PutInsightRuleRequest& WithRuleState(Aws::String&& value) { SetRuleState(std::move(value)); return *this;} /** *

The state of the rule. Valid values are ENABLED and DISABLED.

*/ inline PutInsightRuleRequest& WithRuleState(const char* value) { SetRuleState(value); return *this;} /** *

The definition of the rule, as a JSON object. For details on the valid * syntax, see Contributor * Insights Rule Syntax.

*/ inline const Aws::String& GetRuleDefinition() const{ return m_ruleDefinition; } /** *

The definition of the rule, as a JSON object. For details on the valid * syntax, see Contributor * Insights Rule Syntax.

*/ inline bool RuleDefinitionHasBeenSet() const { return m_ruleDefinitionHasBeenSet; } /** *

The definition of the rule, as a JSON object. For details on the valid * syntax, see Contributor * Insights Rule Syntax.

*/ inline void SetRuleDefinition(const Aws::String& value) { m_ruleDefinitionHasBeenSet = true; m_ruleDefinition = value; } /** *

The definition of the rule, as a JSON object. For details on the valid * syntax, see Contributor * Insights Rule Syntax.

*/ inline void SetRuleDefinition(Aws::String&& value) { m_ruleDefinitionHasBeenSet = true; m_ruleDefinition = std::move(value); } /** *

The definition of the rule, as a JSON object. For details on the valid * syntax, see Contributor * Insights Rule Syntax.

*/ inline void SetRuleDefinition(const char* value) { m_ruleDefinitionHasBeenSet = true; m_ruleDefinition.assign(value); } /** *

The definition of the rule, as a JSON object. For details on the valid * syntax, see Contributor * Insights Rule Syntax.

*/ inline PutInsightRuleRequest& WithRuleDefinition(const Aws::String& value) { SetRuleDefinition(value); return *this;} /** *

The definition of the rule, as a JSON object. For details on the valid * syntax, see Contributor * Insights Rule Syntax.

*/ inline PutInsightRuleRequest& WithRuleDefinition(Aws::String&& value) { SetRuleDefinition(std::move(value)); return *this;} /** *

The definition of the rule, as a JSON object. For details on the valid * syntax, see Contributor * Insights Rule Syntax.

*/ inline PutInsightRuleRequest& WithRuleDefinition(const char* value) { SetRuleDefinition(value); return *this;} /** *

A list of key-value pairs to associate with the Contributor Insights rule. * You can associate as many as 50 tags with a rule.

Tags can help you * organize and categorize your resources. You can also use them to scope user * permissions, by granting a user permission to access or change only the * resources that have certain tag values.

To be able to associate tags with * a rule, you must have the cloudwatch:TagResource permission in * addition to the cloudwatch:PutInsightRule permission.

If you * are using this operation to update an existing Contributor Insights rule, any * tags you specify in this parameter are ignored. To change the tags of an * existing rule, use TagResource.

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

A list of key-value pairs to associate with the Contributor Insights rule. * You can associate as many as 50 tags with a rule.

Tags can help you * organize and categorize your resources. You can also use them to scope user * permissions, by granting a user permission to access or change only the * resources that have certain tag values.

To be able to associate tags with * a rule, you must have the cloudwatch:TagResource permission in * addition to the cloudwatch:PutInsightRule permission.

If you * are using this operation to update an existing Contributor Insights rule, any * tags you specify in this parameter are ignored. To change the tags of an * existing rule, use TagResource.

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

A list of key-value pairs to associate with the Contributor Insights rule. * You can associate as many as 50 tags with a rule.

Tags can help you * organize and categorize your resources. You can also use them to scope user * permissions, by granting a user permission to access or change only the * resources that have certain tag values.

To be able to associate tags with * a rule, you must have the cloudwatch:TagResource permission in * addition to the cloudwatch:PutInsightRule permission.

If you * are using this operation to update an existing Contributor Insights rule, any * tags you specify in this parameter are ignored. To change the tags of an * existing rule, use TagResource.

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

A list of key-value pairs to associate with the Contributor Insights rule. * You can associate as many as 50 tags with a rule.

Tags can help you * organize and categorize your resources. You can also use them to scope user * permissions, by granting a user permission to access or change only the * resources that have certain tag values.

To be able to associate tags with * a rule, you must have the cloudwatch:TagResource permission in * addition to the cloudwatch:PutInsightRule permission.

If you * are using this operation to update an existing Contributor Insights rule, any * tags you specify in this parameter are ignored. To change the tags of an * existing rule, use TagResource.

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

A list of key-value pairs to associate with the Contributor Insights rule. * You can associate as many as 50 tags with a rule.

Tags can help you * organize and categorize your resources. You can also use them to scope user * permissions, by granting a user permission to access or change only the * resources that have certain tag values.

To be able to associate tags with * a rule, you must have the cloudwatch:TagResource permission in * addition to the cloudwatch:PutInsightRule permission.

If you * are using this operation to update an existing Contributor Insights rule, any * tags you specify in this parameter are ignored. To change the tags of an * existing rule, use TagResource.

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

A list of key-value pairs to associate with the Contributor Insights rule. * You can associate as many as 50 tags with a rule.

Tags can help you * organize and categorize your resources. You can also use them to scope user * permissions, by granting a user permission to access or change only the * resources that have certain tag values.

To be able to associate tags with * a rule, you must have the cloudwatch:TagResource permission in * addition to the cloudwatch:PutInsightRule permission.

If you * are using this operation to update an existing Contributor Insights rule, any * tags you specify in this parameter are ignored. To change the tags of an * existing rule, use TagResource.

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

A list of key-value pairs to associate with the Contributor Insights rule. * You can associate as many as 50 tags with a rule.

Tags can help you * organize and categorize your resources. You can also use them to scope user * permissions, by granting a user permission to access or change only the * resources that have certain tag values.

To be able to associate tags with * a rule, you must have the cloudwatch:TagResource permission in * addition to the cloudwatch:PutInsightRule permission.

If you * are using this operation to update an existing Contributor Insights rule, any * tags you specify in this parameter are ignored. To change the tags of an * existing rule, use TagResource.

*/ inline PutInsightRuleRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

A list of key-value pairs to associate with the Contributor Insights rule. * You can associate as many as 50 tags with a rule.

Tags can help you * organize and categorize your resources. You can also use them to scope user * permissions, by granting a user permission to access or change only the * resources that have certain tag values.

To be able to associate tags with * a rule, you must have the cloudwatch:TagResource permission in * addition to the cloudwatch:PutInsightRule permission.

If you * are using this operation to update an existing Contributor Insights rule, any * tags you specify in this parameter are ignored. To change the tags of an * existing rule, use TagResource.

*/ inline PutInsightRuleRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_ruleName; bool m_ruleNameHasBeenSet = false; Aws::String m_ruleState; bool m_ruleStateHasBeenSet = false; Aws::String m_ruleDefinition; bool m_ruleDefinitionHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace CloudWatch } // namespace Aws