UNPKG

@pulumi/pagerduty

Version:

A Pulumi package for creating and managing pagerduty cloud resources.

106 lines 3.97 kB
"use strict"; // *** 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.getExtensionSchemaOutput = exports.getExtensionSchema = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Use this data source to get information about a specific [extension](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODEzMA-list-extension-schemas) vendor that you can use for a service (e.g: Slack, Generic Webhook, ServiceNow). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const webhook = pagerduty.getExtensionSchema({ * name: "Generic V2 Webhook", * }); * const example = new pagerduty.User("example", { * name: "Howard James", * email: "howard.james@example.domain", * teams: [examplePagerdutyTeam.id], * }); * const foo = new pagerduty.EscalationPolicy("foo", { * name: "Engineering Escalation Policy", * numLoops: 2, * rules: [{ * escalationDelayInMinutes: 10, * targets: [{ * type: "user", * id: example.id, * }], * }], * }); * const exampleService = new pagerduty.Service("example", { * name: "My Web App", * autoResolveTimeout: "14400", * acknowledgementTimeout: "600", * escalationPolicy: examplePagerdutyEscalationPolicy.id, * }); * const slack = new pagerduty.Extension("slack", { * name: "My Web App Extension", * endpointUrl: "https://generic_webhook_url/XXXXXX/BBBBBB", * extensionSchema: webhook.then(webhook => webhook.id), * extensionObjects: [exampleService.id], * }); * ``` */ function getExtensionSchema(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("pagerduty:index/getExtensionSchema:getExtensionSchema", { "name": args.name, }, opts); } exports.getExtensionSchema = getExtensionSchema; /** * Use this data source to get information about a specific [extension](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODEzMA-list-extension-schemas) vendor that you can use for a service (e.g: Slack, Generic Webhook, ServiceNow). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const webhook = pagerduty.getExtensionSchema({ * name: "Generic V2 Webhook", * }); * const example = new pagerduty.User("example", { * name: "Howard James", * email: "howard.james@example.domain", * teams: [examplePagerdutyTeam.id], * }); * const foo = new pagerduty.EscalationPolicy("foo", { * name: "Engineering Escalation Policy", * numLoops: 2, * rules: [{ * escalationDelayInMinutes: 10, * targets: [{ * type: "user", * id: example.id, * }], * }], * }); * const exampleService = new pagerduty.Service("example", { * name: "My Web App", * autoResolveTimeout: "14400", * acknowledgementTimeout: "600", * escalationPolicy: examplePagerdutyEscalationPolicy.id, * }); * const slack = new pagerduty.Extension("slack", { * name: "My Web App Extension", * endpointUrl: "https://generic_webhook_url/XXXXXX/BBBBBB", * extensionSchema: webhook.then(webhook => webhook.id), * extensionObjects: [exampleService.id], * }); * ``` */ function getExtensionSchemaOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("pagerduty:index/getExtensionSchema:getExtensionSchema", { "name": args.name, }, opts); } exports.getExtensionSchemaOutput = getExtensionSchemaOutput; //# sourceMappingURL=getExtensionSchema.js.map