java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.mediaconnect.alpha.Flow
All Implemented Interfaces:
IEnvironmentAware, IFlowRef, IResource, IFlow, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.138.0 (build 0ca7ee8)", date="2026-07-31T10:49:55.142Z") @Stability(Experimental) public class Flow extends Resource implements IFlow
(experimental) Defines an AWS Elemental MediaConnect Flow.

Example:

 Stack stack;
 ISecurityGroup securityGroup;
 ISubnet subnet;
 IRole role;
 VpcInterfaceConfig vpcInterface = VpcInterface.define(VpcInterfaceDefineProps.builder()
         .vpcInterfaceName("my-vpc-interface")
         .role(role)
         .securityGroups(List.of(securityGroup))
         .subnet(subnet)
         .build());
 Flow flow = Flow.Builder.create(stack, "MyFlow")
         .source(SourceConfiguration.rist(SourceRist.builder()
                 .flowSourceName("vpc-source")
                 .description("VPC-based source")
                 .port(5000)
                 .maxLatency(Duration.millis(2000))
                 .network(NetworkConfiguration.vpc(vpcInterface))
                 .build()))
         .vpcInterfaces(List.of(vpcInterface))
         .build();
 
  • Field Details

    • PROPERTY_INJECTION_ID

      @Stability(Experimental) public static final String PROPERTY_INJECTION_ID
      (experimental) Uniquely identifies this class.
  • Constructor Details

    • Flow

      protected Flow(software.amazon.jsii.JsiiObjectRef objRef)
    • Flow

      protected Flow(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Flow

      @Stability(Experimental) public Flow(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull FlowProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromFlowArn

      @Stability(Experimental) @NotNull public static IFlow fromFlowArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String flowArn)
      (experimental) Import an existing Flow from its ARN.

      Use fromFlowAttributes() instead if you need access to sourceArn or any other attribute not encoded in the flow ARN.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      flowArn - This parameter is required.
    • fromFlowAttributes

      @Stability(Experimental) @NotNull public static IFlow fromFlowAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull FlowAttributes attrs)
      (experimental) Creates a Flow construct that represents an external (imported) Flow.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • addOutput

      @Stability(Experimental) @NotNull public IFlowOutput addOutput(@NotNull String id, @NotNull OutputConfiguration outputConfig)
      (experimental) Add an output to this flow.

      Specified by:
      addOutput in interface IFlow
      Parameters:
      id - This parameter is required.
      outputConfig - This parameter is required.
    • addVpcInterface

      @Stability(Experimental) @NotNull public VpcInterfaceConfig addVpcInterface(@NotNull VpcInterfaceConfig vpc)
      (experimental) Add a VPC interface to this flow.

      Parameters:
      vpc - This parameter is required.
    • metric

      @Stability(Experimental) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
      (experimental) Create a CloudWatch metric for this flow.

      Specified by:
      metric in interface IFlow
      Parameters:
      metricName - This parameter is required.
      props -
    • metric

      @Stability(Experimental) @NotNull public Metric metric(@NotNull String metricName)
      (experimental) Create a CloudWatch metric for this flow.

      Specified by:
      metric in interface IFlow
      Parameters:
      metricName - This parameter is required.
    • metricSourceBitrate

      @Stability(Experimental) @NotNull public Metric metricSourceBitrate(@Nullable MetricOptions props)
      (experimental) Metric for the bitrate of content ingested into the flow.

      Emits the `SourceBitRate` metric with dimension `FlowARN`, which aggregates across all sources on the flow. To narrow to a specific source on a multi-source flow, call metric(java.lang.String,software.amazon.awscdk.services.cloudwatch.MetricOptions) with an additional `SourceARN` dimension.

      Default: - average over 60 seconds

      Specified by:
      metricSourceBitrate in interface IFlow
      Parameters:
      props -
    • metricSourceBitrate

      @Stability(Experimental) @NotNull public Metric metricSourceBitrate()
      (experimental) Metric for the bitrate of content ingested into the flow.

      Emits the `SourceBitRate` metric with dimension `FlowARN`, which aggregates across all sources on the flow. To narrow to a specific source on a multi-source flow, call metric(java.lang.String,software.amazon.awscdk.services.cloudwatch.MetricOptions) with an additional `SourceARN` dimension.

      Default: - average over 60 seconds

      Specified by:
      metricSourceBitrate in interface IFlow
    • metricSourceConnected

      @Stability(Experimental) @NotNull public Metric metricSourceConnected(@Nullable MetricOptions props)
      (experimental) Metric indicating the connection state of the source.

      1 for connected, 0 for disconnected. Applies only to Zixi, SRT, and RIST sources.

      Emits the SourceConnected metric with dimension FlowARN.

      Default: - minimum over 60 seconds

      Specified by:
      metricSourceConnected in interface IFlow
      Parameters:
      props -
    • metricSourceConnected

      @Stability(Experimental) @NotNull public Metric metricSourceConnected()
      (experimental) Metric indicating the connection state of the source.

      1 for connected, 0 for disconnected. Applies only to Zixi, SRT, and RIST sources.

      Emits the SourceConnected metric with dimension FlowARN.

      Default: - minimum over 60 seconds

      Specified by:
      metricSourceConnected in interface IFlow
    • metricSourceDisconnections

      @Stability(Experimental) @NotNull public Metric metricSourceDisconnections(@Nullable MetricOptions props)
      (experimental) Metric for the number of times the source transitioned from connected to disconnected.

      Emits the SourceDisconnections metric with dimension FlowARN.

      Default: - sum over 60 seconds

      Specified by:
      metricSourceDisconnections in interface IFlow
      Parameters:
      props -
    • metricSourceDisconnections

      @Stability(Experimental) @NotNull public Metric metricSourceDisconnections()
      (experimental) Metric for the number of times the source transitioned from connected to disconnected.

      Emits the SourceDisconnections metric with dimension FlowARN.

      Default: - sum over 60 seconds

      Specified by:
      metricSourceDisconnections in interface IFlow
    • metricSourceDroppedPackets

      @Stability(Experimental) @NotNull public Metric metricSourceDroppedPackets(@Nullable MetricOptions props)
      (experimental) Metric for the number of packets lost during transit, measured before any error correction takes place.

      Emits the SourceDroppedPackets metric with dimension FlowARN.

      Default: - sum over 60 seconds

      Specified by:
      metricSourceDroppedPackets in interface IFlow
      Parameters:
      props -
    • metricSourceDroppedPackets

      @Stability(Experimental) @NotNull public Metric metricSourceDroppedPackets()
      (experimental) Metric for the number of packets lost during transit, measured before any error correction takes place.

      Emits the SourceDroppedPackets metric with dimension FlowARN.

      Default: - sum over 60 seconds

      Specified by:
      metricSourceDroppedPackets in interface IFlow
    • metricSourceJitter

      @Stability(Experimental) @NotNull public Metric metricSourceJitter(@Nullable MetricOptions props)
      (experimental) Metric for the current network jitter of the source, measured in milliseconds.

      Emits the SourceJitter metric with dimension FlowARN.

      Default: - average over 60 seconds

      Specified by:
      metricSourceJitter in interface IFlow
      Parameters:
      props -
    • metricSourceJitter

      @Stability(Experimental) @NotNull public Metric metricSourceJitter()
      (experimental) Metric for the current network jitter of the source, measured in milliseconds.

      Emits the SourceJitter metric with dimension FlowARN.

      Default: - average over 60 seconds

      Specified by:
      metricSourceJitter in interface IFlow
    • metricSourceNotRecoveredPackets

      @Stability(Experimental) @NotNull public Metric metricSourceNotRecoveredPackets(@Nullable MetricOptions props)
      (experimental) Metric for packets that were lost in transit and not recovered by error correction.

      Emits the SourceNotRecoveredPackets metric with dimension FlowARN, which aggregates across all sources on the flow.

      Default: - sum over 60 seconds

      Specified by:
      metricSourceNotRecoveredPackets in interface IFlow
      Parameters:
      props -
    • metricSourceNotRecoveredPackets

      @Stability(Experimental) @NotNull public Metric metricSourceNotRecoveredPackets()
      (experimental) Metric for packets that were lost in transit and not recovered by error correction.

      Emits the SourceNotRecoveredPackets metric with dimension FlowARN, which aggregates across all sources on the flow.

      Default: - sum over 60 seconds

      Specified by:
      metricSourceNotRecoveredPackets in interface IFlow
    • metricSourcePacketLossPercent

      @Stability(Experimental) @NotNull public Metric metricSourcePacketLossPercent(@Nullable MetricOptions props)
      (experimental) Metric for the percentage of packets lost during transit, even if they were recovered.

      Emits the SourcePacketLossPercent metric with dimension FlowARN.

      Default: - average over 60 seconds

      Specified by:
      metricSourcePacketLossPercent in interface IFlow
      Parameters:
      props -
    • metricSourcePacketLossPercent

      @Stability(Experimental) @NotNull public Metric metricSourcePacketLossPercent()
      (experimental) Metric for the percentage of packets lost during transit, even if they were recovered.

      Emits the SourcePacketLossPercent metric with dimension FlowARN.

      Default: - average over 60 seconds

      Specified by:
      metricSourcePacketLossPercent in interface IFlow
    • metricSourceRoundTripTime

      @Stability(Experimental) @NotNull public Metric metricSourceRoundTripTime(@Nullable MetricOptions props)
      (experimental) Metric for the round-trip time between the source and MediaConnect. Applies only to RIST, Zixi, and SRT sources.

      Emits the SourceRoundTripTime metric with dimension FlowARN.

      Default: - average over 60 seconds

      Specified by:
      metricSourceRoundTripTime in interface IFlow
      Parameters:
      props -
    • metricSourceRoundTripTime

      @Stability(Experimental) @NotNull public Metric metricSourceRoundTripTime()
      (experimental) Metric for the round-trip time between the source and MediaConnect. Applies only to RIST, Zixi, and SRT sources.

      Emits the SourceRoundTripTime metric with dimension FlowARN.

      Default: - average over 60 seconds

      Specified by:
      metricSourceRoundTripTime in interface IFlow
    • metricSourceSelected

      @Stability(Experimental) @NotNull public Metric metricSourceSelected(@Nullable MetricOptions props)
      (experimental) Metric indicating which source is selected for ingest when using Failover failover mode.

      A value of 1 indicates the source is being used as the input; 0 indicates it is standby. Emits the `SourceSelected` metric with dimension `FlowARN`. To narrow to a specific source, call metric(java.lang.String,software.amazon.awscdk.services.cloudwatch.MetricOptions) with an additional `SourceARN` dimension.

      Default: - maximum over 60 seconds

      Specified by:
      metricSourceSelected in interface IFlow
      Parameters:
      props -
    • metricSourceSelected

      @Stability(Experimental) @NotNull public Metric metricSourceSelected()
      (experimental) Metric indicating which source is selected for ingest when using Failover failover mode.

      A value of 1 indicates the source is being used as the input; 0 indicates it is standby. Emits the `SourceSelected` metric with dimension `FlowARN`. To narrow to a specific source, call metric(java.lang.String,software.amazon.awscdk.services.cloudwatch.MetricOptions) with an additional `SourceARN` dimension.

      Default: - maximum over 60 seconds

      Specified by:
      metricSourceSelected in interface IFlow
    • metricSourceTotalPackets

      @Stability(Experimental) @NotNull public Metric metricSourceTotalPackets(@Nullable MetricOptions props)
      (experimental) Metric for the total number of packets received by the flow sources.

      Emits the SourceTotalPackets metric with dimension FlowARN, which aggregates across all sources on the flow.

      Default: - sum over 60 seconds

      Specified by:
      metricSourceTotalPackets in interface IFlow
      Parameters:
      props -
    • metricSourceTotalPackets

      @Stability(Experimental) @NotNull public Metric metricSourceTotalPackets()
      (experimental) Metric for the total number of packets received by the flow sources.

      Emits the SourceTotalPackets metric with dimension FlowARN, which aggregates across all sources on the flow.

      Default: - sum over 60 seconds

      Specified by:
      metricSourceTotalPackets in interface IFlow
    • getEgressIp

      @Stability(Experimental) @NotNull public String getEgressIp()
      (experimental) The IP address that the flow uses to send outbound content.
      Specified by:
      getEgressIp in interface IFlow
    • getFlowArn

      @Stability(Experimental) @NotNull public String getFlowArn()
      (experimental) The Amazon Resource Name (ARN) of the flow.
      Specified by:
      getFlowArn in interface IFlow
    • getFlowRef

      @Stability(Experimental) @NotNull public FlowReference getFlowRef()
      (experimental) A reference to this Flow resource.

      Required by the auto-generated IFlowRef interface.

      Specified by:
      getFlowRef in interface IFlowRef
    • getGrants

      @Stability(Experimental) @NotNull public FlowGrants getGrants()
      (experimental) Collection of grant methods for this flow.
      Specified by:
      getGrants in interface IFlow
    • getSourceArn

      @Stability(Experimental) @NotNull public String getSourceArn()
      (experimental) The Amazon Resource Name (ARN) of the source defined on the flow.
      Specified by:
      getSourceArn in interface IFlow
    • getSourceIngestIp

      @Stability(Experimental) @NotNull public String getSourceIngestIp()
      (experimental) The IP address that the flow listens on for incoming content.

      Available for listener-style source protocols (RTP, RTP-FEC, RIST, SRT listener, Zixi push). Accessing this on SRT caller, entitlement, gateway bridge, router, CDI, JPEG XS, or imported flows throws — those sources don't expose a listening IP address.

      Specified by:
      getSourceIngestIp in interface IFlow
    • getSourceIngestPort

      @Stability(Experimental) @NotNull public String getSourceIngestPort()
      (experimental) The port that the flow listens on for incoming content.

      Available for the same listener-style source protocols as sourceIngestIp. Accessing this on SRT caller, entitlement, gateway bridge, router, CDI, JPEG XS, or imported flows throws.

      Specified by:
      getSourceIngestPort in interface IFlow
    • getSourceIngestUrl

      @Stability(Experimental) @NotNull public String getSourceIngestUrl()
      (experimental) The full ingest URL for the flow source, combining protocol, IP, and port. For example: srt://203.0.113.10:5000.

      Available for listener-style source protocols (RTP, RTP-FEC, RIST, SRT listener, Zixi push) where the flow listens for an upstream sender. Accessing this on SRT caller, entitlement, gateway bridge, router, CDI, JPEG XS, or imported flows throws — those sources don't expose a single host:port ingest URL.

      Specified by:
      getSourceIngestUrl in interface IFlow
    • getFlowAvailabilityZone

      @Stability(Experimental) @Nullable public String getFlowAvailabilityZone()
      (experimental) The Availability Zone that the flow was created in.
      Specified by:
      getFlowAvailabilityZone in interface IFlow
    • getIsFailoverEnabled

      @Stability(Experimental) @Nullable public Boolean getIsFailoverEnabled()
      (experimental) Failover Configuration for flow.
      Specified by:
      getIsFailoverEnabled in interface IFlow