createBridge method

Future<CreateBridgeResponse> createBridge({
  1. required String name,
  2. required String placementArn,
  3. required List<AddBridgeSourceRequest> sources,
  4. AddEgressGatewayBridgeRequest? egressGatewayBridge,
  5. AddIngressGatewayBridgeRequest? ingressGatewayBridge,
  6. List<AddBridgeOutputRequest>? outputs,
  7. FailoverConfig? sourceFailoverConfig,
})

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);
}