1. Packages
  2. Pagerduty Provider
  3. API Docs
  4. EventOrchestrationServiceCacheVariable
PagerDuty v4.22.1 published on Friday, Mar 21, 2025 by Pulumi

pagerduty.EventOrchestrationServiceCacheVariable

Explore with Pulumi AI

A Cache Variable can be created on a Service Event Orchestration, in order to temporarily store event data to be referenced later within the Service Event Orchestration

Example of configuring a Cache Variable for a Service Event Orchestration

This example shows creating a service Event Orchestration and a Cache Variable. This Cache Variable will count and store the number of trigger events with ‘database’ in its title. Then all alerts sent to this Event Orchestration will have its severity upped to ‘critical’ if the count has reached at least 5 triggers within the last 1 minute.

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

const databaseTeam = new pagerduty.Team("database_team", {name: "Database Team"});
const user1 = new pagerduty.User("user_1", {
    name: "Earline Greenholt",
    email: "125.greenholt.earline@graham.name",
    teams: [databaseTeam.id],
});
const dbEp = new pagerduty.EscalationPolicy("db_ep", {
    name: "Database Escalation Policy",
    numLoops: 2,
    rules: [{
        escalationDelayInMinutes: 10,
        targets: [{
            type: "user",
            id: user1.id,
        }],
    }],
});
const svc = new pagerduty.Service("svc", {
    name: "My Database Service",
    autoResolveTimeout: "14400",
    acknowledgementTimeout: "600",
    escalationPolicy: dbEp.id,
    alertCreation: "create_alerts_and_incidents",
});
const numDbTriggers = new pagerduty.EventOrchestrationServiceCacheVariable("num_db_triggers", {
    service: svc.id,
    name: "num_db_triggers",
    conditions: [{
        expression: "event.summary matches part 'database'",
    }],
    configuration: {
        type: "trigger_event_count",
        ttlSeconds: 60,
    },
});
const isMaintenance = new pagerduty.EventOrchestrationServiceCacheVariable("is_maintenance", {
    service: svc.id,
    name: "is_maintenance",
    configuration: {
        type: "external_data",
        dataType: "boolean",
        ttlSeconds: 7200,
    },
});
const eventOrchestration = new pagerduty.EventOrchestrationService("event_orchestration", {
    service: svc.id,
    enableEventOrchestrationForService: true,
    sets: [{
        id: "start",
        rules: [
            {
                label: "Suppress alerts if the service is in maintenance",
                conditions: [{
                    expression: "cache_var.is_maintenance == true",
                }],
                actions: {
                    suppress: true,
                },
            },
            {
                label: "Set severity to critical if we see at least 5 triggers on the DB within the last 1 minute",
                conditions: [{
                    expression: "cache_var.num_db_triggers >= 5",
                }],
                actions: {
                    severity: "critical",
                },
            },
        ],
    }],
    catchAll: {
        actions: {},
    },
});
Copy
import pulumi
import pulumi_pagerduty as pagerduty

database_team = pagerduty.Team("database_team", name="Database Team")
user1 = pagerduty.User("user_1",
    name="Earline Greenholt",
    email="125.greenholt.earline@graham.name",
    teams=[database_team.id])
db_ep = pagerduty.EscalationPolicy("db_ep",
    name="Database Escalation Policy",
    num_loops=2,
    rules=[{
        "escalation_delay_in_minutes": 10,
        "targets": [{
            "type": "user",
            "id": user1.id,
        }],
    }])
svc = pagerduty.Service("svc",
    name="My Database Service",
    auto_resolve_timeout="14400",
    acknowledgement_timeout="600",
    escalation_policy=db_ep.id,
    alert_creation="create_alerts_and_incidents")
num_db_triggers = pagerduty.EventOrchestrationServiceCacheVariable("num_db_triggers",
    service=svc.id,
    name="num_db_triggers",
    conditions=[{
        "expression": "event.summary matches part 'database'",
    }],
    configuration={
        "type": "trigger_event_count",
        "ttl_seconds": 60,
    })
is_maintenance = pagerduty.EventOrchestrationServiceCacheVariable("is_maintenance",
    service=svc.id,
    name="is_maintenance",
    configuration={
        "type": "external_data",
        "data_type": "boolean",
        "ttl_seconds": 7200,
    })
