createWorkflow method
Creates a new workflow.
May throw AlreadyExistsException.
May throw ConcurrentModificationException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
May throw ResourceNumberLimitExceededException.
Parameter name :
The name to be assigned to the workflow. It should be unique within your
account.
Parameter defaultRunProperties :
A collection of properties to be used as part of each execution of the
workflow.
Run properties may be logged. Do not pass plaintext secrets as properties. Retrieve secrets from a Glue Connection, Amazon Web Services Secrets Manager or other secret management mechanism if you intend to use them within the workflow run.
Parameter description :
A description of the workflow.
Parameter maxConcurrentRuns :
You can use this parameter to prevent unwanted multiple updates to data,
to control costs, or in some cases, to prevent exceeding the maximum
number of concurrent runs of any of the component jobs. If you leave this
parameter blank, there is no limit to the number of concurrent workflow
runs.
Parameter tags :
The tags to be used with this workflow.
Implementation
Future<CreateWorkflowResponse> createWorkflow({
required String name,
Map<String, String>? defaultRunProperties,
String? description,
int? maxConcurrentRuns,
Map<String, String>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.CreateWorkflow'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
if (defaultRunProperties != null)
'DefaultRunProperties': defaultRunProperties,
if (description != null) 'Description': description,
if (maxConcurrentRuns != null) 'MaxConcurrentRuns': maxConcurrentRuns,
if (tags != null) 'Tags': tags,
},
);
return CreateWorkflowResponse.fromJson(jsonResponse.body);
}