Skip to content
v2.275.0

CfnFlow L1 construct ​

The AWS::MediaConnect::Flow resource defines a connection between one or more video sources and one or more outputs.

For each flow, you specify the transport protocol to use, encryption information, and details for any outputs or entitlements that you want. AWS Elemental MediaConnect returns an ingest endpoint where you can send your live video as a single unicast stream. The service replicates and distributes the video to every output that you specify, whether inside or outside the AWS Cloud. You can also set up entitlements on a flow to allow other AWS accounts to access your content.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_mediaconnect as mediaconnect } from 'aws-cdk-lib';

declare const automatic: any;
const cfnFlow = new mediaconnect.CfnFlow(this, 'MyCfnFlow', {
  name: 'name',
  source: {
    decryption: {
      roleArn: 'roleArn',

      // the properties below are optional
      algorithm: 'algorithm',
      constantInitializationVector: 'constantInitializationVector',
      deviceId: 'deviceId',
      keyType: 'keyType',
      region: 'region',
      resourceId: 'resourceId',
      secretArn: 'secretArn',
      url: 'url',
    },
    description: 'description',
    entitlementArn: 'entitlementArn',
    gatewayBridgeSource: {
      bridgeArn: 'bridgeArn',

      // the properties below are optional
      vpcInterfaceAttachment: {
        vpcInterfaceName: 'vpcInterfaceName',
      },
    },
    ingestIp: 'ingestIp',
    ingestPort: 123,
    maxBitrate: 123,
    maxLatency: 123,
    maxSyncBuffer: 123,
    mediaStreamSourceConfigurations: [{
      encodingName: 'encodingName',
      mediaStreamName: 'mediaStreamName',

      // the properties below are optional
      inputConfigurations: [{
        inputPort: 123,
        interface: {
          name: 'name',
        },
      }],
    }],
    minLatency: 123,
    name: 'name',
    ndiSourceSettings: {
      audioReferenceLevel: 123,
      sourceName: 'sourceName',
    },
    protocol: 'protocol',
    routerIntegrationState: 'routerIntegrationState',
    routerIntegrationTransitDecryption: {
      encryptionKeyConfiguration: {
        automatic: automatic,
        secretsManager: {
          roleArn: 'roleArn',
          secretArn: 'secretArn',
        },
      },

      // the properties below are optional
      encryptionKeyType: 'encryptionKeyType',
    },
    senderControlPort: 123,
    senderIpAddress: 'senderIpAddress',
    sourceArn: 'sourceArn',
    sourceIngestPort: 'sourceIngestPort',
    sourceListenerAddress: 'sourceListenerAddress',
    sourceListenerPort: 123,
    streamId: 'streamId',
    tags: [{
      key: 'key',
      value: 'value',
    }],
    vpcInterfaceName: 'vpcInterfaceName',
    whitelistCidr: 'whitelistCidr',
  },

  // the properties below are optional
  availabilityZone: 'availabilityZone',
  encodingConfig: {
    encodingProfile: 'encodingProfile',
    videoMaxBitrate: 123,
  },
  flowSize: 'flowSize',
  maintenance: {
    maintenanceDay: 'maintenanceDay',
    maintenanceStartHour: 'maintenanceStartHour',
  },
  mediaStreams: [{
    mediaStreamId: 123,
    mediaStreamName: 'mediaStreamName',
    mediaStreamType: 'mediaStreamType',

    // the properties below are optional
    attributes: {
      fmtp: {
        channelOrder: 'channelOrder',
        colorimetry: 'colorimetry',
        exactFramerate: 'exactFramerate',
        par: 'par',
        range: 'range',
        scanMode: 'scanMode',
        tcs: 'tcs',
      },
      lang: 'lang',
    },
    clockRate: 123,
    description: 'description',
    fmt: 123,
    tags: [{
      key: 'key',
      value: 'value',
    }],
    videoFormat: 'videoFormat',
  }],
  ndiConfig: {
    machineName: 'machineName',
    ndiDiscoveryServers: [{
      discoveryServerAddress: 'discoveryServerAddress',
      vpcInterfaceAdapter: 'vpcInterfaceAdapter',

      // the properties below are optional
      discoveryServerPort: 123,
    }],
    ndiState: 'ndiState',
  },
  sourceFailoverConfig: {
    failoverMode: 'failoverMode',
    recoveryWindow: 123,
    sourcePriority: {
      primarySource: 'primarySource',
    },
    state: 'state',
  },
  sourceMonitoringConfig: {
    audioMonitoringSettings: [{
      silentAudio: {
        state: 'state',
        thresholdSeconds: 123,
      },
    }],
    contentQualityAnalysisState: 'contentQualityAnalysisState',
    thumbnailState: 'thumbnailState',
    videoMonitoringSettings: [{
      blackFrames: {
        state: 'state',
        thresholdSeconds: 123,
      },
      frozenFrames: {
        state: 'state',
        thresholdSeconds: 123,
      },
    }],
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
  vpcInterfaces: [{
    name: 'name',
    roleArn: 'roleArn',
    securityGroupIds: ['securityGroupIds'],
    subnetId: 'subnetId',

    // the properties below are optional
    networkInterfaceIds: ['networkInterfaceIds'],
    networkInterfaceType: 'networkInterfaceType',
    tags: [{
      key: 'key',
      value: 'value',
    }],
  }],
});
python
from aws_cdk import CfnTag, CfnTag, CfnTag, CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_mediaconnect as mediaconnect

# automatic: Any

cfn_flow = mediaconnect.CfnFlow(self, "MyCfnFlow",
    name="name",
    source=mediaconnect.CfnFlow.SourceProperty(
        decryption=mediaconnect.CfnFlow.EncryptionProperty(
            role_arn="roleArn",

            # the properties below are optional
            algorithm="algorithm",
            constant_initialization_vector="constantInitializationVector",
            device_id="deviceId",
            key_type="keyType",
            region="region",
            resource_id="resourceId",
            secret_arn="secretArn",
            url="url"
        ),
        description="description",
        entitlement_arn="entitlementArn",
        gateway_bridge_source=mediaconnect.CfnFlow.GatewayBridgeSourceProperty(
            bridge_arn="bridgeArn",

            # the properties below are optional
            vpc_interface_attachment=mediaconnect.CfnFlow.VpcInterfaceAttachmentProperty(
                vpc_interface_name="vpcInterfaceName"
            )
        ),
        ingest_ip="ingestIp",
        ingest_port=123,
        max_bitrate=123,
        max_latency=123,
        max_sync_buffer=123,
        media_stream_source_configurations=[mediaconnect.CfnFlow.MediaStreamSourceConfigurationProperty(
            encoding_name="encodingName",
            media_stream_name="mediaStreamName",

            # the properties below are optional
            input_configurations=[mediaconnect.CfnFlow.InputConfigurationProperty(
                input_port=123,
                interface=mediaconnect.CfnFlow.InterfaceProperty(
                    name="name"
                )
            )]
        )],
        min_latency=123,
        name="name",
        ndi_source_settings=mediaconnect.CfnFlow.NdiSourceSettingsProperty(
            audio_reference_level=123,
            source_name="sourceName"
        ),
        protocol="protocol",
        router_integration_state="routerIntegrationState",
        router_integration_transit_decryption=mediaconnect.CfnFlow.FlowTransitEncryptionProperty(
            encryption_key_configuration=mediaconnect.CfnFlow.FlowTransitEncryptionKeyConfigurationProperty(
                automatic=automatic,
                secrets_manager=mediaconnect.CfnFlow.SecretsManagerEncryptionKeyConfigurationProperty(
                    role_arn="roleArn",
                    secret_arn="secretArn"
                )
            ),

            # the properties below are optional
            encryption_key_type="encryptionKeyType"
        ),
        sender_control_port=123,
        sender_ip_address="senderIpAddress",
        source_arn="sourceArn",
        source_ingest_port="sourceIngestPort",
        source_listener_address="sourceListenerAddress",
        source_listener_port=123,
        stream_id="streamId",
        tags=[CfnTag(
            key="key",
            value="value"
        )],
        vpc_interface_name="vpcInterfaceName",
        whitelist_cidr="whitelistCidr"
    ),

    # the properties below are optional
    availability_zone="availabilityZone",
    encoding_config=mediaconnect.CfnFlow.EncodingConfigProperty(
        encoding_profile="encodingProfile",
        video_max_bitrate=123
    ),
    flow_size="flowSize",
    maintenance=mediaconnect.CfnFlow.MaintenanceProperty(
        maintenance_day="maintenanceDay",
        maintenance_start_hour="maintenanceStartHour"
    ),
    media_streams=[mediaconnect.CfnFlow.MediaStreamProperty(
        media_stream_id=123,
        media_stream_name="mediaStreamName",
        media_stream_type="mediaStreamType",

        # the properties below are optional
        attributes=mediaconnect.CfnFlow.MediaStreamAttributesProperty(
            fmtp=mediaconnect.CfnFlow.FmtpProperty(
                channel_order="channelOrder",
                colorimetry="colorimetry",
                exact_framerate="exactFramerate",
                par="par",
                range="range",
                scan_mode="scanMode",
                tcs="tcs"
            ),
            lang="lang"
        ),
        clock_rate=123,
        description="description",
        fmt=123,
        tags=[CfnTag(
            key="key",
            value="value"
        )],
        video_format="videoFormat"
    )],
    ndi_config=mediaconnect.CfnFlow.NdiConfigProperty(
        machine_name="machineName",
        ndi_discovery_servers=[mediaconnect.CfnFlow.NdiDiscoveryServerConfigProperty(
            discovery_server_address="discoveryServerAddress",
            vpc_interface_adapter="vpcInterfaceAdapter",

            # the properties below are optional
            discovery_server_port=123
        )],
        ndi_state="ndiState"
    ),
    source_failover_config=mediaconnect.CfnFlow.FailoverConfigProperty(
        failover_mode="failoverMode",
        recovery_window=123,
        source_priority=mediaconnect.CfnFlow.SourcePriorityProperty(
            primary_source="primarySource"
        ),
        state="state"
    ),
    source_monitoring_config=mediaconnect.CfnFlow.SourceMonitoringConfigProperty(
        audio_monitoring_settings=[mediaconnect.CfnFlow.AudioMonitoringSettingProperty(
            silent_audio=mediaconnect.CfnFlow.SilentAudioProperty(
                state="state",
                threshold_seconds=123
            )
        )],
        content_quality_analysis_state="contentQualityAnalysisState",
        thumbnail_state="thumbnailState",
        video_monitoring_settings=[mediaconnect.CfnFlow.VideoMonitoringSettingProperty(
            black_frames=mediaconnect.CfnFlow.BlackFramesProperty(
                state="state",
                threshold_seconds=123
            ),
            frozen_frames=mediaconnect.CfnFlow.FrozenFramesProperty(
                state="state",
                threshold_seconds=123
            )
        )]
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    vpc_interfaces=[mediaconnect.CfnFlow.VpcInterfaceProperty(
        name="name",
        role_arn="roleArn",
        security_group_ids=["securityGroupIds"],
        subnet_id="subnetId",

        # the properties below are optional
        network_interface_ids=["networkInterfaceIds"],
        network_interface_type="networkInterfaceType",
        tags=[CfnTag(
            key="key",
            value="value"
        )]
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.mediaconnect.*;

Object automatic;

CfnFlow cfnFlow = CfnFlow.Builder.create(this, "MyCfnFlow")
        .name("name")
        .source(SourceProperty.builder()
                .decryption(EncryptionProperty.builder()
                        .roleArn("roleArn")

                        // the properties below are optional
                        .algorithm("algorithm")
                        .constantInitializationVector("constantInitializationVector")
                        .deviceId("deviceId")
                        .keyType("keyType")
                        .region("region")
                        .resourceId("resourceId")
                        .secretArn("secretArn")
                        .url("url")
                        .build())
                .description("description")
                .entitlementArn("entitlementArn")
                .gatewayBridgeSource(GatewayBridgeSourceProperty.builder()
                        .bridgeArn("bridgeArn")

                        // the properties below are optional
                        .vpcInterfaceAttachment(VpcInterfaceAttachmentProperty.builder()
                                .vpcInterfaceName("vpcInterfaceName")
                                .build())
                        .build())
                .ingestIp("ingestIp")
                .ingestPort(123)
                .maxBitrate(123)
                .maxLatency(123)
                .maxSyncBuffer(123)
                .mediaStreamSourceConfigurations(List.of(MediaStreamSourceConfigurationProperty.builder()
                        .encodingName("encodingName")
                        .mediaStreamName("mediaStreamName")

                        // the properties below are optional
                        .inputConfigurations(List.of(InputConfigurationProperty.builder()
                                .inputPort(123)
                                .interface(InterfaceProperty.builder()
                                        .name("name")
                                        .build())
                                .build()))
                        .build()))
                .minLatency(123)
                .name("name")
                .ndiSourceSettings(NdiSourceSettingsProperty.builder()
                        .audioReferenceLevel(123)
                        .sourceName("sourceName")
                        .build())
                .protocol("protocol")
                .routerIntegrationState("routerIntegrationState")
                .routerIntegrationTransitDecryption(FlowTransitEncryptionProperty.builder()
                        .encryptionKeyConfiguration(FlowTransitEncryptionKeyConfigurationProperty.builder()
                                .automatic(automatic)
                                .secretsManager(SecretsManagerEncryptionKeyConfigurationProperty.builder()
                                        .roleArn("roleArn")
                                        .secretArn("secretArn")
                                        .build())
                                .build())

                        // the properties below are optional
                        .encryptionKeyType("encryptionKeyType")
                        .build())
                .senderControlPort(123)
                .senderIpAddress("senderIpAddress")
                .sourceArn("sourceArn")
                .sourceIngestPort("sourceIngestPort")
                .sourceListenerAddress("sourceListenerAddress")
                .sourceListenerPort(123)
                .streamId("streamId")
                .tags(List.of(CfnTag.builder()
                        .key("key")
                        .value("value")
                        .build()))
                .vpcInterfaceName("vpcInterfaceName")
                .whitelistCidr("whitelistCidr")
                .build())

        // the properties below are optional
        .availabilityZone("availabilityZone")
        .encodingConfig(EncodingConfigProperty.builder()
                .encodingProfile("encodingProfile")
                .videoMaxBitrate(123)
                .build())
        .flowSize("flowSize")
        .maintenance(MaintenanceProperty.builder()
                .maintenanceDay("maintenanceDay")
                .maintenanceStartHour("maintenanceStartHour")
                .build())
        .mediaStreams(List.of(MediaStreamProperty.builder()
                .mediaStreamId(123)
                .mediaStreamName("mediaStreamName")
                .mediaStreamType("mediaStreamType")

                // the properties below are optional
                .attributes(MediaStreamAttributesProperty.builder()
                        .fmtp(FmtpProperty.builder()
                                .channelOrder("channelOrder")
                                .colorimetry("colorimetry")
                                .exactFramerate("exactFramerate")
                                .par("par")
                                .range("range")
                                .scanMode("scanMode")
                                .tcs("tcs")
                                .build())
                        .lang("lang")
                        .build())
                .clockRate(123)
                .description("description")
                .fmt(123)
                .tags(List.of(CfnTag.builder()
                        .key("key")
                        .value("value")
                        .build()))
                .videoFormat("videoFormat")
                .build()))
        .ndiConfig(NdiConfigProperty.builder()
                .machineName("machineName")
                .ndiDiscoveryServers(List.of(NdiDiscoveryServerConfigProperty.builder()
                        .discoveryServerAddress("discoveryServerAddress")
                        .vpcInterfaceAdapter("vpcInterfaceAdapter")

                        // the properties below are optional
                        .discoveryServerPort(123)
                        .build()))
                .ndiState("ndiState")
                .build())
        .sourceFailoverConfig(FailoverConfigProperty.builder()
                .failoverMode("failoverMode")
                .recoveryWindow(123)
                .sourcePriority(SourcePriorityProperty.builder()
                        .primarySource("primarySource")
                        .build())
                .state("state")
                .build())
        .sourceMonitoringConfig(SourceMonitoringConfigProperty.builder()
                .audioMonitoringSettings(List.of(AudioMonitoringSettingProperty.builder()
                        .silentAudio(SilentAudioProperty.builder()
                                .state("state")
                                .thresholdSeconds(123)
                                .build())
                        .build()))
                .contentQualityAnalysisState("contentQualityAnalysisState")
                .thumbnailState("thumbnailState")
                .videoMonitoringSettings(List.of(VideoMonitoringSettingProperty.builder()
                        .blackFrames(BlackFramesProperty.builder()
                                .state("state")
                                .thresholdSeconds(123)
                                .build())
                        .frozenFrames(FrozenFramesProperty.builder()
                                .state("state")
                                .thresholdSeconds(123)
                                .build())
                        .build()))
                .build())
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .vpcInterfaces(List.of(VpcInterfaceProperty.builder()
                .name("name")
                .roleArn("roleArn")
                .securityGroupIds(List.of("securityGroupIds"))
                .subnetId("subnetId")

                // the properties below are optional
                .networkInterfaceIds(List.of("networkInterfaceIds"))
                .networkInterfaceType("networkInterfaceType")
                .tags(List.of(CfnTag.builder()
                        .key("key")
                        .value("value")
                        .build()))
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.MediaConnect;

var automatic;

var cfnFlow = new CfnFlow(this, "MyCfnFlow", new CfnFlowProps {
    Name = "name",
    Source = new SourceProperty {
        Decryption = new EncryptionProperty {
            RoleArn = "roleArn",

            // the properties below are optional
            Algorithm = "algorithm",
            ConstantInitializationVector = "constantInitializationVector",
            DeviceId = "deviceId",
            KeyType = "keyType",
            Region = "region",
            ResourceId = "resourceId",
            SecretArn = "secretArn",
            Url = "url"
        },
        Description = "description",
        EntitlementArn = "entitlementArn",
        GatewayBridgeSource = new GatewayBridgeSourceProperty {
            BridgeArn = "bridgeArn",

            // the properties below are optional
            VpcInterfaceAttachment = new VpcInterfaceAttachmentProperty {
                VpcInterfaceName = "vpcInterfaceName"
            }
        },
        IngestIp = "ingestIp",
        IngestPort = 123,
        MaxBitrate = 123,
        MaxLatency = 123,
        MaxSyncBuffer = 123,
        MediaStreamSourceConfigurations = new [] { new MediaStreamSourceConfigurationProperty {
            EncodingName = "encodingName",
            MediaStreamName = "mediaStreamName",

            // the properties below are optional
            InputConfigurations = new [] { new InputConfigurationProperty {
                InputPort = 123,
                Interface = new InterfaceProperty {
                    Name = "name"
                }
            } }
        } },
        MinLatency = 123,
        Name = "name",
        NdiSourceSettings = new NdiSourceSettingsProperty {
            AudioReferenceLevel = 123,
            SourceName = "sourceName"
        },
        Protocol = "protocol",
        RouterIntegrationState = "routerIntegrationState",
        RouterIntegrationTransitDecryption = new FlowTransitEncryptionProperty {
            EncryptionKeyConfiguration = new FlowTransitEncryptionKeyConfigurationProperty {
                Automatic = automatic,
                SecretsManager = new SecretsManagerEncryptionKeyConfigurationProperty {
                    RoleArn = "roleArn",
                    SecretArn = "secretArn"
                }
            },

            // the properties below are optional
            EncryptionKeyType = "encryptionKeyType"
        },
        SenderControlPort = 123,
        SenderIpAddress = "senderIpAddress",
        SourceArn = "sourceArn",
        SourceIngestPort = "sourceIngestPort",
        SourceListenerAddress = "sourceListenerAddress",
        SourceListenerPort = 123,
        StreamId = "streamId",
        Tags = new [] { new CfnTag {
            Key = "key",
            Value = "value"
        } },
        VpcInterfaceName = "vpcInterfaceName",
        WhitelistCidr = "whitelistCidr"
    },

    // the properties below are optional
    AvailabilityZone = "availabilityZone",
    EncodingConfig = new EncodingConfigProperty {
        EncodingProfile = "encodingProfile",
        VideoMaxBitrate = 123
    },
    FlowSize = "flowSize",
    Maintenance = new MaintenanceProperty {
        MaintenanceDay = "maintenanceDay",
        MaintenanceStartHour = "maintenanceStartHour"
    },
    MediaStreams = new [] { new MediaStreamProperty {
        MediaStreamId = 123,
        MediaStreamName = "mediaStreamName",
        MediaStreamType = "mediaStreamType",

        // the properties below are optional
        Attributes = new MediaStreamAttributesProperty {
            Fmtp = new FmtpProperty {
                ChannelOrder = "channelOrder",
                Colorimetry = "colorimetry",
                ExactFramerate = "exactFramerate",
                Par = "par",
                Range = "range",
                ScanMode = "scanMode",
                Tcs = "tcs"
            },
            Lang = "lang"
        },
        ClockRate = 123,
        Description = "description",
        Fmt = 123,
        Tags = new [] { new CfnTag {
            Key = "key",
            Value = "value"
        } },
        VideoFormat = "videoFormat"
    } },
    NdiConfig = new NdiConfigProperty {
        MachineName = "machineName",
        NdiDiscoveryServers = new [] { new NdiDiscoveryServerConfigProperty {
            DiscoveryServerAddress = "discoveryServerAddress",
            VpcInterfaceAdapter = "vpcInterfaceAdapter",

            // the properties below are optional
            DiscoveryServerPort = 123
        } },
        NdiState = "ndiState"
    },
    SourceFailoverConfig = new FailoverConfigProperty {
        FailoverMode = "failoverMode",
        RecoveryWindow = 123,
        SourcePriority = new SourcePriorityProperty {
            PrimarySource = "primarySource"
        },
        State = "state"
    },
    SourceMonitoringConfig = new SourceMonitoringConfigProperty {
        AudioMonitoringSettings = new [] { new AudioMonitoringSettingProperty {
            SilentAudio = new SilentAudioProperty {
                State = "state",
                ThresholdSeconds = 123
            }
        } },
        ContentQualityAnalysisState = "contentQualityAnalysisState",
        ThumbnailState = "thumbnailState",
        VideoMonitoringSettings = new [] { new VideoMonitoringSettingProperty {
            BlackFrames = new BlackFramesProperty {
                State = "state",
                ThresholdSeconds = 123
            },
            FrozenFrames = new FrozenFramesProperty {
                State = "state",
                ThresholdSeconds = 123
            }
        } }
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    VpcInterfaces = new [] { new VpcInterfaceProperty {
        Name = "name",
        RoleArn = "roleArn",
        SecurityGroupIds = new [] { "securityGroupIds" },
        SubnetId = "subnetId",

        // the properties below are optional
        NetworkInterfaceIds = new [] { "networkInterfaceIds" },
        NetworkInterfaceType = "networkInterfaceType",
        Tags = new [] { new CfnTag {
            Key = "key",
            Value = "value"
        } }
    } }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var automatic interface{}

cfnFlow := awscdk.Aws_mediaconnect.NewCfnFlow(this, jsii.String("MyCfnFlow"), &CfnFlowProps{
	Name: jsii.String("name"),
	Source: &SourceProperty{
		Decryption: &EncryptionProperty{
			RoleArn: jsii.String("roleArn"),

			// the properties below are optional
			Algorithm: jsii.String("algorithm"),
			ConstantInitializationVector: jsii.String("constantInitializationVector"),
			DeviceId: jsii.String("deviceId"),
			KeyType: jsii.String("keyType"),
			Region: jsii.String("region"),
			ResourceId: jsii.String("resourceId"),
			SecretArn: jsii.String("secretArn"),
			Url: jsii.String("url"),
		},
		Description: jsii.String("description"),
		EntitlementArn: jsii.String("entitlementArn"),
		GatewayBridgeSource: &GatewayBridgeSourceProperty{
			BridgeArn: jsii.String("bridgeArn"),

			// the properties below are optional
			VpcInterfaceAttachment: &VpcInterfaceAttachmentProperty{
				VpcInterfaceName: jsii.String("vpcInterfaceName"),
			},
		},
		IngestIp: jsii.String("ingestIp"),
		IngestPort: jsii.Number(123),
		MaxBitrate: jsii.Number(123),
		MaxLatency: jsii.Number(123),
		MaxSyncBuffer: jsii.Number(123),
		MediaStreamSourceConfigurations: []interface{}{
			&MediaStreamSourceConfigurationProperty{
				EncodingName: jsii.String("encodingName"),
				MediaStreamName: jsii.String("mediaStreamName"),

				// the properties below are optional
				InputConfigurations: []interface{}{
					&InputConfigurationProperty{
						InputPort: jsii.Number(123),
						Interface: &InterfaceProperty{
							Name: jsii.String("name"),
						},
					},
				},
			},
		},
		MinLatency: jsii.Number(123),
		Name: jsii.String("name"),
		NdiSourceSettings: &NdiSourceSettingsProperty{
			AudioReferenceLevel: jsii.Number(123),
			SourceName: jsii.String("sourceName"),
		},
		Protocol: jsii.String("protocol"),
		RouterIntegrationState: jsii.String("routerIntegrationState"),
		RouterIntegrationTransitDecryption: &FlowTransitEncryptionProperty{
			EncryptionKeyConfiguration: &FlowTransitEncryptionKeyConfigurationProperty{
				Automatic: automatic,
				SecretsManager: &SecretsManagerEncryptionKeyConfigurationProperty{
					RoleArn: jsii.String("roleArn"),
					SecretArn: jsii.String("secretArn"),
				},
			},

			// the properties below are optional
			EncryptionKeyType: jsii.String("encryptionKeyType"),
		},
		SenderControlPort: jsii.Number(123),
		SenderIpAddress: jsii.String("senderIpAddress"),
		SourceArn: jsii.String("sourceArn"),
		SourceIngestPort: jsii.String("sourceIngestPort"),
		SourceListenerAddress: jsii.String("sourceListenerAddress"),
		SourceListenerPort: jsii.Number(123),
		StreamId: jsii.String("streamId"),
		Tags: []CfnTag{
			&CfnTag{
				Key: jsii.String("key"),
				Value: jsii.String("value"),
			},
		},
		VpcInterfaceName: jsii.String("vpcInterfaceName"),
		WhitelistCidr: jsii.String("whitelistCidr"),
	},

	// the properties below are optional
	AvailabilityZone: jsii.String("availabilityZone"),
	EncodingConfig: &EncodingConfigProperty{
		EncodingProfile: jsii.String("encodingProfile"),
		VideoMaxBitrate: jsii.Number(123),
	},
	FlowSize: jsii.String("flowSize"),
	Maintenance: &MaintenanceProperty{
		MaintenanceDay: jsii.String("maintenanceDay"),
		MaintenanceStartHour: jsii.String("maintenanceStartHour"),
	},
	MediaStreams: []interface{}{
		&MediaStreamProperty{
			MediaStreamId: jsii.Number(123),
			MediaStreamName: jsii.String("mediaStreamName"),
			MediaStreamType: jsii.String("mediaStreamType"),

			// the properties below are optional
			Attributes: &MediaStreamAttributesProperty{
				Fmtp: &FmtpProperty{
					ChannelOrder: jsii.String("channelOrder"),
					Colorimetry: jsii.String("colorimetry"),
					ExactFramerate: jsii.String("exactFramerate"),
					Par: jsii.String("par"),
					Range: jsii.String("range"),
					ScanMode: jsii.String("scanMode"),
					Tcs: jsii.String("tcs"),
				},
				Lang: jsii.String("lang"),
			},
			ClockRate: jsii.Number(123),
			Description: jsii.String("description"),
			Fmt: jsii.Number(123),
			Tags: []CfnTag{
				&CfnTag{
					Key: jsii.String("key"),
					Value: jsii.String("value"),
				},
			},
			VideoFormat: jsii.String("videoFormat"),
		},
	},
	NdiConfig: &NdiConfigProperty{
		MachineName: jsii.String("machineName"),
		NdiDiscoveryServers: []interface{}{
			&NdiDiscoveryServerConfigProperty{
				DiscoveryServerAddress: jsii.String("discoveryServerAddress"),
				VpcInterfaceAdapter: jsii.String("vpcInterfaceAdapter"),

				// the properties below are optional
				DiscoveryServerPort: jsii.Number(123),
			},
		},
		NdiState: jsii.String("ndiState"),
	},
	SourceFailoverConfig: &FailoverConfigProperty{
		FailoverMode: jsii.String("failoverMode"),
		RecoveryWindow: jsii.Number(123),
		SourcePriority: &SourcePriorityProperty{
			PrimarySource: jsii.String("primarySource"),
		},
		State: jsii.String("state"),
	},
	SourceMonitoringConfig: &SourceMonitoringConfigProperty{
		AudioMonitoringSettings: []interface{}{
			&AudioMonitoringSettingProperty{
				SilentAudio: &SilentAudioProperty{
					State: jsii.String("state"),
					ThresholdSeconds: jsii.Number(123),
				},
			},
		},
		ContentQualityAnalysisState: jsii.String("contentQualityAnalysisState"),
		ThumbnailState: jsii.String("thumbnailState"),
		VideoMonitoringSettings: []interface{}{
			&VideoMonitoringSettingProperty{
				BlackFrames: &BlackFramesProperty{
					State: jsii.String("state"),
					ThresholdSeconds: jsii.Number(123),
				},
				FrozenFrames: &FrozenFramesProperty{
					State: jsii.String("state"),
					ThresholdSeconds: jsii.Number(123),
				},
			},
		},
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	VpcInterfaces: []interface{}{
		&VpcInterfaceProperty{
			Name: jsii.String("name"),
			RoleArn: jsii.String("roleArn"),
			SecurityGroupIds: []*string{
				jsii.String("securityGroupIds"),
			},
			SubnetId: jsii.String("subnetId"),

			// the properties below are optional
			NetworkInterfaceIds: []*string{
				jsii.String("networkInterfaceIds"),
			},
			NetworkInterfaceType: jsii.String("networkInterfaceType"),
			Tags: []CfnTag{
				&CfnTag{
					Key: jsii.String("key"),
					Value: jsii.String("value"),
				},
			},
		},
	},
})

Initializer ​

ts
new CfnFlow(scope: Construct, id: string, props: CfnFlowProps)
python
CfnFlow(scope: Construct, id: str, props: CfnFlowProps)
java
new CfnFlow(Construct scope, String id, CfnFlowProps props)
csharp
new CfnFlow(Construct scope, string id, CfnFlowProps props)
go
NewCfnFlow(Scope Construct, Id *string, Props CfnFlowProps)

Construct Props ​

availabilityZoneoptionalstringavailability_zoneoptionalstravailabilityZoneoptionalStringAvailabilityZoneoptionalstringAvailabilityZoneoptional*string#
The Availability Zone that you want to create the flow in.

These options are limited to the Availability Zones within the current AWS Region.

encodingConfigoptionalIResolvable | CfnFlow.EncodingConfigPropertyencoding_configoptionaltyping.Union[IResolvable, EncodingConfigProperty]encodingConfigoptionalIResolvableEncodingConfigoptionalIResolvableEncodingConfigoptionalinterface{}#
flowSizeoptionalstringflow_sizeoptionalstrflowSizeoptionalStringFlowSizeoptionalstringFlowSizeoptional*string#
Determines the processing capacity and feature set of the flow.

Set this optional parameter to LARGE if you want to enable NDI outputs on the flow.

maintenanceoptionalIResolvable | CfnFlow.MaintenancePropertymaintenanceoptionaltyping.Union[IResolvable, MaintenanceProperty]maintenanceoptionalIResolvableMaintenanceoptionalIResolvableMaintenanceoptionalinterface{}#
The maintenance settings you want to use for the flow.
mediaStreamsoptionalIResolvable | IResolvable | CfnFlow.MediaStreamProperty[]media_streamsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MediaStreamProperty]]]mediaStreamsoptionalIResolvableMediaStreamsoptionalIResolvableMediaStreamsoptionalinterface{}#
The media streams that are associated with the flow.

After you associate a media stream with a source, you can also associate it with outputs on the flow.

namestringnamestrnameStringNamestringName*stringrequired#
The name of the flow.
ndiConfigoptionalIResolvable | CfnFlow.NdiConfigPropertyndi_configoptionaltyping.Union[IResolvable, NdiConfigProperty]ndiConfigoptionalIResolvableNdiConfigoptionalIResolvableNdiConfigoptionalinterface{}#
Specifies the configuration settings for NDI outputs.

Required when the flow includes NDI outputs.

sourceIResolvable | CfnFlow.SourcePropertysourcetyping.Union[IResolvable, SourceProperty]sourceIResolvableSourceIResolvableSourceinterface{}required#
The settings for the source that you want to use for the new flow.
sourceFailoverConfigoptionalIResolvable | CfnFlow.FailoverConfigPropertysource_failover_configoptionaltyping.Union[IResolvable, FailoverConfigProperty]sourceFailoverConfigoptionalIResolvableSourceFailoverConfigoptionalIResolvableSourceFailoverConfigoptionalinterface{}#
The settings for source failover.
sourceMonitoringConfigoptionalIResolvable | CfnFlow.SourceMonitoringConfigPropertysource_monitoring_configoptionaltyping.Union[IResolvable, SourceMonitoringConfigProperty]sourceMonitoringConfigoptionalIResolvableSourceMonitoringConfigoptionalIResolvableSourceMonitoringConfigoptionalinterface{}#
The settings for source monitoring.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#
Key-value pairs that can be used to tag this flow.
vpcInterfacesoptionalIResolvable | IResolvable | CfnFlow.VpcInterfaceProperty[]vpc_interfacesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, VpcInterfaceProperty]]]vpcInterfacesoptionalIResolvableVpcInterfacesoptionalIResolvableVpcInterfacesoptionalinterface{}#
The VPC Interfaces for this flow.

Properties ​

attrEgressIpstringattr_egress_ipstrattrEgressIpStringAttrEgressIpstringAttrEgressIp*string#
The IP address from which video will be sent to output destinations.
attrFlowArnstringattr_flow_arnstrattrFlowArnStringAttrFlowArnstringAttrFlowArn*string#
The Amazon Resource Name (ARN) of the flow.
attrFlowAvailabilityZonestringattr_flow_availability_zonestrattrFlowAvailabilityZoneStringAttrFlowAvailabilityZonestringAttrFlowAvailabilityZone*string#
The Availability Zone that the flow was created in.

These options are limited to the Availability Zones within the current AWS Region.

attrFlowNdiMachineNamestringattr_flow_ndi_machine_namestrattrFlowNdiMachineNameStringAttrFlowNdiMachineNamestringAttrFlowNdiMachineName*string#
This read-only value represents the automatically-generated NDI machine name that MediaConnect generated for this flow.

These NDI machine names are only generated when you don't specify your own custom name.

attrSourceIngestIpstringattr_source_ingest_ipstrattrSourceIngestIpStringAttrSourceIngestIpstringAttrSourceIngestIp*string#
The IP address that the flow listens on for incoming content.
attrSourceSourceArnstringattr_source_source_arnstrattrSourceSourceArnStringAttrSourceSourceArnstringAttrSourceSourceArn*string#
The ARN of the source.
attrSourceSourceIngestPortstringattr_source_source_ingest_portstrattrSourceSourceIngestPortStringAttrSourceSourceIngestPortstringAttrSourceSourceIngestPort*string#
The port that the flow listens on for incoming content.

If the protocol of the source is Zixi, the port must be set to 2088.

availabilityZonemay be undefinedstringavailability_zonemay be undefinedstravailabilityZonemay be undefinedStringAvailabilityZonemay be undefinedstringAvailabilityZonemay be undefined*string#
The Availability Zone that you want to create the flow in.
cdkTagManagerTagManagercdk_tag_managerTagManagercdkTagManagerTagManagerCdkTagManagerTagManagerCdkTagManagerTagManager#
Tag Manager which manages the tags for this resource.
CFN_RESOURCE_TYPE_NAMEstringcfn_resource_type_namestrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*stringstatic#
The CloudFormation resource type name for this resource class.
Options for this resource, such as condition, update policy etc.
cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*string#
AWS resource type.
creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*string#
encodingConfigmay be undefinedIResolvable | CfnFlow.EncodingConfigPropertyencoding_configmay be undefinedtyping.Union[IResolvable, EncodingConfigProperty]encodingConfigmay be undefinedIResolvableEncodingConfigmay be undefinedIResolvableEncodingConfigmay be undefinedinterface{}#
A reference to a Flow resource.
flowSizemay be undefinedstringflow_sizemay be undefinedstrflowSizemay be undefinedStringFlowSizemay be undefinedstringFlowSizemay be undefined*string#
Determines the processing capacity and feature set of the flow.
logicalIdstringlogical_idstrlogicalIdStringLogicalIdstringLogicalId*string#
The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

maintenancemay be undefinedIResolvable | CfnFlow.MaintenancePropertymaintenancemay be undefinedtyping.Union[IResolvable, MaintenanceProperty]maintenancemay be undefinedIResolvableMaintenancemay be undefinedIResolvableMaintenancemay be undefinedinterface{}#
The maintenance settings you want to use for the flow.
mediaStreamsmay be undefinedIResolvable | IResolvable | CfnFlow.MediaStreamProperty[]media_streamsmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MediaStreamProperty]]]mediaStreamsmay be undefinedIResolvableMediaStreamsmay be undefinedIResolvableMediaStreamsmay be undefinedinterface{}#
The media streams that are associated with the flow.
namestringnamestrnameStringNamestringName*string#
The name of the flow.
ndiConfigmay be undefinedIResolvable | CfnFlow.NdiConfigPropertyndi_configmay be undefinedtyping.Union[IResolvable, NdiConfigProperty]ndiConfigmay be undefinedIResolvableNdiConfigmay be undefinedIResolvableNdiConfigmay be undefinedinterface{}#
Specifies the configuration settings for NDI outputs.
nodeNodenodeNodenodeNodeNodeNodeNodeNode#
The tree node.
refstringrefstrrefStringRefstringRef*string#
Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

sourceIResolvable | CfnFlow.SourcePropertysourcetyping.Union[IResolvable, SourceProperty]sourceIResolvableSourceIResolvableSourceinterface{}#
The settings for the source that you want to use for the new flow.
sourceFailoverConfigmay be undefinedIResolvable | CfnFlow.FailoverConfigPropertysource_failover_configmay be undefinedtyping.Union[IResolvable, FailoverConfigProperty]sourceFailoverConfigmay be undefinedIResolvableSourceFailoverConfigmay be undefinedIResolvableSourceFailoverConfigmay be undefinedinterface{}#
The settings for source failover.
sourceMonitoringConfigmay be undefinedIResolvable | CfnFlow.SourceMonitoringConfigPropertysource_monitoring_configmay be undefinedtyping.Union[IResolvable, SourceMonitoringConfigProperty]sourceMonitoringConfigmay be undefinedIResolvableSourceMonitoringConfigmay be undefinedIResolvableSourceMonitoringConfigmay be undefinedinterface{}#
The settings for source monitoring.
stackStackstackStackstackStackStackStackStackStack#
The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

tagsmay be undefinedCfnTag[]tagsmay be undefinedtyping.List[CfnTag]tagsmay be undefinedList<CfnTag>Tagsmay be undefinedCfnTag[]Tagsmay be undefined*[]CfnTag#
Key-value pairs that can be used to tag this flow.
vpcInterfacesmay be undefinedIResolvable | IResolvable | CfnFlow.VpcInterfaceProperty[]vpc_interfacesmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, VpcInterfaceProperty]]]vpcInterfacesmay be undefinedIResolvableVpcInterfacesmay be undefinedIResolvableVpcInterfacesmay be undefinedinterface{}#
The VPC Interfaces for this flow.

