createBacklogTask method
Creates a new backlog task in the specified agent space
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter agentSpaceId :
The unique identifier for the agent space where the task will be created
Parameter priority :
The priority level of the task
Parameter taskType :
The type of task being created
Parameter title :
The title of the backlog task
Parameter clientToken :
Client-provided token for idempotent operations
Parameter description :
Optional detailed description of the task
Parameter reference :
Optional reference information for the task
Implementation
Future<CreateBacklogTaskResponse> createBacklogTask({
required String agentSpaceId,
required Priority priority,
required TaskType taskType,
required String title,
String? clientToken,
String? description,
ReferenceInput? reference,
}) async {
final $payload = <String, dynamic>{
'priority': priority.value,
'taskType': taskType.value,
'title': title,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'description': description,
if (reference != null) 'reference': reference,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/backlog/agent-space/${Uri.encodeComponent(agentSpaceId)}/tasks',
hostPrefix: 'dp.',
exceptionFnMap: _exceptionFns,
);
return CreateBacklogTaskResponse.fromJson(response);
}