Skip to content

list_backlog_tasks

list_backlog_tasks(
    agent_space_id: AgentSpaceIdentifier,
    *,
    config_overrides: Optional[DevOpsAgentClientConfig] = None,
    filter: Optional[TaskFilter] = None,
    limit: Optional[int] = None,
    next_token: Optional[NextToken] = None,
    sort_field: Optional[TaskSortField] = None,
    order: Optional[TaskSortOrder] = None,
) -> ListBacklogTasksResponse

Lists backlog tasks in the specified agent space with optional filtering and sorting

Parameters:

  • agent_space_id (AgentSpaceIdentifier) –

    The unique identifier for the agent space containing the tasks

  • filter (Optional[TaskFilter], default: None ) –

    Filter criteria to apply when listing tasks Filtering restrictions: - Each filter field list is limited to a single value - Filtering by Priority and Status at the same time when not filtering by Type is not permitted - Timestamp filters (createdAfter, createdBefore) can be combined with other filters when not sorting by priority

  • limit (Optional[int], default: None ) –

    Maximum number of tasks to return in a single response (1-1000, default: 100)

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

    Token for retrieving the next page of results

  • sort_field (Optional[TaskSortField], default: None ) –

    Field to sort by Sorting restrictions: - Only sorting on createdAt is supported when using priority or status filters alone. - Sorting by priority is not supported when using Timestamp filters (createdAfter, createdBefore)

  • order (Optional[TaskSortOrder], default: None ) –

    Sort order for the tasks based on sortField (default: DESC)

Raises:

Source code in docs_src/capo_devops_agent/_services/dev_ops_agent.py
def list_backlog_tasks(
    self,
    agent_space_id: "capo_devops_agent.types.agent_space_identifier.AgentSpaceIdentifier",
    *,
    config_overrides: Optional[DevOpsAgentClientConfig] = None,
    filter: Optional["capo_devops_agent.types.task_filter.TaskFilter"] = None,
    limit: Optional[int] = None,
    next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
    sort_field: Optional[
        "capo_devops_agent.types.task_sort_field.TaskSortField"
    ] = None,
    order: Optional["capo_devops_agent.types.task_sort_order.TaskSortOrder"] = None,
) -> "capo_devops_agent.types.list_backlog_tasks_response.ListBacklogTasksResponse":
    """<p>Lists backlog tasks in the specified agent space with optional filtering and sorting</p>

    Args:
        agent_space_id: <p>The unique identifier for the agent space containing the tasks</p>
        filter: <p>Filter criteria to apply when listing tasks Filtering restrictions: - Each filter field list is limited to a single value - Filtering by Priority and Status at the same time when not filtering by Type is not permitted - Timestamp filters (createdAfter, createdBefore) can be combined with other filters when not sorting by priority</p>
        limit: <p>Maximum number of tasks to return in a single response (1-1000, default: 100)</p>
        next_token: <p>Token for retrieving the next page of results</p>
        sort_field: <p>Field to sort by Sorting restrictions: - Only sorting on createdAt is supported when using priority or status filters alone. - Sorting by priority is not supported when using Timestamp filters (createdAfter, createdBefore)</p>
        order: <p>Sort order for the tasks based on sortField (default: DESC)</p>

    Raises:
        capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
        capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
        capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
        capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
        capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
        capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
        capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
        capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
        capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_devops_agent.types.list_backlog_tasks_request.ListBacklogTasksRequest]",
    ) -> OperationResponse[
        "capo_devops_agent.types.list_backlog_tasks_response.ListBacklogTasksResponse"
    ]:
        import capo_devops_agent._operations.dev_ops_agent.list_backlog_tasks

        output, http_response = (
            capo_devops_agent._operations.dev_ops_agent.list_backlog_tasks.list_backlog_tasks(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListBacklogTasks")
    )
    input_: capo_devops_agent.types.list_backlog_tasks_request.ListBacklogTasksRequest = {
        "agent_space_id": agent_space_id
    }
    if filter is not None:
        input_["filter"] = filter
    if limit is not None:
        input_["limit"] = limit
    if next_token is not None:
        input_["next_token"] = next_token
    if sort_field is not None:
        input_["sort_field"] = sort_field
    if order is not None:
        input_["order"] = order

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output