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: {}
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 string
- The unique name of the resource.
- args EventOrchestrationGlobalCacheVariableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args EventOrchestrationGlobalCacheVariableArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EventOrchestrationGlobalCacheVariableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
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")
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",
});
type: pagerduty:EventOrchestrationGlobalCacheVariable
properties:
    conditions:
        - expression: string
    configuration:
        dataType: string
        regex: string
        source: string
        ttlSeconds: 0
        type: string
    disabled: false
    eventOrchestration: string
    name: string
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
EventOrchestration Global Cache Variable Configuration 
- A configuration object to define what and how values will be stored in the Cache Variable.
- EventOrchestration string
- ID of the Global Event Orchestration to which this Cache Variable belongs.
- Conditions
List<EventOrchestration Global Cache Variable Condition> 
- 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.typeisrecent_valueortrigger_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
EventOrchestration Global Cache Variable Configuration Args 
- A configuration object to define what and how values will be stored in the Cache Variable.
- EventOrchestration string
- ID of the Global Event Orchestration to which this Cache Variable belongs.
- Conditions
[]EventOrchestration Global Cache Variable Condition Args 
- 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.typeisrecent_valueortrigger_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
EventOrchestration Global Cache Variable Configuration 
- A configuration object to define what and how values will be stored in the Cache Variable.
- eventOrchestration String
- ID of the Global Event Orchestration to which this Cache Variable belongs.
- conditions
List<EventOrchestration Global Cache Variable Condition> 
- 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.typeisrecent_valueortrigger_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
EventOrchestration Global Cache Variable Configuration 
- A configuration object to define what and how values will be stored in the Cache Variable.
- eventOrchestration string
- ID of the Global Event Orchestration to which this Cache Variable belongs.
- conditions
EventOrchestration Global Cache Variable Condition[] 
- 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.typeisrecent_valueortrigger_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
EventOrchestration Global Cache Variable Configuration Args 
- A configuration object to define what and how values will be stored in the Cache Variable.
- event_orchestration str
- ID of the Global Event Orchestration to which this Cache Variable belongs.
- conditions
Sequence[EventOrchestration Global Cache Variable Condition Args] 
- 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.typeisrecent_valueortrigger_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 Property Map
- A configuration object to define what and how values will be stored in the Cache Variable.
- eventOrchestration 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.typeisrecent_valueortrigger_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) -> EventOrchestrationGlobalCacheVariablefunc 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Conditions
List<EventOrchestration Global Cache Variable Condition> 
- 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.typeisrecent_valueortrigger_event_count.
- Configuration
EventOrchestration Global Cache Variable Configuration 
- 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 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
[]EventOrchestration Global Cache Variable Condition Args 
- 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.typeisrecent_valueortrigger_event_count.
- Configuration
EventOrchestration Global Cache Variable Configuration Args 
- 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 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<EventOrchestration Global Cache Variable Condition> 
- 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.typeisrecent_valueortrigger_event_count.
- configuration
EventOrchestration Global Cache Variable Configuration 
- 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 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
EventOrchestration Global Cache Variable Condition[] 
- 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.typeisrecent_valueortrigger_event_count.
- configuration
EventOrchestration Global Cache Variable Configuration 
- 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 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[EventOrchestration Global Cache Variable Condition Args] 
- 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.typeisrecent_valueortrigger_event_count.
- configuration
EventOrchestration Global Cache Variable Configuration Args 
- 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 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.typeisrecent_valueortrigger_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 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 string
- A PCL condition string.
- Expression string
- A PCL condition string.
- expression String
- A PCL condition string.
- expression string
- A PCL condition string.
- expression str
- A PCL condition string.
- expression String
- A PCL condition string.
EventOrchestrationGlobalCacheVariableConfiguration, EventOrchestrationGlobalCacheVariableConfigurationArgs            
- Type string
- The type of value to store into the Cache Variable. Can be one of: recent_value,trigger_event_countorexternal_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 sourceargument. This field is only used whentypeisrecent_value
- Source string
- The path to the event field where the regexwill be applied to extract a value. You can use any valid PCL path. This field is only used whentypeisrecent_value
- TtlSeconds int
- The number of seconds indicating how long to count incoming trigger events for. This field is only used when typeistrigger_event_countorexternal_data
- Type string
- The type of value to store into the Cache Variable. Can be one of: recent_value,trigger_event_countorexternal_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 sourceargument. This field is only used whentypeisrecent_value
- Source string
- The path to the event field where the regexwill be applied to extract a value. You can use any valid PCL path. This field is only used whentypeisrecent_value
- TtlSeconds int
- The number of seconds indicating how long to count incoming trigger events for. This field is only used when typeistrigger_event_countorexternal_data
- type String
- The type of value to store into the Cache Variable. Can be one of: recent_value,trigger_event_countorexternal_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 sourceargument. This field is only used whentypeisrecent_value
- source String
- The path to the event field where the regexwill be applied to extract a value. You can use any valid PCL path. This field is only used whentypeisrecent_value
- ttlSeconds Integer
- The number of seconds indicating how long to count incoming trigger events for. This field is only used when typeistrigger_event_countorexternal_data
- type string
- The type of value to store into the Cache Variable. Can be one of: recent_value,trigger_event_countorexternal_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 sourceargument. This field is only used whentypeisrecent_value
- source string
- The path to the event field where the regexwill be applied to extract a value. You can use any valid PCL path. This field is only used whentypeisrecent_value
- ttlSeconds number
- The number of seconds indicating how long to count incoming trigger events for. This field is only used when typeistrigger_event_countorexternal_data
- type str
- The type of value to store into the Cache Variable. Can be one of: recent_value,trigger_event_countorexternal_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 sourceargument. This field is only used whentypeisrecent_value
- source str
- The path to the event field where the regexwill be applied to extract a value. You can use any valid PCL path. This field is only used whentypeisrecent_value
- ttl_seconds int
- The number of seconds indicating how long to count incoming trigger events for. This field is only used when typeistrigger_event_countorexternal_data
- type String
- The type of value to store into the Cache Variable. Can be one of: recent_value,trigger_event_countorexternal_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 sourceargument. This field is only used whentypeisrecent_value
- source String
- The path to the event field where the regexwill be applied to extract a value. You can use any valid PCL path. This field is only used whentypeisrecent_value
- ttlSeconds Number
- The number of seconds indicating how long to count incoming trigger events for. This field is only used when typeistrigger_event_countorexternal_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
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 pagerdutyTerraform Provider.