UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

101 lines 5.37 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.OnCallShift = 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:onCall/onCallShift:OnCallShift name "{{ id }}" * ``` */ class OnCallShift extends pulumi.CustomResource { /** * Get an existing OnCallShift 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 OnCallShift(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of OnCallShift. 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'] === OnCallShift.__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["until"] = state ? state.until : 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["until"] = args ? args.until : undefined; resourceInputs["users"] = args ? args.users : undefined; resourceInputs["weekStart"] = args ? args.weekStart : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const aliasOpts = { aliases: [{ type: "grafana:index/oncallOnCallShift:OncallOnCallShift" }] }; opts = pulumi.mergeOptions(opts, aliasOpts); super(OnCallShift.__pulumiType, name, resourceInputs, opts); } } exports.OnCallShift = OnCallShift; /** @internal */ OnCallShift.__pulumiType = 'grafana:onCall/onCallShift:OnCallShift'; //# sourceMappingURL=onCallShift.js.map