RouterInput L2 construct
Defines an AWS Elemental MediaConnect Router Input.
Example
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,
}),
});
# 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
)
)
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();
// 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
})
});
// 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
new RouterInput(scope: Construct, id: string, props: RouterInputProps)
RouterInput(scope: Construct, id: str, props: RouterInputProps)
new RouterInput(Construct scope, String id, RouterInputProps props)
new RouterInput(Construct scope, string id, RouterInputProps props)
NewRouterInput(Scope Construct, Id *string, Props RouterInputProps)
Construct Props
configurationRouterInputConfigurationconfigurationRouterInputConfigurationconfigurationRouterInputConfigurationConfigurationRouterInputConfigurationConfigurationRouterInputConfigurationrequired#maintenanceConfigurationMaintenanceConfigurationmaintenance_configurationMaintenanceConfigurationmaintenanceConfigurationMaintenanceConfigurationMaintenanceConfigurationMaintenanceConfigurationMaintenanceConfigurationMaintenanceConfiguration= Default maintenance window will …#default
Default: Default maintenance window will be used
maximumBitrateBitratemaximum_bitrateBitratemaximumBitrateBitrateMaximumBitrateBitrateMaximumBitrateBitraterequired#Must fall within the limits of the selected tier.
regionNamestringregion_namestrregionNameStringRegionNamestringRegionName*string= Defaults to the same region as s…#default
Default: Defaults to the same region as stack
routerInputNamestringrouter_input_namestrrouterInputNameStringRouterInputNamestringRouterInputName*string= Generated automatically#routingScopeRoutingScoperouting_scopeRoutingScoperoutingScopeRoutingScopeRoutingScopeRoutingScopeRoutingScopeRoutingScoperequired#tags{ [key: string]: string }tagstyping.Mapping[str, str]tagsMap<String, String>TagsIDictionary<string, string>Tags*map[string]*string= No tagging#tierRouterInputTiertierRouterInputTiertierRouterInputTierTierRouterInputTierTierRouterInputTier= RouterInputTier.INPUT_20#The tier determines the capacity limits, performance characteristics, and associated costs; maximumBitrate must fall within its limits.
transitEncryptionTransitEncryptiontransit_encryptionTransitEncryptiontransitEncryptionTransitEncryptionTransitEncryptionTransitEncryptionTransitEncryptionTransitEncryption= Automatic encryption will be con…#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
endpointsRouterInputEndpoint[]endpointstyping.List[RouterInputEndpoint]endpointsList<RouterInputEndpoint>EndpointsRouterInputEndpoint[]Endpoints*[]RouterInputEndpointrequired#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.
envResourceEnvironmentenvResourceEnvironmentenvResourceEnvironmentEnvResourceEnvironmentEnvResourceEnvironmentrequired#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.
grantsRouterInputGrantsgrantsRouterInputGrantsgrantsRouterInputGrantsGrantsRouterInputGrantsGrantsRouterInputGrantsrequired#PROPERTY_INJECTION_IDstringproperty_injection_idstrPROPERTY_INJECTION_IDStringPROPERTY_INJECTION_IDstringPROPERTY_INJECTION_ID*stringrequiredstatic#routerInputArnstringrouter_input_arnstrrouterInputArnStringRouterInputArnstringRouterInputArn*stringrequired#routerInputIdstringrouter_input_idstrrouterInputIdStringRouterInputIdstringRouterInputId*stringrequired#routerInputRefRouterInputReferencerouter_input_refRouterInputReferencerouterInputRefRouterInputReferenceRouterInputRefRouterInputReferenceRouterInputRefRouterInputReferencerequired#Required by the auto-generated IRouterInputRef interface.
transitEncryptionSecretISecrettransit_encryption_secretISecrettransitEncryptionSecretISecretTransitEncryptionSecretISecretTransitEncryptionSecretISecret#Only available when the Router Input was created with explicit transitEncryption configuration. Not available for automatic encryption or imported inputs.
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)#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)#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#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#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#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#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#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#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#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#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#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#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#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#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#toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#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.