createQueue method

Future<CreateQueueResponse> createQueue({
  1. required String name,
  2. int? concurrentJobs,
  3. String? description,
  4. int? maximumConcurrentFeeds,
  5. PricingPlan? pricingPlan,
  6. ReservationPlanSettings? reservationPlanSettings,
  7. QueueStatus? status,
  8. Map<String, String>? tags,
})

Create a new transcoding queue. For information about queues, see Working With Queues in the User Guide at https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-queues.html

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

Parameter name : The name of the queue that you are creating.

Parameter concurrentJobs : Specify the maximum number of jobs your queue can process concurrently. For on-demand queues, the value you enter is constrained by your service quotas for Maximum concurrent jobs, per on-demand queue and Maximum concurrent jobs, per account. For reserved queues, specify the number of jobs you can process concurrently in your reservation plan instead.

Parameter description : Optional. A description of the queue that you are creating.

Parameter maximumConcurrentFeeds : Specify the maximum number of Elemental Inference feeds MediaConvert can process concurrently.

Parameter pricingPlan : Specifies whether the pricing plan for the queue is on-demand or reserved. For on-demand, you pay per minute, billed in increments of .01 minute. For reserved, you pay for the transcoding capacity of the entire queue, regardless of how much or how little you use it. Reserved pricing requires a 12-month commitment. When you use the API to create a queue, the default is on-demand.

Parameter reservationPlanSettings : Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.

Parameter status : Initial state of the queue. If you create a paused queue, then jobs in that queue won't begin.

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<CreateQueueResponse> createQueue({
  required String name,
  int? concurrentJobs,
  String? description,
  int? maximumConcurrentFeeds,
  PricingPlan? pricingPlan,
  ReservationPlanSettings? reservationPlanSettings,
  QueueStatus? status,
  Map<String, String>? tags,
}) async {
  _s.validateNumRange(
    'maximumConcurrentFeeds',
    maximumConcurrentFeeds,
    0,
    1152921504606846976,
  );
  final $payload = <String, dynamic>{
    'name': name,
    if (concurrentJobs != null) 'concurrentJobs': concurrentJobs,
    if (description != null) 'description': description,
    if (maximumConcurrentFeeds != null)
      'maximumConcurrentFeeds': maximumConcurrentFeeds,
    if (pricingPlan != null) 'pricingPlan': pricingPlan.value,
    if (reservationPlanSettings != null)
      'reservationPlanSettings': reservationPlanSettings,
    if (status != null) 'status': status.value,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/2017-08-29/queues',
    exceptionFnMap: _exceptionFns,
  );
  return CreateQueueResponse.fromJson(response);
}