getWorkflow method

Future<GetWorkflowResponse> getWorkflow({
  1. required String name,
  2. bool? includeGraph,
})

Retrieves resource metadata for a workflow.

May throw InvalidInputException. May throw EntityNotFoundException. May throw InternalServiceException. May throw OperationTimeoutException.

Parameter name : The name of the workflow to retrieve.

Parameter includeGraph : Specifies whether to include a graph when returning the workflow resource metadata.

Implementation

Future<GetWorkflowResponse> getWorkflow({
  required String name,
  bool? includeGraph,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    255,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSGlue.GetWorkflow'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Name': name,
      if (includeGraph != null) 'IncludeGraph': includeGraph,
    },
  );

  return GetWorkflowResponse.fromJson(jsonResponse.body);
}