class Gateway (construct)
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.MediaConnect.Alpha.Gateway |
Go | github.com/aws/aws-cdk-go/awsmediaconnectalpha/v2#Gateway |
Java | software.amazon.awscdk.services.mediaconnect.alpha.Gateway |
Python | aws_cdk.aws_mediaconnect_alpha.Gateway |
TypeScript (source) | @aws-cdk/aws-mediaconnect-alpha ยป Gateway |
Implements
IConstruct, IDependable, IResource, IEnvironment, IGateway, IGateway
AWS Elemental MediaConnect Gateway is a feature of MediaConnect that allows the deployment of on-premises resources for transporting live video to and from the AWS Cloud.
MediaConnect Gateway allows you to contribute live video to the AWS Cloud from on-premises hardware, as well as distribute live video from the AWS Cloud to your local data center.
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],
});
Initializer
new Gateway(scope: Construct, id: string, props: GatewayProps)
Parameters
- scope
Construct - id
string - props
GatewayProps
Construct Props
| Name | Type | Description |
|---|---|---|
| egress | string[] | The range of IP addresses that are allowed to contribute content or initiate output requests for flows communicating with this gateway. |
| networks | Gateway[] | The list of networks in the gateway. |
| gateway | string | The name of the gateway. |
egressCidrBlocks
Type:
string[]
The range of IP addresses that are allowed to contribute content or initiate output requests for flows communicating with this gateway.
These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
networks
Type:
Gateway[]
The list of networks in the gateway.
A gateway must have between 1 and 4 networks.
Provide the initial set here; use addNetwork() to add more (up to 4 total).
gatewayName?
Type:
string
(optional, default: autogenerated)
The name of the gateway.
This name can not be modified after the gateway is created.
Properties
| Name | Type | Description |
|---|---|---|
| env | Resource | The environment this resource belongs to. |
| gateway | string | The Amazon Resource Name (ARN) of the gateway. |
| gateway | Gateway | A reference to a Gateway resource. |
| node | Node | The tree node. |
| stack | Stack | The stack in which this resource is defined. |
| gateway | string | The current state of the gateway. |
| static PROPERTY_INJECTION_ID | string | Uniquely identifies this class. |
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.
gatewayArn
Type:
string
The Amazon Resource Name (ARN) of the gateway.
gatewayRef
Type:
Gateway
A reference to a Gateway resource.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
gatewayState?
Type:
string
(optional)
The current state of the gateway.
static PROPERTY_INJECTION_ID
Type:
string
Uniquely identifies this class.
Methods
| Name | Description |
|---|---|
| add | Add a network to this gateway. |
| 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 gateway. |
| metric | Metric for the number of packets dropped by egress bridges hosted on this gateway. |
| metric | Metric for the total number of packets sent from egress bridges hosted on this gateway. |
| metric | Metric for the number of packets dropped by ingress bridges hosted on this gateway. |
| metric | Metric for the total number of packets received by ingress bridges hosted on this gateway. |
| to | Returns a string representation of this construct. |
| with(...mixins) | Applies one or more mixins to this construct. |
| static from | Creates a MediaConnect Gateway construct that represents an external (imported) MediaConnect Gateway. |
addNetwork(network)
public addNetwork(network: GatewayNetwork): GatewayNetwork
Parameters
- network
GatewayNetwork
Returns
Add a network to this gateway.
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 gateway.
metricEgressBridgeDroppedPackets(props?)
public metricEgressBridgeDroppedPackets(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Metric for the number of packets dropped by egress bridges hosted on this gateway.
metricEgressBridgeTotalPackets(props?)
public metricEgressBridgeTotalPackets(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Metric for the total number of packets sent from egress bridges hosted on this gateway.
metricIngressBridgeDroppedPackets(props?)
public metricIngressBridgeDroppedPackets(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Metric for the number of packets dropped by ingress bridges hosted on this gateway.
metricIngressBridgeTotalPackets(props?)
public metricIngressBridgeTotalPackets(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Metric for the total number of packets received by ingress bridges hosted on this gateway.
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 fromGatewayArn(scope, id, gatewayArn)
public static fromGatewayArn(scope: Construct, id: string, gatewayArn: string): IGateway
Parameters
- scope
Construct - id
string - gatewayArn
string
Returns
Creates a MediaConnect Gateway construct that represents an external (imported) MediaConnect Gateway.

.NET
Go
Java
Python
TypeScript (