Methods ​

addDeletionOverride(path: string): voiddef add_deletion_override(self, path: str) -> Nonepublic void addDeletionOverride(String path)public void AddDeletionOverride(string path)func AddDeletionOverride(Path *string)#
Syntactic sugar for `addOverride(path, undefined)`.
1 parameter

Parameters

  • pathpathpathpathPath — The path of the value to delete.
addDependency(target: CfnResource): voiddef add_dependency(self, target: CfnResource) -> Nonepublic void addDependency(CfnResource target)public void AddDependency(CfnResource target)func AddDependency(Target CfnResource)deprecated#
Use `addResourceDependency` instead.

This method has been renamed to addResourceDependency to more clearly set it apart from construct.node.addDependency. See the documentation of that function for more details.

addDependsOn(target: CfnResource): voiddef add_depends_on(self, target: CfnResource) -> Nonepublic void addDependsOn(CfnResource target)public void AddDependsOn(CfnResource target)func AddDependsOn(Target CfnResource)deprecated#
Use `addResourceDependency` instead.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method has been renamed to addResourceDependency, which makes it more clear that this method operates at a different level from the construct-level construct.node.addDependency() mechanism.

addMetadata(key: string, value: any): voiddef add_metadata(self, key: str, value: Any) -> Nonepublic void addMetadata(String key, Object value)public void AddMetadata(string key, object value)func AddMetadata(Key *string, Value interface{})#
Add a value to the CloudFormation Resource Metadata.
addOverride(path: string, value: any): voiddef add_override(self, path: str, value: Any) -> Nonepublic void addOverride(String path, Object value)public void AddOverride(string path, object value)func AddOverride(Path *string, Value interface{})#
Adds an override to the synthesized CloudFormation resource.
notes · 2 parameters

