Skip to content

iter_list_workloads

iter_list_workloads(
    resource_group_name: ResourceGroupName,
    component_name: ComponentName,
    *,
    config_overrides: Optional[ApplicationInsightsClientConfig] = None,
    max_results: Optional[MaxEntities] = None,
    next_token: Optional[PaginationToken] = None,
    account_id: Optional[AccountId] = None,
) -> Iterator[ListWorkloadsResponse]
Source code in docs_src/capo_application_insights/_services/application_insights.py
def iter_list_workloads(
    self,
    resource_group_name: "capo_application_insights.types.resource_group_name.ResourceGroupName",
    component_name: "capo_application_insights.types.component_name.ComponentName",
    *,
    config_overrides: Optional[ApplicationInsightsClientConfig] = None,
    max_results: Optional[
        "capo_application_insights.types.max_entities.MaxEntities"
    ] = None,
    next_token: Optional[
        "capo_application_insights.types.pagination_token.PaginationToken"
    ] = None,
    account_id: Optional[
        "capo_application_insights.types.account_id.AccountId"
    ] = None,
) -> "Iterator[capo_application_insights.types.list_workloads_response.ListWorkloadsResponse]":
    _token = next_token
    while True:
        _response = self.list_workloads(
            resource_group_name,
            component_name,
            config_overrides=config_overrides,
            max_results=max_results,
            next_token=_token,
            account_id=account_id,
        )
        yield _response
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break