Skip to content

Paginators#

Index > Account > Paginators

Auto-generated documentation for Account type annotations stubs module mypy-boto3-account.

ListRegionsPaginator#

Type annotations and code completion for boto3.client("account").get_paginator("list_regions"). boto3 documentation

# ListRegionsPaginator usage example

from boto3.session import Session

from mypy_boto3_account.paginator import ListRegionsPaginator

def get_list_regions_paginator() -> ListRegionsPaginator:
    return Session().client("account").get_paginator("list_regions")
# ListRegionsPaginator usage example with type annotations

from boto3.session import Session

from mypy_boto3_account.paginator import ListRegionsPaginator

session = Session()

client = Session().client("account")  # (1)
paginator: ListRegionsPaginator = client.get_paginator("list_regions")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: AccountClient
  2. paginator: ListRegionsPaginator
  3. item: ListRegionsResponseTypeDef

paginate#

Type annotations and code completion for ListRegionsPaginator.paginate method.

# paginate method definition

def paginate(
    self,
    *,
    AccountId: str = ...,
    RegionOptStatusContains: Sequence[RegionOptStatusType] = ...,  # (1)
    PaginationConfig: PaginatorConfigTypeDef = ...,  # (2)
) -> _PageIterator[ListRegionsResponseTypeDef]:  # (3)
    ...
  1. See RegionOptStatusType
  2. See PaginatorConfigTypeDef
  3. See ListRegionsResponseTypeDef
# paginate method usage example with argument unpacking

kwargs: ListRegionsRequestListRegionsPaginateTypeDef = {  # (1)
    "AccountId": ...,
}

parent.paginate(**kwargs)
  1. See ListRegionsRequestListRegionsPaginateTypeDef