From 73c30916902162144f6f05363ec01a36d55c37d0 Mon Sep 17 00:00:00 2001 From: guineveresaenger Date: Wed, 24 Jul 2024 10:11:28 -0700 Subject: [PATCH 1/2] make tfgen --- ...laining-why-this-provider-is-patched.patch | 17 +++++++ ...-support-submodule-for-module-import.patch | 1 - .../bridge-metadata.json | 9 +++- .../cmd/pulumi-resource-pagerduty/schema.json | 51 +++++++++++++++++-- provider/go.mod | 2 +- provider/go.sum | 4 +- upstream | 2 +- 7 files changed, 75 insertions(+), 11 deletions(-) create mode 100644 patches/0001-Add-file-explaining-why-this-provider-is-patched.patch delete mode 100644 patches/0001-dummy-patch-to-support-submodule-for-module-import.patch diff --git a/patches/0001-Add-file-explaining-why-this-provider-is-patched.patch b/patches/0001-Add-file-explaining-why-this-provider-is-patched.patch new file mode 100644 index 00000000..545e8fbd --- /dev/null +++ b/patches/0001-Add-file-explaining-why-this-provider-is-patched.patch @@ -0,0 +1,17 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: guineveresaenger +Date: Wed, 24 Jul 2024 10:05:19 -0700 +Subject: [PATCH] Add file explaining why this provider is patched + + +diff --git a/UPSTEAM_VENDORED.md b/UPSTEAM_VENDORED.md +new file mode 100644 +index 00000000..e07ed16d +--- /dev/null ++++ b/UPSTEAM_VENDORED.md +@@ -0,0 +1,5 @@ ++This file exists because due to incorrect upstream go mod versioning, we need to vendor these files. ++We do so via patching. ++There are no actual functional patches to upstream code, but our patching process demands the `patches` folder ++to be non-empty so that the patches mechanic can be invoked. ++ diff --git a/patches/0001-dummy-patch-to-support-submodule-for-module-import.patch b/patches/0001-dummy-patch-to-support-submodule-for-module-import.patch deleted file mode 100644 index b3c53f4e..00000000 --- a/patches/0001-dummy-patch-to-support-submodule-for-module-import.patch +++ /dev/null @@ -1 +0,0 @@ -This patch exists purely so that `patches` folder can be non-empty and the patches workflow can be invoked. See https://github.com/pulumi/pulumi-pagerduty/pull/546 for details. \ No newline at end of file diff --git a/provider/cmd/pulumi-resource-pagerduty/bridge-metadata.json b/provider/cmd/pulumi-resource-pagerduty/bridge-metadata.json index 169a1cbc..a3f189c3 100644 --- a/provider/cmd/pulumi-resource-pagerduty/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-pagerduty/bridge-metadata.json @@ -208,7 +208,14 @@ "elem": { "fields": { "actions": { - "maxItemsOne": true + "maxItemsOne": true, + "elem": { + "fields": { + "dynamic_route_to": { + "maxItemsOne": false + } + } + } }, "condition": { "maxItemsOne": false diff --git a/provider/cmd/pulumi-resource-pagerduty/schema.json b/provider/cmd/pulumi-resource-pagerduty/schema.json index 6cf3ce61..46c8aa6e 100644 --- a/provider/cmd/pulumi-resource-pagerduty/schema.json +++ b/provider/cmd/pulumi-resource-pagerduty/schema.json @@ -249,6 +249,10 @@ "type": "boolean", "description": "When true, this event will be dropped. Dropped events will not trigger or resolve an alert or an incident. Dropped events will not be evaluated against router rules.\n" }, + "escalationPolicy": { + "type": "string", + "description": "The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.\n" + }, "eventAction": { "type": "string", "description": "sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`\n" @@ -505,6 +509,10 @@ "type": "boolean", "description": "When true, this event will be dropped. Dropped events will not trigger or resolve an alert or an incident. Dropped events will not be evaluated against router rules.\n" }, + "escalationPolicy": { + "type": "string", + "description": "The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.\n" + }, "eventAction": { "type": "string", "description": "sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`\n" @@ -833,14 +841,39 @@ }, "pagerduty:index/EventOrchestrationRouterSetRuleActions:EventOrchestrationRouterSetRuleActions": { "properties": { + "dynamicRouteTos": { + "type": "array", + "items": { + "$ref": "#/types/pagerduty:index/EventOrchestrationRouterSetRuleActionsDynamicRouteTo:EventOrchestrationRouterSetRuleActionsDynamicRouteTo" + }, + "description": "supports the following:\n" + }, "routeTo": { + "type": "string" + } + }, + "type": "object" + }, + "pagerduty:index/EventOrchestrationRouterSetRuleActionsDynamicRouteTo:EventOrchestrationRouterSetRuleActionsDynamicRouteTo": { + "properties": { + "lookupBy": { + "type": "string", + "description": "Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `service_name`, `service_id`\n\nIf an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules.\n" + }, + "regex": { "type": "string", - "description": "The ID of the target Service for the resulting alert.\n" + "description": "The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax.\n" + }, + "source": { + "type": "string", + "description": "The path to a field in an event.\n" } }, "type": "object", "required": [ - "routeTo" + "lookupBy", + "regex", + "source" ] }, "pagerduty:index/EventOrchestrationRouterSetRuleCondition:EventOrchestrationRouterSetRuleCondition": { @@ -913,6 +946,10 @@ "$ref": "#/types/pagerduty:index/EventOrchestrationServiceCatchAllActionsAutomationAction:EventOrchestrationServiceCatchAllActionsAutomationAction", "description": "Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident.\n" }, + "escalationPolicy": { + "type": "string", + "description": "The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.\n" + }, "eventAction": { "type": "string", "description": "sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`\n" @@ -1181,6 +1218,10 @@ "$ref": "#/types/pagerduty:index/EventOrchestrationServiceSetRuleActionsAutomationAction:EventOrchestrationServiceSetRuleActionsAutomationAction", "description": "Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident.\n" }, + "escalationPolicy": { + "type": "string", + "description": "The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.\n" + }, "eventAction": { "type": "string", "description": "sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`\n" @@ -4792,7 +4833,7 @@ } }, "pagerduty:index/eventOrchestrationGlobal:EventOrchestrationGlobal": { - "description": "A [Global Orchestration](https://support.pagerduty.com/docs/event-orchestration#global-orchestrations) allows you to create a set of Event Rules. The Global Orchestration evaluates Events sent to it against each of its rules, beginning with the rules in the \"start\" set. When a matching rule is found, it can modify and enhance the event and can route the event to another set of rules within this Global Orchestration for further processing.\n\n## Example of configuring a Global Orchestration\n\nThis example shows creating `Team`, and `Event Orchestration` resources followed by creating a Global Orchestration to handle Events sent to that Event Orchestration.\n\nThis example also shows using `priority` data source to configure `priority` action for a rule. If the Event matches the third rule in set \"step-two\" the resulting incident will have the Priority `P1`.\n\nThis example shows a Global Orchestration that has nested sets: a rule in the \"start\" set has a `route_to` action pointing at the \"step-two\" set.\n\nThe `catch_all` actions will be applied if an Event reaches the end of any set without matching any rules in that set. In this example the `catch_all` doesn't have any `actions` so it'll leave events as-is.\n\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as pagerduty from \"@pulumi/pagerduty\";\n\nconst databaseTeam = new pagerduty.Team(\"database_team\", {name: \"Database Team\"});\nconst eventOrchestration = new pagerduty.EventOrchestration(\"event_orchestration\", {\n name: \"Example Orchestration\",\n team: databaseTeam.id,\n});\nconst p1 = pagerduty.getPriority({\n name: \"P1\",\n});\nconst global = new pagerduty.EventOrchestrationGlobal(\"global\", {\n eventOrchestration: eventOrchestration.id,\n sets: [\n {\n id: \"start\",\n rules: [{\n label: \"Always annotate a note to all events\",\n actions: {\n annotate: \"This incident was created by the Database Team via a Global Orchestration\",\n routeTo: \"step-two\",\n },\n }],\n },\n {\n id: \"step-two\",\n rules: [\n {\n label: \"Drop events that are marked as no-op\",\n conditions: [{\n expression: \"event.summary matches 'no-op'\",\n }],\n actions: {\n dropEvent: true,\n },\n },\n {\n label: \"If there's something wrong on the replica, then mark the alert as a warning\",\n conditions: [{\n expression: \"event.custom_details.hostname matches part 'replica'\",\n }],\n actions: {\n severity: \"warning\",\n },\n },\n {\n label: \"Otherwise, set the incident to P1 and run a diagnostic\",\n actions: {\n priority: p1.then(p1 =\u003e p1.id),\n automationAction: {\n name: \"db-diagnostic\",\n url: \"https://example.com/run-diagnostic\",\n autoSend: true,\n },\n },\n },\n ],\n },\n ],\n catchAll: {\n actions: {},\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_pagerduty as pagerduty\n\ndatabase_team = pagerduty.Team(\"database_team\", name=\"Database Team\")\nevent_orchestration = pagerduty.EventOrchestration(\"event_orchestration\",\n name=\"Example Orchestration\",\n team=database_team.id)\np1 = pagerduty.get_priority(name=\"P1\")\nglobal_ = pagerduty.EventOrchestrationGlobal(\"global\",\n event_orchestration=event_orchestration.id,\n sets=[\n pagerduty.EventOrchestrationGlobalSetArgs(\n id=\"start\",\n rules=[pagerduty.EventOrchestrationGlobalSetRuleArgs(\n label=\"Always annotate a note to all events\",\n actions=pagerduty.EventOrchestrationGlobalSetRuleActionsArgs(\n annotate=\"This incident was created by the Database Team via a Global Orchestration\",\n route_to=\"step-two\",\n ),\n )],\n ),\n pagerduty.EventOrchestrationGlobalSetArgs(\n id=\"step-two\",\n rules=[\n pagerduty.EventOrchestrationGlobalSetRuleArgs(\n label=\"Drop events that are marked as no-op\",\n conditions=[pagerduty.EventOrchestrationGlobalSetRuleConditionArgs(\n expression=\"event.summary matches 'no-op'\",\n )],\n actions=pagerduty.EventOrchestrationGlobalSetRuleActionsArgs(\n drop_event=True,\n ),\n ),\n pagerduty.EventOrchestrationGlobalSetRuleArgs(\n label=\"If there's something wrong on the replica, then mark the alert as a warning\",\n conditions=[pagerduty.EventOrchestrationGlobalSetRuleConditionArgs(\n expression=\"event.custom_details.hostname matches part 'replica'\",\n )],\n actions=pagerduty.EventOrchestrationGlobalSetRuleActionsArgs(\n severity=\"warning\",\n ),\n ),\n pagerduty.EventOrchestrationGlobalSetRuleArgs(\n label=\"Otherwise, set the incident to P1 and run a diagnostic\",\n actions=pagerduty.EventOrchestrationGlobalSetRuleActionsArgs(\n priority=p1.id,\n automation_action=pagerduty.EventOrchestrationGlobalSetRuleActionsAutomationActionArgs(\n name=\"db-diagnostic\",\n url=\"https://example.com/run-diagnostic\",\n auto_send=True,\n ),\n ),\n ),\n ],\n ),\n ],\n catch_all=pagerduty.EventOrchestrationGlobalCatchAllArgs(\n actions=pagerduty.EventOrchestrationGlobalCatchAllActionsArgs(),\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Pagerduty = Pulumi.Pagerduty;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var databaseTeam = new Pagerduty.Team(\"database_team\", new()\n {\n Name = \"Database Team\",\n });\n\n var eventOrchestration = new Pagerduty.EventOrchestration(\"event_orchestration\", new()\n {\n Name = \"Example Orchestration\",\n Team = databaseTeam.Id,\n });\n\n var p1 = Pagerduty.GetPriority.Invoke(new()\n {\n Name = \"P1\",\n });\n\n var @global = new Pagerduty.EventOrchestrationGlobal(\"global\", new()\n {\n EventOrchestration = eventOrchestration.Id,\n Sets = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationGlobalSetArgs\n {\n Id = \"start\",\n Rules = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleArgs\n {\n Label = \"Always annotate a note to all events\",\n Actions = new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleActionsArgs\n {\n Annotate = \"This incident was created by the Database Team via a Global Orchestration\",\n RouteTo = \"step-two\",\n },\n },\n },\n },\n new Pagerduty.Inputs.EventOrchestrationGlobalSetArgs\n {\n Id = \"step-two\",\n Rules = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleArgs\n {\n Label = \"Drop events that are marked as no-op\",\n Conditions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleConditionArgs\n {\n Expression = \"event.summary matches 'no-op'\",\n },\n },\n Actions = new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleActionsArgs\n {\n DropEvent = true,\n },\n },\n new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleArgs\n {\n Label = \"If there's something wrong on the replica, then mark the alert as a warning\",\n Conditions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleConditionArgs\n {\n Expression = \"event.custom_details.hostname matches part 'replica'\",\n },\n },\n Actions = new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleActionsArgs\n {\n Severity = \"warning\",\n },\n },\n new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleArgs\n {\n Label = \"Otherwise, set the incident to P1 and run a diagnostic\",\n Actions = new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleActionsArgs\n {\n Priority = p1.Apply(getPriorityResult =\u003e getPriorityResult.Id),\n AutomationAction = new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleActionsAutomationActionArgs\n {\n Name = \"db-diagnostic\",\n Url = \"https://example.com/run-diagnostic\",\n AutoSend = true,\n },\n },\n },\n },\n },\n },\n CatchAll = new Pagerduty.Inputs.EventOrchestrationGlobalCatchAllArgs\n {\n Actions = null,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-pagerduty/sdk/v4/go/pagerduty\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatabaseTeam, err := pagerduty.NewTeam(ctx, \"database_team\", \u0026pagerduty.TeamArgs{\n\t\t\tName: pulumi.String(\"Database Team\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\teventOrchestration, err := pagerduty.NewEventOrchestration(ctx, \"event_orchestration\", \u0026pagerduty.EventOrchestrationArgs{\n\t\t\tName: pulumi.String(\"Example Orchestration\"),\n\t\t\tTeam: databaseTeam.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tp1, err := pagerduty.GetPriority(ctx, \u0026pagerduty.GetPriorityArgs{\n\t\t\tName: \"P1\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = pagerduty.NewEventOrchestrationGlobal(ctx, \"global\", \u0026pagerduty.EventOrchestrationGlobalArgs{\n\t\t\tEventOrchestration: eventOrchestration.ID(),\n\t\t\tSets: pagerduty.EventOrchestrationGlobalSetArray{\n\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetArgs{\n\t\t\t\t\tId: pulumi.String(\"start\"),\n\t\t\t\t\tRules: pagerduty.EventOrchestrationGlobalSetRuleArray{\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"Always annotate a note to all events\"),\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationGlobalSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tAnnotate: pulumi.String(\"This incident was created by the Database Team via a Global Orchestration\"),\n\t\t\t\t\t\t\t\tRouteTo: pulumi.String(\"step-two\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetArgs{\n\t\t\t\t\tId: pulumi.String(\"step-two\"),\n\t\t\t\t\tRules: pagerduty.EventOrchestrationGlobalSetRuleArray{\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"Drop events that are marked as no-op\"),\n\t\t\t\t\t\t\tConditions: pagerduty.EventOrchestrationGlobalSetRuleConditionArray{\n\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetRuleConditionArgs{\n\t\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.summary matches 'no-op'\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationGlobalSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tDropEvent: pulumi.Bool(true),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"If there's something wrong on the replica, then mark the alert as a warning\"),\n\t\t\t\t\t\t\tConditions: pagerduty.EventOrchestrationGlobalSetRuleConditionArray{\n\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetRuleConditionArgs{\n\t\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.custom_details.hostname matches part 'replica'\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationGlobalSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tSeverity: pulumi.String(\"warning\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"Otherwise, set the incident to P1 and run a diagnostic\"),\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationGlobalSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tPriority: pulumi.String(p1.Id),\n\t\t\t\t\t\t\t\tAutomationAction: \u0026pagerduty.EventOrchestrationGlobalSetRuleActionsAutomationActionArgs{\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"db-diagnostic\"),\n\t\t\t\t\t\t\t\t\tUrl: pulumi.String(\"https://example.com/run-diagnostic\"),\n\t\t\t\t\t\t\t\t\tAutoSend: pulumi.Bool(true),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCatchAll: \u0026pagerduty.EventOrchestrationGlobalCatchAllArgs{\n\t\t\t\tActions: nil,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.pagerduty.Team;\nimport com.pulumi.pagerduty.TeamArgs;\nimport com.pulumi.pagerduty.EventOrchestration;\nimport com.pulumi.pagerduty.EventOrchestrationArgs;\nimport com.pulumi.pagerduty.PagerdutyFunctions;\nimport com.pulumi.pagerduty.inputs.GetPriorityArgs;\nimport com.pulumi.pagerduty.EventOrchestrationGlobal;\nimport com.pulumi.pagerduty.EventOrchestrationGlobalArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationGlobalSetArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationGlobalCatchAllArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationGlobalCatchAllActionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var databaseTeam = new Team(\"databaseTeam\", TeamArgs.builder()\n .name(\"Database Team\")\n .build());\n\n var eventOrchestration = new EventOrchestration(\"eventOrchestration\", EventOrchestrationArgs.builder()\n .name(\"Example Orchestration\")\n .team(databaseTeam.id())\n .build());\n\n final var p1 = PagerdutyFunctions.getPriority(GetPriorityArgs.builder()\n .name(\"P1\")\n .build());\n\n var global = new EventOrchestrationGlobal(\"global\", EventOrchestrationGlobalArgs.builder()\n .eventOrchestration(eventOrchestration.id())\n .sets( \n EventOrchestrationGlobalSetArgs.builder()\n .id(\"start\")\n .rules(EventOrchestrationGlobalSetRuleArgs.builder()\n .label(\"Always annotate a note to all events\")\n .actions(EventOrchestrationGlobalSetRuleActionsArgs.builder()\n .annotate(\"This incident was created by the Database Team via a Global Orchestration\")\n .routeTo(\"step-two\")\n .build())\n .build())\n .build(),\n EventOrchestrationGlobalSetArgs.builder()\n .id(\"step-two\")\n .rules( \n EventOrchestrationGlobalSetRuleArgs.builder()\n .label(\"Drop events that are marked as no-op\")\n .conditions(EventOrchestrationGlobalSetRuleConditionArgs.builder()\n .expression(\"event.summary matches 'no-op'\")\n .build())\n .actions(EventOrchestrationGlobalSetRuleActionsArgs.builder()\n .dropEvent(true)\n .build())\n .build(),\n EventOrchestrationGlobalSetRuleArgs.builder()\n .label(\"If there's something wrong on the replica, then mark the alert as a warning\")\n .conditions(EventOrchestrationGlobalSetRuleConditionArgs.builder()\n .expression(\"event.custom_details.hostname matches part 'replica'\")\n .build())\n .actions(EventOrchestrationGlobalSetRuleActionsArgs.builder()\n .severity(\"warning\")\n .build())\n .build(),\n EventOrchestrationGlobalSetRuleArgs.builder()\n .label(\"Otherwise, set the incident to P1 and run a diagnostic\")\n .actions(EventOrchestrationGlobalSetRuleActionsArgs.builder()\n .priority(p1.applyValue(getPriorityResult -\u003e getPriorityResult.id()))\n .automationAction(EventOrchestrationGlobalSetRuleActionsAutomationActionArgs.builder()\n .name(\"db-diagnostic\")\n .url(\"https://example.com/run-diagnostic\")\n .autoSend(true)\n .build())\n .build())\n .build())\n .build())\n .catchAll(EventOrchestrationGlobalCatchAllArgs.builder()\n .actions()\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n databaseTeam:\n type: pagerduty:Team\n name: database_team\n properties:\n name: Database Team\n eventOrchestration:\n type: pagerduty:EventOrchestration\n name: event_orchestration\n properties:\n name: Example Orchestration\n team: ${databaseTeam.id}\n global:\n type: pagerduty:EventOrchestrationGlobal\n properties:\n eventOrchestration: ${eventOrchestration.id}\n sets:\n - id: start\n rules:\n - label: Always annotate a note to all events\n actions:\n annotate: This incident was created by the Database Team via a Global Orchestration\n routeTo: step-two\n - id: step-two\n rules:\n - label: Drop events that are marked as no-op\n conditions:\n - expression: event.summary matches 'no-op'\n actions:\n dropEvent: true\n - label: If there's something wrong on the replica, then mark the alert as a warning\n conditions:\n - expression: event.custom_details.hostname matches part 'replica'\n actions:\n severity: warning\n - label: Otherwise, set the incident to P1 and run a diagnostic\n actions:\n priority: ${p1.id}\n automationAction:\n name: db-diagnostic\n url: https://example.com/run-diagnostic\n autoSend: true\n catchAll:\n actions: {}\nvariables:\n p1:\n fn::invoke:\n Function: pagerduty:getPriority\n Arguments:\n name: P1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nGlobal Orchestration can be imported using the `id` of the Event Orchestration, e.g.\n\n```sh\n$ pulumi import pagerduty:index/eventOrchestrationGlobal:EventOrchestrationGlobal global 1b49abe7-26db-4439-a715-c6d883acfb3e\n```\n", + "description": "A [Global Orchestration](https://support.pagerduty.com/docs/event-orchestration#global-orchestrations) allows you to create a set of Event Rules. The Global Orchestration evaluates Events sent to it against each of its rules, beginning with the rules in the \"start\" set. When a matching rule is found, it can modify and enhance the event and can route the event to another set of rules within this Global Orchestration for further processing.\n\n## Example of configuring a Global Orchestration\n\nThis example shows creating `Team`, and `Event Orchestration` resources followed by creating a Global Orchestration to handle Events sent to that Event Orchestration.\n\nThis example also shows using the pagerduty.getPriority data sources to configure `priority` and `escalation_policy` actions for a rule.\n\nThis example shows a Global Orchestration that has nested sets: a rule in the \"start\" set has a `route_to` action pointing at the \"step-two\" set.\n\nThe `catch_all` actions will be applied if an Event reaches the end of any set without matching any rules in that set. In this example the `catch_all` doesn't have any `actions` so it'll leave events as-is.\n\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as pagerduty from \"@pulumi/pagerduty\";\n\nconst databaseTeam = new pagerduty.Team(\"database_team\", {name: \"Database Team\"});\nconst eventOrchestration = new pagerduty.EventOrchestration(\"event_orchestration\", {\n name: \"Example Orchestration\",\n team: databaseTeam.id,\n});\nconst p1 = pagerduty.getPriority({\n name: \"P1\",\n});\nconst sreEscPolicy = pagerduty.getEscalationPolicy({\n name: \"SRE Escalation Policy\",\n});\nconst global = new pagerduty.EventOrchestrationGlobal(\"global\", {\n eventOrchestration: eventOrchestration.id,\n sets: [\n {\n id: \"start\",\n rules: [{\n label: \"Always annotate a note to all events\",\n actions: {\n annotate: \"This incident was created by the Database Team via a Global Orchestration\",\n routeTo: \"step-two\",\n },\n }],\n },\n {\n id: \"step-two\",\n rules: [\n {\n label: \"Drop events that are marked as no-op\",\n conditions: [{\n expression: \"event.summary matches 'no-op'\",\n }],\n actions: {\n dropEvent: true,\n },\n },\n {\n label: \"If the DB host is running out of space, then page the SRE team\",\n conditions: [{\n expression: \"event.summary matches part 'running out of space'\",\n }],\n actions: {\n escalationPolicy: sreEscPolicy.then(sreEscPolicy =\u003e sreEscPolicy.id),\n },\n },\n {\n label: \"If there's something wrong on the replica, then mark the alert as a warning\",\n conditions: [{\n expression: \"event.custom_details.hostname matches part 'replica'\",\n }],\n actions: {\n severity: \"warning\",\n },\n },\n {\n label: \"Otherwise, set the incident to P1 and run a diagnostic\",\n actions: {\n priority: p1.then(p1 =\u003e p1.id),\n automationAction: {\n name: \"db-diagnostic\",\n url: \"https://example.com/run-diagnostic\",\n autoSend: true,\n },\n },\n },\n ],\n },\n ],\n catchAll: {\n actions: {},\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_pagerduty as pagerduty\n\ndatabase_team = pagerduty.Team(\"database_team\", name=\"Database Team\")\nevent_orchestration = pagerduty.EventOrchestration(\"event_orchestration\",\n name=\"Example Orchestration\",\n team=database_team.id)\np1 = pagerduty.get_priority(name=\"P1\")\nsre_esc_policy = pagerduty.get_escalation_policy(name=\"SRE Escalation Policy\")\nglobal_ = pagerduty.EventOrchestrationGlobal(\"global\",\n event_orchestration=event_orchestration.id,\n sets=[\n pagerduty.EventOrchestrationGlobalSetArgs(\n id=\"start\",\n rules=[pagerduty.EventOrchestrationGlobalSetRuleArgs(\n label=\"Always annotate a note to all events\",\n actions=pagerduty.EventOrchestrationGlobalSetRuleActionsArgs(\n annotate=\"This incident was created by the Database Team via a Global Orchestration\",\n route_to=\"step-two\",\n ),\n )],\n ),\n pagerduty.EventOrchestrationGlobalSetArgs(\n id=\"step-two\",\n rules=[\n pagerduty.EventOrchestrationGlobalSetRuleArgs(\n label=\"Drop events that are marked as no-op\",\n conditions=[pagerduty.EventOrchestrationGlobalSetRuleConditionArgs(\n expression=\"event.summary matches 'no-op'\",\n )],\n actions=pagerduty.EventOrchestrationGlobalSetRuleActionsArgs(\n drop_event=True,\n ),\n ),\n pagerduty.EventOrchestrationGlobalSetRuleArgs(\n label=\"If the DB host is running out of space, then page the SRE team\",\n conditions=[pagerduty.EventOrchestrationGlobalSetRuleConditionArgs(\n expression=\"event.summary matches part 'running out of space'\",\n )],\n actions=pagerduty.EventOrchestrationGlobalSetRuleActionsArgs(\n escalation_policy=sre_esc_policy.id,\n ),\n ),\n pagerduty.EventOrchestrationGlobalSetRuleArgs(\n label=\"If there's something wrong on the replica, then mark the alert as a warning\",\n conditions=[pagerduty.EventOrchestrationGlobalSetRuleConditionArgs(\n expression=\"event.custom_details.hostname matches part 'replica'\",\n )],\n actions=pagerduty.EventOrchestrationGlobalSetRuleActionsArgs(\n severity=\"warning\",\n ),\n ),\n pagerduty.EventOrchestrationGlobalSetRuleArgs(\n label=\"Otherwise, set the incident to P1 and run a diagnostic\",\n actions=pagerduty.EventOrchestrationGlobalSetRuleActionsArgs(\n priority=p1.id,\n automation_action=pagerduty.EventOrchestrationGlobalSetRuleActionsAutomationActionArgs(\n name=\"db-diagnostic\",\n url=\"https://example.com/run-diagnostic\",\n auto_send=True,\n ),\n ),\n ),\n ],\n ),\n ],\n catch_all=pagerduty.EventOrchestrationGlobalCatchAllArgs(\n actions=pagerduty.EventOrchestrationGlobalCatchAllActionsArgs(),\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Pagerduty = Pulumi.Pagerduty;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var databaseTeam = new Pagerduty.Team(\"database_team\", new()\n {\n Name = \"Database Team\",\n });\n\n var eventOrchestration = new Pagerduty.EventOrchestration(\"event_orchestration\", new()\n {\n Name = \"Example Orchestration\",\n Team = databaseTeam.Id,\n });\n\n var p1 = Pagerduty.GetPriority.Invoke(new()\n {\n Name = \"P1\",\n });\n\n var sreEscPolicy = Pagerduty.GetEscalationPolicy.Invoke(new()\n {\n Name = \"SRE Escalation Policy\",\n });\n\n var @global = new Pagerduty.EventOrchestrationGlobal(\"global\", new()\n {\n EventOrchestration = eventOrchestration.Id,\n Sets = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationGlobalSetArgs\n {\n Id = \"start\",\n Rules = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleArgs\n {\n Label = \"Always annotate a note to all events\",\n Actions = new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleActionsArgs\n {\n Annotate = \"This incident was created by the Database Team via a Global Orchestration\",\n RouteTo = \"step-two\",\n },\n },\n },\n },\n new Pagerduty.Inputs.EventOrchestrationGlobalSetArgs\n {\n Id = \"step-two\",\n Rules = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleArgs\n {\n Label = \"Drop events that are marked as no-op\",\n Conditions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleConditionArgs\n {\n Expression = \"event.summary matches 'no-op'\",\n },\n },\n Actions = new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleActionsArgs\n {\n DropEvent = true,\n },\n },\n new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleArgs\n {\n Label = \"If the DB host is running out of space, then page the SRE team\",\n Conditions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleConditionArgs\n {\n Expression = \"event.summary matches part 'running out of space'\",\n },\n },\n Actions = new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleActionsArgs\n {\n EscalationPolicy = sreEscPolicy.Apply(getEscalationPolicyResult =\u003e getEscalationPolicyResult.Id),\n },\n },\n new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleArgs\n {\n Label = \"If there's something wrong on the replica, then mark the alert as a warning\",\n Conditions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleConditionArgs\n {\n Expression = \"event.custom_details.hostname matches part 'replica'\",\n },\n },\n Actions = new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleActionsArgs\n {\n Severity = \"warning\",\n },\n },\n new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleArgs\n {\n Label = \"Otherwise, set the incident to P1 and run a diagnostic\",\n Actions = new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleActionsArgs\n {\n Priority = p1.Apply(getPriorityResult =\u003e getPriorityResult.Id),\n AutomationAction = new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleActionsAutomationActionArgs\n {\n Name = \"db-diagnostic\",\n Url = \"https://example.com/run-diagnostic\",\n AutoSend = true,\n },\n },\n },\n },\n },\n },\n CatchAll = new Pagerduty.Inputs.EventOrchestrationGlobalCatchAllArgs\n {\n Actions = null,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-pagerduty/sdk/v4/go/pagerduty\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatabaseTeam, err := pagerduty.NewTeam(ctx, \"database_team\", \u0026pagerduty.TeamArgs{\n\t\t\tName: pulumi.String(\"Database Team\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\teventOrchestration, err := pagerduty.NewEventOrchestration(ctx, \"event_orchestration\", \u0026pagerduty.EventOrchestrationArgs{\n\t\t\tName: pulumi.String(\"Example Orchestration\"),\n\t\t\tTeam: databaseTeam.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tp1, err := pagerduty.GetPriority(ctx, \u0026pagerduty.GetPriorityArgs{\n\t\t\tName: \"P1\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsreEscPolicy, err := pagerduty.LookupEscalationPolicy(ctx, \u0026pagerduty.LookupEscalationPolicyArgs{\n\t\t\tName: \"SRE Escalation Policy\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = pagerduty.NewEventOrchestrationGlobal(ctx, \"global\", \u0026pagerduty.EventOrchestrationGlobalArgs{\n\t\t\tEventOrchestration: eventOrchestration.ID(),\n\t\t\tSets: pagerduty.EventOrchestrationGlobalSetArray{\n\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetArgs{\n\t\t\t\t\tId: pulumi.String(\"start\"),\n\t\t\t\t\tRules: pagerduty.EventOrchestrationGlobalSetRuleArray{\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"Always annotate a note to all events\"),\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationGlobalSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tAnnotate: pulumi.String(\"This incident was created by the Database Team via a Global Orchestration\"),\n\t\t\t\t\t\t\t\tRouteTo: pulumi.String(\"step-two\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetArgs{\n\t\t\t\t\tId: pulumi.String(\"step-two\"),\n\t\t\t\t\tRules: pagerduty.EventOrchestrationGlobalSetRuleArray{\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"Drop events that are marked as no-op\"),\n\t\t\t\t\t\t\tConditions: pagerduty.EventOrchestrationGlobalSetRuleConditionArray{\n\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetRuleConditionArgs{\n\t\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.summary matches 'no-op'\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationGlobalSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tDropEvent: pulumi.Bool(true),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"If the DB host is running out of space, then page the SRE team\"),\n\t\t\t\t\t\t\tConditions: pagerduty.EventOrchestrationGlobalSetRuleConditionArray{\n\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetRuleConditionArgs{\n\t\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.summary matches part 'running out of space'\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationGlobalSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tEscalationPolicy: pulumi.String(sreEscPolicy.Id),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"If there's something wrong on the replica, then mark the alert as a warning\"),\n\t\t\t\t\t\t\tConditions: pagerduty.EventOrchestrationGlobalSetRuleConditionArray{\n\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetRuleConditionArgs{\n\t\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.custom_details.hostname matches part 'replica'\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationGlobalSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tSeverity: pulumi.String(\"warning\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationGlobalSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"Otherwise, set the incident to P1 and run a diagnostic\"),\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationGlobalSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tPriority: pulumi.String(p1.Id),\n\t\t\t\t\t\t\t\tAutomationAction: \u0026pagerduty.EventOrchestrationGlobalSetRuleActionsAutomationActionArgs{\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"db-diagnostic\"),\n\t\t\t\t\t\t\t\t\tUrl: pulumi.String(\"https://example.com/run-diagnostic\"),\n\t\t\t\t\t\t\t\t\tAutoSend: pulumi.Bool(true),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCatchAll: \u0026pagerduty.EventOrchestrationGlobalCatchAllArgs{\n\t\t\t\tActions: nil,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.pagerduty.Team;\nimport com.pulumi.pagerduty.TeamArgs;\nimport com.pulumi.pagerduty.EventOrchestration;\nimport com.pulumi.pagerduty.EventOrchestrationArgs;\nimport com.pulumi.pagerduty.PagerdutyFunctions;\nimport com.pulumi.pagerduty.inputs.GetPriorityArgs;\nimport com.pulumi.pagerduty.inputs.GetEscalationPolicyArgs;\nimport com.pulumi.pagerduty.EventOrchestrationGlobal;\nimport com.pulumi.pagerduty.EventOrchestrationGlobalArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationGlobalSetArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationGlobalCatchAllArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationGlobalCatchAllActionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var databaseTeam = new Team(\"databaseTeam\", TeamArgs.builder()\n .name(\"Database Team\")\n .build());\n\n var eventOrchestration = new EventOrchestration(\"eventOrchestration\", EventOrchestrationArgs.builder()\n .name(\"Example Orchestration\")\n .team(databaseTeam.id())\n .build());\n\n final var p1 = PagerdutyFunctions.getPriority(GetPriorityArgs.builder()\n .name(\"P1\")\n .build());\n\n final var sreEscPolicy = PagerdutyFunctions.getEscalationPolicy(GetEscalationPolicyArgs.builder()\n .name(\"SRE Escalation Policy\")\n .build());\n\n var global = new EventOrchestrationGlobal(\"global\", EventOrchestrationGlobalArgs.builder()\n .eventOrchestration(eventOrchestration.id())\n .sets( \n EventOrchestrationGlobalSetArgs.builder()\n .id(\"start\")\n .rules(EventOrchestrationGlobalSetRuleArgs.builder()\n .label(\"Always annotate a note to all events\")\n .actions(EventOrchestrationGlobalSetRuleActionsArgs.builder()\n .annotate(\"This incident was created by the Database Team via a Global Orchestration\")\n .routeTo(\"step-two\")\n .build())\n .build())\n .build(),\n EventOrchestrationGlobalSetArgs.builder()\n .id(\"step-two\")\n .rules( \n EventOrchestrationGlobalSetRuleArgs.builder()\n .label(\"Drop events that are marked as no-op\")\n .conditions(EventOrchestrationGlobalSetRuleConditionArgs.builder()\n .expression(\"event.summary matches 'no-op'\")\n .build())\n .actions(EventOrchestrationGlobalSetRuleActionsArgs.builder()\n .dropEvent(true)\n .build())\n .build(),\n EventOrchestrationGlobalSetRuleArgs.builder()\n .label(\"If the DB host is running out of space, then page the SRE team\")\n .conditions(EventOrchestrationGlobalSetRuleConditionArgs.builder()\n .expression(\"event.summary matches part 'running out of space'\")\n .build())\n .actions(EventOrchestrationGlobalSetRuleActionsArgs.builder()\n .escalationPolicy(sreEscPolicy.applyValue(getEscalationPolicyResult -\u003e getEscalationPolicyResult.id()))\n .build())\n .build(),\n EventOrchestrationGlobalSetRuleArgs.builder()\n .label(\"If there's something wrong on the replica, then mark the alert as a warning\")\n .conditions(EventOrchestrationGlobalSetRuleConditionArgs.builder()\n .expression(\"event.custom_details.hostname matches part 'replica'\")\n .build())\n .actions(EventOrchestrationGlobalSetRuleActionsArgs.builder()\n .severity(\"warning\")\n .build())\n .build(),\n EventOrchestrationGlobalSetRuleArgs.builder()\n .label(\"Otherwise, set the incident to P1 and run a diagnostic\")\n .actions(EventOrchestrationGlobalSetRuleActionsArgs.builder()\n .priority(p1.applyValue(getPriorityResult -\u003e getPriorityResult.id()))\n .automationAction(EventOrchestrationGlobalSetRuleActionsAutomationActionArgs.builder()\n .name(\"db-diagnostic\")\n .url(\"https://example.com/run-diagnostic\")\n .autoSend(true)\n .build())\n .build())\n .build())\n .build())\n .catchAll(EventOrchestrationGlobalCatchAllArgs.builder()\n .actions()\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n databaseTeam:\n type: pagerduty:Team\n name: database_team\n properties:\n name: Database Team\n eventOrchestration:\n type: pagerduty:EventOrchestration\n name: event_orchestration\n properties:\n name: Example Orchestration\n team: ${databaseTeam.id}\n global:\n type: pagerduty:EventOrchestrationGlobal\n properties:\n eventOrchestration: ${eventOrchestration.id}\n sets:\n - id: start\n rules:\n - label: Always annotate a note to all events\n actions:\n annotate: This incident was created by the Database Team via a Global Orchestration\n routeTo: step-two\n - id: step-two\n rules:\n - label: Drop events that are marked as no-op\n conditions:\n - expression: event.summary matches 'no-op'\n actions:\n dropEvent: true\n - label: If the DB host is running out of space, then page the SRE team\n conditions:\n - expression: event.summary matches part 'running out of space'\n actions:\n escalationPolicy: ${sreEscPolicy.id}\n - label: If there's something wrong on the replica, then mark the alert as a warning\n conditions:\n - expression: event.custom_details.hostname matches part 'replica'\n actions:\n severity: warning\n - label: Otherwise, set the incident to P1 and run a diagnostic\n actions:\n priority: ${p1.id}\n automationAction:\n name: db-diagnostic\n url: https://example.com/run-diagnostic\n autoSend: true\n catchAll:\n actions: {}\nvariables:\n p1:\n fn::invoke:\n Function: pagerduty:getPriority\n Arguments:\n name: P1\n sreEscPolicy:\n fn::invoke:\n Function: pagerduty:getEscalationPolicy\n Arguments:\n name: SRE Escalation Policy\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nGlobal Orchestration can be imported using the `id` of the Event Orchestration, e.g.\n\n```sh\n$ pulumi import pagerduty:index/eventOrchestrationGlobal:EventOrchestrationGlobal global 1b49abe7-26db-4439-a715-c6d883acfb3e\n```\n", "properties": { "catchAll": { "$ref": "#/types/pagerduty:index/EventOrchestrationGlobalCatchAll:EventOrchestrationGlobalCatchAll", @@ -5011,7 +5052,7 @@ } }, "pagerduty:index/eventOrchestrationRouter:EventOrchestrationRouter": { - "description": "An Orchestration Router allows users to create a set of Event Rules. The Router evaluates events sent to this Orchestration against each of its rules, one at a time, and routes the event to a specific Service based on the first rule that matches. If an event doesn't match any rules, it'll be sent to service specified in the `catch_all` or to the \"Unrouted\" Orchestration if no service is specified.\n\n## Example of configuring Router rules for an Orchestration\n\nIn this example the user has defined the Router with two rules, each routing to a different service.\n\nThis example assumes services used in the `route_to` configuration already exists. So it does not show creation of service resource.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as pagerduty from \"@pulumi/pagerduty\";\n\nconst router = new pagerduty.EventOrchestrationRouter(\"router\", {\n eventOrchestration: myMonitor.id,\n set: {\n id: \"start\",\n rules: [\n {\n label: \"Events relating to our relational database\",\n conditions: [\n {\n expression: \"event.summary matches part 'database'\",\n },\n {\n expression: \"event.source matches regex 'db[0-9]+-server'\",\n },\n ],\n actions: {\n routeTo: database.id,\n },\n },\n {\n conditions: [{\n expression: \"event.summary matches part 'www'\",\n }],\n actions: {\n routeTo: www.id,\n },\n },\n ],\n },\n catchAll: {\n actions: {\n routeTo: \"unrouted\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_pagerduty as pagerduty\n\nrouter = pagerduty.EventOrchestrationRouter(\"router\",\n event_orchestration=my_monitor[\"id\"],\n set=pagerduty.EventOrchestrationRouterSetArgs(\n id=\"start\",\n rules=[\n pagerduty.EventOrchestrationRouterSetRuleArgs(\n label=\"Events relating to our relational database\",\n conditions=[\n pagerduty.EventOrchestrationRouterSetRuleConditionArgs(\n expression=\"event.summary matches part 'database'\",\n ),\n pagerduty.EventOrchestrationRouterSetRuleConditionArgs(\n expression=\"event.source matches regex 'db[0-9]+-server'\",\n ),\n ],\n actions=pagerduty.EventOrchestrationRouterSetRuleActionsArgs(\n route_to=database[\"id\"],\n ),\n ),\n pagerduty.EventOrchestrationRouterSetRuleArgs(\n conditions=[pagerduty.EventOrchestrationRouterSetRuleConditionArgs(\n expression=\"event.summary matches part 'www'\",\n )],\n actions=pagerduty.EventOrchestrationRouterSetRuleActionsArgs(\n route_to=www[\"id\"],\n ),\n ),\n ],\n ),\n catch_all=pagerduty.EventOrchestrationRouterCatchAllArgs(\n actions=pagerduty.EventOrchestrationRouterCatchAllActionsArgs(\n route_to=\"unrouted\",\n ),\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Pagerduty = Pulumi.Pagerduty;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var router = new Pagerduty.EventOrchestrationRouter(\"router\", new()\n {\n EventOrchestration = myMonitor.Id,\n Set = new Pagerduty.Inputs.EventOrchestrationRouterSetArgs\n {\n Id = \"start\",\n Rules = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationRouterSetRuleArgs\n {\n Label = \"Events relating to our relational database\",\n Conditions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationRouterSetRuleConditionArgs\n {\n Expression = \"event.summary matches part 'database'\",\n },\n new Pagerduty.Inputs.EventOrchestrationRouterSetRuleConditionArgs\n {\n Expression = \"event.source matches regex 'db[0-9]+-server'\",\n },\n },\n Actions = new Pagerduty.Inputs.EventOrchestrationRouterSetRuleActionsArgs\n {\n RouteTo = database.Id,\n },\n },\n new Pagerduty.Inputs.EventOrchestrationRouterSetRuleArgs\n {\n Conditions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationRouterSetRuleConditionArgs\n {\n Expression = \"event.summary matches part 'www'\",\n },\n },\n Actions = new Pagerduty.Inputs.EventOrchestrationRouterSetRuleActionsArgs\n {\n RouteTo = www.Id,\n },\n },\n },\n },\n CatchAll = new Pagerduty.Inputs.EventOrchestrationRouterCatchAllArgs\n {\n Actions = new Pagerduty.Inputs.EventOrchestrationRouterCatchAllActionsArgs\n {\n RouteTo = \"unrouted\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-pagerduty/sdk/v4/go/pagerduty\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := pagerduty.NewEventOrchestrationRouter(ctx, \"router\", \u0026pagerduty.EventOrchestrationRouterArgs{\n\t\t\tEventOrchestration: pulumi.Any(myMonitor.Id),\n\t\t\tSet: \u0026pagerduty.EventOrchestrationRouterSetArgs{\n\t\t\t\tId: pulumi.String(\"start\"),\n\t\t\t\tRules: pagerduty.EventOrchestrationRouterSetRuleArray{\n\t\t\t\t\t\u0026pagerduty.EventOrchestrationRouterSetRuleArgs{\n\t\t\t\t\t\tLabel: pulumi.String(\"Events relating to our relational database\"),\n\t\t\t\t\t\tConditions: pagerduty.EventOrchestrationRouterSetRuleConditionArray{\n\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationRouterSetRuleConditionArgs{\n\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.summary matches part 'database'\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationRouterSetRuleConditionArgs{\n\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.source matches regex 'db[0-9]+-server'\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationRouterSetRuleActionsArgs{\n\t\t\t\t\t\t\tRouteTo: pulumi.Any(database.Id),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\u0026pagerduty.EventOrchestrationRouterSetRuleArgs{\n\t\t\t\t\t\tConditions: pagerduty.EventOrchestrationRouterSetRuleConditionArray{\n\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationRouterSetRuleConditionArgs{\n\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.summary matches part 'www'\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationRouterSetRuleActionsArgs{\n\t\t\t\t\t\t\tRouteTo: pulumi.Any(www.Id),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCatchAll: \u0026pagerduty.EventOrchestrationRouterCatchAllArgs{\n\t\t\t\tActions: \u0026pagerduty.EventOrchestrationRouterCatchAllActionsArgs{\n\t\t\t\t\tRouteTo: pulumi.String(\"unrouted\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.pagerduty.EventOrchestrationRouter;\nimport com.pulumi.pagerduty.EventOrchestrationRouterArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationRouterSetArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationRouterCatchAllArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationRouterCatchAllActionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var router = new EventOrchestrationRouter(\"router\", EventOrchestrationRouterArgs.builder()\n .eventOrchestration(myMonitor.id())\n .set(EventOrchestrationRouterSetArgs.builder()\n .id(\"start\")\n .rules( \n EventOrchestrationRouterSetRuleArgs.builder()\n .label(\"Events relating to our relational database\")\n .conditions( \n EventOrchestrationRouterSetRuleConditionArgs.builder()\n .expression(\"event.summary matches part 'database'\")\n .build(),\n EventOrchestrationRouterSetRuleConditionArgs.builder()\n .expression(\"event.source matches regex 'db[0-9]+-server'\")\n .build())\n .actions(EventOrchestrationRouterSetRuleActionsArgs.builder()\n .routeTo(database.id())\n .build())\n .build(),\n EventOrchestrationRouterSetRuleArgs.builder()\n .conditions(EventOrchestrationRouterSetRuleConditionArgs.builder()\n .expression(\"event.summary matches part 'www'\")\n .build())\n .actions(EventOrchestrationRouterSetRuleActionsArgs.builder()\n .routeTo(www.id())\n .build())\n .build())\n .build())\n .catchAll(EventOrchestrationRouterCatchAllArgs.builder()\n .actions(EventOrchestrationRouterCatchAllActionsArgs.builder()\n .routeTo(\"unrouted\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n router:\n type: pagerduty:EventOrchestrationRouter\n properties:\n eventOrchestration: ${myMonitor.id}\n set:\n id: start\n rules:\n - label: Events relating to our relational database\n conditions:\n - expression: event.summary matches part 'database'\n - expression: event.source matches regex 'db[0-9]+-server'\n actions:\n routeTo: ${database.id}\n - conditions:\n - expression: event.summary matches part 'www'\n actions:\n routeTo: ${www.id}\n catchAll:\n actions:\n routeTo: unrouted\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nRouter can be imported using the `id` of the Event Orchestration, e.g.\n\n```sh\n$ pulumi import pagerduty:index/eventOrchestrationRouter:EventOrchestrationRouter router 1b49abe7-26db-4439-a715-c6d883acfb3e\n```\n", + "description": "An Orchestration Router allows users to create a set of Event Rules. The Router evaluates events sent to this Orchestration against each of its rules, one at a time, and routes the event to a specific Service based on the first rule that matches. If an event doesn't match any rules, it'll be sent to service specified in the `catch_all` or to the \"Unrouted\" Orchestration if no service is specified.\n\n## Example of configuring Router rules for an Orchestration\n\nIn this example the user has defined the Router with three rules. The first rule configures a dynamic route: any event containing a value in its `pd_service_id` custom detail will be routed to the Service with the ID specified by that value. The other rules route events matching a condition to specific services.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as pagerduty from \"@pulumi/pagerduty\";\n\nconst database = pagerduty.getService({\n name: \"Primary Data Store\",\n});\nconst www = pagerduty.getService({\n name: \"Web Server App\",\n});\nconst router = new pagerduty.EventOrchestrationRouter(\"router\", {\n eventOrchestration: myMonitor.id,\n set: {\n id: \"start\",\n rules: [\n {\n label: \"Dynamically route events related to specific PagerDuty services\",\n actions: {\n dynamicRouteTos: {\n lookupBy: \"service_id\",\n source: \"event.custom_details.pd_service_id\",\n regexp: \"(.*)\",\n },\n },\n },\n {\n label: \"Events relating to our relational database\",\n conditions: [\n {\n expression: \"event.summary matches part 'database'\",\n },\n {\n expression: \"event.source matches regex 'db[0-9]+-server'\",\n },\n ],\n actions: {\n routeTo: database.then(database =\u003e database.id),\n },\n },\n {\n conditions: [{\n expression: \"event.summary matches part 'www'\",\n }],\n actions: {\n routeTo: www.then(www =\u003e www.id),\n },\n },\n ],\n },\n catchAll: {\n actions: {\n routeTo: \"unrouted\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_pagerduty as pagerduty\n\ndatabase = pagerduty.get_service(name=\"Primary Data Store\")\nwww = pagerduty.get_service(name=\"Web Server App\")\nrouter = pagerduty.EventOrchestrationRouter(\"router\",\n event_orchestration=my_monitor[\"id\"],\n set=pagerduty.EventOrchestrationRouterSetArgs(\n id=\"start\",\n rules=[\n pagerduty.EventOrchestrationRouterSetRuleArgs(\n label=\"Dynamically route events related to specific PagerDuty services\",\n actions=pagerduty.EventOrchestrationRouterSetRuleActionsArgs(\n dynamic_route_tos={\n \"lookupBy\": \"service_id\",\n \"source\": \"event.custom_details.pd_service_id\",\n \"regexp\": \"(.*)\",\n },\n ),\n ),\n pagerduty.EventOrchestrationRouterSetRuleArgs(\n label=\"Events relating to our relational database\",\n conditions=[\n pagerduty.EventOrchestrationRouterSetRuleConditionArgs(\n expression=\"event.summary matches part 'database'\",\n ),\n pagerduty.EventOrchestrationRouterSetRuleConditionArgs(\n expression=\"event.source matches regex 'db[0-9]+-server'\",\n ),\n ],\n actions=pagerduty.EventOrchestrationRouterSetRuleActionsArgs(\n route_to=database.id,\n ),\n ),\n pagerduty.EventOrchestrationRouterSetRuleArgs(\n conditions=[pagerduty.EventOrchestrationRouterSetRuleConditionArgs(\n expression=\"event.summary matches part 'www'\",\n )],\n actions=pagerduty.EventOrchestrationRouterSetRuleActionsArgs(\n route_to=www.id,\n ),\n ),\n ],\n ),\n catch_all=pagerduty.EventOrchestrationRouterCatchAllArgs(\n actions=pagerduty.EventOrchestrationRouterCatchAllActionsArgs(\n route_to=\"unrouted\",\n ),\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Pagerduty = Pulumi.Pagerduty;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var database = Pagerduty.GetService.Invoke(new()\n {\n Name = \"Primary Data Store\",\n });\n\n var www = Pagerduty.GetService.Invoke(new()\n {\n Name = \"Web Server App\",\n });\n\n var router = new Pagerduty.EventOrchestrationRouter(\"router\", new()\n {\n EventOrchestration = myMonitor.Id,\n Set = new Pagerduty.Inputs.EventOrchestrationRouterSetArgs\n {\n Id = \"start\",\n Rules = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationRouterSetRuleArgs\n {\n Label = \"Dynamically route events related to specific PagerDuty services\",\n Actions = new Pagerduty.Inputs.EventOrchestrationRouterSetRuleActionsArgs\n {\n DynamicRouteTos = \n {\n { \"lookupBy\", \"service_id\" },\n { \"source\", \"event.custom_details.pd_service_id\" },\n { \"regexp\", \"(.*)\" },\n },\n },\n },\n new Pagerduty.Inputs.EventOrchestrationRouterSetRuleArgs\n {\n Label = \"Events relating to our relational database\",\n Conditions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationRouterSetRuleConditionArgs\n {\n Expression = \"event.summary matches part 'database'\",\n },\n new Pagerduty.Inputs.EventOrchestrationRouterSetRuleConditionArgs\n {\n Expression = \"event.source matches regex 'db[0-9]+-server'\",\n },\n },\n Actions = new Pagerduty.Inputs.EventOrchestrationRouterSetRuleActionsArgs\n {\n RouteTo = database.Apply(getServiceResult =\u003e getServiceResult.Id),\n },\n },\n new Pagerduty.Inputs.EventOrchestrationRouterSetRuleArgs\n {\n Conditions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationRouterSetRuleConditionArgs\n {\n Expression = \"event.summary matches part 'www'\",\n },\n },\n Actions = new Pagerduty.Inputs.EventOrchestrationRouterSetRuleActionsArgs\n {\n RouteTo = www.Apply(getServiceResult =\u003e getServiceResult.Id),\n },\n },\n },\n },\n CatchAll = new Pagerduty.Inputs.EventOrchestrationRouterCatchAllArgs\n {\n Actions = new Pagerduty.Inputs.EventOrchestrationRouterCatchAllActionsArgs\n {\n RouteTo = \"unrouted\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-pagerduty/sdk/v4/go/pagerduty\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatabase, err := pagerduty.LookupService(ctx, \u0026pagerduty.LookupServiceArgs{\n\t\t\tName: \"Primary Data Store\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\twww, err := pagerduty.LookupService(ctx, \u0026pagerduty.LookupServiceArgs{\n\t\t\tName: \"Web Server App\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = pagerduty.NewEventOrchestrationRouter(ctx, \"router\", \u0026pagerduty.EventOrchestrationRouterArgs{\n\t\t\tEventOrchestration: pulumi.Any(myMonitor.Id),\n\t\t\tSet: \u0026pagerduty.EventOrchestrationRouterSetArgs{\n\t\t\t\tId: pulumi.String(\"start\"),\n\t\t\t\tRules: pagerduty.EventOrchestrationRouterSetRuleArray{\n\t\t\t\t\t\u0026pagerduty.EventOrchestrationRouterSetRuleArgs{\n\t\t\t\t\t\tLabel: pulumi.String(\"Dynamically route events related to specific PagerDuty services\"),\n\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationRouterSetRuleActionsArgs{\n\t\t\t\t\t\t\tDynamicRouteTos: pagerduty.EventOrchestrationRouterSetRuleActionsDynamicRouteToArray{\n\t\t\t\t\t\t\t\tLookupBy: \"service_id\",\n\t\t\t\t\t\t\t\tSource: \"event.custom_details.pd_service_id\",\n\t\t\t\t\t\t\t\tRegexp: \"(.*)\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\u0026pagerduty.EventOrchestrationRouterSetRuleArgs{\n\t\t\t\t\t\tLabel: pulumi.String(\"Events relating to our relational database\"),\n\t\t\t\t\t\tConditions: pagerduty.EventOrchestrationRouterSetRuleConditionArray{\n\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationRouterSetRuleConditionArgs{\n\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.summary matches part 'database'\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationRouterSetRuleConditionArgs{\n\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.source matches regex 'db[0-9]+-server'\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationRouterSetRuleActionsArgs{\n\t\t\t\t\t\t\tRouteTo: pulumi.String(database.Id),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\u0026pagerduty.EventOrchestrationRouterSetRuleArgs{\n\t\t\t\t\t\tConditions: pagerduty.EventOrchestrationRouterSetRuleConditionArray{\n\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationRouterSetRuleConditionArgs{\n\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.summary matches part 'www'\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationRouterSetRuleActionsArgs{\n\t\t\t\t\t\t\tRouteTo: pulumi.String(www.Id),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCatchAll: \u0026pagerduty.EventOrchestrationRouterCatchAllArgs{\n\t\t\t\tActions: \u0026pagerduty.EventOrchestrationRouterCatchAllActionsArgs{\n\t\t\t\t\tRouteTo: pulumi.String(\"unrouted\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.pagerduty.PagerdutyFunctions;\nimport com.pulumi.pagerduty.inputs.GetServiceArgs;\nimport com.pulumi.pagerduty.EventOrchestrationRouter;\nimport com.pulumi.pagerduty.EventOrchestrationRouterArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationRouterSetArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationRouterCatchAllArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationRouterCatchAllActionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var database = PagerdutyFunctions.getService(GetServiceArgs.builder()\n .name(\"Primary Data Store\")\n .build());\n\n final var www = PagerdutyFunctions.getService(GetServiceArgs.builder()\n .name(\"Web Server App\")\n .build());\n\n var router = new EventOrchestrationRouter(\"router\", EventOrchestrationRouterArgs.builder()\n .eventOrchestration(myMonitor.id())\n .set(EventOrchestrationRouterSetArgs.builder()\n .id(\"start\")\n .rules( \n EventOrchestrationRouterSetRuleArgs.builder()\n .label(\"Dynamically route events related to specific PagerDuty services\")\n .actions(EventOrchestrationRouterSetRuleActionsArgs.builder()\n .dynamicRouteTos(EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs.builder()\n .lookupBy(\"service_id\")\n .source(\"event.custom_details.pd_service_id\")\n .regexp(\"(.*)\")\n .build())\n .build())\n .build(),\n EventOrchestrationRouterSetRuleArgs.builder()\n .label(\"Events relating to our relational database\")\n .conditions( \n EventOrchestrationRouterSetRuleConditionArgs.builder()\n .expression(\"event.summary matches part 'database'\")\n .build(),\n EventOrchestrationRouterSetRuleConditionArgs.builder()\n .expression(\"event.source matches regex 'db[0-9]+-server'\")\n .build())\n .actions(EventOrchestrationRouterSetRuleActionsArgs.builder()\n .routeTo(database.applyValue(getServiceResult -\u003e getServiceResult.id()))\n .build())\n .build(),\n EventOrchestrationRouterSetRuleArgs.builder()\n .conditions(EventOrchestrationRouterSetRuleConditionArgs.builder()\n .expression(\"event.summary matches part 'www'\")\n .build())\n .actions(EventOrchestrationRouterSetRuleActionsArgs.builder()\n .routeTo(www.applyValue(getServiceResult -\u003e getServiceResult.id()))\n .build())\n .build())\n .build())\n .catchAll(EventOrchestrationRouterCatchAllArgs.builder()\n .actions(EventOrchestrationRouterCatchAllActionsArgs.builder()\n .routeTo(\"unrouted\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n router:\n type: pagerduty:EventOrchestrationRouter\n properties:\n eventOrchestration: ${myMonitor.id}\n set:\n id: start\n rules:\n - label: Dynamically route events related to specific PagerDuty services\n actions:\n dynamicRouteTos:\n lookupBy: service_id\n source: event.custom_details.pd_service_id\n regexp: (.*)\n - label: Events relating to our relational database\n conditions:\n - expression: event.summary matches part 'database'\n - expression: event.source matches regex 'db[0-9]+-server'\n actions:\n routeTo: ${database.id}\n - conditions:\n - expression: event.summary matches part 'www'\n actions:\n routeTo: ${www.id}\n catchAll:\n actions:\n routeTo: unrouted\nvariables:\n database:\n fn::invoke:\n Function: pagerduty:getService\n Arguments:\n name: Primary Data Store\n www:\n fn::invoke:\n Function: pagerduty:getService\n Arguments:\n name: Web Server App\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nRouter can be imported using the `id` of the Event Orchestration, e.g.\n\n```sh\n$ pulumi import pagerduty:index/eventOrchestrationRouter:EventOrchestrationRouter router 1b49abe7-26db-4439-a715-c6d883acfb3e\n```\n", "properties": { "catchAll": { "$ref": "#/types/pagerduty:index/EventOrchestrationRouterCatchAll:EventOrchestrationRouterCatchAll", @@ -5070,7 +5111,7 @@ } }, "pagerduty:index/eventOrchestrationService:EventOrchestrationService": { - "description": "A [Service Orchestration](https://support.pagerduty.com/docs/event-orchestration#service-orchestrations) allows you to create a set of Event Rules. The Service Orchestration evaluates Events sent to this Service against each of its rules, beginning with the rules in the \"start\" set. When a matching rule is found, it can modify and enhance the event and can route the event to another set of rules within this Service Orchestration for further processing.\n\n\u003e If you have a Service that uses [Service Event Rules](https://support.pagerduty.com/docs/rulesets#service-event-rules), you can switch to [Service Orchestrations](https://support.pagerduty.com/docs/event-orchestration#service-orchestrations) at any time setting the attribute `enable_event_orchestration_for_service` to `true`. Please read the [Switch to Service Orchestrations](https://support.pagerduty.com/docs/event-orchestration#switch-to-service-orchestrations) instructions for more information.\n\n## Example of configuring a Service Orchestration\n\nThis example shows creating `Team`, `User`, `Escalation Policy`, and `Service` resources followed by creating a Service Orchestration to handle Events sent to that Service.\n\nThis example also shows using `priority` data source to configure `priority` action for a rule. If the Event matches the first rule in set \"step-two\" the resulting incident will have the Priority `P1`.\n\nThis example shows a Service Orchestration that has nested sets: a rule in the \"start\" set has a `route_to` action pointing at the \"step-two\" set.\n\nThe `catch_all` actions will be applied if an Event reaches the end of any set without matching any rules in that set. In this example the `catch_all` doesn't have any `actions` so it'll leave events as-is.\n\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as pagerduty from \"@pulumi/pagerduty\";\n\nconst engineering = new pagerduty.Team(\"engineering\", {name: \"Engineering\"});\nconst example = new pagerduty.User(\"example\", {\n name: \"Earline Greenholt\",\n email: \"125.greenholt.earline@graham.name\",\n});\nconst foo = new pagerduty.TeamMembership(\"foo\", {\n userId: example.id,\n teamId: engineering.id,\n role: \"manager\",\n});\nconst exampleEscalationPolicy = new pagerduty.EscalationPolicy(\"example\", {\n name: \"Engineering Escalation Policy\",\n numLoops: 2,\n rules: [{\n escalationDelayInMinutes: 10,\n targets: [{\n type: \"user_reference\",\n id: example.id,\n }],\n }],\n});\nconst exampleService = new pagerduty.Service(\"example\", {\n name: \"My Web App\",\n autoResolveTimeout: \"14400\",\n acknowledgementTimeout: \"600\",\n escalationPolicy: exampleEscalationPolicy.id,\n alertCreation: \"create_alerts_and_incidents\",\n});\nconst csImpact = new pagerduty.IncidentCustomField(\"cs_impact\", {\n name: \"impact\",\n dataType: \"string\",\n fieldType: \"single_value\",\n});\nconst p1 = pagerduty.getPriority({\n name: \"P1\",\n});\nconst www = new pagerduty.EventOrchestrationService(\"www\", {\n service: exampleService.id,\n enableEventOrchestrationForService: true,\n sets: [\n {\n id: \"start\",\n rules: [{\n label: \"Always apply some consistent event transformations to all events\",\n actions: {\n variables: [{\n name: \"hostname\",\n path: \"event.component\",\n value: \"hostname: (.*)\",\n type: \"regex\",\n }],\n extractions: [\n {\n template: \"{{variables.hostname}}\",\n target: \"event.custom_details.hostname\",\n },\n {\n source: \"event.source\",\n regex: \"www (.*) service\",\n target: \"event.source\",\n },\n ],\n routeTo: \"step-two\",\n },\n }],\n },\n {\n id: \"step-two\",\n rules: [\n {\n label: \"All critical alerts should be treated as P1 incident\",\n conditions: [{\n expression: \"event.severity matches 'critical'\",\n }],\n actions: {\n annotate: \"Please use our P1 runbook: https://docs.test/p1-runbook\",\n priority: p1.then(p1 =\u003e p1.id),\n incidentCustomFieldUpdates: [{\n id: csImpact.id,\n value: \"High Impact\",\n }],\n },\n },\n {\n label: \"If there's something wrong on the canary let the team know about it in our deployments Slack channel\",\n conditions: [{\n expression: \"event.custom_details.hostname matches part 'canary'\",\n }],\n actions: {\n automationAction: {\n name: \"Canary Slack Notification\",\n url: \"https://our-slack-listerner.test/canary-notification\",\n autoSend: true,\n parameters: [\n {\n key: \"channel\",\n value: \"#my-team-channel\",\n },\n {\n key: \"message\",\n value: \"something is wrong with the canary deployment\",\n },\n ],\n headers: [{\n key: \"X-Notification-Source\",\n value: \"PagerDuty Incident Webhook\",\n }],\n },\n },\n },\n {\n label: \"Never bother the on-call for info-level events outside of work hours\",\n conditions: [{\n expression: \"event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)\",\n }],\n actions: {\n suppress: true,\n },\n },\n ],\n },\n ],\n catchAll: {\n actions: {},\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_pagerduty as pagerduty\n\nengineering = pagerduty.Team(\"engineering\", name=\"Engineering\")\nexample = pagerduty.User(\"example\",\n name=\"Earline Greenholt\",\n email=\"125.greenholt.earline@graham.name\")\nfoo = pagerduty.TeamMembership(\"foo\",\n user_id=example.id,\n team_id=engineering.id,\n role=\"manager\")\nexample_escalation_policy = pagerduty.EscalationPolicy(\"example\",\n name=\"Engineering Escalation Policy\",\n num_loops=2,\n rules=[pagerduty.EscalationPolicyRuleArgs(\n escalation_delay_in_minutes=10,\n targets=[pagerduty.EscalationPolicyRuleTargetArgs(\n type=\"user_reference\",\n id=example.id,\n )],\n )])\nexample_service = pagerduty.Service(\"example\",\n name=\"My Web App\",\n auto_resolve_timeout=\"14400\",\n acknowledgement_timeout=\"600\",\n escalation_policy=example_escalation_policy.id,\n alert_creation=\"create_alerts_and_incidents\")\ncs_impact = pagerduty.IncidentCustomField(\"cs_impact\",\n name=\"impact\",\n data_type=\"string\",\n field_type=\"single_value\")\np1 = pagerduty.get_priority(name=\"P1\")\nwww = pagerduty.EventOrchestrationService(\"www\",\n service=example_service.id,\n enable_event_orchestration_for_service=True,\n sets=[\n pagerduty.EventOrchestrationServiceSetArgs(\n id=\"start\",\n rules=[pagerduty.EventOrchestrationServiceSetRuleArgs(\n label=\"Always apply some consistent event transformations to all events\",\n actions=pagerduty.EventOrchestrationServiceSetRuleActionsArgs(\n variables=[pagerduty.EventOrchestrationServiceSetRuleActionsVariableArgs(\n name=\"hostname\",\n path=\"event.component\",\n value=\"hostname: (.*)\",\n type=\"regex\",\n )],\n extractions=[\n pagerduty.EventOrchestrationServiceSetRuleActionsExtractionArgs(\n template=\"{{variables.hostname}}\",\n target=\"event.custom_details.hostname\",\n ),\n pagerduty.EventOrchestrationServiceSetRuleActionsExtractionArgs(\n source=\"event.source\",\n regex=\"www (.*) service\",\n target=\"event.source\",\n ),\n ],\n route_to=\"step-two\",\n ),\n )],\n ),\n pagerduty.EventOrchestrationServiceSetArgs(\n id=\"step-two\",\n rules=[\n pagerduty.EventOrchestrationServiceSetRuleArgs(\n label=\"All critical alerts should be treated as P1 incident\",\n conditions=[pagerduty.EventOrchestrationServiceSetRuleConditionArgs(\n expression=\"event.severity matches 'critical'\",\n )],\n actions=pagerduty.EventOrchestrationServiceSetRuleActionsArgs(\n annotate=\"Please use our P1 runbook: https://docs.test/p1-runbook\",\n priority=p1.id,\n incident_custom_field_updates=[pagerduty.EventOrchestrationServiceSetRuleActionsIncidentCustomFieldUpdateArgs(\n id=cs_impact.id,\n value=\"High Impact\",\n )],\n ),\n ),\n pagerduty.EventOrchestrationServiceSetRuleArgs(\n label=\"If there's something wrong on the canary let the team know about it in our deployments Slack channel\",\n conditions=[pagerduty.EventOrchestrationServiceSetRuleConditionArgs(\n expression=\"event.custom_details.hostname matches part 'canary'\",\n )],\n actions=pagerduty.EventOrchestrationServiceSetRuleActionsArgs(\n automation_action=pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionArgs(\n name=\"Canary Slack Notification\",\n url=\"https://our-slack-listerner.test/canary-notification\",\n auto_send=True,\n parameters=[\n pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionParameterArgs(\n key=\"channel\",\n value=\"#my-team-channel\",\n ),\n pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionParameterArgs(\n key=\"message\",\n value=\"something is wrong with the canary deployment\",\n ),\n ],\n headers=[pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionHeaderArgs(\n key=\"X-Notification-Source\",\n value=\"PagerDuty Incident Webhook\",\n )],\n ),\n ),\n ),\n pagerduty.EventOrchestrationServiceSetRuleArgs(\n label=\"Never bother the on-call for info-level events outside of work hours\",\n conditions=[pagerduty.EventOrchestrationServiceSetRuleConditionArgs(\n expression=\"event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)\",\n )],\n actions=pagerduty.EventOrchestrationServiceSetRuleActionsArgs(\n suppress=True,\n ),\n ),\n ],\n ),\n ],\n catch_all=pagerduty.EventOrchestrationServiceCatchAllArgs(\n actions=pagerduty.EventOrchestrationServiceCatchAllActionsArgs(),\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Pagerduty = Pulumi.Pagerduty;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var engineering = new Pagerduty.Team(\"engineering\", new()\n {\n Name = \"Engineering\",\n });\n\n var example = new Pagerduty.User(\"example\", new()\n {\n Name = \"Earline Greenholt\",\n Email = \"125.greenholt.earline@graham.name\",\n });\n\n var foo = new Pagerduty.TeamMembership(\"foo\", new()\n {\n UserId = example.Id,\n TeamId = engineering.Id,\n Role = \"manager\",\n });\n\n var exampleEscalationPolicy = new Pagerduty.EscalationPolicy(\"example\", new()\n {\n Name = \"Engineering Escalation Policy\",\n NumLoops = 2,\n Rules = new[]\n {\n new Pagerduty.Inputs.EscalationPolicyRuleArgs\n {\n EscalationDelayInMinutes = 10,\n Targets = new[]\n {\n new Pagerduty.Inputs.EscalationPolicyRuleTargetArgs\n {\n Type = \"user_reference\",\n Id = example.Id,\n },\n },\n },\n },\n });\n\n var exampleService = new Pagerduty.Service(\"example\", new()\n {\n Name = \"My Web App\",\n AutoResolveTimeout = \"14400\",\n AcknowledgementTimeout = \"600\",\n EscalationPolicy = exampleEscalationPolicy.Id,\n AlertCreation = \"create_alerts_and_incidents\",\n });\n\n var csImpact = new Pagerduty.IncidentCustomField(\"cs_impact\", new()\n {\n Name = \"impact\",\n DataType = \"string\",\n FieldType = \"single_value\",\n });\n\n var p1 = Pagerduty.GetPriority.Invoke(new()\n {\n Name = \"P1\",\n });\n\n var www = new Pagerduty.EventOrchestrationService(\"www\", new()\n {\n Service = exampleService.Id,\n EnableEventOrchestrationForService = true,\n Sets = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetArgs\n {\n Id = \"start\",\n Rules = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleArgs\n {\n Label = \"Always apply some consistent event transformations to all events\",\n Actions = new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsArgs\n {\n Variables = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsVariableArgs\n {\n Name = \"hostname\",\n Path = \"event.component\",\n Value = \"hostname: (.*)\",\n Type = \"regex\",\n },\n },\n Extractions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsExtractionArgs\n {\n Template = \"{{variables.hostname}}\",\n Target = \"event.custom_details.hostname\",\n },\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsExtractionArgs\n {\n Source = \"event.source\",\n Regex = \"www (.*) service\",\n Target = \"event.source\",\n },\n },\n RouteTo = \"step-two\",\n },\n },\n },\n },\n new Pagerduty.Inputs.EventOrchestrationServiceSetArgs\n {\n Id = \"step-two\",\n Rules = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleArgs\n {\n Label = \"All critical alerts should be treated as P1 incident\",\n Conditions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleConditionArgs\n {\n Expression = \"event.severity matches 'critical'\",\n },\n },\n Actions = new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsArgs\n {\n Annotate = \"Please use our P1 runbook: https://docs.test/p1-runbook\",\n Priority = p1.Apply(getPriorityResult =\u003e getPriorityResult.Id),\n IncidentCustomFieldUpdates = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsIncidentCustomFieldUpdateArgs\n {\n Id = csImpact.Id,\n Value = \"High Impact\",\n },\n },\n },\n },\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleArgs\n {\n Label = \"If there's something wrong on the canary let the team know about it in our deployments Slack channel\",\n Conditions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleConditionArgs\n {\n Expression = \"event.custom_details.hostname matches part 'canary'\",\n },\n },\n Actions = new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsArgs\n {\n AutomationAction = new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsAutomationActionArgs\n {\n Name = \"Canary Slack Notification\",\n Url = \"https://our-slack-listerner.test/canary-notification\",\n AutoSend = true,\n Parameters = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsAutomationActionParameterArgs\n {\n Key = \"channel\",\n Value = \"#my-team-channel\",\n },\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsAutomationActionParameterArgs\n {\n Key = \"message\",\n Value = \"something is wrong with the canary deployment\",\n },\n },\n Headers = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsAutomationActionHeaderArgs\n {\n Key = \"X-Notification-Source\",\n Value = \"PagerDuty Incident Webhook\",\n },\n },\n },\n },\n },\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleArgs\n {\n Label = \"Never bother the on-call for info-level events outside of work hours\",\n Conditions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleConditionArgs\n {\n Expression = \"event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)\",\n },\n },\n Actions = new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsArgs\n {\n Suppress = true,\n },\n },\n },\n },\n },\n CatchAll = new Pagerduty.Inputs.EventOrchestrationServiceCatchAllArgs\n {\n Actions = null,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-pagerduty/sdk/v4/go/pagerduty\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tengineering, err := pagerduty.NewTeam(ctx, \"engineering\", \u0026pagerduty.TeamArgs{\n\t\t\tName: pulumi.String(\"Engineering\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := pagerduty.NewUser(ctx, \"example\", \u0026pagerduty.UserArgs{\n\t\t\tName: pulumi.String(\"Earline Greenholt\"),\n\t\t\tEmail: pulumi.String(\"125.greenholt.earline@graham.name\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = pagerduty.NewTeamMembership(ctx, \"foo\", \u0026pagerduty.TeamMembershipArgs{\n\t\t\tUserId: example.ID(),\n\t\t\tTeamId: engineering.ID(),\n\t\t\tRole: pulumi.String(\"manager\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleEscalationPolicy, err := pagerduty.NewEscalationPolicy(ctx, \"example\", \u0026pagerduty.EscalationPolicyArgs{\n\t\t\tName: pulumi.String(\"Engineering Escalation Policy\"),\n\t\t\tNumLoops: pulumi.Int(2),\n\t\t\tRules: pagerduty.EscalationPolicyRuleArray{\n\t\t\t\t\u0026pagerduty.EscalationPolicyRuleArgs{\n\t\t\t\t\tEscalationDelayInMinutes: pulumi.Int(10),\n\t\t\t\t\tTargets: pagerduty.EscalationPolicyRuleTargetArray{\n\t\t\t\t\t\t\u0026pagerduty.EscalationPolicyRuleTargetArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"user_reference\"),\n\t\t\t\t\t\t\tId: example.ID(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleService, err := pagerduty.NewService(ctx, \"example\", \u0026pagerduty.ServiceArgs{\n\t\t\tName: pulumi.String(\"My Web App\"),\n\t\t\tAutoResolveTimeout: pulumi.String(\"14400\"),\n\t\t\tAcknowledgementTimeout: pulumi.String(\"600\"),\n\t\t\tEscalationPolicy: exampleEscalationPolicy.ID(),\n\t\t\tAlertCreation: pulumi.String(\"create_alerts_and_incidents\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcsImpact, err := pagerduty.NewIncidentCustomField(ctx, \"cs_impact\", \u0026pagerduty.IncidentCustomFieldArgs{\n\t\t\tName: pulumi.String(\"impact\"),\n\t\t\tDataType: pulumi.String(\"string\"),\n\t\t\tFieldType: pulumi.String(\"single_value\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tp1, err := pagerduty.GetPriority(ctx, \u0026pagerduty.GetPriorityArgs{\n\t\t\tName: \"P1\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = pagerduty.NewEventOrchestrationService(ctx, \"www\", \u0026pagerduty.EventOrchestrationServiceArgs{\n\t\t\tService: exampleService.ID(),\n\t\t\tEnableEventOrchestrationForService: pulumi.Bool(true),\n\t\t\tSets: pagerduty.EventOrchestrationServiceSetArray{\n\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetArgs{\n\t\t\t\t\tId: pulumi.String(\"start\"),\n\t\t\t\t\tRules: pagerduty.EventOrchestrationServiceSetRuleArray{\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"Always apply some consistent event transformations to all events\"),\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationServiceSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tVariables: pagerduty.EventOrchestrationServiceSetRuleActionsVariableArray{\n\t\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleActionsVariableArgs{\n\t\t\t\t\t\t\t\t\t\tName: pulumi.String(\"hostname\"),\n\t\t\t\t\t\t\t\t\t\tPath: pulumi.String(\"event.component\"),\n\t\t\t\t\t\t\t\t\t\tValue: pulumi.String(\"hostname: (.*)\"),\n\t\t\t\t\t\t\t\t\t\tType: pulumi.String(\"regex\"),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tExtractions: pagerduty.EventOrchestrationServiceSetRuleActionsExtractionArray{\n\t\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleActionsExtractionArgs{\n\t\t\t\t\t\t\t\t\t\tTemplate: pulumi.String(\"{{variables.hostname}}\"),\n\t\t\t\t\t\t\t\t\t\tTarget: pulumi.String(\"event.custom_details.hostname\"),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleActionsExtractionArgs{\n\t\t\t\t\t\t\t\t\t\tSource: pulumi.String(\"event.source\"),\n\t\t\t\t\t\t\t\t\t\tRegex: pulumi.String(\"www (.*) service\"),\n\t\t\t\t\t\t\t\t\t\tTarget: pulumi.String(\"event.source\"),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tRouteTo: pulumi.String(\"step-two\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetArgs{\n\t\t\t\t\tId: pulumi.String(\"step-two\"),\n\t\t\t\t\tRules: pagerduty.EventOrchestrationServiceSetRuleArray{\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"All critical alerts should be treated as P1 incident\"),\n\t\t\t\t\t\t\tConditions: pagerduty.EventOrchestrationServiceSetRuleConditionArray{\n\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleConditionArgs{\n\t\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.severity matches 'critical'\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationServiceSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tAnnotate: pulumi.String(\"Please use our P1 runbook: https://docs.test/p1-runbook\"),\n\t\t\t\t\t\t\t\tPriority: pulumi.String(p1.Id),\n\t\t\t\t\t\t\t\tIncidentCustomFieldUpdates: pagerduty.EventOrchestrationServiceSetRuleActionsIncidentCustomFieldUpdateArray{\n\t\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleActionsIncidentCustomFieldUpdateArgs{\n\t\t\t\t\t\t\t\t\t\tId: csImpact.ID(),\n\t\t\t\t\t\t\t\t\t\tValue: pulumi.String(\"High Impact\"),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"If there's something wrong on the canary let the team know about it in our deployments Slack channel\"),\n\t\t\t\t\t\t\tConditions: pagerduty.EventOrchestrationServiceSetRuleConditionArray{\n\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleConditionArgs{\n\t\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.custom_details.hostname matches part 'canary'\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationServiceSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tAutomationAction: \u0026pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionArgs{\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"Canary Slack Notification\"),\n\t\t\t\t\t\t\t\t\tUrl: pulumi.String(\"https://our-slack-listerner.test/canary-notification\"),\n\t\t\t\t\t\t\t\t\tAutoSend: pulumi.Bool(true),\n\t\t\t\t\t\t\t\t\tParameters: pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionParameterArray{\n\t\t\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionParameterArgs{\n\t\t\t\t\t\t\t\t\t\t\tKey: pulumi.String(\"channel\"),\n\t\t\t\t\t\t\t\t\t\t\tValue: pulumi.String(\"#my-team-channel\"),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionParameterArgs{\n\t\t\t\t\t\t\t\t\t\t\tKey: pulumi.String(\"message\"),\n\t\t\t\t\t\t\t\t\t\t\tValue: pulumi.String(\"something is wrong with the canary deployment\"),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tHeaders: pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionHeaderArray{\n\t\t\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionHeaderArgs{\n\t\t\t\t\t\t\t\t\t\t\tKey: pulumi.String(\"X-Notification-Source\"),\n\t\t\t\t\t\t\t\t\t\t\tValue: pulumi.String(\"PagerDuty Incident Webhook\"),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"Never bother the on-call for info-level events outside of work hours\"),\n\t\t\t\t\t\t\tConditions: pagerduty.EventOrchestrationServiceSetRuleConditionArray{\n\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleConditionArgs{\n\t\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationServiceSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tSuppress: pulumi.Bool(true),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCatchAll: \u0026pagerduty.EventOrchestrationServiceCatchAllArgs{\n\t\t\t\tActions: nil,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.pagerduty.Team;\nimport com.pulumi.pagerduty.TeamArgs;\nimport com.pulumi.pagerduty.User;\nimport com.pulumi.pagerduty.UserArgs;\nimport com.pulumi.pagerduty.TeamMembership;\nimport com.pulumi.pagerduty.TeamMembershipArgs;\nimport com.pulumi.pagerduty.EscalationPolicy;\nimport com.pulumi.pagerduty.EscalationPolicyArgs;\nimport com.pulumi.pagerduty.inputs.EscalationPolicyRuleArgs;\nimport com.pulumi.pagerduty.Service;\nimport com.pulumi.pagerduty.ServiceArgs;\nimport com.pulumi.pagerduty.IncidentCustomField;\nimport com.pulumi.pagerduty.IncidentCustomFieldArgs;\nimport com.pulumi.pagerduty.PagerdutyFunctions;\nimport com.pulumi.pagerduty.inputs.GetPriorityArgs;\nimport com.pulumi.pagerduty.EventOrchestrationService;\nimport com.pulumi.pagerduty.EventOrchestrationServiceArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationServiceSetArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationServiceCatchAllArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationServiceCatchAllActionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var engineering = new Team(\"engineering\", TeamArgs.builder()\n .name(\"Engineering\")\n .build());\n\n var example = new User(\"example\", UserArgs.builder()\n .name(\"Earline Greenholt\")\n .email(\"125.greenholt.earline@graham.name\")\n .build());\n\n var foo = new TeamMembership(\"foo\", TeamMembershipArgs.builder()\n .userId(example.id())\n .teamId(engineering.id())\n .role(\"manager\")\n .build());\n\n var exampleEscalationPolicy = new EscalationPolicy(\"exampleEscalationPolicy\", EscalationPolicyArgs.builder()\n .name(\"Engineering Escalation Policy\")\n .numLoops(2)\n .rules(EscalationPolicyRuleArgs.builder()\n .escalationDelayInMinutes(10)\n .targets(EscalationPolicyRuleTargetArgs.builder()\n .type(\"user_reference\")\n .id(example.id())\n .build())\n .build())\n .build());\n\n var exampleService = new Service(\"exampleService\", ServiceArgs.builder()\n .name(\"My Web App\")\n .autoResolveTimeout(14400)\n .acknowledgementTimeout(600)\n .escalationPolicy(exampleEscalationPolicy.id())\n .alertCreation(\"create_alerts_and_incidents\")\n .build());\n\n var csImpact = new IncidentCustomField(\"csImpact\", IncidentCustomFieldArgs.builder()\n .name(\"impact\")\n .dataType(\"string\")\n .fieldType(\"single_value\")\n .build());\n\n final var p1 = PagerdutyFunctions.getPriority(GetPriorityArgs.builder()\n .name(\"P1\")\n .build());\n\n var www = new EventOrchestrationService(\"www\", EventOrchestrationServiceArgs.builder()\n .service(exampleService.id())\n .enableEventOrchestrationForService(true)\n .sets( \n EventOrchestrationServiceSetArgs.builder()\n .id(\"start\")\n .rules(EventOrchestrationServiceSetRuleArgs.builder()\n .label(\"Always apply some consistent event transformations to all events\")\n .actions(EventOrchestrationServiceSetRuleActionsArgs.builder()\n .variables(EventOrchestrationServiceSetRuleActionsVariableArgs.builder()\n .name(\"hostname\")\n .path(\"event.component\")\n .value(\"hostname: (.*)\")\n .type(\"regex\")\n .build())\n .extractions( \n EventOrchestrationServiceSetRuleActionsExtractionArgs.builder()\n .template(\"{{variables.hostname}}\")\n .target(\"event.custom_details.hostname\")\n .build(),\n EventOrchestrationServiceSetRuleActionsExtractionArgs.builder()\n .source(\"event.source\")\n .regex(\"www (.*) service\")\n .target(\"event.source\")\n .build())\n .routeTo(\"step-two\")\n .build())\n .build())\n .build(),\n EventOrchestrationServiceSetArgs.builder()\n .id(\"step-two\")\n .rules( \n EventOrchestrationServiceSetRuleArgs.builder()\n .label(\"All critical alerts should be treated as P1 incident\")\n .conditions(EventOrchestrationServiceSetRuleConditionArgs.builder()\n .expression(\"event.severity matches 'critical'\")\n .build())\n .actions(EventOrchestrationServiceSetRuleActionsArgs.builder()\n .annotate(\"Please use our P1 runbook: https://docs.test/p1-runbook\")\n .priority(p1.applyValue(getPriorityResult -\u003e getPriorityResult.id()))\n .incidentCustomFieldUpdates(EventOrchestrationServiceSetRuleActionsIncidentCustomFieldUpdateArgs.builder()\n .id(csImpact.id())\n .value(\"High Impact\")\n .build())\n .build())\n .build(),\n EventOrchestrationServiceSetRuleArgs.builder()\n .label(\"If there's something wrong on the canary let the team know about it in our deployments Slack channel\")\n .conditions(EventOrchestrationServiceSetRuleConditionArgs.builder()\n .expression(\"event.custom_details.hostname matches part 'canary'\")\n .build())\n .actions(EventOrchestrationServiceSetRuleActionsArgs.builder()\n .automationAction(EventOrchestrationServiceSetRuleActionsAutomationActionArgs.builder()\n .name(\"Canary Slack Notification\")\n .url(\"https://our-slack-listerner.test/canary-notification\")\n .autoSend(true)\n .parameters( \n EventOrchestrationServiceSetRuleActionsAutomationActionParameterArgs.builder()\n .key(\"channel\")\n .value(\"#my-team-channel\")\n .build(),\n EventOrchestrationServiceSetRuleActionsAutomationActionParameterArgs.builder()\n .key(\"message\")\n .value(\"something is wrong with the canary deployment\")\n .build())\n .headers(EventOrchestrationServiceSetRuleActionsAutomationActionHeaderArgs.builder()\n .key(\"X-Notification-Source\")\n .value(\"PagerDuty Incident Webhook\")\n .build())\n .build())\n .build())\n .build(),\n EventOrchestrationServiceSetRuleArgs.builder()\n .label(\"Never bother the on-call for info-level events outside of work hours\")\n .conditions(EventOrchestrationServiceSetRuleConditionArgs.builder()\n .expression(\"event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)\")\n .build())\n .actions(EventOrchestrationServiceSetRuleActionsArgs.builder()\n .suppress(true)\n .build())\n .build())\n .build())\n .catchAll(EventOrchestrationServiceCatchAllArgs.builder()\n .actions()\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n engineering:\n type: pagerduty:Team\n properties:\n name: Engineering\n example:\n type: pagerduty:User\n properties:\n name: Earline Greenholt\n email: 125.greenholt.earline@graham.name\n foo:\n type: pagerduty:TeamMembership\n properties:\n userId: ${example.id}\n teamId: ${engineering.id}\n role: manager\n exampleEscalationPolicy:\n type: pagerduty:EscalationPolicy\n name: example\n properties:\n name: Engineering Escalation Policy\n numLoops: 2\n rules:\n - escalationDelayInMinutes: 10\n targets:\n - type: user_reference\n id: ${example.id}\n exampleService:\n type: pagerduty:Service\n name: example\n properties:\n name: My Web App\n autoResolveTimeout: 14400\n acknowledgementTimeout: 600\n escalationPolicy: ${exampleEscalationPolicy.id}\n alertCreation: create_alerts_and_incidents\n csImpact:\n type: pagerduty:IncidentCustomField\n name: cs_impact\n properties:\n name: impact\n dataType: string\n fieldType: single_value\n www:\n type: pagerduty:EventOrchestrationService\n properties:\n service: ${exampleService.id}\n enableEventOrchestrationForService: true\n sets:\n - id: start\n rules:\n - label: Always apply some consistent event transformations to all events\n actions:\n variables:\n - name: hostname\n path: event.component\n value: 'hostname: (.*)'\n type: regex\n extractions:\n - template: '{{variables.hostname}}'\n target: event.custom_details.hostname\n - source: event.source\n regex: www (.*) service\n target: event.source\n routeTo: step-two\n - id: step-two\n rules:\n - label: All critical alerts should be treated as P1 incident\n conditions:\n - expression: event.severity matches 'critical'\n actions:\n annotate: 'Please use our P1 runbook: https://docs.test/p1-runbook'\n priority: ${p1.id}\n incidentCustomFieldUpdates:\n - id: ${csImpact.id}\n value: High Impact\n - label: If there's something wrong on the canary let the team know about it in our deployments Slack channel\n conditions:\n - expression: event.custom_details.hostname matches part 'canary'\n actions:\n automationAction:\n name: Canary Slack Notification\n url: https://our-slack-listerner.test/canary-notification\n autoSend: true\n parameters:\n - key: channel\n value: '#my-team-channel'\n - key: message\n value: something is wrong with the canary deployment\n headers:\n - key: X-Notification-Source\n value: PagerDuty Incident Webhook\n - label: Never bother the on-call for info-level events outside of work hours\n conditions:\n - expression: event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)\n actions:\n suppress: true\n catchAll:\n actions: {}\nvariables:\n p1:\n fn::invoke:\n Function: pagerduty:getPriority\n Arguments:\n name: P1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nService Orchestration can be imported using the `id` of the Service, e.g.\n\n```sh\n$ pulumi import pagerduty:index/eventOrchestrationService:EventOrchestrationService service PFEODA7\n```\n", + "description": "A [Service Orchestration](https://support.pagerduty.com/docs/event-orchestration#service-orchestrations) allows you to create a set of Event Rules. The Service Orchestration evaluates Events sent to this Service against each of its rules, beginning with the rules in the \"start\" set. When a matching rule is found, it can modify and enhance the event and can route the event to another set of rules within this Service Orchestration for further processing.\n\n\u003e If you have a Service that uses [Service Event Rules](https://support.pagerduty.com/docs/rulesets#service-event-rules), you can switch to [Service Orchestrations](https://support.pagerduty.com/docs/event-orchestration#service-orchestrations) at any time setting the attribute `enable_event_orchestration_for_service` to `true`. Please read the [Switch to Service Orchestrations](https://support.pagerduty.com/docs/event-orchestration#switch-to-service-orchestrations) instructions for more information.\n\n## Example of configuring a Service Orchestration\n\nThis example shows creating `Team`, `User`, `Escalation Policy`, and `Service` resources followed by creating a Service Orchestration to handle Events sent to that Service.\n\nThis example also shows using the pagerduty.getPriority data sources to configure `priority` and `escalation_policy` actions for a rule.\n\nThis example shows a Service Orchestration that has nested sets: a rule in the \"start\" set has a `route_to` action pointing at the \"step-two\" set.\n\nThe `catch_all` actions will be applied if an Event reaches the end of any set without matching any rules in that set. In this example the `catch_all` doesn't have any `actions` so it'll leave events as-is.\n\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as pagerduty from \"@pulumi/pagerduty\";\n\nconst engineering = new pagerduty.Team(\"engineering\", {name: \"Engineering\"});\nconst example = new pagerduty.User(\"example\", {\n name: \"Earline Greenholt\",\n email: \"125.greenholt.earline@graham.name\",\n});\nconst foo = new pagerduty.TeamMembership(\"foo\", {\n userId: example.id,\n teamId: engineering.id,\n role: \"manager\",\n});\nconst exampleEscalationPolicy = new pagerduty.EscalationPolicy(\"example\", {\n name: \"Engineering Escalation Policy\",\n numLoops: 2,\n rules: [{\n escalationDelayInMinutes: 10,\n targets: [{\n type: \"user_reference\",\n id: example.id,\n }],\n }],\n});\nconst exampleService = new pagerduty.Service(\"example\", {\n name: \"My Web App\",\n autoResolveTimeout: \"14400\",\n acknowledgementTimeout: \"600\",\n escalationPolicy: exampleEscalationPolicy.id,\n alertCreation: \"create_alerts_and_incidents\",\n});\nconst csImpact = new pagerduty.IncidentCustomField(\"cs_impact\", {\n name: \"impact\",\n dataType: \"string\",\n fieldType: \"single_value\",\n});\nconst p1 = pagerduty.getPriority({\n name: \"P1\",\n});\nconst sreEscPolicy = pagerduty.getEscalationPolicy({\n name: \"SRE Escalation Policy\",\n});\nconst www = new pagerduty.EventOrchestrationService(\"www\", {\n service: exampleService.id,\n enableEventOrchestrationForService: true,\n sets: [\n {\n id: \"start\",\n rules: [{\n label: \"Always apply some consistent event transformations to all events\",\n actions: {\n variables: [{\n name: \"hostname\",\n path: \"event.component\",\n value: \"hostname: (.*)\",\n type: \"regex\",\n }],\n extractions: [\n {\n template: \"{{variables.hostname}}\",\n target: \"event.custom_details.hostname\",\n },\n {\n source: \"event.source\",\n regex: \"www (.*) service\",\n target: \"event.source\",\n },\n ],\n routeTo: \"step-two\",\n },\n }],\n },\n {\n id: \"step-two\",\n rules: [\n {\n label: \"All critical alerts should be treated as P1 incident\",\n conditions: [{\n expression: \"event.severity matches 'critical'\",\n }],\n actions: {\n annotate: \"Please use our P1 runbook: https://docs.test/p1-runbook\",\n priority: p1.then(p1 =\u003e p1.id),\n incidentCustomFieldUpdates: [{\n id: csImpact.id,\n value: \"High Impact\",\n }],\n },\n },\n {\n label: \"If any of the API apps are unavailable, page the SRE team\",\n conditions: [{\n expression: \"event.custom_details.service_name matches part '-api' and event.custom_details.status_code matches '502'\",\n }],\n actions: {\n escalationPolicy: sreEscPolicy.then(sreEscPolicy =\u003e sreEscPolicy.id),\n },\n },\n {\n label: \"If there's something wrong on the canary let the team know about it in our deployments Slack channel\",\n conditions: [{\n expression: \"event.custom_details.hostname matches part 'canary'\",\n }],\n actions: {\n automationAction: {\n name: \"Canary Slack Notification\",\n url: \"https://our-slack-listerner.test/canary-notification\",\n autoSend: true,\n parameters: [\n {\n key: \"channel\",\n value: \"#my-team-channel\",\n },\n {\n key: \"message\",\n value: \"something is wrong with the canary deployment\",\n },\n ],\n headers: [{\n key: \"X-Notification-Source\",\n value: \"PagerDuty Incident Webhook\",\n }],\n },\n },\n },\n {\n label: \"Never bother the on-call for info-level events outside of work hours\",\n conditions: [{\n expression: \"event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)\",\n }],\n actions: {\n suppress: true,\n },\n },\n ],\n },\n ],\n catchAll: {\n actions: {},\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_pagerduty as pagerduty\n\nengineering = pagerduty.Team(\"engineering\", name=\"Engineering\")\nexample = pagerduty.User(\"example\",\n name=\"Earline Greenholt\",\n email=\"125.greenholt.earline@graham.name\")\nfoo = pagerduty.TeamMembership(\"foo\",\n user_id=example.id,\n team_id=engineering.id,\n role=\"manager\")\nexample_escalation_policy = pagerduty.EscalationPolicy(\"example\",\n name=\"Engineering Escalation Policy\",\n num_loops=2,\n rules=[pagerduty.EscalationPolicyRuleArgs(\n escalation_delay_in_minutes=10,\n targets=[pagerduty.EscalationPolicyRuleTargetArgs(\n type=\"user_reference\",\n id=example.id,\n )],\n )])\nexample_service = pagerduty.Service(\"example\",\n name=\"My Web App\",\n auto_resolve_timeout=\"14400\",\n acknowledgement_timeout=\"600\",\n escalation_policy=example_escalation_policy.id,\n alert_creation=\"create_alerts_and_incidents\")\ncs_impact = pagerduty.IncidentCustomField(\"cs_impact\",\n name=\"impact\",\n data_type=\"string\",\n field_type=\"single_value\")\np1 = pagerduty.get_priority(name=\"P1\")\nsre_esc_policy = pagerduty.get_escalation_policy(name=\"SRE Escalation Policy\")\nwww = pagerduty.EventOrchestrationService(\"www\",\n service=example_service.id,\n enable_event_orchestration_for_service=True,\n sets=[\n pagerduty.EventOrchestrationServiceSetArgs(\n id=\"start\",\n rules=[pagerduty.EventOrchestrationServiceSetRuleArgs(\n label=\"Always apply some consistent event transformations to all events\",\n actions=pagerduty.EventOrchestrationServiceSetRuleActionsArgs(\n variables=[pagerduty.EventOrchestrationServiceSetRuleActionsVariableArgs(\n name=\"hostname\",\n path=\"event.component\",\n value=\"hostname: (.*)\",\n type=\"regex\",\n )],\n extractions=[\n pagerduty.EventOrchestrationServiceSetRuleActionsExtractionArgs(\n template=\"{{variables.hostname}}\",\n target=\"event.custom_details.hostname\",\n ),\n pagerduty.EventOrchestrationServiceSetRuleActionsExtractionArgs(\n source=\"event.source\",\n regex=\"www (.*) service\",\n target=\"event.source\",\n ),\n ],\n route_to=\"step-two\",\n ),\n )],\n ),\n pagerduty.EventOrchestrationServiceSetArgs(\n id=\"step-two\",\n rules=[\n pagerduty.EventOrchestrationServiceSetRuleArgs(\n label=\"All critical alerts should be treated as P1 incident\",\n conditions=[pagerduty.EventOrchestrationServiceSetRuleConditionArgs(\n expression=\"event.severity matches 'critical'\",\n )],\n actions=pagerduty.EventOrchestrationServiceSetRuleActionsArgs(\n annotate=\"Please use our P1 runbook: https://docs.test/p1-runbook\",\n priority=p1.id,\n incident_custom_field_updates=[pagerduty.EventOrchestrationServiceSetRuleActionsIncidentCustomFieldUpdateArgs(\n id=cs_impact.id,\n value=\"High Impact\",\n )],\n ),\n ),\n pagerduty.EventOrchestrationServiceSetRuleArgs(\n label=\"If any of the API apps are unavailable, page the SRE team\",\n conditions=[pagerduty.EventOrchestrationServiceSetRuleConditionArgs(\n expression=\"event.custom_details.service_name matches part '-api' and event.custom_details.status_code matches '502'\",\n )],\n actions=pagerduty.EventOrchestrationServiceSetRuleActionsArgs(\n escalation_policy=sre_esc_policy.id,\n ),\n ),\n pagerduty.EventOrchestrationServiceSetRuleArgs(\n label=\"If there's something wrong on the canary let the team know about it in our deployments Slack channel\",\n conditions=[pagerduty.EventOrchestrationServiceSetRuleConditionArgs(\n expression=\"event.custom_details.hostname matches part 'canary'\",\n )],\n actions=pagerduty.EventOrchestrationServiceSetRuleActionsArgs(\n automation_action=pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionArgs(\n name=\"Canary Slack Notification\",\n url=\"https://our-slack-listerner.test/canary-notification\",\n auto_send=True,\n parameters=[\n pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionParameterArgs(\n key=\"channel\",\n value=\"#my-team-channel\",\n ),\n pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionParameterArgs(\n key=\"message\",\n value=\"something is wrong with the canary deployment\",\n ),\n ],\n headers=[pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionHeaderArgs(\n key=\"X-Notification-Source\",\n value=\"PagerDuty Incident Webhook\",\n )],\n ),\n ),\n ),\n pagerduty.EventOrchestrationServiceSetRuleArgs(\n label=\"Never bother the on-call for info-level events outside of work hours\",\n conditions=[pagerduty.EventOrchestrationServiceSetRuleConditionArgs(\n expression=\"event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)\",\n )],\n actions=pagerduty.EventOrchestrationServiceSetRuleActionsArgs(\n suppress=True,\n ),\n ),\n ],\n ),\n ],\n catch_all=pagerduty.EventOrchestrationServiceCatchAllArgs(\n actions=pagerduty.EventOrchestrationServiceCatchAllActionsArgs(),\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Pagerduty = Pulumi.Pagerduty;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var engineering = new Pagerduty.Team(\"engineering\", new()\n {\n Name = \"Engineering\",\n });\n\n var example = new Pagerduty.User(\"example\", new()\n {\n Name = \"Earline Greenholt\",\n Email = \"125.greenholt.earline@graham.name\",\n });\n\n var foo = new Pagerduty.TeamMembership(\"foo\", new()\n {\n UserId = example.Id,\n TeamId = engineering.Id,\n Role = \"manager\",\n });\n\n var exampleEscalationPolicy = new Pagerduty.EscalationPolicy(\"example\", new()\n {\n Name = \"Engineering Escalation Policy\",\n NumLoops = 2,\n Rules = new[]\n {\n new Pagerduty.Inputs.EscalationPolicyRuleArgs\n {\n EscalationDelayInMinutes = 10,\n Targets = new[]\n {\n new Pagerduty.Inputs.EscalationPolicyRuleTargetArgs\n {\n Type = \"user_reference\",\n Id = example.Id,\n },\n },\n },\n },\n });\n\n var exampleService = new Pagerduty.Service(\"example\", new()\n {\n Name = \"My Web App\",\n AutoResolveTimeout = \"14400\",\n AcknowledgementTimeout = \"600\",\n EscalationPolicy = exampleEscalationPolicy.Id,\n AlertCreation = \"create_alerts_and_incidents\",\n });\n\n var csImpact = new Pagerduty.IncidentCustomField(\"cs_impact\", new()\n {\n Name = \"impact\",\n DataType = \"string\",\n FieldType = \"single_value\",\n });\n\n var p1 = Pagerduty.GetPriority.Invoke(new()\n {\n Name = \"P1\",\n });\n\n var sreEscPolicy = Pagerduty.GetEscalationPolicy.Invoke(new()\n {\n Name = \"SRE Escalation Policy\",\n });\n\n var www = new Pagerduty.EventOrchestrationService(\"www\", new()\n {\n Service = exampleService.Id,\n EnableEventOrchestrationForService = true,\n Sets = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetArgs\n {\n Id = \"start\",\n Rules = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleArgs\n {\n Label = \"Always apply some consistent event transformations to all events\",\n Actions = new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsArgs\n {\n Variables = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsVariableArgs\n {\n Name = \"hostname\",\n Path = \"event.component\",\n Value = \"hostname: (.*)\",\n Type = \"regex\",\n },\n },\n Extractions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsExtractionArgs\n {\n Template = \"{{variables.hostname}}\",\n Target = \"event.custom_details.hostname\",\n },\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsExtractionArgs\n {\n Source = \"event.source\",\n Regex = \"www (.*) service\",\n Target = \"event.source\",\n },\n },\n RouteTo = \"step-two\",\n },\n },\n },\n },\n new Pagerduty.Inputs.EventOrchestrationServiceSetArgs\n {\n Id = \"step-two\",\n Rules = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleArgs\n {\n Label = \"All critical alerts should be treated as P1 incident\",\n Conditions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleConditionArgs\n {\n Expression = \"event.severity matches 'critical'\",\n },\n },\n Actions = new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsArgs\n {\n Annotate = \"Please use our P1 runbook: https://docs.test/p1-runbook\",\n Priority = p1.Apply(getPriorityResult =\u003e getPriorityResult.Id),\n IncidentCustomFieldUpdates = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsIncidentCustomFieldUpdateArgs\n {\n Id = csImpact.Id,\n Value = \"High Impact\",\n },\n },\n },\n },\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleArgs\n {\n Label = \"If any of the API apps are unavailable, page the SRE team\",\n Conditions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleConditionArgs\n {\n Expression = \"event.custom_details.service_name matches part '-api' and event.custom_details.status_code matches '502'\",\n },\n },\n Actions = new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsArgs\n {\n EscalationPolicy = sreEscPolicy.Apply(getEscalationPolicyResult =\u003e getEscalationPolicyResult.Id),\n },\n },\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleArgs\n {\n Label = \"If there's something wrong on the canary let the team know about it in our deployments Slack channel\",\n Conditions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleConditionArgs\n {\n Expression = \"event.custom_details.hostname matches part 'canary'\",\n },\n },\n Actions = new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsArgs\n {\n AutomationAction = new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsAutomationActionArgs\n {\n Name = \"Canary Slack Notification\",\n Url = \"https://our-slack-listerner.test/canary-notification\",\n AutoSend = true,\n Parameters = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsAutomationActionParameterArgs\n {\n Key = \"channel\",\n Value = \"#my-team-channel\",\n },\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsAutomationActionParameterArgs\n {\n Key = \"message\",\n Value = \"something is wrong with the canary deployment\",\n },\n },\n Headers = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsAutomationActionHeaderArgs\n {\n Key = \"X-Notification-Source\",\n Value = \"PagerDuty Incident Webhook\",\n },\n },\n },\n },\n },\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleArgs\n {\n Label = \"Never bother the on-call for info-level events outside of work hours\",\n Conditions = new[]\n {\n new Pagerduty.Inputs.EventOrchestrationServiceSetRuleConditionArgs\n {\n Expression = \"event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)\",\n },\n },\n Actions = new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsArgs\n {\n Suppress = true,\n },\n },\n },\n },\n },\n CatchAll = new Pagerduty.Inputs.EventOrchestrationServiceCatchAllArgs\n {\n Actions = null,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-pagerduty/sdk/v4/go/pagerduty\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tengineering, err := pagerduty.NewTeam(ctx, \"engineering\", \u0026pagerduty.TeamArgs{\n\t\t\tName: pulumi.String(\"Engineering\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := pagerduty.NewUser(ctx, \"example\", \u0026pagerduty.UserArgs{\n\t\t\tName: pulumi.String(\"Earline Greenholt\"),\n\t\t\tEmail: pulumi.String(\"125.greenholt.earline@graham.name\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = pagerduty.NewTeamMembership(ctx, \"foo\", \u0026pagerduty.TeamMembershipArgs{\n\t\t\tUserId: example.ID(),\n\t\t\tTeamId: engineering.ID(),\n\t\t\tRole: pulumi.String(\"manager\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleEscalationPolicy, err := pagerduty.NewEscalationPolicy(ctx, \"example\", \u0026pagerduty.EscalationPolicyArgs{\n\t\t\tName: pulumi.String(\"Engineering Escalation Policy\"),\n\t\t\tNumLoops: pulumi.Int(2),\n\t\t\tRules: pagerduty.EscalationPolicyRuleArray{\n\t\t\t\t\u0026pagerduty.EscalationPolicyRuleArgs{\n\t\t\t\t\tEscalationDelayInMinutes: pulumi.Int(10),\n\t\t\t\t\tTargets: pagerduty.EscalationPolicyRuleTargetArray{\n\t\t\t\t\t\t\u0026pagerduty.EscalationPolicyRuleTargetArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"user_reference\"),\n\t\t\t\t\t\t\tId: example.ID(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleService, err := pagerduty.NewService(ctx, \"example\", \u0026pagerduty.ServiceArgs{\n\t\t\tName: pulumi.String(\"My Web App\"),\n\t\t\tAutoResolveTimeout: pulumi.String(\"14400\"),\n\t\t\tAcknowledgementTimeout: pulumi.String(\"600\"),\n\t\t\tEscalationPolicy: exampleEscalationPolicy.ID(),\n\t\t\tAlertCreation: pulumi.String(\"create_alerts_and_incidents\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcsImpact, err := pagerduty.NewIncidentCustomField(ctx, \"cs_impact\", \u0026pagerduty.IncidentCustomFieldArgs{\n\t\t\tName: pulumi.String(\"impact\"),\n\t\t\tDataType: pulumi.String(\"string\"),\n\t\t\tFieldType: pulumi.String(\"single_value\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tp1, err := pagerduty.GetPriority(ctx, \u0026pagerduty.GetPriorityArgs{\n\t\t\tName: \"P1\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsreEscPolicy, err := pagerduty.LookupEscalationPolicy(ctx, \u0026pagerduty.LookupEscalationPolicyArgs{\n\t\t\tName: \"SRE Escalation Policy\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = pagerduty.NewEventOrchestrationService(ctx, \"www\", \u0026pagerduty.EventOrchestrationServiceArgs{\n\t\t\tService: exampleService.ID(),\n\t\t\tEnableEventOrchestrationForService: pulumi.Bool(true),\n\t\t\tSets: pagerduty.EventOrchestrationServiceSetArray{\n\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetArgs{\n\t\t\t\t\tId: pulumi.String(\"start\"),\n\t\t\t\t\tRules: pagerduty.EventOrchestrationServiceSetRuleArray{\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"Always apply some consistent event transformations to all events\"),\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationServiceSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tVariables: pagerduty.EventOrchestrationServiceSetRuleActionsVariableArray{\n\t\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleActionsVariableArgs{\n\t\t\t\t\t\t\t\t\t\tName: pulumi.String(\"hostname\"),\n\t\t\t\t\t\t\t\t\t\tPath: pulumi.String(\"event.component\"),\n\t\t\t\t\t\t\t\t\t\tValue: pulumi.String(\"hostname: (.*)\"),\n\t\t\t\t\t\t\t\t\t\tType: pulumi.String(\"regex\"),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tExtractions: pagerduty.EventOrchestrationServiceSetRuleActionsExtractionArray{\n\t\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleActionsExtractionArgs{\n\t\t\t\t\t\t\t\t\t\tTemplate: pulumi.String(\"{{variables.hostname}}\"),\n\t\t\t\t\t\t\t\t\t\tTarget: pulumi.String(\"event.custom_details.hostname\"),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleActionsExtractionArgs{\n\t\t\t\t\t\t\t\t\t\tSource: pulumi.String(\"event.source\"),\n\t\t\t\t\t\t\t\t\t\tRegex: pulumi.String(\"www (.*) service\"),\n\t\t\t\t\t\t\t\t\t\tTarget: pulumi.String(\"event.source\"),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tRouteTo: pulumi.String(\"step-two\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetArgs{\n\t\t\t\t\tId: pulumi.String(\"step-two\"),\n\t\t\t\t\tRules: pagerduty.EventOrchestrationServiceSetRuleArray{\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"All critical alerts should be treated as P1 incident\"),\n\t\t\t\t\t\t\tConditions: pagerduty.EventOrchestrationServiceSetRuleConditionArray{\n\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleConditionArgs{\n\t\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.severity matches 'critical'\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationServiceSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tAnnotate: pulumi.String(\"Please use our P1 runbook: https://docs.test/p1-runbook\"),\n\t\t\t\t\t\t\t\tPriority: pulumi.String(p1.Id),\n\t\t\t\t\t\t\t\tIncidentCustomFieldUpdates: pagerduty.EventOrchestrationServiceSetRuleActionsIncidentCustomFieldUpdateArray{\n\t\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleActionsIncidentCustomFieldUpdateArgs{\n\t\t\t\t\t\t\t\t\t\tId: csImpact.ID(),\n\t\t\t\t\t\t\t\t\t\tValue: pulumi.String(\"High Impact\"),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"If any of the API apps are unavailable, page the SRE team\"),\n\t\t\t\t\t\t\tConditions: pagerduty.EventOrchestrationServiceSetRuleConditionArray{\n\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleConditionArgs{\n\t\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.custom_details.service_name matches part '-api' and event.custom_details.status_code matches '502'\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationServiceSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tEscalationPolicy: pulumi.String(sreEscPolicy.Id),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"If there's something wrong on the canary let the team know about it in our deployments Slack channel\"),\n\t\t\t\t\t\t\tConditions: pagerduty.EventOrchestrationServiceSetRuleConditionArray{\n\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleConditionArgs{\n\t\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.custom_details.hostname matches part 'canary'\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationServiceSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tAutomationAction: \u0026pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionArgs{\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"Canary Slack Notification\"),\n\t\t\t\t\t\t\t\t\tUrl: pulumi.String(\"https://our-slack-listerner.test/canary-notification\"),\n\t\t\t\t\t\t\t\t\tAutoSend: pulumi.Bool(true),\n\t\t\t\t\t\t\t\t\tParameters: pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionParameterArray{\n\t\t\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionParameterArgs{\n\t\t\t\t\t\t\t\t\t\t\tKey: pulumi.String(\"channel\"),\n\t\t\t\t\t\t\t\t\t\t\tValue: pulumi.String(\"#my-team-channel\"),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionParameterArgs{\n\t\t\t\t\t\t\t\t\t\t\tKey: pulumi.String(\"message\"),\n\t\t\t\t\t\t\t\t\t\t\tValue: pulumi.String(\"something is wrong with the canary deployment\"),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tHeaders: pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionHeaderArray{\n\t\t\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleActionsAutomationActionHeaderArgs{\n\t\t\t\t\t\t\t\t\t\t\tKey: pulumi.String(\"X-Notification-Source\"),\n\t\t\t\t\t\t\t\t\t\t\tValue: pulumi.String(\"PagerDuty Incident Webhook\"),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"Never bother the on-call for info-level events outside of work hours\"),\n\t\t\t\t\t\t\tConditions: pagerduty.EventOrchestrationServiceSetRuleConditionArray{\n\t\t\t\t\t\t\t\t\u0026pagerduty.EventOrchestrationServiceSetRuleConditionArgs{\n\t\t\t\t\t\t\t\t\tExpression: pulumi.String(\"event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tActions: \u0026pagerduty.EventOrchestrationServiceSetRuleActionsArgs{\n\t\t\t\t\t\t\t\tSuppress: pulumi.Bool(true),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCatchAll: \u0026pagerduty.EventOrchestrationServiceCatchAllArgs{\n\t\t\t\tActions: nil,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.pagerduty.Team;\nimport com.pulumi.pagerduty.TeamArgs;\nimport com.pulumi.pagerduty.User;\nimport com.pulumi.pagerduty.UserArgs;\nimport com.pulumi.pagerduty.TeamMembership;\nimport com.pulumi.pagerduty.TeamMembershipArgs;\nimport com.pulumi.pagerduty.EscalationPolicy;\nimport com.pulumi.pagerduty.EscalationPolicyArgs;\nimport com.pulumi.pagerduty.inputs.EscalationPolicyRuleArgs;\nimport com.pulumi.pagerduty.Service;\nimport com.pulumi.pagerduty.ServiceArgs;\nimport com.pulumi.pagerduty.IncidentCustomField;\nimport com.pulumi.pagerduty.IncidentCustomFieldArgs;\nimport com.pulumi.pagerduty.PagerdutyFunctions;\nimport com.pulumi.pagerduty.inputs.GetPriorityArgs;\nimport com.pulumi.pagerduty.inputs.GetEscalationPolicyArgs;\nimport com.pulumi.pagerduty.EventOrchestrationService;\nimport com.pulumi.pagerduty.EventOrchestrationServiceArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationServiceSetArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationServiceCatchAllArgs;\nimport com.pulumi.pagerduty.inputs.EventOrchestrationServiceCatchAllActionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var engineering = new Team(\"engineering\", TeamArgs.builder()\n .name(\"Engineering\")\n .build());\n\n var example = new User(\"example\", UserArgs.builder()\n .name(\"Earline Greenholt\")\n .email(\"125.greenholt.earline@graham.name\")\n .build());\n\n var foo = new TeamMembership(\"foo\", TeamMembershipArgs.builder()\n .userId(example.id())\n .teamId(engineering.id())\n .role(\"manager\")\n .build());\n\n var exampleEscalationPolicy = new EscalationPolicy(\"exampleEscalationPolicy\", EscalationPolicyArgs.builder()\n .name(\"Engineering Escalation Policy\")\n .numLoops(2)\n .rules(EscalationPolicyRuleArgs.builder()\n .escalationDelayInMinutes(10)\n .targets(EscalationPolicyRuleTargetArgs.builder()\n .type(\"user_reference\")\n .id(example.id())\n .build())\n .build())\n .build());\n\n var exampleService = new Service(\"exampleService\", ServiceArgs.builder()\n .name(\"My Web App\")\n .autoResolveTimeout(14400)\n .acknowledgementTimeout(600)\n .escalationPolicy(exampleEscalationPolicy.id())\n .alertCreation(\"create_alerts_and_incidents\")\n .build());\n\n var csImpact = new IncidentCustomField(\"csImpact\", IncidentCustomFieldArgs.builder()\n .name(\"impact\")\n .dataType(\"string\")\n .fieldType(\"single_value\")\n .build());\n\n final var p1 = PagerdutyFunctions.getPriority(GetPriorityArgs.builder()\n .name(\"P1\")\n .build());\n\n final var sreEscPolicy = PagerdutyFunctions.getEscalationPolicy(GetEscalationPolicyArgs.builder()\n .name(\"SRE Escalation Policy\")\n .build());\n\n var www = new EventOrchestrationService(\"www\", EventOrchestrationServiceArgs.builder()\n .service(exampleService.id())\n .enableEventOrchestrationForService(true)\n .sets( \n EventOrchestrationServiceSetArgs.builder()\n .id(\"start\")\n .rules(EventOrchestrationServiceSetRuleArgs.builder()\n .label(\"Always apply some consistent event transformations to all events\")\n .actions(EventOrchestrationServiceSetRuleActionsArgs.builder()\n .variables(EventOrchestrationServiceSetRuleActionsVariableArgs.builder()\n .name(\"hostname\")\n .path(\"event.component\")\n .value(\"hostname: (.*)\")\n .type(\"regex\")\n .build())\n .extractions( \n EventOrchestrationServiceSetRuleActionsExtractionArgs.builder()\n .template(\"{{variables.hostname}}\")\n .target(\"event.custom_details.hostname\")\n .build(),\n EventOrchestrationServiceSetRuleActionsExtractionArgs.builder()\n .source(\"event.source\")\n .regex(\"www (.*) service\")\n .target(\"event.source\")\n .build())\n .routeTo(\"step-two\")\n .build())\n .build())\n .build(),\n EventOrchestrationServiceSetArgs.builder()\n .id(\"step-two\")\n .rules( \n EventOrchestrationServiceSetRuleArgs.builder()\n .label(\"All critical alerts should be treated as P1 incident\")\n .conditions(EventOrchestrationServiceSetRuleConditionArgs.builder()\n .expression(\"event.severity matches 'critical'\")\n .build())\n .actions(EventOrchestrationServiceSetRuleActionsArgs.builder()\n .annotate(\"Please use our P1 runbook: https://docs.test/p1-runbook\")\n .priority(p1.applyValue(getPriorityResult -\u003e getPriorityResult.id()))\n .incidentCustomFieldUpdates(EventOrchestrationServiceSetRuleActionsIncidentCustomFieldUpdateArgs.builder()\n .id(csImpact.id())\n .value(\"High Impact\")\n .build())\n .build())\n .build(),\n EventOrchestrationServiceSetRuleArgs.builder()\n .label(\"If any of the API apps are unavailable, page the SRE team\")\n .conditions(EventOrchestrationServiceSetRuleConditionArgs.builder()\n .expression(\"event.custom_details.service_name matches part '-api' and event.custom_details.status_code matches '502'\")\n .build())\n .actions(EventOrchestrationServiceSetRuleActionsArgs.builder()\n .escalationPolicy(sreEscPolicy.applyValue(getEscalationPolicyResult -\u003e getEscalationPolicyResult.id()))\n .build())\n .build(),\n EventOrchestrationServiceSetRuleArgs.builder()\n .label(\"If there's something wrong on the canary let the team know about it in our deployments Slack channel\")\n .conditions(EventOrchestrationServiceSetRuleConditionArgs.builder()\n .expression(\"event.custom_details.hostname matches part 'canary'\")\n .build())\n .actions(EventOrchestrationServiceSetRuleActionsArgs.builder()\n .automationAction(EventOrchestrationServiceSetRuleActionsAutomationActionArgs.builder()\n .name(\"Canary Slack Notification\")\n .url(\"https://our-slack-listerner.test/canary-notification\")\n .autoSend(true)\n .parameters( \n EventOrchestrationServiceSetRuleActionsAutomationActionParameterArgs.builder()\n .key(\"channel\")\n .value(\"#my-team-channel\")\n .build(),\n EventOrchestrationServiceSetRuleActionsAutomationActionParameterArgs.builder()\n .key(\"message\")\n .value(\"something is wrong with the canary deployment\")\n .build())\n .headers(EventOrchestrationServiceSetRuleActionsAutomationActionHeaderArgs.builder()\n .key(\"X-Notification-Source\")\n .value(\"PagerDuty Incident Webhook\")\n .build())\n .build())\n .build())\n .build(),\n EventOrchestrationServiceSetRuleArgs.builder()\n .label(\"Never bother the on-call for info-level events outside of work hours\")\n .conditions(EventOrchestrationServiceSetRuleConditionArgs.builder()\n .expression(\"event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)\")\n .build())\n .actions(EventOrchestrationServiceSetRuleActionsArgs.builder()\n .suppress(true)\n .build())\n .build())\n .build())\n .catchAll(EventOrchestrationServiceCatchAllArgs.builder()\n .actions()\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n engineering:\n type: pagerduty:Team\n properties:\n name: Engineering\n example:\n type: pagerduty:User\n properties:\n name: Earline Greenholt\n email: 125.greenholt.earline@graham.name\n foo:\n type: pagerduty:TeamMembership\n properties:\n userId: ${example.id}\n teamId: ${engineering.id}\n role: manager\n exampleEscalationPolicy:\n type: pagerduty:EscalationPolicy\n name: example\n properties:\n name: Engineering Escalation Policy\n numLoops: 2\n rules:\n - escalationDelayInMinutes: 10\n targets:\n - type: user_reference\n id: ${example.id}\n exampleService:\n type: pagerduty:Service\n name: example\n properties:\n name: My Web App\n autoResolveTimeout: 14400\n acknowledgementTimeout: 600\n escalationPolicy: ${exampleEscalationPolicy.id}\n alertCreation: create_alerts_and_incidents\n csImpact:\n type: pagerduty:IncidentCustomField\n name: cs_impact\n properties:\n name: impact\n dataType: string\n fieldType: single_value\n www:\n type: pagerduty:EventOrchestrationService\n properties:\n service: ${exampleService.id}\n enableEventOrchestrationForService: true\n sets:\n - id: start\n rules:\n - label: Always apply some consistent event transformations to all events\n actions:\n variables:\n - name: hostname\n path: event.component\n value: 'hostname: (.*)'\n type: regex\n extractions:\n - template: '{{variables.hostname}}'\n target: event.custom_details.hostname\n - source: event.source\n regex: www (.*) service\n target: event.source\n routeTo: step-two\n - id: step-two\n rules:\n - label: All critical alerts should be treated as P1 incident\n conditions:\n - expression: event.severity matches 'critical'\n actions:\n annotate: 'Please use our P1 runbook: https://docs.test/p1-runbook'\n priority: ${p1.id}\n incidentCustomFieldUpdates:\n - id: ${csImpact.id}\n value: High Impact\n - label: If any of the API apps are unavailable, page the SRE team\n conditions:\n - expression: event.custom_details.service_name matches part '-api' and event.custom_details.status_code matches '502'\n actions:\n escalationPolicy: ${sreEscPolicy.id}\n - label: If there's something wrong on the canary let the team know about it in our deployments Slack channel\n conditions:\n - expression: event.custom_details.hostname matches part 'canary'\n actions:\n automationAction:\n name: Canary Slack Notification\n url: https://our-slack-listerner.test/canary-notification\n autoSend: true\n parameters:\n - key: channel\n value: '#my-team-channel'\n - key: message\n value: something is wrong with the canary deployment\n headers:\n - key: X-Notification-Source\n value: PagerDuty Incident Webhook\n - label: Never bother the on-call for info-level events outside of work hours\n conditions:\n - expression: event.severity matches 'info' and not (now in Mon,Tue,Wed,Thu,Fri 09:00:00 to 17:00:00 America/Los_Angeles)\n actions:\n suppress: true\n catchAll:\n actions: {}\nvariables:\n p1:\n fn::invoke:\n Function: pagerduty:getPriority\n Arguments:\n name: P1\n sreEscPolicy:\n fn::invoke:\n Function: pagerduty:getEscalationPolicy\n Arguments:\n name: SRE Escalation Policy\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nService Orchestration can be imported using the `id` of the Service, e.g.\n\n```sh\n$ pulumi import pagerduty:index/eventOrchestrationService:EventOrchestrationService service PFEODA7\n```\n", "properties": { "catchAll": { "$ref": "#/types/pagerduty:index/EventOrchestrationServiceCatchAll:EventOrchestrationServiceCatchAll", diff --git a/provider/go.mod b/provider/go.mod index b23a428d..c58f8701 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -140,7 +140,7 @@ require ( github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/hashicorp/vault/api v1.12.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect - github.com/heimweh/go-pagerduty v0.0.0-20240503143637-3459408ac715 // indirect + github.com/heimweh/go-pagerduty v0.0.0-20240722154207-95f2261a009a // indirect github.com/huandu/xstrings v1.4.0 // indirect github.com/iancoleman/strcase v0.2.0 // indirect github.com/imdario/mergo v0.3.15 // indirect diff --git a/provider/go.sum b/provider/go.sum index f1fda70e..2b554e38 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1692,8 +1692,8 @@ github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKe github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/heimweh/go-pagerduty v0.0.0-20240503143637-3459408ac715 h1:DbdS2LIPkhsqgRcQzOAux0RpTJSH8VYOrN4rZZgznak= -github.com/heimweh/go-pagerduty v0.0.0-20240503143637-3459408ac715/go.mod h1:r59w5iyN01Qvi734yA5hZldbSeJJmsJzee/1kQ/MK7s= +github.com/heimweh/go-pagerduty v0.0.0-20240722154207-95f2261a009a h1:s7Z3DLwXMmfoeLEpgF8tfIxXGs8o734zcEVICTvAkAQ= +github.com/heimweh/go-pagerduty v0.0.0-20240722154207-95f2261a009a/go.mod h1:r59w5iyN01Qvi734yA5hZldbSeJJmsJzee/1kQ/MK7s= github.com/hexops/autogold v1.3.0 h1:IEtGNPxBeBu8RMn8eKWh/Ll9dVNgSnJ7bp/qHgMQ14o= github.com/hexops/autogold v1.3.0/go.mod h1:d4hwi2rid66Sag+BVuHgwakW/EmaFr8vdTSbWDbrDRI= github.com/hexops/autogold/v2 v2.2.1 h1:JPUXuZQGkcQMv7eeDXuNMovjfoRYaa0yVcm+F3voaGY= diff --git a/upstream b/upstream index 4741e413..149d755c 160000 --- a/upstream +++ b/upstream @@ -1 +1 @@ -Subproject commit 4741e4139fae3e7cd9a80986a064959dd476618c +Subproject commit 149d755c5fafc4dfcb58b34431abefcde6da6a04 From 2a113ff7604043b47c68ed9edd3be8101bc61a7f Mon Sep 17 00:00:00 2001 From: guineveresaenger Date: Wed, 24 Jul 2024 10:12:04 -0700 Subject: [PATCH 2/2] make build_sdks --- sdk/dotnet/EventOrchestrationGlobal.cs | 22 +- sdk/dotnet/EventOrchestrationRouter.cs | 31 ++- sdk/dotnet/EventOrchestrationService.cs | 22 +- ...tOrchestrationGlobalCatchAllActionsArgs.cs | 6 + ...chestrationGlobalCatchAllActionsGetArgs.cs | 6 + ...ntOrchestrationGlobalSetRuleActionsArgs.cs | 6 + ...rchestrationGlobalSetRuleActionsGetArgs.cs | 6 + ...ntOrchestrationRouterSetRuleActionsArgs.cs | 15 +- ...nRouterSetRuleActionsDynamicRouteToArgs.cs | 40 ++++ ...uterSetRuleActionsDynamicRouteToGetArgs.cs | 40 ++++ ...rchestrationRouterSetRuleActionsGetArgs.cs | 15 +- ...OrchestrationServiceCatchAllActionsArgs.cs | 6 + ...hestrationServiceCatchAllActionsGetArgs.cs | 6 + ...tOrchestrationServiceSetRuleActionsArgs.cs | 6 + ...chestrationServiceSetRuleActionsGetArgs.cs | 6 + ...EventOrchestrationGlobalCatchAllActions.cs | 7 + .../EventOrchestrationGlobalSetRuleActions.cs | 7 + .../EventOrchestrationRouterSetRuleActions.cs | 11 +- ...ationRouterSetRuleActionsDynamicRouteTo.cs | 44 ++++ ...ventOrchestrationServiceCatchAllActions.cs | 7 + ...EventOrchestrationServiceSetRuleActions.cs | 7 + sdk/go/pagerduty/eventOrchestrationGlobal.go | 19 +- sdk/go/pagerduty/eventOrchestrationRouter.go | 32 ++- sdk/go/pagerduty/eventOrchestrationService.go | 19 +- sdk/go/pagerduty/pulumiTypes.go | 203 +++++++++++++++++- .../pagerduty/EventOrchestrationGlobal.java | 16 +- .../pagerduty/EventOrchestrationRouter.java | 28 ++- .../pagerduty/EventOrchestrationService.java | 16 +- ...rchestrationGlobalCatchAllActionsArgs.java | 37 ++++ ...OrchestrationGlobalSetRuleActionsArgs.java | 37 ++++ ...OrchestrationRouterSetRuleActionsArgs.java | 55 +++-- ...outerSetRuleActionsDynamicRouteToArgs.java | 173 +++++++++++++++ ...chestrationServiceCatchAllActionsArgs.java | 37 ++++ ...rchestrationServiceSetRuleActionsArgs.java | 37 ++++ ...entOrchestrationGlobalCatchAllActions.java | 21 ++ ...ventOrchestrationGlobalSetRuleActions.java | 21 ++ ...ventOrchestrationRouterSetRuleActions.java | 39 +++- ...ionRouterSetRuleActionsDynamicRouteTo.java | 108 ++++++++++ ...ntOrchestrationServiceCatchAllActions.java | 21 ++ ...entOrchestrationServiceSetRuleActions.java | 21 ++ sdk/nodejs/eventOrchestrationGlobal.ts | 14 +- sdk/nodejs/eventOrchestrationRouter.ts | 24 ++- sdk/nodejs/eventOrchestrationService.ts | 14 +- sdk/nodejs/types/input.ts | 38 +++- sdk/nodejs/types/output.ts | 38 +++- sdk/python/pulumi_pagerduty/_inputs.py | 148 ++++++++++++- .../event_orchestration_global.py | 24 ++- .../event_orchestration_router.py | 40 +++- .../event_orchestration_service.py | 24 ++- sdk/python/pulumi_pagerduty/outputs.py | 143 +++++++++++- 50 files changed, 1661 insertions(+), 102 deletions(-) create mode 100644 sdk/dotnet/Inputs/EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs.cs create mode 100644 sdk/dotnet/Inputs/EventOrchestrationRouterSetRuleActionsDynamicRouteToGetArgs.cs create mode 100644 sdk/dotnet/Outputs/EventOrchestrationRouterSetRuleActionsDynamicRouteTo.cs create mode 100644 sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationRouterSetRuleActionsDynamicRouteTo.java diff --git a/sdk/dotnet/EventOrchestrationGlobal.cs b/sdk/dotnet/EventOrchestrationGlobal.cs index 1e4de476..1d1fe73d 100644 --- a/sdk/dotnet/EventOrchestrationGlobal.cs +++ b/sdk/dotnet/EventOrchestrationGlobal.cs @@ -16,7 +16,7 @@ namespace Pulumi.Pagerduty /// /// This example shows creating `Team`, and `Event Orchestration` resources followed by creating a Global Orchestration to handle Events sent to that Event Orchestration. /// - /// This example also shows using `priority` data source to configure `priority` action for a rule. If the Event matches the third rule in set "step-two" the resulting incident will have the Priority `P1`. + /// This example also shows using the pagerduty.getPriority data sources to configure `priority` and `escalation_policy` actions for a rule. /// /// This example shows a Global Orchestration that has nested sets: a rule in the "start" set has a `route_to` action pointing at the "step-two" set. /// @@ -46,6 +46,11 @@ namespace Pulumi.Pagerduty /// Name = "P1", /// }); /// + /// var sreEscPolicy = Pagerduty.GetEscalationPolicy.Invoke(new() + /// { + /// Name = "SRE Escalation Policy", + /// }); + /// /// var @global = new Pagerduty.EventOrchestrationGlobal("global", new() /// { /// EventOrchestration = eventOrchestration.Id, @@ -89,6 +94,21 @@ namespace Pulumi.Pagerduty /// }, /// new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleArgs /// { + /// Label = "If the DB host is running out of space, then page the SRE team", + /// Conditions = new[] + /// { + /// new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleConditionArgs + /// { + /// Expression = "event.summary matches part 'running out of space'", + /// }, + /// }, + /// Actions = new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleActionsArgs + /// { + /// EscalationPolicy = sreEscPolicy.Apply(getEscalationPolicyResult => getEscalationPolicyResult.Id), + /// }, + /// }, + /// new Pagerduty.Inputs.EventOrchestrationGlobalSetRuleArgs + /// { /// Label = "If there's something wrong on the replica, then mark the alert as a warning", /// Conditions = new[] /// { diff --git a/sdk/dotnet/EventOrchestrationRouter.cs b/sdk/dotnet/EventOrchestrationRouter.cs index 4c2d91d9..e6cf8ff3 100644 --- a/sdk/dotnet/EventOrchestrationRouter.cs +++ b/sdk/dotnet/EventOrchestrationRouter.cs @@ -14,9 +14,7 @@ namespace Pulumi.Pagerduty /// /// ## Example of configuring Router rules for an Orchestration /// - /// In this example the user has defined the Router with two rules, each routing to a different service. - /// - /// This example assumes services used in the `route_to` configuration already exists. So it does not show creation of service resource. + /// In this example the user has defined the Router with three rules. The first rule configures a dynamic route: any event containing a value in its `pd_service_id` custom detail will be routed to the Service with the ID specified by that value. The other rules route events matching a condition to specific services. /// /// ```csharp /// using System.Collections.Generic; @@ -26,6 +24,16 @@ namespace Pulumi.Pagerduty /// /// return await Deployment.RunAsync(() => /// { + /// var database = Pagerduty.GetService.Invoke(new() + /// { + /// Name = "Primary Data Store", + /// }); + /// + /// var www = Pagerduty.GetService.Invoke(new() + /// { + /// Name = "Web Server App", + /// }); + /// /// var router = new Pagerduty.EventOrchestrationRouter("router", new() /// { /// EventOrchestration = myMonitor.Id, @@ -36,6 +44,19 @@ namespace Pulumi.Pagerduty /// { /// new Pagerduty.Inputs.EventOrchestrationRouterSetRuleArgs /// { + /// Label = "Dynamically route events related to specific PagerDuty services", + /// Actions = new Pagerduty.Inputs.EventOrchestrationRouterSetRuleActionsArgs + /// { + /// DynamicRouteTos = + /// { + /// { "lookupBy", "service_id" }, + /// { "source", "event.custom_details.pd_service_id" }, + /// { "regexp", "(.*)" }, + /// }, + /// }, + /// }, + /// new Pagerduty.Inputs.EventOrchestrationRouterSetRuleArgs + /// { /// Label = "Events relating to our relational database", /// Conditions = new[] /// { @@ -50,7 +71,7 @@ namespace Pulumi.Pagerduty /// }, /// Actions = new Pagerduty.Inputs.EventOrchestrationRouterSetRuleActionsArgs /// { - /// RouteTo = database.Id, + /// RouteTo = database.Apply(getServiceResult => getServiceResult.Id), /// }, /// }, /// new Pagerduty.Inputs.EventOrchestrationRouterSetRuleArgs @@ -64,7 +85,7 @@ namespace Pulumi.Pagerduty /// }, /// Actions = new Pagerduty.Inputs.EventOrchestrationRouterSetRuleActionsArgs /// { - /// RouteTo = www.Id, + /// RouteTo = www.Apply(getServiceResult => getServiceResult.Id), /// }, /// }, /// }, diff --git a/sdk/dotnet/EventOrchestrationService.cs b/sdk/dotnet/EventOrchestrationService.cs index 87de0fb2..13ddadef 100644 --- a/sdk/dotnet/EventOrchestrationService.cs +++ b/sdk/dotnet/EventOrchestrationService.cs @@ -18,7 +18,7 @@ namespace Pulumi.Pagerduty /// /// This example shows creating `Team`, `User`, `Escalation Policy`, and `Service` resources followed by creating a Service Orchestration to handle Events sent to that Service. /// - /// This example also shows using `priority` data source to configure `priority` action for a rule. If the Event matches the first rule in set "step-two" the resulting incident will have the Priority `P1`. + /// This example also shows using the pagerduty.getPriority data sources to configure `priority` and `escalation_policy` actions for a rule. /// /// This example shows a Service Orchestration that has nested sets: a rule in the "start" set has a `route_to` action pointing at the "step-two" set. /// @@ -92,6 +92,11 @@ namespace Pulumi.Pagerduty /// Name = "P1", /// }); /// + /// var sreEscPolicy = Pagerduty.GetEscalationPolicy.Invoke(new() + /// { + /// Name = "SRE Escalation Policy", + /// }); + /// /// var www = new Pagerduty.EventOrchestrationService("www", new() /// { /// Service = exampleService.Id, @@ -168,6 +173,21 @@ namespace Pulumi.Pagerduty /// }, /// new Pagerduty.Inputs.EventOrchestrationServiceSetRuleArgs /// { + /// Label = "If any of the API apps are unavailable, page the SRE team", + /// Conditions = new[] + /// { + /// new Pagerduty.Inputs.EventOrchestrationServiceSetRuleConditionArgs + /// { + /// Expression = "event.custom_details.service_name matches part '-api' and event.custom_details.status_code matches '502'", + /// }, + /// }, + /// Actions = new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsArgs + /// { + /// EscalationPolicy = sreEscPolicy.Apply(getEscalationPolicyResult => getEscalationPolicyResult.Id), + /// }, + /// }, + /// new Pagerduty.Inputs.EventOrchestrationServiceSetRuleArgs + /// { /// Label = "If there's something wrong on the canary let the team know about it in our deployments Slack channel", /// Conditions = new[] /// { diff --git a/sdk/dotnet/Inputs/EventOrchestrationGlobalCatchAllActionsArgs.cs b/sdk/dotnet/Inputs/EventOrchestrationGlobalCatchAllActionsArgs.cs index 7e869c3b..93cf408f 100644 --- a/sdk/dotnet/Inputs/EventOrchestrationGlobalCatchAllActionsArgs.cs +++ b/sdk/dotnet/Inputs/EventOrchestrationGlobalCatchAllActionsArgs.cs @@ -30,6 +30,12 @@ public sealed class EventOrchestrationGlobalCatchAllActionsArgs : global::Pulumi [Input("dropEvent")] public Input? DropEvent { get; set; } + /// + /// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + /// + [Input("escalationPolicy")] + public Input? EscalationPolicy { get; set; } + /// /// sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` /// diff --git a/sdk/dotnet/Inputs/EventOrchestrationGlobalCatchAllActionsGetArgs.cs b/sdk/dotnet/Inputs/EventOrchestrationGlobalCatchAllActionsGetArgs.cs index 776b7d46..c3c28611 100644 --- a/sdk/dotnet/Inputs/EventOrchestrationGlobalCatchAllActionsGetArgs.cs +++ b/sdk/dotnet/Inputs/EventOrchestrationGlobalCatchAllActionsGetArgs.cs @@ -30,6 +30,12 @@ public sealed class EventOrchestrationGlobalCatchAllActionsGetArgs : global::Pul [Input("dropEvent")] public Input? DropEvent { get; set; } + /// + /// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + /// + [Input("escalationPolicy")] + public Input? EscalationPolicy { get; set; } + /// /// sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` /// diff --git a/sdk/dotnet/Inputs/EventOrchestrationGlobalSetRuleActionsArgs.cs b/sdk/dotnet/Inputs/EventOrchestrationGlobalSetRuleActionsArgs.cs index 5455c1c5..69818def 100644 --- a/sdk/dotnet/Inputs/EventOrchestrationGlobalSetRuleActionsArgs.cs +++ b/sdk/dotnet/Inputs/EventOrchestrationGlobalSetRuleActionsArgs.cs @@ -30,6 +30,12 @@ public sealed class EventOrchestrationGlobalSetRuleActionsArgs : global::Pulumi. [Input("dropEvent")] public Input? DropEvent { get; set; } + /// + /// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + /// + [Input("escalationPolicy")] + public Input? EscalationPolicy { get; set; } + /// /// sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` /// diff --git a/sdk/dotnet/Inputs/EventOrchestrationGlobalSetRuleActionsGetArgs.cs b/sdk/dotnet/Inputs/EventOrchestrationGlobalSetRuleActionsGetArgs.cs index 3d95ebcc..c42ee91a 100644 --- a/sdk/dotnet/Inputs/EventOrchestrationGlobalSetRuleActionsGetArgs.cs +++ b/sdk/dotnet/Inputs/EventOrchestrationGlobalSetRuleActionsGetArgs.cs @@ -30,6 +30,12 @@ public sealed class EventOrchestrationGlobalSetRuleActionsGetArgs : global::Pulu [Input("dropEvent")] public Input? DropEvent { get; set; } + /// + /// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + /// + [Input("escalationPolicy")] + public Input? EscalationPolicy { get; set; } + /// /// sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` /// diff --git a/sdk/dotnet/Inputs/EventOrchestrationRouterSetRuleActionsArgs.cs b/sdk/dotnet/Inputs/EventOrchestrationRouterSetRuleActionsArgs.cs index bc26626c..c1be6f38 100644 --- a/sdk/dotnet/Inputs/EventOrchestrationRouterSetRuleActionsArgs.cs +++ b/sdk/dotnet/Inputs/EventOrchestrationRouterSetRuleActionsArgs.cs @@ -12,11 +12,20 @@ namespace Pulumi.Pagerduty.Inputs public sealed class EventOrchestrationRouterSetRuleActionsArgs : global::Pulumi.ResourceArgs { + [Input("dynamicRouteTos")] + private InputList? _dynamicRouteTos; + /// - /// The ID of the target Service for the resulting alert. + /// supports the following: /// - [Input("routeTo", required: true)] - public Input RouteTo { get; set; } = null!; + public InputList DynamicRouteTos + { + get => _dynamicRouteTos ?? (_dynamicRouteTos = new InputList()); + set => _dynamicRouteTos = value; + } + + [Input("routeTo")] + public Input? RouteTo { get; set; } public EventOrchestrationRouterSetRuleActionsArgs() { diff --git a/sdk/dotnet/Inputs/EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs.cs b/sdk/dotnet/Inputs/EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs.cs new file mode 100644 index 00000000..4814302c --- /dev/null +++ b/sdk/dotnet/Inputs/EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs.cs @@ -0,0 +1,40 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Pagerduty.Inputs +{ + + public sealed class EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs : global::Pulumi.ResourceArgs + { + /// + /// Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `service_name`, `service_id` + /// + /// If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules. + /// + [Input("lookupBy", required: true)] + public Input LookupBy { get; set; } = null!; + + /// + /// The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax. + /// + [Input("regex", required: true)] + public Input Regex { get; set; } = null!; + + /// + /// The path to a field in an event. + /// + [Input("source", required: true)] + public Input Source { get; set; } = null!; + + public EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs() + { + } + public static new EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs Empty => new EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs(); + } +} diff --git a/sdk/dotnet/Inputs/EventOrchestrationRouterSetRuleActionsDynamicRouteToGetArgs.cs b/sdk/dotnet/Inputs/EventOrchestrationRouterSetRuleActionsDynamicRouteToGetArgs.cs new file mode 100644 index 00000000..7551d353 --- /dev/null +++ b/sdk/dotnet/Inputs/EventOrchestrationRouterSetRuleActionsDynamicRouteToGetArgs.cs @@ -0,0 +1,40 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Pagerduty.Inputs +{ + + public sealed class EventOrchestrationRouterSetRuleActionsDynamicRouteToGetArgs : global::Pulumi.ResourceArgs + { + /// + /// Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `service_name`, `service_id` + /// + /// If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules. + /// + [Input("lookupBy", required: true)] + public Input LookupBy { get; set; } = null!; + + /// + /// The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax. + /// + [Input("regex", required: true)] + public Input Regex { get; set; } = null!; + + /// + /// The path to a field in an event. + /// + [Input("source", required: true)] + public Input Source { get; set; } = null!; + + public EventOrchestrationRouterSetRuleActionsDynamicRouteToGetArgs() + { + } + public static new EventOrchestrationRouterSetRuleActionsDynamicRouteToGetArgs Empty => new EventOrchestrationRouterSetRuleActionsDynamicRouteToGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/EventOrchestrationRouterSetRuleActionsGetArgs.cs b/sdk/dotnet/Inputs/EventOrchestrationRouterSetRuleActionsGetArgs.cs index 89c6af89..15f99ceb 100644 --- a/sdk/dotnet/Inputs/EventOrchestrationRouterSetRuleActionsGetArgs.cs +++ b/sdk/dotnet/Inputs/EventOrchestrationRouterSetRuleActionsGetArgs.cs @@ -12,11 +12,20 @@ namespace Pulumi.Pagerduty.Inputs public sealed class EventOrchestrationRouterSetRuleActionsGetArgs : global::Pulumi.ResourceArgs { + [Input("dynamicRouteTos")] + private InputList? _dynamicRouteTos; + /// - /// The ID of the target Service for the resulting alert. + /// supports the following: /// - [Input("routeTo", required: true)] - public Input RouteTo { get; set; } = null!; + public InputList DynamicRouteTos + { + get => _dynamicRouteTos ?? (_dynamicRouteTos = new InputList()); + set => _dynamicRouteTos = value; + } + + [Input("routeTo")] + public Input? RouteTo { get; set; } public EventOrchestrationRouterSetRuleActionsGetArgs() { diff --git a/sdk/dotnet/Inputs/EventOrchestrationServiceCatchAllActionsArgs.cs b/sdk/dotnet/Inputs/EventOrchestrationServiceCatchAllActionsArgs.cs index 3831e93d..af0b8e28 100644 --- a/sdk/dotnet/Inputs/EventOrchestrationServiceCatchAllActionsArgs.cs +++ b/sdk/dotnet/Inputs/EventOrchestrationServiceCatchAllActionsArgs.cs @@ -24,6 +24,12 @@ public sealed class EventOrchestrationServiceCatchAllActionsArgs : global::Pulum [Input("automationAction")] public Input? AutomationAction { get; set; } + /// + /// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + /// + [Input("escalationPolicy")] + public Input? EscalationPolicy { get; set; } + /// /// sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` /// diff --git a/sdk/dotnet/Inputs/EventOrchestrationServiceCatchAllActionsGetArgs.cs b/sdk/dotnet/Inputs/EventOrchestrationServiceCatchAllActionsGetArgs.cs index a7e360a7..1cbc6f12 100644 --- a/sdk/dotnet/Inputs/EventOrchestrationServiceCatchAllActionsGetArgs.cs +++ b/sdk/dotnet/Inputs/EventOrchestrationServiceCatchAllActionsGetArgs.cs @@ -24,6 +24,12 @@ public sealed class EventOrchestrationServiceCatchAllActionsGetArgs : global::Pu [Input("automationAction")] public Input? AutomationAction { get; set; } + /// + /// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + /// + [Input("escalationPolicy")] + public Input? EscalationPolicy { get; set; } + /// /// sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` /// diff --git a/sdk/dotnet/Inputs/EventOrchestrationServiceSetRuleActionsArgs.cs b/sdk/dotnet/Inputs/EventOrchestrationServiceSetRuleActionsArgs.cs index ffdea8a8..d7f279b7 100644 --- a/sdk/dotnet/Inputs/EventOrchestrationServiceSetRuleActionsArgs.cs +++ b/sdk/dotnet/Inputs/EventOrchestrationServiceSetRuleActionsArgs.cs @@ -24,6 +24,12 @@ public sealed class EventOrchestrationServiceSetRuleActionsArgs : global::Pulumi [Input("automationAction")] public Input? AutomationAction { get; set; } + /// + /// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + /// + [Input("escalationPolicy")] + public Input? EscalationPolicy { get; set; } + /// /// sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` /// diff --git a/sdk/dotnet/Inputs/EventOrchestrationServiceSetRuleActionsGetArgs.cs b/sdk/dotnet/Inputs/EventOrchestrationServiceSetRuleActionsGetArgs.cs index 860ecda6..0d01b494 100644 --- a/sdk/dotnet/Inputs/EventOrchestrationServiceSetRuleActionsGetArgs.cs +++ b/sdk/dotnet/Inputs/EventOrchestrationServiceSetRuleActionsGetArgs.cs @@ -24,6 +24,12 @@ public sealed class EventOrchestrationServiceSetRuleActionsGetArgs : global::Pul [Input("automationAction")] public Input? AutomationAction { get; set; } + /// + /// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + /// + [Input("escalationPolicy")] + public Input? EscalationPolicy { get; set; } + /// /// sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` /// diff --git a/sdk/dotnet/Outputs/EventOrchestrationGlobalCatchAllActions.cs b/sdk/dotnet/Outputs/EventOrchestrationGlobalCatchAllActions.cs index 69001903..9edcc55f 100644 --- a/sdk/dotnet/Outputs/EventOrchestrationGlobalCatchAllActions.cs +++ b/sdk/dotnet/Outputs/EventOrchestrationGlobalCatchAllActions.cs @@ -26,6 +26,10 @@ public sealed class EventOrchestrationGlobalCatchAllActions /// public readonly bool? DropEvent; /// + /// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + /// + public readonly string? EscalationPolicy; + /// /// sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` /// public readonly string? EventAction; @@ -70,6 +74,8 @@ private EventOrchestrationGlobalCatchAllActions( bool? dropEvent, + string? escalationPolicy, + string? eventAction, ImmutableArray extractions, @@ -91,6 +97,7 @@ private EventOrchestrationGlobalCatchAllActions( Annotate = annotate; AutomationAction = automationAction; DropEvent = dropEvent; + EscalationPolicy = escalationPolicy; EventAction = eventAction; Extractions = extractions; IncidentCustomFieldUpdates = incidentCustomFieldUpdates; diff --git a/sdk/dotnet/Outputs/EventOrchestrationGlobalSetRuleActions.cs b/sdk/dotnet/Outputs/EventOrchestrationGlobalSetRuleActions.cs index 18e6b493..3b49592d 100644 --- a/sdk/dotnet/Outputs/EventOrchestrationGlobalSetRuleActions.cs +++ b/sdk/dotnet/Outputs/EventOrchestrationGlobalSetRuleActions.cs @@ -26,6 +26,10 @@ public sealed class EventOrchestrationGlobalSetRuleActions /// public readonly bool? DropEvent; /// + /// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + /// + public readonly string? EscalationPolicy; + /// /// sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` /// public readonly string? EventAction; @@ -70,6 +74,8 @@ private EventOrchestrationGlobalSetRuleActions( bool? dropEvent, + string? escalationPolicy, + string? eventAction, ImmutableArray extractions, @@ -91,6 +97,7 @@ private EventOrchestrationGlobalSetRuleActions( Annotate = annotate; AutomationAction = automationAction; DropEvent = dropEvent; + EscalationPolicy = escalationPolicy; EventAction = eventAction; Extractions = extractions; IncidentCustomFieldUpdates = incidentCustomFieldUpdates; diff --git a/sdk/dotnet/Outputs/EventOrchestrationRouterSetRuleActions.cs b/sdk/dotnet/Outputs/EventOrchestrationRouterSetRuleActions.cs index 6bdc240e..754b8a68 100644 --- a/sdk/dotnet/Outputs/EventOrchestrationRouterSetRuleActions.cs +++ b/sdk/dotnet/Outputs/EventOrchestrationRouterSetRuleActions.cs @@ -14,13 +14,18 @@ namespace Pulumi.Pagerduty.Outputs public sealed class EventOrchestrationRouterSetRuleActions { /// - /// The ID of the target Service for the resulting alert. + /// supports the following: /// - public readonly string RouteTo; + public readonly ImmutableArray DynamicRouteTos; + public readonly string? RouteTo; [OutputConstructor] - private EventOrchestrationRouterSetRuleActions(string routeTo) + private EventOrchestrationRouterSetRuleActions( + ImmutableArray dynamicRouteTos, + + string? routeTo) { + DynamicRouteTos = dynamicRouteTos; RouteTo = routeTo; } } diff --git a/sdk/dotnet/Outputs/EventOrchestrationRouterSetRuleActionsDynamicRouteTo.cs b/sdk/dotnet/Outputs/EventOrchestrationRouterSetRuleActionsDynamicRouteTo.cs new file mode 100644 index 00000000..a3f55682 --- /dev/null +++ b/sdk/dotnet/Outputs/EventOrchestrationRouterSetRuleActionsDynamicRouteTo.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Pagerduty.Outputs +{ + + [OutputType] + public sealed class EventOrchestrationRouterSetRuleActionsDynamicRouteTo + { + /// + /// Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `service_name`, `service_id` + /// + /// If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules. + /// + public readonly string LookupBy; + /// + /// The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax. + /// + public readonly string Regex; + /// + /// The path to a field in an event. + /// + public readonly string Source; + + [OutputConstructor] + private EventOrchestrationRouterSetRuleActionsDynamicRouteTo( + string lookupBy, + + string regex, + + string source) + { + LookupBy = lookupBy; + Regex = regex; + Source = source; + } + } +} diff --git a/sdk/dotnet/Outputs/EventOrchestrationServiceCatchAllActions.cs b/sdk/dotnet/Outputs/EventOrchestrationServiceCatchAllActions.cs index 60aa5b43..5227a59f 100644 --- a/sdk/dotnet/Outputs/EventOrchestrationServiceCatchAllActions.cs +++ b/sdk/dotnet/Outputs/EventOrchestrationServiceCatchAllActions.cs @@ -22,6 +22,10 @@ public sealed class EventOrchestrationServiceCatchAllActions /// public readonly Outputs.EventOrchestrationServiceCatchAllActionsAutomationAction? AutomationAction; /// + /// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + /// + public readonly string? EscalationPolicy; + /// /// sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` /// public readonly string? EventAction; @@ -68,6 +72,8 @@ private EventOrchestrationServiceCatchAllActions( Outputs.EventOrchestrationServiceCatchAllActionsAutomationAction? automationAction, + string? escalationPolicy, + string? eventAction, ImmutableArray extractions, @@ -90,6 +96,7 @@ private EventOrchestrationServiceCatchAllActions( { Annotate = annotate; AutomationAction = automationAction; + EscalationPolicy = escalationPolicy; EventAction = eventAction; Extractions = extractions; IncidentCustomFieldUpdates = incidentCustomFieldUpdates; diff --git a/sdk/dotnet/Outputs/EventOrchestrationServiceSetRuleActions.cs b/sdk/dotnet/Outputs/EventOrchestrationServiceSetRuleActions.cs index c9aeaf6b..f949e36c 100644 --- a/sdk/dotnet/Outputs/EventOrchestrationServiceSetRuleActions.cs +++ b/sdk/dotnet/Outputs/EventOrchestrationServiceSetRuleActions.cs @@ -22,6 +22,10 @@ public sealed class EventOrchestrationServiceSetRuleActions /// public readonly Outputs.EventOrchestrationServiceSetRuleActionsAutomationAction? AutomationAction; /// + /// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + /// + public readonly string? EscalationPolicy; + /// /// sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` /// public readonly string? EventAction; @@ -68,6 +72,8 @@ private EventOrchestrationServiceSetRuleActions( Outputs.EventOrchestrationServiceSetRuleActionsAutomationAction? automationAction, + string? escalationPolicy, + string? eventAction, ImmutableArray extractions, @@ -90,6 +96,7 @@ private EventOrchestrationServiceSetRuleActions( { Annotate = annotate; AutomationAction = automationAction; + EscalationPolicy = escalationPolicy; EventAction = eventAction; Extractions = extractions; IncidentCustomFieldUpdates = incidentCustomFieldUpdates; diff --git a/sdk/go/pagerduty/eventOrchestrationGlobal.go b/sdk/go/pagerduty/eventOrchestrationGlobal.go index 99258db2..277e744c 100644 --- a/sdk/go/pagerduty/eventOrchestrationGlobal.go +++ b/sdk/go/pagerduty/eventOrchestrationGlobal.go @@ -18,7 +18,7 @@ import ( // // This example shows creating `Team`, and `Event Orchestration` resources followed by creating a Global Orchestration to handle Events sent to that Event Orchestration. // -// This example also shows using `priority` data source to configure `priority` action for a rule. If the Event matches the third rule in set "step-two" the resulting incident will have the Priority `P1`. +// This example also shows using the getPriority data sources to configure `priority` and `escalationPolicy` actions for a rule. // // This example shows a Global Orchestration that has nested sets: a rule in the "start" set has a `routeTo` action pointing at the "step-two" set. // @@ -55,6 +55,12 @@ import ( // if err != nil { // return err // } +// sreEscPolicy, err := pagerduty.LookupEscalationPolicy(ctx, &pagerduty.LookupEscalationPolicyArgs{ +// Name: "SRE Escalation Policy", +// }, nil) +// if err != nil { +// return err +// } // _, err = pagerduty.NewEventOrchestrationGlobal(ctx, "global", &pagerduty.EventOrchestrationGlobalArgs{ // EventOrchestration: eventOrchestration.ID(), // Sets: pagerduty.EventOrchestrationGlobalSetArray{ @@ -85,6 +91,17 @@ import ( // }, // }, // &pagerduty.EventOrchestrationGlobalSetRuleArgs{ +// Label: pulumi.String("If the DB host is running out of space, then page the SRE team"), +// Conditions: pagerduty.EventOrchestrationGlobalSetRuleConditionArray{ +// &pagerduty.EventOrchestrationGlobalSetRuleConditionArgs{ +// Expression: pulumi.String("event.summary matches part 'running out of space'"), +// }, +// }, +// Actions: &pagerduty.EventOrchestrationGlobalSetRuleActionsArgs{ +// EscalationPolicy: pulumi.String(sreEscPolicy.Id), +// }, +// }, +// &pagerduty.EventOrchestrationGlobalSetRuleArgs{ // Label: pulumi.String("If there's something wrong on the replica, then mark the alert as a warning"), // Conditions: pagerduty.EventOrchestrationGlobalSetRuleConditionArray{ // &pagerduty.EventOrchestrationGlobalSetRuleConditionArgs{ diff --git a/sdk/go/pagerduty/eventOrchestrationRouter.go b/sdk/go/pagerduty/eventOrchestrationRouter.go index 2cc1579c..caa64cb5 100644 --- a/sdk/go/pagerduty/eventOrchestrationRouter.go +++ b/sdk/go/pagerduty/eventOrchestrationRouter.go @@ -16,9 +16,7 @@ import ( // // ## Example of configuring Router rules for an Orchestration // -// In this example the user has defined the Router with two rules, each routing to a different service. -// -// This example assumes services used in the `routeTo` configuration already exists. So it does not show creation of service resource. +// In this example the user has defined the Router with three rules. The first rule configures a dynamic route: any event containing a value in its `pdServiceId` custom detail will be routed to the Service with the ID specified by that value. The other rules route events matching a condition to specific services. // // ```go // package main @@ -32,12 +30,34 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := pagerduty.NewEventOrchestrationRouter(ctx, "router", &pagerduty.EventOrchestrationRouterArgs{ +// database, err := pagerduty.LookupService(ctx, &pagerduty.LookupServiceArgs{ +// Name: "Primary Data Store", +// }, nil) +// if err != nil { +// return err +// } +// www, err := pagerduty.LookupService(ctx, &pagerduty.LookupServiceArgs{ +// Name: "Web Server App", +// }, nil) +// if err != nil { +// return err +// } +// _, err = pagerduty.NewEventOrchestrationRouter(ctx, "router", &pagerduty.EventOrchestrationRouterArgs{ // EventOrchestration: pulumi.Any(myMonitor.Id), // Set: &pagerduty.EventOrchestrationRouterSetArgs{ // Id: pulumi.String("start"), // Rules: pagerduty.EventOrchestrationRouterSetRuleArray{ // &pagerduty.EventOrchestrationRouterSetRuleArgs{ +// Label: pulumi.String("Dynamically route events related to specific PagerDuty services"), +// Actions: &pagerduty.EventOrchestrationRouterSetRuleActionsArgs{ +// DynamicRouteTos: pagerduty.EventOrchestrationRouterSetRuleActionsDynamicRouteToArray{ +// LookupBy: "service_id", +// Source: "event.custom_details.pd_service_id", +// Regexp: "(.*)", +// }, +// }, +// }, +// &pagerduty.EventOrchestrationRouterSetRuleArgs{ // Label: pulumi.String("Events relating to our relational database"), // Conditions: pagerduty.EventOrchestrationRouterSetRuleConditionArray{ // &pagerduty.EventOrchestrationRouterSetRuleConditionArgs{ @@ -48,7 +68,7 @@ import ( // }, // }, // Actions: &pagerduty.EventOrchestrationRouterSetRuleActionsArgs{ -// RouteTo: pulumi.Any(database.Id), +// RouteTo: pulumi.String(database.Id), // }, // }, // &pagerduty.EventOrchestrationRouterSetRuleArgs{ @@ -58,7 +78,7 @@ import ( // }, // }, // Actions: &pagerduty.EventOrchestrationRouterSetRuleActionsArgs{ -// RouteTo: pulumi.Any(www.Id), +// RouteTo: pulumi.String(www.Id), // }, // }, // }, diff --git a/sdk/go/pagerduty/eventOrchestrationService.go b/sdk/go/pagerduty/eventOrchestrationService.go index c3a5aa27..1543ef3b 100644 --- a/sdk/go/pagerduty/eventOrchestrationService.go +++ b/sdk/go/pagerduty/eventOrchestrationService.go @@ -20,7 +20,7 @@ import ( // // This example shows creating `Team`, `User`, `Escalation Policy`, and `Service` resources followed by creating a Service Orchestration to handle Events sent to that Service. // -// This example also shows using `priority` data source to configure `priority` action for a rule. If the Event matches the first rule in set "step-two" the resulting incident will have the Priority `P1`. +// This example also shows using the getPriority data sources to configure `priority` and `escalationPolicy` actions for a rule. // // This example shows a Service Orchestration that has nested sets: a rule in the "start" set has a `routeTo` action pointing at the "step-two" set. // @@ -101,6 +101,12 @@ import ( // if err != nil { // return err // } +// sreEscPolicy, err := pagerduty.LookupEscalationPolicy(ctx, &pagerduty.LookupEscalationPolicyArgs{ +// Name: "SRE Escalation Policy", +// }, nil) +// if err != nil { +// return err +// } // _, err = pagerduty.NewEventOrchestrationService(ctx, "www", &pagerduty.EventOrchestrationServiceArgs{ // Service: exampleService.ID(), // EnableEventOrchestrationForService: pulumi.Bool(true), @@ -157,6 +163,17 @@ import ( // }, // }, // &pagerduty.EventOrchestrationServiceSetRuleArgs{ +// Label: pulumi.String("If any of the API apps are unavailable, page the SRE team"), +// Conditions: pagerduty.EventOrchestrationServiceSetRuleConditionArray{ +// &pagerduty.EventOrchestrationServiceSetRuleConditionArgs{ +// Expression: pulumi.String("event.custom_details.service_name matches part '-api' and event.custom_details.status_code matches '502'"), +// }, +// }, +// Actions: &pagerduty.EventOrchestrationServiceSetRuleActionsArgs{ +// EscalationPolicy: pulumi.String(sreEscPolicy.Id), +// }, +// }, +// &pagerduty.EventOrchestrationServiceSetRuleArgs{ // Label: pulumi.String("If there's something wrong on the canary let the team know about it in our deployments Slack channel"), // Conditions: pagerduty.EventOrchestrationServiceSetRuleConditionArray{ // &pagerduty.EventOrchestrationServiceSetRuleConditionArgs{ diff --git a/sdk/go/pagerduty/pulumiTypes.go b/sdk/go/pagerduty/pulumiTypes.go index 1a6e8904..e18bc116 100644 --- a/sdk/go/pagerduty/pulumiTypes.go +++ b/sdk/go/pagerduty/pulumiTypes.go @@ -1027,6 +1027,8 @@ type EventOrchestrationGlobalCatchAllActions struct { AutomationAction *EventOrchestrationGlobalCatchAllActionsAutomationAction `pulumi:"automationAction"` // When true, this event will be dropped. Dropped events will not trigger or resolve an alert or an incident. Dropped events will not be evaluated against router rules. DropEvent *bool `pulumi:"dropEvent"` + // The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + EscalationPolicy *string `pulumi:"escalationPolicy"` // sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` EventAction *string `pulumi:"eventAction"` // Replace any CEF field or Custom Details object field using custom variables. @@ -1065,6 +1067,8 @@ type EventOrchestrationGlobalCatchAllActionsArgs struct { AutomationAction EventOrchestrationGlobalCatchAllActionsAutomationActionPtrInput `pulumi:"automationAction"` // When true, this event will be dropped. Dropped events will not trigger or resolve an alert or an incident. Dropped events will not be evaluated against router rules. DropEvent pulumi.BoolPtrInput `pulumi:"dropEvent"` + // The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + EscalationPolicy pulumi.StringPtrInput `pulumi:"escalationPolicy"` // sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` EventAction pulumi.StringPtrInput `pulumi:"eventAction"` // Replace any CEF field or Custom Details object field using custom variables. @@ -1179,6 +1183,11 @@ func (o EventOrchestrationGlobalCatchAllActionsOutput) DropEvent() pulumi.BoolPt return o.ApplyT(func(v EventOrchestrationGlobalCatchAllActions) *bool { return v.DropEvent }).(pulumi.BoolPtrOutput) } +// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. +func (o EventOrchestrationGlobalCatchAllActionsOutput) EscalationPolicy() pulumi.StringPtrOutput { + return o.ApplyT(func(v EventOrchestrationGlobalCatchAllActions) *string { return v.EscalationPolicy }).(pulumi.StringPtrOutput) +} + // sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` func (o EventOrchestrationGlobalCatchAllActionsOutput) EventAction() pulumi.StringPtrOutput { return o.ApplyT(func(v EventOrchestrationGlobalCatchAllActions) *string { return v.EventAction }).(pulumi.StringPtrOutput) @@ -1284,6 +1293,16 @@ func (o EventOrchestrationGlobalCatchAllActionsPtrOutput) DropEvent() pulumi.Boo }).(pulumi.BoolPtrOutput) } +// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. +func (o EventOrchestrationGlobalCatchAllActionsPtrOutput) EscalationPolicy() pulumi.StringPtrOutput { + return o.ApplyT(func(v *EventOrchestrationGlobalCatchAllActions) *string { + if v == nil { + return nil + } + return v.EscalationPolicy + }).(pulumi.StringPtrOutput) +} + // sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` func (o EventOrchestrationGlobalCatchAllActionsPtrOutput) EventAction() pulumi.StringPtrOutput { return o.ApplyT(func(v *EventOrchestrationGlobalCatchAllActions) *string { @@ -2408,6 +2427,8 @@ type EventOrchestrationGlobalSetRuleActions struct { AutomationAction *EventOrchestrationGlobalSetRuleActionsAutomationAction `pulumi:"automationAction"` // When true, this event will be dropped. Dropped events will not trigger or resolve an alert or an incident. Dropped events will not be evaluated against router rules. DropEvent *bool `pulumi:"dropEvent"` + // The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + EscalationPolicy *string `pulumi:"escalationPolicy"` // sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` EventAction *string `pulumi:"eventAction"` // Replace any CEF field or Custom Details object field using custom variables. @@ -2446,6 +2467,8 @@ type EventOrchestrationGlobalSetRuleActionsArgs struct { AutomationAction EventOrchestrationGlobalSetRuleActionsAutomationActionPtrInput `pulumi:"automationAction"` // When true, this event will be dropped. Dropped events will not trigger or resolve an alert or an incident. Dropped events will not be evaluated against router rules. DropEvent pulumi.BoolPtrInput `pulumi:"dropEvent"` + // The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + EscalationPolicy pulumi.StringPtrInput `pulumi:"escalationPolicy"` // sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` EventAction pulumi.StringPtrInput `pulumi:"eventAction"` // Replace any CEF field or Custom Details object field using custom variables. @@ -2509,6 +2532,11 @@ func (o EventOrchestrationGlobalSetRuleActionsOutput) DropEvent() pulumi.BoolPtr return o.ApplyT(func(v EventOrchestrationGlobalSetRuleActions) *bool { return v.DropEvent }).(pulumi.BoolPtrOutput) } +// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. +func (o EventOrchestrationGlobalSetRuleActionsOutput) EscalationPolicy() pulumi.StringPtrOutput { + return o.ApplyT(func(v EventOrchestrationGlobalSetRuleActions) *string { return v.EscalationPolicy }).(pulumi.StringPtrOutput) +} + // sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` func (o EventOrchestrationGlobalSetRuleActionsOutput) EventAction() pulumi.StringPtrOutput { return o.ApplyT(func(v EventOrchestrationGlobalSetRuleActions) *string { return v.EventAction }).(pulumi.StringPtrOutput) @@ -4225,8 +4253,9 @@ func (o EventOrchestrationRouterSetRuleArrayOutput) Index(i pulumi.IntInput) Eve } type EventOrchestrationRouterSetRuleActions struct { - // The ID of the target Service for the resulting alert. - RouteTo string `pulumi:"routeTo"` + // supports the following: + DynamicRouteTos []EventOrchestrationRouterSetRuleActionsDynamicRouteTo `pulumi:"dynamicRouteTos"` + RouteTo *string `pulumi:"routeTo"` } // EventOrchestrationRouterSetRuleActionsInput is an input type that accepts EventOrchestrationRouterSetRuleActionsArgs and EventOrchestrationRouterSetRuleActionsOutput values. @@ -4241,8 +4270,9 @@ type EventOrchestrationRouterSetRuleActionsInput interface { } type EventOrchestrationRouterSetRuleActionsArgs struct { - // The ID of the target Service for the resulting alert. - RouteTo pulumi.StringInput `pulumi:"routeTo"` + // supports the following: + DynamicRouteTos EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayInput `pulumi:"dynamicRouteTos"` + RouteTo pulumi.StringPtrInput `pulumi:"routeTo"` } func (EventOrchestrationRouterSetRuleActionsArgs) ElementType() reflect.Type { @@ -4271,9 +4301,136 @@ func (o EventOrchestrationRouterSetRuleActionsOutput) ToEventOrchestrationRouter return o } -// The ID of the target Service for the resulting alert. -func (o EventOrchestrationRouterSetRuleActionsOutput) RouteTo() pulumi.StringOutput { - return o.ApplyT(func(v EventOrchestrationRouterSetRuleActions) string { return v.RouteTo }).(pulumi.StringOutput) +// supports the following: +func (o EventOrchestrationRouterSetRuleActionsOutput) DynamicRouteTos() EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput { + return o.ApplyT(func(v EventOrchestrationRouterSetRuleActions) []EventOrchestrationRouterSetRuleActionsDynamicRouteTo { + return v.DynamicRouteTos + }).(EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput) +} + +func (o EventOrchestrationRouterSetRuleActionsOutput) RouteTo() pulumi.StringPtrOutput { + return o.ApplyT(func(v EventOrchestrationRouterSetRuleActions) *string { return v.RouteTo }).(pulumi.StringPtrOutput) +} + +type EventOrchestrationRouterSetRuleActionsDynamicRouteTo struct { + // Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `serviceName`, `serviceId` + // + // If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules. + LookupBy string `pulumi:"lookupBy"` + // The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax. + Regex string `pulumi:"regex"` + // The path to a field in an event. + Source string `pulumi:"source"` +} + +// EventOrchestrationRouterSetRuleActionsDynamicRouteToInput is an input type that accepts EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs and EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput values. +// You can construct a concrete instance of `EventOrchestrationRouterSetRuleActionsDynamicRouteToInput` via: +// +// EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs{...} +type EventOrchestrationRouterSetRuleActionsDynamicRouteToInput interface { + pulumi.Input + + ToEventOrchestrationRouterSetRuleActionsDynamicRouteToOutput() EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput + ToEventOrchestrationRouterSetRuleActionsDynamicRouteToOutputWithContext(context.Context) EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput +} + +type EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs struct { + // Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `serviceName`, `serviceId` + // + // If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules. + LookupBy pulumi.StringInput `pulumi:"lookupBy"` + // The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax. + Regex pulumi.StringInput `pulumi:"regex"` + // The path to a field in an event. + Source pulumi.StringInput `pulumi:"source"` +} + +func (EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs) ElementType() reflect.Type { + return reflect.TypeOf((*EventOrchestrationRouterSetRuleActionsDynamicRouteTo)(nil)).Elem() +} + +func (i EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs) ToEventOrchestrationRouterSetRuleActionsDynamicRouteToOutput() EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput { + return i.ToEventOrchestrationRouterSetRuleActionsDynamicRouteToOutputWithContext(context.Background()) +} + +func (i EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs) ToEventOrchestrationRouterSetRuleActionsDynamicRouteToOutputWithContext(ctx context.Context) EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput { + return pulumi.ToOutputWithContext(ctx, i).(EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput) +} + +// EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayInput is an input type that accepts EventOrchestrationRouterSetRuleActionsDynamicRouteToArray and EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput values. +// You can construct a concrete instance of `EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayInput` via: +// +// EventOrchestrationRouterSetRuleActionsDynamicRouteToArray{ EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs{...} } +type EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayInput interface { + pulumi.Input + + ToEventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput() EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput + ToEventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutputWithContext(context.Context) EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput +} + +type EventOrchestrationRouterSetRuleActionsDynamicRouteToArray []EventOrchestrationRouterSetRuleActionsDynamicRouteToInput + +func (EventOrchestrationRouterSetRuleActionsDynamicRouteToArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]EventOrchestrationRouterSetRuleActionsDynamicRouteTo)(nil)).Elem() +} + +func (i EventOrchestrationRouterSetRuleActionsDynamicRouteToArray) ToEventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput() EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput { + return i.ToEventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutputWithContext(context.Background()) +} + +func (i EventOrchestrationRouterSetRuleActionsDynamicRouteToArray) ToEventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutputWithContext(ctx context.Context) EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput) +} + +type EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput struct{ *pulumi.OutputState } + +func (EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput) ElementType() reflect.Type { + return reflect.TypeOf((*EventOrchestrationRouterSetRuleActionsDynamicRouteTo)(nil)).Elem() +} + +func (o EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput) ToEventOrchestrationRouterSetRuleActionsDynamicRouteToOutput() EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput { + return o +} + +func (o EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput) ToEventOrchestrationRouterSetRuleActionsDynamicRouteToOutputWithContext(ctx context.Context) EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput { + return o +} + +// Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `serviceName`, `serviceId` +// +// If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules. +func (o EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput) LookupBy() pulumi.StringOutput { + return o.ApplyT(func(v EventOrchestrationRouterSetRuleActionsDynamicRouteTo) string { return v.LookupBy }).(pulumi.StringOutput) +} + +// The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax. +func (o EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput) Regex() pulumi.StringOutput { + return o.ApplyT(func(v EventOrchestrationRouterSetRuleActionsDynamicRouteTo) string { return v.Regex }).(pulumi.StringOutput) +} + +// The path to a field in an event. +func (o EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput) Source() pulumi.StringOutput { + return o.ApplyT(func(v EventOrchestrationRouterSetRuleActionsDynamicRouteTo) string { return v.Source }).(pulumi.StringOutput) +} + +type EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput struct{ *pulumi.OutputState } + +func (EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]EventOrchestrationRouterSetRuleActionsDynamicRouteTo)(nil)).Elem() +} + +func (o EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput) ToEventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput() EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput { + return o +} + +func (o EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput) ToEventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutputWithContext(ctx context.Context) EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput { + return o +} + +func (o EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput) Index(i pulumi.IntInput) EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) EventOrchestrationRouterSetRuleActionsDynamicRouteTo { + return vs[0].([]EventOrchestrationRouterSetRuleActionsDynamicRouteTo)[vs[1].(int)] + }).(EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput) } type EventOrchestrationRouterSetRuleCondition struct { @@ -4806,6 +4963,8 @@ type EventOrchestrationServiceCatchAllActions struct { Annotate *string `pulumi:"annotate"` // Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident. AutomationAction *EventOrchestrationServiceCatchAllActionsAutomationAction `pulumi:"automationAction"` + // The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + EscalationPolicy *string `pulumi:"escalationPolicy"` // sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` EventAction *string `pulumi:"eventAction"` // Replace any CEF field or Custom Details object field using custom variables. @@ -4844,6 +5003,8 @@ type EventOrchestrationServiceCatchAllActionsArgs struct { Annotate pulumi.StringPtrInput `pulumi:"annotate"` // Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident. AutomationAction EventOrchestrationServiceCatchAllActionsAutomationActionPtrInput `pulumi:"automationAction"` + // The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + EscalationPolicy pulumi.StringPtrInput `pulumi:"escalationPolicy"` // sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` EventAction pulumi.StringPtrInput `pulumi:"eventAction"` // Replace any CEF field or Custom Details object field using custom variables. @@ -4955,6 +5116,11 @@ func (o EventOrchestrationServiceCatchAllActionsOutput) AutomationAction() Event }).(EventOrchestrationServiceCatchAllActionsAutomationActionPtrOutput) } +// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. +func (o EventOrchestrationServiceCatchAllActionsOutput) EscalationPolicy() pulumi.StringPtrOutput { + return o.ApplyT(func(v EventOrchestrationServiceCatchAllActions) *string { return v.EscalationPolicy }).(pulumi.StringPtrOutput) +} + // sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` func (o EventOrchestrationServiceCatchAllActionsOutput) EventAction() pulumi.StringPtrOutput { return o.ApplyT(func(v EventOrchestrationServiceCatchAllActions) *string { return v.EventAction }).(pulumi.StringPtrOutput) @@ -5057,6 +5223,16 @@ func (o EventOrchestrationServiceCatchAllActionsPtrOutput) AutomationAction() Ev }).(EventOrchestrationServiceCatchAllActionsAutomationActionPtrOutput) } +// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. +func (o EventOrchestrationServiceCatchAllActionsPtrOutput) EscalationPolicy() pulumi.StringPtrOutput { + return o.ApplyT(func(v *EventOrchestrationServiceCatchAllActions) *string { + if v == nil { + return nil + } + return v.EscalationPolicy + }).(pulumi.StringPtrOutput) +} + // sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` func (o EventOrchestrationServiceCatchAllActionsPtrOutput) EventAction() pulumi.StringPtrOutput { return o.ApplyT(func(v *EventOrchestrationServiceCatchAllActions) *string { @@ -6326,6 +6502,8 @@ type EventOrchestrationServiceSetRuleActions struct { Annotate *string `pulumi:"annotate"` // Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident. AutomationAction *EventOrchestrationServiceSetRuleActionsAutomationAction `pulumi:"automationAction"` + // The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + EscalationPolicy *string `pulumi:"escalationPolicy"` // sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` EventAction *string `pulumi:"eventAction"` // Replace any CEF field or Custom Details object field using custom variables. @@ -6364,6 +6542,8 @@ type EventOrchestrationServiceSetRuleActionsArgs struct { Annotate pulumi.StringPtrInput `pulumi:"annotate"` // Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident. AutomationAction EventOrchestrationServiceSetRuleActionsAutomationActionPtrInput `pulumi:"automationAction"` + // The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. + EscalationPolicy pulumi.StringPtrInput `pulumi:"escalationPolicy"` // sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` EventAction pulumi.StringPtrInput `pulumi:"eventAction"` // Replace any CEF field or Custom Details object field using custom variables. @@ -6424,6 +6604,11 @@ func (o EventOrchestrationServiceSetRuleActionsOutput) AutomationAction() EventO }).(EventOrchestrationServiceSetRuleActionsAutomationActionPtrOutput) } +// The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action. +func (o EventOrchestrationServiceSetRuleActionsOutput) EscalationPolicy() pulumi.StringPtrOutput { + return o.ApplyT(func(v EventOrchestrationServiceSetRuleActions) *string { return v.EscalationPolicy }).(pulumi.StringPtrOutput) +} + // sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve` func (o EventOrchestrationServiceSetRuleActionsOutput) EventAction() pulumi.StringPtrOutput { return o.ApplyT(func(v EventOrchestrationServiceSetRuleActions) *string { return v.EventAction }).(pulumi.StringPtrOutput) @@ -21119,6 +21304,8 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*EventOrchestrationRouterSetRuleInput)(nil)).Elem(), EventOrchestrationRouterSetRuleArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*EventOrchestrationRouterSetRuleArrayInput)(nil)).Elem(), EventOrchestrationRouterSetRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*EventOrchestrationRouterSetRuleActionsInput)(nil)).Elem(), EventOrchestrationRouterSetRuleActionsArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*EventOrchestrationRouterSetRuleActionsDynamicRouteToInput)(nil)).Elem(), EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayInput)(nil)).Elem(), EventOrchestrationRouterSetRuleActionsDynamicRouteToArray{}) pulumi.RegisterInputType(reflect.TypeOf((*EventOrchestrationRouterSetRuleConditionInput)(nil)).Elem(), EventOrchestrationRouterSetRuleConditionArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*EventOrchestrationRouterSetRuleConditionArrayInput)(nil)).Elem(), EventOrchestrationRouterSetRuleConditionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*EventOrchestrationServiceCacheVariableConditionInput)(nil)).Elem(), EventOrchestrationServiceCacheVariableConditionArgs{}) @@ -21432,6 +21619,8 @@ func init() { pulumi.RegisterOutputType(EventOrchestrationRouterSetRuleOutput{}) pulumi.RegisterOutputType(EventOrchestrationRouterSetRuleArrayOutput{}) pulumi.RegisterOutputType(EventOrchestrationRouterSetRuleActionsOutput{}) + pulumi.RegisterOutputType(EventOrchestrationRouterSetRuleActionsDynamicRouteToOutput{}) + pulumi.RegisterOutputType(EventOrchestrationRouterSetRuleActionsDynamicRouteToArrayOutput{}) pulumi.RegisterOutputType(EventOrchestrationRouterSetRuleConditionOutput{}) pulumi.RegisterOutputType(EventOrchestrationRouterSetRuleConditionArrayOutput{}) pulumi.RegisterOutputType(EventOrchestrationServiceCacheVariableConditionOutput{}) diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/EventOrchestrationGlobal.java b/sdk/java/src/main/java/com/pulumi/pagerduty/EventOrchestrationGlobal.java index 3c2277b9..3a24cf2c 100644 --- a/sdk/java/src/main/java/com/pulumi/pagerduty/EventOrchestrationGlobal.java +++ b/sdk/java/src/main/java/com/pulumi/pagerduty/EventOrchestrationGlobal.java @@ -23,7 +23,7 @@ * * This example shows creating `Team`, and `Event Orchestration` resources followed by creating a Global Orchestration to handle Events sent to that Event Orchestration. * - * This example also shows using `priority` data source to configure `priority` action for a rule. If the Event matches the third rule in set "step-two" the resulting incident will have the Priority `P1`. + * This example also shows using the pagerduty.getPriority data sources to configure `priority` and `escalation_policy` actions for a rule. * * This example shows a Global Orchestration that has nested sets: a rule in the "start" set has a `route_to` action pointing at the "step-two" set. * @@ -43,6 +43,7 @@ * import com.pulumi.pagerduty.EventOrchestrationArgs; * import com.pulumi.pagerduty.PagerdutyFunctions; * import com.pulumi.pagerduty.inputs.GetPriorityArgs; + * import com.pulumi.pagerduty.inputs.GetEscalationPolicyArgs; * import com.pulumi.pagerduty.EventOrchestrationGlobal; * import com.pulumi.pagerduty.EventOrchestrationGlobalArgs; * import com.pulumi.pagerduty.inputs.EventOrchestrationGlobalSetArgs; @@ -74,6 +75,10 @@ * .name("P1") * .build()); * + * final var sreEscPolicy = PagerdutyFunctions.getEscalationPolicy(GetEscalationPolicyArgs.builder() + * .name("SRE Escalation Policy") + * .build()); + * * var global = new EventOrchestrationGlobal("global", EventOrchestrationGlobalArgs.builder() * .eventOrchestration(eventOrchestration.id()) * .sets( @@ -100,6 +105,15 @@ * .build()) * .build(), * EventOrchestrationGlobalSetRuleArgs.builder() + * .label("If the DB host is running out of space, then page the SRE team") + * .conditions(EventOrchestrationGlobalSetRuleConditionArgs.builder() + * .expression("event.summary matches part 'running out of space'") + * .build()) + * .actions(EventOrchestrationGlobalSetRuleActionsArgs.builder() + * .escalationPolicy(sreEscPolicy.applyValue(getEscalationPolicyResult -> getEscalationPolicyResult.id())) + * .build()) + * .build(), + * EventOrchestrationGlobalSetRuleArgs.builder() * .label("If there's something wrong on the replica, then mark the alert as a warning") * .conditions(EventOrchestrationGlobalSetRuleConditionArgs.builder() * .expression("event.custom_details.hostname matches part 'replica'") diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/EventOrchestrationRouter.java b/sdk/java/src/main/java/com/pulumi/pagerduty/EventOrchestrationRouter.java index a0816ec2..f450fd8c 100644 --- a/sdk/java/src/main/java/com/pulumi/pagerduty/EventOrchestrationRouter.java +++ b/sdk/java/src/main/java/com/pulumi/pagerduty/EventOrchestrationRouter.java @@ -20,9 +20,7 @@ * * ## Example of configuring Router rules for an Orchestration * - * In this example the user has defined the Router with two rules, each routing to a different service. - * - * This example assumes services used in the `route_to` configuration already exists. So it does not show creation of service resource. + * In this example the user has defined the Router with three rules. The first rule configures a dynamic route: any event containing a value in its `pd_service_id` custom detail will be routed to the Service with the ID specified by that value. The other rules route events matching a condition to specific services. * * <!--Start PulumiCodeChooser --> *
@@ -32,6 +30,8 @@
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
  * import com.pulumi.core.Output;
