@pulumi/pagerduty
Version:
A Pulumi package for creating and managing pagerduty cloud resources.
289 lines (288 loc) • 16.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* A [service](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODE5Nw-create-a-service) represents something you monitor (like a web service, email service, or database service). It is a container for related incidents that associates them with escalation policies.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pagerduty from "@pulumi/pagerduty";
*
* const example = new pagerduty.User("example", {
* name: "Earline Greenholt",
* email: "125.greenholt.earline@graham.name",
* });
* const foo = new pagerduty.EscalationPolicy("foo", {
* name: "Engineering Escalation Policy",
* numLoops: 2,
* rules: [{
* escalationDelayInMinutes: 10,
* targets: [{
* type: "user_reference",
* id: example.id,
* }],
* }],
* });
* const exampleService = new pagerduty.Service("example", {
* name: "My Web App",
* autoResolveTimeout: "14400",
* acknowledgementTimeout: "600",
* escalationPolicy: foo.id,
* alertCreation: "create_alerts_and_incidents",
* autoPauseNotificationsParameters: {
* enabled: true,
* timeout: 300,
* },
* });
* ```
*
* ## Import
*
* Services can be imported using the `id`, e.g.
*
* ```sh
* $ pulumi import pagerduty:index/service:Service main PLBP09X
* ```
*/
export declare class Service extends pulumi.CustomResource {
/**
* Get an existing Service 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?: ServiceState, opts?: pulumi.CustomResourceOptions): Service;
/**
* Returns true if the given object is an instance of Service. 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 Service;
/**
* Time in seconds that an incident changes to the Triggered State after being Acknowledged. Disabled if set to the `"null"` string. If not passed in, will default to '"1800"'.
*/
readonly acknowledgementTimeout: pulumi.Output<string | undefined>;
/**
* (Deprecated) This attribute has been deprecated as all services will be migrated to use alerts and incidents. The incident only service setting will be no longer available and this attribute will be removed in an upcoming version. See knowledge base for details https://support.pagerduty.com/docs/alerts#enable-and-disable-alerts-on-a-service.
*/
readonly alertCreation: pulumi.Output<string | undefined>;
/**
* (Deprecated) Defines how alerts on this service will be automatically grouped into incidents. Note that the alert grouping features are available only on certain plans. If not set, each alert will create a separate incident; If value is set to `time`: All alerts within a specified duration will be grouped into the same incident. This duration is set in the `alertGroupingTimeout` setting (described below). Available on Standard, Enterprise, and Event Intelligence plans; If value is set to `intelligent` - Alerts will be intelligently grouped based on a machine learning model that looks at the alert summary, timing, and the history of grouped alerts. Available on Enterprise and Event Intelligence plan. This field is deprecated, use `alert_grouping_parameters.type` instead,
*
* @deprecated Use `alert_grouping_parameters.type`
*/
readonly alertGrouping: pulumi.Output<string>;
/**
* (Deprecated) Defines how alerts on this service will be automatically grouped into incidents. Note that the alert grouping features are available only on certain plans. If not set, each alert will create a separate incident. Instructions on how to migrate this configuration to `pagerduty.AlertGroupingSetting` resource can be found here.
*
* @deprecated Use a resource `pagerduty.AlertGroupingSetting` instead.
Follow the migration guide at https://registry.terraform.io/providers/PagerDuty/pagerduty/latest/docs/resources/alert_grouping_setting#migration-from-alert_grouping_parameters
*/
readonly alertGroupingParameters: pulumi.Output<outputs.ServiceAlertGroupingParameters | undefined>;
/**
* (Deprecated) The duration in minutes within which to automatically group incoming alerts. This setting applies only when `alertGrouping` is set to `time`. To continue grouping alerts until the incident is resolved, set this value to `0`. This field is deprecated, use `alert_grouping_parameters.config.timeout` instead,
*
* @deprecated Use `alert_grouping_parameters.config.timeout`
*/
readonly alertGroupingTimeout: pulumi.Output<string>;
/**
* Defines how alerts on this service are automatically suspended for a period of time before triggering, when identified as likely being transient. Note that automatically pausing notifications is only available on certain plans as mentioned [here](https://support.pagerduty.com/docs/auto-pause-incident-notifications).
*/
readonly autoPauseNotificationsParameters: pulumi.Output<outputs.ServiceAutoPauseNotificationsParameters>;
/**
* Time in seconds that an incident is automatically resolved if left open for that long. Disabled if set to the `"null"` string.
*/
readonly autoResolveTimeout: pulumi.Output<string | undefined>;
/**
* Creation timestamp of the service.
*/
readonly createdAt: pulumi.Output<string>;
/**
* A human-friendly description of the service.
* If not set, a placeholder of "Managed by Pulumi" will be set.
*/
readonly description: pulumi.Output<string>;
/**
* The escalation policy used by this service.
*/
readonly escalationPolicy: pulumi.Output<string>;
/**
* URL at which the entity is uniquely displayed in the Web app.
*/
readonly htmlUrl: pulumi.Output<string>;
readonly incidentUrgencyRule: pulumi.Output<outputs.ServiceIncidentUrgencyRule>;
/**
* Last incident timestamp of the service.
*/
readonly lastIncidentTimestamp: pulumi.Output<string>;
/**
* The name of the service.
*/
readonly name: pulumi.Output<string>;
/**
* (Deprecated) The response play used by this service.
*/
readonly responsePlay: pulumi.Output<string>;
readonly scheduledActions: pulumi.Output<outputs.ServiceScheduledAction[] | undefined>;
/**
* The status of the service.
*/
readonly status: pulumi.Output<string>;
readonly supportHours: pulumi.Output<outputs.ServiceSupportHours | undefined>;
/**
* The type of object. The value returned will be `service`. Can be used for passing to a service dependency.
*/
readonly type: pulumi.Output<string>;
/**
* Create a Service 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: ServiceArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Service resources.
*/
export interface ServiceState {
/**
* Time in seconds that an incident changes to the Triggered State after being Acknowledged. Disabled if set to the `"null"` string. If not passed in, will default to '"1800"'.
*/
acknowledgementTimeout?: pulumi.Input<string>;
/**
* (Deprecated) This attribute has been deprecated as all services will be migrated to use alerts and incidents. The incident only service setting will be no longer available and this attribute will be removed in an upcoming version. See knowledge base for details https://support.pagerduty.com/docs/alerts#enable-and-disable-alerts-on-a-service.
*/
alertCreation?: pulumi.Input<string>;
/**
* (Deprecated) Defines how alerts on this service will be automatically grouped into incidents. Note that the alert grouping features are available only on certain plans. If not set, each alert will create a separate incident; If value is set to `time`: All alerts within a specified duration will be grouped into the same incident. This duration is set in the `alertGroupingTimeout` setting (described below). Available on Standard, Enterprise, and Event Intelligence plans; If value is set to `intelligent` - Alerts will be intelligently grouped based on a machine learning model that looks at the alert summary, timing, and the history of grouped alerts. Available on Enterprise and Event Intelligence plan. This field is deprecated, use `alert_grouping_parameters.type` instead,
*
* @deprecated Use `alert_grouping_parameters.type`
*/
alertGrouping?: pulumi.Input<string>;
/**
* (Deprecated) Defines how alerts on this service will be automatically grouped into incidents. Note that the alert grouping features are available only on certain plans. If not set, each alert will create a separate incident. Instructions on how to migrate this configuration to `pagerduty.AlertGroupingSetting` resource can be found here.
*
* @deprecated Use a resource `pagerduty.AlertGroupingSetting` instead.
Follow the migration guide at https://registry.terraform.io/providers/PagerDuty/pagerduty/latest/docs/resources/alert_grouping_setting#migration-from-alert_grouping_parameters
*/
alertGroupingParameters?: pulumi.Input<inputs.ServiceAlertGroupingParameters>;
/**
* (Deprecated) The duration in minutes within which to automatically group incoming alerts. This setting applies only when `alertGrouping` is set to `time`. To continue grouping alerts until the incident is resolved, set this value to `0`. This field is deprecated, use `alert_grouping_parameters.config.timeout` instead,
*
* @deprecated Use `alert_grouping_parameters.config.timeout`
*/
alertGroupingTimeout?: pulumi.Input<string>;
/**
* Defines how alerts on this service are automatically suspended for a period of time before triggering, when identified as likely being transient. Note that automatically pausing notifications is only available on certain plans as mentioned [here](https://support.pagerduty.com/docs/auto-pause-incident-notifications).
*/
autoPauseNotificationsParameters?: pulumi.Input<inputs.ServiceAutoPauseNotificationsParameters>;
/**
* Time in seconds that an incident is automatically resolved if left open for that long. Disabled if set to the `"null"` string.
*/
autoResolveTimeout?: pulumi.Input<string>;
/**
* Creation timestamp of the service.
*/
createdAt?: pulumi.Input<string>;
/**
* A human-friendly description of the service.
* If not set, a placeholder of "Managed by Pulumi" will be set.
*/
description?: pulumi.Input<string>;
/**
* The escalation policy used by this service.
*/
escalationPolicy?: pulumi.Input<string>;
/**
* URL at which the entity is uniquely displayed in the Web app.
*/
htmlUrl?: pulumi.Input<string>;
incidentUrgencyRule?: pulumi.Input<inputs.ServiceIncidentUrgencyRule>;
/**
* Last incident timestamp of the service.
*/
lastIncidentTimestamp?: pulumi.Input<string>;
/**
* The name of the service.
*/
name?: pulumi.Input<string>;
/**
* (Deprecated) The response play used by this service.
*/
responsePlay?: pulumi.Input<string>;
scheduledActions?: pulumi.Input<pulumi.Input<inputs.ServiceScheduledAction>[]>;
/**
* The status of the service.
*/
status?: pulumi.Input<string>;
supportHours?: pulumi.Input<inputs.ServiceSupportHours>;
/**
* The type of object. The value returned will be `service`. Can be used for passing to a service dependency.
*/
type?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Service resource.
*/
export interface ServiceArgs {
/**
* Time in seconds that an incident changes to the Triggered State after being Acknowledged. Disabled if set to the `"null"` string. If not passed in, will default to '"1800"'.
*/
acknowledgementTimeout?: pulumi.Input<string>;
/**
* (Deprecated) This attribute has been deprecated as all services will be migrated to use alerts and incidents. The incident only service setting will be no longer available and this attribute will be removed in an upcoming version. See knowledge base for details https://support.pagerduty.com/docs/alerts#enable-and-disable-alerts-on-a-service.
*/
alertCreation?: pulumi.Input<string>;
/**
* (Deprecated) Defines how alerts on this service will be automatically grouped into incidents. Note that the alert grouping features are available only on certain plans. If not set, each alert will create a separate incident; If value is set to `time`: All alerts within a specified duration will be grouped into the same incident. This duration is set in the `alertGroupingTimeout` setting (described below). Available on Standard, Enterprise, and Event Intelligence plans; If value is set to `intelligent` - Alerts will be intelligently grouped based on a machine learning model that looks at the alert summary, timing, and the history of grouped alerts. Available on Enterprise and Event Intelligence plan. This field is deprecated, use `alert_grouping_parameters.type` instead,
*
* @deprecated Use `alert_grouping_parameters.type`
*/
alertGrouping?: pulumi.Input<string>;
/**
* (Deprecated) Defines how alerts on this service will be automatically grouped into incidents. Note that the alert grouping features are available only on certain plans. If not set, each alert will create a separate incident. Instructions on how to migrate this configuration to `pagerduty.AlertGroupingSetting` resource can be found here.
*
* @deprecated Use a resource `pagerduty.AlertGroupingSetting` instead.
Follow the migration guide at https://registry.terraform.io/providers/PagerDuty/pagerduty/latest/docs/resources/alert_grouping_setting#migration-from-alert_grouping_parameters
*/
alertGroupingParameters?: pulumi.Input<inputs.ServiceAlertGroupingParameters>;
/**
* (Deprecated) The duration in minutes within which to automatically group incoming alerts. This setting applies only when `alertGrouping` is set to `time`. To continue grouping alerts until the incident is resolved, set this value to `0`. This field is deprecated, use `alert_grouping_parameters.config.timeout` instead,
*
* @deprecated Use `alert_grouping_parameters.config.timeout`
*/
alertGroupingTimeout?: pulumi.Input<string>;
/**
* Defines how alerts on this service are automatically suspended for a period of time before triggering, when identified as likely being transient. Note that automatically pausing notifications is only available on certain plans as mentioned [here](https://support.pagerduty.com/docs/auto-pause-incident-notifications).
*/
autoPauseNotificationsParameters?: pulumi.Input<inputs.ServiceAutoPauseNotificationsParameters>;
/**
* Time in seconds that an incident is automatically resolved if left open for that long. Disabled if set to the `"null"` string.
*/
autoResolveTimeout?: pulumi.Input<string>;
/**
* A human-friendly description of the service.
* If not set, a placeholder of "Managed by Pulumi" will be set.
*/
description?: pulumi.Input<string>;
/**
* The escalation policy used by this service.
*/
escalationPolicy: pulumi.Input<string>;
incidentUrgencyRule?: pulumi.Input<inputs.ServiceIncidentUrgencyRule>;
/**
* The name of the service.
*/
name?: pulumi.Input<string>;
/**
* (Deprecated) The response play used by this service.
*/
responsePlay?: pulumi.Input<string>;
scheduledActions?: pulumi.Input<pulumi.Input<inputs.ServiceScheduledAction>[]>;
supportHours?: pulumi.Input<inputs.ServiceSupportHours>;
}