createMultiplex method
Create a new 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 availabilityZones :
A list of availability zones for the multiplex. You must specify exactly
two.
Parameter multiplexSettings :
Configuration for a multiplex event.
Parameter name :
Name of multiplex.
Parameter requestId :
Unique request ID. This prevents retries from creating multiple resources.
Parameter tags :
A collection of key-value pairs.
Implementation
Future<CreateMultiplexResponse> createMultiplex({
required List<String> availabilityZones,
required MultiplexSettings multiplexSettings,
required String name,
String? requestId,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'availabilityZones': availabilityZones,
'multiplexSettings': multiplexSettings,
'name': name,
'requestId': requestId ?? _s.generateIdempotencyToken(),
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/prod/multiplexes',
exceptionFnMap: _exceptionFns,
);
return CreateMultiplexResponse.fromJson(response);
}