1. Packages
  2. Pagerduty Provider
  3. API Docs
  4. getEventOrchestrations
PagerDuty v4.23.0 published on Wednesday, Apr 16, 2025 by Pulumi

pagerduty.getEventOrchestrations

Explore with Pulumi AI

Use this data source to get information as a list about specific Global Event Orchestrations filtered by a Regular Expression provided.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";

const tfOrchA = new pagerduty.EventOrchestration("tf_orch_a", {name: "Test Event A Orchestration"});
const tfOrchB = new pagerduty.EventOrchestration("tf_orch_b", {name: "Test Event B Orchestration"});
const tfMyMonitor = pagerduty.getEventOrchestrations({
    nameFilter: ".*Orchestration$",
});
const cacheVar = new pagerduty.EventOrchestrationGlobalCacheVariable("cache_var", {
    eventOrchestration: tfMyMonitor.then(tfMyMonitor => tfMyMonitor.eventOrchestrations?.[0]?.id),
    name: "recent_host",
    conditions: [{
        expression: "event.source exists",
    }],
    configuration: {
        type: "recent_value",
        source: "event.source",
        regex: ".*",
    },
});
Copy
import pulumi
import pulumi_pagerduty as pagerduty

tf_orch_a = pagerduty.EventOrchestration("tf_orch_a", name="Test Event A Orchestration")
tf_orch_b = pagerduty.EventOrchestration("tf_orch_b", name="Test Event B Orchestration")
tf_my_monitor = pagerduty.get_event_orchestrations(name_filter=".*Orchestration$")
cache_var = pagerduty.EventOrchestrationGlobalCacheVariable("cache_var",
    event_orchestration=tf_my_monitor.event_orchestrations[0].id,
    name="recent_host",
    conditions=[{
        "expression": "event.source exists",
    }],
    configuration={
        "type": "recent_value",
        "source": "event.source",
        "regex": ".*",
    })