To add a property override, either use addPropertyOverride or prefix path with "Properties." (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example,

typescript
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');

would add the overrides

json
"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters

  • pathpathpathpathPath — - The path of the property, you can use dot notation to override values in complex types.
  • valuevaluevaluevalueValue — - The value.
addPropertyDeletionOverride(propertyPath: string): voiddef add_property_deletion_override(self, property_path: str) -> Nonepublic void addPropertyDeletionOverride(String propertyPath)public void AddPropertyDeletionOverride(string propertyPath)func AddPropertyDeletionOverride(PropertyPath *string)#
Adds an override that deletes the value of a property from the resource definition.
1 parameter

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path to the property.
addPropertyOverride(propertyPath: string, value: any): voiddef add_property_override(self, property_path: str, value: Any) -> Nonepublic void addPropertyOverride(String propertyPath, Object value)public void AddPropertyOverride(string propertyPath, object value)func AddPropertyOverride(PropertyPath *string, Value interface{})#
Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

2 parameters

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path of the property.
  • valuevaluevaluevalueValue — The value.
addResourceDependency(target: CfnResource, reason?: string): voiddef add_resource_dependency(self, target: CfnResource, reason: typing.Optional[str] = None) -> Nonepublic void addResourceDependency(CfnResource target, String reason)public void AddResourceDependency(CfnResource target, string? reason = null)func AddResourceDependency(Target CfnResource, Reason *string)#
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method only adds dependencies between L1 resources. If you are looking for a generic construct-to-construct dependency mechanism that works for all constructs including L2s, use construct.node.addDependency instead.

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)#
Sets the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.

