[ aws . route53-recovery-control-config ]

create-safety-rule

Description

Creates a safety rule in a control panel. Safety rules let you add safeguards around enabling and disabling routing controls, to help prevent unexpected outcomes.

There are two types of safety rules: assertion rules and gating rules.

Assertion rule: An assertion rule enforces that, when a routing control state is changed, the criteria set by the rule configuration is met. Otherwise, the change to the routing control is not accepted.

Gating rule: A gating rule verifies that a set of gating controls evaluates as true, based on a rule configuration that you specify. If the gating rule evaluates to true, Amazon Route 53 Application Recovery Controller allows a set of routing control state changes to run and complete against the set of target controls.

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  create-safety-rule
[--assertion-rule <value>]
[--client-token <value>]
[--gating-rule <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--assertion-rule (structure)

A new assertion rule for a control panel.

AssertedControls -> (list)

The routing controls that are part of transactions that are evaluated to determine if a request to change a routing control state is allowed. For example, you might include three routing controls, one for each of three Amazon Web Services Regions.

(string)

ControlPanelArn -> (string)

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

Name -> (string)

The name of the assertion rule. You can use any non-white space character in the name.

RuleConfig -> (structure)

The criteria that you set for specific assertion controls (routing controls) that designate how many controls must be enabled as the result of a transaction. For example, if you have three assertion controls, you might specify atleast 2 for your rule configuration. This means that at least two assertion controls must be enabled, so that at least two Amazon Web Services Regions are enabled.

Inverted -> (boolean)

Logical negation of the rule. If the rule would usually evaluate true, it’s evaluated as false, and vice versa.

Threshold -> (integer)

The value of N, when you specify an ATLEAST rule type. That is, Threshold is the number of controls that must be set when you specify an ATLEAST type.

Type -> (string)

A rule can be one of the following: ATLEAST, AND, or OR.

WaitPeriodMs -> (integer)

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.

Shorthand Syntax:

AssertedControls=string,string,ControlPanelArn=string,Name=string,RuleConfig={Inverted=boolean,Threshold=integer,Type=string},WaitPeriodMs=integer

JSON Syntax:

{
  "AssertedControls": ["string", ...],
  "ControlPanelArn": "string",
  "Name": "string",
  "RuleConfig": {
    "Inverted": true|false,
    "Threshold": integer,
    "Type": "ATLEAST"|"AND"|"OR"
  },
  "WaitPeriodMs": integer
}

--client-token (string)

Unique client idempotency token.

--gating-rule (structure)

A new gating rule for a control panel.

ControlPanelArn -> (string)

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

GatingControls -> (list)

The gating controls for the new gating rule. That is, routing controls that are evaluated by the rule configuration that you specify.

(string)

Name -> (string)

The name for the new gating rule.

RuleConfig -> (structure)

The criteria that you set for specific gating controls (routing controls) that designates how many controls must be enabled to allow you to change (set or unset) the target controls.

Inverted -> (boolean)

Logical negation of the rule. If the rule would usually evaluate true, it’s evaluated as false, and vice versa.

Threshold -> (integer)

The value of N, when you specify an ATLEAST rule type. That is, Threshold is the number of controls that must be set when you specify an ATLEAST type.

Type -> (string)

A rule can be one of the following: ATLEAST, AND, or OR.

TargetControls -> (list)

Routing controls that can only be set or unset if the specified RuleConfig evaluates to true for the specified GatingControls. For example, say you have three gating controls, one for each of three Amazon Web Services Regions. Now you specify AtLeast 2 as your RuleConfig. With these settings, you can only change (set or unset) the routing controls that you have specified as TargetControls if that rule evaluates to true.

In other words, your ability to change the routing controls that you have specified as TargetControls is gated by the rule that you set for the routing controls in GatingControls.

(string)

WaitPeriodMs -> (integer)

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.

Shorthand Syntax:

ControlPanelArn=string,GatingControls=string,string,Name=string,RuleConfig={Inverted=boolean,Threshold=integer,Type=string},TargetControls=string,string,WaitPeriodMs=integer

JSON Syntax:

{
  "ControlPanelArn": "string",
  "GatingControls": ["string", ...],
  "Name": "string",
  "RuleConfig": {
    "Inverted": true|false,
    "Threshold": integer,
    "Type": "ATLEAST"|"AND"|"OR"
  },
  "TargetControls": ["string", ...],
  "WaitPeriodMs": integer
}

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See ‘aws help’ for descriptions of global parameters.

Output

AssertionRule -> (structure)

An assertion rule enforces that, when a routing control state is changed, the criteria set by the rule configuration is met. Otherwise, the change to the routing control is not accepted.

AssertedControls -> (list)

The routing controls that are part of transactions that are evaluated to determine if a request to change a routing control state is allowed. For example, you might include three routing controls, one for each of three Amazon Web Services Regions.

(string)

ControlPanelArn -> (string)

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

Name -> (string)

Name of the assertion rule. You can use any non-white space character in the name.

RuleConfig -> (structure)

The criteria that you set for specific assertion controls (routing controls) that designate how many controls must be enabled as the result of a transaction. For example, if you have three assertion controls, you might specify atleast 2 for your rule configuration. This means that at least two assertion controls must be enabled, so that at least two Amazon Web Services Regions are enabled.

Inverted -> (boolean)

Logical negation of the rule. If the rule would usually evaluate true, it’s evaluated as false, and vice versa.

Threshold -> (integer)

The value of N, when you specify an ATLEAST rule type. That is, Threshold is the number of controls that must be set when you specify an ATLEAST type.

Type -> (string)

A rule can be one of the following: ATLEAST, AND, or OR.

SafetyRuleArn -> (string)

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

Status -> (string)

The deployment status of an assertion rule. Status can be one of the following: PENDING, DEPLOYED, PENDING_DELETION.

WaitPeriodMs -> (integer)

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.

GatingRule -> (structure)

A gating rule verifies that a set of gating controls evaluates as true, based on a rule configuration that you specify. If the gating rule evaluates to true, Amazon Route 53 Application Recovery Controller allows a set of routing control state changes to run and complete against the set of target controls.

ControlPanelArn -> (string)

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

GatingControls -> (list)

The gating controls for the gating rule. That is, routing controls that are evaluated by the rule configuration that you specify.

(string)

Name -> (string)

The name for the gating rule.

RuleConfig -> (structure)

The criteria that you set for specific gating controls (routing controls) that designates how many controls must be enabled to allow you to change (set or unset) the target controls.

Inverted -> (boolean)

Logical negation of the rule. If the rule would usually evaluate true, it’s evaluated as false, and vice versa.

Threshold -> (integer)

The value of N, when you specify an ATLEAST rule type. That is, Threshold is the number of controls that must be set when you specify an ATLEAST type.

Type -> (string)

A rule can be one of the following: ATLEAST, AND, or OR.

SafetyRuleArn -> (string)

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

Status -> (string)

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

TargetControls -> (list)

Routing controls that can only be set or unset if the specified RuleConfig evaluates to true for the specified GatingControls. For example, say you have three gating controls, one for each of three Amazon Web Services Regions. Now you specify ATLEAST 2 as your RuleConfig. With these settings, you can only change (set or unset) the routing controls that you have specified as TargetControls if that rule evaluates to true.

In other words, your ability to change the routing controls that you have specified as TargetControls is gated by the rule that you set for the routing controls in GatingControls.

(string)

WaitPeriodMs -> (integer)

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.