List routing control names and Amazon Resource Names (ARNs), as well as the routing control state for each routing control, along with the control panel name and control panel ARN for the routing controls. If you specify a control panel ARN, this call lists the routing controls in the control panel. Otherwise, it lists all the routing controls in the cluster.
A routing control is a simple on/off switch in Route 53 ARC that you can use to route traffic to cells. When a routing control state is set to ON, traffic flows to a cell. When the state is set to OFF, traffic does not flow.
Before you can create a routing control, you must first create a cluster, and then host the control in a control panel on the cluster. For more information, see Create routing control structures in the Amazon Route 53 Application Recovery Controller Developer Guide. You access one of the endpoints for the cluster to get or update the routing control state to redirect traffic for your application.
You must specify Regional endpoints when you work with API cluster operations to use this API operation to list routing controls in Route 53 ARC.
Learn more about working with routing controls in the following topics in the Amazon Route 53 Application Recovery Controller Developer Guide:
Parameters:
-
control_panel_arn
(Optional[Arn], default:
None
)
–
The Amazon Resource Name (ARN) of the control panel of the routing controls to list.
-
next_token
(Optional[PageToken], default:
None
)
–
The token for the next set of results. You receive this token from a previous call.
-
max_results
(Optional[MaxResults], default:
None
)
–
The number of routing controls objects that you want to return with this call. The default value is 500.
Raises:
Source code in docs_src/capo_route53_recovery_cluster/_services/route53_recovery_cluster.py
| def list_routing_controls(
self,
*,
config_overrides: Optional[Route53RecoveryClusterClientConfig] = None,
control_panel_arn: Optional[
"capo_route53_recovery_cluster.types.arn.Arn"
] = None,
next_token: Optional[
"capo_route53_recovery_cluster.types.page_token.PageToken"
] = None,
max_results: Optional[
"capo_route53_recovery_cluster.types.max_results.MaxResults"
] = None,
) -> "capo_route53_recovery_cluster.types.list_routing_controls_response.ListRoutingControlsResponse":
"""<p>List routing control names and Amazon Resource Names (ARNs), as well as the routing control state for each routing control, along with the control panel name and control panel ARN for the routing controls. If you specify a control panel ARN, this call lists the routing controls in the control panel. Otherwise, it lists all the routing controls in the cluster.</p> <p>A routing control is a simple on/off switch in Route 53 ARC that you can use to route traffic to cells. When a routing control state is set to ON, traffic flows to a cell. When the state is set to OFF, traffic does not flow.</p> <p>Before you can create a routing control, you must first create a cluster, and then host the control in a control panel on the cluster. For more information, see <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.create.html"> Create routing control structures</a> in the Amazon Route 53 Application Recovery Controller Developer Guide. You access one of the endpoints for the cluster to get or update the routing control state to redirect traffic for your application. </p> <p> <i>You must specify Regional endpoints when you work with API cluster operations to use this API operation to list routing controls in Route 53 ARC.</i> </p> <p>Learn more about working with routing controls in the following topics in the Amazon Route 53 Application Recovery Controller Developer Guide:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.update.html"> Viewing and updating routing control states</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.html">Working with routing controls in Route 53 ARC</a> </p> </li> </ul>
Args:
control_panel_arn: <p>The Amazon Resource Name (ARN) of the control panel of the routing controls to list.</p>
next_token: <p>The token for the next set of results. You receive this token from a previous call.</p>
max_results: <p>The number of routing controls objects that you want to return with this call. The default value is 500.</p>
Raises:
capo_route53_recovery_cluster.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permissions to perform this action.</p>
capo_route53_recovery_cluster.errors.endpoint_temporarily_unavailable_exception.EndpointTemporarilyUnavailableException: <p>The cluster endpoint isn't available. Try another cluster endpoint.</p>
capo_route53_recovery_cluster.errors.internal_server_exception.InternalServerException: <p>There was an unexpected error during processing of the request.</p>
capo_route53_recovery_cluster.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a routing control or control panel that was not found.</p>
capo_route53_recovery_cluster.errors.throttling_exception.ThrottlingException: <p>The request was denied because of request throttling.</p>
capo_route53_recovery_cluster.errors.validation_exception.ValidationException: <p>There was a validation error on the request.</p>
capo_route53_recovery_cluster.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_route53_recovery_cluster.types.list_routing_controls_request.ListRoutingControlsRequest]",
) -> OperationResponse[
"capo_route53_recovery_cluster.types.list_routing_controls_response.ListRoutingControlsResponse"
]:
import capo_route53_recovery_cluster._operations.toggle_customer_api.list_routing_controls
output, http_response = (
capo_route53_recovery_cluster._operations.toggle_customer_api.list_routing_controls.list_routing_controls(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListRoutingControls")
)
input_: capo_route53_recovery_cluster.types.list_routing_controls_request.ListRoutingControlsRequest = {}
if control_panel_arn is not None:
input_["control_panel_arn"] = control_panel_arn
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|