UNPKG

@pulumi/pagerduty

Version:

A Pulumi package for creating and managing pagerduty cloud resources.

68 lines 2.75 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.getIncidentWorkflowOutput = exports.getIncidentWorkflow = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Use this data source to get information about a specific [Incident Workflow](https://support.pagerduty.com/docs/incident-workflows) so that you can create a trigger for it. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const myWorkflow = pagerduty.getIncidentWorkflow({ * name: "Some Workflow Name", * }); * const firstService = pagerduty.getService({ * name: "My First Service", * }); * const automaticTrigger = new pagerduty.IncidentWorkflowTrigger("automatic_trigger", { * type: "conditional", * workflow: myWorkflow.then(myWorkflow => myWorkflow.id), * services: [firstService.then(firstService => firstService.id)], * condition: "incident.priority matches 'P1'", * }); * ``` */ function getIncidentWorkflow(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("pagerduty:index/getIncidentWorkflow:getIncidentWorkflow", { "name": args.name, }, opts); } exports.getIncidentWorkflow = getIncidentWorkflow; /** * Use this data source to get information about a specific [Incident Workflow](https://support.pagerduty.com/docs/incident-workflows) so that you can create a trigger for it. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const myWorkflow = pagerduty.getIncidentWorkflow({ * name: "Some Workflow Name", * }); * const firstService = pagerduty.getService({ * name: "My First Service", * }); * const automaticTrigger = new pagerduty.IncidentWorkflowTrigger("automatic_trigger", { * type: "conditional", * workflow: myWorkflow.then(myWorkflow => myWorkflow.id), * services: [firstService.then(firstService => firstService.id)], * condition: "incident.priority matches 'P1'", * }); * ``` */ function getIncidentWorkflowOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("pagerduty:index/getIncidentWorkflow:getIncidentWorkflow", { "name": args.name, }, opts); } exports.getIncidentWorkflowOutput = getIncidentWorkflowOutput; //# sourceMappingURL=getIncidentWorkflow.js.map