@pulumi/pagerduty
Version:
A Pulumi package for creating and managing pagerduty cloud resources.
74 lines • 3.83 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.EventOrchestrationGlobalCacheVariable = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* A [Cache Variable](https://support.pagerduty.com/docs/event-orchestration-variables) can be created on a Global Event Orchestration, in order to temporarily store event data to be referenced later within the Global Event Orchestration
*
* ## Import
*
* Cache Variables can be imported using colon-separated IDs, which is the combination of the Global Event Orchestration ID followed by the Cache Variable ID, e.g.
*
* ```sh
* $ pulumi import pagerduty:index/eventOrchestrationGlobalCacheVariable:EventOrchestrationGlobalCacheVariable cache_variable 5e7110bf-0ee7-429e-9724-34ed1fe15ac3:138ed254-3444-44ad-8cc7-701d69def439
* ```
*/
class EventOrchestrationGlobalCacheVariable extends pulumi.CustomResource {
/**
* Get an existing EventOrchestrationGlobalCacheVariable 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 EventOrchestrationGlobalCacheVariable(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of EventOrchestrationGlobalCacheVariable. 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'] === EventOrchestrationGlobalCacheVariable.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["conditions"] = state?.conditions;
resourceInputs["configuration"] = state?.configuration;
resourceInputs["disabled"] = state?.disabled;
resourceInputs["eventOrchestration"] = state?.eventOrchestration;
resourceInputs["name"] = state?.name;
}
else {
const args = argsOrState;
if (args?.configuration === undefined && !opts.urn) {
throw new Error("Missing required property 'configuration'");
}
if (args?.eventOrchestration === undefined && !opts.urn) {
throw new Error("Missing required property 'eventOrchestration'");
}
resourceInputs["conditions"] = args?.conditions;
resourceInputs["configuration"] = args?.configuration;
resourceInputs["disabled"] = args?.disabled;
resourceInputs["eventOrchestration"] = args?.eventOrchestration;
resourceInputs["name"] = args?.name;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(EventOrchestrationGlobalCacheVariable.__pulumiType, name, resourceInputs, opts);
}
}
exports.EventOrchestrationGlobalCacheVariable = EventOrchestrationGlobalCacheVariable;
/** @internal */
EventOrchestrationGlobalCacheVariable.__pulumiType = 'pagerduty:index/eventOrchestrationGlobalCacheVariable:EventOrchestrationGlobalCacheVariable';
//# sourceMappingURL=eventOrchestrationGlobalCacheVariable.js.map