Skip to content

update_flow

update_flow(
    flow_arn: FlowArn,
    *,
    config_overrides: Optional[MediaConnectClientConfig] = None,
    source_failover_config: Optional[UpdateFailoverConfig] = None,
    maintenance: Optional[UpdateMaintenance] = None,
    source_monitoring_config: Optional[MonitoringConfig] = None,
    ndi_config: Optional[NdiConfig] = None,
    flow_size: Optional[FlowSize] = None,
    encoding_config: Optional[EncodingConfig] = None,
) -> UpdateFlowResponse

Updates an existing flow.

Because UpdateFlowSources and UpdateFlow are separate operations, you can't change both the source type AND the flow size in a single request.

  • If you have a MEDIUM flow and you want to change the flow source to NDI®:

    • First, use the UpdateFlow operation to upgrade the flow size to LARGE.

    • After that, you can then use the UpdateFlowSource operation to configure the NDI source.

  • If you're switching from an NDI source to a transport stream (TS) source and want to downgrade the flow size:

    • First, use the UpdateFlowSource operation to change the flow source type.

    • After that, you can then use the UpdateFlow operation to downgrade the flow size to MEDIUM.

Parameters:

  • flow_arn (FlowArn) –

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

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

    The settings for source failover.

  • maintenance (Optional[UpdateMaintenance], default: None ) –

    The maintenance setting of the flow.

  • source_monitoring_config (Optional[MonitoringConfig], default: None ) –

    The settings for source monitoring.

  • ndi_config (Optional[NdiConfig], default: None ) –

    Specifies the configuration settings for a flow's NDI source or output. Required when the flow includes an NDI source or output.

  • flow_size (Optional[FlowSize], default: None ) –

    Determines the processing capacity and feature set of the flow.

Raises:

Source code in docs_src/capo_mediaconnect/_services/media_connect.py
def update_flow(
    self,
    flow_arn: "capo_mediaconnect.types.flow_arn.FlowArn",
    *,
    config_overrides: Optional[MediaConnectClientConfig] = None,
    source_failover_config: Optional[
        "capo_mediaconnect.types.update_failover_config.UpdateFailoverConfig"
    ] = None,
    maintenance: Optional[
        "capo_mediaconnect.types.update_maintenance.UpdateMaintenance"
    ] = None,
    source_monitoring_config: Optional[
        "capo_mediaconnect.types.monitoring_config.MonitoringConfig"
    ] = None,
    ndi_config: Optional["capo_mediaconnect.types.ndi_config.NdiConfig"] = None,
    flow_size: Optional["capo_mediaconnect.types.flow_size.FlowSize"] = None,
    encoding_config: Optional[
        "capo_mediaconnect.types.encoding_config.EncodingConfig"
    ] = None,
) -> "capo_mediaconnect.types.update_flow_response.UpdateFlowResponse":
    """<p> Updates an existing flow.</p> <note> <p> Because <code>UpdateFlowSources</code> and <code>UpdateFlow</code> are separate operations, you can't change both the source type AND the flow size in a single request. </p> <ul> <li> <p>If you have a <code>MEDIUM</code> flow and you want to change the flow source to NDI®:</p> <ul> <li> <p>First, use the <code>UpdateFlow</code> operation to upgrade the flow size to <code>LARGE</code>. </p> </li> <li> <p>After that, you can then use the <code>UpdateFlowSource</code> operation to configure the NDI source. </p> </li> </ul> </li> <li> <p>If you're switching from an NDI source to a transport stream (TS) source and want to downgrade the flow size: </p> <ul> <li> <p>First, use the <code>UpdateFlowSource</code> operation to change the flow source type. </p> </li> <li> <p>After that, you can then use the <code>UpdateFlow</code> operation to downgrade the flow size to <code>MEDIUM</code>.</p> </li> </ul> </li> </ul> </note>

    Args:
        flow_arn: <p> The Amazon Resource Name (ARN) of the flow that you want to update.</p>
        source_failover_config: <p> The settings for source failover. </p>
        maintenance: <p> The maintenance setting of the flow. </p>
        source_monitoring_config: <p> The settings for source monitoring. </p>
        ndi_config: <p> Specifies the configuration settings for a flow's NDI source or output. Required when the flow includes an NDI source or output. </p>
        flow_size: <p> Determines the processing capacity and feature set of the flow. </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.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.
    """

    def _handler(
        req: "OperationRequest[capo_mediaconnect.types.update_flow_request.UpdateFlowRequest]",
    ) -> OperationResponse[
        "capo_mediaconnect.types.update_flow_response.UpdateFlowResponse"
    ]:
        import capo_mediaconnect._operations.media_connect.update_flow

        output, http_response = (
            capo_mediaconnect._operations.media_connect.update_flow.update_flow(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateFlow")
    )
    input_: capo_mediaconnect.types.update_flow_request.UpdateFlowRequest = {
        "flow_arn": flow_arn
    }
    if source_failover_config is not None:
        input_["source_failover_config"] = source_failover_config
    if maintenance is not None:
        input_["maintenance"] = maintenance
    if source_monitoring_config is not None:
        input_["source_monitoring_config"] = source_monitoring_config
    if ndi_config is not None:
        input_["ndi_config"] = ndi_config
    if flow_size is not None:
        input_["flow_size"] = flow_size
    if encoding_config is not None:
        input_["encoding_config"] = encoding_config

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output