Class CfnSafetyRule
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::Route53RecoveryControl::SafetyRule.
Creates a safety rule in a control panel in Amazon Route 53 Application Recovery Controller. Safety rules in Amazon Route 53 Application Recovery Controller let you add safeguards around changing routing control states, and enabling and disabling routing controls, to help prevent unwanted outcomes. Note that the name of a safety rule must be unique within a control panel.
There are two types of safety rules in Route 53 ARC: assertion rules and gating rules.
Assertion rule: An assertion rule enforces that, when you change a routing control state, certain criteria are met. For example, the criteria might be that at least one routing control state is On after the transaction completes so that traffic continues to be directed to at least one cell for the application. This prevents a fail-open scenario.
Gating rule: A gating rule lets you configure a gating routing control as an overall on-off switch for a group of routing controls. Or, you can configure more complex gating scenarios, for example, by configuring multiple gating routing controls.
For more information, see Safety rules in the Amazon Route 53 Application Recovery Controller Developer Guide.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.route53recoverycontrol.*;
CfnSafetyRule cfnSafetyRule = CfnSafetyRule.Builder.create(this, "MyCfnSafetyRule")
.controlPanelArn("controlPanelArn")
.name("name")
.ruleConfig(RuleConfigProperty.builder()
.inverted(false)
.threshold(123)
.type("type")
.build())
// the properties below are optional
.assertionRule(AssertionRuleProperty.builder()
.assertedControls(List.of("assertedControls"))
.waitPeriodMs(123)
.build())
.gatingRule(GatingRuleProperty.builder()
.gatingControls(List.of("gatingControls"))
.targetControls(List.of("targetControls"))
.waitPeriodMs(123)
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAn assertion rule enforces that, when you change a routing control state, that the criteria that you set in the rule configuration is met.static final classA fluent builder forCfnSafetyRule.static interfaceA 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.static interfaceThe rule configuration for an assertion rule.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnSafetyRule(Construct scope, String id, CfnSafetyRuleProps props) Create a newAWS::Route53RecoveryControl::SafetyRule.protectedCfnSafetyRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnSafetyRule(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionAn assertion rule enforces that, when you change a routing control state, that the criteria that you set in the rule configuration is met.The Amazon Resource Name (ARN) of the safety rule.The deployment status of the safety rule.The Amazon Resource Name (ARN) for the control panel.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.getName()The name of the assertion rule.The criteria that you set for specific assertion controls (routing controls) that designate how many control states must beONas the result of a transaction.getTags()The value for a tag.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAssertionRule(IResolvable value) An assertion rule enforces that, when you change a routing control state, that the criteria that you set in the rule configuration is met.voidAn assertion rule enforces that, when you change a routing control state, that the criteria that you set in the rule configuration is met.voidsetControlPanelArn(String value) The Amazon Resource Name (ARN) for the control panel.voidsetGatingRule(IResolvable value) 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.voidA 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.voidThe name of the assertion rule.voidsetRuleConfig(IResolvable value) The criteria that you set for specific assertion controls (routing controls) that designate how many control states must beONas the result of a transaction.voidThe criteria that you set for specific assertion controls (routing controls) that designate how many control states must beONas the result of a transaction.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnSafetyRule
protected CfnSafetyRule(software.amazon.jsii.JsiiObjectRef objRef) -
CfnSafetyRule
protected CfnSafetyRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnSafetyRule
@Stability(Stable) public CfnSafetyRule(@NotNull Construct scope, @NotNull String id, @NotNull CfnSafetyRuleProps props) Create a newAWS::Route53RecoveryControl::SafetyRule.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrSafetyRuleArn
The Amazon Resource Name (ARN) of the safety rule. -
getAttrStatus
The deployment status of the safety rule.Status can be one of the following: PENDING, DEPLOYED, PENDING_DELETION.
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
The value for a tag. -
getControlPanelArn
The Amazon Resource Name (ARN) for the control panel. -
setControlPanelArn
The Amazon Resource Name (ARN) for the control panel. -
getName
The name of the assertion rule.The name must be unique within a control panel. You can use any non-white space character in the name except the following: & > < ' (single quote) " (double quote) ; (semicolon)
-
setName
The name of the assertion rule.The name must be unique within a control panel. You can use any non-white space character in the name except the following: & > < ' (single quote) " (double quote) ; (semicolon)
-
getRuleConfig
The criteria that you set for specific assertion controls (routing controls) that designate how many control states must beONas the result of a transaction.For example, if you have three assertion controls, you might specify
ATLEAST 2for your rule configuration. This means that at least two assertion controls must beON, so that at least two AWS Regions have traffic flowing to them. -
setRuleConfig
The criteria that you set for specific assertion controls (routing controls) that designate how many control states must beONas the result of a transaction.For example, if you have three assertion controls, you might specify
ATLEAST 2for your rule configuration. This means that at least two assertion controls must beON, so that at least two AWS Regions have traffic flowing to them. -
setRuleConfig
The criteria that you set for specific assertion controls (routing controls) that designate how many control states must beONas the result of a transaction.For example, if you have three assertion controls, you might specify
ATLEAST 2for your rule configuration. This means that at least two assertion controls must beON, so that at least two AWS Regions have traffic flowing to them. -
getAssertionRule
An assertion rule enforces that, when you change a routing control state, that the criteria that you set in the rule configuration is met.Otherwise, the change to the routing control is not accepted. For example, the criteria might be that at least one routing control state is
Onafter the transaction so that traffic continues to flow to at least one cell for the application. This ensures that you avoid a fail-open scenario. -
setAssertionRule
An assertion rule enforces that, when you change a routing control state, that the criteria that you set in the rule configuration is met.Otherwise, the change to the routing control is not accepted. For example, the criteria might be that at least one routing control state is
Onafter the transaction so that traffic continues to flow to at least one cell for the application. This ensures that you avoid a fail-open scenario. -
setAssertionRule
@Stability(Stable) public void setAssertionRule(@Nullable CfnSafetyRule.AssertionRuleProperty value) An assertion rule enforces that, when you change a routing control state, that the criteria that you set in the rule configuration is met.Otherwise, the change to the routing control is not accepted. For example, the criteria might be that at least one routing control state is
Onafter the transaction so that traffic continues to flow to at least one cell for the application. This ensures that you avoid a fail-open scenario. -
getGatingRule
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
Typein the rule configuration toOR, that indicates that you must set the gating routing control toOnfor 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. -
setGatingRule
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
Typein the rule configuration toOR, that indicates that you must set the gating routing control toOnfor 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. -
setGatingRule
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
Typein the rule configuration toOR, that indicates that you must set the gating routing control toOnfor 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.
-