awscdkivsalpha

package module
v2.176.0-alpha.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

README

AWS::IVS Construct Library

---

The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.


Amazon Interactive Video Service (Amazon IVS) is a managed live streaming solution that is quick and easy to set up, and ideal for creating interactive video experiences. Send your live streams to Amazon IVS using streaming software and the service does everything you need to make low-latency live video available to any viewer around the world, letting you focus on building interactive experiences alongside the live video. You can easily customize and enhance the audience experience through the Amazon IVS player SDK and timed metadata APIs, allowing you to build a more valuable relationship with your viewers on your own websites and applications.

This module is part of the AWS Cloud Development Kit project.

Channels

An Amazon IVS channel stores configuration information related to your live stream. You first create a channel and then contribute video to it using the channel’s stream key to start your live stream.

You can create a channel

myChannel := ivs.NewChannel(this, jsii.String("Channel"))

You can use Advanced Channel type by setting the type property to ivs.ChannelType.ADVANCED_HD or ivs.ChannelType.ADVANCED_SD.

Additionally, when using the Advanced Channel type, you can set the preset property to ivs.Preset.CONSTRAINED_BANDWIDTH_DELIVERY or ivs.Preset.HIGHER_BANDWIDTH_DELIVERY.

For more information, see Amazon IVS Streaming Configuration.

myChannel := ivs.NewChannel(this, jsii.String("myChannel"), &ChannelProps{
	Type: ivs.ChannelType_ADVANCED_HD,
	Preset: ivs.Preset_CONSTRAINED_BANDWIDTH_DELIVERY,
})

If you want to use RTMP ingest, set insecureIngest property to true. By default, insecureIngest is false which means using RTMPS ingest.

⚠ Note: RTMP ingest might result in reduced security for your streams. AWS recommends that you use RTMPS for ingest, unless you have specific and verified use cases. For more information, see Encoder Settings.

myRtmpChannel := ivs.NewChannel(this, jsii.String("myRtmpChannel"), &ChannelProps{
	Type: ivs.ChannelType_STANDARD,
	InsecureIngest: jsii.Boolean(true),
})
Importing an existing channel

You can reference an existing channel, for example, if you need to create a stream key for an existing channel

myChannel := ivs.Channel_FromChannelArn(this, jsii.String("Channel"), myChannelArn)

Stream Keys

A Stream Key is used by a broadcast encoder to initiate a stream and identify to Amazon IVS which customer and channel the stream is for. If you are storing this value, it should be treated as if it were a password.

You can create a stream key for a given channel

myStreamKey := myChannel.AddStreamKey(jsii.String("StreamKey"))

Private Channels

Amazon IVS offers the ability to create private channels, allowing you to restrict your streams by channel or viewer. You control access to video playback by enabling playback authorization on channels and generating signed JSON Web Tokens (JWTs) for authorized playback requests.

A playback token is a JWT that you sign (with a playback authorization key) and include with every playback request for a channel that has playback authorization enabled.

In order for Amazon IVS to validate the token, you need to upload the public key that corresponds to the private key you use to sign the token.

keyPair := ivs.NewPlaybackKeyPair(this, jsii.String("PlaybackKeyPair"), &PlaybackKeyPairProps{
	PublicKeyMaterial: myPublicKeyPemString,
})

Then, when creating a channel, specify the authorized property

myChannel := ivs.NewChannel(this, jsii.String("Channel"), &ChannelProps{
	Authorized: jsii.Boolean(true),
})

Recording Configurations

An Amazon IVS Recording Configuration stores settings that specify how a channel's live streams should be recorded. You can configure video quality, thumbnail generation, and where recordings are stored in Amazon S3.

For more information about IVS recording, see IVS Auto-Record to Amazon S3 | Low-Latency Streaming.

You can create a recording configuration:

// create an S3 bucket for storing recordings
recordingBucket := s3.NewBucket(this, jsii.String("RecordingBucket"))

// create a basic recording configuration
recordingConfiguration := ivs.NewRecordingConfiguration(this, jsii.String("RecordingConfiguration"), &RecordingConfigurationProps{
	Bucket: recordingBucket,
})
Renditions of a Recording

When you stream content to an Amazon IVS channel, auto-record-to-s3 uses the source video to generate multiple renditions.

For more information, see Discovering the Renditions of a Recording.

var recordingBucket bucket


recordingConfiguration := ivs.NewRecordingConfiguration(this, jsii.String("RecordingConfiguration"), &RecordingConfigurationProps{
	Bucket: recordingBucket,

	// set rendition configuration
	RenditionConfiguration: ivs.RenditionConfiguration_Custom([]resolution{
		ivs.*resolution_HD,
		ivs.*resolution_SD,
	}),
})
Thumbnail Generation

You can enable or disable the recording of thumbnails for a live session and modify the interval at which thumbnails are generated for the live session.

Thumbnail intervals may range from 1 second to 60 seconds; by default, thumbnail recording is enabled, at an interval of 60 seconds.

For more information, see Thumbnails.

var recordingBucket bucket


recordingConfiguration := ivs.NewRecordingConfiguration(this, jsii.String("RecordingConfiguration"), &RecordingConfigurationProps{
	Bucket: recordingBucket,

	// set thumbnail settings
	ThumbnailConfiguration: ivs.ThumbnailConfiguration_Interval(ivs.Resolution_HD, []storage{
		ivs.*storage_LATEST,
		ivs.*storage_SEQUENTIAL,
	}, awscdk.Duration_Seconds(jsii.Number(30))),
})
Merge Fragmented Streams

The recordingReconnectWindow property allows you to specify a window of time (in seconds) during which, if your stream is interrupted and a new stream is started, Amazon IVS tries to record to the same S3 prefix as the previous stream.

In other words, if a broadcast disconnects and then reconnects within the specified interval, the multiple streams are considered a single broadcast and merged together.

For more information, see Merge Fragmented Streams.

var recordingBucket bucket


recordingConfiguration := ivs.NewRecordingConfiguration(this, jsii.String("RecordingConfiguration"), &RecordingConfigurationProps{
	Bucket: recordingBucket,

	// set recording reconnect window
	RecordingReconnectWindow: awscdk.Duration_Seconds(jsii.Number(60)),
})
Attaching Recording Configuration to a Channel

To enable recording for a channel, specify the recording configuration when creating the channel:

var recordingConfiguration recordingConfiguration


channel := ivs.NewChannel(this, jsii.String("Channel"), &ChannelProps{
	// set recording configuration
	RecordingConfiguration: recordingConfiguration,
})

Documentation

Overview

The CDK Construct Library for AWS::IVS

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Channel_IsConstruct

func Channel_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

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.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func Channel_IsOwnedResource

func Channel_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func Channel_IsResource

func Channel_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func NewChannel_Override

func NewChannel_Override(c Channel, scope constructs.Construct, id *string, props *ChannelProps)

Experimental.

func NewPlaybackKeyPair_Override

func NewPlaybackKeyPair_Override(p PlaybackKeyPair, scope constructs.Construct, id *string, props *PlaybackKeyPairProps)

Experimental.

func NewRecordingConfiguration_Override

func NewRecordingConfiguration_Override(r RecordingConfiguration, scope constructs.Construct, id *string, props *RecordingConfigurationProps)

Experimental.

func NewStreamKey_Override

func NewStreamKey_Override(s StreamKey, scope constructs.Construct, id *string, props *StreamKeyProps)

Experimental.

func PlaybackKeyPair_IsConstruct

func PlaybackKeyPair_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

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.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func PlaybackKeyPair_IsOwnedResource

func PlaybackKeyPair_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func PlaybackKeyPair_IsResource

func PlaybackKeyPair_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func RecordingConfiguration_IsConstruct

func RecordingConfiguration_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

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.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func RecordingConfiguration_IsOwnedResource

func RecordingConfiguration_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func RecordingConfiguration_IsResource

func RecordingConfiguration_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func StreamKey_IsConstruct

func StreamKey_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

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.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func StreamKey_IsOwnedResource

func StreamKey_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func StreamKey_IsResource

func StreamKey_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

Types

type Channel

type Channel interface {
	awscdk.Resource
	IChannel
	// The channel ARN.
	//
	// For example: arn:aws:ivs:us-west-2:123456789012:channel/abcdABCDefgh.
	// Experimental.
	ChannelArn() *string
	// 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
	// Experimental.
	ChannelIngestEndpoint() *string
	// Channel playback URL.
	//
	// For example:
	// https://a1b2c3d4e5f6.us-west-2.playback.live-video.net/api/video/v1/us-west-2.123456789012.channel.abcdEFGH.m3u8
	// Experimental.
	ChannelPlaybackUrl() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Adds a stream key for this IVS Channel.
	// Experimental.
	AddStreamKey(id *string) StreamKey
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

A new IVS channel.

Example:

myRtmpChannel := ivs.NewChannel(this, jsii.String("myRtmpChannel"), &ChannelProps{
	Type: ivs.ChannelType_STANDARD,
	InsecureIngest: jsii.Boolean(true),
})

Experimental.

func NewChannel

func NewChannel(scope constructs.Construct, id *string, props *ChannelProps) Channel

Experimental.

type ChannelProps

type ChannelProps struct {
	// 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.
	// Default: false.
	//
	// Experimental.
	Authorized *bool `field:"optional" json:"authorized" yaml:"authorized"`
	// A name for the channel.
	// Default: Automatically generated name.
	//
	// Experimental.
	ChannelName *string `field:"optional" json:"channelName" yaml:"channelName"`
	// Whether the channel allows insecure RTMP ingest.
	// Default: false.
	//
	// Experimental.
	InsecureIngest *bool `field:"optional" json:"insecureIngest" yaml:"insecureIngest"`
	// Channel latency mode.
	// Default: LatencyMode.LOW
	//
	// Experimental.
	LatencyMode LatencyMode `field:"optional" json:"latencyMode" yaml:"latencyMode"`
	// An optional transcode preset for the channel.
	//
	// 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.
	// Default: - Preset.HIGHER_BANDWIDTH_DELIVERY if channelType is ADVANCED_SD or ADVANCED_HD, none otherwise
	//
	// Experimental.
	Preset Preset `field:"optional" json:"preset" yaml:"preset"`
	// A recording configuration for the channel.
	// Default: - recording is disabled.
	//
	// Experimental.
	RecordingConfiguration IRecordingConfiguration `field:"optional" json:"recordingConfiguration" yaml:"recordingConfiguration"`
	// The channel type, which determines the allowable resolution and bitrate.
	//
	// If you exceed the allowable resolution or bitrate, the stream will disconnect immediately.
	// Default: ChannelType.STANDARD
	//
	// Experimental.
	Type ChannelType `field:"optional" json:"type" yaml:"type"`
}

Properties for creating a new Channel.

Example:

myRtmpChannel := ivs.NewChannel(this, jsii.String("myRtmpChannel"), &ChannelProps{
	Type: ivs.ChannelType_STANDARD,
	InsecureIngest: jsii.Boolean(true),
})

Experimental.

type ChannelType

type ChannelType string

The channel type, which determines the allowable resolution and bitrate.

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

Example:

myChannel := ivs.NewChannel(this, jsii.String("myChannel"), &ChannelProps{
	Type: ivs.ChannelType_ADVANCED_HD,
	Preset: ivs.Preset_CONSTRAINED_BANDWIDTH_DELIVERY,
})

See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html

Experimental.

const (
	// Multiple qualities are generated from the original input, to automatically give viewers the best experience for their devices and network conditions.
	//
	// Transcoding allows higher playback quality across a range of download speeds. Resolution can be up to 1080p and bitrate can be up to 8.5 Mbps.
	// Audio is transcoded only for renditions 360p and below; above that, audio is passed through.
	// Experimental.
	ChannelType_STANDARD ChannelType = "STANDARD"
	// Delivers the original input to viewers.
	//
	// The viewer’s video-quality choice is limited to the original input.
	// Experimental.
	ChannelType_BASIC ChannelType = "BASIC"
	// Multiple qualities are generated from the original input, to automatically give viewers the best experience for their devices and network conditions.
	//
	// Input resolution can be up to 1080p and bitrate can be up to 8.5 Mbps; output is capped at SD quality (480p).
	// Audio for all renditions is transcoded, and an audio-only rendition is available.
	// Experimental.
	ChannelType_ADVANCED_SD ChannelType = "ADVANCED_SD"
	// Multiple qualities are generated from the original input, to automatically give viewers the best experience for their devices and network conditions.
	//
	// Input resolution can be up to 1080p and bitrate can be up to 8.5 Mbps; output is capped at HD quality (720p).
	// Audio for all renditions is transcoded, and an audio-only rendition is available.
	// Experimental.
	ChannelType_ADVANCED_HD ChannelType = "ADVANCED_HD"
)

type IChannel

type IChannel interface {
	awscdk.IResource
	// Adds a stream key for this IVS Channel.
	// Experimental.
	AddStreamKey(id *string) StreamKey
	// The channel ARN.
	//
	// For example: arn:aws:ivs:us-west-2:123456789012:channel/abcdABCDefgh.
	// Experimental.
	ChannelArn() *string
}

Represents an IVS Channel. Experimental.

func Channel_FromChannelArn

func Channel_FromChannelArn(scope constructs.Construct, id *string, channelArn *string) IChannel

Import an existing channel. Experimental.

type IPlaybackKeyPair

type IPlaybackKeyPair interface {
	awscdk.IResource
	// Key-pair ARN.
	//
	// For example: arn:aws:ivs:us-west-2:693991300569:playback-key/f99cde61-c2b0-4df3-8941-ca7d38acca1a.
	// Experimental.
	PlaybackKeyPairArn() *string
}

Represents an IVS Playback Key Pair. Experimental.

type IRecordingConfiguration

type IRecordingConfiguration interface {
	awscdk.IResource
	// The ARN of the Recording configuration.
	// Experimental.
	RecordingConfigurationArn() *string
	// The ID of the Recording configuration.
	// Experimental.
	RecordingConfigurationId() *string
}

Represents the IVS Recording configuration. Experimental.

func RecordingConfiguration_FromArn

func RecordingConfiguration_FromArn(scope constructs.Construct, id *string, recordingConfigurationArn *string) IRecordingConfiguration

Imports an IVS Recording Configuration from its ARN. Experimental.

func RecordingConfiguration_FromRecordingConfigurationId

func RecordingConfiguration_FromRecordingConfigurationId(scope constructs.Construct, id *string, recordingConfigurationId *string) IRecordingConfiguration

Imports an IVS Recording Configuration from attributes. Experimental.

type IStreamKey

type IStreamKey interface {
	awscdk.IResource
	// The stream-key ARN.
	//
	// For example: arn:aws:ivs:us-west-2:123456789012:stream-key/g1H2I3j4k5L6.
	// Experimental.
	StreamKeyArn() *string
}

Represents an IVS Stream Key. Experimental.

type LatencyMode

type LatencyMode string

Channel latency mode. Experimental.

const (
	// Use LOW to minimize broadcaster-to-viewer latency for interactive broadcasts.
	// Experimental.
	LatencyMode_LOW LatencyMode = "LOW"
	// Use NORMAL for broadcasts that do not require viewer interaction.
	// Experimental.
	LatencyMode_NORMAL LatencyMode = "NORMAL"
)

type PlaybackKeyPair

type PlaybackKeyPair interface {
	awscdk.Resource
	IPlaybackKeyPair
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// Key-pair ARN.
	//
	// For example: arn:aws:ivs:us-west-2:693991300569:playback-key/f99cde61-c2b0-4df3-8941-ca7d38acca1a.
	// Experimental.
	PlaybackKeyPairArn() *string
	// Key-pair identifier.
	//
	// For example: 98:0d:1a:a0:19:96:1e:ea:0a:0a:2c:9a:42:19:2b:e7.
	// Experimental.
	PlaybackKeyPairFingerprint() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

A new IVS Playback Key Pair.

Example:

keyPair := ivs.NewPlaybackKeyPair(this, jsii.String("PlaybackKeyPair"), &PlaybackKeyPairProps{
	PublicKeyMaterial: myPublicKeyPemString,
})

Experimental.

func NewPlaybackKeyPair

func NewPlaybackKeyPair(scope constructs.Construct, id *string, props *PlaybackKeyPairProps) PlaybackKeyPair

Experimental.

type PlaybackKeyPairProps

type PlaybackKeyPairProps struct {
	// The public portion of a customer-generated key pair.
	// Experimental.
	PublicKeyMaterial *string `field:"required" json:"publicKeyMaterial" yaml:"publicKeyMaterial"`
	// An arbitrary string (a nickname) assigned to a playback key pair that helps the customer identify that resource.
	//
	// The value does not need to be unique.
	// Default: Automatically generated name.
	//
	// Experimental.
	PlaybackKeyPairName *string `field:"optional" json:"playbackKeyPairName" yaml:"playbackKeyPairName"`
}

Properties for creating a new Playback Key Pair.

Example:

keyPair := ivs.NewPlaybackKeyPair(this, jsii.String("PlaybackKeyPair"), &PlaybackKeyPairProps{
	PublicKeyMaterial: myPublicKeyPemString,
})

Experimental.

type Preset

type Preset string

An optional transcode preset for the channel.

This is selectable only for ADVANCED_HD and ADVANCED_SD channel types.

Example:

myChannel := ivs.NewChannel(this, jsii.String("myChannel"), &ChannelProps{
	Type: ivs.ChannelType_ADVANCED_HD,
	Preset: ivs.Preset_CONSTRAINED_BANDWIDTH_DELIVERY,
})

See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html

Experimental.

const (
	// Use a lower bitrate than STANDARD for each quality level.
	//
	// Use it if you have low download bandwidth and/or simple video content (e.g., talking heads).
	// Experimental.
	Preset_CONSTRAINED_BANDWIDTH_DELIVERY Preset = "CONSTRAINED_BANDWIDTH_DELIVERY"
	// Use a higher bitrate for each quality level.
	//
	// Use it if you have high download bandwidth and/or complex video content (e.g., flashes and quick scene changes).
	// Experimental.
	Preset_HIGHER_BANDWIDTH_DELIVERY Preset = "HIGHER_BANDWIDTH_DELIVERY"
)

type RecordingConfiguration

type RecordingConfiguration interface {
	awscdk.Resource
	IRecordingConfiguration
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The ARN of the Recording configuration.
	// Experimental.
	RecordingConfigurationArn() *string
	// The ID of the Recording configuration.
	// Experimental.
	RecordingConfigurationId() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

The IVS Recording configuration.

Example:

var recordingBucket bucket

recordingConfiguration := ivs.NewRecordingConfiguration(this, jsii.String("RecordingConfiguration"), &RecordingConfigurationProps{
	Bucket: recordingBucket,

	// set rendition configuration
	RenditionConfiguration: ivs.RenditionConfiguration_Custom([]resolution{
		ivs.*resolution_HD,
		ivs.*resolution_SD,
	}),
})

Experimental.

func NewRecordingConfiguration

func NewRecordingConfiguration(scope constructs.Construct, id *string, props *RecordingConfigurationProps) RecordingConfiguration

Experimental.

type RecordingConfigurationProps

type RecordingConfigurationProps struct {
	// S3 bucket where recorded videos will be stored.
	// Experimental.
	Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"`
	// The name of the Recording configuration.
	//
	// The value does not need to be unique.
	// Default: - auto generate.
	//
	// Experimental.
	RecordingConfigurationName *string `field:"optional" json:"recordingConfigurationName" yaml:"recordingConfigurationName"`
	// If a broadcast disconnects and then reconnects within the specified interval, the multiple streams will be considered a single broadcast and merged together.
	//
	// `recordingReconnectWindow` must be between 0 and 300 seconds.
	// Default: - 0 seconds (means disabled).
	//
	// Experimental.
	RecordingReconnectWindow awscdk.Duration `field:"optional" json:"recordingReconnectWindow" yaml:"recordingReconnectWindow"`
	// A rendition configuration describes which renditions should be recorded for a stream.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ivs-recordingconfiguration-renditionconfiguration.html
	//
	// Default: - no rendition configuration.
	//
	// Experimental.
	RenditionConfiguration RenditionConfiguration `field:"optional" json:"renditionConfiguration" yaml:"renditionConfiguration"`
	// A thumbnail configuration enables/disables the recording of thumbnails for a live session and controls the interval at which thumbnails are generated for the live session.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ivs-recordingconfiguration-thumbnailconfiguration.html
	//
	// Default: - no thumbnail configuration.
	//
	// Experimental.
	ThumbnailConfiguration ThumbnailConfiguration `field:"optional" json:"thumbnailConfiguration" yaml:"thumbnailConfiguration"`
}

Properties of the IVS Recording configuration.

Example:

var recordingBucket bucket

recordingConfiguration := ivs.NewRecordingConfiguration(this, jsii.String("RecordingConfiguration"), &RecordingConfigurationProps{
	Bucket: recordingBucket,

	// set rendition configuration
	RenditionConfiguration: ivs.RenditionConfiguration_Custom([]resolution{
		ivs.*resolution_HD,
		ivs.*resolution_SD,
	}),
})

Experimental.

type RecordingMode

type RecordingMode string

Thumbnail recording mode. Experimental.

const (
	// Use INTERVAL to enable the generation of thumbnails for recorded video at a time interval controlled by the TargetIntervalSeconds property.
	// Experimental.
	RecordingMode_INTERVAL RecordingMode = "INTERVAL"
	// Use DISABLED to disable the generation of thumbnails for recorded video.
	// Experimental.
	RecordingMode_DISABLED RecordingMode = "DISABLED"
)

type RenditionConfiguration

type RenditionConfiguration interface {
	// A list of which renditions are recorded for a stream.
	//
	// If you do not specify this property, no resolution is selected.
	// Experimental.
	Renditions() *[]Resolution
	// The set of renditions are recorded for a stream.
	// Experimental.
	RenditionSelection() RenditionSelection
}

Rendition configuration for IVS Recording configuration.

Example:

var recordingBucket bucket

recordingConfiguration := ivs.NewRecordingConfiguration(this, jsii.String("RecordingConfiguration"), &RecordingConfigurationProps{
	Bucket: recordingBucket,

	// set rendition configuration
	RenditionConfiguration: ivs.RenditionConfiguration_Custom([]resolution{
		ivs.*resolution_HD,
		ivs.*resolution_SD,
	}),
})

Experimental.

func RenditionConfiguration_All

func RenditionConfiguration_All() RenditionConfiguration

Record all available renditions. Experimental.

func RenditionConfiguration_Custom

func RenditionConfiguration_Custom(renditions *[]Resolution) RenditionConfiguration

Record a subset of video renditions. Experimental.

func RenditionConfiguration_None

func RenditionConfiguration_None() RenditionConfiguration

Does not record any video. Experimental.

type RenditionSelection

type RenditionSelection string

Rendition selection mode. Experimental.

const (
	// Record all available renditions.
	// Experimental.
	RenditionSelection_ALL RenditionSelection = "ALL"
	// Does not record any video.
	//
	// This option is useful if you just want to record thumbnails.
	// Experimental.
	RenditionSelection_NONE RenditionSelection = "NONE"
	// Select a subset of video renditions to record.
	// Experimental.
	RenditionSelection_CUSTOM RenditionSelection = "CUSTOM"
)

type Resolution

type Resolution string

Resolution for rendition.

Example:

var recordingBucket bucket

recordingConfiguration := ivs.NewRecordingConfiguration(this, jsii.String("RecordingConfiguration"), &RecordingConfigurationProps{
	Bucket: recordingBucket,

	// set rendition configuration
	RenditionConfiguration: ivs.RenditionConfiguration_Custom([]resolution{
		ivs.*resolution_HD,
		ivs.*resolution_SD,
	}),
})

Experimental.

const (
	// Full HD (1080p).
	// Experimental.
	Resolution_FULL_HD Resolution = "FULL_HD"
	// HD (720p).
	// Experimental.
	Resolution_HD Resolution = "HD"
	// SD (480p).
	// Experimental.
	Resolution_SD Resolution = "SD"
	// Lowest resolution.
	// Experimental.
	Resolution_LOWEST_RESOLUTION Resolution = "LOWEST_RESOLUTION"
)

type Storage

type Storage string

The format in which thumbnails are recorded for a stream.

Example:

var recordingBucket bucket

recordingConfiguration := ivs.NewRecordingConfiguration(this, jsii.String("RecordingConfiguration"), &RecordingConfigurationProps{
	Bucket: recordingBucket,

	// set thumbnail settings
	ThumbnailConfiguration: ivs.ThumbnailConfiguration_Interval(ivs.Resolution_HD, []storage{
		ivs.*storage_LATEST,
		ivs.*storage_SEQUENTIAL,
	}, awscdk.Duration_Seconds(jsii.Number(30))),
})

Experimental.

const (
	// SEQUENTIAL records all generated thumbnails in a serial manner, to the media/thumbnails directory.
	// Experimental.
	Storage_SEQUENTIAL Storage = "SEQUENTIAL"
	// LATEST saves the latest thumbnail in media/thumbnails/latest/thumb.jpg and overwrites it at the interval specified by thumbnailTargetInterval.
	// Experimental.
	Storage_LATEST Storage = "LATEST"
)

type StreamKey

type StreamKey interface {
	awscdk.Resource
	IStreamKey
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// The stream-key ARN.
	//
	// For example: arn:aws:ivs:us-west-2:123456789012:stream-key/g1H2I3j4k5L6.
	// Experimental.
	StreamKeyArn() *string
	// The stream-key value.
	//
	// For example: sk_us-west-2_abcdABCDefgh_567890abcdef.
	// Experimental.
	StreamKeyValue() *string
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

A new IVS Stream Key.

Example:

myStreamKey := myChannel.AddStreamKey(jsii.String("StreamKey"))

Experimental.

func NewStreamKey

func NewStreamKey(scope constructs.Construct, id *string, props *StreamKeyProps) StreamKey

Experimental.

type StreamKeyProps

type StreamKeyProps struct {
	// Channel ARN for the stream.
	// Experimental.
	Channel IChannel `field:"required" json:"channel" yaml:"channel"`
}

Properties for creating a new Stream Key.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import ivs_alpha "github.com/aws/aws-cdk-go/awscdkivsalpha"

var channel channel

streamKeyProps := &StreamKeyProps{
	Channel: channel,
}

Experimental.

type ThumbnailConfiguration

type ThumbnailConfiguration interface {
	// Thumbnail recording mode.
	//
	// If you do not specify this property, `ThumbnailRecordingMode.INTERVAL` is set.
	// Experimental.
	RecordingMode() RecordingMode
	// The desired resolution of recorded thumbnails for a stream.
	//
	// If you do not specify this property, same resolution as Input stream is used.
	// Experimental.
	Resolution() Resolution
	// The format in which thumbnails are recorded for a stream.
	//
	// If you do not specify this property, `ThumbnailStorage.SEQUENTIAL` is set.
	// Experimental.
	Storage() *[]Storage
	// The targeted thumbnail-generation interval.
	//
	// Must be between 1 and 60 seconds. If you do not specify this property, `Duration.seconds(60)` is set.
	// Experimental.
	TargetInterval() awscdk.Duration
}

Thumbnail configuration for IVS Recording configuration.

Example:

var recordingBucket bucket

recordingConfiguration := ivs.NewRecordingConfiguration(this, jsii.String("RecordingConfiguration"), &RecordingConfigurationProps{
	Bucket: recordingBucket,

	// set thumbnail settings
	ThumbnailConfiguration: ivs.ThumbnailConfiguration_Interval(ivs.Resolution_HD, []storage{
		ivs.*storage_LATEST,
		ivs.*storage_SEQUENTIAL,
	}, awscdk.Duration_Seconds(jsii.Number(30))),
})

Experimental.

func ThumbnailConfiguration_Disable

func ThumbnailConfiguration_Disable() ThumbnailConfiguration

Disable the generation of thumbnails for recorded video. Experimental.

func ThumbnailConfiguration_Interval

func ThumbnailConfiguration_Interval(resolution Resolution, storage *[]Storage, targetInterval awscdk.Duration) ThumbnailConfiguration

Enable the generation of thumbnails for recorded video at a time interval. Experimental.

Directories

Path Synopsis
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL