Skip to content

Examples#

Index > MigrationHubConfig > Examples

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

Client#

Implicit type annotations#

Can be used with types-boto3[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 types-boto3-lite[migrationhub-config] or a standalone types_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 types_boto3_migrationhub_config.client import MigrationHubConfigClient
from types_boto3_migrationhub_config.type_defs import CreateHomeRegionControlResultTypeDef
from types_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)