Examples
Auto-generated documentation for DLM type annotations stubs module types-aiobotocore-dlm.
Client
Implicit type annotations
Can be used with types-aioboto3[dlm]
package installed.
Write your DLM
code as usual,
type checking and code completion should work out of the box.
Client usage example
from aioboto3.session import Session
session = Session()
async with session.client("dlm") as client: # (1)
result = await client.create_lifecycle_policy() # (2)
- client: DLMClient
- result: CreateLifecyclePolicyResponseTypeDef
Explicit type annotations
With types-aioboto3-lite[dlm]
or a standalone types_aiobotocore_dlm
package, you have to explicitly specify
client: DLMClient
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 aioboto3.session import Session
from types_aiobotocore_dlm.client import DLMClient
from types_aiobotocore_dlm.type_defs import CreateLifecyclePolicyResponseTypeDef
from types_aiobotocore_dlm.type_defs import CreateLifecyclePolicyRequestRequestTypeDef
session = Session()
client: DLMClient
async with session.client("dlm") as client: # (1)
kwargs: CreateLifecyclePolicyRequestRequestTypeDef = {...} # (2)
result: CreateLifecyclePolicyResponseTypeDef = await client.create_lifecycle_policy(**kwargs) # (3)
- client: DLMClient
- kwargs: CreateLifecyclePolicyRequestRequestTypeDef
- result: CreateLifecyclePolicyResponseTypeDef