@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
181 lines • 7.93 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, Object.assign(Object.assign({}, 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 ? state.arn : undefined;
resourceInputs["cdiInputSpecification"] = state ? state.cdiInputSpecification : undefined;
resourceInputs["channelClass"] = state ? state.channelClass : undefined;
resourceInputs["channelId"] = state ? state.channelId : undefined;
resourceInputs["destinations"] = state ? state.destinations : undefined;
resourceInputs["encoderSettings"] = state ? state.encoderSettings : undefined;
resourceInputs["inputAttachments"] = state ? state.inputAttachments : undefined;
resourceInputs["inputSpecification"] = state ? state.inputSpecification : undefined;
resourceInputs["logLevel"] = state ? state.logLevel : undefined;
resourceInputs["maintenance"] = state ? state.maintenance : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["roleArn"] = state ? state.roleArn : undefined;
resourceInputs["startChannel"] = state ? state.startChannel : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
resourceInputs["vpc"] = state ? state.vpc : undefined;
}
else {
const args = argsOrState;
if ((!args || args.channelClass === undefined) && !opts.urn) {
throw new Error("Missing required property 'channelClass'");
}
if ((!args || args.destinations === undefined) && !opts.urn) {
throw new Error("Missing required property 'destinations'");
}
if ((!args || args.encoderSettings === undefined) && !opts.urn) {
throw new Error("Missing required property 'encoderSettings'");
}
if ((!args || args.inputAttachments === undefined) && !opts.urn) {
throw new Error("Missing required property 'inputAttachments'");
}
if ((!args || args.inputSpecification === undefined) && !opts.urn) {
throw new Error("Missing required property 'inputSpecification'");
}
resourceInputs["cdiInputSpecification"] = args ? args.cdiInputSpecification : undefined;
resourceInputs["channelClass"] = args ? args.channelClass : undefined;
resourceInputs["destinations"] = args ? args.destinations : undefined;
resourceInputs["encoderSettings"] = args ? args.encoderSettings : undefined;
resourceInputs["inputAttachments"] = args ? args.inputAttachments : undefined;
resourceInputs["inputSpecification"] = args ? args.inputSpecification : undefined;
resourceInputs["logLevel"] = args ? args.logLevel : undefined;
resourceInputs["maintenance"] = args ? args.maintenance : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["roleArn"] = args ? args.roleArn : undefined;
resourceInputs["startChannel"] = args ? args.startChannel : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["vpc"] = args ? args.vpc : undefined;
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