/** * 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 #include #include namespace Aws { namespace SecurityHub { namespace Model { /** */ class CreateAutomationRuleRequest : public SecurityHubRequest { public: AWS_SECURITYHUB_API CreateAutomationRuleRequest(); // 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 "CreateAutomationRule"; } AWS_SECURITYHUB_API Aws::String SerializePayload() const override; /** *

User-defined tags that help you label the purpose of a rule.

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

User-defined tags that help you label the purpose of a rule.

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

User-defined tags that help you label the purpose of a rule.

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

User-defined tags that help you label the purpose of a rule.

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

User-defined tags that help you label the purpose of a rule.

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

User-defined tags that help you label the purpose of a rule.

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

User-defined tags that help you label the purpose of a rule.

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

User-defined tags that help you label the purpose of a rule.

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

User-defined tags that help you label the purpose of a rule.

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

User-defined tags that help you label the purpose of a rule.

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

User-defined tags that help you label the purpose of a rule.

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

User-defined tags that help you label the purpose of a rule.

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

User-defined tags that help you label the purpose of a rule.

*/ inline CreateAutomationRuleRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

Whether the rule is active after it is created. If this parameter is equal * to ENABLED, Security Hub starts applying the rule to findings and * finding updates after the rule is created. To change the value of this parameter * after creating a rule, use * BatchUpdateAutomationRules .

*/ inline const RuleStatus& GetRuleStatus() const{ return m_ruleStatus; } /** *

Whether the rule is active after it is created. If this parameter is equal * to ENABLED, Security Hub starts applying the rule to findings and * finding updates after the rule is created. To change the value of this parameter * after creating a rule, use * BatchUpdateAutomationRules .

*/ inline bool RuleStatusHasBeenSet() const { return m_ruleStatusHasBeenSet; } /** *

Whether the rule is active after it is created. If this parameter is equal * to ENABLED, Security Hub starts applying the rule to findings and * finding updates after the rule is created. To change the value of this parameter * after creating a rule, use * BatchUpdateAutomationRules .

*/ inline void SetRuleStatus(const RuleStatus& value) { m_ruleStatusHasBeenSet = true; m_ruleStatus = value; } /** *

Whether the rule is active after it is created. If this parameter is equal * to ENABLED, Security Hub starts applying the rule to findings and * finding updates after the rule is created. To change the value of this parameter * after creating a rule, use * BatchUpdateAutomationRules .

*/ inline void SetRuleStatus(RuleStatus&& value) { m_ruleStatusHasBeenSet = true; m_ruleStatus = std::move(value); } /** *

Whether the rule is active after it is created. If this parameter is equal * to ENABLED, Security Hub starts applying the rule to findings and * finding updates after the rule is created. To change the value of this parameter * after creating a rule, use * BatchUpdateAutomationRules .

*/ inline CreateAutomationRuleRequest& WithRuleStatus(const RuleStatus& value) { SetRuleStatus(value); return *this;} /** *

Whether the rule is active after it is created. If this parameter is equal * to ENABLED, Security Hub starts applying the rule to findings and * finding updates after the rule is created. To change the value of this parameter * after creating a rule, use * BatchUpdateAutomationRules .

*/ inline CreateAutomationRuleRequest& WithRuleStatus(RuleStatus&& value) { SetRuleStatus(std::move(value)); return *this;} /** *

An integer ranging from 1 to 1000 that represents the order in which the rule * action is applied to findings. Security Hub applies rules with lower values for * this parameter first.

*/ inline int GetRuleOrder() const{ return m_ruleOrder; } /** *

An integer ranging from 1 to 1000 that represents the order in which the rule * action is applied to findings. Security Hub applies rules with lower values for * this parameter first.

*/ inline bool RuleOrderHasBeenSet() const { return m_ruleOrderHasBeenSet; } /** *

An integer ranging from 1 to 1000 that represents the order in which the rule * action is applied to findings. Security Hub applies rules with lower values for * this parameter first.

*/ inline void SetRuleOrder(int value) { m_ruleOrderHasBeenSet = true; m_ruleOrder = value; } /** *

An integer ranging from 1 to 1000 that represents the order in which the rule * action is applied to findings. Security Hub applies rules with lower values for * this parameter first.

*/ inline CreateAutomationRuleRequest& WithRuleOrder(int value) { SetRuleOrder(value); return *this;} /** *

The name of the rule.

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

The name of the rule.

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

The name of the rule.

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

The name of the rule.

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

The name of the rule.

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

The name of the rule.

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

The name of the rule.

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

The name of the rule.

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

A description of the rule.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

A description of the rule.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

A description of the rule.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

A description of the rule.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

A description of the rule.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

A description of the rule.

*/ inline CreateAutomationRuleRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

A description of the rule.

*/ inline CreateAutomationRuleRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

A description of the rule.

*/ inline CreateAutomationRuleRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

Specifies whether a rule is the last to be applied with respect to a finding * that matches the rule criteria. This is useful when a finding matches the * criteria for multiple rules, and each rule has different actions. If a rule is * terminal, Security Hub applies the rule action to a finding that matches the * rule criteria and doesn't evaluate other rules for the finding. By default, a * rule isn't terminal.

*/ inline bool GetIsTerminal() const{ return m_isTerminal; } /** *

Specifies whether a rule is the last to be applied with respect to a finding * that matches the rule criteria. This is useful when a finding matches the * criteria for multiple rules, and each rule has different actions. If a rule is * terminal, Security Hub applies the rule action to a finding that matches the * rule criteria and doesn't evaluate other rules for the finding. By default, a * rule isn't terminal.

*/ inline bool IsTerminalHasBeenSet() const { return m_isTerminalHasBeenSet; } /** *

Specifies whether a rule is the last to be applied with respect to a finding * that matches the rule criteria. This is useful when a finding matches the * criteria for multiple rules, and each rule has different actions. If a rule is * terminal, Security Hub applies the rule action to a finding that matches the * rule criteria and doesn't evaluate other rules for the finding. By default, a * rule isn't terminal.

*/ inline void SetIsTerminal(bool value) { m_isTerminalHasBeenSet = true; m_isTerminal = value; } /** *

Specifies whether a rule is the last to be applied with respect to a finding * that matches the rule criteria. This is useful when a finding matches the * criteria for multiple rules, and each rule has different actions. If a rule is * terminal, Security Hub applies the rule action to a finding that matches the * rule criteria and doesn't evaluate other rules for the finding. By default, a * rule isn't terminal.

*/ inline CreateAutomationRuleRequest& WithIsTerminal(bool value) { SetIsTerminal(value); return *this;} /** *

A set of ASFF finding field attributes and corresponding expected values * that Security Hub uses to filter findings. If a rule is enabled and a finding * matches the conditions specified in this parameter, Security Hub applies the * rule action to the finding.

*/ inline const AutomationRulesFindingFilters& GetCriteria() const{ return m_criteria; } /** *

A set of ASFF finding field attributes and corresponding expected values * that Security Hub uses to filter findings. If a rule is enabled and a finding * matches the conditions specified in this parameter, Security Hub applies the * rule action to the finding.

*/ inline bool CriteriaHasBeenSet() const { return m_criteriaHasBeenSet; } /** *

A set of ASFF finding field attributes and corresponding expected values * that Security Hub uses to filter findings. If a rule is enabled and a finding * matches the conditions specified in this parameter, Security Hub applies the * rule action to the finding.

*/ inline void SetCriteria(const AutomationRulesFindingFilters& value) { m_criteriaHasBeenSet = true; m_criteria = value; } /** *

A set of ASFF finding field attributes and corresponding expected values * that Security Hub uses to filter findings. If a rule is enabled and a finding * matches the conditions specified in this parameter, Security Hub applies the * rule action to the finding.

*/ inline void SetCriteria(AutomationRulesFindingFilters&& value) { m_criteriaHasBeenSet = true; m_criteria = std::move(value); } /** *

A set of ASFF finding field attributes and corresponding expected values * that Security Hub uses to filter findings. If a rule is enabled and a finding * matches the conditions specified in this parameter, Security Hub applies the * rule action to the finding.

*/ inline CreateAutomationRuleRequest& WithCriteria(const AutomationRulesFindingFilters& value) { SetCriteria(value); return *this;} /** *

A set of ASFF finding field attributes and corresponding expected values * that Security Hub uses to filter findings. If a rule is enabled and a finding * matches the conditions specified in this parameter, Security Hub applies the * rule action to the finding.

*/ inline CreateAutomationRuleRequest& WithCriteria(AutomationRulesFindingFilters&& value) { SetCriteria(std::move(value)); return *this;} /** *

One or more actions to update finding fields if a finding matches the * conditions specified in Criteria.

*/ inline const Aws::Vector& GetActions() const{ return m_actions; } /** *

One or more actions to update finding fields if a finding matches the * conditions specified in Criteria.

*/ inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; } /** *

One or more actions to update finding fields if a finding matches the * conditions specified in Criteria.

*/ inline void SetActions(const Aws::Vector& value) { m_actionsHasBeenSet = true; m_actions = value; } /** *

One or more actions to update finding fields if a finding matches the * conditions specified in Criteria.

*/ inline void SetActions(Aws::Vector&& value) { m_actionsHasBeenSet = true; m_actions = std::move(value); } /** *

One or more actions to update finding fields if a finding matches the * conditions specified in Criteria.

*/ inline CreateAutomationRuleRequest& WithActions(const Aws::Vector& value) { SetActions(value); return *this;} /** *

One or more actions to update finding fields if a finding matches the * conditions specified in Criteria.

*/ inline CreateAutomationRuleRequest& WithActions(Aws::Vector&& value) { SetActions(std::move(value)); return *this;} /** *

One or more actions to update finding fields if a finding matches the * conditions specified in Criteria.

*/ inline CreateAutomationRuleRequest& AddActions(const AutomationRulesAction& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; } /** *

One or more actions to update finding fields if a finding matches the * conditions specified in Criteria.

*/ inline CreateAutomationRuleRequest& AddActions(AutomationRulesAction&& value) { m_actionsHasBeenSet = true; m_actions.push_back(std::move(value)); return *this; } private: Aws::Map m_tags; bool m_tagsHasBeenSet = false; RuleStatus m_ruleStatus; bool m_ruleStatusHasBeenSet = false; int m_ruleOrder; bool m_ruleOrderHasBeenSet = false; Aws::String m_ruleName; bool m_ruleNameHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; bool m_isTerminal; bool m_isTerminalHasBeenSet = false; AutomationRulesFindingFilters m_criteria; bool m_criteriaHasBeenSet = false; Aws::Vector m_actions; bool m_actionsHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws