Skip to main content

safety_rules

Creates, updates, deletes or gets a safety_rule resource or lists safety_rules in a region

Overview

Namesafety_rules
TypeResource
DescriptionResource schema for AWS Route53 Recovery Control basic constructs and validation rules.
Idaws.route53recoverycontrol.safety_rules

Fields

NameDatatypeDescription
assertion_ruleobjectAn assertion rule enforces that, when a routing control state is changed, that the criteria set by the rule configuration is met. Otherwise, the change to the routing control is not accepted.
gating_ruleobjectA 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.
namestringThe name for the safety rule.
safety_rule_arnstringThe Amazon Resource Name (ARN) of the safety rule.
control_panel_arnstringThe Amazon Resource Name (ARN) of the control panel.
statusstringThe deployment status of the routing control. Status can be one of the following: PENDING, DEPLOYED, PENDING_DELETION.
rule_configobjectThe rule configuration for an assertion rule or gating rule. This is the criteria that you set for specific assertion controls (routing controls) or gating controls. This configuration specifies how many controls must be enabled after a transaction completes.
tagsarrayA collection of tags associated with a resource
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERT, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all safety_rules in a region.

SELECT
region,
assertion_rule,
gating_rule,
name,
safety_rule_arn,
control_panel_arn,
status,
rule_config,
tags
FROM aws.route53recoverycontrol.safety_rules
WHERE region = 'us-east-1';

Gets all properties from an individual safety_rule.

SELECT
region,
assertion_rule,
gating_rule,
name,
safety_rule_arn,
control_panel_arn,
status,
rule_config,
tags
FROM aws.route53recoverycontrol.safety_rules
WHERE region = 'us-east-1' AND data__Identifier = '<SafetyRuleArn>';

INSERT example

Use the following StackQL query and manifest file to create a new safety_rule resource, using stack-deploy.

/*+ create */
INSERT INTO aws.route53recoverycontrol.safety_rules (
,
region
)
SELECT
'{{ }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.route53recoverycontrol.safety_rules
WHERE data__Identifier = '<SafetyRuleArn>'
AND region = 'us-east-1';

Permissions

To operate on the safety_rules resource, the following permissions are required:

Create

route53-recovery-control-config:CreateSafetyRule,
route53-recovery-control-config:DescribeSafetyRule,
route53-recovery-control-config:DescribeControlPanel,
route53-recovery-control-config:DescribeRoutingControl,
route53-recovery-control-config:ListTagsForResource,
route53-recovery-control-config:TagResource

Read

route53-recovery-control-config:DescribeSafetyRule,
route53-recovery-control-config:ListTagsForResource

Update

route53-recovery-control-config:UpdateSafetyRule,
route53-recovery-control-config:DescribeSafetyRule,
route53-recovery-control-config:ListTagsForResource,
route53-recovery-control-config:TagResource,
route53-recovery-control-config:UntagResource

Delete

route53-recovery-control-config:DescribeSafetyRule,
route53-recovery-control-config:DeleteSafetyRule

List

route53-recovery-control-config:ListSafetyRules