+ * import com.pulumi.pagerduty.PagerdutyFunctions;
+ * import com.pulumi.pagerduty.inputs.GetServiceArgs;
  * import com.pulumi.pagerduty.EventOrchestrationRouter;
  * import com.pulumi.pagerduty.EventOrchestrationRouterArgs;
  * import com.pulumi.pagerduty.inputs.EventOrchestrationRouterSetArgs;
@@ -50,12 +50,30 @@
  *     }
  * 
  *     public static void stack(Context ctx) {
+ *         final var database = PagerdutyFunctions.getService(GetServiceArgs.builder()
+ *             .name("Primary Data Store")
+ *             .build());
+ * 
+ *         final var www = PagerdutyFunctions.getService(GetServiceArgs.builder()
+ *             .name("Web Server App")
+ *             .build());
+ * 
  *         var router = new EventOrchestrationRouter("router", EventOrchestrationRouterArgs.builder()
  *             .eventOrchestration(myMonitor.id())
  *             .set(EventOrchestrationRouterSetArgs.builder()
  *                 .id("start")
  *                 .rules(                
  *                     EventOrchestrationRouterSetRuleArgs.builder()
+ *                         .label("Dynamically route events related to specific PagerDuty services")
+ *                         .actions(EventOrchestrationRouterSetRuleActionsArgs.builder()
+ *                             .dynamicRouteTos(EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs.builder()
+ *                                 .lookupBy("service_id")
+ *                                 .source("event.custom_details.pd_service_id")
+ *                                 .regexp("(.*)")
+ *                                 .build())
+ *                             .build())
+ *                         .build(),
+ *                     EventOrchestrationRouterSetRuleArgs.builder()
  *                         .label("Events relating to our relational database")
  *                         .conditions(                        
  *                             EventOrchestrationRouterSetRuleConditionArgs.builder()
@@ -65,7 +83,7 @@
  *                                 .expression("event.source matches regex 'db[0-9]+-server'")
  *                                 .build())
  *                         .actions(EventOrchestrationRouterSetRuleActionsArgs.builder()
- *                             .routeTo(database.id())
+ *                             .routeTo(database.applyValue(getServiceResult -> getServiceResult.id()))
  *                             .build())
  *                         .build(),
  *                     EventOrchestrationRouterSetRuleArgs.builder()
@@ -73,7 +91,7 @@
  *                             .expression("event.summary matches part 'www'")
  *                             .build())
  *                         .actions(EventOrchestrationRouterSetRuleActionsArgs.builder()
- *                             .routeTo(www.id())
+ *                             .routeTo(www.applyValue(getServiceResult -> getServiceResult.id()))
  *                             .build())
  *                         .build())
  *                 .build())
diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/EventOrchestrationService.java b/sdk/java/src/main/java/com/pulumi/pagerduty/EventOrchestrationService.java
index b483ca01..af0ac034 100644
--- a/sdk/java/src/main/java/com/pulumi/pagerduty/EventOrchestrationService.java
+++ b/sdk/java/src/main/java/com/pulumi/pagerduty/EventOrchestrationService.java
@@ -26,7 +26,7 @@
  * 
  * This example shows creating `Team`, `User`, `Escalation Policy`, and `Service` resources followed by creating a Service Orchestration to handle Events sent to that Service.
  * 
- * This example also shows using `priority` data source to configure `priority` action for a rule. If the Event matches the first rule in set "step-two" the resulting incident will have the Priority `P1`.
+ * This example also shows using the pagerduty.getPriority data sources to configure `priority` and `escalation_policy` actions for a rule.
  * 
  * This example shows a Service Orchestration that has nested sets: a rule in the "start" set has a `route_to` action pointing at the "step-two" set.
  * 
@@ -55,6 +55,7 @@
  * import com.pulumi.pagerduty.IncidentCustomFieldArgs;
  * import com.pulumi.pagerduty.PagerdutyFunctions;
  * import com.pulumi.pagerduty.inputs.GetPriorityArgs;
+ * import com.pulumi.pagerduty.inputs.GetEscalationPolicyArgs;
  * import com.pulumi.pagerduty.EventOrchestrationService;
  * import com.pulumi.pagerduty.EventOrchestrationServiceArgs;
  * import com.pulumi.pagerduty.inputs.EventOrchestrationServiceSetArgs;
@@ -118,6 +119,10 @@
  *             .name("P1")
  *             .build());
  * 
