UNPKG

@pulumi/pagerduty

Version:

A Pulumi package for creating and managing pagerduty cloud resources.

76 lines 2.93 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.Tag = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * A [tag](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODIxOA-create-a-tag) is applied to Escalation Policies, Teams or Users and can be used to filter them. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const example = new pagerduty.Tag("example", {label: "Product"}); * ``` * * ## Import * * Tags can be imported using the `id`, e.g. * * ```sh * $ pulumi import pagerduty:index/tag:Tag main PLBP09X * ``` */ class Tag extends pulumi.CustomResource { /** * Get an existing Tag 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 Tag(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Tag. 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'] === Tag.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["htmlUrl"] = state ? state.htmlUrl : undefined; resourceInputs["label"] = state ? state.label : undefined; resourceInputs["summary"] = state ? state.summary : undefined; } else { const args = argsOrState; if ((!args || args.label === undefined) && !opts.urn) { throw new Error("Missing required property 'label'"); } resourceInputs["label"] = args ? args.label : undefined; resourceInputs["htmlUrl"] = undefined /*out*/; resourceInputs["summary"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Tag.__pulumiType, name, resourceInputs, opts); } } exports.Tag = Tag; /** @internal */ Tag.__pulumiType = 'pagerduty:index/tag:Tag'; //# sourceMappingURL=tag.js.map