startJobRun method

Future<StartJobRunResponse> startJobRun({
  1. required String virtualClusterId,
  2. String? clientToken,
  3. ConfigurationOverrides? configurationOverrides,
  4. String? executionRoleArn,
  5. JobDriver? jobDriver,
  6. String? jobTemplateId,
  7. Map<String, String>? jobTemplateParameters,
  8. String? name,
  9. String? releaseLabel,
  10. RetryPolicyConfiguration? retryPolicyConfiguration,
  11. Map<String, String>? tags,
})

Starts a job run. A job run is a unit of work, such as a Spark jar, PySpark script, or SparkSQL query, that you submit to Amazon EMR on EKS.

May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter virtualClusterId : The virtual cluster ID for which the job run request is submitted.

Parameter clientToken : The client idempotency token of the job run request.

Parameter configurationOverrides : The configuration overrides for the job run.

Parameter executionRoleArn : The execution role ARN for the job run.

Parameter jobDriver : The job driver for the job run.

Parameter jobTemplateId : The job template ID to be used to start the job run.

Parameter jobTemplateParameters : The values of job template parameters to start a job run.

Parameter name : The name of the job run.

Parameter releaseLabel : The Amazon EMR release version to use for the job run.

Parameter retryPolicyConfiguration : The retry policy configuration for the job run.

Parameter tags : The tags assigned to job runs.

Implementation

Future<StartJobRunResponse> startJobRun({
  required String virtualClusterId,
  String? clientToken,
  ConfigurationOverrides? configurationOverrides,
  String? executionRoleArn,
  JobDriver? jobDriver,
  String? jobTemplateId,
  Map<String, String>? jobTemplateParameters,
  String? name,
  String? releaseLabel,
  RetryPolicyConfiguration? retryPolicyConfiguration,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (configurationOverrides != null)
      'configurationOverrides': configurationOverrides,
    if (executionRoleArn != null) 'executionRoleArn': executionRoleArn,
    if (jobDriver != null) 'jobDriver': jobDriver,
    if (jobTemplateId != null) 'jobTemplateId': jobTemplateId,
    if (jobTemplateParameters != null)
      'jobTemplateParameters': jobTemplateParameters,
    if (name != null) 'name': name,
    if (releaseLabel != null) 'releaseLabel': releaseLabel,
    if (retryPolicyConfiguration != null)
      'retryPolicyConfiguration': retryPolicyConfiguration,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/virtualclusters/${Uri.encodeComponent(virtualClusterId)}/jobruns',
    exceptionFnMap: _exceptionFns,
  );
  return StartJobRunResponse.fromJson(response);
}