PagerDuty v4.22.1 published on Friday, Mar 21, 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: ".*",
    },
});
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": ".*",
    })
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
	})
}
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 = ".*",
        },
    });
});
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.applyValue(getEventOrchestrationsResult -> getEventOrchestrationsResult.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());
    }
}
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$
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>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]func GetEventOrchestrations(ctx *Context, args *GetEventOrchestrationsArgs, opts ...InvokeOption) (*GetEventOrchestrationsResult, error)
func GetEventOrchestrationsOutput(ctx *Context, args *GetEventOrchestrationsOutputArgs, opts ...InvokeOption) GetEventOrchestrationsResultOutput> 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)
}public static CompletableFuture<GetEventOrchestrationsResult> getEventOrchestrations(GetEventOrchestrationsArgs args, InvokeOptions options)
public static Output<GetEventOrchestrationsResult> getEventOrchestrations(GetEventOrchestrationsArgs args, InvokeOptions options)
fn::invoke:
  function: pagerduty:index/getEventOrchestrations:getEventOrchestrations
  arguments:
    # arguments dictionaryThe following arguments are supported:
- NameFilter string
- The regex name of Global Event Orchestrations to find in the PagerDuty API.
- NameFilter string
- The regex name of Global Event Orchestrations to find in the PagerDuty API.
- nameFilter String
- The regex name of Global Event Orchestrations to find in the PagerDuty API.
- nameFilter string
- The regex name of Global Event Orchestrations to find in the PagerDuty API.
- name_filter str
- The regex name of Global Event Orchestrations to find in the PagerDuty API.
- nameFilter String
- The regex name of Global Event Orchestrations to find in the PagerDuty API.
getEventOrchestrations Result
The following output properties are available:
- EventOrchestrations List<GetEvent Orchestrations Event Orchestration> 
- The list of the Event Orchestrations with a name that matches the name_filterargument.
- 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 []GetEvent Orchestrations Event Orchestration 
- The list of the Event Orchestrations with a name that matches the name_filterargument.
- 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<GetEvent Orchestrations Event Orchestration> 
- The list of the Event Orchestrations with a name that matches the name_filterargument.
- 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 GetEvent Orchestrations Event Orchestration[] 
- The list of the Event Orchestrations with a name that matches the name_filterargument.
- 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[GetEvent Orchestrations Event Orchestration] 
- The list of the Event Orchestrations with a name that matches the name_filterargument.
- 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_filterargument.
- 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 string
- ID of the integration
- Integrations
List<GetEvent Orchestrations Event Orchestration Integration> 
- A list of integrations for the Event Orchestration.
- Name string
- The name of the found Event Orchestration.
- Id string
- ID of the integration
- Integrations
[]GetEvent Orchestrations Event Orchestration Integration 
- A list of integrations for the Event Orchestration.
- Name string
- The name of the found Event Orchestration.
- id String
- ID of the integration
- integrations
List<GetEvent Orchestrations Event Orchestration Integration> 
- A list of integrations for the Event Orchestration.
- name String
- The name of the found Event Orchestration.
- id string
- ID of the integration
- integrations
GetEvent Orchestrations Event Orchestration Integration[] 
- A list of integrations for the Event Orchestration.
- name string
- The name of the found Event Orchestration.
- id str
- ID of the integration
- integrations
Sequence[GetEvent Orchestrations Event Orchestration Integration] 
- A list of integrations for the Event Orchestration.
- name str
- The name of the found Event Orchestration.
- id String
- ID of the integration
- integrations List<Property Map>
- A list of integrations for the Event Orchestration.
- name String
- The name of the found Event Orchestration.
GetEventOrchestrationsEventOrchestrationIntegration     
- Id string
- ID of the integration
- Label string
- Parameters
List<GetEvent Orchestrations Event Orchestration Integration Parameter> 
- A single-item list containing a parameter object describing the integration
- Id string
- ID of the integration
- Label string
- Parameters
[]GetEvent Orchestrations Event Orchestration Integration Parameter 
- A single-item list containing a parameter object describing the integration
- id String
- ID of the integration
- label String
- parameters
List<GetEvent Orchestrations Event Orchestration Integration Parameter> 
- A single-item list containing a parameter object describing the integration
- id string
- ID of the integration
- label string
- parameters
GetEvent Orchestrations Event Orchestration Integration Parameter[] 
- A single-item list containing a parameter object describing the integration
- id str
- ID of the integration
- label str
- parameters
Sequence[GetEvent Orchestrations Event Orchestration Integration Parameter] 
- A single-item list containing a parameter object describing the integration
- id String
- ID of the integration
- label String
- parameters List<Property Map>
- A single-item list containing a parameter object describing the integration
GetEventOrchestrationsEventOrchestrationIntegrationParameter      
- RoutingKey string
- Routing key that routes to this Orchestration.
- Type string
- Type of the routing key. globalis the default type.
- RoutingKey string
- Routing key that routes to this Orchestration.
- Type string
- Type of the routing key. globalis the default type.
- routingKey String
- Routing key that routes to this Orchestration.
- type String
- Type of the routing key. globalis the default type.
- routingKey string
- Routing key that routes to this Orchestration.
- type string
- Type of the routing key. globalis the default type.
- routing_key str
- Routing key that routes to this Orchestration.
- type str
- Type of the routing key. globalis the default type.
- routingKey String
- Routing key that routes to this Orchestration.
- type String
- Type of the routing key. globalis the default type.
Package Details
- Repository
- PagerDuty pulumi/pulumi-pagerduty
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the pagerdutyTerraform Provider.