import * as core from "@terrascript/core"; export interface RuleConfigArgs extends core.SchemaArgs { inverted: boolean | core.BooleanOut; threshold: number | core.NumberOut; type: string | core.StringOut; } export class RuleConfig extends core.Schema { @core.attr(Boolean) public inverted!: boolean | core.BooleanOut; @core.attr(Number) public threshold!: number | core.NumberOut; @core.attr(String) public type!: string | core.StringOut; } export interface SafetyRuleArgs extends core.ResourceArgs { /** * (Optional) Routing controls that are part of transactions that are evaluated to determine if a reque * st to change a routing control state is allowed. */ assertedControls?: core.Array | core.ArrayOut; /** * (Required) ARN of the control panel in which this safety rule will reside. */ controlPanelArn: string | core.StringOut; /** * (Optional) Gating controls for the new gating rule. That is, routing controls that are evaluated by * the rule configuration that you specify. */ gatingControls?: core.Array | core.ArrayOut; /** * (Required) Name describing the safety rule. */ name: string | core.StringOut; /** * (Required) Configuration block for safety rule criteria. See below. */ ruleConfig: RuleConfig; /** * (Optional) Routing controls that can only be set or unset if the specified `rule_config` evaluates t * o true for the specified `gating_controls`. */ targetControls?: core.Array | core.ArrayOut; /** * (Required) Evaluation period, in milliseconds (ms), during which any request against the target rout * ing controls will fail. */ waitPeriodMs: number | core.NumberOut; } export class SafetyRule extends core.Resource { /** * ARN of the safety rule. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional) Routing controls that are part of transactions that are evaluated to determine if a reque * st to change a routing control state is allowed. */ @core.attr(String, { kind: "array" }) public assertedControls?: core.Array | core.ArrayOut; /** * (Required) ARN of the control panel in which this safety rule will reside. */ @core.attr(String) public controlPanelArn!: string | core.StringOut; /** * (Optional) Gating controls for the new gating rule. That is, routing controls that are evaluated by * the rule configuration that you specify. */ @core.attr(String, { kind: "array" }) public gatingControls?: core.Array | core.ArrayOut; @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Required) Name describing the safety rule. */ @core.attr(String) public name!: string | core.StringOut; /** * (Required) Configuration block for safety rule criteria. See below. */ @core.attr(RuleConfig) public ruleConfig!: RuleConfig; /** * Status of the safety rule. `PENDING` when it is being created/updated, `PENDING_DELETION` when it is * being deleted, and `DEPLOYED` otherwise. */ @core.attr(String, { computed: true }) public status!: string | core.StringOut; /** * (Optional) Routing controls that can only be set or unset if the specified `rule_config` evaluates t * o true for the specified `gating_controls`. */ @core.attr(String, { kind: "array" }) public targetControls?: core.Array | core.ArrayOut; /** * (Required) Evaluation period, in milliseconds (ms), during which any request against the target rout * ing controls will fail. */ @core.attr(Number) public waitPeriodMs!: number | core.NumberOut; constructor(name: string, args?: SafetyRuleArgs) { super(name, "aws_route53recoverycontrolconfig_safety_rule", args); } public override getNamespace(): string { return "aws_route53recoverycontrolconfig"; } }