+ *         final var sreEscPolicy = PagerdutyFunctions.getEscalationPolicy(GetEscalationPolicyArgs.builder()
+ *             .name("SRE Escalation Policy")
+ *             .build());
+ * 
  *         var www = new EventOrchestrationService("www", EventOrchestrationServiceArgs.builder()
  *             .service(exampleService.id())
  *             .enableEventOrchestrationForService(true)
@@ -165,6 +170,15 @@
  *                                 .build())
  *                             .build(),
  *                         EventOrchestrationServiceSetRuleArgs.builder()
+ *                             .label("If any of the API apps are unavailable, page the SRE team")
+ *                             .conditions(EventOrchestrationServiceSetRuleConditionArgs.builder()
+ *                                 .expression("event.custom_details.service_name matches part '-api' and event.custom_details.status_code matches '502'")
+ *                                 .build())
+ *                             .actions(EventOrchestrationServiceSetRuleActionsArgs.builder()
+ *                                 .escalationPolicy(sreEscPolicy.applyValue(getEscalationPolicyResult -> getEscalationPolicyResult.id()))
+ *                                 .build())
+ *                             .build(),
+ *                         EventOrchestrationServiceSetRuleArgs.builder()
  *                             .label("If there's something wrong on the canary let the team know about it in our deployments Slack channel")
  *                             .conditions(EventOrchestrationServiceSetRuleConditionArgs.builder()
  *                                 .expression("event.custom_details.hostname matches part 'canary'")
diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationGlobalCatchAllActionsArgs.java b/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationGlobalCatchAllActionsArgs.java
index a6e01754..d099506c 100644
--- a/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationGlobalCatchAllActionsArgs.java
+++ b/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationGlobalCatchAllActionsArgs.java
@@ -67,6 +67,21 @@ public Optional> dropEvent() {
         return Optional.ofNullable(this.dropEvent);
     }
 
+    /**
+     * The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     * 
+     */
+    @Import(name="escalationPolicy")
+    private @Nullable Output escalationPolicy;
+
+    /**
+     * @return The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     * 
+     */
+    public Optional> escalationPolicy() {
+        return Optional.ofNullable(this.escalationPolicy);
+    }
+
     /**
      * sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      * 
@@ -208,6 +223,7 @@ private EventOrchestrationGlobalCatchAllActionsArgs(EventOrchestrationGlobalCatc
         this.annotate = $.annotate;
         this.automationAction = $.automationAction;
         this.dropEvent = $.dropEvent;
+        this.escalationPolicy = $.escalationPolicy;
         this.eventAction = $.eventAction;
         this.extractions = $.extractions;
         this.incidentCustomFieldUpdates = $.incidentCustomFieldUpdates;
@@ -300,6 +316,27 @@ public Builder dropEvent(Boolean dropEvent) {
             return dropEvent(Output.of(dropEvent));
         }
 
+        /**
+         * @param escalationPolicy The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+         * 
+         * @return builder
+         * 
+         */
+        public Builder escalationPolicy(@Nullable Output escalationPolicy) {
+            $.escalationPolicy = escalationPolicy;
+            return this;
+        }
+
+        /**
+         * @param escalationPolicy The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+         * 
+         * @return builder
+         * 
+         */
+        public Builder escalationPolicy(String escalationPolicy) {
+            return escalationPolicy(Output.of(escalationPolicy));
+        }
+
         /**
          * @param eventAction sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
          * 
diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationGlobalSetRuleActionsArgs.java b/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationGlobalSetRuleActionsArgs.java
index 41d60c29..5ea52671 100644
--- a/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationGlobalSetRuleActionsArgs.java
+++ b/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationGlobalSetRuleActionsArgs.java
@@ -67,6 +67,21 @@ public Optional> dropEvent() {
         return Optional.ofNullable(this.dropEvent);
     }
 
+    /**
+     * The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     * 
+     */
+    @Import(name="escalationPolicy")
+    private @Nullable Output escalationPolicy;
+
+    /**
+     * @return The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     * 
+     */
+    public Optional> escalationPolicy() {
+        return Optional.ofNullable(this.escalationPolicy);
+    }
+
     /**
      * sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      * 
@@ -208,6 +223,7 @@ private EventOrchestrationGlobalSetRuleActionsArgs(EventOrchestrationGlobalSetRu
         this.annotate = $.annotate;
         this.automationAction = $.automationAction;
         this.dropEvent = $.dropEvent;
+        this.escalationPolicy = $.escalationPolicy;
         this.eventAction = $.eventAction;
         this.extractions = $.extractions;
         this.incidentCustomFieldUpdates = $.incidentCustomFieldUpdates;
@@ -300,6 +316,27 @@ public Builder dropEvent(Boolean dropEvent) {
             return dropEvent(Output.of(dropEvent));
         }
 
+        /**
+         * @param escalationPolicy The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+         * 
+         * @return builder
+         * 
+         */
+        public Builder escalationPolicy(@Nullable Output escalationPolicy) {
+            $.escalationPolicy = escalationPolicy;
+            return this;
+        }
+
+        /**
+         * @param escalationPolicy The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+         * 
+         * @return builder
+         * 
+         */
+        public Builder escalationPolicy(String escalationPolicy) {
+            return escalationPolicy(Output.of(escalationPolicy));
+        }
+
         /**
          * @param eventAction sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
          * 
diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationRouterSetRuleActionsArgs.java b/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationRouterSetRuleActionsArgs.java
index fbd6a6c8..addf53c2 100644
--- a/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationRouterSetRuleActionsArgs.java
+++ b/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationRouterSetRuleActionsArgs.java
@@ -5,9 +5,12 @@
 
 import com.pulumi.core.Output;
 import com.pulumi.core.annotations.Import;
-import com.pulumi.exceptions.MissingRequiredPropertyException;
+import com.pulumi.pagerduty.inputs.EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs;
 import java.lang.String;
+import java.util.List;
 import java.util.Objects;
+import java.util.Optional;
+import javax.annotation.Nullable;
 
 
 public final class EventOrchestrationRouterSetRuleActionsArgs extends com.pulumi.resources.ResourceArgs {
@@ -15,23 +18,31 @@ public final class EventOrchestrationRouterSetRuleActionsArgs extends com.pulumi
     public static final EventOrchestrationRouterSetRuleActionsArgs Empty = new EventOrchestrationRouterSetRuleActionsArgs();
 
     /**
-     * The ID of the target Service for the resulting alert.
+     * supports the following:
      * 
      */
-    @Import(name="routeTo", required=true)
-    private Output routeTo;
+    @Import(name="dynamicRouteTos")
+    private @Nullable Output> dynamicRouteTos;
 
     /**
-     * @return The ID of the target Service for the resulting alert.
+     * @return supports the following:
      * 
      */
-    public Output routeTo() {
-        return this.routeTo;
+    public Optional>> dynamicRouteTos() {
+        return Optional.ofNullable(this.dynamicRouteTos);
+    }
+
+    @Import(name="routeTo")
+    private @Nullable Output routeTo;
+
+    public Optional> routeTo() {
+        return Optional.ofNullable(this.routeTo);
     }
 
     private EventOrchestrationRouterSetRuleActionsArgs() {}
 
     private EventOrchestrationRouterSetRuleActionsArgs(EventOrchestrationRouterSetRuleActionsArgs $) {
+        this.dynamicRouteTos = $.dynamicRouteTos;
         this.routeTo = $.routeTo;
     }
 
@@ -54,30 +65,46 @@ public Builder(EventOrchestrationRouterSetRuleActionsArgs defaults) {
         }
 
         /**
-         * @param routeTo The ID of the target Service for the resulting alert.
+         * @param dynamicRouteTos supports the following:
          * 
          * @return builder
          * 
          */
-        public Builder routeTo(Output routeTo) {
-            $.routeTo = routeTo;
+        public Builder dynamicRouteTos(@Nullable Output> dynamicRouteTos) {
+            $.dynamicRouteTos = dynamicRouteTos;
             return this;
         }
 
         /**
-         * @param routeTo The ID of the target Service for the resulting alert.
+         * @param dynamicRouteTos supports the following:
          * 
          * @return builder
          * 
          */
+        public Builder dynamicRouteTos(List dynamicRouteTos) {
+            return dynamicRouteTos(Output.of(dynamicRouteTos));
+        }
+
+        /**
+         * @param dynamicRouteTos supports the following:
+         * 
+         * @return builder
+         * 
+         */
+        public Builder dynamicRouteTos(EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs... dynamicRouteTos) {
+            return dynamicRouteTos(List.of(dynamicRouteTos));
+        }
+
+        public Builder routeTo(@Nullable Output routeTo) {
+            $.routeTo = routeTo;
+            return this;
+        }
+
         public Builder routeTo(String routeTo) {
             return routeTo(Output.of(routeTo));
         }
 
         public EventOrchestrationRouterSetRuleActionsArgs build() {
-            if ($.routeTo == null) {
-                throw new MissingRequiredPropertyException("EventOrchestrationRouterSetRuleActionsArgs", "routeTo");
-            }
             return $;
         }
     }
diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs.java b/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs.java
new file mode 100644
index 00000000..4fd2fd21
--- /dev/null
+++ b/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs.java
@@ -0,0 +1,173 @@
+// *** WARNING: this file was generated by pulumi-java-gen. ***
+// *** Do not edit by hand unless you're certain you know what you are doing! ***
+
+package com.pulumi.pagerduty.inputs;
+
+import com.pulumi.core.Output;
+import com.pulumi.core.annotations.Import;
+import com.pulumi.exceptions.MissingRequiredPropertyException;
+import java.lang.String;
+import java.util.Objects;
+
+
+public final class EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs extends com.pulumi.resources.ResourceArgs {
+
+    public static final EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs Empty = new EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs();
+
+    /**
+     * Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `service_name`, `service_id`
+     * 
+     * If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules.
+     * 
+     */
+    @Import(name="lookupBy", required=true)
+    private Output lookupBy;
+
+    /**
+     * @return Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `service_name`, `service_id`
+     * 
+     * If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules.
+     * 
+     */
+    public Output lookupBy() {
+        return this.lookupBy;
+    }
+
+    /**
+     * The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax.
+     * 
+     */
+    @Import(name="regex", required=true)
+    private Output regex;
+
+    /**
+     * @return The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax.
+     * 
+     */
+    public Output regex() {
+        return this.regex;
+    }
+
+    /**
+     * The path to a field in an event.
+     * 
+     */
+    @Import(name="source", required=true)
+    private Output source;
+
+    /**
+     * @return The path to a field in an event.
+     * 
+     */
+    public Output source() {
+        return this.source;
+    }
+
+    private EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs() {}
+
+    private EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs(EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs $) {
+        this.lookupBy = $.lookupBy;
+        this.regex = $.regex;
+        this.source = $.source;
+    }
+
+    public static Builder builder() {
+        return new Builder();
+    }
+    public static Builder builder(EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs defaults) {
+        return new Builder(defaults);
+    }
+
+    public static final class Builder {
+        private EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs $;
+
+        public Builder() {
+            $ = new EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs();
+        }
+
+        public Builder(EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs defaults) {
+            $ = new EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs(Objects.requireNonNull(defaults));
+        }
+
+        /**
+         * @param lookupBy Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `service_name`, `service_id`
+         * 
+         * If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules.
+         * 
+         * @return builder
+         * 
+         */
+        public Builder lookupBy(Output lookupBy) {
+            $.lookupBy = lookupBy;
+            return this;
+        }
+
+        /**
+         * @param lookupBy Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `service_name`, `service_id`
+         * 
+         * If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules.
+         * 
+         * @return builder
+         * 
+         */
+        public Builder lookupBy(String lookupBy) {
+            return lookupBy(Output.of(lookupBy));
+        }
+
+        /**
+         * @param regex The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax.
+         * 
+         * @return builder
+         * 
+         */
+        public Builder regex(Output regex) {
+            $.regex = regex;
+            return this;
+        }
+
+        /**
+         * @param regex The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax.
+         * 
+         * @return builder
+         * 
+         */
+        public Builder regex(String regex) {
+            return regex(Output.of(regex));
+        }
+
+        /**
+         * @param source The path to a field in an event.
+         * 
+         * @return builder
+         * 
+         */
+        public Builder source(Output source) {
+            $.source = source;
+            return this;
+        }
+
+        /**
+         * @param source The path to a field in an event.
+         * 
+         * @return builder
+         * 
+         */
+        public Builder source(String source) {
+            return source(Output.of(source));
+        }
+
+        public EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs build() {
+            if ($.lookupBy == null) {
+                throw new MissingRequiredPropertyException("EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs", "lookupBy");
+            }
+            if ($.regex == null) {
+                throw new MissingRequiredPropertyException("EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs", "regex");
+            }
+            if ($.source == null) {
+                throw new MissingRequiredPropertyException("EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs", "source");
+            }
+            return $;
+        }
+    }
+
+}
diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationServiceCatchAllActionsArgs.java b/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationServiceCatchAllActionsArgs.java
index 69afe353..ff3471cc 100644
--- a/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationServiceCatchAllActionsArgs.java
+++ b/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationServiceCatchAllActionsArgs.java
@@ -53,6 +53,21 @@ public Optional escalationPolicy;
+
+    /**
+     * @return The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     * 
+     */
+    public Optional> escalationPolicy() {
+        return Optional.ofNullable(this.escalationPolicy);
+    }
+
     /**
      * sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      * 
@@ -208,6 +223,7 @@ private EventOrchestrationServiceCatchAllActionsArgs() {}
     private EventOrchestrationServiceCatchAllActionsArgs(EventOrchestrationServiceCatchAllActionsArgs $) {
         this.annotate = $.annotate;
         this.automationAction = $.automationAction;
+        this.escalationPolicy = $.escalationPolicy;
         this.eventAction = $.eventAction;
         this.extractions = $.extractions;
         this.incidentCustomFieldUpdates = $.incidentCustomFieldUpdates;
@@ -280,6 +296,27 @@ public Builder automationAction(EventOrchestrationServiceCatchAllActionsAutomati
             return automationAction(Output.of(automationAction));
         }
 
+        /**
+         * @param escalationPolicy The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+         * 
+         * @return builder
+         * 
+         */
+        public Builder escalationPolicy(@Nullable Output escalationPolicy) {
+            $.escalationPolicy = escalationPolicy;
+            return this;
+        }
+
+        /**
+         * @param escalationPolicy The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+         * 
+         * @return builder
+         * 
+         */
+        public Builder escalationPolicy(String escalationPolicy) {
+            return escalationPolicy(Output.of(escalationPolicy));
+        }
+
         /**
          * @param eventAction sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
          * 
diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationServiceSetRuleActionsArgs.java b/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationServiceSetRuleActionsArgs.java
index 791c2145..6fe426df 100644
--- a/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationServiceSetRuleActionsArgs.java
+++ b/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/EventOrchestrationServiceSetRuleActionsArgs.java
@@ -53,6 +53,21 @@ public Optional escalationPolicy;
+
+    /**
+     * @return The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     * 
+     */
+    public Optional> escalationPolicy() {
+        return Optional.ofNullable(this.escalationPolicy);
+    }
+
     /**
      * sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      * 
@@ -208,6 +223,7 @@ private EventOrchestrationServiceSetRuleActionsArgs() {}
     private EventOrchestrationServiceSetRuleActionsArgs(EventOrchestrationServiceSetRuleActionsArgs $) {
         this.annotate = $.annotate;
         this.automationAction = $.automationAction;
+        this.escalationPolicy = $.escalationPolicy;
         this.eventAction = $.eventAction;
         this.extractions = $.extractions;
         this.incidentCustomFieldUpdates = $.incidentCustomFieldUpdates;
@@ -280,6 +296,27 @@ public Builder automationAction(EventOrchestrationServiceSetRuleActionsAutomatio
             return automationAction(Output.of(automationAction));
         }
 
+        /**
+         * @param escalationPolicy The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+         * 
+         * @return builder
+         * 
+         */
+        public Builder escalationPolicy(@Nullable Output escalationPolicy) {
+            $.escalationPolicy = escalationPolicy;
+            return this;
+        }
+
+        /**
+         * @param escalationPolicy The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+         * 
+         * @return builder
+         * 
+         */
+        public Builder escalationPolicy(String escalationPolicy) {
+            return escalationPolicy(Output.of(escalationPolicy));
+        }
+
         /**
          * @param eventAction sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
          * 
diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationGlobalCatchAllActions.java b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationGlobalCatchAllActions.java
index c4673bf2..1d614269 100644
--- a/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationGlobalCatchAllActions.java
+++ b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationGlobalCatchAllActions.java
@@ -33,6 +33,11 @@ public final class EventOrchestrationGlobalCatchAllActions {
      * 
      */
     private @Nullable Boolean dropEvent;
+    /**
+     * @return The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     * 
+     */
+    private @Nullable String escalationPolicy;
     /**
      * @return sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      * 
@@ -101,6 +106,13 @@ public Optional automat
     public Optional dropEvent() {
         return Optional.ofNullable(this.dropEvent);
     }
+    /**
+     * @return The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     * 
+     */
+    public Optional escalationPolicy() {
+        return Optional.ofNullable(this.escalationPolicy);
+    }
     /**
      * @return sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      * 
@@ -177,6 +189,7 @@ public static final class Builder {
         private @Nullable String annotate;
         private @Nullable EventOrchestrationGlobalCatchAllActionsAutomationAction automationAction;
         private @Nullable Boolean dropEvent;
+        private @Nullable String escalationPolicy;
         private @Nullable String eventAction;
         private @Nullable List extractions;
         private @Nullable List incidentCustomFieldUpdates;
@@ -192,6 +205,7 @@ public Builder(EventOrchestrationGlobalCatchAllActions defaults) {
     	      this.annotate = defaults.annotate;
     	      this.automationAction = defaults.automationAction;
     	      this.dropEvent = defaults.dropEvent;
+    	      this.escalationPolicy = defaults.escalationPolicy;
     	      this.eventAction = defaults.eventAction;
     	      this.extractions = defaults.extractions;
     	      this.incidentCustomFieldUpdates = defaults.incidentCustomFieldUpdates;
@@ -222,6 +236,12 @@ public Builder dropEvent(@Nullable Boolean dropEvent) {
             return this;
         }
         @CustomType.Setter
+        public Builder escalationPolicy(@Nullable String escalationPolicy) {
+
+            this.escalationPolicy = escalationPolicy;
+            return this;
+        }
+        @CustomType.Setter
         public Builder eventAction(@Nullable String eventAction) {
 
             this.eventAction = eventAction;
@@ -289,6 +309,7 @@ public EventOrchestrationGlobalCatchAllActions build() {
             _resultValue.annotate = annotate;
             _resultValue.automationAction = automationAction;
             _resultValue.dropEvent = dropEvent;
+            _resultValue.escalationPolicy = escalationPolicy;
             _resultValue.eventAction = eventAction;
             _resultValue.extractions = extractions;
             _resultValue.incidentCustomFieldUpdates = incidentCustomFieldUpdates;
diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationGlobalSetRuleActions.java b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationGlobalSetRuleActions.java
index 8857acb2..5d00ba7a 100644
--- a/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationGlobalSetRuleActions.java
+++ b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationGlobalSetRuleActions.java
@@ -33,6 +33,11 @@ public final class EventOrchestrationGlobalSetRuleActions {
      * 
      */
     private @Nullable Boolean dropEvent;
+    /**
+     * @return The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     * 
+     */
+    private @Nullable String escalationPolicy;
     /**
      * @return sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      * 
@@ -101,6 +106,13 @@ public Optional automati
     public Optional dropEvent() {
         return Optional.ofNullable(this.dropEvent);
     }
+    /**
+     * @return The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     * 
+     */
+    public Optional escalationPolicy() {
+        return Optional.ofNullable(this.escalationPolicy);
+    }
     /**
      * @return sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      * 
@@ -177,6 +189,7 @@ public static final class Builder {
         private @Nullable String annotate;
         private @Nullable EventOrchestrationGlobalSetRuleActionsAutomationAction automationAction;
         private @Nullable Boolean dropEvent;
+        private @Nullable String escalationPolicy;
         private @Nullable String eventAction;
         private @Nullable List extractions;
         private @Nullable List incidentCustomFieldUpdates;
@@ -192,6 +205,7 @@ public Builder(EventOrchestrationGlobalSetRuleActions defaults) {
     	      this.annotate = defaults.annotate;
     	      this.automationAction = defaults.automationAction;
     	      this.dropEvent = defaults.dropEvent;
+    	      this.escalationPolicy = defaults.escalationPolicy;
     	      this.eventAction = defaults.eventAction;
     	      this.extractions = defaults.extractions;
     	      this.incidentCustomFieldUpdates = defaults.incidentCustomFieldUpdates;
@@ -222,6 +236,12 @@ public Builder dropEvent(@Nullable Boolean dropEvent) {
             return this;
         }
         @CustomType.Setter
+        public Builder escalationPolicy(@Nullable String escalationPolicy) {
+
+            this.escalationPolicy = escalationPolicy;
+            return this;
+        }
+        @CustomType.Setter
         public Builder eventAction(@Nullable String eventAction) {
 
             this.eventAction = eventAction;
@@ -289,6 +309,7 @@ public EventOrchestrationGlobalSetRuleActions build() {
             _resultValue.annotate = annotate;
             _resultValue.automationAction = automationAction;
             _resultValue.dropEvent = dropEvent;
+            _resultValue.escalationPolicy = escalationPolicy;
             _resultValue.eventAction = eventAction;
             _resultValue.extractions = extractions;
             _resultValue.incidentCustomFieldUpdates = incidentCustomFieldUpdates;
diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationRouterSetRuleActions.java b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationRouterSetRuleActions.java
index f635f422..bf9570e9 100644
--- a/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationRouterSetRuleActions.java
+++ b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationRouterSetRuleActions.java
@@ -4,25 +4,32 @@
 package com.pulumi.pagerduty.outputs;
 
 import com.pulumi.core.annotations.CustomType;
-import com.pulumi.exceptions.MissingRequiredPropertyException;
+import com.pulumi.pagerduty.outputs.EventOrchestrationRouterSetRuleActionsDynamicRouteTo;
 import java.lang.String;
+import java.util.List;
 import java.util.Objects;
+import java.util.Optional;
+import javax.annotation.Nullable;
 
 @CustomType
 public final class EventOrchestrationRouterSetRuleActions {
     /**
-     * @return The ID of the target Service for the resulting alert.
+     * @return supports the following:
      * 
      */
-    private String routeTo;
+    private @Nullable List dynamicRouteTos;
+    private @Nullable String routeTo;
 
     private EventOrchestrationRouterSetRuleActions() {}
     /**
-     * @return The ID of the target Service for the resulting alert.
+     * @return supports the following:
      * 
      */
-    public String routeTo() {
-        return this.routeTo;
+    public List dynamicRouteTos() {
+        return this.dynamicRouteTos == null ? List.of() : this.dynamicRouteTos;
+    }
+    public Optional routeTo() {
+        return Optional.ofNullable(this.routeTo);
     }
 
     public static Builder builder() {
@@ -34,23 +41,33 @@ public static Builder builder(EventOrchestrationRouterSetRuleActions defaults) {
     }
     @CustomType.Builder
     public static final class Builder {
-        private String routeTo;
+        private @Nullable List dynamicRouteTos;
+        private @Nullable String routeTo;
         public Builder() {}
         public Builder(EventOrchestrationRouterSetRuleActions defaults) {
     	      Objects.requireNonNull(defaults);
+    	      this.dynamicRouteTos = defaults.dynamicRouteTos;
     	      this.routeTo = defaults.routeTo;
         }
 
         @CustomType.Setter
-        public Builder routeTo(String routeTo) {
-            if (routeTo == null) {
-              throw new MissingRequiredPropertyException("EventOrchestrationRouterSetRuleActions", "routeTo");
-            }
+        public Builder dynamicRouteTos(@Nullable List dynamicRouteTos) {
+
+            this.dynamicRouteTos = dynamicRouteTos;
+            return this;
+        }
+        public Builder dynamicRouteTos(EventOrchestrationRouterSetRuleActionsDynamicRouteTo... dynamicRouteTos) {
+            return dynamicRouteTos(List.of(dynamicRouteTos));
+        }
+        @CustomType.Setter
+        public Builder routeTo(@Nullable String routeTo) {
+
             this.routeTo = routeTo;
             return this;
         }
         public EventOrchestrationRouterSetRuleActions build() {
             final var _resultValue = new EventOrchestrationRouterSetRuleActions();
+            _resultValue.dynamicRouteTos = dynamicRouteTos;
             _resultValue.routeTo = routeTo;
             return _resultValue;
         }
diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationRouterSetRuleActionsDynamicRouteTo.java b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationRouterSetRuleActionsDynamicRouteTo.java
new file mode 100644
index 00000000..d41abe63
--- /dev/null
+++ b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationRouterSetRuleActionsDynamicRouteTo.java
@@ -0,0 +1,108 @@
+// *** WARNING: this file was generated by pulumi-java-gen. ***
+// *** Do not edit by hand unless you're certain you know what you are doing! ***
+
+package com.pulumi.pagerduty.outputs;
+
+import com.pulumi.core.annotations.CustomType;
+import com.pulumi.exceptions.MissingRequiredPropertyException;
+import java.lang.String;
+import java.util.Objects;
+
+@CustomType
+public final class EventOrchestrationRouterSetRuleActionsDynamicRouteTo {
+    /**
+     * @return Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `service_name`, `service_id`
+     * 
+     * If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules.
+     * 
+     */
+    private String lookupBy;
+    /**
+     * @return The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax.
+     * 
+     */
+    private String regex;
+    /**
+     * @return The path to a field in an event.
+     * 
+     */
+    private String source;
+
+    private EventOrchestrationRouterSetRuleActionsDynamicRouteTo() {}
+    /**
+     * @return Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `service_name`, `service_id`
+     * 
+     * If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules.
+     * 
+     */
+    public String lookupBy() {
+        return this.lookupBy;
+    }
+    /**
+     * @return The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax.
+     * 
+     */
+    public String regex() {
+        return this.regex;
+    }
+    /**
+     * @return The path to a field in an event.
+     * 
+     */
+    public String source() {
+        return this.source;
+    }
+
+    public static Builder builder() {
+        return new Builder();
+    }
+
+    public static Builder builder(EventOrchestrationRouterSetRuleActionsDynamicRouteTo defaults) {
+        return new Builder(defaults);
+    }
+    @CustomType.Builder
+    public static final class Builder {
+        private String lookupBy;
+        private String regex;
+        private String source;
+        public Builder() {}
+        public Builder(EventOrchestrationRouterSetRuleActionsDynamicRouteTo defaults) {
+    	      Objects.requireNonNull(defaults);
+    	      this.lookupBy = defaults.lookupBy;
+    	      this.regex = defaults.regex;
+    	      this.source = defaults.source;
+        }
+
+        @CustomType.Setter
+        public Builder lookupBy(String lookupBy) {
+            if (lookupBy == null) {
+              throw new MissingRequiredPropertyException("EventOrchestrationRouterSetRuleActionsDynamicRouteTo", "lookupBy");
+            }
+            this.lookupBy = lookupBy;
+            return this;
+        }
+        @CustomType.Setter
+        public Builder regex(String regex) {
+            if (regex == null) {
+              throw new MissingRequiredPropertyException("EventOrchestrationRouterSetRuleActionsDynamicRouteTo", "regex");
+            }
+            this.regex = regex;
+            return this;
+        }
+        @CustomType.Setter
+        public Builder source(String source) {
+            if (source == null) {
+              throw new MissingRequiredPropertyException("EventOrchestrationRouterSetRuleActionsDynamicRouteTo", "source");
+            }
+            this.source = source;
+            return this;
+        }
+        public EventOrchestrationRouterSetRuleActionsDynamicRouteTo build() {
+            final var _resultValue = new EventOrchestrationRouterSetRuleActionsDynamicRouteTo();
+            _resultValue.lookupBy = lookupBy;
+            _resultValue.regex = regex;
+            _resultValue.source = source;
+            return _resultValue;
+        }
+    }
+}
diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationServiceCatchAllActions.java b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationServiceCatchAllActions.java
index f1528c69..5a2ea36c 100644
--- a/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationServiceCatchAllActions.java
+++ b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationServiceCatchAllActions.java
@@ -29,6 +29,11 @@ public final class EventOrchestrationServiceCatchAllActions {
      * 
      */
     private @Nullable EventOrchestrationServiceCatchAllActionsAutomationAction automationAction;
+    /**
+     * @return The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     * 
+     */
+    private @Nullable String escalationPolicy;
     /**
      * @return sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      * 
@@ -95,6 +100,13 @@ public Optional annotate() {
     public Optional automationAction() {
         return Optional.ofNullable(this.automationAction);
     }
+    /**
+     * @return The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     * 
+     */
+    public Optional escalationPolicy() {
+        return Optional.ofNullable(this.escalationPolicy);
+    }
     /**
      * @return sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      * 
@@ -177,6 +189,7 @@ public static Builder builder(EventOrchestrationServiceCatchAllActions defaults)
     public static final class Builder {
         private @Nullable String annotate;
         private @Nullable EventOrchestrationServiceCatchAllActionsAutomationAction automationAction;
+        private @Nullable String escalationPolicy;
         private @Nullable String eventAction;
         private @Nullable List extractions;
         private @Nullable List incidentCustomFieldUpdates;
@@ -192,6 +205,7 @@ public Builder(EventOrchestrationServiceCatchAllActions defaults) {
     	      Objects.requireNonNull(defaults);
     	      this.annotate = defaults.annotate;
     	      this.automationAction = defaults.automationAction;
+    	      this.escalationPolicy = defaults.escalationPolicy;
     	      this.eventAction = defaults.eventAction;
     	      this.extractions = defaults.extractions;
     	      this.incidentCustomFieldUpdates = defaults.incidentCustomFieldUpdates;
@@ -217,6 +231,12 @@ public Builder automationAction(@Nullable EventOrchestrationServiceCatchAllActio
             return this;
         }
         @CustomType.Setter
+        public Builder escalationPolicy(@Nullable String escalationPolicy) {
+
+            this.escalationPolicy = escalationPolicy;
+            return this;
+        }
+        @CustomType.Setter
         public Builder eventAction(@Nullable String eventAction) {
 
             this.eventAction = eventAction;
@@ -289,6 +309,7 @@ public EventOrchestrationServiceCatchAllActions build() {
             final var _resultValue = new EventOrchestrationServiceCatchAllActions();
             _resultValue.annotate = annotate;
             _resultValue.automationAction = automationAction;
+            _resultValue.escalationPolicy = escalationPolicy;
             _resultValue.eventAction = eventAction;
             _resultValue.extractions = extractions;
             _resultValue.incidentCustomFieldUpdates = incidentCustomFieldUpdates;
diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationServiceSetRuleActions.java b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationServiceSetRuleActions.java
index 2c9ecef0..78fbdfc5 100644
--- a/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationServiceSetRuleActions.java
+++ b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/EventOrchestrationServiceSetRuleActions.java
@@ -29,6 +29,11 @@ public final class EventOrchestrationServiceSetRuleActions {
      * 
      */
     private @Nullable EventOrchestrationServiceSetRuleActionsAutomationAction automationAction;
+    /**
+     * @return The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     * 
+     */
+    private @Nullable String escalationPolicy;
     /**
      * @return sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      * 
@@ -95,6 +100,13 @@ public Optional annotate() {
     public Optional automationAction() {
         return Optional.ofNullable(this.automationAction);
     }
+    /**
+     * @return The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     * 
+     */
+    public Optional escalationPolicy() {
+        return Optional.ofNullable(this.escalationPolicy);
+    }
     /**
      * @return sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      * 
@@ -177,6 +189,7 @@ public static Builder builder(EventOrchestrationServiceSetRuleActions defaults)
     public static final class Builder {
         private @Nullable String annotate;
         private @Nullable EventOrchestrationServiceSetRuleActionsAutomationAction automationAction;
+        private @Nullable String escalationPolicy;
         private @Nullable String eventAction;
         private @Nullable List extractions;
         private @Nullable List incidentCustomFieldUpdates;
@@ -192,6 +205,7 @@ public Builder(EventOrchestrationServiceSetRuleActions defaults) {
     	      Objects.requireNonNull(defaults);
     	      this.annotate = defaults.annotate;
     	      this.automationAction = defaults.automationAction;
+    	      this.escalationPolicy = defaults.escalationPolicy;
     	      this.eventAction = defaults.eventAction;
     	      this.extractions = defaults.extractions;
     	      this.incidentCustomFieldUpdates = defaults.incidentCustomFieldUpdates;
@@ -217,6 +231,12 @@ public Builder automationAction(@Nullable EventOrchestrationServiceSetRuleAction
             return this;
         }
         @CustomType.Setter
+        public Builder escalationPolicy(@Nullable String escalationPolicy) {
+
+            this.escalationPolicy = escalationPolicy;
+            return this;
+        }
+        @CustomType.Setter
         public Builder eventAction(@Nullable String eventAction) {
 
             this.eventAction = eventAction;
@@ -289,6 +309,7 @@ public EventOrchestrationServiceSetRuleActions build() {
             final var _resultValue = new EventOrchestrationServiceSetRuleActions();
             _resultValue.annotate = annotate;
             _resultValue.automationAction = automationAction;
+            _resultValue.escalationPolicy = escalationPolicy;
             _resultValue.eventAction = eventAction;
             _resultValue.extractions = extractions;
             _resultValue.incidentCustomFieldUpdates = incidentCustomFieldUpdates;
diff --git a/sdk/nodejs/eventOrchestrationGlobal.ts b/sdk/nodejs/eventOrchestrationGlobal.ts
index 92d6c958..589d2bd0 100644
--- a/sdk/nodejs/eventOrchestrationGlobal.ts
+++ b/sdk/nodejs/eventOrchestrationGlobal.ts
@@ -13,7 +13,7 @@ import * as utilities from "./utilities";
  *
  * This example shows creating `Team`, and `Event Orchestration` resources followed by creating a Global Orchestration to handle Events sent to that Event Orchestration.
  *
- * This example also shows using `priority` data source to configure `priority` action for a rule. If the Event matches the third rule in set "step-two" the resulting incident will have the Priority `P1`.
+ * This example also shows using the pagerduty.getPriority data sources to configure `priority` and `escalationPolicy` actions for a rule.
  *
  * This example shows a Global Orchestration that has nested sets: a rule in the "start" set has a `routeTo` action pointing at the "step-two" set.
  *
@@ -31,6 +31,9 @@ import * as utilities from "./utilities";
  * const p1 = pagerduty.getPriority({
  *     name: "P1",
  * });
+ * const sreEscPolicy = pagerduty.getEscalationPolicy({
+ *     name: "SRE Escalation Policy",
+ * });
  * const global = new pagerduty.EventOrchestrationGlobal("global", {
  *     eventOrchestration: eventOrchestration.id,
  *     sets: [
@@ -57,6 +60,15 @@ import * as utilities from "./utilities";
  *                     },
  *                 },
  *                 {
+ *                     label: "If the DB host is running out of space, then page the SRE team",
+ *                     conditions: [{
+ *                         expression: "event.summary matches part 'running out of space'",
+ *                     }],
+ *                     actions: {
+ *                         escalationPolicy: sreEscPolicy.then(sreEscPolicy => sreEscPolicy.id),
+ *                     },
+ *                 },
+ *                 {
  *                     label: "If there's something wrong on the replica, then mark the alert as a warning",
  *                     conditions: [{
  *                         expression: "event.custom_details.hostname matches part 'replica'",
diff --git a/sdk/nodejs/eventOrchestrationRouter.ts b/sdk/nodejs/eventOrchestrationRouter.ts
index cadb71ff..07a24787 100644
--- a/sdk/nodejs/eventOrchestrationRouter.ts
+++ b/sdk/nodejs/eventOrchestrationRouter.ts
@@ -11,20 +11,34 @@ import * as utilities from "./utilities";
  *
  * ## Example of configuring Router rules for an Orchestration
  *
- * In this example the user has defined the Router with two rules, each routing to a different service.
- *
- * This example assumes services used in the `routeTo` configuration already exists. So it does not show creation of service resource.
+ * In this example the user has defined the Router with three rules. The first rule configures a dynamic route: any event containing a value in its `pdServiceId` custom detail will be routed to the Service with the ID specified by that value. The other rules route events matching a condition to specific services.
  *
  * ```typescript
  * import * as pulumi from "@pulumi/pulumi";
  * import * as pagerduty from "@pulumi/pagerduty";
  *
+ * const database = pagerduty.getService({
+ *     name: "Primary Data Store",
+ * });
+ * const www = pagerduty.getService({
+ *     name: "Web Server App",
+ * });
  * const router = new pagerduty.EventOrchestrationRouter("router", {
  *     eventOrchestration: myMonitor.id,
  *     set: {
  *         id: "start",
  *         rules: [
  *             {
+ *                 label: "Dynamically route events related to specific PagerDuty services",
+ *                 actions: {
+ *                     dynamicRouteTos: {
+ *                         lookupBy: "service_id",
+ *                         source: "event.custom_details.pd_service_id",
+ *                         regexp: "(.*)",
+ *                     },
+ *                 },
+ *             },
+ *             {
  *                 label: "Events relating to our relational database",
  *                 conditions: [
  *                     {
@@ -35,7 +49,7 @@ import * as utilities from "./utilities";
  *                     },
  *                 ],
  *                 actions: {
- *                     routeTo: database.id,
+ *                     routeTo: database.then(database => database.id),
  *                 },
  *             },
  *             {
@@ -43,7 +57,7 @@ import * as utilities from "./utilities";
  *                     expression: "event.summary matches part 'www'",
  *                 }],
  *                 actions: {
- *                     routeTo: www.id,
+ *                     routeTo: www.then(www => www.id),
  *                 },
  *             },
  *         ],
diff --git a/sdk/nodejs/eventOrchestrationService.ts b/sdk/nodejs/eventOrchestrationService.ts
index 9d7c4254..22f6677a 100644
--- a/sdk/nodejs/eventOrchestrationService.ts
+++ b/sdk/nodejs/eventOrchestrationService.ts
@@ -15,7 +15,7 @@ import * as utilities from "./utilities";
  *
  * This example shows creating `Team`, `User`, `Escalation Policy`, and `Service` resources followed by creating a Service Orchestration to handle Events sent to that Service.
  *
- * This example also shows using `priority` data source to configure `priority` action for a rule. If the Event matches the first rule in set "step-two" the resulting incident will have the Priority `P1`.
+ * This example also shows using the pagerduty.getPriority data sources to configure `priority` and `escalationPolicy` actions for a rule.
  *
  * This example shows a Service Orchestration that has nested sets: a rule in the "start" set has a `routeTo` action pointing at the "step-two" set.
  *
@@ -61,6 +61,9 @@ import * as utilities from "./utilities";
  * const p1 = pagerduty.getPriority({
  *     name: "P1",
  * });
+ * const sreEscPolicy = pagerduty.getEscalationPolicy({
+ *     name: "SRE Escalation Policy",
+ * });
  * const www = new pagerduty.EventOrchestrationService("www", {
  *     service: exampleService.id,
  *     enableEventOrchestrationForService: true,
@@ -109,6 +112,15 @@ import * as utilities from "./utilities";
  *                     },
  *                 },
  *                 {
+ *                     label: "If any of the API apps are unavailable, page the SRE team",
+ *                     conditions: [{
+ *                         expression: "event.custom_details.service_name matches part '-api' and event.custom_details.status_code matches '502'",
+ *                     }],
+ *                     actions: {
+ *                         escalationPolicy: sreEscPolicy.then(sreEscPolicy => sreEscPolicy.id),
+ *                     },
+ *                 },
+ *                 {
  *                     label: "If there's something wrong on the canary let the team know about it in our deployments Slack channel",
  *                     conditions: [{
  *                         expression: "event.custom_details.hostname matches part 'canary'",
diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts
index 6bfdde2b..2f3374b9 100644
--- a/sdk/nodejs/types/input.ts
+++ b/sdk/nodejs/types/input.ts
@@ -108,6 +108,10 @@ export interface EventOrchestrationGlobalCatchAllActions {
      * When true, this event will be dropped. Dropped events will not trigger or resolve an alert or an incident. Dropped events will not be evaluated against router rules.
      */
     dropEvent?: pulumi.Input;
+    /**
+     * The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     */
+    escalationPolicy?: pulumi.Input;
     /**
      * sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      */
@@ -286,6 +290,10 @@ export interface EventOrchestrationGlobalSetRuleActions {
      * When true, this event will be dropped. Dropped events will not trigger or resolve an alert or an incident. Dropped events will not be evaluated against router rules.
      */
     dropEvent?: pulumi.Input;
+    /**
+     * The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     */
+    escalationPolicy?: pulumi.Input;
     /**
      * sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      */
@@ -494,9 +502,27 @@ export interface EventOrchestrationRouterSetRule {
 
 export interface EventOrchestrationRouterSetRuleActions {
     /**
-     * The ID of the target Service for the resulting alert.
+     * supports the following:
      */
-    routeTo: pulumi.Input;
+    dynamicRouteTos?: pulumi.Input[]>;
+    routeTo?: pulumi.Input;
+}
+
+export interface EventOrchestrationRouterSetRuleActionsDynamicRouteTo {
+    /**
+     * Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `serviceName`, `serviceId`
+     *
+     * If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules.
+     */
+    lookupBy: pulumi.Input;
+    /**
+     * The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax.
+     */
+    regex: pulumi.Input;
+    /**
+     * The path to a field in an event.
+     */
+    source: pulumi.Input;
 }
 
 export interface EventOrchestrationRouterSetRuleCondition {
@@ -548,6 +574,10 @@ export interface EventOrchestrationServiceCatchAllActions {
      * Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident.
      */
     automationAction?: pulumi.Input;
+    /**
+     * The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     */
+    escalationPolicy?: pulumi.Input;
     /**
      * sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      */
@@ -733,6 +763,10 @@ export interface EventOrchestrationServiceSetRuleActions {
      * Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident.
      */
     automationAction?: pulumi.Input;
+    /**
+     * The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     */
+    escalationPolicy?: pulumi.Input;
     /**
      * sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      */
diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts
index e237a790..6375e041 100644
--- a/sdk/nodejs/types/output.ts
+++ b/sdk/nodejs/types/output.ts
@@ -108,6 +108,10 @@ export interface EventOrchestrationGlobalCatchAllActions {
      * When true, this event will be dropped. Dropped events will not trigger or resolve an alert or an incident. Dropped events will not be evaluated against router rules.
      */
     dropEvent?: boolean;
+    /**
+     * The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     */
+    escalationPolicy?: string;
     /**
      * sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      */
@@ -286,6 +290,10 @@ export interface EventOrchestrationGlobalSetRuleActions {
      * When true, this event will be dropped. Dropped events will not trigger or resolve an alert or an incident. Dropped events will not be evaluated against router rules.
      */
     dropEvent?: boolean;
+    /**
+     * The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     */
+    escalationPolicy?: string;
     /**
      * sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      */
@@ -494,9 +502,27 @@ export interface EventOrchestrationRouterSetRule {
 
 export interface EventOrchestrationRouterSetRuleActions {
     /**
-     * The ID of the target Service for the resulting alert.
+     * supports the following:
      */
-    routeTo: string;
+    dynamicRouteTos?: outputs.EventOrchestrationRouterSetRuleActionsDynamicRouteTo[];
+    routeTo?: string;
+}
+
+export interface EventOrchestrationRouterSetRuleActionsDynamicRouteTo {
+    /**
+     * Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `serviceName`, `serviceId`
+     *
+     * If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules.
+     */
+    lookupBy: string;
+    /**
+     * The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax.
+     */
+    regex: string;
+    /**
+     * The path to a field in an event.
+     */
+    source: string;
 }
 
 export interface EventOrchestrationRouterSetRuleCondition {
@@ -548,6 +574,10 @@ export interface EventOrchestrationServiceCatchAllActions {
      * Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident.
      */
     automationAction?: outputs.EventOrchestrationServiceCatchAllActionsAutomationAction;
+    /**
+     * The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     */
+    escalationPolicy?: string;
     /**
      * sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      */
@@ -733,6 +763,10 @@ export interface EventOrchestrationServiceSetRuleActions {
      * Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident.
      */
     automationAction?: outputs.EventOrchestrationServiceSetRuleActionsAutomationAction;
+    /**
+     * The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+     */
+    escalationPolicy?: string;
     /**
      * sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
      */
diff --git a/sdk/python/pulumi_pagerduty/_inputs.py b/sdk/python/pulumi_pagerduty/_inputs.py
index 15265219..8cd4b747 100644
--- a/sdk/python/pulumi_pagerduty/_inputs.py
+++ b/sdk/python/pulumi_pagerduty/_inputs.py
@@ -41,6 +41,7 @@
     'EventOrchestrationRouterSetArgs',
     'EventOrchestrationRouterSetRuleArgs',
     'EventOrchestrationRouterSetRuleActionsArgs',
+    'EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs',
     'EventOrchestrationRouterSetRuleConditionArgs',
     'EventOrchestrationServiceCacheVariableConditionArgs',
     'EventOrchestrationServiceCacheVariableConfigurationArgs',
@@ -484,6 +485,7 @@ def __init__(__self__, *,
                  annotate: Optional[pulumi.Input[str]] = None,
                  automation_action: Optional[pulumi.Input['EventOrchestrationGlobalCatchAllActionsAutomationActionArgs']] = None,
                  drop_event: Optional[pulumi.Input[bool]] = None,
+                 escalation_policy: Optional[pulumi.Input[str]] = None,
                  event_action: Optional[pulumi.Input[str]] = None,
                  extractions: Optional[pulumi.Input[Sequence[pulumi.Input['EventOrchestrationGlobalCatchAllActionsExtractionArgs']]]] = None,
                  incident_custom_field_updates: Optional[pulumi.Input[Sequence[pulumi.Input['EventOrchestrationGlobalCatchAllActionsIncidentCustomFieldUpdateArgs']]]] = None,
@@ -497,6 +499,7 @@ def __init__(__self__, *,
         :param pulumi.Input[str] annotate: Add this text as a note on the resulting incident.
         :param pulumi.Input['EventOrchestrationGlobalCatchAllActionsAutomationActionArgs'] automation_action: Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident.
         :param pulumi.Input[bool] drop_event: When true, this event will be dropped. Dropped events will not trigger or resolve an alert or an incident. Dropped events will not be evaluated against router rules.
+        :param pulumi.Input[str] escalation_policy: The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
         :param pulumi.Input[str] event_action: sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
         :param pulumi.Input[Sequence[pulumi.Input['EventOrchestrationGlobalCatchAllActionsExtractionArgs']]] extractions: Replace any CEF field or Custom Details object field using custom variables.
         :param pulumi.Input[Sequence[pulumi.Input['EventOrchestrationGlobalCatchAllActionsIncidentCustomFieldUpdateArgs']]] incident_custom_field_updates: Assign a custom field to the resulting incident.
@@ -513,6 +516,8 @@ def __init__(__self__, *,
             pulumi.set(__self__, "automation_action", automation_action)
         if drop_event is not None:
             pulumi.set(__self__, "drop_event", drop_event)
+        if escalation_policy is not None:
+            pulumi.set(__self__, "escalation_policy", escalation_policy)
         if event_action is not None:
             pulumi.set(__self__, "event_action", event_action)
         if extractions is not None:
@@ -568,6 +573,18 @@ def drop_event(self) -> Optional[pulumi.Input[bool]]:
     def drop_event(self, value: Optional[pulumi.Input[bool]]):
         pulumi.set(self, "drop_event", value)
 
+    @property
+    @pulumi.getter(name="escalationPolicy")
+    def escalation_policy(self) -> Optional[pulumi.Input[str]]:
+        """
+        The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+        """
+        return pulumi.get(self, "escalation_policy")
+
+    @escalation_policy.setter
+    def escalation_policy(self, value: Optional[pulumi.Input[str]]):
+        pulumi.set(self, "escalation_policy", value)
+
     @property
     @pulumi.getter(name="eventAction")
     def event_action(self) -> Optional[pulumi.Input[str]]:
@@ -1140,6 +1157,7 @@ def __init__(__self__, *,
                  annotate: Optional[pulumi.Input[str]] = None,
                  automation_action: Optional[pulumi.Input['EventOrchestrationGlobalSetRuleActionsAutomationActionArgs']] = None,
                  drop_event: Optional[pulumi.Input[bool]] = None,
+                 escalation_policy: Optional[pulumi.Input[str]] = None,
                  event_action: Optional[pulumi.Input[str]] = None,
                  extractions: Optional[pulumi.Input[Sequence[pulumi.Input['EventOrchestrationGlobalSetRuleActionsExtractionArgs']]]] = None,
                  incident_custom_field_updates: Optional[pulumi.Input[Sequence[pulumi.Input['EventOrchestrationGlobalSetRuleActionsIncidentCustomFieldUpdateArgs']]]] = None,
@@ -1153,6 +1171,7 @@ def __init__(__self__, *,
         :param pulumi.Input[str] annotate: Add this text as a note on the resulting incident.
         :param pulumi.Input['EventOrchestrationGlobalSetRuleActionsAutomationActionArgs'] automation_action: Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident.
         :param pulumi.Input[bool] drop_event: When true, this event will be dropped. Dropped events will not trigger or resolve an alert or an incident. Dropped events will not be evaluated against router rules.
+        :param pulumi.Input[str] escalation_policy: The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
         :param pulumi.Input[str] event_action: sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
         :param pulumi.Input[Sequence[pulumi.Input['EventOrchestrationGlobalSetRuleActionsExtractionArgs']]] extractions: Replace any CEF field or Custom Details object field using custom variables.
         :param pulumi.Input[Sequence[pulumi.Input['EventOrchestrationGlobalSetRuleActionsIncidentCustomFieldUpdateArgs']]] incident_custom_field_updates: Assign a custom field to the resulting incident.
@@ -1169,6 +1188,8 @@ def __init__(__self__, *,
             pulumi.set(__self__, "automation_action", automation_action)
         if drop_event is not None:
             pulumi.set(__self__, "drop_event", drop_event)
+        if escalation_policy is not None:
+            pulumi.set(__self__, "escalation_policy", escalation_policy)
         if event_action is not None:
             pulumi.set(__self__, "event_action", event_action)
         if extractions is not None:
@@ -1224,6 +1245,18 @@ def drop_event(self) -> Optional[pulumi.Input[bool]]:
     def drop_event(self, value: Optional[pulumi.Input[bool]]):
         pulumi.set(self, "drop_event", value)
 
+    @property
+    @pulumi.getter(name="escalationPolicy")
+    def escalation_policy(self) -> Optional[pulumi.Input[str]]:
+        """
+        The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+        """
+        return pulumi.get(self, "escalation_policy")
+
+    @escalation_policy.setter
+    def escalation_policy(self, value: Optional[pulumi.Input[str]]):
+        pulumi.set(self, "escalation_policy", value)
+
     @property
     @pulumi.getter(name="eventAction")
     def event_action(self) -> Optional[pulumi.Input[str]]:
@@ -1945,25 +1978,94 @@ def label(self, value: Optional[pulumi.Input[str]]):
 @pulumi.input_type
 class EventOrchestrationRouterSetRuleActionsArgs:
     def __init__(__self__, *,
-                 route_to: pulumi.Input[str]):
+                 dynamic_route_tos: Optional[pulumi.Input[Sequence[pulumi.Input['EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs']]]] = None,
+                 route_to: Optional[pulumi.Input[str]] = None):
         """
-        :param pulumi.Input[str] route_to: The ID of the target Service for the resulting alert.
+        :param pulumi.Input[Sequence[pulumi.Input['EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs']]] dynamic_route_tos: supports the following:
         """
-        pulumi.set(__self__, "route_to", route_to)
+        if dynamic_route_tos is not None:
+            pulumi.set(__self__, "dynamic_route_tos", dynamic_route_tos)
+        if route_to is not None:
+            pulumi.set(__self__, "route_to", route_to)
 
     @property
-    @pulumi.getter(name="routeTo")
-    def route_to(self) -> pulumi.Input[str]:
+    @pulumi.getter(name="dynamicRouteTos")
+    def dynamic_route_tos(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs']]]]:
         """
-        The ID of the target Service for the resulting alert.
+        supports the following:
         """
+        return pulumi.get(self, "dynamic_route_tos")
+
+    @dynamic_route_tos.setter
+    def dynamic_route_tos(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs']]]]):
+        pulumi.set(self, "dynamic_route_tos", value)
+
+    @property
+    @pulumi.getter(name="routeTo")
+    def route_to(self) -> Optional[pulumi.Input[str]]:
         return pulumi.get(self, "route_to")
 
     @route_to.setter
-    def route_to(self, value: pulumi.Input[str]):
+    def route_to(self, value: Optional[pulumi.Input[str]]):
         pulumi.set(self, "route_to", value)
 
 
+@pulumi.input_type
+class EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs:
+    def __init__(__self__, *,
+                 lookup_by: pulumi.Input[str],
+                 regex: pulumi.Input[str],
+                 source: pulumi.Input[str]):
+        """
+        :param pulumi.Input[str] lookup_by: Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `service_name`, `service_id`
+               
+               If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules.
+        :param pulumi.Input[str] regex: The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax.
+        :param pulumi.Input[str] source: The path to a field in an event.
+        """
+        pulumi.set(__self__, "lookup_by", lookup_by)
+        pulumi.set(__self__, "regex", regex)
+        pulumi.set(__self__, "source", source)
+
+    @property
+    @pulumi.getter(name="lookupBy")
+    def lookup_by(self) -> pulumi.Input[str]:
+        """
+        Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `service_name`, `service_id`
+
+        If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules.
+        """
+        return pulumi.get(self, "lookup_by")
+
+    @lookup_by.setter
+    def lookup_by(self, value: pulumi.Input[str]):
+        pulumi.set(self, "lookup_by", value)
+
+    @property
+    @pulumi.getter
+    def regex(self) -> pulumi.Input[str]:
+        """
+        The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax.
+        """
+        return pulumi.get(self, "regex")
+
+    @regex.setter
+    def regex(self, value: pulumi.Input[str]):
+        pulumi.set(self, "regex", value)
+
+    @property
+    @pulumi.getter
+    def source(self) -> pulumi.Input[str]:
+        """
+        The path to a field in an event.
+        """
+        return pulumi.get(self, "source")
+
+    @source.setter
+    def source(self, value: pulumi.Input[str]):
+        pulumi.set(self, "source", value)
+
+
 @pulumi.input_type
 class EventOrchestrationRouterSetRuleConditionArgs:
     def __init__(__self__, *,
@@ -2105,6 +2207,7 @@ class EventOrchestrationServiceCatchAllActionsArgs:
     def __init__(__self__, *,
                  annotate: Optional[pulumi.Input[str]] = None,
                  automation_action: Optional[pulumi.Input['EventOrchestrationServiceCatchAllActionsAutomationActionArgs']] = None,
+                 escalation_policy: Optional[pulumi.Input[str]] = None,
                  event_action: Optional[pulumi.Input[str]] = None,
                  extractions: Optional[pulumi.Input[Sequence[pulumi.Input['EventOrchestrationServiceCatchAllActionsExtractionArgs']]]] = None,
                  incident_custom_field_updates: Optional[pulumi.Input[Sequence[pulumi.Input['EventOrchestrationServiceCatchAllActionsIncidentCustomFieldUpdateArgs']]]] = None,
@@ -2118,6 +2221,7 @@ def __init__(__self__, *,
         """
         :param pulumi.Input[str] annotate: Add this text as a note on the resulting incident.
         :param pulumi.Input['EventOrchestrationServiceCatchAllActionsAutomationActionArgs'] automation_action: Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident.
+        :param pulumi.Input[str] escalation_policy: The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
         :param pulumi.Input[str] event_action: sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
         :param pulumi.Input[Sequence[pulumi.Input['EventOrchestrationServiceCatchAllActionsExtractionArgs']]] extractions: Replace any CEF field or Custom Details object field using custom variables.
         :param pulumi.Input[Sequence[pulumi.Input['EventOrchestrationServiceCatchAllActionsIncidentCustomFieldUpdateArgs']]] incident_custom_field_updates: Assign a custom field to the resulting incident.
@@ -2133,6 +2237,8 @@ def __init__(__self__, *,
             pulumi.set(__self__, "annotate", annotate)
         if automation_action is not None:
             pulumi.set(__self__, "automation_action", automation_action)
+        if escalation_policy is not None:
+            pulumi.set(__self__, "escalation_policy", escalation_policy)
         if event_action is not None:
             pulumi.set(__self__, "event_action", event_action)
         if extractions is not None:
@@ -2178,6 +2284,18 @@ def automation_action(self) -> Optional[pulumi.Input['EventOrchestrationServiceC
     def automation_action(self, value: Optional[pulumi.Input['EventOrchestrationServiceCatchAllActionsAutomationActionArgs']]):
         pulumi.set(self, "automation_action", value)
 
+    @property
+    @pulumi.getter(name="escalationPolicy")
+    def escalation_policy(self) -> Optional[pulumi.Input[str]]:
+        """
+        The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+        """
+        return pulumi.get(self, "escalation_policy")
+
+    @escalation_policy.setter
+    def escalation_policy(self, value: Optional[pulumi.Input[str]]):
+        pulumi.set(self, "escalation_policy", value)
+
     @property
     @pulumi.getter(name="eventAction")
     def event_action(self) -> Optional[pulumi.Input[str]]:
@@ -2783,6 +2901,7 @@ class EventOrchestrationServiceSetRuleActionsArgs:
     def __init__(__self__, *,
                  annotate: Optional[pulumi.Input[str]] = None,
                  automation_action: Optional[pulumi.Input['EventOrchestrationServiceSetRuleActionsAutomationActionArgs']] = None,
+                 escalation_policy: Optional[pulumi.Input[str]] = None,
                  event_action: Optional[pulumi.Input[str]] = None,
                  extractions: Optional[pulumi.Input[Sequence[pulumi.Input['EventOrchestrationServiceSetRuleActionsExtractionArgs']]]] = None,
                  incident_custom_field_updates: Optional[pulumi.Input[Sequence[pulumi.Input['EventOrchestrationServiceSetRuleActionsIncidentCustomFieldUpdateArgs']]]] = None,
@@ -2796,6 +2915,7 @@ def __init__(__self__, *,
         """
         :param pulumi.Input[str] annotate: Add this text as a note on the resulting incident.
         :param pulumi.Input['EventOrchestrationServiceSetRuleActionsAutomationActionArgs'] automation_action: Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident.
+        :param pulumi.Input[str] escalation_policy: The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
         :param pulumi.Input[str] event_action: sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
         :param pulumi.Input[Sequence[pulumi.Input['EventOrchestrationServiceSetRuleActionsExtractionArgs']]] extractions: Replace any CEF field or Custom Details object field using custom variables.
         :param pulumi.Input[Sequence[pulumi.Input['EventOrchestrationServiceSetRuleActionsIncidentCustomFieldUpdateArgs']]] incident_custom_field_updates: Assign a custom field to the resulting incident.
@@ -2811,6 +2931,8 @@ def __init__(__self__, *,
             pulumi.set(__self__, "annotate", annotate)
         if automation_action is not None:
             pulumi.set(__self__, "automation_action", automation_action)
+        if escalation_policy is not None:
+            pulumi.set(__self__, "escalation_policy", escalation_policy)
         if event_action is not None:
             pulumi.set(__self__, "event_action", event_action)
         if extractions is not None:
@@ -2856,6 +2978,18 @@ def automation_action(self) -> Optional[pulumi.Input['EventOrchestrationServiceS
     def automation_action(self, value: Optional[pulumi.Input['EventOrchestrationServiceSetRuleActionsAutomationActionArgs']]):
         pulumi.set(self, "automation_action", value)
 
+    @property
+    @pulumi.getter(name="escalationPolicy")
+    def escalation_policy(self) -> Optional[pulumi.Input[str]]:
+        """
+        The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+        """
+        return pulumi.get(self, "escalation_policy")
+
+    @escalation_policy.setter
+    def escalation_policy(self, value: Optional[pulumi.Input[str]]):
+        pulumi.set(self, "escalation_policy", value)
+
     @property
     @pulumi.getter(name="eventAction")
     def event_action(self) -> Optional[pulumi.Input[str]]:
diff --git a/sdk/python/pulumi_pagerduty/event_orchestration_global.py b/sdk/python/pulumi_pagerduty/event_orchestration_global.py
index 72217f1c..ac2f9420 100644
--- a/sdk/python/pulumi_pagerduty/event_orchestration_global.py
+++ b/sdk/python/pulumi_pagerduty/event_orchestration_global.py
@@ -138,7 +138,7 @@ def __init__(__self__,
 
         This example shows creating `Team`, and `Event Orchestration` resources followed by creating a Global Orchestration to handle Events sent to that Event Orchestration.
 
-        This example also shows using `priority` data source to configure `priority` action for a rule. If the Event matches the third rule in set "step-two" the resulting incident will have the Priority `P1`.
+        This example also shows using the get_priority data sources to configure `priority` and `escalation_policy` actions for a rule.
 
         This example shows a Global Orchestration that has nested sets: a rule in the "start" set has a `route_to` action pointing at the "step-two" set.
 
@@ -153,6 +153,7 @@ def __init__(__self__,
             name="Example Orchestration",
             team=database_team.id)
         p1 = pagerduty.get_priority(name="P1")
+        sre_esc_policy = pagerduty.get_escalation_policy(name="SRE Escalation Policy")
         global_ = pagerduty.EventOrchestrationGlobal("global",
             event_orchestration=event_orchestration.id,
             sets=[
@@ -178,6 +179,15 @@ def __init__(__self__,
                                 drop_event=True,
                             ),
                         ),
+                        pagerduty.EventOrchestrationGlobalSetRuleArgs(
+                            label="If the DB host is running out of space, then page the SRE team",
+                            conditions=[pagerduty.EventOrchestrationGlobalSetRuleConditionArgs(
+                                expression="event.summary matches part 'running out of space'",
+                            )],
+                            actions=pagerduty.EventOrchestrationGlobalSetRuleActionsArgs(
+                                escalation_policy=sre_esc_policy.id,
+                            ),
+                        ),
                         pagerduty.EventOrchestrationGlobalSetRuleArgs(
                             label="If there's something wrong on the replica, then mark the alert as a warning",
                             conditions=[pagerduty.EventOrchestrationGlobalSetRuleConditionArgs(
@@ -233,7 +243,7 @@ def __init__(__self__,
 
         This example shows creating `Team`, and `Event Orchestration` resources followed by creating a Global Orchestration to handle Events sent to that Event Orchestration.
 
-        This example also shows using `priority` data source to configure `priority` action for a rule. If the Event matches the third rule in set "step-two" the resulting incident will have the Priority `P1`.
+        This example also shows using the get_priority data sources to configure `priority` and `escalation_policy` actions for a rule.
 
         This example shows a Global Orchestration that has nested sets: a rule in the "start" set has a `route_to` action pointing at the "step-two" set.
 
@@ -248,6 +258,7 @@ def __init__(__self__,
             name="Example Orchestration",
             team=database_team.id)
         p1 = pagerduty.get_priority(name="P1")
+        sre_esc_policy = pagerduty.get_escalation_policy(name="SRE Escalation Policy")
         global_ = pagerduty.EventOrchestrationGlobal("global",
             event_orchestration=event_orchestration.id,
             sets=[
@@ -273,6 +284,15 @@ def __init__(__self__,
                                 drop_event=True,
                             ),
                         ),
+                        pagerduty.EventOrchestrationGlobalSetRuleArgs(
+                            label="If the DB host is running out of space, then page the SRE team",
+                            conditions=[pagerduty.EventOrchestrationGlobalSetRuleConditionArgs(
+                                expression="event.summary matches part 'running out of space'",
+                            )],
+                            actions=pagerduty.EventOrchestrationGlobalSetRuleActionsArgs(
+                                escalation_policy=sre_esc_policy.id,
+                            ),
+                        ),
                         pagerduty.EventOrchestrationGlobalSetRuleArgs(
                             label="If there's something wrong on the replica, then mark the alert as a warning",
                             conditions=[pagerduty.EventOrchestrationGlobalSetRuleConditionArgs(
diff --git a/sdk/python/pulumi_pagerduty/event_orchestration_router.py b/sdk/python/pulumi_pagerduty/event_orchestration_router.py
index 267f0b31..da8f95bb 100644
--- a/sdk/python/pulumi_pagerduty/event_orchestration_router.py
+++ b/sdk/python/pulumi_pagerduty/event_orchestration_router.py
@@ -136,19 +136,29 @@ def __init__(__self__,
 
         ## Example of configuring Router rules for an Orchestration
 
-        In this example the user has defined the Router with two rules, each routing to a different service.
-
-        This example assumes services used in the `route_to` configuration already exists. So it does not show creation of service resource.
+        In this example the user has defined the Router with three rules. The first rule configures a dynamic route: any event containing a value in its `pd_service_id` custom detail will be routed to the Service with the ID specified by that value. The other rules route events matching a condition to specific services.
 
         ```python
         import pulumi
         import pulumi_pagerduty as pagerduty
 
+        database = pagerduty.get_service(name="Primary Data Store")
+        www = pagerduty.get_service(name="Web Server App")
         router = pagerduty.EventOrchestrationRouter("router",
             event_orchestration=my_monitor["id"],
             set=pagerduty.EventOrchestrationRouterSetArgs(
                 id="start",
                 rules=[
+                    pagerduty.EventOrchestrationRouterSetRuleArgs(
+                        label="Dynamically route events related to specific PagerDuty services",
+                        actions=pagerduty.EventOrchestrationRouterSetRuleActionsArgs(
+                            dynamic_route_tos={
+                                "lookupBy": "service_id",
+                                "source": "event.custom_details.pd_service_id",
+                                "regexp": "(.*)",
+                            },
+                        ),
+                    ),
                     pagerduty.EventOrchestrationRouterSetRuleArgs(
                         label="Events relating to our relational database",
                         conditions=[
@@ -160,7 +170,7 @@ def __init__(__self__,
                             ),
                         ],
                         actions=pagerduty.EventOrchestrationRouterSetRuleActionsArgs(
-                            route_to=database["id"],
+                            route_to=database.id,
                         ),
                     ),
                     pagerduty.EventOrchestrationRouterSetRuleArgs(
@@ -168,7 +178,7 @@ def __init__(__self__,
                             expression="event.summary matches part 'www'",
                         )],
                         actions=pagerduty.EventOrchestrationRouterSetRuleActionsArgs(
-                            route_to=www["id"],
+                            route_to=www.id,
                         ),
                     ),
                 ],
@@ -205,19 +215,29 @@ def __init__(__self__,
 
         ## Example of configuring Router rules for an Orchestration
 
-        In this example the user has defined the Router with two rules, each routing to a different service.
-
-        This example assumes services used in the `route_to` configuration already exists. So it does not show creation of service resource.
+        In this example the user has defined the Router with three rules. The first rule configures a dynamic route: any event containing a value in its `pd_service_id` custom detail will be routed to the Service with the ID specified by that value. The other rules route events matching a condition to specific services.
 
         ```python
         import pulumi
         import pulumi_pagerduty as pagerduty
 
+        database = pagerduty.get_service(name="Primary Data Store")
+        www = pagerduty.get_service(name="Web Server App")
         router = pagerduty.EventOrchestrationRouter("router",
             event_orchestration=my_monitor["id"],
             set=pagerduty.EventOrchestrationRouterSetArgs(
                 id="start",
                 rules=[
+                    pagerduty.EventOrchestrationRouterSetRuleArgs(
+                        label="Dynamically route events related to specific PagerDuty services",
+                        actions=pagerduty.EventOrchestrationRouterSetRuleActionsArgs(
+                            dynamic_route_tos={
+                                "lookupBy": "service_id",
+                                "source": "event.custom_details.pd_service_id",
+                                "regexp": "(.*)",
+                            },
+                        ),
+                    ),
                     pagerduty.EventOrchestrationRouterSetRuleArgs(
                         label="Events relating to our relational database",
                         conditions=[
@@ -229,7 +249,7 @@ def __init__(__self__,
                             ),
                         ],
                         actions=pagerduty.EventOrchestrationRouterSetRuleActionsArgs(
-                            route_to=database["id"],
+                            route_to=database.id,
                         ),
                     ),
                     pagerduty.EventOrchestrationRouterSetRuleArgs(
@@ -237,7 +257,7 @@ def __init__(__self__,
                             expression="event.summary matches part 'www'",
                         )],
                         actions=pagerduty.EventOrchestrationRouterSetRuleActionsArgs(
-                            route_to=www["id"],
+                            route_to=www.id,
                         ),
                     ),
                 ],
diff --git a/sdk/python/pulumi_pagerduty/event_orchestration_service.py b/sdk/python/pulumi_pagerduty/event_orchestration_service.py
index 4330ce59..d01484cf 100644
--- a/sdk/python/pulumi_pagerduty/event_orchestration_service.py
+++ b/sdk/python/pulumi_pagerduty/event_orchestration_service.py
@@ -173,7 +173,7 @@ def __init__(__self__,
 
         This example shows creating `Team`, `User`, `Escalation Policy`, and `Service` resources followed by creating a Service Orchestration to handle Events sent to that Service.
 
-        This example also shows using `priority` data source to configure `priority` action for a rule. If the Event matches the first rule in set "step-two" the resulting incident will have the Priority `P1`.
+        This example also shows using the get_priority data sources to configure `priority` and `escalation_policy` actions for a rule.
 
         This example shows a Service Orchestration that has nested sets: a rule in the "start" set has a `route_to` action pointing at the "step-two" set.
 
@@ -212,6 +212,7 @@ def __init__(__self__,
             data_type="string",
             field_type="single_value")
         p1 = pagerduty.get_priority(name="P1")
+        sre_esc_policy = pagerduty.get_escalation_policy(name="SRE Escalation Policy")
         www = pagerduty.EventOrchestrationService("www",
             service=example_service.id,
             enable_event_orchestration_for_service=True,
@@ -259,6 +260,15 @@ def __init__(__self__,
                                 )],
                             ),
                         ),
+                        pagerduty.EventOrchestrationServiceSetRuleArgs(
+                            label="If any of the API apps are unavailable, page the SRE team",
+                            conditions=[pagerduty.EventOrchestrationServiceSetRuleConditionArgs(
+                                expression="event.custom_details.service_name matches part '-api' and event.custom_details.status_code matches '502'",
+                            )],
+                            actions=pagerduty.EventOrchestrationServiceSetRuleActionsArgs(
+                                escalation_policy=sre_esc_policy.id,
+                            ),
+                        ),
                         pagerduty.EventOrchestrationServiceSetRuleArgs(
                             label="If there's something wrong on the canary let the team know about it in our deployments Slack channel",
                             conditions=[pagerduty.EventOrchestrationServiceSetRuleConditionArgs(
@@ -333,7 +343,7 @@ def __init__(__self__,
 
         This example shows creating `Team`, `User`, `Escalation Policy`, and `Service` resources followed by creating a Service Orchestration to handle Events sent to that Service.
 
-        This example also shows using `priority` data source to configure `priority` action for a rule. If the Event matches the first rule in set "step-two" the resulting incident will have the Priority `P1`.
+        This example also shows using the get_priority data sources to configure `priority` and `escalation_policy` actions for a rule.
 
         This example shows a Service Orchestration that has nested sets: a rule in the "start" set has a `route_to` action pointing at the "step-two" set.
 
@@ -372,6 +382,7 @@ def __init__(__self__,
             data_type="string",
             field_type="single_value")
         p1 = pagerduty.get_priority(name="P1")
+        sre_esc_policy = pagerduty.get_escalation_policy(name="SRE Escalation Policy")
         www = pagerduty.EventOrchestrationService("www",
             service=example_service.id,
             enable_event_orchestration_for_service=True,
@@ -419,6 +430,15 @@ def __init__(__self__,
                                 )],
                             ),
                         ),
+                        pagerduty.EventOrchestrationServiceSetRuleArgs(
+                            label="If any of the API apps are unavailable, page the SRE team",
+                            conditions=[pagerduty.EventOrchestrationServiceSetRuleConditionArgs(
+                                expression="event.custom_details.service_name matches part '-api' and event.custom_details.status_code matches '502'",
+                            )],
+                            actions=pagerduty.EventOrchestrationServiceSetRuleActionsArgs(
+                                escalation_policy=sre_esc_policy.id,
+                            ),
+                        ),
                         pagerduty.EventOrchestrationServiceSetRuleArgs(
                             label="If there's something wrong on the canary let the team know about it in our deployments Slack channel",
                             conditions=[pagerduty.EventOrchestrationServiceSetRuleConditionArgs(
diff --git a/sdk/python/pulumi_pagerduty/outputs.py b/sdk/python/pulumi_pagerduty/outputs.py
index 1b4f6ab4..d0996f0c 100644
--- a/sdk/python/pulumi_pagerduty/outputs.py
+++ b/sdk/python/pulumi_pagerduty/outputs.py
@@ -42,6 +42,7 @@
     'EventOrchestrationRouterSet',
     'EventOrchestrationRouterSetRule',
     'EventOrchestrationRouterSetRuleActions',
+    'EventOrchestrationRouterSetRuleActionsDynamicRouteTo',
     'EventOrchestrationRouterSetRuleCondition',
     'EventOrchestrationServiceCacheVariableCondition',
     'EventOrchestrationServiceCacheVariableConfiguration',
@@ -495,6 +496,8 @@ def __key_warning(key: str):
             suggest = "automation_action"
         elif key == "dropEvent":
             suggest = "drop_event"
+        elif key == "escalationPolicy":
+            suggest = "escalation_policy"
         elif key == "eventAction":
             suggest = "event_action"
         elif key == "incidentCustomFieldUpdates":
@@ -517,6 +520,7 @@ def __init__(__self__, *,
                  annotate: Optional[str] = None,
                  automation_action: Optional['outputs.EventOrchestrationGlobalCatchAllActionsAutomationAction'] = None,
                  drop_event: Optional[bool] = None,
+                 escalation_policy: Optional[str] = None,
                  event_action: Optional[str] = None,
                  extractions: Optional[Sequence['outputs.EventOrchestrationGlobalCatchAllActionsExtraction']] = None,
                  incident_custom_field_updates: Optional[Sequence['outputs.EventOrchestrationGlobalCatchAllActionsIncidentCustomFieldUpdate']] = None,
@@ -530,6 +534,7 @@ def __init__(__self__, *,
         :param str annotate: Add this text as a note on the resulting incident.
         :param 'EventOrchestrationGlobalCatchAllActionsAutomationActionArgs' automation_action: Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident.
         :param bool drop_event: When true, this event will be dropped. Dropped events will not trigger or resolve an alert or an incident. Dropped events will not be evaluated against router rules.
+        :param str escalation_policy: The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
         :param str event_action: sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
         :param Sequence['EventOrchestrationGlobalCatchAllActionsExtractionArgs'] extractions: Replace any CEF field or Custom Details object field using custom variables.
         :param Sequence['EventOrchestrationGlobalCatchAllActionsIncidentCustomFieldUpdateArgs'] incident_custom_field_updates: Assign a custom field to the resulting incident.
@@ -546,6 +551,8 @@ def __init__(__self__, *,
             pulumi.set(__self__, "automation_action", automation_action)
         if drop_event is not None:
             pulumi.set(__self__, "drop_event", drop_event)
+        if escalation_policy is not None:
+            pulumi.set(__self__, "escalation_policy", escalation_policy)
         if event_action is not None:
             pulumi.set(__self__, "event_action", event_action)
         if extractions is not None:
@@ -589,6 +596,14 @@ def drop_event(self) -> Optional[bool]:
         """
         return pulumi.get(self, "drop_event")
 
+    @property
+    @pulumi.getter(name="escalationPolicy")
+    def escalation_policy(self) -> Optional[str]:
+        """
+        The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+        """
+        return pulumi.get(self, "escalation_policy")
+
     @property
     @pulumi.getter(name="eventAction")
     def event_action(self) -> Optional[str]:
@@ -1041,6 +1056,8 @@ def __key_warning(key: str):
             suggest = "automation_action"
         elif key == "dropEvent":
             suggest = "drop_event"
+        elif key == "escalationPolicy":
+            suggest = "escalation_policy"
         elif key == "eventAction":
             suggest = "event_action"
         elif key == "incidentCustomFieldUpdates":
@@ -1063,6 +1080,7 @@ def __init__(__self__, *,
                  annotate: Optional[str] = None,
                  automation_action: Optional['outputs.EventOrchestrationGlobalSetRuleActionsAutomationAction'] = None,
                  drop_event: Optional[bool] = None,
+                 escalation_policy: Optional[str] = None,
                  event_action: Optional[str] = None,
                  extractions: Optional[Sequence['outputs.EventOrchestrationGlobalSetRuleActionsExtraction']] = None,
                  incident_custom_field_updates: Optional[Sequence['outputs.EventOrchestrationGlobalSetRuleActionsIncidentCustomFieldUpdate']] = None,
@@ -1076,6 +1094,7 @@ def __init__(__self__, *,
         :param str annotate: Add this text as a note on the resulting incident.
         :param 'EventOrchestrationGlobalSetRuleActionsAutomationActionArgs' automation_action: Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident.
         :param bool drop_event: When true, this event will be dropped. Dropped events will not trigger or resolve an alert or an incident. Dropped events will not be evaluated against router rules.
+        :param str escalation_policy: The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
         :param str event_action: sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
         :param Sequence['EventOrchestrationGlobalSetRuleActionsExtractionArgs'] extractions: Replace any CEF field or Custom Details object field using custom variables.
         :param Sequence['EventOrchestrationGlobalSetRuleActionsIncidentCustomFieldUpdateArgs'] incident_custom_field_updates: Assign a custom field to the resulting incident.
@@ -1092,6 +1111,8 @@ def __init__(__self__, *,
             pulumi.set(__self__, "automation_action", automation_action)
         if drop_event is not None:
             pulumi.set(__self__, "drop_event", drop_event)
+        if escalation_policy is not None:
+            pulumi.set(__self__, "escalation_policy", escalation_policy)
         if event_action is not None:
             pulumi.set(__self__, "event_action", event_action)
         if extractions is not None:
@@ -1135,6 +1156,14 @@ def drop_event(self) -> Optional[bool]:
         """
         return pulumi.get(self, "drop_event")
 
+    @property
+    @pulumi.getter(name="escalationPolicy")
+    def escalation_policy(self) -> Optional[str]:
+        """
+        The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+        """
+        return pulumi.get(self, "escalation_policy")
+
     @property
     @pulumi.getter(name="eventAction")
     def event_action(self) -> Optional[str]:
@@ -1737,7 +1766,9 @@ class EventOrchestrationRouterSetRuleActions(dict):
     @staticmethod
     def __key_warning(key: str):
         suggest = None
-        if key == "routeTo":
+        if key == "dynamicRouteTos":
+            suggest = "dynamic_route_tos"
+        elif key == "routeTo":
             suggest = "route_to"
 
         if suggest:
@@ -1752,21 +1783,91 @@ def get(self, key: str, default = None) -> Any:
         return super().get(key, default)
 
     def __init__(__self__, *,
-                 route_to: str):
+                 dynamic_route_tos: Optional[Sequence['outputs.EventOrchestrationRouterSetRuleActionsDynamicRouteTo']] = None,
+                 route_to: Optional[str] = None):
         """
-        :param str route_to: The ID of the target Service for the resulting alert.
+        :param Sequence['EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs'] dynamic_route_tos: supports the following:
         """
-        pulumi.set(__self__, "route_to", route_to)
+        if dynamic_route_tos is not None:
+            pulumi.set(__self__, "dynamic_route_tos", dynamic_route_tos)
+        if route_to is not None:
+            pulumi.set(__self__, "route_to", route_to)
 
     @property
-    @pulumi.getter(name="routeTo")
-    def route_to(self) -> str:
+    @pulumi.getter(name="dynamicRouteTos")
+    def dynamic_route_tos(self) -> Optional[Sequence['outputs.EventOrchestrationRouterSetRuleActionsDynamicRouteTo']]:
         """
-        The ID of the target Service for the resulting alert.
+        supports the following:
         """
+        return pulumi.get(self, "dynamic_route_tos")
+
+    @property
+    @pulumi.getter(name="routeTo")
+    def route_to(self) -> Optional[str]:
         return pulumi.get(self, "route_to")
 
 
+@pulumi.output_type
+class EventOrchestrationRouterSetRuleActionsDynamicRouteTo(dict):
+    @staticmethod
+    def __key_warning(key: str):
+        suggest = None
+        if key == "lookupBy":
+            suggest = "lookup_by"
+
+        if suggest:
+            pulumi.log.warn(f"Key '{key}' not found in EventOrchestrationRouterSetRuleActionsDynamicRouteTo. Access the value via the '{suggest}' property getter instead.")
+
+    def __getitem__(self, key: str) -> Any:
+        EventOrchestrationRouterSetRuleActionsDynamicRouteTo.__key_warning(key)
+        return super().__getitem__(key)
+
+    def get(self, key: str, default = None) -> Any:
+        EventOrchestrationRouterSetRuleActionsDynamicRouteTo.__key_warning(key)
+        return super().get(key, default)
+
+    def __init__(__self__, *,
+                 lookup_by: str,
+                 regex: str,
+                 source: str):
+        """
+        :param str lookup_by: Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `service_name`, `service_id`
+               
+               If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules.
+        :param str regex: The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax.
+        :param str source: The path to a field in an event.
+        """
+        pulumi.set(__self__, "lookup_by", lookup_by)
+        pulumi.set(__self__, "regex", regex)
+        pulumi.set(__self__, "source", source)
+
+    @property
+    @pulumi.getter(name="lookupBy")
+    def lookup_by(self) -> str:
+        """
+        Indicates whether the extracted value from the source is a service's name or ID. Allowed values are: `service_name`, `service_id`
+
+        If an event has a value at the specified `source`, and if the `regex` successfully matches the value, and if the matching portion is valid Service ID or Name, then the event will be routed to that service. Otherwise the event will be checked against any subsequent router rules.
+        """
+        return pulumi.get(self, "lookup_by")
+
+    @property
+    @pulumi.getter
+    def regex(self) -> str:
+        """
+        The regular expression, used to extract a value from the source field. Must use valid [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax.
+        """
+        return pulumi.get(self, "regex")
+
+    @property
+    @pulumi.getter
+    def source(self) -> str:
+        """
+        The path to a field in an event.
+        """
+        return pulumi.get(self, "source")
+
+
 @pulumi.output_type
 class EventOrchestrationRouterSetRuleCondition(dict):
     def __init__(__self__, *,
@@ -1899,6 +2000,8 @@ def __key_warning(key: str):
         suggest = None
         if key == "automationAction":
             suggest = "automation_action"
+        elif key == "escalationPolicy":
+            suggest = "escalation_policy"
         elif key == "eventAction":
             suggest = "event_action"
         elif key == "incidentCustomFieldUpdates":
@@ -1922,6 +2025,7 @@ def get(self, key: str, default = None) -> Any:
     def __init__(__self__, *,
                  annotate: Optional[str] = None,
                  automation_action: Optional['outputs.EventOrchestrationServiceCatchAllActionsAutomationAction'] = None,
+                 escalation_policy: Optional[str] = None,
                  event_action: Optional[str] = None,
                  extractions: Optional[Sequence['outputs.EventOrchestrationServiceCatchAllActionsExtraction']] = None,
                  incident_custom_field_updates: Optional[Sequence['outputs.EventOrchestrationServiceCatchAllActionsIncidentCustomFieldUpdate']] = None,
@@ -1935,6 +2039,7 @@ def __init__(__self__, *,
         """
         :param str annotate: Add this text as a note on the resulting incident.
         :param 'EventOrchestrationServiceCatchAllActionsAutomationActionArgs' automation_action: Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident.
+        :param str escalation_policy: The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
         :param str event_action: sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
         :param Sequence['EventOrchestrationServiceCatchAllActionsExtractionArgs'] extractions: Replace any CEF field or Custom Details object field using custom variables.
         :param Sequence['EventOrchestrationServiceCatchAllActionsIncidentCustomFieldUpdateArgs'] incident_custom_field_updates: Assign a custom field to the resulting incident.
@@ -1950,6 +2055,8 @@ def __init__(__self__, *,
             pulumi.set(__self__, "annotate", annotate)
         if automation_action is not None:
             pulumi.set(__self__, "automation_action", automation_action)
+        if escalation_policy is not None:
+            pulumi.set(__self__, "escalation_policy", escalation_policy)
         if event_action is not None:
             pulumi.set(__self__, "event_action", event_action)
         if extractions is not None:
@@ -1987,6 +2094,14 @@ def automation_action(self) -> Optional['outputs.EventOrchestrationServiceCatchA
         """
         return pulumi.get(self, "automation_action")
 
+    @property
+    @pulumi.getter(name="escalationPolicy")
+    def escalation_policy(self) -> Optional[str]:
+        """
+        The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+        """
+        return pulumi.get(self, "escalation_policy")
+
     @property
     @pulumi.getter(name="eventAction")
     def event_action(self) -> Optional[str]:
@@ -2480,6 +2595,8 @@ def __key_warning(key: str):
         suggest = None
         if key == "automationAction":
             suggest = "automation_action"
+        elif key == "escalationPolicy":
+            suggest = "escalation_policy"
         elif key == "eventAction":
             suggest = "event_action"
         elif key == "incidentCustomFieldUpdates":
@@ -2503,6 +2620,7 @@ def get(self, key: str, default = None) -> Any:
     def __init__(__self__, *,
                  annotate: Optional[str] = None,
                  automation_action: Optional['outputs.EventOrchestrationServiceSetRuleActionsAutomationAction'] = None,
+                 escalation_policy: Optional[str] = None,
                  event_action: Optional[str] = None,
                  extractions: Optional[Sequence['outputs.EventOrchestrationServiceSetRuleActionsExtraction']] = None,
                  incident_custom_field_updates: Optional[Sequence['outputs.EventOrchestrationServiceSetRuleActionsIncidentCustomFieldUpdate']] = None,
@@ -2516,6 +2634,7 @@ def __init__(__self__, *,
         """
         :param str annotate: Add this text as a note on the resulting incident.
         :param 'EventOrchestrationServiceSetRuleActionsAutomationActionArgs' automation_action: Create a [Webhook](https://support.pagerduty.com/docs/event-orchestration#webhooks) associated with the resulting incident.
+        :param str escalation_policy: The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
         :param str event_action: sets whether the resulting alert status is trigger or resolve. Allowed values are: `trigger`, `resolve`
         :param Sequence['EventOrchestrationServiceSetRuleActionsExtractionArgs'] extractions: Replace any CEF field or Custom Details object field using custom variables.
         :param Sequence['EventOrchestrationServiceSetRuleActionsIncidentCustomFieldUpdateArgs'] incident_custom_field_updates: Assign a custom field to the resulting incident.
@@ -2531,6 +2650,8 @@ def __init__(__self__, *,
             pulumi.set(__self__, "annotate", annotate)
         if automation_action is not None:
             pulumi.set(__self__, "automation_action", automation_action)
+        if escalation_policy is not None:
+            pulumi.set(__self__, "escalation_policy", escalation_policy)
         if event_action is not None:
             pulumi.set(__self__, "event_action", event_action)
         if extractions is not None:
@@ -2568,6 +2689,14 @@ def automation_action(self) -> Optional['outputs.EventOrchestrationServiceSetRul
         """
         return pulumi.get(self, "automation_action")
 
+    @property
+    @pulumi.getter(name="escalationPolicy")
+    def escalation_policy(self) -> Optional[str]:
+        """
+        The ID of the Escalation Policy you want to assign incidents to. Event rules with this action will override the Escalation Policy already set on a Service's settings, with what is configured by this action.
+        """
+        return pulumi.get(self, "escalation_policy")
+
     @property
     @pulumi.getter(name="eventAction")
     def event_action(self) -> Optional[str]: