UNPKG

@pulumi/sumologic

Version:

A Pulumi package for creating and managing sumologic cloud resources.

98 lines 3.87 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.CseTagSchema = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a Sumologic CSE Tag Schema. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sumologic from "@pulumi/sumologic"; * * const tagSchema = new sumologic.CseTagSchema("tag_schema", { * key: "location", * label: "label", * contentTypes: ["entity"], * freeForm: true, * valueOptions: [{ * value: "option value", * label: "option label", * link: "http://foo.bar.com", * }], * }); * ``` * * ## Import * * Tag Schema can be imported using the field id, e.g.: * * hcl * * ```sh * $ pulumi import sumologic:index/cseTagSchema:CseTagSchema tag_schema id * ``` */ class CseTagSchema extends pulumi.CustomResource { /** * Get an existing CseTagSchema 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 CseTagSchema(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of CseTagSchema. 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'] === CseTagSchema.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["contentTypes"] = state ? state.contentTypes : undefined; resourceInputs["freeForm"] = state ? state.freeForm : undefined; resourceInputs["key"] = state ? state.key : undefined; resourceInputs["label"] = state ? state.label : undefined; resourceInputs["valueOptions"] = state ? state.valueOptions : undefined; } else { const args = argsOrState; if ((!args || args.freeForm === undefined) && !opts.urn) { throw new Error("Missing required property 'freeForm'"); } if ((!args || args.key === undefined) && !opts.urn) { throw new Error("Missing required property 'key'"); } if ((!args || args.label === undefined) && !opts.urn) { throw new Error("Missing required property 'label'"); } resourceInputs["contentTypes"] = args ? args.contentTypes : undefined; resourceInputs["freeForm"] = args ? args.freeForm : undefined; resourceInputs["key"] = args ? args.key : undefined; resourceInputs["label"] = args ? args.label : undefined; resourceInputs["valueOptions"] = args ? args.valueOptions : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(CseTagSchema.__pulumiType, name, resourceInputs, opts); } } exports.CseTagSchema = CseTagSchema; /** @internal */ CseTagSchema.__pulumiType = 'sumologic:index/cseTagSchema:CseTagSchema'; //# sourceMappingURL=cseTagSchema.js.map