Skip to content

iter_get_attribute_values async

iter_get_attribute_values(
    service_code: String,
    attribute_name: String,
    *,
    config_overrides: Optional[AsyncPricingClientConfig] = None,
    next_token: Optional[String] = None,
    max_results: Optional[GetAttributeValuesMaxResults] = None,
) -> AsyncIterator[AttributeValue]
Source code in docs_src/capo_pricing/_services/async_pricing.py
async def iter_get_attribute_values(
    self,
    service_code: "capo_pricing.types.string.String",
    attribute_name: "capo_pricing.types.string.String",
    *,
    config_overrides: Optional[AsyncPricingClientConfig] = None,
    next_token: Optional["capo_pricing.types.string.String"] = None,
    max_results: Optional[
        "capo_pricing.types.get_attribute_values_max_results.GetAttributeValuesMaxResults"
    ] = None,
) -> "AsyncIterator[capo_pricing.types.attribute_value.AttributeValue]":
    _token = next_token
    while True:
        _response = await self.get_attribute_values(
            service_code,
            attribute_name,
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
        )
        _page = _resolve_path(_response, ("attribute_values",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break