UNPKG

@pulumi/pagerduty

Version:

A Pulumi package for creating and managing pagerduty cloud resources.

113 lines (112 loc) 4.29 kB
import * as pulumi from "@pulumi/pulumi"; /** * [Enablements](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODE5Nw-list-enablements) allow you to enable or disable specific features for PagerDuty entities such as services and event orchestrations. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const example = pagerduty.getService({ * name: "My Web Service", * }); * const exampleEnablement = new pagerduty.Enablement("example", { * entityType: "service", * entityId: example.then(example => example.id), * feature: "aiops", * enabled: true, * }); * ``` * * ## Import * * Enablements can be imported using the `id`, which is constructed by concatenating the `entity_type`, `entity_id`, and `feature` with dots, e.g. * * ```sh * $ pulumi import pagerduty:index/enablement:Enablement example service.P7HHMVK.aiops * ``` */ export declare class Enablement extends pulumi.CustomResource { /** * Get an existing Enablement 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: string, id: pulumi.Input<pulumi.ID>, state?: EnablementState, opts?: pulumi.CustomResourceOptions): Enablement; /** * Returns true if the given object is an instance of Enablement. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Enablement; /** * Whether the feature should be enabled (`true`) or disabled (`false`) for the specified entity. */ readonly enabled: pulumi.Output<boolean>; /** * The ID of the entity for which to manage the enablement. */ readonly entityId: pulumi.Output<string>; /** * The type of entity for which to manage the enablement. Possible values can be `service` and `eventOrchestration`. */ readonly entityType: pulumi.Output<string>; /** * The name of the feature to enable or disable. Possible values can be `aiops`. */ readonly feature: pulumi.Output<string>; /** * Create a Enablement resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: EnablementArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Enablement resources. */ export interface EnablementState { /** * Whether the feature should be enabled (`true`) or disabled (`false`) for the specified entity. */ enabled?: pulumi.Input<boolean>; /** * The ID of the entity for which to manage the enablement. */ entityId?: pulumi.Input<string>; /** * The type of entity for which to manage the enablement. Possible values can be `service` and `eventOrchestration`. */ entityType?: pulumi.Input<string>; /** * The name of the feature to enable or disable. Possible values can be `aiops`. */ feature?: pulumi.Input<string>; } /** * The set of arguments for constructing a Enablement resource. */ export interface EnablementArgs { /** * Whether the feature should be enabled (`true`) or disabled (`false`) for the specified entity. */ enabled?: pulumi.Input<boolean>; /** * The ID of the entity for which to manage the enablement. */ entityId: pulumi.Input<string>; /** * The type of entity for which to manage the enablement. Possible values can be `service` and `eventOrchestration`. */ entityType: pulumi.Input<string>; /** * The name of the feature to enable or disable. Possible values can be `aiops`. */ feature: pulumi.Input<string>; }