- 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 channel. For information about MediaTailor channels, see Working with channels in the MediaTailor User Guide.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { MediaTailorClient, CreateChannelCommand } from "@aws-sdk/client-mediatailor"; // ES Modules import
// const { MediaTailorClient, CreateChannelCommand } = require("@aws-sdk/client-mediatailor"); // CommonJS import
const client = new MediaTailorClient(config);
const input = { // CreateChannelRequest
ChannelName: "STRING_VALUE", // required
FillerSlate: { // SlateSource
SourceLocationName: "STRING_VALUE",
VodSourceName: "STRING_VALUE",
},
Outputs: [ // RequestOutputs // required
{ // RequestOutputItem
DashPlaylistSettings: { // DashPlaylistSettings
ManifestWindowSeconds: Number("int"),
MinBufferTimeSeconds: Number("int"),
MinUpdatePeriodSeconds: Number("int"),
SuggestedPresentationDelaySeconds: Number("int"),
},
HlsPlaylistSettings: { // HlsPlaylistSettings
ManifestWindowSeconds: Number("int"),
AdMarkupType: [ // adMarkupTypes
"DATERANGE" || "SCTE35_ENHANCED",
],
},
ManifestName: "STRING_VALUE", // required
SourceGroup: "STRING_VALUE", // required
},
],
PlaybackMode: "LOOP" || "LINEAR", // required
Tags: { // __mapOf__string
"<keys>": "STRING_VALUE",
},
Tier: "BASIC" || "STANDARD",
TimeShiftConfiguration: { // TimeShiftConfiguration
MaxTimeDelaySeconds: Number("int"), // required
},
Audiences: [ // Audiences
"STRING_VALUE",
],
};
const command = new CreateChannelCommand(input);
const response = await client.send(command);
// { // CreateChannelResponse
// Arn: "STRING_VALUE",
// ChannelName: "STRING_VALUE",
// ChannelState: "RUNNING" || "STOPPED",
// CreationTime: new Date("TIMESTAMP"),
// FillerSlate: { // SlateSource
// SourceLocationName: "STRING_VALUE",
// VodSourceName: "STRING_VALUE",
// },
// LastModifiedTime: new Date("TIMESTAMP"),
// Outputs: [ // ResponseOutputs
// { // ResponseOutputItem
// DashPlaylistSettings: { // DashPlaylistSettings
// ManifestWindowSeconds: Number("int"),
// MinBufferTimeSeconds: Number("int"),
// MinUpdatePeriodSeconds: Number("int"),
// SuggestedPresentationDelaySeconds: Number("int"),
// },
// HlsPlaylistSettings: { // HlsPlaylistSettings
// ManifestWindowSeconds: Number("int"),
// AdMarkupType: [ // adMarkupTypes
// "DATERANGE" || "SCTE35_ENHANCED",
// ],
// },
// ManifestName: "STRING_VALUE", // required
// PlaybackUrl: "STRING_VALUE", // required
// SourceGroup: "STRING_VALUE", // required
// },
// ],
// PlaybackMode: "STRING_VALUE",
// Tags: { // __mapOf__string
// "<keys>": "STRING_VALUE",
// },
// Tier: "STRING_VALUE",
// TimeShiftConfiguration: { // TimeShiftConfiguration
// MaxTimeDelaySeconds: Number("int"), // required
// },
// Audiences: [ // Audiences
// "STRING_VALUE",
// ],
// };
CreateChannelCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ChannelName Required | string | undefined | The name of the channel. |
Outputs Required | RequestOutputItem[] | undefined | The channel's output properties. |
PlaybackMode Required | PlaybackMode | undefined | The type of playback mode to use for this channel. |
Audiences | string[] | undefined | The list of audiences defined in channel. |
FillerSlate | SlateSource | undefined | The slate used to fill gaps between programs in the schedule. You must configure filler slate if your channel uses the |
Tags | Record<string, string> | undefined | The tags to assign to the channel. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources . |
Tier | Tier | undefined | The tier of the channel. |
TimeShiftConfiguration | TimeShiftConfiguration | undefined | The time-shifted viewing configuration you want to associate to the channel. |
CreateChannelCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Arn | string | undefined | The Amazon Resource Name (ARN) to assign to the channel. |
Audiences | string[] | undefined | The list of audiences defined in channel. |
ChannelName | string | undefined | The name to assign to the channel. |
ChannelState | ChannelState | undefined | Indicates whether the channel is in a running state or not. |
CreationTime | Date | undefined | The timestamp of when the channel was created. |
FillerSlate | SlateSource | undefined | Contains information about the slate used to fill gaps between programs in the schedule. |
LastModifiedTime | Date | undefined | The timestamp of when the channel was last modified. |
Outputs | ResponseOutputItem[] | undefined | The output properties to assign to the channel. |
PlaybackMode | string | undefined | The playback mode to assign to the channel. |
Tags | Record<string, string> | undefined | The tags to assign to the channel. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources . |
Tier | string | undefined | The tier of the channel. |
TimeShiftConfiguration | TimeShiftConfiguration | undefined | The time-shifted viewing configuration assigned to the channel. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
MediaTailorServiceException | Base exception class for all service exceptions from MediaTailor service. |