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

pagerduty.ServiceEventRule

Explore with Pulumi AI

Example Usage

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

const example = new pagerduty.Service("example", {
    name: "Checkout API Service",
    autoResolveTimeout: "14400",
    acknowledgementTimeout: "600",
    escalationPolicy: examplePagerdutyEscalationPolicy.id,
    alertCreation: "create_alerts_and_incidents",
});
const foo = new pagerduty.ServiceEventRule("foo", {
    service: example.id,
    position: 0,
    disabled: true,
    conditions: {
        operator: "and",
        subconditions: [{
            operator: "contains",
            parameters: [{
                value: "disk space",
                path: "summary",
            }],
        }],
    },
    variables: [{
        type: "regex",
        name: "Src",
        parameters: [{
            value: "(.*)",
            path: "source",
        }],
    }],
    actions: {
        annotates: [{
            value: "From Terraform",
        }],
        extractions: [
            {
                target: "dedup_key",
                source: "source",
                regex: "(.*)",
            },
            {
                target: "summary",
                template: "Warning: Disk Space Low on {{Src}}",
            },
        ],
    },
});
const bar = new pagerduty.ServiceEventRule("bar", {
    service: fooPagerdutyService.id,
    position: 1,
    disabled: true,
    conditions: {
        operator: "and",
        subconditions: [{
            operator: "contains",
            parameters: [{
                value: "cpu spike",
                path: "summary",
            }],
        }],
    },
    actions: {
        annotates: [{
            value: "From Terraform",
        }],
    },
});
Copy
import pulumi
import pulumi_pagerduty as pagerduty

example = pagerduty.Service("example",
    name="Checkout API Service",
    auto_resolve_timeout="14400",
    acknowledgement_timeout="600",
    escalation_policy=example_pagerduty_escalation_policy["id"],
    alert_creation="create_alerts_and_incidents")
foo = pagerduty.ServiceEventRule("foo",
    service=example.id,
    position=0,
    disabled=True,
    conditions={
        "operator": "and",
        "subconditions": [{
            "operator": "contains",
            "parameters": [{
                "value": "disk space",
                "path": "summary",
            }],
        }],
    },
    variables=[{
        "type": "regex",
        "name": "Src",
        "parameters": [{
            "value": "(.*)",
            "path": "source",
        }],
    }],
    actions={
        "annotates": [{
            "value": "From Terraform",
        }],
        "extractions": [
            {
                "target": "dedup_key",
                "source": "source",
                "regex": "(.*)",
            },
            {
                "target": "summary",
                "template": "Warning: Disk Space Low on {{Src}}",
            },
        ],
    })
