createJob method

Future<CreateJobResponse> createJob({
  1. required RequestDetails details,
  2. required Type type,
  3. AssetConfiguration? assetConfiguration,
})

This operation creates a job.

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

Parameter details : The details for the CreateJob request.

Parameter type : The type of job to be created.

Parameter assetConfiguration : The configuration for the asset, including tags to be applied to assets created by the job.

Implementation

Future<CreateJobResponse> createJob({
  required RequestDetails details,
  required Type type,
  AssetConfiguration? assetConfiguration,
}) async {
  final $payload = <String, dynamic>{
    'Details': details,
    'Type': type.value,
    if (assetConfiguration != null) 'AssetConfiguration': assetConfiguration,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v1/jobs',
    exceptionFnMap: _exceptionFns,
  );
  return CreateJobResponse.fromJson(response);
}