1 parameter

Parameters

  • strengthstrengthstrengthstrengthStrength — - The reference strength to use for this resource.
applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): voiddef apply_removal_policy(self, policy: typing.Optional[RemovalPolicy] = None, options: typing.Optional[RemovalPolicyOptions] = None) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy, RemovalPolicyOptions options)public void ApplyRemovalPolicy(RemovalPolicy? policy = null, RemovalPolicyOptions? options = null)func ApplyRemovalPolicy(Policy RemovalPolicy, Options RemovalPolicyOptions)#
Sets the deletion policy of the resource based on the removal policy specified.
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). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

arnForFlow(resource: IFlowRef): string@staticmethod def arn_for_flow(resource: IFlowRef) -> strpublic static String arnForFlow(IFlowRef resource)public static string ArnForFlow(IFlowRef resource)func ArnForFlow(Resource IFlowRef) *stringstatic#
cfnPropertyName(cdkPropertyName: string): stringdef cfn_property_name(self, cdk_property_name: str) -> strpublic String cfnPropertyName(String cdkPropertyName)public string CfnPropertyName(string cdkPropertyName)func CfnPropertyName(CdkPropertyName *string) *string#
getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Referencedef get_att(self, attribute_name: str, type_hint: typing.Optional[ResolutionTypeHint] = None) -> Referencepublic Reference getAtt(String attributeName, ResolutionTypeHint typeHint)public Reference GetAtt(string attributeName, ResolutionTypeHint? typeHint = null)func GetAtt(AttributeName *string, TypeHint ResolutionTypeHint) Reference#
Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

