Skip to content

iter_list_rules async

iter_list_rules(
    service_identifier: ServiceIdentifier,
    listener_identifier: ListenerIdentifier,
    *,
    config_overrides: Optional[AsyncVPCLatticeClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> AsyncIterator[RuleSummary]
Source code in docs_src/capo_vpc_lattice/_services/async_vpc_lattice.py
async def iter_list_rules(
    self,
    service_identifier: "capo_vpc_lattice.types.service_identifier.ServiceIdentifier",
    listener_identifier: "capo_vpc_lattice.types.listener_identifier.ListenerIdentifier",
    *,
    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,
) -> "AsyncIterator[capo_vpc_lattice.types.rule_summary.RuleSummary]":
    _token = next_token
    while True:
        _response = await self.list_rules(
            service_identifier,
            listener_identifier,
            config_overrides=config_overrides,
            max_results=max_results,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("items",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break