startRunBatch method

Future<StartRunBatchResponse> startRunBatch({
  1. required BatchRunSettings batchRunSettings,
  2. required DefaultRunSetting defaultRunSetting,
  3. String? batchName,
  4. String? requestId,
  5. Map<String, String>? tags,
})

Starts a batch of workflow runs. You can group up to 100,000 runs into a single batch that share a common configuration defined in defaultRunSetting. Per-run overrides can be provided either inline via inlineSettings (up to 100 runs) or via a JSON file stored in Amazon S3 via s3UriSettings (up to 100,000 runs).

StartRunBatch validates common fields synchronously and returns immediately with a batch ID and status CREATING. The batch transitions to PENDING once initial setup completes. Runs are then submitted gradually and asynchronously at a rate governed by your StartRun throughput quota.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw RequestTimeoutException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter batchRunSettings : The individual run configurations. Specify exactly one of inlineSettings or s3UriSettings. See BatchRunSettings.

Parameter defaultRunSetting : Shared configuration applied to all runs in the batch. See DefaultRunSetting.

Parameter batchName : An optional user-friendly name for the run batch.

Parameter requestId : A client token used to deduplicate retry requests and prevent duplicate batches from being created.

Parameter tags : AWS tags to associate with the batch resource. These tags are not inherited by individual runs. To tag individual runs, use defaultRunSetting.runTags.

Implementation

Future<StartRunBatchResponse> startRunBatch({
  required BatchRunSettings batchRunSettings,
  required DefaultRunSetting defaultRunSetting,
  String? batchName,
  String? requestId,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'batchRunSettings': batchRunSettings,
    'defaultRunSetting': defaultRunSetting,
    if (batchName != null) 'batchName': batchName,
    'requestId': requestId ?? _s.generateIdempotencyToken(),
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/runBatch',
    exceptionFnMap: _exceptionFns,
  );
  return StartRunBatchResponse.fromJson(response);
}