UNPKG

@pulumi/pagerduty

Version:

A Pulumi package for creating and managing pagerduty cloud resources.

92 lines 4.04 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.AutomationActionsActionTeamAssociation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * An Automation Actions [action association with a team](https://developer.pagerduty.com/api-reference/8f722dd91a4ba-associate-an-automation-action-with-a-team) configures the relation of a specific Action with a Team. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const example = new pagerduty.Team("example", { * name: "Engineering", * description: "All engineering", * }); * const paActionExample = new pagerduty.AutomationActionsAction("pa_action_example", { * name: "PA Action created via TF", * description: "Description of the PA Action created via TF", * actionType: "process_automation", * actionDataReference: { * processAutomationJobId: "P123456", * }, * }); * const foo = new pagerduty.AutomationActionsActionTeamAssociation("foo", { * actionId: paActionExample.id, * teamId: example.id, * }); * ``` * * ## Import * * Action team association can be imported using the `action_id` and `team_id` separated by a colon, e.g. * * ```sh * $ pulumi import pagerduty:index/automationActionsActionTeamAssociation:AutomationActionsActionTeamAssociation example 01DER7CUUBF7TH4116K0M4WKPU:PLB09Z * ``` */ class AutomationActionsActionTeamAssociation extends pulumi.CustomResource { /** * Get an existing AutomationActionsActionTeamAssociation 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 AutomationActionsActionTeamAssociation(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of AutomationActionsActionTeamAssociation. 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'] === AutomationActionsActionTeamAssociation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["actionId"] = state?.actionId; resourceInputs["teamId"] = state?.teamId; } else { const args = argsOrState; if (args?.actionId === undefined && !opts.urn) { throw new Error("Missing required property 'actionId'"); } if (args?.teamId === undefined && !opts.urn) { throw new Error("Missing required property 'teamId'"); } resourceInputs["actionId"] = args?.actionId; resourceInputs["teamId"] = args?.teamId; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AutomationActionsActionTeamAssociation.__pulumiType, name, resourceInputs, opts); } } exports.AutomationActionsActionTeamAssociation = AutomationActionsActionTeamAssociation; /** @internal */ AutomationActionsActionTeamAssociation.__pulumiType = 'pagerduty:index/automationActionsActionTeamAssociation:AutomationActionsActionTeamAssociation'; //# sourceMappingURL=automationActionsActionTeamAssociation.js.map