UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

100 lines 4.31 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.Thesaurus = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages CSS thesaurus resource within HuaweiCloud * * > Only one thesaurus resource can be created for the specified cluster. * * ## Example Usage * ### Create a thesaurus * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const clusterId = config.requireObject("clusterId"); * const bucketName = config.requireObject("bucketName"); * const bucketObjKey = config.requireObject("bucketObjKey"); * const test = new huaweicloud.css.Thesaurus("test", { * clusterId: clusterId, * bucketName: bucketName, * mainObject: bucketObjKey, * }); * ``` * * ## Import * * CSS thesaurus can be imported by `id`, e.g. bash * * ```sh * $ pulumi import huaweicloud:Css/thesaurus:Thesaurus test <id> * ``` */ class Thesaurus extends pulumi.CustomResource { /** * Get an existing Thesaurus 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 Thesaurus(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Thesaurus. 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'] === Thesaurus.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["bucketName"] = state ? state.bucketName : undefined; resourceInputs["clusterId"] = state ? state.clusterId : undefined; resourceInputs["mainObject"] = state ? state.mainObject : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["stopObject"] = state ? state.stopObject : undefined; resourceInputs["synonymObject"] = state ? state.synonymObject : undefined; resourceInputs["updateTime"] = state ? state.updateTime : undefined; } else { const args = argsOrState; if ((!args || args.bucketName === undefined) && !opts.urn) { throw new Error("Missing required property 'bucketName'"); } if ((!args || args.clusterId === undefined) && !opts.urn) { throw new Error("Missing required property 'clusterId'"); } resourceInputs["bucketName"] = args ? args.bucketName : undefined; resourceInputs["clusterId"] = args ? args.clusterId : undefined; resourceInputs["mainObject"] = args ? args.mainObject : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["stopObject"] = args ? args.stopObject : undefined; resourceInputs["synonymObject"] = args ? args.synonymObject : undefined; resourceInputs["status"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Thesaurus.__pulumiType, name, resourceInputs, opts); } } exports.Thesaurus = Thesaurus; /** @internal */ Thesaurus.__pulumiType = 'huaweicloud:Css/thesaurus:Thesaurus'; //# sourceMappingURL=thesaurus.js.map