/** * 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 Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Route53RecoveryControlConfig { namespace Model { /** *

A gating rule verifies that a gating routing control or set of gating routing * controls, evaluates as true, based on a rule configuration that you specify, * which allows a set of routing control state changes to complete.

For * example, if you specify one gating routing control and you set the Type in the * rule configuration to OR, that indicates that you must set the gating routing * control to On for the rule to evaluate as true; that is, for the gating control * "switch" to be "On". When you do that, then you can update the routing control * states for the target routing controls that you specify in the gating * rule.

See Also:

AWS * API Reference

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

The Amazon Resource Name (ARN) of the control panel.

*/ inline const Aws::String& GetControlPanelArn() const{ return m_controlPanelArn; } /** *

The Amazon Resource Name (ARN) of the control panel.

*/ inline bool ControlPanelArnHasBeenSet() const { return m_controlPanelArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the control panel.

*/ inline void SetControlPanelArn(const Aws::String& value) { m_controlPanelArnHasBeenSet = true; m_controlPanelArn = value; } /** *

The Amazon Resource Name (ARN) of the control panel.

*/ inline void SetControlPanelArn(Aws::String&& value) { m_controlPanelArnHasBeenSet = true; m_controlPanelArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the control panel.

*/ inline void SetControlPanelArn(const char* value) { m_controlPanelArnHasBeenSet = true; m_controlPanelArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the control panel.

*/ inline GatingRule& WithControlPanelArn(const Aws::String& value) { SetControlPanelArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the control panel.

*/ inline GatingRule& WithControlPanelArn(Aws::String&& value) { SetControlPanelArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the control panel.

*/ inline GatingRule& WithControlPanelArn(const char* value) { SetControlPanelArn(value); return *this;} /** *

An array of gating routing control Amazon Resource Names (ARNs). For a simple * "on/off" switch, specify the ARN for one routing control. The gating routing * controls are evaluated by the rule configuration that you specify to determine * if the target routing control states can be changed.

*/ inline const Aws::Vector& GetGatingControls() const{ return m_gatingControls; } /** *

An array of gating routing control Amazon Resource Names (ARNs). For a simple * "on/off" switch, specify the ARN for one routing control. The gating routing * controls are evaluated by the rule configuration that you specify to determine * if the target routing control states can be changed.

*/ inline bool GatingControlsHasBeenSet() const { return m_gatingControlsHasBeenSet; } /** *

An array of gating routing control Amazon Resource Names (ARNs). For a simple * "on/off" switch, specify the ARN for one routing control. The gating routing * controls are evaluated by the rule configuration that you specify to determine * if the target routing control states can be changed.

*/ inline void SetGatingControls(const Aws::Vector& value) { m_gatingControlsHasBeenSet = true; m_gatingControls = value; } /** *

An array of gating routing control Amazon Resource Names (ARNs). For a simple * "on/off" switch, specify the ARN for one routing control. The gating routing * controls are evaluated by the rule configuration that you specify to determine * if the target routing control states can be changed.

*/ inline void SetGatingControls(Aws::Vector&& value) { m_gatingControlsHasBeenSet = true; m_gatingControls = std::move(value); } /** *

An array of gating routing control Amazon Resource Names (ARNs). For a simple * "on/off" switch, specify the ARN for one routing control. The gating routing * controls are evaluated by the rule configuration that you specify to determine * if the target routing control states can be changed.

*/ inline GatingRule& WithGatingControls(const Aws::Vector& value) { SetGatingControls(value); return *this;} /** *

An array of gating routing control Amazon Resource Names (ARNs). For a simple * "on/off" switch, specify the ARN for one routing control. The gating routing * controls are evaluated by the rule configuration that you specify to determine * if the target routing control states can be changed.

*/ inline GatingRule& WithGatingControls(Aws::Vector&& value) { SetGatingControls(std::move(value)); return *this;} /** *

An array of gating routing control Amazon Resource Names (ARNs). For a simple * "on/off" switch, specify the ARN for one routing control. The gating routing * controls are evaluated by the rule configuration that you specify to determine * if the target routing control states can be changed.

*/ inline GatingRule& AddGatingControls(const Aws::String& value) { m_gatingControlsHasBeenSet = true; m_gatingControls.push_back(value); return *this; } /** *

An array of gating routing control Amazon Resource Names (ARNs). For a simple * "on/off" switch, specify the ARN for one routing control. The gating routing * controls are evaluated by the rule configuration that you specify to determine * if the target routing control states can be changed.

*/ inline GatingRule& AddGatingControls(Aws::String&& value) { m_gatingControlsHasBeenSet = true; m_gatingControls.push_back(std::move(value)); return *this; } /** *

An array of gating routing control Amazon Resource Names (ARNs). For a simple * "on/off" switch, specify the ARN for one routing control. The gating routing * controls are evaluated by the rule configuration that you specify to determine * if the target routing control states can be changed.

*/ inline GatingRule& AddGatingControls(const char* value) { m_gatingControlsHasBeenSet = true; m_gatingControls.push_back(value); return *this; } /** *

The name for the gating rule. You can use any non-white space character in * the name.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name for the gating rule. You can use any non-white space character in * the name.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name for the gating rule. You can use any non-white space character in * the name.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name for the gating rule. You can use any non-white space character in * the name.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name for the gating rule. You can use any non-white space character in * the name.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name for the gating rule. You can use any non-white space character in * the name.

*/ inline GatingRule& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name for the gating rule. You can use any non-white space character in * the name.

*/ inline GatingRule& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name for the gating rule. You can use any non-white space character in * the name.

*/ inline GatingRule& WithName(const char* value) { SetName(value); return *this;} /** *

The criteria that you set for gating routing controls that designate how many * of the routing control states must be ON to allow you to update target routing * control states.

*/ inline const RuleConfig& GetRuleConfig() const{ return m_ruleConfig; } /** *

The criteria that you set for gating routing controls that designate how many * of the routing control states must be ON to allow you to update target routing * control states.

*/ inline bool RuleConfigHasBeenSet() const { return m_ruleConfigHasBeenSet; } /** *

The criteria that you set for gating routing controls that designate how many * of the routing control states must be ON to allow you to update target routing * control states.

*/ inline void SetRuleConfig(const RuleConfig& value) { m_ruleConfigHasBeenSet = true; m_ruleConfig = value; } /** *

The criteria that you set for gating routing controls that designate how many * of the routing control states must be ON to allow you to update target routing * control states.

*/ inline void SetRuleConfig(RuleConfig&& value) { m_ruleConfigHasBeenSet = true; m_ruleConfig = std::move(value); } /** *

The criteria that you set for gating routing controls that designate how many * of the routing control states must be ON to allow you to update target routing * control states.

*/ inline GatingRule& WithRuleConfig(const RuleConfig& value) { SetRuleConfig(value); return *this;} /** *

The criteria that you set for gating routing controls that designate how many * of the routing control states must be ON to allow you to update target routing * control states.

*/ inline GatingRule& WithRuleConfig(RuleConfig&& value) { SetRuleConfig(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the gating rule.

*/ inline const Aws::String& GetSafetyRuleArn() const{ return m_safetyRuleArn; } /** *

The Amazon Resource Name (ARN) of the gating rule.

*/ inline bool SafetyRuleArnHasBeenSet() const { return m_safetyRuleArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the gating rule.

*/ inline void SetSafetyRuleArn(const Aws::String& value) { m_safetyRuleArnHasBeenSet = true; m_safetyRuleArn = value; } /** *

The Amazon Resource Name (ARN) of the gating rule.

*/ inline void SetSafetyRuleArn(Aws::String&& value) { m_safetyRuleArnHasBeenSet = true; m_safetyRuleArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the gating rule.

*/ inline void SetSafetyRuleArn(const char* value) { m_safetyRuleArnHasBeenSet = true; m_safetyRuleArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the gating rule.

*/ inline GatingRule& WithSafetyRuleArn(const Aws::String& value) { SetSafetyRuleArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the gating rule.

*/ inline GatingRule& WithSafetyRuleArn(Aws::String&& value) { SetSafetyRuleArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the gating rule.

*/ inline GatingRule& WithSafetyRuleArn(const char* value) { SetSafetyRuleArn(value); return *this;} /** *

The deployment status of a gating rule. Status can be one of the following: * PENDING, DEPLOYED, PENDING_DELETION.

*/ inline const Status& GetStatus() const{ return m_status; } /** *

The deployment status of a gating rule. Status can be one of the following: * PENDING, DEPLOYED, PENDING_DELETION.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The deployment status of a gating rule. Status can be one of the following: * PENDING, DEPLOYED, PENDING_DELETION.

*/ inline void SetStatus(const Status& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The deployment status of a gating rule. Status can be one of the following: * PENDING, DEPLOYED, PENDING_DELETION.

*/ inline void SetStatus(Status&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The deployment status of a gating rule. Status can be one of the following: * PENDING, DEPLOYED, PENDING_DELETION.

*/ inline GatingRule& WithStatus(const Status& value) { SetStatus(value); return *this;} /** *

The deployment status of a gating rule. Status can be one of the following: * PENDING, DEPLOYED, PENDING_DELETION.

*/ inline GatingRule& WithStatus(Status&& value) { SetStatus(std::move(value)); return *this;} /** *

An array of target routing control Amazon Resource Names (ARNs) for which the * states can only be updated if the rule configuration that you specify evaluates * to true for the gating routing control. As a simple example, if you have a * single gating control, it acts as an overall "on/off" switch for a set of target * routing controls. You can use this to manually override automated failover, for * example.

*/ inline const Aws::Vector& GetTargetControls() const{ return m_targetControls; } /** *

An array of target routing control Amazon Resource Names (ARNs) for which the * states can only be updated if the rule configuration that you specify evaluates * to true for the gating routing control. As a simple example, if you have a * single gating control, it acts as an overall "on/off" switch for a set of target * routing controls. You can use this to manually override automated failover, for * example.

*/ inline bool TargetControlsHasBeenSet() const { return m_targetControlsHasBeenSet; } /** *

An array of target routing control Amazon Resource Names (ARNs) for which the * states can only be updated if the rule configuration that you specify evaluates * to true for the gating routing control. As a simple example, if you have a * single gating control, it acts as an overall "on/off" switch for a set of target * routing controls. You can use this to manually override automated failover, for * example.

*/ inline void SetTargetControls(const Aws::Vector& value) { m_targetControlsHasBeenSet = true; m_targetControls = value; } /** *

An array of target routing control Amazon Resource Names (ARNs) for which the * states can only be updated if the rule configuration that you specify evaluates * to true for the gating routing control. As a simple example, if you have a * single gating control, it acts as an overall "on/off" switch for a set of target * routing controls. You can use this to manually override automated failover, for * example.

*/ inline void SetTargetControls(Aws::Vector&& value) { m_targetControlsHasBeenSet = true; m_targetControls = std::move(value); } /** *

An array of target routing control Amazon Resource Names (ARNs) for which the * states can only be updated if the rule configuration that you specify evaluates * to true for the gating routing control. As a simple example, if you have a * single gating control, it acts as an overall "on/off" switch for a set of target * routing controls. You can use this to manually override automated failover, for * example.

*/ inline GatingRule& WithTargetControls(const Aws::Vector& value) { SetTargetControls(value); return *this;} /** *

An array of target routing control Amazon Resource Names (ARNs) for which the * states can only be updated if the rule configuration that you specify evaluates * to true for the gating routing control. As a simple example, if you have a * single gating control, it acts as an overall "on/off" switch for a set of target * routing controls. You can use this to manually override automated failover, for * example.

*/ inline GatingRule& WithTargetControls(Aws::Vector&& value) { SetTargetControls(std::move(value)); return *this;} /** *

An array of target routing control Amazon Resource Names (ARNs) for which the * states can only be updated if the rule configuration that you specify evaluates * to true for the gating routing control. As a simple example, if you have a * single gating control, it acts as an overall "on/off" switch for a set of target * routing controls. You can use this to manually override automated failover, for * example.

*/ inline GatingRule& AddTargetControls(const Aws::String& value) { m_targetControlsHasBeenSet = true; m_targetControls.push_back(value); return *this; } /** *

An array of target routing control Amazon Resource Names (ARNs) for which the * states can only be updated if the rule configuration that you specify evaluates * to true for the gating routing control. As a simple example, if you have a * single gating control, it acts as an overall "on/off" switch for a set of target * routing controls. You can use this to manually override automated failover, for * example.

*/ inline GatingRule& AddTargetControls(Aws::String&& value) { m_targetControlsHasBeenSet = true; m_targetControls.push_back(std::move(value)); return *this; } /** *

An array of target routing control Amazon Resource Names (ARNs) for which the * states can only be updated if the rule configuration that you specify evaluates * to true for the gating routing control. As a simple example, if you have a * single gating control, it acts as an overall "on/off" switch for a set of target * routing controls. You can use this to manually override automated failover, for * example.

*/ inline GatingRule& AddTargetControls(const char* value) { m_targetControlsHasBeenSet = true; m_targetControls.push_back(value); return *this; } /** *

An evaluation period, in milliseconds (ms), during which any request against * the target routing controls will fail. This helps prevent "flapping" of state. * The wait period is 5000 ms by default, but you can choose a custom value.

*/ inline int GetWaitPeriodMs() const{ return m_waitPeriodMs; } /** *

An evaluation period, in milliseconds (ms), during which any request against * the target routing controls will fail. This helps prevent "flapping" of state. * The wait period is 5000 ms by default, but you can choose a custom value.

*/ inline bool WaitPeriodMsHasBeenSet() const { return m_waitPeriodMsHasBeenSet; } /** *

An evaluation period, in milliseconds (ms), during which any request against * the target routing controls will fail. This helps prevent "flapping" of state. * The wait period is 5000 ms by default, but you can choose a custom value.

*/ inline void SetWaitPeriodMs(int value) { m_waitPeriodMsHasBeenSet = true; m_waitPeriodMs = value; } /** *

An evaluation period, in milliseconds (ms), during which any request against * the target routing controls will fail. This helps prevent "flapping" of state. * The wait period is 5000 ms by default, but you can choose a custom value.

*/ inline GatingRule& WithWaitPeriodMs(int value) { SetWaitPeriodMs(value); return *this;} private: Aws::String m_controlPanelArn; bool m_controlPanelArnHasBeenSet = false; Aws::Vector m_gatingControls; bool m_gatingControlsHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; RuleConfig m_ruleConfig; bool m_ruleConfigHasBeenSet = false; Aws::String m_safetyRuleArn; bool m_safetyRuleArnHasBeenSet = false; Status m_status; bool m_statusHasBeenSet = false; Aws::Vector m_targetControls; bool m_targetControlsHasBeenSet = false; int m_waitPeriodMs; bool m_waitPeriodMsHasBeenSet = false; }; } // namespace Model } // namespace Route53RecoveryControlConfig } // namespace Aws