Skip to content

iter_list_price_lists async

iter_list_price_lists(
    service_code: ServiceCode,
    effective_date: EffectiveDate,
    currency_code: CurrencyCode,
    *,
    config_overrides: Optional[AsyncPricingClientConfig] = None,
    region_code: Optional[RegionCode] = None,
    next_token: Optional[String] = None,
    max_results: Optional[MaxResults] = None,
) -> AsyncIterator[PriceList]
Source code in docs_src/capo_pricing/_services/async_pricing.py
async def iter_list_price_lists(
    self,
    service_code: "capo_pricing.types.service_code.ServiceCode",
    effective_date: "capo_pricing.types.effective_date.EffectiveDate",
    currency_code: "capo_pricing.types.currency_code.CurrencyCode",
    *,
    config_overrides: Optional[AsyncPricingClientConfig] = None,
    region_code: Optional["capo_pricing.types.region_code.RegionCode"] = None,
    next_token: Optional["capo_pricing.types.string.String"] = None,
    max_results: Optional["capo_pricing.types.max_results.MaxResults"] = None,
) -> "AsyncIterator[capo_pricing.types.price_list.PriceList]":
    _token = next_token
    while True:
        _response = await self.list_price_lists(
            service_code,
            effective_date,
            currency_code,
            config_overrides=config_overrides,
            region_code=region_code,
            next_token=_token,
            max_results=max_results,
        )
        _page = _resolve_path(_response, ("price_lists",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break