class Bridge (construct)
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.MediaConnect.Alpha.Bridge |
Go | github.com/aws/aws-cdk-go/awsmediaconnectalpha/v2#Bridge |
Java | software.amazon.awscdk.services.mediaconnect.alpha.Bridge |
Python | aws_cdk.aws_mediaconnect_alpha.Bridge |
TypeScript (source) | @aws-cdk/aws-mediaconnect-alpha ยป Bridge |
Implements
IConstruct, IDependable, IResource, IEnvironment, IBridge, IBridge
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,
});
Initializer
new Bridge(scope: Construct, id: string, props: BridgeProps)
Parameters
- scope
Construct - id
string - props
BridgeProps
Construct Props
| Name | Type | Description |
|---|---|---|
| config | Bridge | The bridge configuration specifying ingress or egress settings. |
| gateway | IGateway | The gateway that the bridge is associated with. |
| bridge | string | The name of the bridge. |
| source | Bridge | The source failover configuration for the bridge. |
config
Type:
Bridge
The bridge configuration specifying ingress or egress settings.
gateway
Type:
IGateway
The gateway that the bridge is associated with.
bridgeName?
Type:
string
(optional, default: autogenerated)
The name of the bridge.
Cannot be modified after the bridge is created.
sourceFailoverConfig?
Type:
Bridge
(optional, default: No failover configuration)
The source failover configuration for the bridge.
Properties
| Name | Type | Description |
|---|---|---|
| bridge | string | The Amazon Resource Name (ARN) of the bridge. |
| bridge | string | The name of the bridge. |
| bridge | Bridge | A reference to this Bridge resource. |
| bridge | Bridge | The type of bridge (ingress or egress). |
| env | Resource | The environment this resource belongs to. |
| node | Node | The tree node. |
| stack | Stack | The stack in which this resource is defined. |
| bridge | string | The current state of the bridge. |
| is | boolean | Failover Configuration for Bridge. |
| static PROPERTY_INJECTION_ID | string | Uniquely identifies this class. |
bridgeArn
Type:
string
The Amazon Resource Name (ARN) of the bridge.
bridgeName
Type:
string
The name of the bridge.
bridgeRef
Type:
Bridge
A reference to this Bridge resource.
bridgeType
Type:
Bridge
The type of bridge (ingress or egress).
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.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
bridgeState?
Type:
string
(optional)
The current state of the bridge.
isFailoverEnabled?
Type:
boolean
(optional)
Failover Configuration for Bridge.
static PROPERTY_INJECTION_ID
Type:
string
Uniquely identifies this class.
Methods
| Name | Description |
|---|---|
| add | Add a network output to this bridge (for egress bridges only). |
| 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 bridge. |
| metric | Metric for the total number of times the bridge switches between sources when using the FAILOVER failover mode. |
| metric | Metric for the bitrate of a specific bridge source. |
| metric | Metric for the percentage of packets lost on a specific bridge source. |
| to | Returns a string representation of this construct. |
| with(...mixins) | Applies one or more mixins to this construct. |
| static from | Import an existing Bridge from its ARN. |
| static from | Creates a Bridge construct that represents an external (imported) Bridge. |
addOutput(id, networkOutput)
public addOutput(id: string, networkOutput: BridgeNetworkOutput): IBridgeOutput
Parameters
- id
stringโ Construct id for the new BridgeOutput. - networkOutput
Bridgeโ The named output to add.Network Output
Returns
Add a network output to this bridge (for egress bridges only).
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 bridge.
metricFailoverSwitches(props?)
public metricFailoverSwitches(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Metric for the total number of times the bridge switches between sources when using the FAILOVER failover mode.
metricSourceBitrate(bridgeSourceName, props?)
public metricSourceBitrate(bridgeSourceName: string, props?: MetricOptions): Metric
Parameters
- bridgeSourceName
string - props
MetricOptions
Returns
Metric for the bitrate of a specific bridge source.
metricSourcePacketLossPercent(bridgeSourceName, props?)
public metricSourcePacketLossPercent(bridgeSourceName: string, props?: MetricOptions): Metric
Parameters
- bridgeSourceName
string - props
MetricOptions
Returns
Metric for the percentage of packets lost on a specific bridge source.
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 fromBridgeArn(scope, id, bridgeArn)
public static fromBridgeArn(scope: Construct, id: string, bridgeArn: string): IBridge
Parameters
- scope
Construct - id
string - bridgeArn
string
Returns
Import an existing Bridge from its ARN.
Use fromBridgeAttributes() instead if you need access to bridgeName, bridgeType
(required for addOutput()), or isFailoverEnabled.
static fromBridgeAttributes(scope, id, attrs)
public static fromBridgeAttributes(scope: Construct, id: string, attrs: BridgeAttributes): IBridge
Parameters
- scope
Construct - id
string - attrs
BridgeAttributes
Returns
Creates a Bridge construct that represents an external (imported) Bridge.

.NET
Go
Java
Python
TypeScript (