createPreset method

Future<CreatePresetResponse> createPreset({
  1. required String name,
  2. required PresetSettings settings,
  3. String? category,
  4. String? description,
  5. Map<String, String>? tags,
})

Create a new preset. 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 preset you are creating.

Parameter settings : Settings for preset

Parameter category : Optional. A category for the preset you are creating.

Parameter description : Optional. A description of the preset you are creating.

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<CreatePresetResponse> createPreset({
  required String name,
  required PresetSettings settings,
  String? category,
  String? description,
  Map<String, String>? tags,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  ArgumentError.checkNotNull(settings, 'settings');
  final $payload = <String, dynamic>{
    'name': name,
    'settings': settings,
    if (category != null) 'category': category,
    if (description != null) 'description': description,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/2017-08-29/presets',
    exceptionFnMap: _exceptionFns,
  );
  return CreatePresetResponse.fromJson(response);
}