@pulumi/sumologic
Version:
A Pulumi package for creating and managing sumologic cloud resources.
78 lines • 2.99 kB
JavaScript
;
// *** 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.App = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Provides a Sumologic_App.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as sumologic from "@pulumi/sumologic";
*
* const exampleApp = new sumologic.App("example_app", {
* uuid: "ceb7fac5-1127-4a04-a5b8-2e49190be3d5",
* version: "1.0.1",
* parameters: {
* k1: "v1",
* k2: "v2",
* },
* });
* ```
*/
class App extends pulumi.CustomResource {
/**
* Get an existing App 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 App(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of App. 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'] === App.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["parameters"] = state ? state.parameters : undefined;
resourceInputs["uuid"] = state ? state.uuid : undefined;
resourceInputs["version"] = state ? state.version : undefined;
}
else {
const args = argsOrState;
if ((!args || args.uuid === undefined) && !opts.urn) {
throw new Error("Missing required property 'uuid'");
}
if ((!args || args.version === undefined) && !opts.urn) {
throw new Error("Missing required property 'version'");
}
resourceInputs["parameters"] = args ? args.parameters : undefined;
resourceInputs["uuid"] = args ? args.uuid : undefined;
resourceInputs["version"] = args ? args.version : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(App.__pulumiType, name, resourceInputs, opts);
}
}
exports.App = App;
/** @internal */
App.__pulumiType = 'sumologic:index/app:App';
//# sourceMappingURL=app.js.map