class RouterInput (construct)
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.MediaConnect.Alpha.RouterInput |
Go | github.com/aws/aws-cdk-go/awsmediaconnectalpha/v2#RouterInput |
Java | software.amazon.awscdk.services.mediaconnect.alpha.RouterInput |
Python | aws_cdk.aws_mediaconnect_alpha.RouterInput |
TypeScript (source) | @aws-cdk/aws-mediaconnect-alpha ยป RouterInput |
Implements
IConstruct, IDependable, IResource, IEnvironment, IRouter, IRouter
Defines an AWS Elemental MediaConnect Router Input.
Example
declare const stack: Stack;
declare const networkInterface: RouterNetworkInterface;
const input = new RouterInput(stack, 'FailoverInput', {
routerInputName: 'failover-input',
maximumBitrate: Bitrate.mbps(10),
routingScope: RoutingScope.REGIONAL,
tier: RouterInputTier.INPUT_50,
configuration: RouterInputConfiguration.failover({
networkInterface: networkInterface,
protocols: [
RouterInputProtocol.rist({
port: 5000,
recoveryLatency: Duration.millis(1000),
}),
RouterInputProtocol.rist({
port: 5002, // Must not be consecutive with primary port
recoveryLatency: Duration.millis(1000),
}),
],
sourcePriority: SourcePriorityConfig.primarySecondary(PrimarySource.FIRST_SOURCE),
}),
});
Initializer
new RouterInput(scope: Construct, id: string, props: RouterInputProps)
Parameters
- scope
Construct - id
string - props
RouterInput Props
Construct Props
| Name | Type | Description |
|---|---|---|
| configuration | Router | Configuration for the Router Input (standard, failover, merge, or MediaConnect flow). |
| maximum | Bitrate | Maximum bitrate in bits per second that the Router Input can handle. |
| routing | Routing | Routing scope for the Router Input. |
| maintenance | Maintenance | Maintenance window configuration. |
| region | string | AWS region where the Router Input will be created (i.e. us-east-1). |
| router | string | Name of the Router Input. |
| tags? | { [string]: string } | Tags to add to the Router Input. |
| tier? | Router | Select a tier based on your maximum bitrate requirements. |
| transit | Transit | Transit encryption configuration using AWS Secrets Manager. |
configuration
Type:
Router
Configuration for the Router Input (standard, failover, merge, or MediaConnect flow).
maximumBitrate
Type:
Bitrate
Maximum bitrate in bits per second that the Router Input can handle.
routingScope
Type:
Routing
Routing scope for the Router Input.
maintenanceConfiguration?
Type:
Maintenance
(optional, default: Default maintenance window will be used)
Maintenance window configuration.
regionName?
Type:
string
(optional, default: Same as the stack's region)
AWS region where the Router Input will be created (i.e. us-east-1).
Must match the region of the flows, flow outputs, and network interfaces it connects to โ MediaConnect rejects a cross-region connection at deploy.
routerInputName?
Type:
string
(optional, default: Generated automatically)
Name of the Router Input.
tags?
Type:
{ [string]: string }
(optional, default: No tagging)
Tags to add to the Router Input.
tier?
Type:
Router
(optional, default: RouterInputTier.INPUT_20)
Select a tier based on your maximum bitrate requirements.
transitEncryption?
Type:
Transit
(optional, default: Automatic encryption will be configured)
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.
Properties
| Name | Type | Description |
|---|---|---|
| endpoints | Router[] | The ingest endpoints (URL + port) where the router input listens. |
| env | Resource | The environment this resource belongs to. |
| grants | Router | Collection of grant methods for this router input. |
| ip | string | The IP address of the router input. |
| node | Node | The tree node. |
| router | string | The Amazon Resource Name (ARN) of the router input. |
| router | string | The unique identifier of the router input. |
| router | Router | A reference to this Router Input resource. |
| stack | Stack | The stack in which this resource is defined. |
| created | string | The timestamp when the router input was created. |
| transit | ISecret | The Secrets Manager secret containing the transit encryption passphrase. |
| updated | string | The timestamp when the router input was last updated. |
| static PROPERTY_INJECTION_ID | string | Uniquely identifies this class. |
endpoints
Type:
Router[]
The ingest endpoints (URL + port) where the router input listens.
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.
env
Type:
Resource
The environment this resource belongs to.
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.
grants
Type:
Router
Collection of grant methods for this router input.
ipAddress
Type:
string
The IP address of the router input.
node
Type:
Node
The tree node.
routerInputArn
Type:
string
The Amazon Resource Name (ARN) of the router input.
routerInputId
Type:
string
The unique identifier of the router input.
routerInputRef
Type:
Router
A reference to this Router Input resource.
Required by the auto-generated IRouterInputRef interface.
stack
Type:
Stack
The stack in which this resource is defined.
createdAt?
Type:
string
(optional)
The timestamp when the router input was created.
transitEncryptionSecret?
Type:
ISecret
(optional)
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.
updatedAt?
Type:
string
(optional)
The timestamp when the router input was last updated.
static PROPERTY_INJECTION_ID
Type:
string
Uniquely identifies this class.
Methods
| Name | Description |
|---|---|
| apply | Override the cross-stack reference strength for this resource. |
| apply | Apply the given removal policy to this resource. |
| metric(metricName, props?) | Create a CloudWatch metric for this router input. |
| metric | Metric for the bitrate of the router input's payload. |
| metric | Metric for the router input connection state (1 connected, 0 disconnected). |
| metric | Metric for continuity counter errors in the transport stream. |
| metric | Metric for the number of times the router input has switched sources in Failover mode. |
| metric | Metric for the recovery latency of the input stream. |
| metric | Metric for packets lost in transit that were not recovered by error correction. |
| metric | Metric for the total number of packets received by the router input. |
| to | Returns a string representation of this construct. |
| with(...mixins) | Applies one or more mixins to this construct. |
| static from | Import an existing Router Input from its ARN. |
| static from | Import an existing Router Input from its attributes. |
applyCrossStackReferenceStrength(strength)
public applyCrossStackReferenceStrength(strength: ReferenceStrength): void
Parameters
- strength
Referenceโ - The reference strength to use for this resource.Strength
Override the cross-stack reference strength for this resource.
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.
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
RemovalPolicy
Apply the given removal policy to this resource.
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).
metric(metricName, props?)
public metric(metricName: string, props?: MetricOptions): Metric
Parameters
- metricName
string - props
MetricOptions
Returns
Create a CloudWatch metric for this router input.
metricBitrate(props?)
public metricBitrate(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Metric for the bitrate of the router input's payload.
metricConnected(props?)
public metricConnected(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Metric for the router input connection state (1 connected, 0 disconnected).
Applies to SRT sources only.
metricContinuityCounterErrors(props?)
public metricContinuityCounterErrors(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Metric for continuity counter errors in the transport stream.
metricFailoverSwitches(props?)
public metricFailoverSwitches(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Metric for the number of times the router input has switched sources in Failover mode.
metricLatency(props?)
public metricLatency(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Metric for the recovery latency of the input stream.
Applies to RIST, SRT, and RTP-FEC.
metricNotRecoveredPackets(props?)
public metricNotRecoveredPackets(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Metric for packets lost in transit that were not recovered by error correction.
metricTotalPackets(props?)
public metricTotalPackets(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Metric for the total number of packets received by the router input.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
with(...mixins)
public with(...mixins: IMixin[]): IConstruct
Parameters
- mixins
IMixin
Returns
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.
static fromRouterInputArn(scope, id, routerInputArn)
public static fromRouterInputArn(scope: Construct, id: string, routerInputArn: string): IRouterInput
Parameters
- scope
Constructโ The parent construct. - id
stringโ The construct id. - routerInputArn
stringโ The ARN of the Router Input.
Returns
Import an existing Router Input from its ARN.
Use fromRouterInputAttributes() instead if you need to expose routerInputId
or ipAddress on the imported construct.
static fromRouterInputAttributes(scope, id, attrs)
public static fromRouterInputAttributes(scope: Construct, id: string, attrs: RouterInputAttributes): IRouterInput
Parameters
- scope
Constructโ The parent construct. - id
stringโ The construct id. - attrs
Routerโ The Router Input attributes.Input Attributes
Returns
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.

.NET
Go
Java
Python
TypeScript (