createPackagingConfiguration method
Future<CreatePackagingConfigurationResponse>
createPackagingConfiguration({
- required String id,
- required String packagingGroupId,
- CmafPackage? cmafPackage,
- DashPackage? dashPackage,
- HlsPackage? hlsPackage,
- MssPackage? mssPackage,
- Map<
String, String> ? tags,
Creates a new MediaPackage VOD PackagingConfiguration 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 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 {
ArgumentError.checkNotNull(id, 'id');
ArgumentError.checkNotNull(packagingGroupId, 'packagingGroupId');
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);
}