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

pagerduty.EventOrchestrationGlobalCacheVariable

Explore with Pulumi AI

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

Example of configuring a Cache Variable for a Global Event Orchestration

This example shows creating a global Event Orchestration and a Cache Variable. All events that have the event.source field will have its source value stored in this Cache Variable, and appended as a note for the subsequent incident created by this Event Orchestration.

Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
  databaseTeam:
    type: pagerduty:Team
    name: database_team
    properties:
      name: Database Team
  eventOrchestration:
    type: pagerduty:EventOrchestration
    name: event_orchestration
    properties:
      name: Example Orchestration
      team: ${databaseTeam.id}
  recentHost:
    type: pagerduty:EventOrchestrationGlobalCacheVariable
    name: recent_host
    properties:
      eventOrchestration: ${eventOrchestration.id}
      name: recent_host
      conditions:
        - expression: event.source exists
      configuration:
        type: recent_value
        source: event.source
        regex: .*
  hostIgnoreList:
    type: pagerduty:EventOrchestrationServiceCacheVariable
    name: host_ignore_list
    properties:
      eventOrchestration: ${eventOrchestration.id}
      name: host_ignore_list
      configuration:
        type: external_data
        dataType: string
        ttlSeconds: 3000
  global:
    type: pagerduty:EventOrchestrationGlobal
    properties:
      eventOrchestration: ${eventOrchestration.id}
      sets:
        - id: start
          rules:
            - label: Drop events originating from hosts on the ignore list
              conditions:
                - expression: cache_var.host_ignore_list matches part event.custom_details.host
              actions:
                drop: true
            - label: Always annotate the incident with the event source for all events
              actions:
                annotate: 'Last time, we saw this incident occur on host: {{cache_var.recent_host}}'
      catchAll:
        actions: {}
Copy

Create EventOrchestrationGlobalCacheVariable Resource

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

Constructor syntax

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

@overload
def EventOrchestrationGlobalCacheVariable(resource_name: str,
                                          opts: Optional[ResourceOptions] = None,
                                          configuration: Optional[EventOrchestrationGlobalCacheVariableConfigurationArgs] = None,
                                          event_orchestration: Optional[str] = None,
                                          conditions: Optional[Sequence[EventOrchestrationGlobalCacheVariableConditionArgs]] = None,
                                          disabled: Optional[bool] = None,
                                          name: Optional[str] = None)
func NewEventOrchestrationGlobalCacheVariable(ctx *Context, name string, args EventOrchestrationGlobalCacheVariableArgs, opts ...ResourceOption) (*EventOrchestrationGlobalCacheVariable, error)
public EventOrchestrationGlobalCacheVariable(string name, EventOrchestrationGlobalCacheVariableArgs args, CustomResourceOptions? opts = null)
public EventOrchestrationGlobalCacheVariable(String name, EventOrchestrationGlobalCacheVariableArgs args)
public EventOrchestrationGlobalCacheVariable(String name, EventOrchestrationGlobalCacheVariableArgs args, CustomResourceOptions options)
type: pagerduty:EventOrchestrationGlobalCacheVariable
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. EventOrchestrationGlobalCacheVariableArgs
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. EventOrchestrationGlobalCacheVariableArgs
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. EventOrchestrationGlobalCacheVariableArgs
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. EventOrchestrationGlobalCacheVariableArgs
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. EventOrchestrationGlobalCacheVariableArgs
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 eventOrchestrationGlobalCacheVariableResource = new Pagerduty.EventOrchestrationGlobalCacheVariable("eventOrchestrationGlobalCacheVariableResource", new()
{
    Configuration = new Pagerduty.Inputs.EventOrchestrationGlobalCacheVariableConfigurationArgs
    {
        Type = "string",
        DataType = "string",
        Regex = "string",
        Source = "string",
        TtlSeconds = 0,
    },
    EventOrchestration = "string",
    Conditions = new[]
    {
        new Pagerduty.Inputs.EventOrchestrationGlobalCacheVariableConditionArgs
        {
            Expression = "string",
        },
    },
    Disabled = false,
    Name = "string",
});
Copy
example, err := pagerduty.NewEventOrchestrationGlobalCacheVariable(ctx, "eventOrchestrationGlobalCacheVariableResource", &pagerduty.EventOrchestrationGlobalCacheVariableArgs{
	Configuration: &pagerduty.EventOrchestrationGlobalCacheVariableConfigurationArgs{
		Type:       pulumi.String("string"),
		DataType:   pulumi.String("string"),
		Regex:      pulumi.String("string"),
		Source:     pulumi.String("string"),
		TtlSeconds: pulumi.Int(0),
	},
	EventOrchestration: pulumi.String("string"),
	Conditions: pagerduty.EventOrchestrationGlobalCacheVariableConditionArray{
		&pagerduty.EventOrchestrationGlobalCacheVariableConditionArgs{
			Expression: pulumi.String("string"),
		},
	},
	Disabled: pulumi.Bool(false),
	Name:     pulumi.String("string"),
})
Copy
var eventOrchestrationGlobalCacheVariableResource = new EventOrchestrationGlobalCacheVariable("eventOrchestrationGlobalCacheVariableResource", EventOrchestrationGlobalCacheVariableArgs.builder()
    .configuration(EventOrchestrationGlobalCacheVariableConfigurationArgs.builder()
        .type("string")
        .dataType("string")
        .regex("string")
        .source("string")
        .ttlSeconds(0)
        .build())
    .eventOrchestration("string")
    .conditions(EventOrchestrationGlobalCacheVariableConditionArgs.builder()
        .expression("string")
        .build())
    .disabled(false)
    .name("string")
    .build());
