@aws-cdk/aws-mediaconnect-alpha 2.263.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,419 @@
1
+ import type { Bitrate, IResource } from 'aws-cdk-lib';
2
+ import { Resource } from 'aws-cdk-lib';
3
+ import type { MetricOptions } from 'aws-cdk-lib/aws-cloudwatch';
4
+ import { Metric } from 'aws-cdk-lib/aws-cloudwatch';
5
+ import type { IBridgeRef, BridgeReference } from 'aws-cdk-lib/aws-mediaconnect';
6
+ import type { Construct } from 'constructs';
7
+ import type { IBridgeOutput } from './bridge-output';
8
+ import type { IFlow } from './flow';
9
+ import type { IGateway } from './gateway';
10
+ import type { BridgeProtocol, BridgeNetworkSource, GatewayNetwork, VpcInterfaceConfig } from './shared';
11
+ import { State } from './shared';
12
+ /**
13
+ * The source of the bridge. A flow source originates in MediaConnect as an existing cloud flow.
14
+ */
15
+ export interface BridgeFlowSource {
16
+ /**
17
+ * The cloud flow used as a source of this bridge.
18
+ */
19
+ readonly flow: IFlow;
20
+ /**
21
+ * The VPC interface attachment to use for this source.
22
+ *
23
+ * @default - no VPC interface
24
+ */
25
+ readonly vpcInterface?: VpcInterfaceConfig;
26
+ }
27
+ /**
28
+ * A named flow source for an egress bridge.
29
+ */
30
+ export interface BridgeFlowInput {
31
+ /**
32
+ * The name of the flow source. Must be unique among sources on the bridge.
33
+ */
34
+ readonly name: string;
35
+ /**
36
+ * The flow source configuration describing where the bridge consumes content from.
37
+ */
38
+ readonly source: BridgeFlowSource;
39
+ }
40
+ /**
41
+ * A named network source for an ingress bridge.
42
+ */
43
+ export interface BridgeNetworkInput {
44
+ /**
45
+ * The name of the network source. Must be unique among sources on the bridge.
46
+ */
47
+ readonly name: string;
48
+ /**
49
+ * The network source configuration describing the multicast endpoint the bridge listens to.
50
+ */
51
+ readonly source: BridgeNetworkSource;
52
+ }
53
+ /**
54
+ * Configuration of bridge type
55
+ */
56
+ export declare class BridgeType {
57
+ readonly value: string;
58
+ /**
59
+ * Ingress Bridge
60
+ */
61
+ static readonly INGRESS_BRIDGE: BridgeType;
62
+ /**
63
+ * Egress Bridge
64
+ */
65
+ static readonly EGRESS_BRIDGE: BridgeType;
66
+ /**
67
+ * Use a custom bridge type value
68
+ * @param value The bridge type string value
69
+ */
70
+ static of(value: string): BridgeType;
71
+ /** @param value The bridge type string value */
72
+ private constructor();
73
+ /** Returns the string value */
74
+ toString(): string;
75
+ }
76
+ /**
77
+ * Base bridge configuration properties
78
+ */
79
+ interface BridgeConfigurationBase {
80
+ /**
81
+ * The maximum expected bitrate (in bps) of the bridge.
82
+ */
83
+ readonly maxBitrate: Bitrate;
84
+ }
85
+ /**
86
+ * Ingress bridge configuration
87
+ */
88
+ export interface IngressBridgeConfiguration extends BridgeConfigurationBase {
89
+ /**
90
+ * The maximum number of outputs on the ingress bridge.
91
+ */
92
+ readonly maxOutputs: number;
93
+ /**
94
+ * The network sources for the ingress bridge.
95
+ */
96
+ readonly networkSources: BridgeNetworkInput[];
97
+ }
98
+ /**
99
+ * Egress bridge configuration
100
+ */
101
+ export interface EgressBridgeConfiguration extends BridgeConfigurationBase {
102
+ /**
103
+ * The flow sources for the egress bridge.
104
+ */
105
+ readonly flowSources: BridgeFlowInput[];
106
+ /**
107
+ * The network outputs for the egress bridge.
108
+ */
109
+ readonly networkOutputs: BridgeNetworkOutput[];
110
+ }
111
+ /**
112
+ * Interface for Bridge
113
+ */
114
+ export interface IBridge extends IResource, IBridgeRef {
115
+ /**
116
+ * The Amazon Resource Name (ARN) of the bridge.
117
+ *
118
+ * @attribute
119
+ */
120
+ readonly bridgeArn: string;
121
+ /**
122
+ * The name of the bridge.
123
+ *
124
+ * @attribute
125
+ */
126
+ readonly bridgeName: string;
127
+ /**
128
+ * The type of bridge (ingress or egress).
129
+ *
130
+ * @attribute
131
+ */
132
+ readonly bridgeType: BridgeType;
133
+ /**
134
+ * The current state of the bridge.
135
+ *
136
+ * @attribute
137
+ */
138
+ readonly bridgeState?: string;
139
+ /**
140
+ * Failover Configuration for Bridge
141
+ */
142
+ readonly isFailoverEnabled?: boolean;
143
+ /**
144
+ * Add a network output to this bridge (for egress bridges only).
145
+ *
146
+ * @param id Construct id for the new BridgeOutput
147
+ * @param networkOutput The named output to add. The `name` is the output's identity on the bridge and must be unique among outputs.
148
+ */
149
+ addOutput(id: string, networkOutput: BridgeNetworkOutput): IBridgeOutput;
150
+ /**
151
+ * Create a CloudWatch metric for this bridge.
152
+ *
153
+ * Bridge metrics are dimensioned by `BridgeARN`. See the MediaConnect
154
+ * documentation for available metric names (e.g. `IngressBridgeBitRate`,
155
+ * `EgressBridgeBitRate`, `IngressBridgePacketLossPercent`).
156
+ */
157
+ metric(metricName: string, props?: MetricOptions): Metric;
158
+ /**
159
+ * Metric for the bitrate of a specific bridge source.
160
+ *
161
+ * Uses `IngressBridgeSourceBitRate` for ingress bridges and
162
+ * `EgressBridgeSourceBitRate` for egress bridges.
163
+ *
164
+ * @param bridgeSourceName The name of the bridge source
165
+ * @default - average over 60 seconds
166
+ */
167
+ metricSourceBitrate(bridgeSourceName: string, props?: MetricOptions): Metric;
168
+ /**
169
+ * Metric for the percentage of packets lost on a specific bridge source.
170
+ *
171
+ * Uses `IngressBridgeSourcePacketLossPercent` for ingress bridges and
172
+ * `EgressBridgeSourcePacketLossPercent` for egress bridges.
173
+ *
174
+ * @param bridgeSourceName The name of the bridge source
175
+ * @default - average over 60 seconds
176
+ */
177
+ metricSourcePacketLossPercent(bridgeSourceName: string, props?: MetricOptions): Metric;
178
+ /**
179
+ * Metric for the total number of times the bridge switches between sources
180
+ * when using the `FAILOVER` failover mode.
181
+ *
182
+ * Uses `IngressBridgeFailoverSwitches` for ingress bridges and
183
+ * `EgressBridgeFailoverSwitches` for egress bridges.
184
+ *
185
+ * @default - sum over 60 seconds
186
+ */
187
+ metricFailoverSwitches(props?: MetricOptions): Metric;
188
+ }
189
+ /**
190
+ * Properties for a bridge network output.
191
+ */
192
+ export interface BridgeNetworkOutputProps {
193
+ /**
194
+ * The IP address where the output will send content.
195
+ */
196
+ readonly ipAddress: string;
197
+ /**
198
+ * The port to use for the output.
199
+ */
200
+ readonly port: number;
201
+ /**
202
+ * The gateway network this output sends content out of.
203
+ *
204
+ * Use {@link GatewayNetwork.define} to create the network and pass the same
205
+ * instance to the gateway and to each output that uses it.
206
+ */
207
+ readonly network: GatewayNetwork;
208
+ /**
209
+ * The protocol to use for the output.
210
+ */
211
+ readonly protocol: BridgeProtocol;
212
+ /**
213
+ * Time to live (TTL) for the output packets in hops (1-255).
214
+ *
215
+ * TTL represents the maximum number of network hops a packet can traverse
216
+ * before being discarded.
217
+ */
218
+ readonly ttl: number;
219
+ }
220
+ /**
221
+ * A named network output for an egress bridge.
222
+ */
223
+ export interface BridgeNetworkOutput {
224
+ /**
225
+ * The name of the network output. Must be unique among outputs on the bridge.
226
+ *
227
+ * Used as the physical name of the underlying CFN resource.
228
+ */
229
+ readonly name: string;
230
+ /**
231
+ * The network configuration describing where this output sends content.
232
+ */
233
+ readonly output: BridgeOutputConfiguration;
234
+ }
235
+ /**
236
+ * Configuration for a bridge output.
237
+ */
238
+ export declare class BridgeOutputConfiguration {
239
+ private readonly _network;
240
+ /**
241
+ * Create a network output configuration for a bridge.
242
+ */
243
+ static network(props: BridgeNetworkOutputProps): BridgeOutputConfiguration;
244
+ private constructor();
245
+ }
246
+ /**
247
+ * Options for bridge source failover.
248
+ */
249
+ export interface BridgeFailoverOptions {
250
+ /**
251
+ * Whether failover is enabled. Set to `State.DISABLED` to keep the configuration
252
+ * on the bridge without switching failover on.
253
+ *
254
+ * @default State.ENABLED
255
+ */
256
+ readonly state?: State;
257
+ /**
258
+ * The name of the source you want to treat as primary. If set, MediaConnect always
259
+ * uses this source when it is available. When unset, both sources are treated with
260
+ * equal priority.
261
+ *
262
+ * @default - both sources are equal priority
263
+ */
264
+ readonly primarySource?: string;
265
+ }
266
+ /**
267
+ * Source failover configuration for a bridge.
268
+ *
269
+ * Bridges only support `FAILOVER` (switchover) mode — the `MERGE` mode available on
270
+ * `Flow.sourceFailoverConfig` is not allowed on bridges by the service. Use
271
+ * {@link BridgeFailoverConfig.failover} to construct the configuration.
272
+ */
273
+ export declare class BridgeFailoverConfig {
274
+ private readonly _state;
275
+ private readonly _primarySource;
276
+ /**
277
+ * Configure switchover-mode failover. The bridge swaps to the backup source when
278
+ * the primary source stops receiving data.
279
+ */
280
+ static failover(options?: BridgeFailoverOptions): BridgeFailoverConfig;
281
+ private constructor();
282
+ }
283
+ /**
284
+ * Bridge configuration to set ingress and egress options on the bridge
285
+ */
286
+ export declare class BridgeConfiguration {
287
+ private readonly _bridgeType;
288
+ private readonly _ingressConfig?;
289
+ private readonly _egressConfig?;
290
+ /**
291
+ * An ingress bridge is a ground-to-cloud bridge. The content originates at your premises and is delivered to the cloud.
292
+ */
293
+ static ingress(config: IngressBridgeConfiguration): BridgeConfiguration;
294
+ /**
295
+ * An egress bridge is a cloud-to-ground bridge. The content comes from an existing MediaConnect flow and is delivered to your premises.
296
+ */
297
+ static egress(config: EgressBridgeConfiguration): BridgeConfiguration;
298
+ private constructor();
299
+ }
300
+ /**
301
+ * Properties for the Bridge
302
+ */
303
+ export interface BridgeProps {
304
+ /**
305
+ * The name of the bridge. Cannot be modified after the bridge is created.
306
+ *
307
+ * @default - autogenerated
308
+ */
309
+ readonly bridgeName?: string;
310
+ /**
311
+ * The bridge configuration specifying ingress or egress settings.
312
+ */
313
+ readonly config: BridgeConfiguration;
314
+ /**
315
+ * The gateway that the bridge is associated with.
316
+ */
317
+ readonly gateway: IGateway;
318
+ /**
319
+ * The source failover configuration for the bridge.
320
+ *
321
+ * @default - No failover configuration
322
+ */
323
+ readonly sourceFailoverConfig?: BridgeFailoverConfig;
324
+ }
325
+ /**
326
+ * Attributes for importing an existing Bridge.
327
+ */
328
+ export interface BridgeAttributes {
329
+ /**
330
+ * The ARN of the bridge.
331
+ */
332
+ readonly bridgeArn: string;
333
+ /**
334
+ * The name of the bridge.
335
+ *
336
+ * Not encoded in the bridge ARN, so must be provided explicitly if the imported
337
+ * bridge needs to expose `bridgeName`.
338
+ *
339
+ * @default - bridgeName is not available on the imported construct
340
+ */
341
+ readonly bridgeName?: string;
342
+ /**
343
+ * Indicates what type of bridge is imported.
344
+ *
345
+ * Not encoded in the bridge ARN, so must be provided explicitly if the imported
346
+ * bridge is used with `addOutput()` or other methods that need the bridge type.
347
+ *
348
+ * @default - bridgeType is not available on the imported construct
349
+ */
350
+ readonly bridgeType?: BridgeType;
351
+ /**
352
+ * Failover Configuration for Bridge
353
+ *
354
+ * @default false
355
+ */
356
+ readonly isFailoverEnabled?: boolean;
357
+ }
358
+ declare abstract class BridgeBase extends Resource implements IBridge {
359
+ /**
360
+ * Creates a Bridge construct that represents an external (imported) Bridge.
361
+ */
362
+ static fromBridgeAttributes(scope: Construct, id: string, attrs: BridgeAttributes): IBridge;
363
+ /**
364
+ * Import an existing Bridge from its ARN.
365
+ *
366
+ * Use `fromBridgeAttributes()` instead if you need access to `bridgeName`, `bridgeType`
367
+ * (required for `addOutput()`), or `isFailoverEnabled`.
368
+ */
369
+ static fromBridgeArn(scope: Construct, id: string, bridgeArn: string): IBridge;
370
+ abstract readonly bridgeArn: string;
371
+ abstract readonly bridgeName: string;
372
+ abstract readonly bridgeType: BridgeType;
373
+ abstract readonly bridgeState?: string;
374
+ abstract readonly isFailoverEnabled?: boolean;
375
+ /** A reference to this Bridge resource. */
376
+ get bridgeRef(): BridgeReference;
377
+ /**
378
+ * Create a CloudWatch metric for this bridge.
379
+ */
380
+ metric(metricName: string, props?: MetricOptions): Metric;
381
+ /**
382
+ * Metric for the bitrate of a specific bridge source.
383
+ */
384
+ metricSourceBitrate(bridgeSourceName: string, props?: MetricOptions): Metric;
385
+ /**
386
+ * Metric for the percentage of packets lost on a specific bridge source.
387
+ */
388
+ metricSourcePacketLossPercent(bridgeSourceName: string, props?: MetricOptions): Metric;
389
+ /**
390
+ * Metric for the total number of times the bridge switches between sources
391
+ * when using the `FAILOVER` failover mode.
392
+ */
393
+ metricFailoverSwitches(props?: MetricOptions): Metric;
394
+ /**
395
+ * Add a network output to this bridge (for egress bridges only).
396
+ *
397
+ * @param id Construct id for the new BridgeOutput
398
+ * @param networkOutput The named output to add. The `name` is the output's identity on the bridge and must be unique among outputs.
399
+ */
400
+ addOutput(id: string, networkOutput: BridgeNetworkOutput): IBridgeOutput;
401
+ }
402
+ /**
403
+ * Defines a AWS Elemental MediaConnect Bridge
404
+ */
405
+ export declare class Bridge extends BridgeBase implements IBridge {
406
+ /** Uniquely identifies this class. */
407
+ static readonly PROPERTY_INJECTION_ID: string;
408
+ readonly bridgeArn: string;
409
+ readonly bridgeName: string;
410
+ readonly bridgeType: BridgeType;
411
+ readonly bridgeState?: string;
412
+ readonly isFailoverEnabled?: boolean;
413
+ constructor(scope: Construct, id: string, props: BridgeProps);
414
+ /**
415
+ * Format bridge flow source into BridgeSourceProperty format
416
+ */
417
+ private formatBridgeFlowSource;
418
+ }
419
+ export {};