Skip to content

iter_list_imports async

iter_list_imports(
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    export_name: Optional[ExportName] = None,
    next_token: Optional[NextToken] = None,
) -> AsyncIterator[StackName]
Source code in docs_src/capo_cloudformation/_services/async_cloud_formation.py
async def iter_list_imports(
    self,
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    export_name: Optional[
        "capo_cloudformation.types.export_name.ExportName"
    ] = None,
    next_token: Optional["capo_cloudformation.types.next_token.NextToken"] = None,
) -> "AsyncIterator[capo_cloudformation.types.stack_name.StackName]":
    _token = next_token
    while True:
        _response = await self.list_imports(
            config_overrides=config_overrides,
            export_name=export_name,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("imports",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break