Examples#
Index > Route53RecoveryCluster > Examples
Auto-generated documentation for Route53RecoveryCluster type annotations stubs module types-aiobotocore-route53-recovery-cluster.
Client#
Implicit type annotations#
Can be used with types-aiobotocore[route53-recovery-cluster]
package installed.
Write your Route53RecoveryCluster
code as usual,
type checking and code completion should work out of the box.
# Route53RecoveryClusterClient usage example
from aiobotocore.session import get_session
session = get_session()
async with session.create_client("route53-recovery-cluster") as client: # (1)
result = await client.get_routing_control_state() # (2)
- client: Route53RecoveryClusterClient
- result: GetRoutingControlStateResponseTypeDef
# ListRoutingControlsPaginator usage example
from aiobotocore.session import get_session
session = get_session()
async with session.create_client("route53-recovery-cluster") as client: # (1)
paginator = client.get_paginator("list_routing_controls") # (2)
async for item in paginator.paginate(...):
print(item) # (3)
- client: Route53RecoveryClusterClient
- paginator: ListRoutingControlsPaginator
- item: ListRoutingControlsResponseTypeDef
Explicit type annotations#
With types-aiobotocore-lite[route53-recovery-cluster]
or a standalone types_aiobotocore_route53_recovery_cluster
package, you have to explicitly specify
client: Route53RecoveryClusterClient
type annotation.
All other type annotations are optional, as types should be discovered automatically. However, these type annotations can be helpful in your functions and methods.
# Route53RecoveryClusterClient usage example with type annotations
from aiobotocore.session import get_session
from types_aiobotocore_route53_recovery_cluster.client import Route53RecoveryClusterClient
from types_aiobotocore_route53_recovery_cluster.type_defs import GetRoutingControlStateResponseTypeDef
from types_aiobotocore_route53_recovery_cluster.type_defs import GetRoutingControlStateRequestRequestTypeDef
session = get_session()
async with session.create_client("route53-recovery-cluster") as client:
client: Route53RecoveryClusterClient
kwargs: GetRoutingControlStateRequestRequestTypeDef = {...}
result: GetRoutingControlStateResponseTypeDef = await client.get_routing_control_state(**kwargs)
# ListRoutingControlsPaginator usage example with type annotations
from aiobotocore.session import get_session
from types_aiobotocore_route53_recovery_cluster.client import Route53RecoveryClusterClient
from types_aiobotocore_route53_recovery_cluster.paginator import ListRoutingControlsPaginator
from types_aiobotocore_route53_recovery_cluster.type_defs import ListRoutingControlsResponseTypeDef
session = get_session()
async with session.create_client("route53-recovery-cluster") as client:
client: Route53RecoveryClusterClient
paginator: ListRoutingControlsPaginator = client.get_paginator("list_routing_controls")
async for item in paginator.paginate(...):
item: ListRoutingControlsResponseTypeDef
print(item)