java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.route53recoverycontrol.CfnSafetyRule
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:13.056Z") @Stability(Stable) public class CfnSafetyRule extends CfnResource implements IInspectable, ITaggable
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();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnSafetyRuleProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrSafetyRuleArn

      @Stability(Stable) @NotNull public String getAttrSafetyRuleArn()
      The Amazon Resource Name (ARN) of the safety rule.
    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
      The deployment status of the safety rule.

      Status can be one of the following: PENDING, DEPLOYED, PENDING_DELETION.

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getControlPanelArn

      @Stability(Stable) @NotNull public String getControlPanelArn()
      The Amazon Resource Name (ARN) of the control panel.
    • setControlPanelArn

      @Stability(Stable) public void setControlPanelArn(@NotNull String value)
      The Amazon Resource Name (ARN) of the control panel.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the assertion rule.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the assertion rule.
    • getRuleConfig

      @Stability(Stable) @NotNull public 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.
    • setRuleConfig

      @Stability(Stable) public void setRuleConfig(@NotNull 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.
    • setRuleConfig

      @Stability(Stable) public void setRuleConfig(@NotNull 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.
    • getAssertionRule

      @Stability(Stable) @Nullable public 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.
    • setAssertionRule

      @Stability(Stable) public void setAssertionRule(@Nullable 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.
    • 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.
    • getGatingRule

      @Stability(Stable) @Nullable public 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.
    • setGatingRule

      @Stability(Stable) public void setGatingRule(@Nullable 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.
    • setGatingRule

      @Stability(Stable) public void setGatingRule(@Nullable 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.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      The tags associated with the safety rule.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      The tags associated with the safety rule.