Skip to content

Examples#

Index > IoTSecureTunneling > Examples

Auto-generated documentation for IoTSecureTunneling type annotations stubs module types-aiobotocore-iotsecuretunneling.

Client#

Implicit type annotations#

Can be used with types-aiobotocore[iotsecuretunneling] package installed.

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

# IoTSecureTunnelingClient usage example

from aiobotocore.session import get_session


session = get_session()

async with session.create_client("iotsecuretunneling") as client:  # (1)
    result = await client.describe_tunnel()  # (2)
  1. client: IoTSecureTunnelingClient
  2. result: DescribeTunnelResponseTypeDef

Explicit type annotations#

With types-aiobotocore-lite[iotsecuretunneling] or a standalone types_aiobotocore_iotsecuretunneling package, you have to explicitly specify client: IoTSecureTunnelingClient 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.

# IoTSecureTunnelingClient usage example with type annotations

from aiobotocore.session import get_session

from types_aiobotocore_iotsecuretunneling.client import IoTSecureTunnelingClient
from types_aiobotocore_iotsecuretunneling.type_defs import DescribeTunnelResponseTypeDef
from types_aiobotocore_iotsecuretunneling.type_defs import DescribeTunnelRequestRequestTypeDef


session = get_session()

async with session.create_client("iotsecuretunneling") as client:
    client: IoTSecureTunnelingClient
    kwargs: DescribeTunnelRequestRequestTypeDef = {...}
    result: DescribeTunnelResponseTypeDef = await client.describe_tunnel(**kwargs)