listGoals method
Lists goals in the specified agent space with optional filtering
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter agentSpaceId :
The unique identifier for the agent space
Parameter goalType :
Filter goals by goal type
Parameter limit :
Maximum number of goals to return
Parameter nextToken :
Pagination token for the next set of results
Parameter status :
Filter goals by goal status
Implementation
Future<ListGoalsResponse> listGoals({
required String agentSpaceId,
GoalType? goalType,
int? limit,
String? nextToken,
GoalStatus? status,
}) async {
final $payload = <String, dynamic>{
if (goalType != null) 'goalType': goalType.value,
if (limit != null) 'limit': limit,
if (nextToken != null) 'nextToken': nextToken,
if (status != null) 'status': status.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/backlog/agent-space/${Uri.encodeComponent(agentSpaceId)}/goals/list',
hostPrefix: 'dp.',
exceptionFnMap: _exceptionFns,
);
return ListGoalsResponse.fromJson(response);
}