listFlowVersions method

Future<ListFlowVersionsResponse> listFlowVersions({
  1. required String flowIdentifier,
  2. int? maxResults,
  3. String? nextToken,
})

Returns a list of information about each flow. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

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

Parameter flowIdentifier : The unique identifier of the flow.

Parameter maxResults : The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.

Parameter nextToken : If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

Implementation

Future<ListFlowVersionsResponse> listFlowVersions({
  required String flowIdentifier,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/flows/${Uri.encodeComponent(flowIdentifier)}/versions',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListFlowVersionsResponse.fromJson(response);
}