Skip to content
v2.274.0

Experimental

@aws-cdk/aws-ivs-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

Channel L2 construct ​

A new IVS channel.

Example ​

ts
const myRtmpChannel = new ivs.Channel(this, 'myRtmpChannel', {
  type: ivs.ChannelType.STANDARD,
  insecureIngest: true, // default value is false
});
python
my_rtmp_channel = ivs.Channel(self, "myRtmpChannel",
    type=ivs.ChannelType.STANDARD,
    insecure_ingest=True
)
java
Channel myRtmpChannel = Channel.Builder.create(this, "myRtmpChannel")
        .type(ChannelType.STANDARD)
        .insecureIngest(true)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.IVS.Alpha
var myRtmpChannel = new Channel(this, "myRtmpChannel", new ChannelProps {
    Type = ChannelType.STANDARD,
    InsecureIngest = true
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkivsalpha/v2
myRtmpChannel := ivs.NewChannel(this, jsii.String("myRtmpChannel"), &ChannelProps{
	Type: ivs.ChannelType_STANDARD,
	InsecureIngest: jsii.Boolean(true),
})

Initializer ​

ts
new Channel(scope: Construct, id: string, props?: ChannelProps)
python
Channel(scope: Construct, id: str, props: typing.Optional[ChannelProps] = None)
java
new Channel(Construct scope, String id, ChannelProps props)
csharp
new Channel(Construct scope, string id, ChannelProps? props = null)
go
NewChannel(Scope Construct, Id *string, Props ChannelProps)

Construct Props ​

authorizedoptionalbooleanauthorizedoptionalboolauthorizedoptionalBooleanAuthorizedoptionalboolAuthorizedoptional*bool= false#
Whether the channel is authorized.

If you wish to make an authorized channel, you will need to ensure that a PlaybackKeyPair has been uploaded to your account as this is used to validate the signed JWT that is required for authorization

channelNameoptionalstringchannel_nameoptionalstrchannelNameoptionalStringChannelNameoptionalstringChannelNameoptional*string#
A name for the channel.

Default: Automatically generated name

containerFormatoptionalContainerFormatcontainer_formatoptionalContainerFormatcontainerFormatoptionalContainerFormatContainerFormatoptionalContainerFormatContainerFormatoptionalContainerFormat#
Indicates which content-packaging format is used (MPEG-TS or fMP4).

Default: ContainerFormat.FRAGMENTED_MP4 is automatically set when the multitrackInputConfiguration is specified. If not specified, it remains undefined and uses the IVS default setting (TS).

If multitrackInputConfiguration is specified, only fMP4 can be used. Otherwise, containerFormat may be set to ContainerFormat.TS or ContainerFormat.FRAGMENTED_MP4.

insecureIngestoptionalbooleaninsecure_ingestoptionalboolinsecureIngestoptionalBooleanInsecureIngestoptionalboolInsecureIngestoptional*bool= false#
Whether the channel allows insecure RTMP ingest.
latencyModeoptionalLatencyModelatency_modeoptionalLatencyModelatencyModeoptionalLatencyModeLatencyModeoptionalLatencyModeLatencyModeoptionalLatencyMode= LatencyMode.LOW#
Channel latency mode.
multitrackInputConfigurationoptionalMultitrackInputConfigurationmultitrack_input_configurationoptionalMultitrackInputConfigurationmultitrackInputConfigurationoptionalMultitrackInputConfigurationMultitrackInputConfigurationoptionalMultitrackInputConfigurationMultitrackInputConfigurationoptionalMultitrackInputConfiguration#
Object specifying multitrack input configuration. You must specify `multitrackInputConfiguration` if you want to use MultiTrack Video.

Default: undefined - IVS default setting is not use MultiTrack Video.

multitrackInputConfiguration is only supported for ChannelType.STANDARD.

presetoptionalPresetpresetoptionalPresetpresetoptionalPresetPresetoptionalPresetPresetoptionalPreset#
An optional transcode preset for the channel.

Default: Preset.HIGHER_BANDWIDTH_DELIVERY if channelType is ADVANCED_SD or ADVANCED_HD, none otherwise

Can be used for ADVANCED_HD and ADVANCED_SD channel types. When LOW or STANDARD is used, the preset will be overridden and set to none regardless of the value provided.

recordingConfigurationoptionalIRecordingConfigurationrecording_configurationoptionalIRecordingConfigurationrecordingConfigurationoptionalIRecordingConfigurationRecordingConfigurationoptionalIRecordingConfigurationRecordingConfigurationoptionalIRecordingConfiguration#
A recording configuration for the channel.

Default: recording is disabled

typeoptionalChannelTypetypeoptionalChannelTypetypeoptionalChannelTypeTypeoptionalChannelTypeTypeoptionalChannelType= ChannelType.STANDARD#
The channel type, which determines the allowable resolution and bitrate.

If you exceed the allowable resolution or bitrate, the stream will disconnect immediately

Properties ​

channelArnstringchannel_arnstrchannelArnStringChannelArnstringChannelArn*stringrequired#
The channel ARN.

For example: arn:aws:ivs:us-west-2:123456789012:channel/abcdABCDefgh

channelIngestEndpointstringchannel_ingest_endpointstrchannelIngestEndpointStringChannelIngestEndpointstringChannelIngestEndpoint*stringrequired#
Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming software.

For example: a1b2c3d4e5f6.global-contribute.live-video.net

channelPlaybackUrlstringchannel_playback_urlstrchannelPlaybackUrlStringChannelPlaybackUrlstringChannelPlaybackUrl*stringrequired#
Channel playback URL.
The environment this resource belongs to.
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.

nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
PROPERTY_INJECTION_IDstringproperty_injection_idstrPROPERTY_INJECTION_IDStringPROPERTY_INJECTION_IDstringPROPERTY_INJECTION_ID*stringrequiredstatic#
Uniquely identifies this class.
stackStackstackStackstackStackStackStackStackStackrequired#
The stack in which this resource is defined.

Methods ​

addStreamKey(id: string): StreamKeydef add_stream_key(self, id: str) -> StreamKeypublic StreamKey addStreamKey(String id)public StreamKey AddStreamKey(string id)func AddStreamKey(Id *string) StreamKey#
Adds a stream key for this IVS Channel.
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)#
Override the cross-stack reference strength for this resource.
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)#
Apply the given removal policy to this resource.
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).

fromChannelArn(scope: Construct, id: string, channelArn: string): IChannel@staticmethod def from_channel_arn(scope: Construct, id: str, channel_arn: str) -> IChannelpublic static IChannel fromChannelArn(Construct scope, String id, String channelArn)public static IChannel FromChannelArn(Construct scope, string id, string channelArn)func FromChannelArn(Scope Construct, Id *string, ChannelArn *string) IChannelstatic#
Import an existing channel.
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.

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#
Returns true if the construct was created by CDK, and false otherwise.
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#
Check whether the given construct is a Resource.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
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.