@pulumi/pagerduty
Version:
A Pulumi package for creating and managing pagerduty cloud resources.
99 lines • 4.07 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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSchedulev2Output = exports.getSchedulev2 = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("./utilities"));
/**
* Use this data source to look up a specific [v3 schedule](https://developer.pagerduty.com/api-reference/e792b51909787-create-a-schedule) by name so you can reference its ID in other resources such as escalation policies.
*
* > **Note:** This data source requires the `flexible-schedules-early-access` early access flag on your PagerDuty account. The required `X-Early-Access` header is sent automatically by the provider.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pagerduty from "@pulumi/pagerduty";
*
* const oncall = pagerduty.getSchedulev2({
* name: "Engineering On-Call",
* });
* const example = new pagerduty.EscalationPolicy("example", {
* name: "Engineering Escalation Policy",
* numLoops: 2,
* rules: [{
* escalationDelayInMinutes: 10,
* targets: [{
* type: "schedule_reference",
* id: oncall.then(oncall => oncall.id),
* }],
* }],
* });
* ```
*/
function getSchedulev2(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("pagerduty:index/getSchedulev2:getSchedulev2", {
"name": args.name,
}, opts);
}
exports.getSchedulev2 = getSchedulev2;
/**
* Use this data source to look up a specific [v3 schedule](https://developer.pagerduty.com/api-reference/e792b51909787-create-a-schedule) by name so you can reference its ID in other resources such as escalation policies.
*
* > **Note:** This data source requires the `flexible-schedules-early-access` early access flag on your PagerDuty account. The required `X-Early-Access` header is sent automatically by the provider.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pagerduty from "@pulumi/pagerduty";
*
* const oncall = pagerduty.getSchedulev2({
* name: "Engineering On-Call",
* });
* const example = new pagerduty.EscalationPolicy("example", {
* name: "Engineering Escalation Policy",
* numLoops: 2,
* rules: [{
* escalationDelayInMinutes: 10,
* targets: [{
* type: "schedule_reference",
* id: oncall.then(oncall => oncall.id),
* }],
* }],
* });
* ```
*/
function getSchedulev2Output(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("pagerduty:index/getSchedulev2:getSchedulev2", {
"name": args.name,
}, opts);
}
exports.getSchedulev2Output = getSchedulev2Output;
//# sourceMappingURL=getSchedulev2.js.map