Skip to content

create_backlog_task async

create_backlog_task(
    agent_space_id: AgentSpaceIdentifier,
    task_type: TaskType,
    title: BacklogTaskTitle,
    priority: Priority,
    *,
    config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
    reference: Optional[ReferenceInput] = None,
    description: Optional[BacklogTaskDescription] = None,
    client_token: Optional[str] = None,
) -> CreateBacklogTaskResponse

Creates a new backlog task in the specified agent space

Parameters:

  • agent_space_id (AgentSpaceIdentifier) –

    The unique identifier for the agent space where the task will be created

  • reference (Optional[ReferenceInput], default: None ) –

    Optional reference information for the task

  • task_type (TaskType) –

    The type of task being created

  • title (BacklogTaskTitle) –

    The title of the backlog task

  • description (Optional[BacklogTaskDescription], default: None ) –

    Optional detailed description of the task

  • priority (Priority) –

    The priority level of the task

  • client_token (Optional[str], default: None ) –

    Client-provided token for idempotent operations

Raises:

Source code in docs_src/capo_devops_agent/_services/async_dev_ops_agent.py
async def create_backlog_task(
    self,
    agent_space_id: "capo_devops_agent.types.agent_space_identifier.AgentSpaceIdentifier",
    task_type: "capo_devops_agent.types.task_type.TaskType",
    title: "capo_devops_agent.types.backlog_task_title.BacklogTaskTitle",
    priority: "capo_devops_agent.types.priority.Priority",
    *,
    config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
    reference: Optional[
        "capo_devops_agent.types.reference_input.ReferenceInput"
    ] = None,
    description: Optional[
        "capo_devops_agent.types.backlog_task_description.BacklogTaskDescription"
    ] = None,
    client_token: Optional[str] = None,
) -> (
    "capo_devops_agent.types.create_backlog_task_response.CreateBacklogTaskResponse"
):
    """<p>Creates a new backlog task in the specified agent space</p>

    Args:
        agent_space_id: <p>The unique identifier for the agent space where the task will be created</p>
        reference: <p>Optional reference information for the task</p>
        task_type: <p>The type of task being created</p>
        title: <p>The title of the backlog task</p>
        description: <p>Optional detailed description of the task</p>
        priority: <p>The priority level of the task</p>
        client_token: <p>Client-provided token for idempotent operations</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_devops_agent.types.create_backlog_task_request.CreateBacklogTaskRequest]",
    ) -> AsyncOperationResponse[
        "capo_devops_agent.types.create_backlog_task_response.CreateBacklogTaskResponse"
    ]:
        import capo_devops_agent._operations.dev_ops_agent.create_backlog_task

        (
            output,
            http_response,
        ) = await capo_devops_agent._operations.dev_ops_agent.create_backlog_task.async_create_backlog_task(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateBacklogTask")
    )
    input_: capo_devops_agent.types.create_backlog_task_request.CreateBacklogTaskRequest = {
        "agent_space_id": agent_space_id,
        "task_type": task_type,
        "title": title,
        "priority": priority,
    }
    if reference is not None:
        input_["reference"] = reference
    if description is not None:
        input_["description"] = description
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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