Examples#
Index > MigrationHubStrategyRecommendations > Examples
Auto-generated documentation for MigrationHubStrategyRecommendations type annotations stubs module types-boto3-migrationhubstrategy.
Client#
Implicit type annotations#
Can be used with types-boto3[migrationhubstrategy]
package installed.
Write your MigrationHubStrategyRecommendations
code as usual,
type checking and code completion should work out of the box.
# MigrationHubStrategyRecommendationsClient usage example
from boto3.session import Session
session = Session()
client = session.client("migrationhubstrategy") # (1)
result = client.get_application_component_details() # (2)
- client: MigrationHubStrategyRecommendationsClient
- result: GetApplicationComponentDetailsResponseTypeDef
# GetServerDetailsPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("migrationhubstrategy") # (1)
paginator = client.get_paginator("get_server_details") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: MigrationHubStrategyRecommendationsClient
- paginator: GetServerDetailsPaginator
- item: GetServerDetailsResponseTypeDef
Explicit type annotations#
With types-boto3-lite[migrationhubstrategy]
or a standalone types_boto3_migrationhubstrategy
package, you have to explicitly specify client: MigrationHubStrategyRecommendationsClient
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.
# MigrationHubStrategyRecommendationsClient usage example with type annotations
from boto3.session import Session
from types_boto3_migrationhubstrategy.client import MigrationHubStrategyRecommendationsClient
from types_boto3_migrationhubstrategy.type_defs import GetApplicationComponentDetailsResponseTypeDef
from types_boto3_migrationhubstrategy.type_defs import GetApplicationComponentDetailsRequestRequestTypeDef
session = Session()
client: MigrationHubStrategyRecommendationsClient = session.client("migrationhubstrategy")
kwargs: GetApplicationComponentDetailsRequestRequestTypeDef = {...}
result: GetApplicationComponentDetailsResponseTypeDef = client.get_application_component_details(**kwargs)
# GetServerDetailsPaginator usage example with type annotations
from boto3.session import Session
from types_boto3_migrationhubstrategy.client import MigrationHubStrategyRecommendationsClient
from types_boto3_migrationhubstrategy.paginator import GetServerDetailsPaginator
from types_boto3_migrationhubstrategy.type_defs import GetServerDetailsResponseTypeDef
session = Session()
client: MigrationHubStrategyRecommendationsClient = session.client("migrationhubstrategy")
paginator: GetServerDetailsPaginator = client.get_paginator("get_server_details")
for item in paginator.paginate(...):
item: GetServerDetailsResponseTypeDef
print(item)