bar = pagerduty.ServiceEventRule("bar",
    service=foo_pagerduty_service["id"],
    position=1,
    disabled=True,
    conditions={
        "operator": "and",
        "subconditions": [{
            "operator": "contains",
            "parameters": [{
                "value": "cpu spike",
                "path": "summary",
            }],
        }],
    },
    actions={
        "annotates": [{
            "value": "From Terraform",
        }],
    })
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 {
		example, err := pagerduty.NewService(ctx, "example", &pagerduty.ServiceArgs{
			Name:                   pulumi.String("Checkout API Service"),
			AutoResolveTimeout:     pulumi.String("14400"),
			AcknowledgementTimeout: pulumi.String("600"),
			EscalationPolicy:       pulumi.Any(examplePagerdutyEscalationPolicy.Id),
			AlertCreation:          pulumi.String("create_alerts_and_incidents"),
		})
		if err != nil {
			return err
		}
		_, err = pagerduty.NewServiceEventRule(ctx, "foo", &pagerduty.ServiceEventRuleArgs{
			Service:  example.ID(),
			Position: pulumi.Int(0),
			Disabled: pulumi.Bool(true),
			Conditions: &pagerduty.ServiceEventRuleConditionsArgs{
				Operator: pulumi.String("and"),
				Subconditions: pagerduty.ServiceEventRuleConditionsSubconditionArray{
					&pagerduty.ServiceEventRuleConditionsSubconditionArgs{
						Operator: pulumi.String("contains"),
						Parameters: pagerduty.ServiceEventRuleConditionsSubconditionParameterArray{
							&pagerduty.ServiceEventRuleConditionsSubconditionParameterArgs{
								Value: pulumi.String("disk space"),
								Path:  pulumi.String("summary"),
							},
						},
					},
				},
			},
			Variables: pagerduty.ServiceEventRuleVariableArray{
				&pagerduty.ServiceEventRuleVariableArgs{
					Type: pulumi.String("regex"),
					Name: pulumi.String("Src"),
					Parameters: pagerduty.ServiceEventRuleVariableParameterArray{
						&pagerduty.ServiceEventRuleVariableParameterArgs{
							Value: pulumi.String("(.*)"),
							Path:  pulumi.String("source"),
						},
					},
				},
			},
			Actions: &pagerduty.ServiceEventRuleActionsArgs{
				Annotates: pagerduty.ServiceEventRuleActionsAnnotateArray{
					&pagerduty.ServiceEventRuleActionsAnnotateArgs{
						Value: pulumi.String("From Terraform"),
					},
				},
				Extractions: pagerduty.ServiceEventRuleActionsExtractionArray{
					&pagerduty.ServiceEventRuleActionsExtractionArgs{
						Target: pulumi.String("dedup_key"),
						Source: pulumi.String("source"),
						Regex:  pulumi.String("(.*)"),
					},
					&pagerduty.ServiceEventRuleActionsExtractionArgs{
						Target:   pulumi.String("summary"),
						Template: pulumi.String("Warning: Disk Space Low on {{Src}}"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = pagerduty.NewServiceEventRule(ctx, "bar", &pagerduty.ServiceEventRuleArgs{
			Service:  pulumi.Any(fooPagerdutyService.Id),
			Position: pulumi.Int(1),
			Disabled: pulumi.Bool(true),
			Conditions: &pagerduty.ServiceEventRuleConditionsArgs{
				Operator: pulumi.String("and"),
				Subconditions: pagerduty.ServiceEventRuleConditionsSubconditionArray{
					&pagerduty.ServiceEventRuleConditionsSubconditionArgs{
						Operator: pulumi.String("contains"),
						Parameters: pagerduty.ServiceEventRuleConditionsSubconditionParameterArray{
							&pagerduty.ServiceEventRuleConditionsSubconditionParameterArgs{
								Value: pulumi.String("cpu spike"),
								Path:  pulumi.String("summary"),
							},
						},
					},
				},
			},
			Actions: &pagerduty.ServiceEventRuleActionsArgs{
				Annotates: pagerduty.ServiceEventRuleActionsAnnotateArray{
					&pagerduty.ServiceEventRuleActionsAnnotateArgs{
						Value: pulumi.String("From Terraform"),
					},
				},
			},
		})
		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 example = new Pagerduty.Service("example", new()
    {
        Name = "Checkout API Service",
        AutoResolveTimeout = "14400",
        AcknowledgementTimeout = "600",
        EscalationPolicy = examplePagerdutyEscalationPolicy.Id,
        AlertCreation = "create_alerts_and_incidents",
    });

    var foo = new Pagerduty.ServiceEventRule("foo", new()
    {
        Service = example.Id,
        Position = 0,
        Disabled = true,
        Conditions = new Pagerduty.Inputs.ServiceEventRuleConditionsArgs
        {
            Operator = "and",
            Subconditions = new[]
            {
                new Pagerduty.Inputs.ServiceEventRuleConditionsSubconditionArgs
                {
                    Operator = "contains",
                    Parameters = new[]
                    {
                        new Pagerduty.Inputs.ServiceEventRuleConditionsSubconditionParameterArgs
                        {
                            Value = "disk space",
                            Path = "summary",
                        },
                    },
                },
            },
        },
        Variables = new[]
        {
            new Pagerduty.Inputs.ServiceEventRuleVariableArgs
            {
                Type = "regex",
                Name = "Src",
                Parameters = new[]
                {
                    new Pagerduty.Inputs.ServiceEventRuleVariableParameterArgs
                    {
                        Value = "(.*)",
                        Path = "source",
                    },
                },
            },
        },
        Actions = new Pagerduty.Inputs.ServiceEventRuleActionsArgs
        {
            Annotates = new[]
            {
                new Pagerduty.Inputs.ServiceEventRuleActionsAnnotateArgs
                {
                    Value = "From Terraform",
                },
            },
            Extractions = new[]
            {
                new Pagerduty.Inputs.ServiceEventRuleActionsExtractionArgs
                {
                    Target = "dedup_key",
                    Source = "source",
                    Regex = "(.*)",
                },
                new Pagerduty.Inputs.ServiceEventRuleActionsExtractionArgs
                {
                    Target = "summary",
                    Template = "Warning: Disk Space Low on {{Src}}",
                },
            },
        },
    });

    var bar = new Pagerduty.ServiceEventRule("bar", new()
    {
        Service = fooPagerdutyService.Id,
        Position = 1,
        Disabled = true,
        Conditions = new Pagerduty.Inputs.ServiceEventRuleConditionsArgs
        {
            Operator = "and",
            Subconditions = new[]
            {
                new Pagerduty.Inputs.ServiceEventRuleConditionsSubconditionArgs
                {
                    Operator = "contains",
                    Parameters = new[]
                    {
                        new Pagerduty.Inputs.ServiceEventRuleConditionsSubconditionParameterArgs
                        {
                            Value = "cpu spike",
                            Path = "summary",
                        },
                    },
                },
            },
        },
        Actions = new Pagerduty.Inputs.ServiceEventRuleActionsArgs
        {
            Annotates = new[]
            {
                new Pagerduty.Inputs.ServiceEventRuleActionsAnnotateArgs
                {
                    Value = "From Terraform",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.pagerduty.Service;
import com.pulumi.pagerduty.ServiceArgs;
import com.pulumi.pagerduty.ServiceEventRule;
import com.pulumi.pagerduty.ServiceEventRuleArgs;
import com.pulumi.pagerduty.inputs.ServiceEventRuleConditionsArgs;
import com.pulumi.pagerduty.inputs.ServiceEventRuleVariableArgs;
import com.pulumi.pagerduty.inputs.ServiceEventRuleActionsArgs;
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 example = new Service("example", ServiceArgs.builder()
            .name("Checkout API Service")
            .autoResolveTimeout(14400)
            .acknowledgementTimeout(600)
            .escalationPolicy(examplePagerdutyEscalationPolicy.id())
            .alertCreation("create_alerts_and_incidents")
            .build());

        var foo = new ServiceEventRule("foo", ServiceEventRuleArgs.builder()
            .service(example.id())
            .position(0)
            .disabled(true)
            .conditions(ServiceEventRuleConditionsArgs.builder()
                .operator("and")
                .subconditions(ServiceEventRuleConditionsSubconditionArgs.builder()
                    .operator("contains")
                    .parameters(ServiceEventRuleConditionsSubconditionParameterArgs.builder()
                        .value("disk space")
                        .path("summary")
                        .build())
                    .build())
                .build())
            .variables(ServiceEventRuleVariableArgs.builder()
                .type("regex")
                .name("Src")
                .parameters(ServiceEventRuleVariableParameterArgs.builder()
                    .value("(.*)")
                    .path("source")
                    .build())
                .build())
            .actions(ServiceEventRuleActionsArgs.builder()
                .annotates(ServiceEventRuleActionsAnnotateArgs.builder()
                    .value("From Terraform")
                    .build())
                .extractions(                
                    ServiceEventRuleActionsExtractionArgs.builder()
                        .target("dedup_key")
                        .source("source")
                        .regex("(.*)")
                        .build(),
                    ServiceEventRuleActionsExtractionArgs.builder()
                        .target("summary")
                        .template("Warning: Disk Space Low on {{Src}}")
                        .build())
                .build())
            .build());

        var bar = new ServiceEventRule("bar", ServiceEventRuleArgs.builder()
            .service(fooPagerdutyService.id())
            .position(1)
            .disabled(true)
            .conditions(ServiceEventRuleConditionsArgs.builder()
                .operator("and")
                .subconditions(ServiceEventRuleConditionsSubconditionArgs.builder()
                    .operator("contains")
                    .parameters(ServiceEventRuleConditionsSubconditionParameterArgs.builder()
                        .value("cpu spike")
                        .path("summary")
                        .build())
                    .build())
                .build())
            .actions(ServiceEventRuleActionsArgs.builder()
                .annotates(ServiceEventRuleActionsAnnotateArgs.builder()
                    .value("From Terraform")
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: pagerduty:Service
    properties:
      name: Checkout API Service
      autoResolveTimeout: 14400
      acknowledgementTimeout: 600
      escalationPolicy: ${examplePagerdutyEscalationPolicy.id}
      alertCreation: create_alerts_and_incidents
  foo:
    type: pagerduty:ServiceEventRule
    properties:
      service: ${example.id}
      position: 0
      disabled: true
      conditions:
        operator: and
        subconditions:
          - operator: contains
            parameters:
              - value: disk space
                path: summary
      variables:
        - type: regex
          name: Src
          parameters:
            - value: (.*)
              path: source
      actions:
        annotates:
          - value: From Terraform
        extractions:
          - target: dedup_key
            source: source
            regex: (.*)
          - target: summary
            template: 'Warning: Disk Space Low on {{Src}}'
  bar:
    type: pagerduty:ServiceEventRule
    properties:
      service: ${fooPagerdutyService.id}
      position: 1
      disabled: true
      conditions:
        operator: and
        subconditions:
          - operator: contains
            parameters:
              - value: cpu spike
                path: summary
      actions:
        annotates:
          - value: From Terraform
Copy

Create ServiceEventRule Resource

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

Constructor syntax

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

@overload
def ServiceEventRule(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     service: Optional[str] = None,
                     actions: Optional[ServiceEventRuleActionsArgs] = None,
                     conditions: Optional[ServiceEventRuleConditionsArgs] = None,
                     disabled: Optional[bool] = None,
                     position: Optional[int] = None,
                     time_frame: Optional[ServiceEventRuleTimeFrameArgs] = None,
                     variables: Optional[Sequence[ServiceEventRuleVariableArgs]] = None)
func NewServiceEventRule(ctx *Context, name string, args ServiceEventRuleArgs, opts ...ResourceOption) (*ServiceEventRule, error)
public ServiceEventRule(string name, ServiceEventRuleArgs args, CustomResourceOptions? opts = null)
public ServiceEventRule(String name, ServiceEventRuleArgs args)
public ServiceEventRule(String name, ServiceEventRuleArgs args, CustomResourceOptions options)
type: pagerduty:ServiceEventRule
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. ServiceEventRuleArgs
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. ServiceEventRuleArgs
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. ServiceEventRuleArgs
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. ServiceEventRuleArgs
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. ServiceEventRuleArgs
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 serviceEventRuleResource = new Pagerduty.ServiceEventRule("serviceEventRuleResource", new()
{
    Service = "string",
    Actions = new Pagerduty.Inputs.ServiceEventRuleActionsArgs
    {
        Annotates = new[]
        {
            new Pagerduty.Inputs.ServiceEventRuleActionsAnnotateArgs
            {
                Value = "string",
            },
        },
        EventActions = new[]
        {
            new Pagerduty.Inputs.ServiceEventRuleActionsEventActionArgs
            {
                Value = "string",
            },
        },
        Extractions = new[]
        {
            new Pagerduty.Inputs.ServiceEventRuleActionsExtractionArgs
            {
                Regex = "string",
                Source = "string",
                Target = "string",
                Template = "string",
            },
        },
        Priorities = new[]
        {
            new Pagerduty.Inputs.ServiceEventRuleActionsPriorityArgs
            {
                Value = "string",
            },
        },
        Severities = new[]
        {
            new Pagerduty.Inputs.ServiceEventRuleActionsSeverityArgs
            {
                Value = "string",
            },
        },
        Suppresses = new[]
        {
            new Pagerduty.Inputs.ServiceEventRuleActionsSuppressArgs
            {
                ThresholdTimeAmount = 0,
                ThresholdTimeUnit = "string",
                ThresholdValue = 0,
                Value = false,
            },
        },
        Suspends = new[]
        {
            new Pagerduty.Inputs.ServiceEventRuleActionsSuspendArgs
            {
                Value = 0,
            },
        },
    },
    Conditions = new Pagerduty.Inputs.ServiceEventRuleConditionsArgs
    {
        Operator = "string",
        Subconditions = new[]
        {
            new Pagerduty.Inputs.ServiceEventRuleConditionsSubconditionArgs
            {
                Operator = "string",
                Parameters = new[]
                {
                    new Pagerduty.Inputs.ServiceEventRuleConditionsSubconditionParameterArgs
                    {
                        Path = "string",
                        Value = "string",
                    },
                },
            },
        },
    },
    Disabled = false,
    Position = 0,
    TimeFrame = new Pagerduty.Inputs.ServiceEventRuleTimeFrameArgs
    {
        ActiveBetweens = new[]
        {
            new Pagerduty.Inputs.ServiceEventRuleTimeFrameActiveBetweenArgs
            {
                EndTime = 0,
                StartTime = 0,
            },
        },
        ScheduledWeeklies = new[]
        {
            new Pagerduty.Inputs.ServiceEventRuleTimeFrameScheduledWeeklyArgs
            {
                Duration = 0,
                StartTime = 0,
                Timezone = "string",
                Weekdays = new[]
                {
                    0,
                },
            },
        },
    },
    Variables = new[]
    {
        new Pagerduty.Inputs.ServiceEventRuleVariableArgs
        {
            Name = "string",
            Parameters = new[]
            {
                new Pagerduty.Inputs.ServiceEventRuleVariableParameterArgs
                {
                    Path = "string",
                    Value = "string",
                },
            },
            Type = "string",
        },
    },
});
Copy
example, err := pagerduty.NewServiceEventRule(ctx, "serviceEventRuleResource", &pagerduty.ServiceEventRuleArgs{
	Service: pulumi.String("string"),
	Actions: &pagerduty.ServiceEventRuleActionsArgs{
		Annotates: pagerduty.ServiceEventRuleActionsAnnotateArray{
			&pagerduty.ServiceEventRuleActionsAnnotateArgs{
				Value: pulumi.String("string"),
			},
		},
		EventActions: pagerduty.ServiceEventRuleActionsEventActionArray{
			&pagerduty.ServiceEventRuleActionsEventActionArgs{
				Value: pulumi.String("string"),
			},
		},
		Extractions: pagerduty.ServiceEventRuleActionsExtractionArray{
			&pagerduty.ServiceEventRuleActionsExtractionArgs{
				Regex:    pulumi.String("string"),
				Source:   pulumi.String("string"),
				Target:   pulumi.String("string"),
				Template: pulumi.String("string"),
			},
		},
		Priorities: pagerduty.ServiceEventRuleActionsPriorityArray{
			&pagerduty.ServiceEventRuleActionsPriorityArgs{
				Value: pulumi.String("string"),
			},
		},
		Severities: pagerduty.ServiceEventRuleActionsSeverityArray{
			&pagerduty.ServiceEventRuleActionsSeverityArgs{
				Value: pulumi.String("string"),
			},
		},
		Suppresses: pagerduty.ServiceEventRuleActionsSuppressArray{
			&pagerduty.ServiceEventRuleActionsSuppressArgs{
				ThresholdTimeAmount: pulumi.Int(0),
				ThresholdTimeUnit:   pulumi.String("string"),
				ThresholdValue:      pulumi.Int(0),
				Value:               pulumi.Bool(false),
			},
		},
		Suspends: pagerduty.ServiceEventRuleActionsSuspendArray{
			&pagerduty.ServiceEventRuleActionsSuspendArgs{
				Value: pulumi.Int(0),
			},
		},
	},
	Conditions: &pagerduty.ServiceEventRuleConditionsArgs{
		Operator: pulumi.String("string"),
		Subconditions: pagerduty.ServiceEventRuleConditionsSubconditionArray{
			&pagerduty.ServiceEventRuleConditionsSubconditionArgs{
				Operator: pulumi.String("string"),
				Parameters: pagerduty.ServiceEventRuleConditionsSubconditionParameterArray{
					&pagerduty.ServiceEventRuleConditionsSubconditionParameterArgs{
						Path:  pulumi.String("string"),
						Value: pulumi.String("string"),
					},
				},
			},
		},
	},
	Disabled: pulumi.Bool(false),
	Position: pulumi.Int(0),
	TimeFrame: &pagerduty.ServiceEventRuleTimeFrameArgs{
		ActiveBetweens: pagerduty.ServiceEventRuleTimeFrameActiveBetweenArray{
			&pagerduty.ServiceEventRuleTimeFrameActiveBetweenArgs{
				EndTime:   pulumi.Int(0),
				StartTime: pulumi.Int(0),
			},
		},
		ScheduledWeeklies: pagerduty.ServiceEventRuleTimeFrameScheduledWeeklyArray{
			&pagerduty.ServiceEventRuleTimeFrameScheduledWeeklyArgs{
				Duration:  pulumi.Int(0),
				StartTime: pulumi.Int(0),
				Timezone:  pulumi.String("string"),
				Weekdays: pulumi.IntArray{
					pulumi.Int(0),
				},
			},
		},
	},
	Variables: pagerduty.ServiceEventRuleVariableArray{
		&pagerduty.ServiceEventRuleVariableArgs{
			Name: pulumi.String("string"),
			Parameters: pagerduty.ServiceEventRuleVariableParameterArray{
				&pagerduty.ServiceEventRuleVariableParameterArgs{
					Path:  pulumi.String("string"),
					Value: pulumi.String("string"),
				},
			},
			Type: pulumi.String("string"),
		},
	},
})
Copy
var serviceEventRuleResource = new ServiceEventRule("serviceEventRuleResource", ServiceEventRuleArgs.builder()
    .service("string")
    .actions(ServiceEventRuleActionsArgs.builder()
        .annotates(ServiceEventRuleActionsAnnotateArgs.builder()
            .value("string")
            .build())
        .eventActions(ServiceEventRuleActionsEventActionArgs.builder()
            .value("string")
            .build())
        .extractions(ServiceEventRuleActionsExtractionArgs.builder()
            .regex("string")
            .source("string")
            .target("string")
            .template("string")
            .build())
        .priorities(ServiceEventRuleActionsPriorityArgs.builder()
            .value("string")
            .build())
        .severities(ServiceEventRuleActionsSeverityArgs.builder()
            .value("string")
            .build())
        .suppresses(ServiceEventRuleActionsSuppressArgs.builder()
            .thresholdTimeAmount(0)
            .thresholdTimeUnit("string")
            .thresholdValue(0)
            .value(false)
            .build())
        .suspends(ServiceEventRuleActionsSuspendArgs.builder()
            .value(0)
            .build())
        .build())
    .conditions(ServiceEventRuleConditionsArgs.builder()
        .operator("string")
        .subconditions(ServiceEventRuleConditionsSubconditionArgs.builder()
            .operator("string")
            .parameters(ServiceEventRuleConditionsSubconditionParameterArgs.builder()
                .path("string")
                .value("string")
                .build())
            .build())
        .build())
    .disabled(false)
    .position(0)
    .timeFrame(ServiceEventRuleTimeFrameArgs.builder()
        .activeBetweens(ServiceEventRuleTimeFrameActiveBetweenArgs.builder()
            .endTime(0)
            .startTime(0)
            .build())
        .scheduledWeeklies(ServiceEventRuleTimeFrameScheduledWeeklyArgs.builder()
            .duration(0)
            .startTime(0)
            .timezone("string")
            .weekdays(0)
            .build())
        .build())
    .variables(ServiceEventRuleVariableArgs.builder()
        .name("string")
        .parameters(ServiceEventRuleVariableParameterArgs.builder()
            .path("string")
            .value("string")
            .build())
        .type("string")
        .build())
    .build());
Copy
service_event_rule_resource = pagerduty.ServiceEventRule("serviceEventRuleResource",
    service="string",
    actions={
        "annotates": [{
            "value": "string",
        }],
        "event_actions": [{
            "value": "string",
        }],
        "extractions": [{
            "regex": "string",
            "source": "string",
            "target": "string",
            "template": "string",
        }],
        "priorities": [{
            "value": "string",
        }],
        "severities": [{
            "value": "string",
        }],
        "suppresses": [{
            "threshold_time_amount": 0,
            "threshold_time_unit": "string",
            "threshold_value": 0,
            "value": False,
        }],
        "suspends": [{
            "value": 0,
        }],
    },
    conditions={
        "operator": "string",
        "subconditions": [{
            "operator": "string",
            "parameters": [{
                "path": "string",
                "value": "string",
            }],
        }],
    },
    disabled=False,
    position=0,
    time_frame={
        "active_betweens": [{
            "end_time": 0,
            "start_time": 0,
        }],
        "scheduled_weeklies": [{
            "duration": 0,
            "start_time": 0,
            "timezone": "string",
            "weekdays": [0],
        }],
    },
    variables=[{
        "name": "string",
        "parameters": [{
            "path": "string",
            "value": "string",
        }],
        "type": "string",
    }])
Copy
const serviceEventRuleResource = new pagerduty.ServiceEventRule("serviceEventRuleResource", {
    service: "string",
    actions: {
        annotates: [{
            value: "string",
        }],
        eventActions: [{
            value: "string",
        }],
        extractions: [{
            regex: "string",
            source: "string",
            target: "string",
            template: "string",
        }],
        priorities: [{
            value: "string",
        }],
        severities: [{
            value: "string",
        }],
        suppresses: [{
            thresholdTimeAmount: 0,
            thresholdTimeUnit: "string",
            thresholdValue: 0,
            value: false,
        }],
        suspends: [{
            value: 0,
        }],
    },
    conditions: {
        operator: "string",
        subconditions: [{
            operator: "string",
            parameters: [{
                path: "string",
                value: "string",
            }],
        }],
    },
    disabled: false,
    position: 0,
    timeFrame: {
        activeBetweens: [{
            endTime: 0,
            startTime: 0,
        }],
        scheduledWeeklies: [{
            duration: 0,
            startTime: 0,
            timezone: "string",
            weekdays: [0],
        }],
    },
    variables: [{
        name: "string",
        parameters: [{
            path: "string",
            value: "string",
        }],
        type: "string",
    }],
});
Copy
type: pagerduty:ServiceEventRule
properties:
    actions:
        annotates:
            - value: string
        eventActions:
            - value: string
        extractions:
            - regex: string
              source: string
              target: string
              template: string
        priorities:
            - value: string
        severities:
            - value: string
        suppresses:
            - thresholdTimeAmount: 0
              thresholdTimeUnit: string
              thresholdValue: 0
              value: false
        suspends:
            - value: 0
    conditions:
        operator: string
        subconditions:
            - operator: string
              parameters:
                - path: string
                  value: string
    disabled: false
    position: 0
    service: string
    timeFrame:
        activeBetweens:
            - endTime: 0
              startTime: 0
        scheduledWeeklies:
            - duration: 0
              startTime: 0
              timezone: string
              weekdays:
                - 0
    variables:
        - name: string
          parameters:
            - path: string
              value: string
          type: string
Copy

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

Service This property is required. string
The ID of the service that the rule belongs to.
Actions ServiceEventRuleActions
Actions to apply to an event if the conditions match.
Conditions ServiceEventRuleConditions
Conditions evaluated to check if an event matches this event rule.
Disabled bool
Indicates whether the rule is disabled and would therefore not be evaluated.
Position int
Position/index of the rule within the service.
TimeFrame ServiceEventRuleTimeFrame
Settings for scheduling the rule.
Variables List<ServiceEventRuleVariable>
Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple variable objects.
Service This property is required. string
The ID of the service that the rule belongs to.
Actions ServiceEventRuleActionsArgs
Actions to apply to an event if the conditions match.
Conditions ServiceEventRuleConditionsArgs
Conditions evaluated to check if an event matches this event rule.
Disabled bool
Indicates whether the rule is disabled and would therefore not be evaluated.
Position int
Position/index of the rule within the service.
TimeFrame ServiceEventRuleTimeFrameArgs
Settings for scheduling the rule.
Variables []ServiceEventRuleVariableArgs
Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple variable objects.
service This property is required. String
The ID of the service that the rule belongs to.
actions ServiceEventRuleActions
Actions to apply to an event if the conditions match.
conditions ServiceEventRuleConditions
Conditions evaluated to check if an event matches this event rule.
disabled Boolean
Indicates whether the rule is disabled and would therefore not be evaluated.
position Integer
Position/index of the rule within the service.
timeFrame ServiceEventRuleTimeFrame
Settings for scheduling the rule.
variables List<ServiceEventRuleVariable>
Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple variable objects.
service This property is required. string
The ID of the service that the rule belongs to.
actions ServiceEventRuleActions
Actions to apply to an event if the conditions match.
conditions ServiceEventRuleConditions
Conditions evaluated to check if an event matches this event rule.
disabled boolean
Indicates whether the rule is disabled and would therefore not be evaluated.
position number
Position/index of the rule within the service.
timeFrame ServiceEventRuleTimeFrame
Settings for scheduling the rule.
variables ServiceEventRuleVariable[]
Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple variable objects.
service This property is required. str
The ID of the service that the rule belongs to.
actions ServiceEventRuleActionsArgs
Actions to apply to an event if the conditions match.
conditions ServiceEventRuleConditionsArgs
Conditions evaluated to check if an event matches this event rule.
disabled bool
Indicates whether the rule is disabled and would therefore not be evaluated.
position int
Position/index of the rule within the service.
time_frame ServiceEventRuleTimeFrameArgs
Settings for scheduling the rule.
variables Sequence[ServiceEventRuleVariableArgs]
Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple variable objects.
service This property is required. String
The ID of the service that the rule belongs to.
actions Property Map
Actions to apply to an event if the conditions match.
conditions Property Map
Conditions evaluated to check if an event matches this event rule.
disabled Boolean
Indicates whether the rule is disabled and would therefore not be evaluated.
position Number
Position/index of the rule within the service.
timeFrame Property Map
Settings for scheduling the rule.
variables List<Property Map>
Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple variable objects.

Outputs

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

Get an existing ServiceEventRule 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?: ServiceEventRuleState, opts?: CustomResourceOptions): ServiceEventRule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        actions: Optional[ServiceEventRuleActionsArgs] = None,
        conditions: Optional[ServiceEventRuleConditionsArgs] = None,
        disabled: Optional[bool] = None,
        position: Optional[int] = None,
        service: Optional[str] = None,
        time_frame: Optional[ServiceEventRuleTimeFrameArgs] = None,
        variables: Optional[Sequence[ServiceEventRuleVariableArgs]] = None) -> ServiceEventRule
func GetServiceEventRule(ctx *Context, name string, id IDInput, state *ServiceEventRuleState, opts ...ResourceOption) (*ServiceEventRule, error)
public static ServiceEventRule Get(string name, Input<string> id, ServiceEventRuleState? state, CustomResourceOptions? opts = null)
public static ServiceEventRule get(String name, Output<String> id, ServiceEventRuleState state, CustomResourceOptions options)
resources:  _:    type: pagerduty:ServiceEventRule    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:
Actions ServiceEventRuleActions
Actions to apply to an event if the conditions match.
Conditions ServiceEventRuleConditions
Conditions evaluated to check if an event matches this event rule.
Disabled bool
Indicates whether the rule is disabled and would therefore not be evaluated.
Position int
Position/index of the rule within the service.
Service string
The ID of the service that the rule belongs to.
TimeFrame ServiceEventRuleTimeFrame
Settings for scheduling the rule.
Variables List<ServiceEventRuleVariable>
Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple variable objects.
Actions ServiceEventRuleActionsArgs
Actions to apply to an event if the conditions match.
Conditions ServiceEventRuleConditionsArgs
Conditions evaluated to check if an event matches this event rule.
Disabled bool
Indicates whether the rule is disabled and would therefore not be evaluated.
Position int
Position/index of the rule within the service.
Service string
The ID of the service that the rule belongs to.
TimeFrame ServiceEventRuleTimeFrameArgs
Settings for scheduling the rule.
Variables []ServiceEventRuleVariableArgs
Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple variable objects.
actions ServiceEventRuleActions
Actions to apply to an event if the conditions match.
conditions ServiceEventRuleConditions
Conditions evaluated to check if an event matches this event rule.
disabled Boolean
Indicates whether the rule is disabled and would therefore not be evaluated.
position Integer
Position/index of the rule within the service.
service String
The ID of the service that the rule belongs to.
timeFrame ServiceEventRuleTimeFrame
Settings for scheduling the rule.
variables List<ServiceEventRuleVariable>
Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple variable objects.
actions ServiceEventRuleActions
Actions to apply to an event if the conditions match.
conditions ServiceEventRuleConditions
Conditions evaluated to check if an event matches this event rule.
disabled boolean
Indicates whether the rule is disabled and would therefore not be evaluated.
position number
Position/index of the rule within the service.
service string
The ID of the service that the rule belongs to.
timeFrame ServiceEventRuleTimeFrame
Settings for scheduling the rule.
variables ServiceEventRuleVariable[]
Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple variable objects.
actions ServiceEventRuleActionsArgs
Actions to apply to an event if the conditions match.
conditions ServiceEventRuleConditionsArgs
Conditions evaluated to check if an event matches this event rule.
disabled bool
Indicates whether the rule is disabled and would therefore not be evaluated.
position int
Position/index of the rule within the service.
service str
The ID of the service that the rule belongs to.
time_frame ServiceEventRuleTimeFrameArgs
Settings for scheduling the rule.
variables Sequence[ServiceEventRuleVariableArgs]
Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple variable objects.
actions Property Map
Actions to apply to an event if the conditions match.
conditions Property Map
Conditions evaluated to check if an event matches this event rule.
disabled Boolean
Indicates whether the rule is disabled and would therefore not be evaluated.
position Number
Position/index of the rule within the service.
service String
The ID of the service that the rule belongs to.
timeFrame Property Map
Settings for scheduling the rule.
variables List<Property Map>
Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple variable objects.

Supporting Types

ServiceEventRuleActions
, ServiceEventRuleActionsArgs

Annotates List<ServiceEventRuleActionsAnnotate>
Note added to the event.
EventActions List<ServiceEventRuleActionsEventAction>
An object with a single value field. The value sets whether the resulting alert status is trigger or resolve.
Extractions List<ServiceEventRuleActionsExtraction>
Allows you to copy important data from one event field to another. Extraction objects may use either of the following field structures:
Priorities List<ServiceEventRuleActionsPriority>
The ID of the priority applied to the event.
Severities List<ServiceEventRuleActionsSeverity>
The severity level of the event. Can be either info,error,warning, or critical.
Suppresses List<ServiceEventRuleActionsSuppress>
Controls whether an alert is suppressed (does not create an incident).
Suspends List<ServiceEventRuleActionsSuspend>
An object with a single value field. The value sets the length of time to suspend the resulting alert before triggering.
Annotates []ServiceEventRuleActionsAnnotate
Note added to the event.
EventActions []ServiceEventRuleActionsEventAction
An object with a single value field. The value sets whether the resulting alert status is trigger or resolve.
Extractions []ServiceEventRuleActionsExtraction
Allows you to copy important data from one event field to another. Extraction objects may use either of the following field structures:
Priorities []ServiceEventRuleActionsPriority
The ID of the priority applied to the event.
Severities []ServiceEventRuleActionsSeverity
The severity level of the event. Can be either info,error,warning, or critical.
Suppresses []ServiceEventRuleActionsSuppress
Controls whether an alert is suppressed (does not create an incident).
Suspends []ServiceEventRuleActionsSuspend
An object with a single value field. The value sets the length of time to suspend the resulting alert before triggering.
annotates List<ServiceEventRuleActionsAnnotate>
Note added to the event.
eventActions List<ServiceEventRuleActionsEventAction>
An object with a single value field. The value sets whether the resulting alert status is trigger or resolve.
extractions List<ServiceEventRuleActionsExtraction>
Allows you to copy important data from one event field to another. Extraction objects may use either of the following field structures:
priorities List<ServiceEventRuleActionsPriority>
The ID of the priority applied to the event.
severities List<ServiceEventRuleActionsSeverity>
The severity level of the event. Can be either info,error,warning, or critical.
suppresses List<ServiceEventRuleActionsSuppress>
Controls whether an alert is suppressed (does not create an incident).
suspends List<ServiceEventRuleActionsSuspend>
An object with a single value field. The value sets the length of time to suspend the resulting alert before triggering.
annotates ServiceEventRuleActionsAnnotate[]
Note added to the event.
eventActions ServiceEventRuleActionsEventAction[]
An object with a single value field. The value sets whether the resulting alert status is trigger or resolve.
extractions ServiceEventRuleActionsExtraction[]
Allows you to copy important data from one event field to another. Extraction objects may use either of the following field structures:
priorities ServiceEventRuleActionsPriority[]
The ID of the priority applied to the event.
severities ServiceEventRuleActionsSeverity[]
The severity level of the event. Can be either info,error,warning, or critical.
suppresses ServiceEventRuleActionsSuppress[]
Controls whether an alert is suppressed (does not create an incident).
suspends ServiceEventRuleActionsSuspend[]
An object with a single value field. The value sets the length of time to suspend the resulting alert before triggering.
annotates Sequence[ServiceEventRuleActionsAnnotate]
Note added to the event.
event_actions Sequence[ServiceEventRuleActionsEventAction]
An object with a single value field. The value sets whether the resulting alert status is trigger or resolve.
extractions Sequence[ServiceEventRuleActionsExtraction]
Allows you to copy important data from one event field to another. Extraction objects may use either of the following field structures:
priorities Sequence[ServiceEventRuleActionsPriority]
The ID of the priority applied to the event.
severities Sequence[ServiceEventRuleActionsSeverity]
The severity level of the event. Can be either info,error,warning, or critical.
suppresses Sequence[ServiceEventRuleActionsSuppress]
Controls whether an alert is suppressed (does not create an incident).
suspends Sequence[ServiceEventRuleActionsSuspend]
An object with a single value field. The value sets the length of time to suspend the resulting alert before triggering.
annotates List<Property Map>
Note added to the event.
eventActions List<Property Map>
An object with a single value field. The value sets whether the resulting alert status is trigger or resolve.
extractions List<Property Map>
Allows you to copy important data from one event field to another. Extraction objects may use either of the following field structures:
priorities List<Property Map>
The ID of the priority applied to the event.
severities List<Property Map>
The severity level of the event. Can be either info,error,warning, or critical.
suppresses List<Property Map>
Controls whether an alert is suppressed (does not create an incident).
suspends List<Property Map>
An object with a single value field. The value sets the length of time to suspend the resulting alert before triggering.

ServiceEventRuleActionsAnnotate
, ServiceEventRuleActionsAnnotateArgs

Value string
Value string
value String
value string
value str
value String

ServiceEventRuleActionsEventAction
, ServiceEventRuleActionsEventActionArgs

Value string
Value string
value String
value string
value str
value String

ServiceEventRuleActionsExtraction
, ServiceEventRuleActionsExtractionArgs

Regex string

The conditions that need to be met for the extraction to happen. Must use valid RE2 regular expression syntax.

- OR -

Source string
Field where the data is being copied from. Must be a PagerDuty Common Event Format (PD-CEF) field.
Target string

Field where the data is being copied to. Must be a PagerDuty Common Event Format (PD-CEF) field.

NOTE: A rule can have multiple extraction objects attributed to it.

Template string
A customized field message. This can also include variables extracted from the payload by using string interpolation.
Regex string

The conditions that need to be met for the extraction to happen. Must use valid RE2 regular expression syntax.

- OR -

Source string
Field where the data is being copied from. Must be a PagerDuty Common Event Format (PD-CEF) field.
Target string

Field where the data is being copied to. Must be a PagerDuty Common Event Format (PD-CEF) field.

NOTE: A rule can have multiple extraction objects attributed to it.

Template string
A customized field message. This can also include variables extracted from the payload by using string interpolation.
regex String

The conditions that need to be met for the extraction to happen. Must use valid RE2 regular expression syntax.

- OR -

source String
Field where the data is being copied from. Must be a PagerDuty Common Event Format (PD-CEF) field.
target String

Field where the data is being copied to. Must be a PagerDuty Common Event Format (PD-CEF) field.

NOTE: A rule can have multiple extraction objects attributed to it.

template String
A customized field message. This can also include variables extracted from the payload by using string interpolation.
regex string

The conditions that need to be met for the extraction to happen. Must use valid RE2 regular expression syntax.

- OR -

source string
Field where the data is being copied from. Must be a PagerDuty Common Event Format (PD-CEF) field.
target string

Field where the data is being copied to. Must be a PagerDuty Common Event Format (PD-CEF) field.

NOTE: A rule can have multiple extraction objects attributed to it.

template string
A customized field message. This can also include variables extracted from the payload by using string interpolation.
regex str

The conditions that need to be met for the extraction to happen. Must use valid RE2 regular expression syntax.

- OR -

source str
Field where the data is being copied from. Must be a PagerDuty Common Event Format (PD-CEF) field.
target str

Field where the data is being copied to. Must be a PagerDuty Common Event Format (PD-CEF) field.

NOTE: A rule can have multiple extraction objects attributed to it.

template str
A customized field message. This can also include variables extracted from the payload by using string interpolation.
regex String

The conditions that need to be met for the extraction to happen. Must use valid RE2 regular expression syntax.

- OR -

source String
Field where the data is being copied from. Must be a PagerDuty Common Event Format (PD-CEF) field.
target String

Field where the data is being copied to. Must be a PagerDuty Common Event Format (PD-CEF) field.

NOTE: A rule can have multiple extraction objects attributed to it.

template String
A customized field message. This can also include variables extracted from the payload by using string interpolation.

ServiceEventRuleActionsPriority
, ServiceEventRuleActionsPriorityArgs

Value string
Value string
value String
value string
value str
value String

ServiceEventRuleActionsSeverity
, ServiceEventRuleActionsSeverityArgs

Value string
Value string
value String
value string
value str
value String

ServiceEventRuleActionsSuppress
, ServiceEventRuleActionsSuppressArgs

ThresholdTimeAmount int
The number value of the threshold_time_unit before an incident is created.
ThresholdTimeUnit string
The seconds,minutes, or hours the threshold_time_amount should be measured.
ThresholdValue int
The number of alerts that should be suppressed.
Value bool
Boolean value that indicates if the alert should be suppressed before the indicated threshold values are met.
ThresholdTimeAmount int
The number value of the threshold_time_unit before an incident is created.
ThresholdTimeUnit string
The seconds,minutes, or hours the threshold_time_amount should be measured.
ThresholdValue int
The number of alerts that should be suppressed.
Value bool
Boolean value that indicates if the alert should be suppressed before the indicated threshold values are met.
thresholdTimeAmount Integer
The number value of the threshold_time_unit before an incident is created.
thresholdTimeUnit String
The seconds,minutes, or hours the threshold_time_amount should be measured.
thresholdValue Integer
The number of alerts that should be suppressed.
value Boolean
Boolean value that indicates if the alert should be suppressed before the indicated threshold values are met.
thresholdTimeAmount number
The number value of the threshold_time_unit before an incident is created.
thresholdTimeUnit string
The seconds,minutes, or hours the threshold_time_amount should be measured.
thresholdValue number
The number of alerts that should be suppressed.
value boolean
Boolean value that indicates if the alert should be suppressed before the indicated threshold values are met.
threshold_time_amount int
The number value of the threshold_time_unit before an incident is created.
threshold_time_unit str
The seconds,minutes, or hours the threshold_time_amount should be measured.
threshold_value int
The number of alerts that should be suppressed.
value bool
Boolean value that indicates if the alert should be suppressed before the indicated threshold values are met.
thresholdTimeAmount Number
The number value of the threshold_time_unit before an incident is created.
thresholdTimeUnit String
The seconds,minutes, or hours the threshold_time_amount should be measured.
thresholdValue Number
The number of alerts that should be suppressed.
value Boolean
Boolean value that indicates if the alert should be suppressed before the indicated threshold values are met.

ServiceEventRuleActionsSuspend
, ServiceEventRuleActionsSuspendArgs

Value int
Value int
value Integer
value number
value int
value Number

ServiceEventRuleConditions
, ServiceEventRuleConditionsArgs

Operator string
Operator to combine sub-conditions. Can be and or or.
Subconditions List<ServiceEventRuleConditionsSubcondition>
List of sub-conditions that define the condition.
Operator string
Operator to combine sub-conditions. Can be and or or.
Subconditions []ServiceEventRuleConditionsSubcondition
List of sub-conditions that define the condition.
operator String
Operator to combine sub-conditions. Can be and or or.
subconditions List<ServiceEventRuleConditionsSubcondition>
List of sub-conditions that define the condition.
operator string
Operator to combine sub-conditions. Can be and or or.
subconditions ServiceEventRuleConditionsSubcondition[]
List of sub-conditions that define the condition.
operator str
Operator to combine sub-conditions. Can be and or or.
subconditions Sequence[ServiceEventRuleConditionsSubcondition]
List of sub-conditions that define the condition.
operator String
Operator to combine sub-conditions. Can be and or or.
subconditions List<Property Map>
List of sub-conditions that define the condition.

ServiceEventRuleConditionsSubcondition
, ServiceEventRuleConditionsSubconditionArgs

Operator string
Type of operator to apply to the sub-condition. Can be exists,nexists,equals,nequals,contains,ncontains,matches, or nmatches.
Parameters List<ServiceEventRuleConditionsSubconditionParameter>
Parameter for the sub-condition. It requires both a path and value to be set. The path value must be a PagerDuty Common Event Format (PD-CEF) field.
Operator string
Type of operator to apply to the sub-condition. Can be exists,nexists,equals,nequals,contains,ncontains,matches, or nmatches.
Parameters []ServiceEventRuleConditionsSubconditionParameter
Parameter for the sub-condition. It requires both a path and value to be set. The path value must be a PagerDuty Common Event Format (PD-CEF) field.
operator String
Type of operator to apply to the sub-condition. Can be exists,nexists,equals,nequals,contains,ncontains,matches, or nmatches.
parameters List<ServiceEventRuleConditionsSubconditionParameter>
Parameter for the sub-condition. It requires both a path and value to be set. The path value must be a PagerDuty Common Event Format (PD-CEF) field.
operator string
Type of operator to apply to the sub-condition. Can be exists,nexists,equals,nequals,contains,ncontains,matches, or nmatches.
parameters ServiceEventRuleConditionsSubconditionParameter[]
Parameter for the sub-condition. It requires both a path and value to be set. The path value must be a PagerDuty Common Event Format (PD-CEF) field.
operator str
Type of operator to apply to the sub-condition. Can be exists,nexists,equals,nequals,contains,ncontains,matches, or nmatches.
parameters Sequence[ServiceEventRuleConditionsSubconditionParameter]
Parameter for the sub-condition. It requires both a path and value to be set. The path value must be a PagerDuty Common Event Format (PD-CEF) field.
operator String
Type of operator to apply to the sub-condition. Can be exists,nexists,equals,nequals,contains,ncontains,matches, or nmatches.
parameters List<Property Map>
Parameter for the sub-condition. It requires both a path and value to be set. The path value must be a PagerDuty Common Event Format (PD-CEF) field.

ServiceEventRuleConditionsSubconditionParameter
, ServiceEventRuleConditionsSubconditionParameterArgs

Path string
Path to a field in an event, in dot-notation. For Event Rules on a Service, this will have to be a PD-CEF field.
Value string
Path string
Path to a field in an event, in dot-notation. For Event Rules on a Service, this will have to be a PD-CEF field.
Value string
path String
Path to a field in an event, in dot-notation. For Event Rules on a Service, this will have to be a PD-CEF field.
value String
path string
Path to a field in an event, in dot-notation. For Event Rules on a Service, this will have to be a PD-CEF field.
value string
path str
Path to a field in an event, in dot-notation. For Event Rules on a Service, this will have to be a PD-CEF field.
value str
path String
Path to a field in an event, in dot-notation. For Event Rules on a Service, this will have to be a PD-CEF field.
value String

ServiceEventRuleTimeFrame
, ServiceEventRuleTimeFrameArgs

ActiveBetweens List<ServiceEventRuleTimeFrameActiveBetween>
Values for executing the rule during a specific time period.
ScheduledWeeklies List<ServiceEventRuleTimeFrameScheduledWeekly>
Values for executing the rule on a recurring schedule.
ActiveBetweens []ServiceEventRuleTimeFrameActiveBetween
Values for executing the rule during a specific time period.
ScheduledWeeklies []ServiceEventRuleTimeFrameScheduledWeekly
Values for executing the rule on a recurring schedule.
activeBetweens List<ServiceEventRuleTimeFrameActiveBetween>
Values for executing the rule during a specific time period.
scheduledWeeklies List<ServiceEventRuleTimeFrameScheduledWeekly>
Values for executing the rule on a recurring schedule.
activeBetweens ServiceEventRuleTimeFrameActiveBetween[]
Values for executing the rule during a specific time period.
scheduledWeeklies ServiceEventRuleTimeFrameScheduledWeekly[]
Values for executing the rule on a recurring schedule.
active_betweens Sequence[ServiceEventRuleTimeFrameActiveBetween]
Values for executing the rule during a specific time period.
scheduled_weeklies Sequence[ServiceEventRuleTimeFrameScheduledWeekly]
Values for executing the rule on a recurring schedule.
activeBetweens List<Property Map>
Values for executing the rule during a specific time period.
scheduledWeeklies List<Property Map>
Values for executing the rule on a recurring schedule.

ServiceEventRuleTimeFrameActiveBetween
, ServiceEventRuleTimeFrameActiveBetweenArgs

EndTime int
Ending of the scheduled time when the rule should execute. Unix timestamp in milliseconds.
StartTime int
Beginning of the scheduled time when the rule should execute. Unix timestamp in milliseconds.
EndTime int
Ending of the scheduled time when the rule should execute. Unix timestamp in milliseconds.
StartTime int
Beginning of the scheduled time when the rule should execute. Unix timestamp in milliseconds.
endTime Integer
Ending of the scheduled time when the rule should execute. Unix timestamp in milliseconds.
startTime Integer
Beginning of the scheduled time when the rule should execute. Unix timestamp in milliseconds.
endTime number
Ending of the scheduled time when the rule should execute. Unix timestamp in milliseconds.
startTime number
Beginning of the scheduled time when the rule should execute. Unix timestamp in milliseconds.
end_time int
Ending of the scheduled time when the rule should execute. Unix timestamp in milliseconds.
start_time int
Beginning of the scheduled time when the rule should execute. Unix timestamp in milliseconds.
endTime Number
Ending of the scheduled time when the rule should execute. Unix timestamp in milliseconds.
startTime Number
Beginning of the scheduled time when the rule should execute. Unix timestamp in milliseconds.

ServiceEventRuleTimeFrameScheduledWeekly
, ServiceEventRuleTimeFrameScheduledWeeklyArgs

Duration int
Length of time the schedule will be active. Unix timestamp in milliseconds.
StartTime int
Time when the schedule will start. Unix timestamp in milliseconds. For example, if you have a rule with a start_time of 0 and a duration of 60,000 then that rule would be active from 00:00 to 00:01. If the start_time was 3,600,000 the it would be active starting at 01:00.
Timezone string
Timezone for the given schedule.
Weekdays List<int>
An integer array representing which days during the week the rule executes. For example weekdays = [1,3,7] would execute on Monday, Wednesday and Sunday.
Duration int
Length of time the schedule will be active. Unix timestamp in milliseconds.
StartTime int
Time when the schedule will start. Unix timestamp in milliseconds. For example, if you have a rule with a start_time of 0 and a duration of 60,000 then that rule would be active from 00:00 to 00:01. If the start_time was 3,600,000 the it would be active starting at 01:00.
Timezone string
Timezone for the given schedule.
Weekdays []int
An integer array representing which days during the week the rule executes. For example weekdays = [1,3,7] would execute on Monday, Wednesday and Sunday.
duration Integer
Length of time the schedule will be active. Unix timestamp in milliseconds.
startTime Integer
Time when the schedule will start. Unix timestamp in milliseconds. For example, if you have a rule with a start_time of 0 and a duration of 60,000 then that rule would be active from 00:00 to 00:01. If the start_time was 3,600,000 the it would be active starting at 01:00.
timezone String
Timezone for the given schedule.
weekdays List<Integer>
An integer array representing which days during the week the rule executes. For example weekdays = [1,3,7] would execute on Monday, Wednesday and Sunday.
duration number
Length of time the schedule will be active. Unix timestamp in milliseconds.
startTime number
Time when the schedule will start. Unix timestamp in milliseconds. For example, if you have a rule with a start_time of 0 and a duration of 60,000 then that rule would be active from 00:00 to 00:01. If the start_time was 3,600,000 the it would be active starting at 01:00.
timezone string
Timezone for the given schedule.
weekdays number[]
An integer array representing which days during the week the rule executes. For example weekdays = [1,3,7] would execute on Monday, Wednesday and Sunday.
duration int
Length of time the schedule will be active. Unix timestamp in milliseconds.
start_time int
Time when the schedule will start. Unix timestamp in milliseconds. For example, if you have a rule with a start_time of 0 and a duration of 60,000 then that rule would be active from 00:00 to 00:01. If the start_time was 3,600,000 the it would be active starting at 01:00.
timezone str
Timezone for the given schedule.
weekdays Sequence[int]
An integer array representing which days during the week the rule executes. For example weekdays = [1,3,7] would execute on Monday, Wednesday and Sunday.
duration Number
Length of time the schedule will be active. Unix timestamp in milliseconds.
startTime Number
Time when the schedule will start. Unix timestamp in milliseconds. For example, if you have a rule with a start_time of 0 and a duration of 60,000 then that rule would be active from 00:00 to 00:01. If the start_time was 3,600,000 the it would be active starting at 01:00.
timezone String
Timezone for the given schedule.
weekdays List<Number>
An integer array representing which days during the week the rule executes. For example weekdays = [1,3,7] would execute on Monday, Wednesday and Sunday.

ServiceEventRuleVariable
, ServiceEventRuleVariableArgs

Name string
The name of the variable.
Parameters List<ServiceEventRuleVariableParameter>
The parameters for performing the operation to populate the variable.
Type string
Type of operation to populate the variable. Usually regex.
Name string
The name of the variable.
Parameters []ServiceEventRuleVariableParameter
The parameters for performing the operation to populate the variable.
Type string
Type of operation to populate the variable. Usually regex.
name String
The name of the variable.
parameters List<ServiceEventRuleVariableParameter>
The parameters for performing the operation to populate the variable.
type String
Type of operation to populate the variable. Usually regex.
name string
The name of the variable.
parameters ServiceEventRuleVariableParameter[]
The parameters for performing the operation to populate the variable.
type string
Type of operation to populate the variable. Usually regex.
name str
The name of the variable.
parameters Sequence[ServiceEventRuleVariableParameter]
The parameters for performing the operation to populate the variable.
type str
Type of operation to populate the variable. Usually regex.
name String
The name of the variable.
parameters List<Property Map>
The parameters for performing the operation to populate the variable.
type String
Type of operation to populate the variable. Usually regex.

ServiceEventRuleVariableParameter
, ServiceEventRuleVariableParameterArgs

Path string
Path to a field in an event, in dot-notation. For Event Rules on a Service, this will have to be a PD-CEF field.
Value string
Path string
Path to a field in an event, in dot-notation. For Event Rules on a Service, this will have to be a PD-CEF field.
Value string
path String
Path to a field in an event, in dot-notation. For Event Rules on a Service, this will have to be a PD-CEF field.
value String
path string
Path to a field in an event, in dot-notation. For Event Rules on a Service, this will have to be a PD-CEF field.
value string
path str
Path to a field in an event, in dot-notation. For Event Rules on a Service, this will have to be a PD-CEF field.
value str
path String
Path to a field in an event, in dot-notation. For Event Rules on a Service, this will have to be a PD-CEF field.
value String

Import

Service event rules can be imported using using the related service id and the service_event_rule id separated by a dot, e.g.

$ pulumi import pagerduty:index/serviceEventRule:ServiceEventRule main a19cdca1-3d5e-4b52-bfea-8c8de04da243.19acac92-027a-4ea0-b06c-bbf516519601
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.