Service
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
using Pulumi;
using Pagerduty = Pulumi.Pagerduty;
class MyStack : Stack
{
public MyStack()
{
var exampleUser = new Pagerduty.User("exampleUser", new Pagerduty.UserArgs
{
Email = "125.greenholt.earline@graham.name",
Teams =
{
pagerduty_team.Example.Id,
},
});
var foo = new Pagerduty.EscalationPolicy("foo", new Pagerduty.EscalationPolicyArgs
{
NumLoops = 2,
Rules =
{
new Pagerduty.Inputs.EscalationPolicyRuleArgs
{
EscalationDelayInMinutes = 10,
Target =
{
{
{ "id", exampleUser.Id },
{ "type", "user" },
},
},
},
},
});
var exampleService = new Pagerduty.Service("exampleService", new Pagerduty.ServiceArgs
{
AcknowledgementTimeout = 600,
AlertCreation = "create_incidents",
AutoResolveTimeout = 14400,
EscalationPolicy = pagerduty_escalation_policy.Example.Id,
});
}
}
Coming soon!
import pulumi
import pulumi_pagerduty as pagerduty
example_user = pagerduty.User("exampleUser",
email="125.greenholt.earline@graham.name",
teams=[pagerduty_team["example"]["id"]])
foo = pagerduty.EscalationPolicy("foo",
num_loops=2,
rules=[{
"escalationDelayInMinutes": 10,
"target": [{
"id": example_user.id,
"type": "user",
}],
}])
example_service = pagerduty.Service("exampleService",
acknowledgement_timeout=600,
alert_creation="create_incidents",
auto_resolve_timeout=14400,
escalation_policy=pagerduty_escalation_policy["example"]["id"])import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";
const exampleUser = new pagerduty.User("example", {
email: "125.greenholt.earline@graham.name",
teams: [pagerduty_team_example.id],
});
const foo = new pagerduty.EscalationPolicy("foo", {
numLoops: 2,
rules: [{
escalationDelayInMinutes: 10,
targets: [{
id: exampleUser.id,
type: "user",
}],
}],
});
const exampleService = new pagerduty.Service("example", {
acknowledgementTimeout: "600",
alertCreation: "create_incidents",
autoResolveTimeout: "14400",
escalationPolicy: pagerduty_escalation_policy_example.id,
});Create a Service Resource
new Service(name: string, args: ServiceArgs, opts?: CustomResourceOptions);def Service(resource_name, opts=None, acknowledgement_timeout=None, alert_creation=None, alert_grouping=None, alert_grouping_timeout=None, auto_resolve_timeout=None, description=None, escalation_policy=None, incident_urgency_rule=None, name=None, scheduled_actions=None, support_hours=None, __props__=None);func NewService(ctx *Context, name string, args ServiceArgs, opts ...ResourceOption) (*Service, error)public Service(string name, ServiceArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ServiceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Service Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Service resource accepts the following input properties:
- Escalation
Policy string The escalation policy used by this service.
- Acknowledgement
Timeout string Time in seconds that an incident changes to the Triggered State after being Acknowledged. Disabled if set to the
"null"string.- Alert
Creation string Must be one of two values. PagerDuty receives events from your monitoring systems and can then create incidents in different ways. Value “create_incidents” is default: events will create an incident that cannot be merged. Value “create_alerts_and_incidents” is the alternative: events will create an alert and then add it to a new incident, these incidents can be merged.
- Alert
Grouping string 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 thealert_grouping_timeoutsetting (described below). Available on Standard, Enterprise, and Event Intelligence plans; If value is set tointelligent- 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.- Alert
Grouping intTimeout The duration in minutes within which to automatically group incoming alerts. This setting applies only when
alert_groupingis set totime. To continue grouping alerts until the incident is resolved, set this value to0.- Auto
Resolve stringTimeout Time in seconds that an incident is automatically resolved if left open for that long. Disabled if set to the
"null"string.- Description string
- Incident
Urgency ServiceRule Incident Urgency Rule Args - Name string
The name of the service.
- Scheduled
Actions List<ServiceScheduled Action Args> - Support
Hours ServiceSupport Hours Args
- Escalation
Policy string The escalation policy used by this service.
- Acknowledgement
Timeout string Time in seconds that an incident changes to the Triggered State after being Acknowledged. Disabled if set to the
"null"string.- Alert
Creation string Must be one of two values. PagerDuty receives events from your monitoring systems and can then create incidents in different ways. Value “create_incidents” is default: events will create an incident that cannot be merged. Value “create_alerts_and_incidents” is the alternative: events will create an alert and then add it to a new incident, these incidents can be merged.
- Alert
Grouping string 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 thealert_grouping_timeoutsetting (described below). Available on Standard, Enterprise, and Event Intelligence plans; If value is set tointelligent- 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.- Alert
Grouping intTimeout The duration in minutes within which to automatically group incoming alerts. This setting applies only when
alert_groupingis set totime. To continue grouping alerts until the incident is resolved, set this value to0.- Auto
Resolve stringTimeout Time in seconds that an incident is automatically resolved if left open for that long. Disabled if set to the
"null"string.- Description string
- Incident
Urgency ServiceRule Incident Urgency Rule - Name string
The name of the service.
- Scheduled
Actions []ServiceScheduled Action - Support
Hours ServiceSupport Hours
- escalation
Policy string The escalation policy used by this service.
- acknowledgement
Timeout string Time in seconds that an incident changes to the Triggered State after being Acknowledged. Disabled if set to the
"null"string.- alert
Creation string Must be one of two values. PagerDuty receives events from your monitoring systems and can then create incidents in different ways. Value “create_incidents” is default: events will create an incident that cannot be merged. Value “create_alerts_and_incidents” is the alternative: events will create an alert and then add it to a new incident, these incidents can be merged.
- alert
Grouping string 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 thealert_grouping_timeoutsetting (described below). Available on Standard, Enterprise, and Event Intelligence plans; If value is set tointelligent- 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.- alert
Grouping numberTimeout The duration in minutes within which to automatically group incoming alerts. This setting applies only when
alert_groupingis set totime. To continue grouping alerts until the incident is resolved, set this value to0.- auto
Resolve stringTimeout Time in seconds that an incident is automatically resolved if left open for that long. Disabled if set to the
"null"string.- description string
- incident
Urgency ServiceRule Incident Urgency Rule - name string
The name of the service.
- scheduled
Actions ServiceScheduled Action[] - support
Hours ServiceSupport Hours
- escalation_
policy str The escalation policy used by this service.
- acknowledgement_
timeout str Time in seconds that an incident changes to the Triggered State after being Acknowledged. Disabled if set to the
"null"string.- alert_
creation str Must be one of two values. PagerDuty receives events from your monitoring systems and can then create incidents in different ways. Value “create_incidents” is default: events will create an incident that cannot be merged. Value “create_alerts_and_incidents” is the alternative: events will create an alert and then add it to a new incident, these incidents can be merged.
- alert_
grouping str 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 thealert_grouping_timeoutsetting (described below). Available on Standard, Enterprise, and Event Intelligence plans; If value is set tointelligent- 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.- alert_
grouping_ floattimeout The duration in minutes within which to automatically group incoming alerts. This setting applies only when
alert_groupingis set totime. To continue grouping alerts until the incident is resolved, set this value to0.- auto_
resolve_ strtimeout Time in seconds that an incident is automatically resolved if left open for that long. Disabled if set to the
"null"string.- description str
- incident_
urgency_ Dict[Servicerule Incident Urgency Rule] - name str
The name of the service.
- scheduled_
actions List[ServiceScheduled Action] - support_
hours Dict[ServiceSupport Hours]
Outputs
All input properties are implicitly available as output properties. Additionally, the Service resource produces the following output properties:
- created_
at str - html_
url str - id str
- The provider-assigned unique ID for this managed resource.
- last_
incident_ strtimestamp - status str
Look up an Existing Service Resource
Get an existing Service resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ServiceState, opts?: CustomResourceOptions): Servicestatic get(resource_name, id, opts=None, acknowledgement_timeout=None, alert_creation=None, alert_grouping=None, alert_grouping_timeout=None, auto_resolve_timeout=None, created_at=None, description=None, escalation_policy=None, html_url=None, incident_urgency_rule=None, last_incident_timestamp=None, name=None, scheduled_actions=None, status=None, support_hours=None, __props__=None);func GetService(ctx *Context, name string, id IDInput, state *ServiceState, opts ...ResourceOption) (*Service, error)public static Service Get(string name, Input<string> id, ServiceState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Acknowledgement
Timeout string Time in seconds that an incident changes to the Triggered State after being Acknowledged. Disabled if set to the
"null"string.- Alert
Creation string Must be one of two values. PagerDuty receives events from your monitoring systems and can then create incidents in different ways. Value “create_incidents” is default: events will create an incident that cannot be merged. Value “create_alerts_and_incidents” is the alternative: events will create an alert and then add it to a new incident, these incidents can be merged.
- Alert
Grouping string 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 thealert_grouping_timeoutsetting (described below). Available on Standard, Enterprise, and Event Intelligence plans; If value is set tointelligent- 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.- Alert
Grouping intTimeout The duration in minutes within which to automatically group incoming alerts. This setting applies only when
alert_groupingis set totime. To continue grouping alerts until the incident is resolved, set this value to0.- Auto
Resolve stringTimeout Time in seconds that an incident is automatically resolved if left open for that long. Disabled if set to the
"null"string.- Created
At string - Description string
- Escalation
Policy string The escalation policy used by this service.
- Html
Url string - Incident
Urgency ServiceRule Incident Urgency Rule Args - Last
Incident stringTimestamp - Name string
The name of the service.
- Scheduled
Actions List<ServiceScheduled Action Args> - Status string
- Support
Hours ServiceSupport Hours Args
- Acknowledgement
Timeout string Time in seconds that an incident changes to the Triggered State after being Acknowledged. Disabled if set to the
"null"string.- Alert
Creation string Must be one of two values. PagerDuty receives events from your monitoring systems and can then create incidents in different ways. Value “create_incidents” is default: events will create an incident that cannot be merged. Value “create_alerts_and_incidents” is the alternative: events will create an alert and then add it to a new incident, these incidents can be merged.
- Alert
Grouping string 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 thealert_grouping_timeoutsetting (described below). Available on Standard, Enterprise, and Event Intelligence plans; If value is set tointelligent- 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.- Alert
Grouping intTimeout The duration in minutes within which to automatically group incoming alerts. This setting applies only when
alert_groupingis set totime. To continue grouping alerts until the incident is resolved, set this value to0.- Auto
Resolve stringTimeout Time in seconds that an incident is automatically resolved if left open for that long. Disabled if set to the
"null"string.- Created
At string - Description string
- Escalation
Policy string The escalation policy used by this service.
- Html
Url string - Incident
Urgency ServiceRule Incident Urgency Rule - Last
Incident stringTimestamp - Name string
The name of the service.
- Scheduled
Actions []ServiceScheduled Action - Status string
- Support
Hours ServiceSupport Hours
- acknowledgement
Timeout string Time in seconds that an incident changes to the Triggered State after being Acknowledged. Disabled if set to the
"null"string.- alert
Creation string Must be one of two values. PagerDuty receives events from your monitoring systems and can then create incidents in different ways. Value “create_incidents” is default: events will create an incident that cannot be merged. Value “create_alerts_and_incidents” is the alternative: events will create an alert and then add it to a new incident, these incidents can be merged.
- alert
Grouping string 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 thealert_grouping_timeoutsetting (described below). Available on Standard, Enterprise, and Event Intelligence plans; If value is set tointelligent- 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.- alert
Grouping numberTimeout The duration in minutes within which to automatically group incoming alerts. This setting applies only when
alert_groupingis set totime. To continue grouping alerts until the incident is resolved, set this value to0.- auto
Resolve stringTimeout Time in seconds that an incident is automatically resolved if left open for that long. Disabled if set to the
"null"string.- created
At string - description string
- escalation
Policy string The escalation policy used by this service.
- html
Url string - incident
Urgency ServiceRule Incident Urgency Rule - last
Incident stringTimestamp - name string
The name of the service.
- scheduled
Actions ServiceScheduled Action[] - status string
- support
Hours ServiceSupport Hours
- acknowledgement_
timeout str Time in seconds that an incident changes to the Triggered State after being Acknowledged. Disabled if set to the
"null"string.- alert_
creation str Must be one of two values. PagerDuty receives events from your monitoring systems and can then create incidents in different ways. Value “create_incidents” is default: events will create an incident that cannot be merged. Value “create_alerts_and_incidents” is the alternative: events will create an alert and then add it to a new incident, these incidents can be merged.
- alert_
grouping str 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 thealert_grouping_timeoutsetting (described below). Available on Standard, Enterprise, and Event Intelligence plans; If value is set tointelligent- 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.- alert_
grouping_ floattimeout The duration in minutes within which to automatically group incoming alerts. This setting applies only when
alert_groupingis set totime. To continue grouping alerts until the incident is resolved, set this value to0.- auto_
resolve_ strtimeout Time in seconds that an incident is automatically resolved if left open for that long. Disabled if set to the
"null"string.- created_
at str - description str
- escalation_
policy str The escalation policy used by this service.
- html_
url str - incident_
urgency_ Dict[Servicerule Incident Urgency Rule] - last_
incident_ strtimestamp - name str
The name of the service.
- scheduled_
actions List[ServiceScheduled Action] - status str
- support_
hours Dict[ServiceSupport Hours]
Supporting Types
ServiceIncidentUrgencyRule
- Type string
The type of scheduled action. Currently, this must be set to
urgency_change.- During
Support ServiceHours Incident Urgency Rule During Support Hours Args Incidents’ urgency during support hours.
- Outside
Support ServiceHours Incident Urgency Rule Outside Support Hours Args Incidents’ urgency outside of support hours.
- Urgency string
The urgency:
lowNotify responders (does not escalate),high(follows escalation rules) orseverity_basedSet’s the urgency of the incident based on the severity set by the triggering monitoring tool.
- Type string
The type of scheduled action. Currently, this must be set to
urgency_change.- During
Support ServiceHours Incident Urgency Rule During Support Hours Incidents’ urgency during support hours.
- Outside
Support ServiceHours Incident Urgency Rule Outside Support Hours Incidents’ urgency outside of support hours.
- Urgency string
The urgency:
lowNotify responders (does not escalate),high(follows escalation rules) orseverity_basedSet’s the urgency of the incident based on the severity set by the triggering monitoring tool.
- type string
The type of scheduled action. Currently, this must be set to
urgency_change.- during
Support ServiceHours Incident Urgency Rule During Support Hours Incidents’ urgency during support hours.
- outside
Support ServiceHours Incident Urgency Rule Outside Support Hours Incidents’ urgency outside of support hours.
- urgency string
The urgency:
lowNotify responders (does not escalate),high(follows escalation rules) orseverity_basedSet’s the urgency of the incident based on the severity set by the triggering monitoring tool.
- type str
The type of scheduled action. Currently, this must be set to
urgency_change.- during
Support Dict[ServiceHours Incident Urgency Rule During Support Hours] Incidents’ urgency during support hours.
- outside
Support Dict[ServiceHours Incident Urgency Rule Outside Support Hours] Incidents’ urgency outside of support hours.
- urgency str
The urgency:
lowNotify responders (does not escalate),high(follows escalation rules) orseverity_basedSet’s the urgency of the incident based on the severity set by the triggering monitoring tool.
ServiceIncidentUrgencyRuleDuringSupportHours
- Type string
The type of scheduled action. Currently, this must be set to
urgency_change.- Urgency string
The urgency:
lowNotify responders (does not escalate),high(follows escalation rules) orseverity_basedSet’s the urgency of the incident based on the severity set by the triggering monitoring tool.
- Type string
The type of scheduled action. Currently, this must be set to
urgency_change.- Urgency string
The urgency:
lowNotify responders (does not escalate),high(follows escalation rules) orseverity_basedSet’s the urgency of the incident based on the severity set by the triggering monitoring tool.
- type string
The type of scheduled action. Currently, this must be set to
urgency_change.- urgency string
The urgency:
lowNotify responders (does not escalate),high(follows escalation rules) orseverity_basedSet’s the urgency of the incident based on the severity set by the triggering monitoring tool.
ServiceIncidentUrgencyRuleOutsideSupportHours
- Type string
The type of scheduled action. Currently, this must be set to
urgency_change.- Urgency string
The urgency:
lowNotify responders (does not escalate),high(follows escalation rules) orseverity_basedSet’s the urgency of the incident based on the severity set by the triggering monitoring tool.
- Type string
The type of scheduled action. Currently, this must be set to
urgency_change.- Urgency string
The urgency:
lowNotify responders (does not escalate),high(follows escalation rules) orseverity_basedSet’s the urgency of the incident based on the severity set by the triggering monitoring tool.
- type string
The type of scheduled action. Currently, this must be set to
urgency_change.- urgency string
The urgency:
lowNotify responders (does not escalate),high(follows escalation rules) orseverity_basedSet’s the urgency of the incident based on the severity set by the triggering monitoring tool.
ServiceScheduledAction
ServiceScheduledActionAt
ServiceSupportHours
- Days
Of List<int>Weeks Array of days of week as integers.
1to7,1being Monday and7being Sunday.- End
Time string The support hours’ ending time of day.
- Start
Time string The support hours’ starting time of day.
- Time
Zone string The time zone for the support hours.
- Type string
The type of scheduled action. Currently, this must be set to
urgency_change.
- Days
Of []intWeeks Array of days of week as integers.
1to7,1being Monday and7being Sunday.- End
Time string The support hours’ ending time of day.
- Start
Time string The support hours’ starting time of day.
- Time
Zone string The time zone for the support hours.
- Type string
The type of scheduled action. Currently, this must be set to
urgency_change.
- days
Of number[]Weeks Array of days of week as integers.
1to7,1being Monday and7being Sunday.- end
Time string The support hours’ ending time of day.
- start
Time string The support hours’ starting time of day.
- time
Zone string The time zone for the support hours.
- type string
The type of scheduled action. Currently, this must be set to
urgency_change.
- days
Of List[Integer]Weeks Array of days of week as integers.
1to7,1being Monday and7being Sunday.- end_
time str The support hours’ ending time of day.
- start_
time str The support hours’ starting time of day.
- time_
zone str The time zone for the support hours.
- type str
The type of scheduled action. Currently, this must be set to
urgency_change.
Package Details
- Repository
- https://github.com/pulumi/pulumi-pagerduty
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
pagerdutyTerraform Provider.