Skip to content

Examples

Index > MigrationHubOrchestrator > Examples

Auto-generated documentation for MigrationHubOrchestrator type annotations stubs module mypy-boto3-migrationhuborchestrator.

Client

Implicit type annotations

Can be used with boto3-stubs[migrationhuborchestrator] package installed.

Write your MigrationHubOrchestrator code as usual, type checking and code completion should work out of the box.

Client usage example
from boto3.session import Session


session = Session()

client = session.client("migrationhuborchestrator")  # (1)
result = client.create_workflow()  # (2)
  1. client: MigrationHubOrchestratorClient
  2. result: CreateMigrationWorkflowResponseTypeDef
Paginator usage example
from boto3.session import Session


session = Session()
client = session.client("migrationhuborchestrator")  # (1)

paginator = client.get_paginator("list_plugins")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: MigrationHubOrchestratorClient
  2. paginator: ListPluginsPaginator
  3. item: ListPluginsResponseTypeDef

Explicit type annotations

With boto3-stubs-lite[migrationhuborchestrator] or a standalone mypy_boto3_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.

Client usage example
from boto3.session import Session

from mypy_boto3_migrationhuborchestrator.client import MigrationHubOrchestratorClient
from mypy_boto3_migrationhuborchestrator.type_defs import CreateMigrationWorkflowResponseTypeDef
from mypy_boto3_migrationhuborchestrator.type_defs import CreateMigrationWorkflowRequestRequestTypeDef


session = Session()

client: MigrationHubOrchestratorClient = session.client("migrationhuborchestrator")

kwargs: CreateMigrationWorkflowRequestRequestTypeDef = {...}
result: CreateMigrationWorkflowResponseTypeDef = client.create_workflow(**kwargs)
Paginator usage example
from boto3.session import Session

from mypy_boto3_migrationhuborchestrator.client import MigrationHubOrchestratorClient
from mypy_boto3_migrationhuborchestrator.paginator import ListPluginsPaginator
from mypy_boto3_migrationhuborchestrator.type_defs import ListPluginsResponseTypeDef


session = Session()
client: MigrationHubOrchestratorClient = session.client("migrationhuborchestrator")

paginator: ListPluginsPaginator = client.get_paginator("list_plugins")
for item in paginator.paginate(...):
    item: ListPluginsResponseTypeDef
    print(item)