1. Packages
  2. PagerDuty
  3. API Docs
  4. EventOrchestrationRouter
PagerDuty v4.14.0 published on Wednesday, Jul 24, 2024 by Pulumi

pagerduty.EventOrchestrationRouter

Explore with Pulumi AI

pagerduty logo
PagerDuty v4.14.0 published on Wednesday, Jul 24, 2024 by Pulumi

    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.

    Example of configuring Router rules for an Orchestration

    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.

    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: [
                        {
                            expression: "event.summary matches part 'database'",
                        },
                        {
                            expression: "event.source matches regex 'db[0-9]+-server'",
                        },
                    ],
                    actions: {
                        routeTo: database.then(database => database.id),
                    },
                },
                {
                    conditions: [{
                        expression: "event.summary matches part 'www'",
                    }],
                    actions: {
                        routeTo: www.then(www => www.id),
                    },
                },
            ],
        },
        catchAll: {
            actions: {
                routeTo: "unrouted",
            },
        },
    });
    
    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=[
                        pagerduty.EventOrchestrationRouterSetRuleConditionArgs(
                            expression="event.summary matches part 'database'",
                        ),
                        pagerduty.EventOrchestrationRouterSetRuleConditionArgs(
                            expression="event.source matches regex 'db[0-9]+-server'",
                        ),
                    ],
                    actions=pagerduty.EventOrchestrationRouterSetRuleActionsArgs(
                        route_to=database.id,
                    ),
                ),
                pagerduty.EventOrchestrationRouterSetRuleArgs(
                    conditions=[pagerduty.EventOrchestrationRouterSetRuleConditionArgs(
                        expression="event.summary matches part 'www'",
                    )],
                    actions=pagerduty.EventOrchestrationRouterSetRuleActionsArgs(
                        route_to=www.id,
                    ),
                ),
            ],
        ),
        catch_all=pagerduty.EventOrchestrationRouterCatchAllArgs(
            actions=pagerduty.EventOrchestrationRouterCatchAllActionsArgs(
                route_to="unrouted",
            ),
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-pagerduty/sdk/v4/go/pagerduty"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		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{
    								Expression: pulumi.String("event.summary matches part 'database'"),
    							},
    							&pagerduty.EventOrchestrationRouterSetRuleConditionArgs{
    								Expression: pulumi.String("event.source matches regex 'db[0-9]+-server'"),
    							},
    						},
    						Actions: &pagerduty.EventOrchestrationRouterSetRuleActionsArgs{
    							RouteTo: pulumi.String(database.Id),
    						},
    					},
    					&pagerduty.EventOrchestrationRouterSetRuleArgs{
    						Conditions: pagerduty.EventOrchestrationRouterSetRuleConditionArray{
    							&pagerduty.EventOrchestrationRouterSetRuleConditionArgs{
    								Expression: pulumi.String("event.summary matches part 'www'"),
    							},
    						},
    						Actions: &pagerduty.EventOrchestrationRouterSetRuleActionsArgs{
    							RouteTo: pulumi.String(www.Id),
    						},
    					},
    				},
    			},
    			CatchAll: &pagerduty.EventOrchestrationRouterCatchAllArgs{
    				Actions: &pagerduty.EventOrchestrationRouterCatchAllActionsArgs{
    					RouteTo: pulumi.String("unrouted"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Pagerduty = 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,
            Set = new Pagerduty.Inputs.EventOrchestrationRouterSetArgs
            {
                Id = "start",
                Rules = new[]
                {
                    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[]
                        {
                            new Pagerduty.Inputs.EventOrchestrationRouterSetRuleConditionArgs
                            {
                                Expression = "event.summary matches part 'database'",
                            },
                            new Pagerduty.Inputs.EventOrchestrationRouterSetRuleConditionArgs
                            {
                                Expression = "event.source matches regex 'db[0-9]+-server'",
                            },
                        },
                        Actions = new Pagerduty.Inputs.EventOrchestrationRouterSetRuleActionsArgs
                        {
                            RouteTo = database.Apply(getServiceResult => getServiceResult.Id),
                        },
                    },
                    new Pagerduty.Inputs.EventOrchestrationRouterSetRuleArgs
                    {
                        Conditions = new[]
                        {
                            new Pagerduty.Inputs.EventOrchestrationRouterSetRuleConditionArgs
                            {
                                Expression = "event.summary matches part 'www'",
                            },
                        },
                        Actions = new Pagerduty.Inputs.EventOrchestrationRouterSetRuleActionsArgs
                        {
                            RouteTo = www.Apply(getServiceResult => getServiceResult.Id),
                        },
                    },
                },
            },
            CatchAll = new Pagerduty.Inputs.EventOrchestrationRouterCatchAllArgs
            {
                Actions = new Pagerduty.Inputs.EventOrchestrationRouterCatchAllActionsArgs
                {
                    RouteTo = "unrouted",
                },
            },
        });
    
    });
    
    package generated_program;
    
    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;
    import com.pulumi.pagerduty.inputs.EventOrchestrationRouterCatchAllArgs;
    import com.pulumi.pagerduty.inputs.EventOrchestrationRouterCatchAllActionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        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()
                                    .expression("event.summary matches part 'database'")
                                    .build(),
                                EventOrchestrationRouterSetRuleConditionArgs.builder()
                                    .expression("event.source matches regex 'db[0-9]+-server'")
                                    .build())
                            .actions(EventOrchestrationRouterSetRuleActionsArgs.builder()
                                .routeTo(database.applyValue(getServiceResult -> getServiceResult.id()))
                                .build())
                            .build(),
                        EventOrchestrationRouterSetRuleArgs.builder()
                            .conditions(EventOrchestrationRouterSetRuleConditionArgs.builder()
                                .expression("event.summary matches part 'www'")
                                .build())
                            .actions(EventOrchestrationRouterSetRuleActionsArgs.builder()
                                .routeTo(www.applyValue(getServiceResult -> getServiceResult.id()))
                                .build())
                            .build())
                    .build())
                .catchAll(EventOrchestrationRouterCatchAllArgs.builder()
                    .actions(EventOrchestrationRouterCatchAllActionsArgs.builder()
                        .routeTo("unrouted")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      router:
        type: pagerduty:EventOrchestrationRouter
        properties:
          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:
                  - expression: event.summary matches part 'database'
                  - expression: event.source matches regex 'db[0-9]+-server'
                actions:
                  routeTo: ${database.id}
              - conditions:
                  - expression: event.summary matches part 'www'
                actions:
                  routeTo: ${www.id}
          catchAll:
            actions:
              routeTo: unrouted
    variables:
      database:
        fn::invoke:
          Function: pagerduty:getService
          Arguments:
            name: Primary Data Store
      www:
        fn::invoke:
          Function: pagerduty:getService
          Arguments:
            name: Web Server App
    

    Create EventOrchestrationRouter Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new EventOrchestrationRouter(name: string, args: EventOrchestrationRouterArgs, opts?: CustomResourceOptions);
    @overload
    def EventOrchestrationRouter(resource_name: str,
                                 args: EventOrchestrationRouterArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def EventOrchestrationRouter(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 catch_all: Optional[EventOrchestrationRouterCatchAllArgs] = None,
                                 event_orchestration: Optional[str] = None,
                                 set: Optional[EventOrchestrationRouterSetArgs] = None)
    func NewEventOrchestrationRouter(ctx *Context, name string, args EventOrchestrationRouterArgs, opts ...ResourceOption) (*EventOrchestrationRouter, error)
    public EventOrchestrationRouter(string name, EventOrchestrationRouterArgs args, CustomResourceOptions? opts = null)
    public EventOrchestrationRouter(String name, EventOrchestrationRouterArgs args)
    public EventOrchestrationRouter(String name, EventOrchestrationRouterArgs args, CustomResourceOptions options)
    
    type: pagerduty:EventOrchestrationRouter
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args EventOrchestrationRouterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args EventOrchestrationRouterArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args EventOrchestrationRouterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EventOrchestrationRouterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EventOrchestrationRouterArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var eventOrchestrationRouterResource = new Pagerduty.EventOrchestrationRouter("eventOrchestrationRouterResource", new()
    {
        CatchAll = new Pagerduty.Inputs.EventOrchestrationRouterCatchAllArgs
        {
            Actions = new Pagerduty.Inputs.EventOrchestrationRouterCatchAllActionsArgs
            {
                RouteTo = "string",
            },
        },
        EventOrchestration = "string",
        Set = new Pagerduty.Inputs.EventOrchestrationRouterSetArgs
        {
            Id = "string",
            Rules = new[]
            {
                new Pagerduty.Inputs.EventOrchestrationRouterSetRuleArgs
                {
                    Actions = new Pagerduty.Inputs.EventOrchestrationRouterSetRuleActionsArgs
                    {
                        DynamicRouteTos = new[]
                        {
                            new Pagerduty.Inputs.EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs
                            {
                                LookupBy = "string",
                                Regex = "string",
                                Source = "string",
                            },
                        },
                        RouteTo = "string",
                    },
                    Conditions = new[]
                    {
                        new Pagerduty.Inputs.EventOrchestrationRouterSetRuleConditionArgs
                        {
                            Expression = "string",
                        },
                    },
                    Disabled = false,
                    Id = "string",
                    Label = "string",
                },
            },
        },
    });
    
    example, err := pagerduty.NewEventOrchestrationRouter(ctx, "eventOrchestrationRouterResource", &pagerduty.EventOrchestrationRouterArgs{
    	CatchAll: &pagerduty.EventOrchestrationRouterCatchAllArgs{
    		Actions: &pagerduty.EventOrchestrationRouterCatchAllActionsArgs{
    			RouteTo: pulumi.String("string"),
    		},
    	},
    	EventOrchestration: pulumi.String("string"),
    	Set: &pagerduty.EventOrchestrationRouterSetArgs{
    		Id: pulumi.String("string"),
    		Rules: pagerduty.EventOrchestrationRouterSetRuleArray{
    			&pagerduty.EventOrchestrationRouterSetRuleArgs{
    				Actions: &pagerduty.EventOrchestrationRouterSetRuleActionsArgs{
    					DynamicRouteTos: pagerduty.EventOrchestrationRouterSetRuleActionsDynamicRouteToArray{
    						&pagerduty.EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs{
    							LookupBy: pulumi.String("string"),
    							Regex:    pulumi.String("string"),
    							Source:   pulumi.String("string"),
    						},
    					},
    					RouteTo: pulumi.String("string"),
    				},
    				Conditions: pagerduty.EventOrchestrationRouterSetRuleConditionArray{
    					&pagerduty.EventOrchestrationRouterSetRuleConditionArgs{
    						Expression: pulumi.String("string"),
    					},
    				},
    				Disabled: pulumi.Bool(false),
    				Id:       pulumi.String("string"),
    				Label:    pulumi.String("string"),
    			},
    		},
    	},
    })
    
    var eventOrchestrationRouterResource = new EventOrchestrationRouter("eventOrchestrationRouterResource", EventOrchestrationRouterArgs.builder()
        .catchAll(EventOrchestrationRouterCatchAllArgs.builder()
            .actions(EventOrchestrationRouterCatchAllActionsArgs.builder()
                .routeTo("string")
                .build())
            .build())
        .eventOrchestration("string")
        .set(EventOrchestrationRouterSetArgs.builder()
            .id("string")
            .rules(EventOrchestrationRouterSetRuleArgs.builder()
                .actions(EventOrchestrationRouterSetRuleActionsArgs.builder()
                    .dynamicRouteTos(EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs.builder()
                        .lookupBy("string")
                        .regex("string")
                        .source("string")
                        .build())
                    .routeTo("string")
                    .build())
                .conditions(EventOrchestrationRouterSetRuleConditionArgs.builder()
                    .expression("string")
                    .build())
                .disabled(false)
                .id("string")
                .label("string")
                .build())
            .build())
        .build());
    
    event_orchestration_router_resource = pagerduty.EventOrchestrationRouter("eventOrchestrationRouterResource",
        catch_all=pagerduty.EventOrchestrationRouterCatchAllArgs(
            actions=pagerduty.EventOrchestrationRouterCatchAllActionsArgs(
                route_to="string",
            ),
        ),
        event_orchestration="string",
        set=pagerduty.EventOrchestrationRouterSetArgs(
            id="string",
            rules=[pagerduty.EventOrchestrationRouterSetRuleArgs(
                actions=pagerduty.EventOrchestrationRouterSetRuleActionsArgs(
                    dynamic_route_tos=[pagerduty.EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs(
                        lookup_by="string",
                        regex="string",
                        source="string",
                    )],
                    route_to="string",
                ),
                conditions=[pagerduty.EventOrchestrationRouterSetRuleConditionArgs(
                    expression="string",
                )],
                disabled=False,
                id="string",
                label="string",
            )],
        ))
    
    const eventOrchestrationRouterResource = new pagerduty.EventOrchestrationRouter("eventOrchestrationRouterResource", {
        catchAll: {
            actions: {
                routeTo: "string",
            },
        },
        eventOrchestration: "string",
        set: {
            id: "string",
            rules: [{
                actions: {
                    dynamicRouteTos: [{
                        lookupBy: "string",
                        regex: "string",
                        source: "string",
                    }],
                    routeTo: "string",
                },
                conditions: [{
                    expression: "string",
                }],
                disabled: false,
                id: "string",
                label: "string",
            }],
        },
    });
    
    type: pagerduty:EventOrchestrationRouter
    properties:
        catchAll:
            actions:
                routeTo: string
        eventOrchestration: string
        set:
            id: string
            rules:
                - actions:
                    dynamicRouteTos:
                        - lookupBy: string
                          regex: string
                          source: string
                    routeTo: string
                  conditions:
                    - expression: string
                  disabled: false
                  id: string
                  label: string
    

    EventOrchestrationRouter Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The EventOrchestrationRouter resource accepts the following input properties:

    CatchAll EventOrchestrationRouterCatchAll
    When none of the rules match an event, the event will be routed according to the catch_all settings.
    EventOrchestration string
    ID of the Event Orchestration to which the Router belongs.
    Set EventOrchestrationRouterSet
    The Router contains a single set of rules (the "start" set).
    CatchAll EventOrchestrationRouterCatchAllArgs
    When none of the rules match an event, the event will be routed according to the catch_all settings.
    EventOrchestration string
    ID of the Event Orchestration to which the Router belongs.
    Set EventOrchestrationRouterSetArgs
    The Router contains a single set of rules (the "start" set).
    catchAll EventOrchestrationRouterCatchAll
    When none of the rules match an event, the event will be routed according to the catch_all settings.
    eventOrchestration String
    ID of the Event Orchestration to which the Router belongs.
    set EventOrchestrationRouterSet
    The Router contains a single set of rules (the "start" set).
    catchAll EventOrchestrationRouterCatchAll
    When none of the rules match an event, the event will be routed according to the catch_all settings.
    eventOrchestration string
    ID of the Event Orchestration to which the Router belongs.
    set EventOrchestrationRouterSet
    The Router contains a single set of rules (the "start" set).
    catch_all EventOrchestrationRouterCatchAllArgs
    When none of the rules match an event, the event will be routed according to the catch_all settings.
    event_orchestration str
    ID of the Event Orchestration to which the Router belongs.
    set EventOrchestrationRouterSetArgs
    The Router contains a single set of rules (the "start" set).
    catchAll Property Map
    When none of the rules match an event, the event will be routed according to the catch_all settings.
    eventOrchestration String
    ID of the Event Orchestration to which the Router belongs.
    set Property Map
    The Router contains a single set of rules (the "start" set).

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EventOrchestrationRouter resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing EventOrchestrationRouter Resource

    Get an existing EventOrchestrationRouter resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: EventOrchestrationRouterState, opts?: CustomResourceOptions): EventOrchestrationRouter
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            catch_all: Optional[EventOrchestrationRouterCatchAllArgs] = None,
            event_orchestration: Optional[str] = None,
            set: Optional[EventOrchestrationRouterSetArgs] = None) -> EventOrchestrationRouter
    func GetEventOrchestrationRouter(ctx *Context, name string, id IDInput, state *EventOrchestrationRouterState, opts ...ResourceOption) (*EventOrchestrationRouter, error)
    public static EventOrchestrationRouter Get(string name, Input<string> id, EventOrchestrationRouterState? state, CustomResourceOptions? opts = null)
    public static EventOrchestrationRouter get(String name, Output<String> id, EventOrchestrationRouterState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CatchAll EventOrchestrationRouterCatchAll
    When none of the rules match an event, the event will be routed according to the catch_all settings.
    EventOrchestration string
    ID of the Event Orchestration to which the Router belongs.
    Set EventOrchestrationRouterSet
    The Router contains a single set of rules (the "start" set).
    CatchAll EventOrchestrationRouterCatchAllArgs
    When none of the rules match an event, the event will be routed according to the catch_all settings.
    EventOrchestration string
    ID of the Event Orchestration to which the Router belongs.
    Set EventOrchestrationRouterSetArgs
    The Router contains a single set of rules (the "start" set).
    catchAll EventOrchestrationRouterCatchAll
    When none of the rules match an event, the event will be routed according to the catch_all settings.
    eventOrchestration String
    ID of the Event Orchestration to which the Router belongs.
    set EventOrchestrationRouterSet
    The Router contains a single set of rules (the "start" set).
    catchAll EventOrchestrationRouterCatchAll
    When none of the rules match an event, the event will be routed according to the catch_all settings.
    eventOrchestration string
    ID of the Event Orchestration to which the Router belongs.
    set EventOrchestrationRouterSet
    The Router contains a single set of rules (the "start" set).
    catch_all EventOrchestrationRouterCatchAllArgs
    When none of the rules match an event, the event will be routed according to the catch_all settings.
    event_orchestration str
    ID of the Event Orchestration to which the Router belongs.
    set EventOrchestrationRouterSetArgs
    The Router contains a single set of rules (the "start" set).
    catchAll Property Map
    When none of the rules match an event, the event will be routed according to the catch_all settings.
    eventOrchestration String
    ID of the Event Orchestration to which the Router belongs.
    set Property Map
    The Router contains a single set of rules (the "start" set).

    Supporting Types

    EventOrchestrationRouterCatchAll, EventOrchestrationRouterCatchAllArgs

    Actions EventOrchestrationRouterCatchAllActions
    These are the actions that will be taken to change the resulting alert and incident.
    Actions EventOrchestrationRouterCatchAllActions
    These are the actions that will be taken to change the resulting alert and incident.
    actions EventOrchestrationRouterCatchAllActions
    These are the actions that will be taken to change the resulting alert and incident.
    actions EventOrchestrationRouterCatchAllActions
    These are the actions that will be taken to change the resulting alert and incident.
    actions EventOrchestrationRouterCatchAllActions
    These are the actions that will be taken to change the resulting alert and incident.
    actions Property Map
    These are the actions that will be taken to change the resulting alert and incident.

    EventOrchestrationRouterCatchAllActions, EventOrchestrationRouterCatchAllActionsArgs

    RouteTo string
    Defines where an alert will be sent if doesn't match any rules. Can either be the ID of a Service or the string "unrouted" to send events to the Unrouted Orchestration.
    RouteTo string
    Defines where an alert will be sent if doesn't match any rules. Can either be the ID of a Service or the string "unrouted" to send events to the Unrouted Orchestration.
    routeTo String
    Defines where an alert will be sent if doesn't match any rules. Can either be the ID of a Service or the string "unrouted" to send events to the Unrouted Orchestration.
    routeTo string
    Defines where an alert will be sent if doesn't match any rules. Can either be the ID of a Service or the string "unrouted" to send events to the Unrouted Orchestration.
    route_to str
    Defines where an alert will be sent if doesn't match any rules. Can either be the ID of a Service or the string "unrouted" to send events to the Unrouted Orchestration.
    routeTo String
    Defines where an alert will be sent if doesn't match any rules. Can either be the ID of a Service or the string "unrouted" to send events to the Unrouted Orchestration.

    EventOrchestrationRouterSet, EventOrchestrationRouterSetArgs

    Id string
    ID of the start set. Router supports only one set and it's id has to be start
    Rules List<EventOrchestrationRouterSetRule>
    Id string
    ID of the start set. Router supports only one set and it's id has to be start
    Rules []EventOrchestrationRouterSetRule
    id String
    ID of the start set. Router supports only one set and it's id has to be start
    rules List<EventOrchestrationRouterSetRule>
    id string
    ID of the start set. Router supports only one set and it's id has to be start
    rules EventOrchestrationRouterSetRule[]
    id str
    ID of the start set. Router supports only one set and it's id has to be start
    rules Sequence[EventOrchestrationRouterSetRule]
    id String
    ID of the start set. Router supports only one set and it's id has to be start
    rules List<Property Map>

    EventOrchestrationRouterSetRule, EventOrchestrationRouterSetRuleArgs

    Actions EventOrchestrationRouterSetRuleActions
    Actions that will be taken to change the resulting alert and incident, when an event matches this rule.
    Conditions List<EventOrchestrationRouterSetRuleCondition>
    Each of these conditions is evaluated to check if an event matches this rule. The rule is considered a match if any of these conditions match. If none are provided, the event will always match against the rule.
    Disabled bool
    Indicates whether the rule is disabled and would therefore not be evaluated.
    Id string
    The ID of the rule within the start set.
    Label string
    A description of this rule's purpose.
    Actions EventOrchestrationRouterSetRuleActions
    Actions that will be taken to change the resulting alert and incident, when an event matches this rule.
    Conditions []EventOrchestrationRouterSetRuleCondition
    Each of these conditions is evaluated to check if an event matches this rule. The rule is considered a match if any of these conditions match. If none are provided, the event will always match against the rule.
    Disabled bool
    Indicates whether the rule is disabled and would therefore not be evaluated.
    Id string
    The ID of the rule within the start set.
    Label string
    A description of this rule's purpose.
    actions EventOrchestrationRouterSetRuleActions
    Actions that will be taken to change the resulting alert and incident, when an event matches this rule.
    conditions List<EventOrchestrationRouterSetRuleCondition>
    Each of these conditions is evaluated to check if an event matches this rule. The rule is considered a match if any of these conditions match. If none are provided, the event will always match against the rule.
    disabled Boolean
    Indicates whether the rule is disabled and would therefore not be evaluated.
    id String
    The ID of the rule within the start set.
    label String
    A description of this rule's purpose.
    actions EventOrchestrationRouterSetRuleActions
    Actions that will be taken to change the resulting alert and incident, when an event matches this rule.
    conditions EventOrchestrationRouterSetRuleCondition[]
    Each of these conditions is evaluated to check if an event matches this rule. The rule is considered a match if any of these conditions match. If none are provided, the event will always match against the rule.
    disabled boolean
    Indicates whether the rule is disabled and would therefore not be evaluated.
    id string
    The ID of the rule within the start set.
    label string
    A description of this rule's purpose.
    actions EventOrchestrationRouterSetRuleActions
    Actions that will be taken to change the resulting alert and incident, when an event matches this rule.
    conditions Sequence[EventOrchestrationRouterSetRuleCondition]
    Each of these conditions is evaluated to check if an event matches this rule. The rule is considered a match if any of these conditions match. If none are provided, the event will always match against the rule.
    disabled bool
    Indicates whether the rule is disabled and would therefore not be evaluated.
    id str
    The ID of the rule within the start set.
    label str
    A description of this rule's purpose.
    actions Property Map
    Actions that will be taken to change the resulting alert and incident, when an event matches this rule.
    conditions List<Property Map>
    Each of these conditions is evaluated to check if an event matches this rule. The rule is considered a match if any of these conditions match. If none are provided, the event will always match against the rule.
    disabled Boolean
    Indicates whether the rule is disabled and would therefore not be evaluated.
    id String
    The ID of the rule within the start set.
    label String
    A description of this rule's purpose.

    EventOrchestrationRouterSetRuleActions, EventOrchestrationRouterSetRuleActionsArgs

    dynamicRouteTos List<Property Map>
    supports the following:
    routeTo String

    EventOrchestrationRouterSetRuleActionsDynamicRouteTo, EventOrchestrationRouterSetRuleActionsDynamicRouteToArgs

    LookupBy string

    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.

    Regex string
    The regular expression, used to extract a value from the source field. Must use valid RE2 regular expression syntax.
    Source string
    The path to a field in an event.
    LookupBy string

    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.

    Regex string
    The regular expression, used to extract a value from the source field. Must use valid RE2 regular expression syntax.
    Source string
    The path to a field in an event.
    lookupBy String

    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.

    regex String
    The regular expression, used to extract a value from the source field. Must use valid RE2 regular expression syntax.
    source String
    The path to a field in an event.
    lookupBy string

    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.

    regex string
    The regular expression, used to extract a value from the source field. Must use valid RE2 regular expression syntax.
    source string
    The path to a field in an event.
    lookup_by 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.

    regex str
    The regular expression, used to extract a value from the source field. Must use valid RE2 regular expression syntax.
    source str
    The path to a field in an event.
    lookupBy String

    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.

    regex String
    The regular expression, used to extract a value from the source field. Must use valid RE2 regular expression syntax.
    source String
    The path to a field in an event.

    EventOrchestrationRouterSetRuleCondition, EventOrchestrationRouterSetRuleConditionArgs

    Expression string
    A PCL condition string.
    Expression string
    A PCL condition string.
    expression String
    A PCL condition string.
    expression string
    A PCL condition string.
    expression String
    A PCL condition string.

    Import

    Router can be imported using the id of the Event Orchestration, e.g.

    $ pulumi import pagerduty:index/eventOrchestrationRouter:EventOrchestrationRouter router 1b49abe7-26db-4439-a715-c6d883acfb3e
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    PagerDuty pulumi/pulumi-pagerduty
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the pagerduty Terraform Provider.
    pagerduty logo
    PagerDuty v4.14.0 published on Wednesday, Jul 24, 2024 by Pulumi