listWorkflows method

Future<ListWorkflowsResponse> listWorkflows({
  1. int? maxResults,
  2. String? nextToken,
})

Lists all workflows associated with your Amazon Web Services account for your current region.

May throw InternalServiceError. May throw InvalidNextTokenException. May throw InvalidRequestException. May throw ServiceUnavailableException.

Parameter maxResults : The maximum number of items to return.

Parameter nextToken : ListWorkflows returns the NextToken parameter in the output. You can then pass the NextToken parameter in a subsequent command to continue listing additional workflows.

Implementation

Future<ListWorkflowsResponse> listWorkflows({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'TransferService.ListWorkflows'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListWorkflowsResponse.fromJson(jsonResponse.body);
}