- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
UpdateRoutingControlStatesCommand
Set multiple routing control states. You can set the value for each state to be ON or OFF. When the state is ON, traffic flows to a cell. When it's OFF, traffic does not flow.
With Route 53 ARC, you can add safety rules for routing controls, which are safeguards for routing control state updates that help prevent unexpected outcomes, like fail open traffic routing. However, there are scenarios when you might want to bypass the routing control safeguards that are enforced with safety rules that you've configured. For example, you might want to fail over quickly for disaster recovery, and one or more safety rules might be unexpectedly preventing you from updating a routing control state to reroute traffic. In a "break glass" scenario like this, you can override one or more safety rules to change a routing control state and fail over your application.
The SafetyRulesToOverride
property enables you override one or more safety rules and update routing control states. For more information, see Override safety rules to reroute traffic in the Amazon Route 53 Application Recovery Controller Developer Guide.
You must specify Regional endpoints when you work with API cluster operations to get or update routing control states in Route 53 ARC.
To see a code example for getting a routing control state, including accessing Regional cluster endpoints in sequence, see API examples in the Amazon Route 53 Application Recovery Controller Developer Guide.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { Route53RecoveryClusterClient, UpdateRoutingControlStatesCommand } from "@aws-sdk/client-route53-recovery-cluster"; // ES Modules import
// const { Route53RecoveryClusterClient, UpdateRoutingControlStatesCommand } = require("@aws-sdk/client-route53-recovery-cluster"); // CommonJS import
const client = new Route53RecoveryClusterClient(config);
const input = { // UpdateRoutingControlStatesRequest
UpdateRoutingControlStateEntries: [ // UpdateRoutingControlStateEntries // required
{ // UpdateRoutingControlStateEntry
RoutingControlArn: "STRING_VALUE", // required
RoutingControlState: "On" || "Off", // required
},
],
SafetyRulesToOverride: [ // Arns
"STRING_VALUE",
],
};
const command = new UpdateRoutingControlStatesCommand(input);
const response = await client.send(command);
// {};
UpdateRoutingControlStatesCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
UpdateRoutingControlStateEntries Required | UpdateRoutingControlStateEntry[] | undefined | A set of routing control entries that you want to update. |
SafetyRulesToOverride | string[] | undefined | The Amazon Resource Names (ARNs) for the safety rules that you want to override when you're updating routing control states. You can override one safety rule or multiple safety rules by including one or more ARNs, separated by commas. For more information, see Override safety rules to reroute traffic in the Amazon Route 53 Application Recovery Controller Developer Guide. |
UpdateRoutingControlStatesCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You don't have sufficient permissions to perform this action. |
ConflictException | client | There was a conflict with this request. Try again. |
EndpointTemporarilyUnavailableException | server | The cluster endpoint isn't available. Try another cluster endpoint. |
InternalServerException | server | There was an unexpected error during processing of the request. |
ResourceNotFoundException | client | The request references a routing control or control panel that was not found. |
ServiceLimitExceededException | client | The request can't update that many routing control states at the same time. Try again with fewer routing control states. |
ThrottlingException | client | The request was denied because of request throttling. |
ValidationException | client | There was a validation error on the request. |
Route53RecoveryClusterServiceException | Base exception class for all service exceptions from Route53RecoveryCluster service. |