1 parameter

Parameters

  • attributeNameattribute_nameattributeNameattributeNameAttributeName — The name of the attribute.
getMetadata(key: string): anydef get_metadata(self, key: str) -> Anypublic Object getMetadata(String key)public object GetMetadata(string key)func GetMetadata(Key *string) interface{}#
Retrieve a value value from the CloudFormation Resource Metadata.
inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector)#
Examines the CloudFormation resource and discloses attributes.
1 parameter

Parameters

  • inspectorinspectorinspectorinspectorInspector — tree inspector to collect and process attributes.
isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *boolstatic#
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

returns

Returns: The construct as a stack element or undefined if it is not a stack element.

isCfnFlow(x: any): boolean@staticmethod def is_cfn_flow(x: Any) -> boolpublic static Boolean isCfnFlow(Object x)public static bool IsCfnFlow(object x)func IsCfnFlow(X interface{}) *boolstatic#
Checks whether the given object is a CfnFlow.
isCfnResource(x: any): boolean@staticmethod def is_cfn_resource(x: Any) -> boolpublic static Boolean isCfnResource(Object x)public static bool IsCfnResource(object x)func IsCfnResource(X interface{}) *boolstatic#
Check whether the given object is a CfnResource.
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#
Checks if `x` is a construct.
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.

