Skip to content
v2.273.0

RouterInput L2 construct ​

Defines an AWS Elemental MediaConnect Router Input.

Example ​

ts
declare const stack: Stack;
declare const mediaLiveChannel: medialive.IChannel;

const input = new RouterInput(stack, 'ChannelInput', {
  routerInputName: 'channel-input',
  maximumBitrate: Bitrate.mbps(20),
  routingScope: RoutingScope.REGIONAL,
  tier: RouterInputTier.INPUT_20,
  configuration: RouterInputConfiguration.mediaLiveChannel({
    channel: mediaLiveChannel,
    outputName: 'router-ts',
    pipeline: MediaLivePipeline.PIPELINE_0,
  }),
});
python
# stack: Stack
# media_live_channel: medialive.IChannel


input = RouterInput(stack, "ChannelInput",
    router_input_name="channel-input",
    maximum_bitrate=Bitrate.mbps(20),
    routing_scope=RoutingScope.REGIONAL,
    tier=RouterInputTier.INPUT_20,
    configuration=RouterInputConfiguration.media_live_channel(
        channel=media_live_channel,
        output_name="router-ts",
        pipeline=MediaLivePipeline.PIPELINE_0
    )
)
java
Stack stack;
IChannel mediaLiveChannel;


RouterInput input = RouterInput.Builder.create(stack, "ChannelInput")
        .routerInputName("channel-input")
        .maximumBitrate(Bitrate.mbps(20))
        .routingScope(RoutingScope.REGIONAL)
        .tier(RouterInputTier.INPUT_20)
        .configuration(RouterInputConfiguration.mediaLiveChannel(MediaLiveChannelConfigurationProps.builder()
                .channel(mediaLiveChannel)
                .outputName("router-ts")
                .pipeline(MediaLivePipeline.PIPELINE_0)
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaConnect.Alpha
Stack stack;
IChannel mediaLiveChannel;


var input = new RouterInput(stack, "ChannelInput", new RouterInputProps {
    RouterInputName = "channel-input",
    MaximumBitrate = Bitrate.Mbps(20),
    RoutingScope = RoutingScope.REGIONAL,
    Tier = RouterInputTier.INPUT_20,
    Configuration = RouterInputConfiguration.MediaLiveChannel(new MediaLiveChannelConfigurationProps {
        Channel = mediaLiveChannel,
        OutputName = "router-ts",
        Pipeline = MediaLivePipeline.PIPELINE_0
    })
});
go
// Install: go get github.com/aws/aws-cdk-go/awsmediaconnectalpha/v2
var stack Stack
var mediaLiveChannel IChannel


input := awsmediaconnectalpha.NewRouterInput(stack, jsii.String("ChannelInput"), &RouterInputProps{
	RouterInputName: jsii.String("channel-input"),
	MaximumBitrate: awscdk.Bitrate_Mbps(jsii.Number(20)),
	RoutingScope: awsmediaconnectalpha.RoutingScope_REGIONAL(),
	Tier: awsmediaconnectalpha.RouterInputTier_INPUT_20(),
	Configuration: awsmediaconnectalpha.RouterInputConfiguration_MediaLiveChannel(&MediaLiveChannelConfigurationProps{
		Channel: mediaLiveChannel,
		OutputName: jsii.String("router-ts"),
		Pipeline: awsmediaconnectalpha.MediaLivePipeline_PIPELINE_0,
	}),
})

Initializer ​

ts
new RouterInput(scope: Construct, id: string, props: RouterInputProps)
python
RouterInput(scope: Construct, id: str, props: RouterInputProps)
java
new RouterInput(Construct scope, String id, RouterInputProps props)
csharp
new RouterInput(Construct scope, string id, RouterInputProps props)
go
NewRouterInput(Scope Construct, Id *string, Props RouterInputProps)

Construct Props ​

Configuration for the Router Input (standard, failover, merge, or MediaConnect flow).
maintenanceConfigurationMaintenanceConfigurationmaintenance_configurationMaintenanceConfigurationmaintenanceConfigurationMaintenanceConfigurationMaintenanceConfigurationMaintenanceConfigurationMaintenanceConfigurationMaintenanceConfiguration= Default maintenance window will …#
Maintenance window configuration.
default

Default: Default maintenance window will be used

maximumBitrateBitratemaximum_bitrateBitratemaximumBitrateBitrateMaximumBitrateBitrateMaximumBitrateBitraterequired#
The maximum bitrate for the router input.

Must fall within the limits of the selected tier.

regionNamestringregion_namestrregionNameStringRegionNamestringRegionName*string= Defaults to the same region as s…#
The AWS Region where the router input is located.
default

Default: Defaults to the same region as stack

routerInputNamestringrouter_input_namestrrouterInputNameStringRouterInputNamestringRouterInputName*string= Generated automatically#
Name of the Router Input.
routingScopeRoutingScoperouting_scopeRoutingScoperoutingScopeRoutingScopeRoutingScopeRoutingScopeRoutingScopeRoutingScoperequired#
Indicates whether the router input is configured for Regional or global routing.
tags{ [key: string]: string }tagstyping.Mapping[str, str]tagsMap<String, String>TagsIDictionary<string, string>Tags*map[string]*string= No tagging#
Tags to add to the Router Input.
Tier for this input.

The tier determines the capacity limits, performance characteristics, and associated costs; maximumBitrate must fall within its limits.

transitEncryptionTransitEncryptiontransit_encryptionTransitEncryptiontransitEncryptionTransitEncryptionTransitEncryptionTransitEncryptionTransitEncryptionTransitEncryption= Automatic encryption will be con…#
Transit encryption configuration using AWS Secrets Manager.

When provided without a role, a scoped IAM role is automatically created with read access to the secret.

default

Default: Automatic encryption will be configured

Properties ​

createdAtstringcreated_atstrcreatedAtStringCreatedAtstringCreatedAt*string#
The timestamp when the router input was created.
endpointsRouterInputEndpoint[]endpointstyping.List[RouterInputEndpoint]endpointsList<RouterInputEndpoint>EndpointsRouterInputEndpoint[]Endpoints*[]RouterInputEndpointrequired#
The ingest endpoints (URL + port) where the router input listens.
notes

Returns one entry for standard protocol-based variants (RTP, RIST, SRT listener), and one entry per source for failover and merge configurations built from those protocols. For example a failover RTP input will return:

[
  { url: 'rtp://203.0.113.10:5000', port: 5000 },
  { url: 'rtp://203.0.113.10:5001', port: 5001 },
]

Accessing this on SRT caller (where the router input dials out to a remote source), MediaConnect Flow, MediaLive Channel, or imported inputs throws — those variants do not expose host:port pairs the input listens on.

The environment this resource belongs to.
notes

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.

Collection of grant methods for this router input.
ipAddressstringip_addressstripAddressStringIpAddressstringIpAddress*stringrequired#
The IP address of the router input.
nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
PROPERTY_INJECTION_IDstringproperty_injection_idstrPROPERTY_INJECTION_IDStringPROPERTY_INJECTION_IDstringPROPERTY_INJECTION_ID*stringrequiredstatic#
Uniquely identifies this class.
routerInputArnstringrouter_input_arnstrrouterInputArnStringRouterInputArnstringRouterInputArn*stringrequired#
The Amazon Resource Name (ARN) of the router input.
routerInputIdstringrouter_input_idstrrouterInputIdStringRouterInputIdstringRouterInputId*stringrequired#
The unique identifier of the router input.
routerInputRefRouterInputReferencerouter_input_refRouterInputReferencerouterInputRefRouterInputReferenceRouterInputRefRouterInputReferenceRouterInputRefRouterInputReferencerequired#
A reference to this Router Input resource.

Required by the auto-generated IRouterInputRef interface.

stackStackstackStackstackStackStackStackStackStackrequired#
The stack in which this resource is defined.
transitEncryptionSecretISecrettransit_encryption_secretISecrettransitEncryptionSecretISecretTransitEncryptionSecretISecretTransitEncryptionSecretISecret#
The Secrets Manager secret containing the transit encryption passphrase.

Only available when the Router Input was created with explicit transitEncryption configuration. Not available for automatic encryption or imported inputs.

updatedAtstringupdated_atstrupdatedAtStringUpdatedAtstringUpdatedAt*string#
The timestamp when the router input was last updated.

Methods ​

applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#
Override the cross-stack reference strength for this resource.
notes · 1 parameter

When set, any cross-stack reference to this resource will use the specified mechanism instead of the global default determined by the @aws-cdk/core:defaultCrossStackReferences context key. This is useful for selectively weakening specific references to avoid the "deadly embrace" problem without changing the app-wide default.

Parameters

  • strengthstrengthstrengthstrengthStrength — - The reference strength to use for this resource.
applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#
Apply the given removal policy to this resource.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

fromRouterInputArn(scope: Construct, id: string, routerInputArn: string): IRouterInput@staticmethod def from_router_input_arn(scope: Construct, id: str, router_input_arn: str) -> IRouterInputpublic static IRouterInput fromRouterInputArn(Construct scope, String id, String routerInputArn)public static IRouterInput FromRouterInputArn(Construct scope, string id, string routerInputArn)func FromRouterInputArn(Scope Construct, Id *string, RouterInputArn *string) IRouterInputstatic#
Import an existing Router Input from its ARN.

Use fromRouterInputAttributes() instead if you need to expose routerInputId or ipAddress on the imported construct.

3 parameters · returns

Parameters

  • scopescopescopescopeScope — The parent construct.
  • ididididId — The construct id.
  • routerInputArnrouter_input_arnrouterInputArnrouterInputArnRouterInputArn — The ARN of the Router Input.

Returns: A Router Input construct

fromRouterInputAttributes(scope: Construct, id: string, attrs: RouterInputAttributes): IRouterInput@staticmethod def from_router_input_attributes(scope: Construct, id: str, attrs: RouterInputAttributes) -> IRouterInputpublic static IRouterInput fromRouterInputAttributes(Construct scope, String id, RouterInputAttributes attrs)public static IRouterInput FromRouterInputAttributes(Construct scope, string id, RouterInputAttributes attrs)func FromRouterInputAttributes(Scope Construct, Id *string, Attrs RouterInputAttributes) IRouterInputstatic#
Import an existing Router Input from its attributes.

Provide routerInputId and/or ipAddress when importing an input that was deployed externally — otherwise accessing those properties on the imported construct will throw.

3 parameters · returns

Parameters

  • scopescopescopescopeScope — The parent construct.
  • ididididId — The construct id.
  • attrsattrsattrsattrsAttrs — The Router Input attributes.

Returns: A Router Input construct

isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

isOwnedResource(construct: IConstruct): boolean@staticmethod def is_owned_resource(construct: IConstruct) -> boolpublic static Boolean isOwnedResource(IConstruct construct)public static bool IsOwnedResource(IConstruct construct)func IsOwnedResource(Construct IConstruct) *boolstatic#
Returns true if the construct was created by CDK, and false otherwise.
isResource(construct: IConstruct): boolean@staticmethod def is_resource(construct: IConstruct) -> boolpublic static Boolean isResource(IConstruct construct)public static bool IsResource(IConstruct construct)func IsResource(Construct IConstruct) *boolstatic#
Check whether the given construct is a Resource.
metric(metricName: string, props?: MetricOptions): Metricdef metric(self, metric_name: str, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metric(String metricName, MetricOptions props)public Metric Metric(string metricName, MetricOptions? props = null)func Metric(MetricName *string, Props MetricOptions) Metric#
Create a CloudWatch metric for this router input.
metricBitrate(props?: MetricOptions): Metricdef metric_bitrate(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricBitrate(MetricOptions props)public Metric MetricBitrate(MetricOptions? props = null)func MetricBitrate(Props MetricOptions) Metric#
Metric for the bitrate of the router input's payload.
metricConnected(props?: MetricOptions): Metricdef metric_connected(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricConnected(MetricOptions props)public Metric MetricConnected(MetricOptions? props = null)func MetricConnected(Props MetricOptions) Metric#
Metric for the router input connection state (1 connected, 0 disconnected).

Applies to SRT sources only.

metricContinuityCounterErrors(props?: MetricOptions): Metricdef metric_continuity_counter_errors(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricContinuityCounterErrors(MetricOptions props)public Metric MetricContinuityCounterErrors(MetricOptions? props = null)func MetricContinuityCounterErrors(Props MetricOptions) Metric#
Metric for continuity counter errors in the transport stream.
metricFailoverSwitches(props?: MetricOptions): Metricdef metric_failover_switches(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricFailoverSwitches(MetricOptions props)public Metric MetricFailoverSwitches(MetricOptions? props = null)func MetricFailoverSwitches(Props MetricOptions) Metric#
Metric for the number of times the router input has switched sources in Failover mode.
metricLatency(props?: MetricOptions): Metricdef metric_latency(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricLatency(MetricOptions props)public Metric MetricLatency(MetricOptions? props = null)func MetricLatency(Props MetricOptions) Metric#
Metric for the recovery latency of the input stream.

Applies to RIST, SRT, and RTP-FEC.

metricNotRecoveredPackets(props?: MetricOptions): Metricdef metric_not_recovered_packets(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricNotRecoveredPackets(MetricOptions props)public Metric MetricNotRecoveredPackets(MetricOptions? props = null)func MetricNotRecoveredPackets(Props MetricOptions) Metric#
Metric for packets lost in transit that were not recovered by error correction.
metricTotalPackets(props?: MetricOptions): Metricdef metric_total_packets(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricTotalPackets(MetricOptions props)public Metric MetricTotalPackets(MetricOptions? props = null)func MetricTotalPackets(Props MetricOptions) Metric#
Metric for the total number of packets received by the router input.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.