Skip to content


Index > MigrationHubConfig > Examples

Auto-generated documentation for MigrationHubConfig type annotations stubs module mypy-boto3-migrationhub-config.


Implicit type annotations#

Can be used with boto3-stubs[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 boto3.session import Session

session = Session()

client = session.client("migrationhub-config")  # (1)
result = client.create_home_region_control()  # (2)
  1. client: MigrationHubConfigClient
  2. result: CreateHomeRegionControlResultTypeDef

Explicit type annotations#

With boto3-stubs-lite[migrationhub-config] or a standalone mypy_boto3_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 boto3.session import Session

from mypy_boto3_migrationhub_config.client import MigrationHubConfigClient
from mypy_boto3_migrationhub_config.type_defs import CreateHomeRegionControlResultTypeDef
from mypy_boto3_migrationhub_config.type_defs import CreateHomeRegionControlRequestRequestTypeDef

session = Session()

client: MigrationHubConfigClient = session.client("migrationhub-config")

kwargs: CreateHomeRegionControlRequestRequestTypeDef = {...}
result: CreateHomeRegionControlResultTypeDef = client.create_home_region_control(**kwargs)