updateFlowSource method

Future<UpdateFlowSourceResponse> updateFlowSource({
  1. required String flowArn,
  2. required String sourceArn,
  3. UpdateEncryption? decryption,
  4. String? description,
  5. String? entitlementArn,
  6. UpdateGatewayBridgeSourceRequest? gatewayBridgeSource,
  7. int? ingestPort,
  8. int? maxBitrate,
  9. int? maxLatency,
  10. int? maxSyncBuffer,
  11. List<MediaStreamSourceConfigurationRequest>? mediaStreamSourceConfigurations,
  12. int? minLatency,
  13. NdiSourceSettings? ndiSourceSettings,
  14. Protocol? protocol,
  15. State? routerIntegrationState,
  16. FlowTransitEncryption? routerIntegrationTransitDecryption,
  17. int? senderControlPort,
  18. String? senderIpAddress,
  19. String? sourceListenerAddress,
  20. int? sourceListenerPort,
  21. String? streamId,
  22. String? vpcInterfaceName,
  23. String? whitelistCidr,
})

Updates the source of a flow.

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

May throw BadRequestException. May throw ForbiddenException. May throw InternalServerErrorException. May throw NotFoundException. May throw ServiceUnavailableException. May throw TooManyRequestsException.

Parameter flowArn : The ARN of the flow that you want to update.

Parameter sourceArn : The ARN of the source that you want to update.

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

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

Parameter entitlementArn : 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.

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

Parameter ingestPort : 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.

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

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

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

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

Parameter minLatency : 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.

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

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

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

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

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

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

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

Parameter sourceListenerPort : Source port for SRT-caller protocol.

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

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

Parameter whitelistCidr : 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.

Implementation

Future<UpdateFlowSourceResponse> updateFlowSource({
  required String flowArn,
  required String sourceArn,
  UpdateEncryption? decryption,
  String? description,
  String? entitlementArn,
  UpdateGatewayBridgeSourceRequest? gatewayBridgeSource,
  int? ingestPort,
  int? maxBitrate,
  int? maxLatency,
  int? maxSyncBuffer,
  List<MediaStreamSourceConfigurationRequest>?
      mediaStreamSourceConfigurations,
  int? minLatency,
  NdiSourceSettings? ndiSourceSettings,
  Protocol? protocol,
  State? routerIntegrationState,
  FlowTransitEncryption? routerIntegrationTransitDecryption,
  int? senderControlPort,
  String? senderIpAddress,
  String? sourceListenerAddress,
  int? sourceListenerPort,
  String? streamId,
  String? vpcInterfaceName,
  String? whitelistCidr,
}) async {
  final $payload = <String, dynamic>{
    if (decryption != null) 'decryption': decryption,
    if (description != null) 'description': description,
    if (entitlementArn != null) 'entitlementArn': entitlementArn,
    if (gatewayBridgeSource != null)
      'gatewayBridgeSource': gatewayBridgeSource,
    if (ingestPort != null) 'ingestPort': ingestPort,
    if (maxBitrate != null) 'maxBitrate': maxBitrate,
    if (maxLatency != null) 'maxLatency': maxLatency,
    if (maxSyncBuffer != null) 'maxSyncBuffer': maxSyncBuffer,
    if (mediaStreamSourceConfigurations != null)
      'mediaStreamSourceConfigurations': mediaStreamSourceConfigurations,
    if (minLatency != null) 'minLatency': minLatency,
    if (ndiSourceSettings != null) 'ndiSourceSettings': ndiSourceSettings,
    if (protocol != null) 'protocol': protocol.value,
    if (routerIntegrationState != null)
      'routerIntegrationState': routerIntegrationState.value,
    if (routerIntegrationTransitDecryption != null)
      'routerIntegrationTransitDecryption':
          routerIntegrationTransitDecryption,
    if (senderControlPort != null) 'senderControlPort': senderControlPort,
    if (senderIpAddress != null) 'senderIpAddress': senderIpAddress,
    if (sourceListenerAddress != null)
      'sourceListenerAddress': sourceListenerAddress,
    if (sourceListenerPort != null) 'sourceListenerPort': sourceListenerPort,
    if (streamId != null) 'streamId': streamId,
    if (vpcInterfaceName != null) 'vpcInterfaceName': vpcInterfaceName,
    if (whitelistCidr != null) 'whitelistCidr': whitelistCidr,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/v1/flows/${Uri.encodeComponent(flowArn)}/source/${Uri.encodeComponent(sourceArn)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateFlowSourceResponse.fromJson(response);
}