Copy
event_orchestration_global_cache_variable_resource = pagerduty.EventOrchestrationGlobalCacheVariable("eventOrchestrationGlobalCacheVariableResource",
    configuration={
        "type": "string",
        "data_type": "string",
        "regex": "string",
        "source": "string",
        "ttl_seconds": 0,
    },
    event_orchestration="string",
    conditions=[{
        "expression": "string",
    }],
    disabled=False,
    name="string")
Copy
const eventOrchestrationGlobalCacheVariableResource = new pagerduty.EventOrchestrationGlobalCacheVariable("eventOrchestrationGlobalCacheVariableResource", {
    configuration: {
        type: "string",
        dataType: "string",
        regex: "string",
        source: "string",
        ttlSeconds: 0,
    },
    eventOrchestration: "string",
    conditions: [{
        expression: "string",
    }],
    disabled: false,
    name: "string",
});
Copy
type: pagerduty:EventOrchestrationGlobalCacheVariable
properties:
    conditions:
        - expression: string
    configuration:
        dataType: string
        regex: string
        source: string
        ttlSeconds: 0
        type: string
    disabled: false
    eventOrchestration: string
    name: string
Copy

EventOrchestrationGlobalCacheVariable 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 EventOrchestrationGlobalCacheVariable resource accepts the following input properties:

Configuration This property is required. EventOrchestrationGlobalCacheVariableConfiguration
A configuration object to define what and how values will be stored in the Cache Variable.
EventOrchestration
This property is required.
Changes to this property will trigger replacement.
string
ID of the Global Event Orchestration to which this Cache Variable belongs.
Conditions List<EventOrchestrationGlobalCacheVariableCondition>
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 Global Event Orchestration.
Configuration This property is required. EventOrchestrationGlobalCacheVariableConfigurationArgs
A configuration object to define what and how values will be stored in the Cache Variable.
EventOrchestration
This property is required.
Changes to this property will trigger replacement.
string
ID of the Global Event Orchestration to which this Cache Variable belongs.
Conditions []EventOrchestrationGlobalCacheVariableConditionArgs
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 Global Event Orchestration.
configuration This property is required. EventOrchestrationGlobalCacheVariableConfiguration
A configuration object to define what and how values will be stored in the Cache Variable.
eventOrchestration
This property is required.
Changes to this property will trigger replacement.
String
ID of the Global Event Orchestration to which this Cache Variable belongs.
conditions List<EventOrchestrationGlobalCacheVariableCondition>
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 Global Event Orchestration.
configuration This property is required. EventOrchestrationGlobalCacheVariableConfiguration
A configuration object to define what and how values will be stored in the Cache Variable.
eventOrchestration
This property is required.
Changes to this property will trigger replacement.
string
ID of the Global Event Orchestration to which this Cache Variable belongs.
conditions EventOrchestrationGlobalCacheVariableCondition[]
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 Global Event Orchestration.
configuration This property is required. EventOrchestrationGlobalCacheVariableConfigurationArgs
A configuration object to define what and how values will be stored in the Cache Variable.
event_orchestration
This property is required.
Changes to this property will trigger replacement.
str
ID of the Global Event Orchestration to which this Cache Variable belongs.
conditions Sequence[EventOrchestrationGlobalCacheVariableConditionArgs]
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 Global 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.
eventOrchestration
This property is required.
Changes to this property will trigger replacement.
String
ID of the Global 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 Global Event Orchestration.

