Skip to content

iter_list_target_groups async

iter_list_target_groups(
    *,
    config_overrides: Optional[AsyncVPCLatticeClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    vpc_identifier: Optional[VpcId] = None,
    target_group_type: Optional[TargetGroupType] = None,
) -> AsyncIterator[TargetGroupSummary]
Source code in docs_src/capo_vpc_lattice/_services/async_vpc_lattice.py
async def iter_list_target_groups(
    self,
    *,
    config_overrides: Optional[AsyncVPCLatticeClientConfig] = None,
    max_results: Optional["capo_vpc_lattice.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_vpc_lattice.types.next_token.NextToken"] = None,
    vpc_identifier: Optional["capo_vpc_lattice.types.vpc_id.VpcId"] = None,
    target_group_type: Optional[
        "capo_vpc_lattice.types.target_group_type.TargetGroupType"
    ] = None,
) -> (
    "AsyncIterator[capo_vpc_lattice.types.target_group_summary.TargetGroupSummary]"
):
    _token = next_token
    while True:
        _response = await self.list_target_groups(
            config_overrides=config_overrides,
            max_results=max_results,
            next_token=_token,
            vpc_identifier=vpc_identifier,
            target_group_type=target_group_type,
        )
        _page = _resolve_path(_response, ("items",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break