Skip to content

list_schedule_groups async

list_schedule_groups(
    *,
    config_overrides: Optional[AsyncSchedulerClientConfig] = None,
    name_prefix: Optional[ScheduleGroupNamePrefix] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListScheduleGroupsOutput

Returns a paginated list of your schedule groups.

Parameters:

  • name_prefix (Optional[ScheduleGroupNamePrefix], default: None ) –

    The name prefix that you can use to return a filtered list of your schedule groups.

  • next_token (Optional[NextToken], default: None ) –

    The token returned by a previous call to retrieve the next set of results.

  • max_results (Optional[MaxResults], default: None ) –

    If specified, limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.

Raises:

Source code in docs_src/capo_scheduler/_services/async_scheduler.py
async def list_schedule_groups(
    self,
    *,
    config_overrides: Optional[AsyncSchedulerClientConfig] = None,
    name_prefix: Optional[
        "capo_scheduler.types.schedule_group_name_prefix.ScheduleGroupNamePrefix"
    ] = None,
    next_token: Optional["capo_scheduler.types.next_token.NextToken"] = None,
    max_results: Optional["capo_scheduler.types.max_results.MaxResults"] = None,
) -> "capo_scheduler.types.list_schedule_groups_output.ListScheduleGroupsOutput":
    """<p>Returns a paginated list of your schedule groups.</p>

    Args:
        name_prefix: <p>The name prefix that you can use to return a filtered list of your schedule groups.</p>
        next_token: <p>The token returned by a previous call to retrieve the next set of results.</p>
        max_results: <p>If specified, limits the number of results returned by this operation. The operation also returns a <code>NextToken</code> which you can use in a subsequent operation to retrieve the next set of results.</p>

    Raises:
        capo_scheduler.errors.internal_server_exception.InternalServerException: <p>Unexpected error encountered while processing the request.</p>
        capo_scheduler.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_scheduler.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
        capo_scheduler.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_scheduler.types.list_schedule_groups_input.ListScheduleGroupsInput]",
    ) -> AsyncOperationResponse[
        "capo_scheduler.types.list_schedule_groups_output.ListScheduleGroupsOutput"
    ]:
        import capo_scheduler._operations.aws_chronos_service.list_schedule_groups

        (
            output,
            http_response,
        ) = await capo_scheduler._operations.aws_chronos_service.list_schedule_groups.async_list_schedule_groups(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListScheduleGroups")
    )
    input_: capo_scheduler.types.list_schedule_groups_input.ListScheduleGroupsInput = {}
    if name_prefix is not None:
        input_["name_prefix"] = name_prefix
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output