updateGoal method
Update an existing goal
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 containing the goal
Parameter goalId :
The unique identifier of the goal to update
Parameter clientToken :
Client-provided token for idempotent operations
Parameter evaluationSchedule :
Update goal schedule state
Implementation
Future<UpdateGoalResponse> updateGoal({
required String agentSpaceId,
required String goalId,
String? clientToken,
GoalScheduleInput? evaluationSchedule,
}) async {
final $payload = <String, dynamic>{
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (evaluationSchedule != null) 'evaluationSchedule': evaluationSchedule,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/backlog/agent-space/${Uri.encodeComponent(agentSpaceId)}/goals/${Uri.encodeComponent(goalId)}',
hostPrefix: 'dp.',
exceptionFnMap: _exceptionFns,
);
return UpdateGoalResponse.fromJson(response);
}