@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-28T21:34:18.756Z") public class CfnSafetyRule extends CfnResource implements IInspectable
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();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnSafetyRule.AssertionRuleProperty
An assertion rule enforces that, when you change a routing control state, that the criteria that you set in the rule configuration is met.
|
static class |
CfnSafetyRule.Builder
A fluent builder for
CfnSafetyRule . |
static interface |
CfnSafetyRule.GatingRuleProperty
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.
|
static interface |
CfnSafetyRule.RuleConfigProperty
The rule configuration for an assertion rule.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnSafetyRule(Construct scope,
java.lang.String id,
CfnSafetyRuleProps props)
Create a new `AWS::Route53RecoveryControl::SafetyRule`.
|
protected |
CfnSafetyRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnSafetyRule(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
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.
|
java.lang.String |
getAttrSafetyRuleArn()
The Amazon Resource Name (ARN) of the safety rule.
|
java.lang.String |
getAttrStatus()
The deployment status of the safety rule.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getControlPanelArn()
The Amazon Resource Name (ARN) for the control panel.
|
java.lang.Object |
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.
|
java.lang.String |
getName()
The name of the assertion rule.
|
java.lang.Object |
getRuleConfig()
The criteria that you set for specific assertion controls (routing controls) that designate how many control states must be `ON` as the result of a transaction.
|
TagManager |
getTags()
The value for a tag.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAssertionRule(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.
|
void |
setAssertionRule(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.
|
void |
setControlPanelArn(java.lang.String value)
The Amazon Resource Name (ARN) for the control panel.
|
void |
setGatingRule(CfnSafetyRule.GatingRuleProperty 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.
|
void |
setGatingRule(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.
|
void |
setName(java.lang.String value)
The name of the assertion rule.
|
void |
setRuleConfig(CfnSafetyRule.RuleConfigProperty value)
The criteria that you set for specific assertion controls (routing controls) that designate how many control states must be `ON` as the result of a transaction.
|
void |
setRuleConfig(IResolvable value)
The criteria that you set for specific assertion controls (routing controls) that designate how many control states must be `ON` as the result of a transaction.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnSafetyRule(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnSafetyRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnSafetyRule(Construct scope, java.lang.String id, CfnSafetyRuleProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrSafetyRuleArn()
public java.lang.String getAttrStatus()
Status can be one of the following: PENDING, DEPLOYED, PENDING_DELETION.
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.String getControlPanelArn()
public void setControlPanelArn(java.lang.String value)
public java.lang.String getName()
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)
public void setName(java.lang.String value)
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)
public java.lang.Object getRuleConfig()
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 ON
, so that at least two AWS Regions have traffic flowing to them.
public void setRuleConfig(IResolvable value)
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 ON
, so that at least two AWS Regions have traffic flowing to them.
public void setRuleConfig(CfnSafetyRule.RuleConfigProperty value)
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 ON
, so that at least two AWS Regions have traffic flowing to them.
public java.lang.Object getAssertionRule()
Otherwise, the change to the routing control is not accepted. For example, the criteria might be that at least one routing control state is On
after 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.
public void setAssertionRule(IResolvable value)
Otherwise, the change to the routing control is not accepted. For example, the criteria might be that at least one routing control state is On
after 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.
public void setAssertionRule(CfnSafetyRule.AssertionRuleProperty value)
Otherwise, the change to the routing control is not accepted. For example, the criteria might be that at least one routing control state is On
after 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.
public java.lang.Object getGatingRule()
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.
public void setGatingRule(IResolvable value)
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.
public void setGatingRule(CfnSafetyRule.GatingRuleProperty value)
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.