Skip to content

add_flow_outputs async

add_flow_outputs(
    flow_arn: FlowArn,
    *,
    config_overrides: Optional[AsyncMediaConnectClientConfig] = None,
    outputs: Optional[__listOfAddOutputRequest] = None,
) -> AddFlowOutputsResponse

Adds outputs to an existing flow. You can create up to 50 outputs per flow.

Parameters:

  • flow_arn (FlowArn) –

    The Amazon Resource Name (ARN) of the flow that you want to add outputs to.

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

    A list of outputs that you want to add to the flow.

Raises:

  • AddFlowOutputs420Exception –

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

  • 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.

  • 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.

  • NotFoundException –

    One or more of the resources in the request does not exist in the system.

  • 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 add_flow_outputs(
    self,
    flow_arn: "capo_mediaconnect.types.flow_arn.FlowArn",
    *,
    config_overrides: Optional[AsyncMediaConnectClientConfig] = None,
    outputs: Optional[
        "capo_mediaconnect.types.__list_of_add_output_request.__listOfAddOutputRequest"
    ] = None,
) -> "capo_mediaconnect.types.add_flow_outputs_response.AddFlowOutputsResponse":
    """<p> Adds outputs to an existing flow. You can create up to 50 outputs per flow.</p>

    Args:
        flow_arn: <p> The Amazon Resource Name (ARN) of the flow that you want to add outputs to.</p>
        outputs: <p> A list of outputs that you want to add to the flow.</p>

    Raises:
        capo_mediaconnect.errors.add_flow_outputs420_exception.AddFlowOutputs420Exception: <p>Exception raised by Elemental MediaConnect when adding the flow output. See the error message for the operation for more information on the cause of this exception. </p>
        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.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.not_found_exception.NotFoundException: <p>One or more of the resources in the request does not exist in the system. </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.add_flow_outputs_request.AddFlowOutputsRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediaconnect.types.add_flow_outputs_response.AddFlowOutputsResponse"
    ]:
        import capo_mediaconnect._operations.media_connect.add_flow_outputs

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AddFlowOutputs")
    )
    input_: capo_mediaconnect.types.add_flow_outputs_request.AddFlowOutputsRequest = {
        "flow_arn": flow_arn
    }
    if outputs is not None:
        input_["outputs"] = outputs

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