event_orchestration = pagerduty.EventOrchestrationService("event_orchestration",
    service=svc.id,
    enable_event_orchestration_for_service=True,
    sets=[{
        "id": "start",
        "rules": [
            {
                "label": "Suppress alerts if the service is in maintenance",
                "conditions": [{
                    "expression": "cache_var.is_maintenance == true",
                }],
                "actions": {
                    "suppress": True,
                },
            },
            {
                "label": "Set severity to critical if we see at least 5 triggers on the DB within the last 1 minute",
                "conditions": [{
                    "expression": "cache_var.num_db_triggers >= 5",
                }],
                "actions": {
                    "severity": "critical",
                },
            },
        ],
    }],
    catch_all={
        "actions": {},
    })
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 {
		databaseTeam, err := pagerduty.NewTeam(ctx, "database_team", &pagerduty.TeamArgs{
			Name: pulumi.String("Database Team"),
		})
		if err != nil {
			return err
		}
		user1, err := pagerduty.NewUser(ctx, "user_1", &pagerduty.UserArgs{
			Name:  pulumi.String("Earline Greenholt"),
			Email: pulumi.String("125.greenholt.earline@graham.name"),
			Teams: pulumi.StringArray{
				databaseTeam.ID(),
			},
		})
		if err != nil {
			return err
		}
		dbEp, err := pagerduty.NewEscalationPolicy(ctx, "db_ep", &pagerduty.EscalationPolicyArgs{
			Name:     pulumi.String("Database Escalation Policy"),
			NumLoops: pulumi.Int(2),
			Rules: pagerduty.EscalationPolicyRuleArray{
				&pagerduty.EscalationPolicyRuleArgs{
					EscalationDelayInMinutes: pulumi.Int(10),
					Targets: pagerduty.EscalationPolicyRuleTargetArray{
						&pagerduty.EscalationPolicyRuleTargetArgs{
							Type: pulumi.String("user"),
							Id:   user1.ID(),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		svc, err := pagerduty.NewService(ctx, "svc", &pagerduty.ServiceArgs{
			Name:                   pulumi.String("My Database Service"),
			AutoResolveTimeout:     pulumi.String("14400"),
			AcknowledgementTimeout: pulumi.String("600"),
			EscalationPolicy:       dbEp.ID(),
			AlertCreation:          pulumi.String("create_alerts_and_incidents"),
		})
		if err != nil {
			return err
		}
		_, err = pagerduty.NewEventOrchestrationServiceCacheVariable(ctx, "num_db_triggers", &pagerduty.EventOrchestrationServiceCacheVariableArgs{
			Service: svc.ID(),
			Name:    pulumi.String("num_db_triggers"),
			Conditions: pagerduty.EventOrchestrationServiceCacheVariableConditionArray{
				&pagerduty.EventOrchestrationServiceCacheVariableConditionArgs{
					Expression: pulumi.String("event.summary matches part 'database'"),
				},
			},
			Configuration: &pagerduty.EventOrchestrationServiceCacheVariableConfigurationArgs{
				Type:       pulumi.String("trigger_event_count"),
				TtlSeconds: pulumi.Int(60),
			},
		})
		if err != nil {
			return err
		}
		_, err = pagerduty.NewEventOrchestrationServiceCacheVariable(ctx, "is_maintenance", &pagerduty.EventOrchestrationServiceCacheVariableArgs{
			Service: svc.ID(),
			Name:    pulumi.String("is_maintenance"),
			Configuration: &pagerduty.EventOrchestrationServiceCacheVariableConfigurationArgs{
				Type:       pulumi.String("external_data"),
				DataType:   pulumi.String("boolean"),
				TtlSeconds: pulumi.Int(7200),
			},
		})
		if err != nil {
			return err
		}
		_, err = pagerduty.NewEventOrchestrationService(ctx, "event_orchestration", &pagerduty.EventOrchestrationServiceArgs{
			Service:                            svc.ID(),
			EnableEventOrchestrationForService: pulumi.Bool(true),
			Sets: pagerduty.EventOrchestrationServiceSetArray{
				&pagerduty.EventOrchestrationServiceSetArgs{
					Id: pulumi.String("start"),
					Rules: pagerduty.EventOrchestrationServiceSetRuleArray{
						&pagerduty.EventOrchestrationServiceSetRuleArgs{
							Label: pulumi.String("Suppress alerts if the service is in maintenance"),
							Conditions: pagerduty.EventOrchestrationServiceSetRuleConditionArray{
								&pagerduty.EventOrchestrationServiceSetRuleConditionArgs{
									Expression: pulumi.String("cache_var.is_maintenance == true"),
								},
							},
							Actions: &pagerduty.EventOrchestrationServiceSetRuleActionsArgs{
								Suppress: pulumi.Bool(true),
							},
						},
						&pagerduty.EventOrchestrationServiceSetRuleArgs{
							Label: pulumi.String("Set severity to critical if we see at least 5 triggers on the DB within the last 1 minute"),
							Conditions: pagerduty.EventOrchestrationServiceSetRuleConditionArray{
								&pagerduty.EventOrchestrationServiceSetRuleConditionArgs{
									Expression: pulumi.String("cache_var.num_db_triggers >= 5"),
								},
							},
							Actions: &pagerduty.EventOrchestrationServiceSetRuleActionsArgs{
								Severity: pulumi.String("critical"),
							},
						},
					},
				},
			},
			CatchAll: &pagerduty.EventOrchestrationServiceCatchAllArgs{
				Actions: &pagerduty.EventOrchestrationServiceCatchAllActionsArgs{},
			},
		})
		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 databaseTeam = new Pagerduty.Team("database_team", new()
    {
        Name = "Database Team",
    });

    var user1 = new Pagerduty.User("user_1", new()
    {
        Name = "Earline Greenholt",
        Email = "125.greenholt.earline@graham.name",
        Teams = new[]
        {
            databaseTeam.Id,
        },
    });

    var dbEp = new Pagerduty.EscalationPolicy("db_ep", new()
    {
        Name = "Database Escalation Policy",
        NumLoops = 2,
        Rules = new[]
        {
            new Pagerduty.Inputs.EscalationPolicyRuleArgs
            {
                EscalationDelayInMinutes = 10,
                Targets = new[]
                {
                    new Pagerduty.Inputs.EscalationPolicyRuleTargetArgs
                    {
                        Type = "user",
                        Id = user1.Id,
                    },
                },
            },
        },
    });

    var svc = new Pagerduty.Service("svc", new()
    {
        Name = "My Database Service",
        AutoResolveTimeout = "14400",
        AcknowledgementTimeout = "600",
        EscalationPolicy = dbEp.Id,
        AlertCreation = "create_alerts_and_incidents",
    });

    var numDbTriggers = new Pagerduty.EventOrchestrationServiceCacheVariable("num_db_triggers", new()
    {
        Service = svc.Id,
        Name = "num_db_triggers",
        Conditions = new[]
        {
            new Pagerduty.Inputs.EventOrchestrationServiceCacheVariableConditionArgs
            {
                Expression = "event.summary matches part 'database'",
            },
        },
        Configuration = new Pagerduty.Inputs.EventOrchestrationServiceCacheVariableConfigurationArgs
        {
            Type = "trigger_event_count",
            TtlSeconds = 60,
        },
    });

    var isMaintenance = new Pagerduty.EventOrchestrationServiceCacheVariable("is_maintenance", new()
    {
        Service = svc.Id,
        Name = "is_maintenance",
        Configuration = new Pagerduty.Inputs.EventOrchestrationServiceCacheVariableConfigurationArgs
        {
            Type = "external_data",
            DataType = "boolean",
            TtlSeconds = 7200,
        },
    });

    var eventOrchestration = new Pagerduty.EventOrchestrationService("event_orchestration", new()
    {
        Service = svc.Id,
        EnableEventOrchestrationForService = true,
        Sets = new[]
        {
            new Pagerduty.Inputs.EventOrchestrationServiceSetArgs
            {
                Id = "start",
                Rules = new[]
                {
                    new Pagerduty.Inputs.EventOrchestrationServiceSetRuleArgs
                    {
                        Label = "Suppress alerts if the service is in maintenance",
                        Conditions = new[]
                        {
                            new Pagerduty.Inputs.EventOrchestrationServiceSetRuleConditionArgs
                            {
                                Expression = "cache_var.is_maintenance == true",
                            },
                        },
                        Actions = new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsArgs
                        {
                            Suppress = true,
                        },
                    },
                    new Pagerduty.Inputs.EventOrchestrationServiceSetRuleArgs
                    {
                        Label = "Set severity to critical if we see at least 5 triggers on the DB within the last 1 minute",
                        Conditions = new[]
                        {
                            new Pagerduty.Inputs.EventOrchestrationServiceSetRuleConditionArgs
                            {
                                Expression = "cache_var.num_db_triggers >= 5",
                            },
                        },
                        Actions = new Pagerduty.Inputs.EventOrchestrationServiceSetRuleActionsArgs
                        {
                            Severity = "critical",
                        },
                    },
                },
            },
        },
        CatchAll = new Pagerduty.Inputs.EventOrchestrationServiceCatchAllArgs
        {
            Actions = null,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.pagerduty.Team;
import com.pulumi.pagerduty.TeamArgs;
import com.pulumi.pagerduty.User;
import com.pulumi.pagerduty.UserArgs;
import com.pulumi.pagerduty.EscalationPolicy;
import com.pulumi.pagerduty.EscalationPolicyArgs;
import com.pulumi.pagerduty.inputs.EscalationPolicyRuleArgs;
import com.pulumi.pagerduty.Service;
import com.pulumi.pagerduty.ServiceArgs;
import com.pulumi.pagerduty.EventOrchestrationServiceCacheVariable;
import com.pulumi.pagerduty.EventOrchestrationServiceCacheVariableArgs;
import com.pulumi.pagerduty.inputs.EventOrchestrationServiceCacheVariableConditionArgs;
import com.pulumi.pagerduty.inputs.EventOrchestrationServiceCacheVariableConfigurationArgs;
import com.pulumi.pagerduty.EventOrchestrationService;
import com.pulumi.pagerduty.EventOrchestrationServiceArgs;
import com.pulumi.pagerduty.inputs.EventOrchestrationServiceSetArgs;
import com.pulumi.pagerduty.inputs.EventOrchestrationServiceCatchAllArgs;
import com.pulumi.pagerduty.inputs.EventOrchestrationServiceCatchAllActionsArgs;
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 databaseTeam = new Team("databaseTeam", TeamArgs.builder()
            .name("Database Team")
            .build());

        var user1 = new User("user1", UserArgs.builder()
            .name("Earline Greenholt")
            .email("125.greenholt.earline@graham.name")
            .teams(databaseTeam.id())
            .build());

        var dbEp = new EscalationPolicy("dbEp", EscalationPolicyArgs.builder()
            .name("Database Escalation Policy")
            .numLoops(2)
            .rules(EscalationPolicyRuleArgs.builder()
                .escalationDelayInMinutes(10)
                .targets(EscalationPolicyRuleTargetArgs.builder()
                    .type("user")
                    .id(user1.id())
                    .build())
                .build())
            .build());

        var svc = new Service("svc", ServiceArgs.builder()
            .name("My Database Service")
            .autoResolveTimeout(14400)
            .acknowledgementTimeout(600)
            .escalationPolicy(dbEp.id())
            .alertCreation("create_alerts_and_incidents")
            .build());

        var numDbTriggers = new EventOrchestrationServiceCacheVariable("numDbTriggers", EventOrchestrationServiceCacheVariableArgs.builder()
            .service(svc.id())
            .name("num_db_triggers")
            .conditions(EventOrchestrationServiceCacheVariableConditionArgs.builder()
                .expression("event.summary matches part 'database'")
                .build())
            .configuration(EventOrchestrationServiceCacheVariableConfigurationArgs.builder()
                .type("trigger_event_count")
                .ttlSeconds(60)
                .build())
            .build());

        var isMaintenance = new EventOrchestrationServiceCacheVariable("isMaintenance", EventOrchestrationServiceCacheVariableArgs.builder()
            .service(svc.id())
            .name("is_maintenance")
            .configuration(EventOrchestrationServiceCacheVariableConfigurationArgs.builder()
                .type("external_data")
                .dataType("boolean")
                .ttlSeconds(7200)
                .build())
            .build());

        var eventOrchestration = new EventOrchestrationService("eventOrchestration", EventOrchestrationServiceArgs.builder()
            .service(svc.id())
            .enableEventOrchestrationForService(true)
            .sets(EventOrchestrationServiceSetArgs.builder()
                .id("start")
                .rules(                
                    EventOrchestrationServiceSetRuleArgs.builder()
                        .label("Suppress alerts if the service is in maintenance")
                        .conditions(EventOrchestrationServiceSetRuleConditionArgs.builder()
                            .expression("cache_var.is_maintenance == true")
                            .build())
                        .actions(EventOrchestrationServiceSetRuleActionsArgs.builder()
                            .suppress(true)
                            .build())
                        .build(),
                    EventOrchestrationServiceSetRuleArgs.builder()
                        .label("Set severity to critical if we see at least 5 triggers on the DB within the last 1 minute")
                        .conditions(EventOrchestrationServiceSetRuleConditionArgs.builder()
                            .expression("cache_var.num_db_triggers >= 5")
                            .build())
                        .actions(EventOrchestrationServiceSetRuleActionsArgs.builder()
                            .severity("critical")
                            .build())
                        .build())
                .build())
            .catchAll(EventOrchestrationServiceCatchAllArgs.builder()
                .actions()
                .build())
            .build());

    }
}
Copy
resources:
  databaseTeam:
    type: pagerduty:Team
    name: database_team
    properties:
      name: Database Team
  user1:
    type: pagerduty:User
    name: user_1
    properties:
      name: Earline Greenholt
      email: 125.greenholt.earline@graham.name
      teams:
        - ${databaseTeam.id}
  dbEp:
    type: pagerduty:EscalationPolicy
    name: db_ep
    properties:
      name: Database Escalation Policy
      numLoops: 2
      rules:
        - escalationDelayInMinutes: 10
          targets:
            - type: user
              id: ${user1.id}
  svc:
    type: pagerduty:Service
    properties:
      name: My Database Service
      autoResolveTimeout: 14400
      acknowledgementTimeout: 600
      escalationPolicy: ${dbEp.id}
      alertCreation: create_alerts_and_incidents
  numDbTriggers:
    type: pagerduty:EventOrchestrationServiceCacheVariable
    name: num_db_triggers
    properties:
      service: ${svc.id}
      name: num_db_triggers
      conditions:
        - expression: event.summary matches part 'database'
      configuration:
        type: trigger_event_count
        ttlSeconds: 60
  isMaintenance:
    type: pagerduty:EventOrchestrationServiceCacheVariable
    name: is_maintenance
    properties:
      service: ${svc.id}
      name: is_maintenance
      configuration:
        type: external_data
        dataType: boolean
        ttlSeconds: 7200
  eventOrchestration:
    type: pagerduty:EventOrchestrationService
    name: event_orchestration
    properties:
      service: ${svc.id}
      enableEventOrchestrationForService: true
      sets:
        - id: start
          rules:
            - label: Suppress alerts if the service is in maintenance
              conditions:
                - expression: cache_var.is_maintenance == true
              actions:
                suppress: true
            - label: Set severity to critical if we see at least 5 triggers on the DB within the last 1 minute
              conditions:
                - expression: cache_var.num_db_triggers >= 5
              actions:
                severity: critical
      catchAll:
        actions: {}
Copy

Create EventOrchestrationServiceCacheVariable Resource

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

Constructor syntax

new EventOrchestrationServiceCacheVariable(name: string, args: EventOrchestrationServiceCacheVariableArgs, opts?: CustomResourceOptions);
@overload
def EventOrchestrationServiceCacheVariable(resource_name: str,
                                           args: EventOrchestrationServiceCacheVariableArgs,
                                           opts: Optional[ResourceOptions] = None)

@overload
def EventOrchestrationServiceCacheVariable(resource_name: str,
                                           opts: Optional[ResourceOptions] = None,
                                           configuration: Optional[EventOrchestrationServiceCacheVariableConfigurationArgs] = None,
                                           service: Optional[str] = None,
                                           conditions: Optional[Sequence[EventOrchestrationServiceCacheVariableConditionArgs]] = None,
                                           disabled: Optional[bool] = None,
                                           name: Optional[str] = None)
func NewEventOrchestrationServiceCacheVariable(ctx *Context, name string, args EventOrchestrationServiceCacheVariableArgs, opts ...ResourceOption) (*EventOrchestrationServiceCacheVariable, error)
public EventOrchestrationServiceCacheVariable(string name, EventOrchestrationServiceCacheVariableArgs args, CustomResourceOptions? opts = null)
public EventOrchestrationServiceCacheVariable(String name, EventOrchestrationServiceCacheVariableArgs args)
public EventOrchestrationServiceCacheVariable(String name, EventOrchestrationServiceCacheVariableArgs args, CustomResourceOptions options)
type: pagerduty:EventOrchestrationServiceCacheVariable
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. EventOrchestrationServiceCacheVariableArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. EventOrchestrationServiceCacheVariableArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. EventOrchestrationServiceCacheVariableArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. EventOrchestrationServiceCacheVariableArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. EventOrchestrationServiceCacheVariableArgs
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 eventOrchestrationServiceCacheVariableResource = new Pagerduty.EventOrchestrationServiceCacheVariable("eventOrchestrationServiceCacheVariableResource", new()
{
    Configuration = new Pagerduty.Inputs.EventOrchestrationServiceCacheVariableConfigurationArgs
    {
        Type = "string",
        DataType = "string",
        Regex = "string",
        Source = "string",
        TtlSeconds = 0,
    },
    Service = "string",
    Conditions = new[]
    {
        new Pagerduty.Inputs.EventOrchestrationServiceCacheVariableConditionArgs
        {
            Expression = "string",
        },
    },
    Disabled = false,
    Name = "string",
});
Copy
example, err := pagerduty.NewEventOrchestrationServiceCacheVariable(ctx, "eventOrchestrationServiceCacheVariableResource", &pagerduty.EventOrchestrationServiceCacheVariableArgs{
	Configuration: &pagerduty.EventOrchestrationServiceCacheVariableConfigurationArgs{
		Type:       pulumi.String("string"),
		DataType:   pulumi.String("string"),
		Regex:      pulumi.String("string"),
		Source:     pulumi.String("string"),
		TtlSeconds: pulumi.Int(0),
	},
	Service: pulumi.String("string"),
	Conditions: pagerduty.EventOrchestrationServiceCacheVariableConditionArray{
		&pagerduty.EventOrchestrationServiceCacheVariableConditionArgs{
			Expression: pulumi.String("string"),
		},
	},
	Disabled: pulumi.Bool(false),
	Name:     pulumi.String("string"),
})
Copy
var eventOrchestrationServiceCacheVariableResource = new EventOrchestrationServiceCacheVariable("eventOrchestrationServiceCacheVariableResource", EventOrchestrationServiceCacheVariableArgs.builder()
    .configuration(EventOrchestrationServiceCacheVariableConfigurationArgs.builder()
        .type("string")
        .dataType("string")
        .regex("string")
        .source("string")
        .ttlSeconds(0)
        .build())
    .service("string")
    .conditions(EventOrchestrationServiceCacheVariableConditionArgs.builder()
        .expression("string")
        .build())
    .disabled(false)
    .name("string")
    .build());
Copy
event_orchestration_service_cache_variable_resource = pagerduty.EventOrchestrationServiceCacheVariable("eventOrchestrationServiceCacheVariableResource",
    configuration={
        "type": "string",
        "data_type": "string",
        "regex": "string",
        "source": "string",
        "ttl_seconds": 0,
    },
    service="string",
    conditions=[{
        "expression": "string",
    }],
    disabled=False,
    name="string")
Copy
const eventOrchestrationServiceCacheVariableResource = new pagerduty.EventOrchestrationServiceCacheVariable("eventOrchestrationServiceCacheVariableResource", {
    configuration: {
        type: "string",
        dataType: "string",
        regex: "string",
        source: "string",
        ttlSeconds: 0,
    },
    service: "string",
    conditions: [{
        expression: "string",
    }],
    disabled: false,
    name: "string",
});
Copy
type: pagerduty:EventOrchestrationServiceCacheVariable
properties:
    conditions:
        - expression: string
    configuration:
        dataType: string
        regex: string
        source: string
        ttlSeconds: 0
        type: string
    disabled: false
    name: string
    service: string
Copy

EventOrchestrationServiceCacheVariable Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The EventOrchestrationServiceCacheVariable resource accepts the following input properties:

Configuration This property is required. EventOrchestrationServiceCacheVariableConfiguration
A configuration object to define what and how values will be stored in the Cache Variable.
Service
This property is required.
Changes to this property will trigger replacement.
string
ID of the Service Event Orchestration to which this Cache Variable belongs.
Conditions List<EventOrchestrationServiceCacheVariableCondition>
Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value. This attribute can only be used when configuration.0.type is recent_value or trigger_event_count.
Disabled bool
Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
Name string
Name of the Cache Variable associated with the Service Event Orchestration.
Configuration This property is required. EventOrchestrationServiceCacheVariableConfigurationArgs
A configuration object to define what and how values will be stored in the Cache Variable.
Service
This property is required.
Changes to this property will trigger replacement.
string
ID of the Service Event Orchestration to which this Cache Variable belongs.
Conditions []EventOrchestrationServiceCacheVariableConditionArgs
Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value. This attribute can only be used when configuration.0.type is recent_value or trigger_event_count.
Disabled bool
Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
Name string
Name of the Cache Variable associated with the Service Event Orchestration.
configuration This property is required. EventOrchestrationServiceCacheVariableConfiguration
A configuration object to define what and how values will be stored in the Cache Variable.
service
This property is required.
Changes to this property will trigger replacement.
String
ID of the Service Event Orchestration to which this Cache Variable belongs.
conditions List<EventOrchestrationServiceCacheVariableCondition>
Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value. This attribute can only be used when configuration.0.type is recent_value or trigger_event_count.
disabled Boolean
Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
name String
Name of the Cache Variable associated with the Service Event Orchestration.
configuration This property is required. EventOrchestrationServiceCacheVariableConfiguration
A configuration object to define what and how values will be stored in the Cache Variable.
service
This property is required.
Changes to this property will trigger replacement.
string
ID of the Service Event Orchestration to which this Cache Variable belongs.
conditions EventOrchestrationServiceCacheVariableCondition[]
Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value. This attribute can only be used when configuration.0.type is recent_value or trigger_event_count.
disabled boolean
Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
name string
Name of the Cache Variable associated with the Service Event Orchestration.
configuration This property is required. EventOrchestrationServiceCacheVariableConfigurationArgs
A configuration object to define what and how values will be stored in the Cache Variable.
service
This property is required.
Changes to this property will trigger replacement.
str
ID of the Service Event Orchestration to which this Cache Variable belongs.
conditions Sequence[EventOrchestrationServiceCacheVariableConditionArgs]
Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value. This attribute can only be used when configuration.0.type is recent_value or trigger_event_count.
disabled bool
Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
name str
Name of the Cache Variable associated with the Service Event Orchestration.
configuration This property is required. Property Map
A configuration object to define what and how values will be stored in the Cache Variable.
service
This property is required.
Changes to this property will trigger replacement.
String
ID of the Service Event Orchestration to which this Cache Variable belongs.
conditions List<Property Map>
Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value. This attribute can only be used when configuration.0.type is recent_value or trigger_event_count.
disabled Boolean
Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
name String
Name of the Cache Variable associated with the Service Event Orchestration.

Outputs

All input properties are implicitly available as output properties. Additionally, the EventOrchestrationServiceCacheVariable 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 EventOrchestrationServiceCacheVariable Resource

Get an existing EventOrchestrationServiceCacheVariable 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?: EventOrchestrationServiceCacheVariableState, opts?: CustomResourceOptions): EventOrchestrationServiceCacheVariable
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        conditions: Optional[Sequence[EventOrchestrationServiceCacheVariableConditionArgs]] = None,
        configuration: Optional[EventOrchestrationServiceCacheVariableConfigurationArgs] = None,
        disabled: Optional[bool] = None,
        name: Optional[str] = None,
        service: Optional[str] = None) -> EventOrchestrationServiceCacheVariable
func GetEventOrchestrationServiceCacheVariable(ctx *Context, name string, id IDInput, state *EventOrchestrationServiceCacheVariableState, opts ...ResourceOption) (*EventOrchestrationServiceCacheVariable, error)
public static EventOrchestrationServiceCacheVariable Get(string name, Input<string> id, EventOrchestrationServiceCacheVariableState? state, CustomResourceOptions? opts = null)
public static EventOrchestrationServiceCacheVariable get(String name, Output<String> id, EventOrchestrationServiceCacheVariableState state, CustomResourceOptions options)
resources:  _:    type: pagerduty:EventOrchestrationServiceCacheVariable    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Conditions List<EventOrchestrationServiceCacheVariableCondition>
Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value. This attribute can only be used when configuration.0.type is recent_value or trigger_event_count.
Configuration EventOrchestrationServiceCacheVariableConfiguration
A configuration object to define what and how values will be stored in the Cache Variable.
Disabled bool
Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
Name string
Name of the Cache Variable associated with the Service Event Orchestration.
Service Changes to this property will trigger replacement. string
ID of the Service Event Orchestration to which this Cache Variable belongs.
Conditions []EventOrchestrationServiceCacheVariableConditionArgs
Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value. This attribute can only be used when configuration.0.type is recent_value or trigger_event_count.
Configuration EventOrchestrationServiceCacheVariableConfigurationArgs
A configuration object to define what and how values will be stored in the Cache Variable.
Disabled bool
Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
Name string
Name of the Cache Variable associated with the Service Event Orchestration.
Service Changes to this property will trigger replacement. string
ID of the Service Event Orchestration to which this Cache Variable belongs.
conditions List<EventOrchestrationServiceCacheVariableCondition>
Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value. This attribute can only be used when configuration.0.type is recent_value or trigger_event_count.
configuration EventOrchestrationServiceCacheVariableConfiguration
A configuration object to define what and how values will be stored in the Cache Variable.
disabled Boolean
Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
name String
Name of the Cache Variable associated with the Service Event Orchestration.
service Changes to this property will trigger replacement. String
ID of the Service Event Orchestration to which this Cache Variable belongs.
conditions EventOrchestrationServiceCacheVariableCondition[]
Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value. This attribute can only be used when configuration.0.type is recent_value or trigger_event_count.
configuration EventOrchestrationServiceCacheVariableConfiguration
A configuration object to define what and how values will be stored in the Cache Variable.
disabled boolean
Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
name string
Name of the Cache Variable associated with the Service Event Orchestration.
service Changes to this property will trigger replacement. string
ID of the Service Event Orchestration to which this Cache Variable belongs.
conditions Sequence[EventOrchestrationServiceCacheVariableConditionArgs]
Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value. This attribute can only be used when configuration.0.type is recent_value or trigger_event_count.
configuration EventOrchestrationServiceCacheVariableConfigurationArgs
A configuration object to define what and how values will be stored in the Cache Variable.
disabled bool
Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
name str
Name of the Cache Variable associated with the Service Event Orchestration.
service Changes to this property will trigger replacement. str
ID of the Service Event Orchestration to which this Cache Variable belongs.
conditions List<Property Map>
Conditions to be evaluated in order to determine whether or not to update the Cache Variable's stored value. This attribute can only be used when configuration.0.type is recent_value or trigger_event_count.
configuration Property Map
A configuration object to define what and how values will be stored in the Cache Variable.
disabled Boolean
Indicates whether the Cache Variable is disabled and would therefore not be evaluated.
name String
Name of the Cache Variable associated with the Service Event Orchestration.
service Changes to this property will trigger replacement. String
ID of the Service Event Orchestration to which this Cache Variable belongs.

Supporting Types

EventOrchestrationServiceCacheVariableCondition
, EventOrchestrationServiceCacheVariableConditionArgs

Expression This property is required. string
A PCL condition string.
Expression This property is required. string
A PCL condition string.
expression This property is required. String
A PCL condition string.
expression This property is required. string
A PCL condition string.
expression This property is required. str
A PCL condition string.
expression This property is required. String
A PCL condition string.

EventOrchestrationServiceCacheVariableConfiguration
, EventOrchestrationServiceCacheVariableConfigurationArgs

Type This property is required. string
The type of value to store into the Cache Variable. Can be one of: recent_value, trigger_event_count or external_data.
DataType string
The type of data that will eventually be set for the Cache Variable via an API request. This field is only used when type is external_data
Regex string
A [RE2 regular expression][4] that will be matched against the field specified via the source argument. This field is only used when type is recent_value
Source string
The path to the event field where the regex will be applied to extract a value. You can use any valid PCL path. This field is only used when type is recent_value
TtlSeconds int
The number of seconds indicating how long to count incoming trigger events for. This field is only used when type is trigger_event_count or external_data
Type This property is required. string
The type of value to store into the Cache Variable. Can be one of: recent_value, trigger_event_count or external_data.
DataType string
The type of data that will eventually be set for the Cache Variable via an API request. This field is only used when type is external_data
Regex string
A [RE2 regular expression][4] that will be matched against the field specified via the source argument. This field is only used when type is recent_value
Source string
The path to the event field where the regex will be applied to extract a value. You can use any valid PCL path. This field is only used when type is recent_value
TtlSeconds int
The number of seconds indicating how long to count incoming trigger events for. This field is only used when type is trigger_event_count or external_data
type This property is required. String
The type of value to store into the Cache Variable. Can be one of: recent_value, trigger_event_count or external_data.
dataType String
The type of data that will eventually be set for the Cache Variable via an API request. This field is only used when type is external_data
regex String
A [RE2 regular expression][4] that will be matched against the field specified via the source argument. This field is only used when type is recent_value
source String
The path to the event field where the regex will be applied to extract a value. You can use any valid PCL path. This field is only used when type is recent_value
ttlSeconds Integer
The number of seconds indicating how long to count incoming trigger events for. This field is only used when type is trigger_event_count or external_data
type This property is required. string
The type of value to store into the Cache Variable. Can be one of: recent_value, trigger_event_count or external_data.
dataType string
The type of data that will eventually be set for the Cache Variable via an API request. This field is only used when type is external_data
regex string
A [RE2 regular expression][4] that will be matched against the field specified via the source argument. This field is only used when type is recent_value
source string
The path to the event field where the regex will be applied to extract a value. You can use any valid PCL path. This field is only used when type is recent_value
ttlSeconds number
The number of seconds indicating how long to count incoming trigger events for. This field is only used when type is trigger_event_count or external_data
type This property is required. str
The type of value to store into the Cache Variable. Can be one of: recent_value, trigger_event_count or external_data.
data_type str
The type of data that will eventually be set for the Cache Variable via an API request. This field is only used when type is external_data
regex str
A [RE2 regular expression][4] that will be matched against the field specified via the source argument. This field is only used when type is recent_value
source str
The path to the event field where the regex will be applied to extract a value. You can use any valid PCL path. This field is only used when type is recent_value
ttl_seconds int
The number of seconds indicating how long to count incoming trigger events for. This field is only used when type is trigger_event_count or external_data
type This property is required. String
The type of value to store into the Cache Variable. Can be one of: recent_value, trigger_event_count or external_data.
dataType String
The type of data that will eventually be set for the Cache Variable via an API request. This field is only used when type is external_data
regex String
A [RE2 regular expression][4] that will be matched against the field specified via the source argument. This field is only used when type is recent_value
source String
The path to the event field where the regex will be applied to extract a value. You can use any valid PCL path. This field is only used when type is recent_value
ttlSeconds Number
The number of seconds indicating how long to count incoming trigger events for. This field is only used when type is trigger_event_count or external_data

Import

Cache Variables can be imported using colon-separated IDs, which is the combination of the Service Event Orchestration ID followed by the Cache Variable ID, e.g.

$ pulumi import pagerduty:index/eventOrchestrationServiceCacheVariable:EventOrchestrationServiceCacheVariable cache_variable PLBP09X:138ed254-3444-44ad-8cc7-701d69def439
Copy

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.