updateWorkflow method
Updates an existing workflow.
May throw InvalidInputException. May throw EntityNotFoundException. May throw InternalServiceException. May throw OperationTimeoutException. May throw ConcurrentModificationException.
Parameter name
:
Name of the workflow to be updated.
Parameter defaultRunProperties
:
A collection of properties to be used as part of each execution of the
workflow.
Parameter description
:
The 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.
Implementation
Future<UpdateWorkflowResponse> updateWorkflow({
required String name,
Map<String, String>? defaultRunProperties,
String? description,
int? maxConcurrentRuns,
}) 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.UpdateWorkflow'
};
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,
},
);
return UpdateWorkflowResponse.fromJson(jsonResponse.body);
}