updateMapRun method

Future<void> updateMapRun({
  1. required String mapRunArn,
  2. int? maxConcurrency,
  3. int? toleratedFailureCount,
  4. double? toleratedFailurePercentage,
})

Updates an in-progress Map Run's configuration to include changes to the settings that control maximum concurrency and Map Run failure.

May throw InvalidArn. May throw ResourceNotFound. May throw ValidationException.

Parameter mapRunArn : The Amazon Resource Name (ARN) of a Map Run.

Parameter maxConcurrency : The maximum number of child workflow executions that can be specified to run in parallel for the Map Run at the same time.

Parameter toleratedFailureCount : The maximum number of failed items before the Map Run fails.

Parameter toleratedFailurePercentage : The maximum percentage of failed items before the Map Run fails.

Implementation

Future<void> updateMapRun({
  required String mapRunArn,
  int? maxConcurrency,
  int? toleratedFailureCount,
  double? toleratedFailurePercentage,
}) async {
  _s.validateNumRange(
    'maxConcurrency',
    maxConcurrency,
    0,
    1152921504606846976,
  );
  _s.validateNumRange(
    'toleratedFailureCount',
    toleratedFailureCount,
    0,
    1152921504606846976,
  );
  _s.validateNumRange(
    'toleratedFailurePercentage',
    toleratedFailurePercentage,
    0,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AWSStepFunctions.UpdateMapRun'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'mapRunArn': mapRunArn,
      if (maxConcurrency != null) 'maxConcurrency': maxConcurrency,
      if (toleratedFailureCount != null)
        'toleratedFailureCount': toleratedFailureCount,
      if (toleratedFailurePercentage != null)
        'toleratedFailurePercentage': toleratedFailurePercentage,
    },
  );
}