UNPKG

@pulumi/pagerduty

Version:

A Pulumi package for creating and managing pagerduty cloud resources.

89 lines 3.99 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.BusinessService = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * A [business service](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODExNg-create-a-business-service) allows you to model capabilities that span multiple technical services and that may be owned by several different teams. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const example = new pagerduty.BusinessService("example", { * name: "My Web App", * description: "A very descriptive description of this business service", * pointOfContact: "PagerDuty Admin", * team: "P37RSRS", * }); * ``` * * ## Import * * Services can be imported using the `id`, e.g. * * ```sh * $ pulumi import pagerduty:index/businessService:BusinessService main PLBP09X * ``` */ class BusinessService extends pulumi.CustomResource { /** * Get an existing BusinessService 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 BusinessService(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of BusinessService. 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'] === BusinessService.__pulumiType; } constructor(name, argsOrState, opts) { var _a; let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["htmlUrl"] = state ? state.htmlUrl : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["pointOfContact"] = state ? state.pointOfContact : undefined; resourceInputs["self"] = state ? state.self : undefined; resourceInputs["summary"] = state ? state.summary : undefined; resourceInputs["team"] = state ? state.team : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; resourceInputs["description"] = (_a = (args ? args.description : undefined)) !== null && _a !== void 0 ? _a : "Managed by Pulumi"; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["pointOfContact"] = args ? args.pointOfContact : undefined; resourceInputs["team"] = args ? args.team : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["htmlUrl"] = undefined /*out*/; resourceInputs["self"] = undefined /*out*/; resourceInputs["summary"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(BusinessService.__pulumiType, name, resourceInputs, opts); } } exports.BusinessService = BusinessService; /** @internal */ BusinessService.__pulumiType = 'pagerduty:index/businessService:BusinessService'; //# sourceMappingURL=businessService.js.map