Skip to content

iter_get_sampling_rules

iter_get_sampling_rules(
    *,
    config_overrides: Optional[XRayClientConfig] = None,
    next_token: Optional[String] = None,
) -> Iterator[SamplingRuleRecord]
Source code in docs_src/capo_xray/_services/x_ray.py
def iter_get_sampling_rules(
    self,
    *,
    config_overrides: Optional[XRayClientConfig] = None,
    next_token: Optional["capo_xray.types.string.String"] = None,
) -> "Iterator[capo_xray.types.sampling_rule_record.SamplingRuleRecord]":
    _token = next_token
    while True:
        _response = self.get_sampling_rules(
            config_overrides=config_overrides,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("sampling_rule_records",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break