- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
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
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
authorized | boolean | undefined | Whether the channel is private (enabled for playback authorization). Default: |
containerFormat | ContainerFormat | undefined | Indicates which content-packaging format is used (MPEG-TS or fMP4). If |
insecureIngest | boolean | undefined | Whether the channel allows insecure RTMP and SRT ingest. Default: |
latencyMode | ChannelLatencyMode | undefined | Channel latency mode. Use |
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 |
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 |
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: |
CreateChannelCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
channel | Channel | undefined | <p/> |
streamKey | StreamKey | undefined | <p/> |
Throws
Name | Fault | Details |
---|
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. |