Examples#
Index > MigrationHubOrchestrator > Examples
Auto-generated documentation for MigrationHubOrchestrator type annotations stubs module types-aiobotocore-migrationhuborchestrator.
Client#
Implicit type annotations#
Can be used with types-aiobotocore[migrationhuborchestrator]
package installed.
Write your MigrationHubOrchestrator
code as usual,
type checking and code completion should work out of the box.
# MigrationHubOrchestratorClient usage example
from aiobotocore.session import get_session
session = get_session()
async with session.create_client("migrationhuborchestrator") as client: # (1)
result = await client.create_workflow() # (2)
- client: MigrationHubOrchestratorClient
- result: CreateMigrationWorkflowResponseTypeDef
# ListPluginsPaginator usage example
from aiobotocore.session import get_session
session = get_session()
async with session.create_client("migrationhuborchestrator") as client: # (1)
paginator = client.get_paginator("list_plugins") # (2)
async for item in paginator.paginate(...):
print(item) # (3)
- client: MigrationHubOrchestratorClient
- paginator: ListPluginsPaginator
- item: ListPluginsResponseTypeDef
Explicit type annotations#
With types-aiobotocore-lite[migrationhuborchestrator]
or a standalone types_aiobotocore_migrationhuborchestrator
package, you have to explicitly specify
client: MigrationHubOrchestratorClient
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.
# MigrationHubOrchestratorClient usage example with type annotations
from aiobotocore.session import get_session
from types_aiobotocore_migrationhuborchestrator.client import MigrationHubOrchestratorClient
from types_aiobotocore_migrationhuborchestrator.type_defs import CreateMigrationWorkflowResponseTypeDef
from types_aiobotocore_migrationhuborchestrator.type_defs import CreateMigrationWorkflowRequestRequestTypeDef
session = get_session()
async with session.create_client("migrationhuborchestrator") as client:
client: MigrationHubOrchestratorClient
kwargs: CreateMigrationWorkflowRequestRequestTypeDef = {...}
result: CreateMigrationWorkflowResponseTypeDef = await client.create_workflow(**kwargs)
# ListPluginsPaginator usage example with type annotations
from aiobotocore.session import get_session
from types_aiobotocore_migrationhuborchestrator.client import MigrationHubOrchestratorClient
from types_aiobotocore_migrationhuborchestrator.paginator import ListPluginsPaginator
from types_aiobotocore_migrationhuborchestrator.type_defs import ListPluginsResponseTypeDef
session = get_session()
async with session.create_client("migrationhuborchestrator") as client:
client: MigrationHubOrchestratorClient
paginator: ListPluginsPaginator = client.get_paginator("list_plugins")
async for item in paginator.paginate(...):
item: ListPluginsResponseTypeDef
print(item)