Examples#
Auto-generated documentation for AppRunner type annotations stubs module mypy-boto3-apprunner.
Client#
Implicit type annotations#
Can be used with boto3-stubs[apprunner]
package installed.
Write your AppRunner
code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# AppRunnerClient usage example
from boto3.session import Session
session = Session()
client = session.client("apprunner") # (1)
result = client.associate_custom_domain() # (2)
- client: AppRunnerClient
- result: AssociateCustomDomainResponseTypeDef
Explicit type annotations#
With boto3-stubs-lite[apprunner]
or a standalone mypy_boto3_apprunner
package, you have to explicitly specify client: AppRunnerClient
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 method usage example#
# AppRunnerClient usage example with type annotations
from boto3.session import Session
from mypy_boto3_apprunner.client import AppRunnerClient
from mypy_boto3_apprunner.type_defs import AssociateCustomDomainResponseTypeDef
from mypy_boto3_apprunner.type_defs import AssociateCustomDomainRequestTypeDef
session = Session()
client: AppRunnerClient = session.client("apprunner")
kwargs: AssociateCustomDomainRequestTypeDef = {...}
result: AssociateCustomDomainResponseTypeDef = client.associate_custom_domain(**kwargs)