Skip to content

create_bridge async

create_bridge(
    *,
    config_overrides: Optional[AsyncMediaConnectClientConfig] = None,
    egress_gateway_bridge: Optional[AddEgressGatewayBridgeRequest] = None,
    ingress_gateway_bridge: Optional[AddIngressGatewayBridgeRequest] = None,
    name: Optional[str] = None,
    outputs: Optional[__listOfAddBridgeOutputRequest] = None,
    placement_arn: Optional[str] = None,
    source_failover_config: Optional[FailoverConfig] = None,
    sources: Optional[__listOfAddBridgeSourceRequest] = None,
) -> CreateBridgeResponse

Creates a new bridge. The request must include one source.

Parameters:

  • egress_gateway_bridge (Optional[AddEgressGatewayBridgeRequest], default: None ) –

    An egress bridge is a cloud-to-ground bridge. The content comes from an existing MediaConnect flow and is delivered to your premises.

  • ingress_gateway_bridge (Optional[AddIngressGatewayBridgeRequest], default: None ) –

    An ingress bridge is a ground-to-cloud bridge. The content originates at your premises and is delivered to the cloud.

  • name (Optional[str], default: None ) –

    The name of the bridge. This name can not be modified after the bridge is created.

  • outputs (Optional[__listOfAddBridgeOutputRequest], default: None ) –

    The outputs that you want to add to this bridge.

  • placement_arn (Optional[str], default: None ) –

    The bridge placement Amazon Resource Number (ARN).

  • source_failover_config (Optional[FailoverConfig], default: None ) –

    The settings for source failover.

  • sources (Optional[__listOfAddBridgeSourceRequest], default: None ) –

    The sources that you want to add to this bridge.

Raises:

  • BadRequestException –

    This exception is thrown if the request contains a semantic error. The precise meaning depends on the API, and is documented in the error message.

  • ConflictException –

    The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

  • CreateBridge420Exception –

    Exception raised by Elemental MediaConnect when creating the bridge. See the error message for the operation for more information on the cause of this exception.

  • ForbiddenException –

    You do not have sufficient access to perform this action.

  • InternalServerErrorException –

    The server encountered an internal error and is unable to complete the request.

  • ServiceUnavailableException –

    The service is currently unavailable or busy.

  • TooManyRequestsException –

    The request was denied due to request throttling.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_mediaconnect/_services/async_media_connect.py
async def create_bridge(
    self,
    *,
    config_overrides: Optional[AsyncMediaConnectClientConfig] = None,
    egress_gateway_bridge: Optional[
        "capo_mediaconnect.types.add_egress_gateway_bridge_request.AddEgressGatewayBridgeRequest"
    ] = None,
    ingress_gateway_bridge: Optional[
        "capo_mediaconnect.types.add_ingress_gateway_bridge_request.AddIngressGatewayBridgeRequest"
    ] = None,
    name: Optional[str] = None,
    outputs: Optional[
        "capo_mediaconnect.types.__list_of_add_bridge_output_request.__listOfAddBridgeOutputRequest"
    ] = None,
    placement_arn: Optional[str] = None,
    source_failover_config: Optional[
        "capo_mediaconnect.types.failover_config.FailoverConfig"
    ] = None,
    sources: Optional[
        "capo_mediaconnect.types.__list_of_add_bridge_source_request.__listOfAddBridgeSourceRequest"
    ] = None,
) -> "capo_mediaconnect.types.create_bridge_response.CreateBridgeResponse":
    """<p> Creates a new bridge. The request must include one source.</p>

    Args:
        egress_gateway_bridge: <p>An egress bridge is a cloud-to-ground bridge. The content comes from an existing MediaConnect flow and is delivered to your premises. </p>
        ingress_gateway_bridge: <p>An ingress bridge is a ground-to-cloud bridge. The content originates at your premises and is delivered to the cloud. </p>
        name: <p> The name of the bridge. This name can not be modified after the bridge is created.</p>
        outputs: <p> The outputs that you want to add to this bridge.</p>
        placement_arn: <p> The bridge placement Amazon Resource Number (ARN).</p>
        source_failover_config: <p> The settings for source failover.</p>
        sources: <p> The sources that you want to add to this bridge.</p>

    Raises:
        capo_mediaconnect.errors.bad_request_exception.BadRequestException: <p>This exception is thrown if the request contains a semantic error. The precise meaning depends on the API, and is documented in the error message. </p>
        capo_mediaconnect.errors.conflict_exception.ConflictException: <p>The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. </p>
        capo_mediaconnect.errors.create_bridge420_exception.CreateBridge420Exception: <p>Exception raised by Elemental MediaConnect when creating the bridge. See the error message for the operation for more information on the cause of this exception. </p>
        capo_mediaconnect.errors.forbidden_exception.ForbiddenException: <p>You do not have sufficient access to perform this action. </p>
        capo_mediaconnect.errors.internal_server_error_exception.InternalServerErrorException: <p>The server encountered an internal error and is unable to complete the request. </p>
        capo_mediaconnect.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is currently unavailable or busy. </p>
        capo_mediaconnect.errors.too_many_requests_exception.TooManyRequestsException: <p>The request was denied due to request throttling. </p>
        capo_mediaconnect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mediaconnect.types.create_bridge_request.CreateBridgeRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediaconnect.types.create_bridge_response.CreateBridgeResponse"
    ]:
        import capo_mediaconnect._operations.media_connect.create_bridge

        (
            output,
            http_response,
        ) = await capo_mediaconnect._operations.media_connect.create_bridge.async_create_bridge(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateBridge")
    )
    input_: capo_mediaconnect.types.create_bridge_request.CreateBridgeRequest = {}
    if egress_gateway_bridge is not None:
        input_["egress_gateway_bridge"] = egress_gateway_bridge
    if ingress_gateway_bridge is not None:
        input_["ingress_gateway_bridge"] = ingress_gateway_bridge
    if name is not None:
        input_["name"] = name
    if outputs is not None:
        input_["outputs"] = outputs
    if placement_arn is not None:
        input_["placement_arn"] = placement_arn
    if source_failover_config is not None:
        input_["source_failover_config"] = source_failover_config
    if sources is not None:
        input_["sources"] = sources

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output