UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

115 lines 4.93 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Recording = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a recording template within HuaweiCloud Live. * * ## Example Usage * ### Create a recording template for an ingest domain name * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const ingestDomainName = config.requireObject("ingestDomainName"); * const bucketRegion = config.requireObject("bucketRegion"); * const bucketName = config.requireObject("bucketName"); * const ingestDomain = new huaweicloud.live.Domain("ingestDomain", {type: "push"}); * const recording = new huaweicloud.live.Recording("recording", { * domainName: ingestDomain.name, * appName: "live", * streamName: "stream_name", * type: "CONTINUOUS_RECORD", * obs: { * region: bucketRegion, * bucket: bucketName, * }, * hls: { * recordingLength: 15, * }, * }); * ``` * * ## Import * * Recording templates can be imported using the `id`, e.g. bash * * ```sh * $ pulumi import huaweicloud:Live/recording:Recording test <id> * ``` */ class Recording extends pulumi.CustomResource { /** * Get an existing Recording 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 Recording(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Recording. 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'] === Recording.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["appName"] = state ? state.appName : undefined; resourceInputs["domainName"] = state ? state.domainName : undefined; resourceInputs["flv"] = state ? state.flv : undefined; resourceInputs["hls"] = state ? state.hls : undefined; resourceInputs["mp4"] = state ? state.mp4 : undefined; resourceInputs["obs"] = state ? state.obs : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["streamName"] = state ? state.streamName : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; if ((!args || args.appName === undefined) && !opts.urn) { throw new Error("Missing required property 'appName'"); } if ((!args || args.domainName === undefined) && !opts.urn) { throw new Error("Missing required property 'domainName'"); } if ((!args || args.obs === undefined) && !opts.urn) { throw new Error("Missing required property 'obs'"); } if ((!args || args.streamName === undefined) && !opts.urn) { throw new Error("Missing required property 'streamName'"); } resourceInputs["appName"] = args ? args.appName : undefined; resourceInputs["domainName"] = args ? args.domainName : undefined; resourceInputs["flv"] = args ? args.flv : undefined; resourceInputs["hls"] = args ? args.hls : undefined; resourceInputs["mp4"] = args ? args.mp4 : undefined; resourceInputs["obs"] = args ? args.obs : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["streamName"] = args ? args.streamName : undefined; resourceInputs["type"] = args ? args.type : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Recording.__pulumiType, name, resourceInputs, opts); } } exports.Recording = Recording; /** @internal */ Recording.__pulumiType = 'huaweicloud:Live/recording:Recording'; //# sourceMappingURL=recording.js.map