createQueue method

Future<CreateQueueResponse> createQueue({
  1. required String name,
  2. String? description,
  3. PricingPlan? pricingPlan,
  4. ReservationPlanSettings? reservationPlanSettings,
  5. QueueStatus? status,
  6. 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 InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw TooManyRequestsException. May throw ConflictException.

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

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

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,
  String? description,
  PricingPlan? pricingPlan,
  ReservationPlanSettings? reservationPlanSettings,
  QueueStatus? status,
  Map<String, String>? tags,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  final $payload = <String, dynamic>{
    'name': name,
    if (description != null) 'description': description,
    if (pricingPlan != null) 'pricingPlan': pricingPlan.toValue(),
    if (reservationPlanSettings != null)
      'reservationPlanSettings': reservationPlanSettings,
    if (status != null) 'status': status.toValue(),
    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);
}