Outputs

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

Get an existing EventOrchestrationGlobalCacheVariable 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?: EventOrchestrationGlobalCacheVariableState, opts?: CustomResourceOptions): EventOrchestrationGlobalCacheVariable
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        conditions: Optional[Sequence[EventOrchestrationGlobalCacheVariableConditionArgs]] = None,
        configuration: Optional[EventOrchestrationGlobalCacheVariableConfigurationArgs] = None,
        disabled: Optional[bool] = None,
        event_orchestration: Optional[str] = None,
        name: Optional[str] = None) -> EventOrchestrationGlobalCacheVariable
func GetEventOrchestrationGlobalCacheVariable(ctx *Context, name string, id IDInput, state *EventOrchestrationGlobalCacheVariableState, opts ...ResourceOption) (*EventOrchestrationGlobalCacheVariable, error)
public static EventOrchestrationGlobalCacheVariable Get(string name, Input<string> id, EventOrchestrationGlobalCacheVariableState? state, CustomResourceOptions? opts = null)
public static EventOrchestrationGlobalCacheVariable get(String name, Output<String> id, EventOrchestrationGlobalCacheVariableState state, CustomResourceOptions options)
resources:  _:    type: pagerduty:EventOrchestrationGlobalCacheVariable    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<EventOrchestrationGlobalCacheVariableCondition>
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 EventOrchestrationGlobalCacheVariableConfiguration
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.
EventOrchestration Changes to this property will trigger replacement. string
ID of the Global Event Orchestration to which this Cache Variable belongs.
Name string
Name of the Cache Variable associated with the Global Event Orchestration.
Conditions []EventOrchestrationGlobalCacheVariableConditionArgs
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 EventOrchestrationGlobalCacheVariableConfigurationArgs
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.
EventOrchestration Changes to this property will trigger replacement. string
ID of the Global Event Orchestration to which this Cache Variable belongs.
Name string
Name of the Cache Variable associated with the Global Event Orchestration.
conditions List<EventOrchestrationGlobalCacheVariableCondition>
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 EventOrchestrationGlobalCacheVariableConfiguration
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.
eventOrchestration Changes to this property will trigger replacement. String
ID of the Global Event Orchestration to which this Cache Variable belongs.
name String
Name of the Cache Variable associated with the Global Event Orchestration.
conditions EventOrchestrationGlobalCacheVariableCondition[]
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 EventOrchestrationGlobalCacheVariableConfiguration
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.
eventOrchestration Changes to this property will trigger replacement. string
ID of the Global Event Orchestration to which this Cache Variable belongs.
name string
Name of the Cache Variable associated with the Global Event Orchestration.
conditions Sequence[EventOrchestrationGlobalCacheVariableConditionArgs]
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 EventOrchestrationGlobalCacheVariableConfigurationArgs
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.
event_orchestration Changes to this property will trigger replacement. str
ID of the Global Event Orchestration to which this Cache Variable belongs.
name str
Name of the Cache Variable associated with the Global Event Orchestration.
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.
eventOrchestration Changes to this property will trigger replacement. String
ID of the Global Event Orchestration to which this Cache Variable belongs.
name String
Name of the Cache Variable associated with the Global Event Orchestration.

Supporting Types

EventOrchestrationGlobalCacheVariableCondition
, EventOrchestrationGlobalCacheVariableConditionArgs

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.

EventOrchestrationGlobalCacheVariableConfiguration
, EventOrchestrationGlobalCacheVariableConfigurationArgs

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 Global Event Orchestration ID followed by the Cache Variable ID, e.g.

$ pulumi import pagerduty:index/eventOrchestrationGlobalCacheVariable:EventOrchestrationGlobalCacheVariable cache_variable 5e7110bf-0ee7-429e-9724-34ed1fe15ac3: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.