createPackagingGroup method

Future<CreatePackagingGroupResponse> createPackagingGroup({
  1. required String id,
  2. Authorization? authorization,
  3. Map<String, String>? tags,
})

Creates a new MediaPackage VOD PackagingGroup resource.

May throw UnprocessableEntityException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw ServiceUnavailableException. May throw TooManyRequestsException.

Parameter id : The ID of the PackagingGroup.

Implementation

Future<CreatePackagingGroupResponse> createPackagingGroup({
  required String id,
  Authorization? authorization,
  Map<String, String>? tags,
}) async {
  ArgumentError.checkNotNull(id, 'id');
  final $payload = <String, dynamic>{
    'id': id,
    if (authorization != null) 'authorization': authorization,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/packaging_groups',
    exceptionFnMap: _exceptionFns,
  );
  return CreatePackagingGroupResponse.fromJson(response);
}