Skip to content

Examples

Index > AmplifyBackend > Examples

Auto-generated documentation for AmplifyBackend type annotations stubs module types-aiobotocore-amplifybackend.

Client

Implicit type annotations

Can be used with types-aioboto3[amplifybackend] package installed.

Write your AmplifyBackend 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("amplifybackend") as client:  # (1)
    result = await client.clone_backend()  # (2)
  1. client: AmplifyBackendClient
  2. result: CloneBackendResponseTypeDef
Paginator usage example
from aioboto3.session import Session


session = Session()

async with session.client("amplifybackend") as client:  # (1)
    paginator = client.get_paginator("list_backend_jobs")  # (2)
    async for item in paginator.paginate(...):
        print(item)  # (3)
  1. client: AmplifyBackendClient
  2. paginator: ListBackendJobsPaginator
  3. item: ListBackendJobsResponseTypeDef

Explicit type annotations

With types-aioboto3-lite[amplifybackend] or a standalone types_aiobotocore_amplifybackend package, you have to explicitly specify client: AmplifyBackendClient 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_amplifybackend.client import AmplifyBackendClient
from types_aiobotocore_amplifybackend.type_defs import CloneBackendResponseTypeDef
from types_aiobotocore_amplifybackend.type_defs import CloneBackendRequestRequestTypeDef


session = Session()

client: AmplifyBackendClient
async with session.client("amplifybackend") as client:  # (1)
    kwargs: CloneBackendRequestRequestTypeDef = {...}  # (2)
    result: CloneBackendResponseTypeDef = await client.clone_backend(**kwargs)  # (3)
  1. client: AmplifyBackendClient
  2. kwargs: CloneBackendRequestRequestTypeDef
  3. result: CloneBackendResponseTypeDef
Paginator usage example
from aioboto3.session import Session

from types_aiobotocore_amplifybackend.client import AmplifyBackendClient
from types_aiobotocore_amplifybackend.paginator import ListBackendJobsPaginator
from types_aiobotocore_amplifybackend.type_defs import ListBackendJobsResponseTypeDef


session = Session()

client: AmplifyBackendClient
async with session.client("amplifybackend") as client:  # (1)
    paginator: ListBackendJobsPaginator = client.get_paginator("list_backend_jobs")  # (2)
    async for item in paginator.paginate(...):
        item: ListBackendJobsResponseTypeDef
        print(item)  # (3)
  1. client: AmplifyBackendClient
  2. paginator: ListBackendJobsPaginator
  3. item: ListBackendJobsResponseTypeDef