Skip to content

iter_search_local_gateway_routes

iter_search_local_gateway_routes(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    local_gateway_route_table_id: Optional[LocalGatewayRoutetableId] = None,
    filters: Optional[FilterList] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[String] = None,
    dry_run: Optional[Boolean] = None,
) -> Iterator[LocalGatewayRoute]
Source code in docs_src/capo_ec2/_services/ec2.py
def iter_search_local_gateway_routes(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    local_gateway_route_table_id: Optional[
        "capo_ec2.types.local_gateway_routetable_id.LocalGatewayRoutetableId"
    ] = None,
    filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
    max_results: Optional["capo_ec2.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_ec2.types.string.String"] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
) -> "Iterator[capo_ec2.types.local_gateway_route.LocalGatewayRoute]":
    _token = next_token
    while True:
        _response = self.search_local_gateway_routes(
            config_overrides=config_overrides,
            local_gateway_route_table_id=local_gateway_route_table_id,
            filters=filters,
            max_results=max_results,
            next_token=_token,
            dry_run=dry_run,
        )
        _page = _resolve_path(_response, ("routes",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break