Examples#
Index > MigrationHubConfig > Examples
Auto-generated documentation for MigrationHubConfig type annotations stubs module types-aiobotocore-migrationhub-config.
Client#
Implicit type annotations#
Can be used with types-aiobotocore[migrationhub-config]
package installed.
Write your MigrationHubConfig
code as usual,
type checking and code completion should work out of the box.
# MigrationHubConfigClient usage example
from aiobotocore.session import get_session
session = get_session()
async with session.create_client("migrationhub-config") as client: # (1)
result = await client.create_home_region_control() # (2)
- client: MigrationHubConfigClient
- result: CreateHomeRegionControlResultTypeDef
Explicit type annotations#
With types-aiobotocore-lite[migrationhub-config]
or a standalone types_aiobotocore_migrationhub_config
package, you have to explicitly specify
client: MigrationHubConfigClient
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.
# MigrationHubConfigClient usage example with type annotations
from aiobotocore.session import get_session
from types_aiobotocore_migrationhub_config.client import MigrationHubConfigClient
from types_aiobotocore_migrationhub_config.type_defs import CreateHomeRegionControlResultTypeDef
from types_aiobotocore_migrationhub_config.type_defs import CreateHomeRegionControlRequestRequestTypeDef
session = get_session()
async with session.create_client("migrationhub-config") as client:
client: MigrationHubConfigClient
kwargs: CreateHomeRegionControlRequestRequestTypeDef = {...}
result: CreateHomeRegionControlResultTypeDef = await client.create_home_region_control(**kwargs)