createMultiplexProgram method
Create a new program in the multiplex.
May throw BadGatewayException.
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw GatewayTimeoutException.
May throw InternalServerErrorException.
May throw TooManyRequestsException.
May throw UnprocessableEntityException.
Parameter multiplexId :
ID of the multiplex where the program is to be created.
Parameter multiplexProgramSettings :
The settings for this multiplex program.
Parameter programName :
Name of multiplex program.
Parameter requestId :
Unique request ID. This prevents retries from creating multiple resources.
Implementation
Future<CreateMultiplexProgramResponse> createMultiplexProgram({
required String multiplexId,
required MultiplexProgramSettings multiplexProgramSettings,
required String programName,
String? requestId,
}) async {
final $payload = <String, dynamic>{
'multiplexProgramSettings': multiplexProgramSettings,
'programName': programName,
'requestId': requestId ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/prod/multiplexes/${Uri.encodeComponent(multiplexId)}/programs',
exceptionFnMap: _exceptionFns,
);
return CreateMultiplexProgramResponse.fromJson(response);
}