listArtifacts method

Future<ListArtifactsOutput> listArtifacts({
  1. required String agentSpaceId,
  2. int? maxResults,
  3. String? nextToken,
})

Returns a paginated list of artifact summaries for the specified agent space.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter agentSpaceId : The unique identifier of the agent space to list artifacts for.

Parameter maxResults : The maximum number of results to return in a single call.

Parameter nextToken : A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the nextToken value returned from the previous request.

Implementation

Future<ListArtifactsOutput> listArtifacts({
  required String agentSpaceId,
  int? maxResults,
  String? nextToken,
}) async {
  final $payload = <String, dynamic>{
    'agentSpaceId': agentSpaceId,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/ListArtifacts',
    exceptionFnMap: _exceptionFns,
  );
  return ListArtifactsOutput.fromJson(response);
}