obtainDependencies(): Stack | CfnResource[]def obtain_dependencies(self, ) -> typing.List[typing.Union[Stack, CfnResource]]public List<Stack> obtainDependencies()public Stack[] ObtainDependencies()func ObtainDependencies() *[]interface{}#
Retrieves an array of resources and stacks this resource depends on.

For resources depended on directly, returns the CfnResource object. For dependencies on other stacks, returns the Stack object. The order of the array is not guaranteed.

overrideLogicalId(newLogicalId: string): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string)#
Overrides the auto-generated logical ID with a specific ID.
1 parameter

Parameters

  • newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId — The new logical ID to use for this stack element.
removeDependency(target: CfnResource): voiddef remove_dependency(self, target: CfnResource) -> Nonepublic void removeDependency(CfnResource target)public void RemoveDependency(CfnResource target)func RemoveDependency(Target CfnResource)deprecated#
Use `removeResourceDependency` instead

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

removeResourceDependency(target: CfnResource): voiddef remove_resource_dependency(self, target: CfnResource) -> Nonepublic void removeResourceDependency(CfnResource target)public void RemoveResourceDependency(CfnResource target)func RemoveResourceDependency(Target CfnResource)#
Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

replaceDependency(target: CfnResource, newTarget: CfnResource): voiddef replace_dependency(self, target: CfnResource, new_target: CfnResource) -> Nonepublic void replaceDependency(CfnResource target, CfnResource newTarget)public void ReplaceDependency(CfnResource target, CfnResource newTarget)func ReplaceDependency(Target CfnResource, NewTarget CfnResource)#
Replaces one dependency with another.
2 parameters

Parameters

  • targettargettargettargetTarget — The dependency to replace.
  • newTargetnew_targetnewTargetnewTargetNewTarget — The new dependency to add.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
returns

Returns: a string representation of this resource

with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
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.