Copy
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 {
		_, err := pagerduty.NewEventOrchestration(ctx, "tf_orch_a", &pagerduty.EventOrchestrationArgs{
			Name: pulumi.String("Test Event A Orchestration"),
		})
		if err != nil {
			return err
		}
		_, err = pagerduty.NewEventOrchestration(ctx, "tf_orch_b", &pagerduty.EventOrchestrationArgs{
			Name: pulumi.String("Test Event B Orchestration"),
		})
		if err != nil {
			return err
		}
		tfMyMonitor, err := pagerduty.GetEventOrchestrations(ctx, &pagerduty.GetEventOrchestrationsArgs{
			NameFilter: ".*Orchestration$",
		}, nil)
		if err != nil {
			return err
		}
		_, err = pagerduty.NewEventOrchestrationGlobalCacheVariable(ctx, "cache_var", &pagerduty.EventOrchestrationGlobalCacheVariableArgs{
			EventOrchestration: pulumi.String(tfMyMonitor.EventOrchestrations[0].Id),
			Name:               pulumi.String("recent_host"),
			Conditions: pagerduty.EventOrchestrationGlobalCacheVariableConditionArray{
				&pagerduty.EventOrchestrationGlobalCacheVariableConditionArgs{
					Expression: pulumi.String("event.source exists"),
				},
			},
			Configuration: &pagerduty.EventOrchestrationGlobalCacheVariableConfigurationArgs{
				Type:   pulumi.String("recent_value"),
				Source: pulumi.String("event.source"),
				Regex:  pulumi.String(".*"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Pagerduty = Pulumi.Pagerduty;

return await Deployment.RunAsync(() => 
{
    var tfOrchA = new Pagerduty.EventOrchestration("tf_orch_a", new()
    {
        Name = "Test Event A Orchestration",
    });

    var tfOrchB = new Pagerduty.EventOrchestration("tf_orch_b", new()
    {
        Name = "Test Event B Orchestration",
    });

    var tfMyMonitor = Pagerduty.GetEventOrchestrations.Invoke(new()
    {
        NameFilter = ".*Orchestration$",
    });

    var cacheVar = new Pagerduty.EventOrchestrationGlobalCacheVariable("cache_var", new()
    {
        EventOrchestration = tfMyMonitor.Apply(getEventOrchestrationsResult => getEventOrchestrationsResult.EventOrchestrations[0]?.Id),
        Name = "recent_host",
        Conditions = new[]
        {
            new Pagerduty.Inputs.EventOrchestrationGlobalCacheVariableConditionArgs
            {
                Expression = "event.source exists",
            },
        },
        Configuration = new Pagerduty.Inputs.EventOrchestrationGlobalCacheVariableConfigurationArgs
        {
            Type = "recent_value",
            Source = "event.source",
            Regex = ".*",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.pagerduty.EventOrchestration;
import com.pulumi.pagerduty.EventOrchestrationArgs;
import com.pulumi.pagerduty.PagerdutyFunctions;
import com.pulumi.pagerduty.inputs.GetEventOrchestrationsArgs;
import com.pulumi.pagerduty.EventOrchestrationGlobalCacheVariable;
import com.pulumi.pagerduty.EventOrchestrationGlobalCacheVariableArgs;
import com.pulumi.pagerduty.inputs.EventOrchestrationGlobalCacheVariableConditionArgs;
import com.pulumi.pagerduty.inputs.EventOrchestrationGlobalCacheVariableConfigurationArgs;
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) {
        var tfOrchA = new EventOrchestration("tfOrchA", EventOrchestrationArgs.builder()
            .name("Test Event A Orchestration")
            .build());

        var tfOrchB = new EventOrchestration("tfOrchB", EventOrchestrationArgs.builder()
            .name("Test Event B Orchestration")
            .build());

        final var tfMyMonitor = PagerdutyFunctions.getEventOrchestrations(GetEventOrchestrationsArgs.builder()
            .nameFilter(".*Orchestration$")
            .build());

        var cacheVar = new EventOrchestrationGlobalCacheVariable("cacheVar", EventOrchestrationGlobalCacheVariableArgs.builder()
            .eventOrchestration(tfMyMonitor.eventOrchestrations()[0].id())
            .name("recent_host")
            .conditions(EventOrchestrationGlobalCacheVariableConditionArgs.builder()
                .expression("event.source exists")
                .build())
            .configuration(EventOrchestrationGlobalCacheVariableConfigurationArgs.builder()
                .type("recent_value")
                .source("event.source")
                .regex(".*")
                .build())
            .build());

    }
}
Copy
resources:
  tfOrchA:
    type: pagerduty:EventOrchestration
    name: tf_orch_a
    properties:
      name: Test Event A Orchestration
  tfOrchB:
    type: pagerduty:EventOrchestration
    name: tf_orch_b
    properties:
      name: Test Event B Orchestration
  cacheVar:
    type: pagerduty:EventOrchestrationGlobalCacheVariable
    name: cache_var
    properties:
      eventOrchestration: ${tfMyMonitor.eventOrchestrations[0].id}
      name: recent_host
      conditions:
        - expression: event.source exists
      configuration:
        type: recent_value
        source: event.source
        regex: .*
variables:
  tfMyMonitor:
    fn::invoke:
      function: pagerduty:getEventOrchestrations
      arguments:
        nameFilter: .*Orchestration$
Copy

Using getEventOrchestrations

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getEventOrchestrations(args: GetEventOrchestrationsArgs, opts?: InvokeOptions): Promise<GetEventOrchestrationsResult>
function getEventOrchestrationsOutput(args: GetEventOrchestrationsOutputArgs, opts?: InvokeOptions): Output<GetEventOrchestrationsResult>
Copy
def get_event_orchestrations(name_filter: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetEventOrchestrationsResult
def get_event_orchestrations_output(name_filter: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetEventOrchestrationsResult]
Copy
func GetEventOrchestrations(ctx *Context, args *GetEventOrchestrationsArgs, opts ...InvokeOption) (*GetEventOrchestrationsResult, error)
func GetEventOrchestrationsOutput(ctx *Context, args *GetEventOrchestrationsOutputArgs, opts ...InvokeOption) GetEventOrchestrationsResultOutput
Copy

> Note: This function is named GetEventOrchestrations in the Go SDK.

public static class GetEventOrchestrations 
{
    public static Task<GetEventOrchestrationsResult> InvokeAsync(GetEventOrchestrationsArgs args, InvokeOptions? opts = null)
    public static Output<GetEventOrchestrationsResult> Invoke(GetEventOrchestrationsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetEventOrchestrationsResult> getEventOrchestrations(GetEventOrchestrationsArgs args, InvokeOptions options)
public static Output<GetEventOrchestrationsResult> getEventOrchestrations(GetEventOrchestrationsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: pagerduty:index/getEventOrchestrations:getEventOrchestrations
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

NameFilter This property is required. string
The regex name of Global Event Orchestrations to find in the PagerDuty API.
NameFilter This property is required. string
The regex name of Global Event Orchestrations to find in the PagerDuty API.
nameFilter This property is required. String
The regex name of Global Event Orchestrations to find in the PagerDuty API.
nameFilter This property is required. string
The regex name of Global Event Orchestrations to find in the PagerDuty API.
name_filter This property is required. str
The regex name of Global Event Orchestrations to find in the PagerDuty API.
nameFilter This property is required. String
The regex name of Global Event Orchestrations to find in the PagerDuty API.

getEventOrchestrations Result

The following output properties are available:

EventOrchestrations List<GetEventOrchestrationsEventOrchestration>
The list of the Event Orchestrations with a name that matches the name_filter argument.
Id string
The provider-assigned unique ID for this managed resource.
NameFilter string
The regex supplied to find the list of Global Event Orchestrations
EventOrchestrations []GetEventOrchestrationsEventOrchestration
The list of the Event Orchestrations with a name that matches the name_filter argument.
Id string
The provider-assigned unique ID for this managed resource.
NameFilter string
The regex supplied to find the list of Global Event Orchestrations
eventOrchestrations List<GetEventOrchestrationsEventOrchestration>
The list of the Event Orchestrations with a name that matches the name_filter argument.
id String
The provider-assigned unique ID for this managed resource.
nameFilter String
The regex supplied to find the list of Global Event Orchestrations
eventOrchestrations GetEventOrchestrationsEventOrchestration[]
The list of the Event Orchestrations with a name that matches the name_filter argument.
id string
The provider-assigned unique ID for this managed resource.
nameFilter string
The regex supplied to find the list of Global Event Orchestrations
event_orchestrations Sequence[GetEventOrchestrationsEventOrchestration]
The list of the Event Orchestrations with a name that matches the name_filter argument.
id str
The provider-assigned unique ID for this managed resource.
name_filter str
The regex supplied to find the list of Global Event Orchestrations
eventOrchestrations List<Property Map>
The list of the Event Orchestrations with a name that matches the name_filter argument.
id String
The provider-assigned unique ID for this managed resource.
nameFilter String
The regex supplied to find the list of Global Event Orchestrations

Supporting Types

GetEventOrchestrationsEventOrchestration

Id This property is required. string
ID of the integration
Integrations This property is required. List<GetEventOrchestrationsEventOrchestrationIntegration>
A list of integrations for the Event Orchestration.
Name This property is required. string
The name of the found Event Orchestration.
Id This property is required. string
ID of the integration
Integrations This property is required. []GetEventOrchestrationsEventOrchestrationIntegration
A list of integrations for the Event Orchestration.
Name This property is required. string
The name of the found Event Orchestration.
id This property is required. String
ID of the integration
integrations This property is required. List<GetEventOrchestrationsEventOrchestrationIntegration>
A list of integrations for the Event Orchestration.
name This property is required. String
The name of the found Event Orchestration.
id This property is required. string
ID of the integration
integrations This property is required. GetEventOrchestrationsEventOrchestrationIntegration[]
A list of integrations for the Event Orchestration.
name This property is required. string
The name of the found Event Orchestration.
id This property is required. str
ID of the integration
integrations This property is required. Sequence[GetEventOrchestrationsEventOrchestrationIntegration]
A list of integrations for the Event Orchestration.
name This property is required. str
The name of the found Event Orchestration.
id This property is required. String
ID of the integration
integrations This property is required. List<Property Map>
A list of integrations for the Event Orchestration.
name This property is required. String
The name of the found Event Orchestration.

GetEventOrchestrationsEventOrchestrationIntegration

Id This property is required. string
ID of the integration
Label This property is required. string
Parameters This property is required. List<GetEventOrchestrationsEventOrchestrationIntegrationParameter>
A single-item list containing a parameter object describing the integration
Id This property is required. string
ID of the integration
Label This property is required. string
Parameters This property is required. []GetEventOrchestrationsEventOrchestrationIntegrationParameter
A single-item list containing a parameter object describing the integration
id This property is required. String
ID of the integration
label This property is required. String
parameters This property is required. List<GetEventOrchestrationsEventOrchestrationIntegrationParameter>
A single-item list containing a parameter object describing the integration
id This property is required. string
ID of the integration
label This property is required. string
parameters This property is required. GetEventOrchestrationsEventOrchestrationIntegrationParameter[]
A single-item list containing a parameter object describing the integration
id This property is required. str
ID of the integration
label This property is required. str
parameters This property is required. Sequence[GetEventOrchestrationsEventOrchestrationIntegrationParameter]
A single-item list containing a parameter object describing the integration
id This property is required. String
ID of the integration
label This property is required. String
parameters This property is required. List<Property Map>
A single-item list containing a parameter object describing the integration

GetEventOrchestrationsEventOrchestrationIntegrationParameter

RoutingKey This property is required. string
Routing key that routes to this Orchestration.
Type This property is required. string
Type of the routing key. global is the default type.
RoutingKey This property is required. string
Routing key that routes to this Orchestration.
Type This property is required. string
Type of the routing key. global is the default type.
routingKey This property is required. String
Routing key that routes to this Orchestration.
type This property is required. String
Type of the routing key. global is the default type.
routingKey This property is required. string
Routing key that routes to this Orchestration.
type This property is required. string
Type of the routing key. global is the default type.
routing_key This property is required. str
Routing key that routes to this Orchestration.
type This property is required. str
Type of the routing key. global is the default type.
routingKey This property is required. String
Routing key that routes to this Orchestration.
type This property is required. String
Type of the routing key. global is the default type.

Package Details

Repository
PagerDuty pulumi/pulumi-pagerduty
License
Apache-2.0
Notes
This Pulumi package is based on the pagerduty Terraform Provider.