Skip to content

Examples#

Index > Route53RecoveryReadiness > Examples

Auto-generated documentation for Route53RecoveryReadiness type annotations stubs module types-aiobotocore-route53-recovery-readiness.

Client#

Implicit type annotations#

Can be used with types-aioboto3[route53-recovery-readiness] package installed.

Write your Route53RecoveryReadiness code as usual, type checking and code completion should work out of the box.

# Route53RecoveryReadinessClient usage example

from aioboto3.session import Session


session = Session()

async with session.client("route53-recovery-readiness") as client:  # (1)
    result = await client.create_cell()  # (2)
  1. client: Route53RecoveryReadinessClient
  2. result: CreateCellResponseTypeDef
# GetCellReadinessSummaryPaginator usage example

from aioboto3.session import Session


session = Session()

async with session.client("route53-recovery-readiness") as client:  # (1)
    paginator = client.get_paginator("get_cell_readiness_summary")  # (2)
    async for item in paginator.paginate(...):
        print(item)  # (3)
  1. client: Route53RecoveryReadinessClient
  2. paginator: GetCellReadinessSummaryPaginator
  3. item: GetCellReadinessSummaryResponseTypeDef

Explicit type annotations#

With types-aioboto3-lite[route53-recovery-readiness] or a standalone types_aiobotocore_route53_recovery_readiness package, you have to explicitly specify client: Route53RecoveryReadinessClient 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.

# Route53RecoveryReadinessClient usage example with type annotations

from aioboto3.session import Session

from types_aiobotocore_route53_recovery_readiness.client import Route53RecoveryReadinessClient
from types_aiobotocore_route53_recovery_readiness.type_defs import CreateCellResponseTypeDef
from types_aiobotocore_route53_recovery_readiness.type_defs import CreateCellRequestRequestTypeDef


session = Session()

client: Route53RecoveryReadinessClient
async with session.client("route53-recovery-readiness") as client:  # (1)
    kwargs: CreateCellRequestRequestTypeDef = {...}  # (2)
    result: CreateCellResponseTypeDef = await client.create_cell(**kwargs)  # (3)
  1. client: Route53RecoveryReadinessClient
  2. kwargs: CreateCellRequestRequestTypeDef
  3. result: CreateCellResponseTypeDef
# GetCellReadinessSummaryPaginator usage example with type annotations

from aioboto3.session import Session

from types_aiobotocore_route53_recovery_readiness.client import Route53RecoveryReadinessClient
from types_aiobotocore_route53_recovery_readiness.paginator import GetCellReadinessSummaryPaginator
from types_aiobotocore_route53_recovery_readiness.type_defs import GetCellReadinessSummaryResponseTypeDef


session = Session()

client: Route53RecoveryReadinessClient
async with session.client("route53-recovery-readiness") as client:  # (1)
    paginator: GetCellReadinessSummaryPaginator = client.get_paginator("get_cell_readiness_summary")  # (2)
    async for item in paginator.paginate(...):
        item: GetCellReadinessSummaryResponseTypeDef
        print(item)  # (3)
  1. client: Route53RecoveryReadinessClient
  2. paginator: GetCellReadinessSummaryPaginator
  3. item: GetCellReadinessSummaryResponseTypeDef