@lbrlabs/pulumi-grafana
Version:
A Pulumi package for creating and managing grafana.
97 lines • 5.18 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.OncallOnCallShift = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/on_call_shifts/)
*
* ## Import
*
* ```sh
* $ pulumi import grafana:index/oncallOnCallShift:OncallOnCallShift on_call_shift_name {{on_call_shift_id}}
* ```
*/
class OncallOnCallShift extends pulumi.CustomResource {
/**
* Get an existing OncallOnCallShift 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 OncallOnCallShift(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of OncallOnCallShift. 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'] === OncallOnCallShift.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["byDays"] = state ? state.byDays : undefined;
resourceInputs["byMonthdays"] = state ? state.byMonthdays : undefined;
resourceInputs["byMonths"] = state ? state.byMonths : undefined;
resourceInputs["duration"] = state ? state.duration : undefined;
resourceInputs["frequency"] = state ? state.frequency : undefined;
resourceInputs["interval"] = state ? state.interval : undefined;
resourceInputs["level"] = state ? state.level : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["rollingUsers"] = state ? state.rollingUsers : undefined;
resourceInputs["start"] = state ? state.start : undefined;
resourceInputs["startRotationFromUserIndex"] = state ? state.startRotationFromUserIndex : undefined;
resourceInputs["teamId"] = state ? state.teamId : undefined;
resourceInputs["timeZone"] = state ? state.timeZone : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["users"] = state ? state.users : undefined;
resourceInputs["weekStart"] = state ? state.weekStart : undefined;
}
else {
const args = argsOrState;
if ((!args || args.duration === undefined) && !opts.urn) {
throw new Error("Missing required property 'duration'");
}
if ((!args || args.start === undefined) && !opts.urn) {
throw new Error("Missing required property 'start'");
}
if ((!args || args.type === undefined) && !opts.urn) {
throw new Error("Missing required property 'type'");
}
resourceInputs["byDays"] = args ? args.byDays : undefined;
resourceInputs["byMonthdays"] = args ? args.byMonthdays : undefined;
resourceInputs["byMonths"] = args ? args.byMonths : undefined;
resourceInputs["duration"] = args ? args.duration : undefined;
resourceInputs["frequency"] = args ? args.frequency : undefined;
resourceInputs["interval"] = args ? args.interval : undefined;
resourceInputs["level"] = args ? args.level : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["rollingUsers"] = args ? args.rollingUsers : undefined;
resourceInputs["start"] = args ? args.start : undefined;
resourceInputs["startRotationFromUserIndex"] = args ? args.startRotationFromUserIndex : undefined;
resourceInputs["teamId"] = args ? args.teamId : undefined;
resourceInputs["timeZone"] = args ? args.timeZone : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["users"] = args ? args.users : undefined;
resourceInputs["weekStart"] = args ? args.weekStart : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(OncallOnCallShift.__pulumiType, name, resourceInputs, opts);
}
}
exports.OncallOnCallShift = OncallOnCallShift;
/** @internal */
OncallOnCallShift.__pulumiType = 'grafana:index/oncallOnCallShift:OncallOnCallShift';
//# sourceMappingURL=oncallOnCallShift.js.map