Skip to main content

rules

Overview

Namerules
TypeResource
Idpagerduty.services.rules

Fields

NameDatatypeDescription
idstringID of the Event Rule.
actionsobjectWhen an event matches this Event Rule, the actions that will be taken to change the resulting Alert and Incident.
conditionsobjectConditions evaluated to check if an event matches this Event Rule. Is always empty for the catch_all rule, though.
disabledbooleanIndicates whether the Event Rule is disabled and would therefore not be evaluated.
positionintegerPosition/index of the Event Rule on the Service. Starting from position 0 (the first rule), rules are evaluated one-by-one until a matching Event Rule is found or the end of the list is reached.
selfstringthe API show URL at which the object is accessible.
time_frameobjectTime-based conditions for limiting when the rule is active.
variablesarray[Early Access] Populate variables from event payloads and use those variables in other event actions.

Methods

NameAccessible byRequired ParamsDescription
get_service_event_ruleSELECTid, rule_idGet an Event Rule from a Service.
<!-- theme: warning -->
> ### End-of-life
> Rulesets and Event Rules will end-of-life soon. We highly recommend that you migrate to Event Orchestration as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.

Scoped OAuth requires: services.read
list_service_event_rulesSELECTidList Event Rules on a Service.
<!-- theme: warning -->
> ### End-of-life
> Rulesets and Event Rules will end-of-life soon. We highly recommend that you migrate to Event Orchestration as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.

Scoped OAuth requires: services.read
create_service_event_ruleINSERTid, data__ruleCreate a new Event Rule on a Service.
<!-- theme: warning -->
> ### End-of-life
> Rulesets and Event Rules will end-of-life soon. We highly recommend that you migrate to Event Orchestration as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.

Scoped OAuth requires: services.write
delete_service_event_ruleDELETEid, rule_idDelete an Event Rule from a Service.
<!-- theme: warning -->
> ### End-of-life
> Rulesets and Event Rules will end-of-life soon. We highly recommend that you migrate to Event Orchestration as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.

Scoped OAuth requires: services.write
_get_service_event_ruleEXECid, rule_idGet an Event Rule from a Service.
<!-- theme: warning -->
> ### End-of-life
> Rulesets and Event Rules will end-of-life soon. We highly recommend that you migrate to Event Orchestration as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.

Scoped OAuth requires: services.read
_list_service_event_rulesEXECidList Event Rules on a Service.
<!-- theme: warning -->
> ### End-of-life
> Rulesets and Event Rules will end-of-life soon. We highly recommend that you migrate to Event Orchestration as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.

Scoped OAuth requires: services.read
update_service_event_ruleEXECid, rule_id, data__rule_idUpdate an Event Rule on a Service. Note that the endpoint supports partial updates, so any number of the writable fields can be provided.
<!-- theme: warning -->
> ### End-of-life
> Rulesets and Event Rules will end-of-life soon. We highly recommend that you migrate to Event Orchestration as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.

Scoped OAuth requires: services.write