Experimental
@aws-cdk/aws-mediaconnect-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
Bridge L2 construct
Defines a AWS Elemental MediaConnect Bridge.
Example
declare const stack: Stack;
const productionNetwork = GatewayNetwork.define({
cidrBlock: '192.168.1.0/24',
name: 'production-network',
});
const gateway = new Gateway(stack, 'MyGateway', {
gatewayName: 'my-gateway',
egressCidrBlocks: ['10.0.0.0/16'],
networks: [productionNetwork],
});
const ingressBridge = new Bridge(stack, 'MyIngressBridge', {
bridgeName: 'my-ingress-bridge',
config: BridgeConfiguration.ingress({
maxBitrate: Bitrate.mbps(10),
maxOutputs: 2,
networkSources: [{
name: 'on-prem-source',
source: {
protocol: BridgeProtocol.RTP,
network: productionNetwork,
multicastIp: '239.1.1.1',
port: 5000,
},
}],
}),
gateway: gateway,
});
from aws_cdk.aws_mediaconnect_alpha import BridgeNetworkInput, BridgeNetworkSource
# stack: Stack
production_network = GatewayNetwork.define(
cidr_block="192.168.1.0/24",
name="production-network"
)
gateway = Gateway(stack, "MyGateway",
gateway_name="my-gateway",
egress_cidr_blocks=["10.0.0.0/16"],
networks=[production_network]
)
ingress_bridge = Bridge(stack, "MyIngressBridge",
bridge_name="my-ingress-bridge",
config=BridgeConfiguration.ingress(
max_bitrate=Bitrate.mbps(10),
max_outputs=2,
network_sources=[BridgeNetworkInput(
name="on-prem-source",
source=BridgeNetworkSource(
protocol=BridgeProtocol.RTP,
network=production_network,
multicast_ip="239.1.1.1",
port=5000
)
)]
),
gateway=gateway
)
Stack stack;
GatewayNetwork productionNetwork = GatewayNetwork.define(GatewayNetworkDefineProps.builder()
.cidrBlock("192.168.1.0/24")
.name("production-network")
.build());
Gateway gateway = Gateway.Builder.create(stack, "MyGateway")
.gatewayName("my-gateway")
.egressCidrBlocks(List.of("10.0.0.0/16"))
.networks(List.of(productionNetwork))
.build();
Bridge ingressBridge = Bridge.Builder.create(stack, "MyIngressBridge")
.bridgeName("my-ingress-bridge")
.config(BridgeConfiguration.ingress(IngressBridgeConfiguration.builder()
.maxBitrate(Bitrate.mbps(10))
.maxOutputs(2)
.networkSources(List.of(BridgeNetworkInput.builder()
.name("on-prem-source")
.source(BridgeNetworkSource.builder()
.protocol(BridgeProtocol.RTP)
.network(productionNetwork)
.multicastIp("239.1.1.1")
.port(5000)
.build())
.build()))
.build()))
.gateway(gateway)
.build();
// Install: dotnet add package Amazon.CDK.AWS.MediaConnect.Alpha
Stack stack;
var productionNetwork = GatewayNetwork.Define(new GatewayNetworkDefineProps {
CidrBlock = "192.168.1.0/24",
Name = "production-network"
});
var gateway = new Gateway(stack, "MyGateway", new GatewayProps {
GatewayName = "my-gateway",
EgressCidrBlocks = new [] { "10.0.0.0/16" },
Networks = new [] { productionNetwork }
});
var ingressBridge = new Bridge(stack, "MyIngressBridge", new BridgeProps {
BridgeName = "my-ingress-bridge",
Config = BridgeConfiguration.Ingress(new IngressBridgeConfiguration {
MaxBitrate = Bitrate.Mbps(10),
MaxOutputs = 2,
NetworkSources = new [] { new BridgeNetworkInput {
Name = "on-prem-source",
Source = new BridgeNetworkSource {
Protocol = BridgeProtocol.RTP,
Network = productionNetwork,
MulticastIp = "239.1.1.1",
Port = 5000
}
} }
}),
Gateway = gateway
});
// Install: go get github.com/aws/aws-cdk-go/awsmediaconnectalpha/v2
var stack Stack
productionNetwork := awsmediaconnectalpha.GatewayNetwork_Define(&GatewayNetworkDefineProps{
CidrBlock: jsii.String("192.168.1.0/24"),
Name: jsii.String("production-network"),
})
gateway := awsmediaconnectalpha.NewGateway(stack, jsii.String("MyGateway"), &GatewayProps{
GatewayName: jsii.String("my-gateway"),
EgressCidrBlocks: []*string{
jsii.String("10.0.0.0/16"),
},
Networks: []GatewayNetwork{
productionNetwork,
},
})
ingressBridge := awsmediaconnectalpha.NewBridge(stack, jsii.String("MyIngressBridge"), &BridgeProps{
BridgeName: jsii.String("my-ingress-bridge"),
Config: awsmediaconnectalpha.BridgeConfiguration_Ingress(&IngressBridgeConfiguration{
MaxBitrate: awscdk.Bitrate_Mbps(jsii.Number(10)),
MaxOutputs: jsii.Number(2),
NetworkSources: []BridgeNetworkInput{
&BridgeNetworkInput{
Name: jsii.String("on-prem-source"),
Source: &BridgeNetworkSource{
Protocol: awsmediaconnectalpha.BridgeProtocol_RTP(),
Network: productionNetwork,
MulticastIp: jsii.String("239.1.1.1"),
Port: jsii.Number(5000),
},
},
},
}),
Gateway: gateway,
})
Initializer
new Bridge(scope: Construct, id: string, props: BridgeProps)
Bridge(scope: Construct, id: str, props: BridgeProps)
new Bridge(Construct scope, String id, BridgeProps props)
new Bridge(Construct scope, string id, BridgeProps props)
NewBridge(Scope Construct, Id *string, Props BridgeProps)
Construct Props
bridgeNameoptionalstringbridge_nameoptionalstrbridgeNameoptionalStringBridgeNameoptionalstringBridgeNameoptional*string= autogenerated#Cannot be modified after the bridge is created.
configBridgeConfigurationconfigBridgeConfigurationconfigBridgeConfigurationConfigBridgeConfigurationConfigBridgeConfigurationrequired#sourceFailoverConfigoptionalBridgeFailoverConfigsource_failover_configoptionalBridgeFailoverConfigsourceFailoverConfigoptionalBridgeFailoverConfigSourceFailoverConfigoptionalBridgeFailoverConfigSourceFailoverConfigoptionalBridgeFailoverConfig#Default: No failover configuration
Properties
bridgeRefBridgeReferencebridge_refBridgeReferencebridgeRefBridgeReferenceBridgeRefBridgeReferenceBridgeRefBridgeReferencerequired#bridgeStatemay be undefinedstringbridge_statemay be undefinedstrbridgeStatemay be undefinedStringBridgeStatemay be undefinedstringBridgeStatemay be undefined*string#bridgeTypeBridgeTypebridge_typeBridgeTypebridgeTypeBridgeTypeBridgeTypeBridgeTypeBridgeTypeBridgeTyperequired#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.
isFailoverEnabledmay be undefinedbooleanis_failover_enabledmay be undefinedboolisFailoverEnabledmay be undefinedBooleanIsFailoverEnabledmay be undefinedboolIsFailoverEnabledmay be undefined*bool#PROPERTY_INJECTION_IDstringproperty_injection_idstrPROPERTY_INJECTION_IDStringPROPERTY_INJECTION_IDstringPROPERTY_INJECTION_ID*stringrequiredstatic#Methods
addOutput(id: string, networkOutput: BridgeNetworkOutput): IBridgeOutputdef add_output(self, id: str, network_output: BridgeNetworkOutput) -> IBridgeOutputpublic IBridgeOutput addOutput(String id, BridgeNetworkOutput networkOutput)public IBridgeOutput AddOutput(string id, BridgeNetworkOutput networkOutput)func AddOutput(Id *string, NetworkOutput BridgeNetworkOutput) IBridgeOutput#2 parameters
Parameters
ididididId— Construct id for the new BridgeOutput.networkOutputnetwork_outputnetworkOutputnetworkOutputNetworkOutput— The named output to add.
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).
fromBridgeArn(scope: Construct, id: string, bridgeArn: string): IBridge@staticmethod def from_bridge_arn(scope: Construct, id: str, bridge_arn: str) -> IBridgepublic static IBridge fromBridgeArn(Construct scope, String id, String bridgeArn)public static IBridge FromBridgeArn(Construct scope, string id, string bridgeArn)func FromBridgeArn(Scope Construct, Id *string, BridgeArn *string) IBridgestatic#Use fromBridgeAttributes() instead if you need access to bridgeName, bridgeType (required for addOutput()), or isFailoverEnabled.
fromBridgeAttributes(scope: Construct, id: string, attrs: BridgeAttributes): IBridge@staticmethod def from_bridge_attributes(scope: Construct, id: str, attrs: BridgeAttributes) -> IBridgepublic static IBridge fromBridgeAttributes(Construct scope, String id, BridgeAttributes attrs)public static IBridge FromBridgeAttributes(Construct scope, string id, BridgeAttributes attrs)func FromBridgeAttributes(Scope Construct, Id *string, Attrs BridgeAttributes) IBridgestatic#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#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#metricSourceBitrate(bridgeSourceName: string, props?: MetricOptions): Metricdef metric_source_bitrate(self, bridge_source_name: str, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricSourceBitrate(String bridgeSourceName, MetricOptions props)public Metric MetricSourceBitrate(string bridgeSourceName, MetricOptions? props = null)func MetricSourceBitrate(BridgeSourceName *string, Props MetricOptions) Metric#metricSourcePacketLossPercent(bridgeSourceName: string, props?: MetricOptions): Metricdef metric_source_packet_loss_percent(self, bridge_source_name: str, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricSourcePacketLossPercent(String bridgeSourceName, MetricOptions props)public Metric MetricSourcePacketLossPercent(string bridgeSourceName, MetricOptions? props = null)func MetricSourcePacketLossPercent(BridgeSourceName *string, 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.