UNPKG

@pulumi/sumologic

Version:

A Pulumi package for creating and managing sumologic cloud resources.

73 lines 2.91 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.Field = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a [Sumologic Field](https://help.sumologic.com/Manage/Fields). * * ## Import * * Fields can be imported using the field id, e.g.: * * hcl * * ```sh * $ pulumi import sumologic:index/field:Field field 000000000ABC1234 * ``` * * [1]: https://help.sumologic.com/Manage/Fields */ class Field extends pulumi.CustomResource { /** * Get an existing Field 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 Field(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Field. 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'] === Field.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["dataType"] = state ? state.dataType : undefined; resourceInputs["fieldId"] = state ? state.fieldId : undefined; resourceInputs["fieldName"] = state ? state.fieldName : undefined; resourceInputs["state"] = state ? state.state : undefined; } else { const args = argsOrState; if ((!args || args.fieldName === undefined) && !opts.urn) { throw new Error("Missing required property 'fieldName'"); } resourceInputs["dataType"] = args ? args.dataType : undefined; resourceInputs["fieldName"] = args ? args.fieldName : undefined; resourceInputs["state"] = args ? args.state : undefined; resourceInputs["fieldId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Field.__pulumiType, name, resourceInputs, opts); } } exports.Field = Field; /** @internal */ Field.__pulumiType = 'sumologic:index/field:Field'; //# sourceMappingURL=field.js.map