createJobTemplate method

Future<CreateJobTemplateResponse> createJobTemplate({
  1. required String name,
  2. required JobTemplateSettings settings,
  3. AccelerationSettings? accelerationSettings,
  4. String? category,
  5. String? description,
  6. List<HopDestination>? hopDestinations,
  7. int? priority,
  8. String? queue,
  9. StatusUpdateInterval? statusUpdateInterval,
  10. Map<String, String>? tags,
})

Create a new job template. For information about job templates see the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html

May throw BadRequestException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw TooManyRequestsException. May throw ConflictException.

Parameter name : The name of the job template you are creating.

Parameter settings : JobTemplateSettings contains all the transcode settings saved in the template that will be applied to jobs created from it.

Parameter accelerationSettings : Accelerated transcoding can significantly speed up jobs with long, visually complex content. Outputs that use this feature incur pro-tier pricing. For information about feature limitations, see the AWS Elemental MediaConvert User Guide.

Parameter category : Optional. A category for the job template you are creating

Parameter description : Optional. A description of the job template you are creating.

Parameter hopDestinations : Optional. Use queue hopping to avoid overly long waits in the backlog of the queue that you submit your job to. Specify an alternate queue and the maximum time that your job will wait in the initial queue before hopping. For more information about this feature, see the AWS Elemental MediaConvert User Guide.

Parameter priority : Specify the relative priority for this job. In any given queue, the service begins processing the job with the highest value first. When more than one job has the same priority, the service begins processing the job that you submitted first. If you don't specify a priority, the service uses the default value 0.

Parameter queue : Optional. The queue that jobs created from this template are assigned to. If you don't specify this, jobs will go to the default queue.

Parameter statusUpdateInterval : Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch Events. Set the interval, in seconds, between status updates. MediaConvert sends an update at this interval from the time the service begins processing your job to the time it completes the transcode or encounters an error.

Parameter tags : The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key.

Implementation

Future<CreateJobTemplateResponse> createJobTemplate({
  required String name,
  required JobTemplateSettings settings,
  AccelerationSettings? accelerationSettings,
  String? category,
  String? description,
  List<HopDestination>? hopDestinations,
  int? priority,
  String? queue,
  StatusUpdateInterval? statusUpdateInterval,
  Map<String, String>? tags,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  ArgumentError.checkNotNull(settings, 'settings');
  _s.validateNumRange(
    'priority',
    priority,
    -50,
    50,
  );
  final $payload = <String, dynamic>{
    'name': name,
    'settings': settings,
    if (accelerationSettings != null)
      'accelerationSettings': accelerationSettings,
    if (category != null) 'category': category,
    if (description != null) 'description': description,
    if (hopDestinations != null) 'hopDestinations': hopDestinations,
    if (priority != null) 'priority': priority,
    if (queue != null) 'queue': queue,
    if (statusUpdateInterval != null)
      'statusUpdateInterval': statusUpdateInterval.toValue(),
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/2017-08-29/jobTemplates',
    exceptionFnMap: _exceptionFns,
  );
  return CreateJobTemplateResponse.fromJson(response);
}