createPackagingConfiguration method
Creates a new MediaPackage VOD PackagingConfiguration resource.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw NotFoundException.
May throw ServiceUnavailableException.
May throw TooManyRequestsException.
May throw UnprocessableEntityException.
Parameter id :
The ID of the PackagingConfiguration.
Parameter packagingGroupId :
The ID of a PackagingGroup.
Implementation
Future<CreatePackagingConfigurationResponse> createPackagingConfiguration({
required String id,
required String packagingGroupId,
CmafPackage? cmafPackage,
DashPackage? dashPackage,
HlsPackage? hlsPackage,
MssPackage? mssPackage,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'id': id,
'packagingGroupId': packagingGroupId,
if (cmafPackage != null) 'cmafPackage': cmafPackage,
if (dashPackage != null) 'dashPackage': dashPackage,
if (hlsPackage != null) 'hlsPackage': hlsPackage,
if (mssPackage != null) 'mssPackage': mssPackage,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/packaging_configurations',
exceptionFnMap: _exceptionFns,
);
return CreatePackagingConfigurationResponse.fromJson(response);
}