import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CreateSafetyRuleRequest, CreateSafetyRuleResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link CreateSafetyRuleCommand}. */ export interface CreateSafetyRuleCommandInput extends CreateSafetyRuleRequest { } /** * @public * * The output of {@link CreateSafetyRuleCommand}. */ export interface CreateSafetyRuleCommandOutput extends CreateSafetyRuleResponse, __MetadataBearer { } declare const CreateSafetyRuleCommand_base: { new (input: CreateSafetyRuleCommandInput): import("@smithy/core/client").CommandImpl; new (...[input]: [] | [CreateSafetyRuleCommandInput]): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Creates a safety rule in a control panel. Safety rules let you add safeguards around changing routing control states, and for enabling and disabling routing controls, to help prevent unexpected outcomes.

There are two types of safety rules: assertion rules and gating rules.

Assertion rule: An assertion rule enforces that, when you change a routing control state, that a certain criteria is met. 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.

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 * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { Route53RecoveryControlConfigClient, CreateSafetyRuleCommand } from "@aws-sdk/client-route53-recovery-control-config"; // ES Modules import * // const { Route53RecoveryControlConfigClient, CreateSafetyRuleCommand } = require("@aws-sdk/client-route53-recovery-control-config"); // CommonJS import * // import type { Route53RecoveryControlConfigClientConfig } from "@aws-sdk/client-route53-recovery-control-config"; * const config = {}; // type is Route53RecoveryControlConfigClientConfig * const client = new Route53RecoveryControlConfigClient(config); * const input = { // CreateSafetyRuleRequest * AssertionRule: { // NewAssertionRule * AssertedControls: [ // __listOf__stringMin1Max256PatternAZaZ09 // required * "STRING_VALUE", * ], * ControlPanelArn: "STRING_VALUE", // required * Name: "STRING_VALUE", // required * RuleConfig: { // RuleConfig * Inverted: true || false, // required * Threshold: Number("int"), // required * Type: "ATLEAST" || "AND" || "OR", // required * }, * WaitPeriodMs: Number("int"), // required * }, * ClientToken: "STRING_VALUE", * GatingRule: { // NewGatingRule * ControlPanelArn: "STRING_VALUE", // required * GatingControls: [ // required * "STRING_VALUE", * ], * Name: "STRING_VALUE", // required * RuleConfig: { * Inverted: true || false, // required * Threshold: Number("int"), // required * Type: "ATLEAST" || "AND" || "OR", // required * }, * TargetControls: [ // required * "STRING_VALUE", * ], * WaitPeriodMs: Number("int"), // required * }, * Tags: { // __mapOf__stringMin0Max256PatternS * "": "STRING_VALUE", * }, * }; * const command = new CreateSafetyRuleCommand(input); * const response = await client.send(command); * // { // CreateSafetyRuleResponse * // AssertionRule: { // AssertionRule * // AssertedControls: [ // __listOf__stringMin1Max256PatternAZaZ09 // required * // "STRING_VALUE", * // ], * // ControlPanelArn: "STRING_VALUE", // required * // Name: "STRING_VALUE", // required * // RuleConfig: { // RuleConfig * // Inverted: true || false, // required * // Threshold: Number("int"), // required * // Type: "ATLEAST" || "AND" || "OR", // required * // }, * // SafetyRuleArn: "STRING_VALUE", // required * // Status: "PENDING" || "DEPLOYED" || "PENDING_DELETION", // required * // WaitPeriodMs: Number("int"), // required * // Owner: "STRING_VALUE", * // }, * // GatingRule: { // GatingRule * // ControlPanelArn: "STRING_VALUE", // required * // GatingControls: [ // required * // "STRING_VALUE", * // ], * // Name: "STRING_VALUE", // required * // RuleConfig: { * // Inverted: true || false, // required * // Threshold: Number("int"), // required * // Type: "ATLEAST" || "AND" || "OR", // required * // }, * // SafetyRuleArn: "STRING_VALUE", // required * // Status: "PENDING" || "DEPLOYED" || "PENDING_DELETION", // required * // TargetControls: [ // required * // "STRING_VALUE", * // ], * // WaitPeriodMs: Number("int"), // required * // Owner: "STRING_VALUE", * // }, * // }; * * ``` * * @param CreateSafetyRuleCommandInput - {@link CreateSafetyRuleCommandInput} * @returns {@link CreateSafetyRuleCommandOutput} * @see {@link CreateSafetyRuleCommandInput} for command's `input` shape. * @see {@link CreateSafetyRuleCommandOutput} for command's `response` shape. * @see {@link Route53RecoveryControlConfigClientResolvedConfig | config} for Route53RecoveryControlConfigClient's `config` shape. * * @throws {@link InternalServerException} (server fault) *

500 response - InternalServiceError. Temporary service error. Retry the request.

* * @throws {@link ValidationException} (client fault) *

400 response - Multiple causes. For example, you might have a malformed query string and input parameter might be out of range, or you might have used parameters together incorrectly.

* * @throws {@link Route53RecoveryControlConfigServiceException} *

Base exception class for all service exceptions from Route53RecoveryControlConfig service.

* * * @public */ export declare class CreateSafetyRuleCommand extends CreateSafetyRuleCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateSafetyRuleRequest; output: CreateSafetyRuleResponse; }; sdk: { input: CreateSafetyRuleCommandInput; output: CreateSafetyRuleCommandOutput; }; }; }