listThreats method

Future<ListThreatsOutput> listThreats({
  1. required String agentSpaceId,
  2. required String threatJobId,
  3. int? maxResults,
  4. String? nextToken,
})

Returns a paginated list of threats for a threat model job.

Parameter agentSpaceId : The unique identifier of the agent space.

Parameter threatJobId : The unique identifier of the threat model job to list threats 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.

Implementation

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