Skip to content

update_flow_source

update_flow_source(
    flow_arn: FlowArn,
    source_arn: str,
    *,
    config_overrides: Optional[MediaConnectClientConfig] = None,
    decryption: Optional[UpdateEncryption] = None,
    description: Optional[str] = None,
    entitlement_arn: Optional[str] = None,
    ingest_port: Optional[int] = None,
    max_bitrate: Optional[int] = None,
    max_latency: Optional[int] = None,
    max_sync_buffer: Optional[int] = None,
    media_stream_source_configurations: Optional[
        __listOfMediaStreamSourceConfigurationRequest
    ] = None,
    min_latency: Optional[int] = None,
    protocol: Optional[Protocol] = None,
    sender_control_port: Optional[int] = None,
    sender_ip_address: Optional[str] = None,
    source_listener_address: Optional[str] = None,
    source_listener_port: Optional[int] = None,
    stream_id: Optional[str] = None,
    vpc_interface_name: Optional[str] = None,
    whitelist_cidr: Optional[str] = None,
    gateway_bridge_source: Optional[UpdateGatewayBridgeSourceRequest] = None,
    ndi_source_settings: Optional[NdiSourceSettings] = None,
    router_integration_state: Optional[State] = None,
    router_integration_transit_decryption: Optional[FlowTransitEncryption] = None,
) -> UpdateFlowSourceResponse

Updates the source of a 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:

  • decryption (Optional[UpdateEncryption], default: None ) –

    The type of encryption that is used on the content ingested from the source.

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

    A description of the source. This description is not visible outside of the current Amazon Web Services account.

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

    The Amazon Resource Name (ARN) of the entitlement that allows you to subscribe to the flow. The entitlement is set by the content originator, and the ARN is generated as part of the originator's flow.

  • flow_arn (FlowArn) –

    The ARN of the flow that you want to update.

  • ingest_port (Optional[int], default: None ) –

    The port that the flow listens on for incoming content. If the protocol of the source is Zixi, the port must be set to 2088.

  • max_bitrate (Optional[int], default: None ) –

    The maximum bitrate for RIST, RTP, and RTP-FEC streams.

  • max_latency (Optional[int], default: None ) –

    The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams.

  • max_sync_buffer (Optional[int], default: None ) –

    The size of the buffer (in milliseconds) to use to sync incoming source data.

  • media_stream_source_configurations (Optional[__listOfMediaStreamSourceConfigurationRequest], default: None ) –

    The media stream that is associated with the source, and the parameters for that association.

  • min_latency (Optional[int], default: None ) –

    The minimum latency in milliseconds for SRT-based streams. In streams that use the SRT protocol, this value that you set on your MediaConnect source or output represents the minimal potential latency of that connection. The latency of the stream is set to the highest number between the sender’s minimum latency and the receiver’s minimum latency.

  • protocol (Optional[Protocol], default: None ) –

    The protocol that the source uses to deliver the content to MediaConnect.

    Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only.

  • sender_control_port (Optional[int], default: None ) –

    The port that the flow uses to send outbound requests to initiate connection with the sender.

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

    The IP address that the flow communicates with to initiate connection with the sender.

  • source_arn (str) –

    The ARN of the source that you want to update.

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

    The source IP or domain name for SRT-caller protocol.

  • source_listener_port (Optional[int], default: None ) –

    Source port for SRT-caller protocol.

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

    The stream ID that you want to use for this transport. This parameter applies only to Zixi and SRT caller-based streams.

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

    The name of the VPC interface that you want to send your output to.

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

    The range of IP addresses that are allowed to contribute content to your source. Format the IP addresses as a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.

  • gateway_bridge_source (Optional[UpdateGatewayBridgeSourceRequest], default: None ) –

    The source configuration for cloud flows receiving a stream from a bridge.

  • ndi_source_settings (Optional[NdiSourceSettings], default: None ) –

    The settings for the NDI source. This includes the exact name of the upstream NDI sender that you want to connect to your source.

  • router_integration_state (Optional[State], default: None ) –

    Indicates whether to enable or disable router integration for this flow source.

  • router_integration_transit_decryption (Optional[FlowTransitEncryption], default: None ) –

    The encryption configuration for the flow source when router integration is enabled.

Raises:

Source code in docs_src/capo_mediaconnect/_services/media_connect.py
def update_flow_source(
    self,
    flow_arn: "capo_mediaconnect.types.flow_arn.FlowArn",
    source_arn: str,
    *,
    config_overrides: Optional[MediaConnectClientConfig] = None,
    decryption: Optional[
        "capo_mediaconnect.types.update_encryption.UpdateEncryption"
    ] = None,
    description: Optional[str] = None,
    entitlement_arn: Optional[str] = None,
    ingest_port: Optional[int] = None,
    max_bitrate: Optional[int] = None,
    max_latency: Optional[int] = None,
    max_sync_buffer: Optional[int] = None,
    media_stream_source_configurations: Optional[
        "capo_mediaconnect.types.__list_of_media_stream_source_configuration_request.__listOfMediaStreamSourceConfigurationRequest"
    ] = None,
    min_latency: Optional[int] = None,
    protocol: Optional["capo_mediaconnect.types.protocol.Protocol"] = None,
    sender_control_port: Optional[int] = None,
    sender_ip_address: Optional[str] = None,
    source_listener_address: Optional[str] = None,
    source_listener_port: Optional[int] = None,
    stream_id: Optional[str] = None,
    vpc_interface_name: Optional[str] = None,
    whitelist_cidr: Optional[str] = None,
    gateway_bridge_source: Optional[
        "capo_mediaconnect.types.update_gateway_bridge_source_request.UpdateGatewayBridgeSourceRequest"
    ] = None,
    ndi_source_settings: Optional[
        "capo_mediaconnect.types.ndi_source_settings.NdiSourceSettings"
    ] = None,
    router_integration_state: Optional[
        "capo_mediaconnect.types.state.State"
    ] = None,
    router_integration_transit_decryption: Optional[
        "capo_mediaconnect.types.flow_transit_encryption.FlowTransitEncryption"
    ] = None,
) -> "capo_mediaconnect.types.update_flow_source_response.UpdateFlowSourceResponse":
    """<p> Updates the source of a 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:
        decryption: <p>The type of encryption that is used on the content ingested from the source. </p>
        description: <p>A description of the source. This description is not visible outside of the current Amazon Web Services account. </p>
        entitlement_arn: <p>The Amazon Resource Name (ARN) of the entitlement that allows you to subscribe to the flow. The entitlement is set by the content originator, and the ARN is generated as part of the originator's flow. </p>
        flow_arn: <p> The ARN of the flow that you want to update. </p>
        ingest_port: <p>The port that the flow listens on for incoming content. If the protocol of the source is Zixi, the port must be set to 2088. </p>
        max_bitrate: <p>The maximum bitrate for RIST, RTP, and RTP-FEC streams. </p>
        max_latency: <p>The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams. </p>
        max_sync_buffer: <p>The size of the buffer (in milliseconds) to use to sync incoming source data. </p>
        media_stream_source_configurations: <p>The media stream that is associated with the source, and the parameters for that association. </p>
        min_latency: <p>The minimum latency in milliseconds for SRT-based streams. In streams that use the SRT protocol, this value that you set on your MediaConnect source or output represents the minimal potential latency of that connection. The latency of the stream is set to the highest number between the sender’s minimum latency and the receiver’s minimum latency. </p>
        protocol: <p>The protocol that the source uses to deliver the content to MediaConnect. </p> <note> <p>Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only.</p> </note>
        sender_control_port: <p>The port that the flow uses to send outbound requests to initiate connection with the sender. </p>
        sender_ip_address: <p>The IP address that the flow communicates with to initiate connection with the sender. </p>
        source_arn: <p>The ARN of the source that you want to update. </p>
        source_listener_address: <p>The source IP or domain name for SRT-caller protocol. </p>
        source_listener_port: <p>Source port for SRT-caller protocol. </p>
        stream_id: <p>The stream ID that you want to use for this transport. This parameter applies only to Zixi and SRT caller-based streams. </p>
        vpc_interface_name: <p>The name of the VPC interface that you want to send your output to.</p>
        whitelist_cidr: <p>The range of IP addresses that are allowed to contribute content to your source. Format the IP addresses as a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16. </p>
        gateway_bridge_source: <p>The source configuration for cloud flows receiving a stream from a bridge. </p>
        ndi_source_settings: <p> The settings for the NDI source. This includes the exact name of the upstream NDI sender that you want to connect to your source. </p>
        router_integration_state: <p>Indicates whether to enable or disable router integration for this flow source.</p>
        router_integration_transit_decryption: <p>The encryption configuration for the flow source when router integration is enabled.</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_source_request.UpdateFlowSourceRequest]",
    ) -> OperationResponse[
        "capo_mediaconnect.types.update_flow_source_response.UpdateFlowSourceResponse"
    ]:
        import capo_mediaconnect._operations.media_connect.update_flow_source

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateFlowSource")
    )
    input_: capo_mediaconnect.types.update_flow_source_request.UpdateFlowSourceRequest = {
        "flow_arn": flow_arn,
        "source_arn": source_arn,
    }
    if decryption is not None:
        input_["decryption"] = decryption
    if description is not None:
        input_["description"] = description
    if entitlement_arn is not None:
        input_["entitlement_arn"] = entitlement_arn
    if ingest_port is not None:
        input_["ingest_port"] = ingest_port
    if max_bitrate is not None:
        input_["max_bitrate"] = max_bitrate
    if max_latency is not None:
        input_["max_latency"] = max_latency
    if max_sync_buffer is not None:
        input_["max_sync_buffer"] = max_sync_buffer
    if media_stream_source_configurations is not None:
        input_["media_stream_source_configurations"] = (
            media_stream_source_configurations
        )
    if min_latency is not None:
        input_["min_latency"] = min_latency
    if protocol is not None:
        input_["protocol"] = protocol
    if sender_control_port is not None:
        input_["sender_control_port"] = sender_control_port
    if sender_ip_address is not None:
        input_["sender_ip_address"] = sender_ip_address
    if source_listener_address is not None:
        input_["source_listener_address"] = source_listener_address
    if source_listener_port is not None:
        input_["source_listener_port"] = source_listener_port
    if stream_id is not None:
        input_["stream_id"] = stream_id
    if vpc_interface_name is not None:
        input_["vpc_interface_name"] = vpc_interface_name
    if whitelist_cidr is not None:
        input_["whitelist_cidr"] = whitelist_cidr
    if gateway_bridge_source is not None:
        input_["gateway_bridge_source"] = gateway_bridge_source
    if ndi_source_settings is not None:
        input_["ndi_source_settings"] = ndi_source_settings
    if router_integration_state is not None:
        input_["router_integration_state"] = router_integration_state
    if router_integration_transit_decryption is not None:
        input_["router_integration_transit_decryption"] = (
            router_integration_transit_decryption
        )

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