@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
181 lines • 7.28 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Channel = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS MediaLive Channel.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.medialive.Channel("example", {
* name: "example-channel",
* channelClass: "STANDARD",
* roleArn: exampleAwsIamRole.arn,
* inputSpecification: {
* codec: "AVC",
* inputResolution: "HD",
* maximumBitrate: "MAX_20_MBPS",
* },
* inputAttachments: [{
* inputAttachmentName: "example-input",
* inputId: exampleAwsMedialiveInput.id,
* }],
* destinations: [{
* id: "destination",
* settings: [
* {
* url: `s3://${main.id}/test1`,
* },
* {
* url: `s3://${main2.id}/test2`,
* },
* ],
* }],
* encoderSettings: {
* timecodeConfig: {
* source: "EMBEDDED",
* },
* audioDescriptions: [{
* audioSelectorName: "example audio selector",
* name: "audio-selector",
* }],
* videoDescriptions: [{
* name: "example-video",
* }],
* outputGroups: [{
* outputGroupSettings: {
* archiveGroupSettings: [{
* destination: {
* destinationRefId: "destination",
* },
* }],
* },
* outputs: [{
* outputName: "example-name",
* videoDescriptionName: "example-video",
* audioDescriptionNames: ["audio-selector"],
* outputSettings: {
* archiveOutputSettings: {
* nameModifier: "_1",
* extension: "m2ts",
* containerSettings: {
* m2tsSettings: {
* audioBufferModel: "ATSC",
* bufferModel: "MULTIPLEX",
* rateMode: "CBR",
* },
* },
* },
* },
* }],
* }],
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import MediaLive Channel using the `channel_id`. For example:
*
* ```sh
* $ pulumi import aws:medialive/channel:Channel example 1234567
* ```
*/
class Channel extends pulumi.CustomResource {
/**
* Get an existing Channel resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new Channel(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Channel. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Channel.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["cdiInputSpecification"] = state?.cdiInputSpecification;
resourceInputs["channelClass"] = state?.channelClass;
resourceInputs["channelId"] = state?.channelId;
resourceInputs["destinations"] = state?.destinations;
resourceInputs["encoderSettings"] = state?.encoderSettings;
resourceInputs["inputAttachments"] = state?.inputAttachments;
resourceInputs["inputSpecification"] = state?.inputSpecification;
resourceInputs["logLevel"] = state?.logLevel;
resourceInputs["maintenance"] = state?.maintenance;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
resourceInputs["roleArn"] = state?.roleArn;
resourceInputs["startChannel"] = state?.startChannel;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["vpc"] = state?.vpc;
}
else {
const args = argsOrState;
if (args?.channelClass === undefined && !opts.urn) {
throw new Error("Missing required property 'channelClass'");
}
if (args?.destinations === undefined && !opts.urn) {
throw new Error("Missing required property 'destinations'");
}
if (args?.encoderSettings === undefined && !opts.urn) {
throw new Error("Missing required property 'encoderSettings'");
}
if (args?.inputAttachments === undefined && !opts.urn) {
throw new Error("Missing required property 'inputAttachments'");
}
if (args?.inputSpecification === undefined && !opts.urn) {
throw new Error("Missing required property 'inputSpecification'");
}
resourceInputs["cdiInputSpecification"] = args?.cdiInputSpecification;
resourceInputs["channelClass"] = args?.channelClass;
resourceInputs["destinations"] = args?.destinations;
resourceInputs["encoderSettings"] = args?.encoderSettings;
resourceInputs["inputAttachments"] = args?.inputAttachments;
resourceInputs["inputSpecification"] = args?.inputSpecification;
resourceInputs["logLevel"] = args?.logLevel;
resourceInputs["maintenance"] = args?.maintenance;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["roleArn"] = args?.roleArn;
resourceInputs["startChannel"] = args?.startChannel;
resourceInputs["tags"] = args?.tags;
resourceInputs["vpc"] = args?.vpc;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["channelId"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Channel.__pulumiType, name, resourceInputs, opts);
}
}
exports.Channel = Channel;
/** @internal */
Channel.__pulumiType = 'aws:medialive/channel:Channel';
//# sourceMappingURL=channel.js.map