Examples
Auto-generated documentation for Health type annotations stubs module types-aiobotocore-health.
Client
Implicit type annotations
Can be used with types-aioboto3[health]
package installed.
Write your Health
code as usual,
type checking and code completion should work out of the box.
Client usage example
from aioboto3.session import Session
session = Session()
async with session.client("health") as client: # (1)
result = await client.describe_affected_accounts_for_organization() # (2)
- client: HealthClient
- result: DescribeAffectedAccountsForOrganizationResponseTypeDef
Explicit type annotations
With types-aioboto3-lite[health]
or a standalone types_aiobotocore_health
package, you have to explicitly specify
client: HealthClient
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.
Client usage example
from aioboto3.session import Session
from types_aiobotocore_health.client import HealthClient
from types_aiobotocore_health.type_defs import DescribeAffectedAccountsForOrganizationResponseTypeDef
from types_aiobotocore_health.type_defs import DescribeAffectedAccountsForOrganizationRequestRequestTypeDef
session = Session()
client: HealthClient
async with session.client("health") as client: # (1)
kwargs: DescribeAffectedAccountsForOrganizationRequestRequestTypeDef = {...} # (2)
result: DescribeAffectedAccountsForOrganizationResponseTypeDef = await client.describe_affected_accounts_for_organization(**kwargs) # (3)
Paginator usage example
from aioboto3.session import Session
from types_aiobotocore_health.client import HealthClient
from types_aiobotocore_health.paginator import DescribeAffectedAccountsForOrganizationPaginator
from types_aiobotocore_health.type_defs import DescribeAffectedAccountsForOrganizationResponseTypeDef
session = Session()
client: HealthClient
async with session.client("health") as client: # (1)
paginator: DescribeAffectedAccountsForOrganizationPaginator = client.get_paginator("describe_affected_accounts_for_organization") # (2)
async for item in paginator.paginate(...):
item: DescribeAffectedAccountsForOrganizationResponseTypeDef
print(item) # (3)