createBridge method
Creates a new bridge. The request must include one source.
May throw BadRequestException.
May throw ConflictException.
May throw CreateBridge420Exception.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw ServiceUnavailableException.
May throw TooManyRequestsException.
Parameter name :
The name of the bridge. This name can not be modified after the bridge is
created.
Parameter placementArn :
The bridge placement Amazon Resource Number (ARN).
Parameter sources :
The sources that you want to add to this bridge.
Parameter egressGatewayBridge :
An egress bridge is a cloud-to-ground bridge. The content comes from an
existing MediaConnect flow and is delivered to your premises.
Parameter ingressGatewayBridge :
An ingress bridge is a ground-to-cloud bridge. The content originates at
your premises and is delivered to the cloud.
Parameter outputs :
The outputs that you want to add to this bridge.
Parameter sourceFailoverConfig :
The settings for source failover.
Implementation
Future<CreateBridgeResponse> createBridge({
required String name,
required String placementArn,
required List<AddBridgeSourceRequest> sources,
AddEgressGatewayBridgeRequest? egressGatewayBridge,
AddIngressGatewayBridgeRequest? ingressGatewayBridge,
List<AddBridgeOutputRequest>? outputs,
FailoverConfig? sourceFailoverConfig,
}) async {
final $payload = <String, dynamic>{
'name': name,
'placementArn': placementArn,
'sources': sources,
if (egressGatewayBridge != null)
'egressGatewayBridge': egressGatewayBridge,
if (ingressGatewayBridge != null)
'ingressGatewayBridge': ingressGatewayBridge,
if (outputs != null) 'outputs': outputs,
if (sourceFailoverConfig != null)
'sourceFailoverConfig': sourceFailoverConfig,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/bridges',
exceptionFnMap: _exceptionFns,
);
return CreateBridgeResponse.fromJson(response);
}