Table of Contents
Route53RecoveryCluster.
Client
¶A low-level client representing Route53 Recovery Cluster
Welcome to the Amazon Route 53 Application Recovery Controller API Reference Guide for Recovery Control Data Plane .
Recovery control in Route 53 Application Recovery Controller includes extremely reliable routing controls that enable you to recover applications by rerouting traffic, for example, across Availability Zones or AWS Regions. Routing controls are simple on/off switches hosted on a cluster. A cluster is a set of five redundant regional endpoints against which you can execute API calls to update or get the state of routing controls. You use routing controls to failover traffic to recover your application across Availability Zones or Regions.
This API guide includes information about how to get and update routing control states in Route 53 Application Recovery Controller.
For more information about Route 53 Application Recovery Controller, see the following:
You can create clusters, routing controls, and control panels by using the control plane API for Recovery Control. For more information, see Amazon Route 53 Application Recovery Controller Recovery Control API Reference .
Route 53 Application Recovery Controller also provides continuous readiness checks to ensure that your applications are scaled to handle failover traffic. For more information about the related API actions, see Amazon Route 53 Application Recovery Controller Recovery Readiness API Reference .
For more information about creating resilient applications and preparing for recovery readiness with Route 53 Application Recovery Controller, see the Amazon Route 53 Application Recovery Controller Developer Guide .
client = session.create_client('route53-recovery-cluster')
These are the available methods:
can_paginate
(operation_name)¶Check if an operation can be paginated.
operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo
, and you’d normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.
True
if the operation can be paginated,
False
otherwise.
get_paginator
(operation_name)¶Create a paginator for an operation.
operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo
, and you’d normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.
OperationNotPageableError – Raised if the operation is not
pageable. You can use the client.can_paginate
method to
check if an operation is pageable.
L{botocore.paginate.Paginator}
A paginator object.
get_routing_control_state
(**kwargs)¶Get the state for a routing control. A routing control is a simple on/off switch that you can use to route traffic to cells. When the state is On, traffic flows to a cell. When it’s off, traffic does not flow.
Before you can create a routing control, you first must create a cluster to host the control. For more information, see CreateCluster . Access one of the endpoints for the cluster to get or update the routing control state to redirect traffic.
For more information about working with routing controls, see Routing control in the Route 53 Application Recovery Controller Developer Guide.
See also: AWS API Documentation
Request Syntax
response = client.get_routing_control_state(
RoutingControlArn='string'
)
RoutingControlArn (string) –
[REQUIRED]
The Amazon Resource Number (ARN) for the routing control that you want to get the state for.
dict
Response Syntax
{
'RoutingControlArn': 'string',
'RoutingControlState': 'On'|'Off'
}
Response Structure
(dict) –
RoutingControlArn (string) –
The Amazon Resource Number (ARN) of the response.
RoutingControlState (string) –
The state of the routing control.
Exceptions
Route53RecoveryCluster.Client.exceptions.AccessDeniedException
Route53RecoveryCluster.Client.exceptions.InternalServerException
Route53RecoveryCluster.Client.exceptions.ResourceNotFoundException
Route53RecoveryCluster.Client.exceptions.ValidationException
Route53RecoveryCluster.Client.exceptions.ThrottlingException
Route53RecoveryCluster.Client.exceptions.EndpointTemporarilyUnavailableException
get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
waiter_name (str) – The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
The specified waiter object.
botocore.waiter.Waiter
update_routing_control_state
(**kwargs)¶Set the state of the routing control to reroute traffic. You can set the value to be On or Off. When the state is On, traffic flows to a cell. When it’s off, traffic does not flow.
For more information about working with routing controls, see Routing control in the Route 53 Application Recovery Controller Developer Guide.
See also: AWS API Documentation
Request Syntax
response = client.update_routing_control_state(
RoutingControlArn='string',
RoutingControlState='On'|'Off'
)
RoutingControlArn (string) –
[REQUIRED]
The Amazon Resource Number (ARN) for the routing control that you want to update the state for.
RoutingControlState (string) –
[REQUIRED]
The state of the routing control. You can set the value to be On or Off.
dict
Response Syntax
{}
Response Structure
(dict) –
Exceptions
Route53RecoveryCluster.Client.exceptions.AccessDeniedException
Route53RecoveryCluster.Client.exceptions.InternalServerException
Route53RecoveryCluster.Client.exceptions.ResourceNotFoundException
Route53RecoveryCluster.Client.exceptions.ValidationException
Route53RecoveryCluster.Client.exceptions.ThrottlingException
Route53RecoveryCluster.Client.exceptions.EndpointTemporarilyUnavailableException
update_routing_control_states
(**kwargs)¶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.
For more information about working with routing controls, see Routing control in the Route 53 Application Recovery Controller Developer Guide.
See also: AWS API Documentation
Request Syntax
response = client.update_routing_control_states(
UpdateRoutingControlStateEntries=[
{
'RoutingControlArn': 'string',
'RoutingControlState': 'On'|'Off'
},
]
)
UpdateRoutingControlStateEntries (list) –
[REQUIRED]
A set of routing control entries that you want to update.
(dict) –
A routing control state.
RoutingControlArn (string) – [REQUIRED]
The Amazon Resource Number (ARN) for the routing control state entry.
RoutingControlState (string) – [REQUIRED]
The routing control state in a set of routing control state entries.
dict
Response Syntax
{}
Response Structure
(dict) –
Exceptions
Route53RecoveryCluster.Client.exceptions.AccessDeniedException
Route53RecoveryCluster.Client.exceptions.InternalServerException
Route53RecoveryCluster.Client.exceptions.ResourceNotFoundException
Route53RecoveryCluster.Client.exceptions.ValidationException
Route53RecoveryCluster.Client.exceptions.ThrottlingException
Route53RecoveryCluster.Client.exceptions.EndpointTemporarilyUnavailableException
Client exceptions are available on a client instance via the exceptions
property. For more detailed instructions and examples on the exact usage of client exceptions, see the error handling user guide.
The available client exceptions are:
Route53RecoveryCluster.Client.exceptions.AccessDeniedException
Route53RecoveryCluster.Client.exceptions.EndpointTemporarilyUnavailableException
Route53RecoveryCluster.Client.exceptions.InternalServerException
Route53RecoveryCluster.Client.exceptions.ResourceNotFoundException
Route53RecoveryCluster.Client.exceptions.ThrottlingException
Route53RecoveryCluster.Client.exceptions.ValidationException
Route53RecoveryCluster.Client.exceptions.
AccessDeniedException
¶You don’t have sufficient permissions to query the routing control state.
Example
try:
...
except client.exceptions.AccessDeniedException as e:
print(e.response)
response
¶The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) –
You don’t have sufficient permissions to query the routing control state.
message (string) –
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
Route53RecoveryCluster.Client.exceptions.
ConflictException
¶There was a conflict with this request. Try again.
Example
try:
...
except client.exceptions.ConflictException as e:
print(e.response)
response
¶The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'message': 'string',
'resourceId': 'string',
'resourceType': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) –
There was a conflict with this request. Try again.
message (string) – Description of the ConflictException error
resourceId (string) – Identifier of the resource in use
resourceType (string) – Type of the resource in use
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
The cluster endpoint isn’t available. Try another cluster endpoint.
Example
try:
...
except client.exceptions.EndpointTemporarilyUnavailableException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) –
The cluster endpoint isn’t available. Try another cluster endpoint.
message (string) –
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
Route53RecoveryCluster.Client.exceptions.
InternalServerException
¶There was an unexpected error during processing of the request.
Example
try:
...
except client.exceptions.InternalServerException as e:
print(e.response)
response
¶The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'message': 'string',
'retryAfterSeconds': 123,
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) –
There was an unexpected error during processing of the request.
message (string) –
retryAfterSeconds (integer) – Advice to clients on when the call can be safely retried
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
Route53RecoveryCluster.Client.exceptions.
ResourceNotFoundException
¶The request references a routing control that was not found.
Example
try:
...
except client.exceptions.ResourceNotFoundException as e:
print(e.response)
response
¶The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'message': 'string',
'resourceId': 'string',
'resourceType': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) –
The request references a routing control that was not found.
message (string) –
resourceId (string) – Hypothetical resource identifier that was not found
resourceType (string) – Hypothetical resource type that was not found
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
Route53RecoveryCluster.Client.exceptions.
ThrottlingException
¶The request was denied because of request throttling.
Example
try:
...
except client.exceptions.ThrottlingException as e:
print(e.response)
response
¶The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'message': 'string',
'retryAfterSeconds': 123,
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) –
The request was denied because of request throttling.
message (string) –
retryAfterSeconds (integer) – Advice to clients on when the call can be safely retried
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
Route53RecoveryCluster.Client.exceptions.
ValidationException
¶There was a validation error on the request.
Example
try:
...
except client.exceptions.ValidationException as e:
print(e.response)
response
¶The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'message': 'string',
'reason': 'unknownOperation'|'cannotParse'|'fieldValidationFailed'|'other',
'fields': [
{
'name': 'string',
'message': 'string'
},
],
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) –
There was a validation error on the request.
message (string) –
reason (string) – Reason the request failed validation
fields (list) – The fields that caused the error, if applicable
(dict) –
There was a validation error on the request.
name (string) –
The field that had the validation exception.
message (string) –
Information about the validation exception.
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
The available paginators are: