CreateChannelCommand

Creates a new channel and an associated stream key to start streaming.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { IvsClient, CreateChannelCommand } from "@aws-sdk/client-ivs"; // ES Modules import
// const { IvsClient, CreateChannelCommand } = require("@aws-sdk/client-ivs"); // CommonJS import
const client = new IvsClient(config);
const input = { // CreateChannelRequest
  name: "STRING_VALUE",
  latencyMode: "STRING_VALUE",
  type: "BASIC" || "STANDARD" || "ADVANCED_SD" || "ADVANCED_HD",
  authorized: true || false,
  recordingConfigurationArn: "STRING_VALUE",
  tags: { // Tags
    "<keys>": "STRING_VALUE",
  },
  insecureIngest: true || false,
  preset: "HIGHER_BANDWIDTH_DELIVERY" || "CONSTRAINED_BANDWIDTH_DELIVERY",
  playbackRestrictionPolicyArn: "STRING_VALUE",
  multitrackInputConfiguration: { // MultitrackInputConfiguration
    enabled: true || false,
    policy: "ALLOW" || "REQUIRE",
    maximumResolution: "SD" || "HD" || "FULL_HD",
  },
  containerFormat: "STRING_VALUE",
};
const command = new CreateChannelCommand(input);
const response = await client.send(command);
// { // CreateChannelResponse
//   channel: { // Channel
//     arn: "STRING_VALUE",
//     name: "STRING_VALUE",
//     latencyMode: "STRING_VALUE",
//     type: "BASIC" || "STANDARD" || "ADVANCED_SD" || "ADVANCED_HD",
//     recordingConfigurationArn: "STRING_VALUE",
//     ingestEndpoint: "STRING_VALUE",
//     playbackUrl: "STRING_VALUE",
//     authorized: true || false,
//     tags: { // Tags
//       "<keys>": "STRING_VALUE",
//     },
//     insecureIngest: true || false,
//     preset: "HIGHER_BANDWIDTH_DELIVERY" || "CONSTRAINED_BANDWIDTH_DELIVERY",
//     srt: { // Srt
//       endpoint: "STRING_VALUE",
//       passphrase: "STRING_VALUE",
//     },
//     playbackRestrictionPolicyArn: "STRING_VALUE",
//     multitrackInputConfiguration: { // MultitrackInputConfiguration
//       enabled: true || false,
//       policy: "ALLOW" || "REQUIRE",
//       maximumResolution: "SD" || "HD" || "FULL_HD",
//     },
//     containerFormat: "STRING_VALUE",
//   },
//   streamKey: { // StreamKey
//     arn: "STRING_VALUE",
//     value: "STRING_VALUE",
//     channelArn: "STRING_VALUE",
//     tags: {
//       "<keys>": "STRING_VALUE",
//     },
//   },
// };

CreateChannelCommand Input

See CreateChannelCommandInput for more details

Parameter
Type
Description
authorized
boolean | undefined

Whether the channel is private (enabled for playback authorization). Default: false.

containerFormat
ContainerFormat | undefined

Indicates which content-packaging format is used (MPEG-TS or fMP4). If multitrackInputConfiguration is specified and enabled is true, then containerFormat is required and must be set to FRAGMENTED_MP4. Otherwise, containerFormat may be set to TS or FRAGMENTED_MP4. Default: TS.

insecureIngest
boolean | undefined

Whether the channel allows insecure RTMP and SRT ingest. Default: false.

latencyMode
ChannelLatencyMode | undefined

Channel latency mode. Use NORMAL to broadcast and deliver live video up to Full HD. Use LOW for near-real-time interaction with viewers. Default: LOW.

multitrackInputConfiguration
MultitrackInputConfiguration | undefined

Object specifying multitrack input configuration. Default: no multitrack input configuration is specified.

name
string | undefined

Channel name.

playbackRestrictionPolicyArn
string | undefined

Playback-restriction-policy ARN. A valid ARN value here both specifies the ARN and enables playback restriction. Default: "" (empty string, no playback restriction policy is applied).

preset
TranscodePreset | undefined

Optional transcode preset for the channel. This is selectable only for ADVANCED_HD and ADVANCED_SD channel types. For those channel types, the default preset is HIGHER_BANDWIDTH_DELIVERY. For other channel types (BASIC and STANDARD), preset is the empty string ("").

recordingConfigurationArn
string | undefined

Recording-configuration ARN. A valid ARN value here both specifies the ARN and enables recording. Default: "" (empty string, recording is disabled).

tags
Record<string, string> | undefined

Array of 1-50 maps, each of the form string:string (key:value). See Best practices and strategies  in Tagging Amazon Web Services Resources and Tag Editor for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no service-specific constraints beyond what is documented there.

type
ChannelType | undefined

Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable input resolution or bitrate, the stream probably will disconnect immediately. Default: STANDARD. For details, see Channel Types .

CreateChannelCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
channel
Channel | undefined
<p/>
streamKey
StreamKey | undefined
<p/>

Throws

Name
Fault
Details
AccessDeniedException
client
<p/>
PendingVerification
client
<p/>
ResourceNotFoundException
client
<p/>
ServiceQuotaExceededException
client
<p/>
ValidationException
client
<p/>
IvsServiceException
Base exception class for all service exceptions from Ivs service.