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",
}],
},
});
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",
}],
})
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
})
}
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",
},
},
},
});
});
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());
}
}
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
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 string
- The unique name of the resource.
- args ServiceEventRuleArgs
- 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 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 string
- The unique name of the resource.
- args ServiceEventRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceEventRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
},
},
});
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"),
},
},
})
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());
service_event_rule_resource = pagerduty.ServiceEventRule("serviceEventRuleResource",
service="string",
actions=pagerduty.ServiceEventRuleActionsArgs(
annotates=[pagerduty.ServiceEventRuleActionsAnnotateArgs(
value="string",
)],
event_actions=[pagerduty.ServiceEventRuleActionsEventActionArgs(
value="string",
)],
extractions=[pagerduty.ServiceEventRuleActionsExtractionArgs(
regex="string",
source="string",
target="string",
template="string",
)],
priorities=[pagerduty.ServiceEventRuleActionsPriorityArgs(
value="string",
)],
severities=[pagerduty.ServiceEventRuleActionsSeverityArgs(
value="string",
)],
suppresses=[pagerduty.ServiceEventRuleActionsSuppressArgs(
threshold_time_amount=0,
threshold_time_unit="string",
threshold_value=0,
value=False,
)],
suspends=[pagerduty.ServiceEventRuleActionsSuspendArgs(
value=0,
)],
),
conditions=pagerduty.ServiceEventRuleConditionsArgs(
operator="string",
subconditions=[pagerduty.ServiceEventRuleConditionsSubconditionArgs(
operator="string",
parameters=[pagerduty.ServiceEventRuleConditionsSubconditionParameterArgs(
path="string",
value="string",
)],
)],
),
disabled=False,
position=0,
time_frame=pagerduty.ServiceEventRuleTimeFrameArgs(
active_betweens=[pagerduty.ServiceEventRuleTimeFrameActiveBetweenArgs(
end_time=0,
start_time=0,
)],
scheduled_weeklies=[pagerduty.ServiceEventRuleTimeFrameScheduledWeeklyArgs(
duration=0,
start_time=0,
timezone="string",
weekdays=[0],
)],
),
variables=[pagerduty.ServiceEventRuleVariableArgs(
name="string",
parameters=[pagerduty.ServiceEventRuleVariableParameterArgs(
path="string",
value="string",
)],
type="string",
)])
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",
}],
});
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
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
The ServiceEventRule resource accepts the following input properties:
- Service string
- The ID of the service that the rule belongs to.
- Actions
Service
Event Rule Actions - Actions to apply to an event if the conditions match.
- Conditions
Service
Event Rule Conditions - 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 ServiceEvent Rule Time Frame - Settings for scheduling the rule.
- Variables
List<Service
Event Rule Variable> - Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple
variable
objects.
- Service string
- The ID of the service that the rule belongs to.
- Actions
Service
Event Rule Actions Args - Actions to apply to an event if the conditions match.
- Conditions
Service
Event Rule Conditions Args - 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 ServiceEvent Rule Time Frame Args - Settings for scheduling the rule.
- Variables
[]Service
Event Rule Variable Args - Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple
variable
objects.
- service String
- The ID of the service that the rule belongs to.
- actions
Service
Event Rule Actions - Actions to apply to an event if the conditions match.
- conditions
Service
Event Rule Conditions - 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.
- time
Frame ServiceEvent Rule Time Frame - Settings for scheduling the rule.
- variables
List<Service
Event Rule Variable> - Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple
variable
objects.
- service string
- The ID of the service that the rule belongs to.
- actions
Service
Event Rule Actions - Actions to apply to an event if the conditions match.
- conditions
Service
Event Rule Conditions - 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.
- time
Frame ServiceEvent Rule Time Frame - Settings for scheduling the rule.
- variables
Service
Event Rule Variable[] - Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple
variable
objects.
- service str
- The ID of the service that the rule belongs to.
- actions
Service
Event Rule Actions Args - Actions to apply to an event if the conditions match.
- conditions
Service
Event Rule Conditions Args - 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 ServiceEvent Rule Time Frame Args - Settings for scheduling the rule.
- variables
Sequence[Service
Event Rule Variable Args] - Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple
variable
objects.
- service 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.
- time
Frame 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)
Resource lookup is not supported in YAML
- 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.
- Actions
Service
Event Rule Actions - Actions to apply to an event if the conditions match.
- Conditions
Service
Event Rule Conditions - 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.
- Time
Frame ServiceEvent Rule Time Frame - Settings for scheduling the rule.
- Variables
List<Service
Event Rule Variable> - Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple
variable
objects.
- Actions
Service
Event Rule Actions Args - Actions to apply to an event if the conditions match.
- Conditions
Service
Event Rule Conditions Args - 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.
- Time
Frame ServiceEvent Rule Time Frame Args - Settings for scheduling the rule.
- Variables
[]Service
Event Rule Variable Args - Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple
variable
objects.
- actions
Service
Event Rule Actions - Actions to apply to an event if the conditions match.
- conditions
Service
Event Rule Conditions - 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.
- time
Frame ServiceEvent Rule Time Frame - Settings for scheduling the rule.
- variables
List<Service
Event Rule Variable> - Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple
variable
objects.
- actions
Service
Event Rule Actions - Actions to apply to an event if the conditions match.
- conditions
Service
Event Rule Conditions - 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.
- time
Frame ServiceEvent Rule Time Frame - Settings for scheduling the rule.
- variables
Service
Event Rule Variable[] - Populate variables from event payloads and use those variables in other event actions. NOTE: A rule can have multiple
variable
objects.
- actions
Service
Event Rule Actions Args - Actions to apply to an event if the conditions match.
- conditions
Service
Event Rule Conditions Args - 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 ServiceEvent Rule Time Frame Args - Settings for scheduling the rule.
- variables
Sequence[Service
Event Rule Variable Args] - 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.
- time
Frame 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<Service
Event Rule Actions Annotate> - Note added to the event.
- Event
Actions List<ServiceEvent Rule Actions Event Action> - An object with a single
value
field. The value sets whether the resulting alert status istrigger
orresolve
. - Extractions
List<Service
Event Rule Actions Extraction> - Allows you to copy important data from one event field to another. Extraction objects may use either of the following field structures:
- Priorities
List<Service
Event Rule Actions Priority> - The ID of the priority applied to the event.
- Severities
List<Service
Event Rule Actions Severity> - The severity level of the event. Can be either
info
,error
,warning
, orcritical
. - Suppresses
List<Service
Event Rule Actions Suppress> - Controls whether an alert is suppressed (does not create an incident).
- Suspends
List<Service
Event Rule Actions Suspend> - An object with a single
value
field. The value sets the length of time to suspend the resulting alert before triggering.
- Annotates
[]Service
Event Rule Actions Annotate - Note added to the event.
- Event
Actions []ServiceEvent Rule Actions Event Action - An object with a single
value
field. The value sets whether the resulting alert status istrigger
orresolve
. - Extractions
[]Service
Event Rule Actions Extraction - Allows you to copy important data from one event field to another. Extraction objects may use either of the following field structures:
- Priorities
[]Service
Event Rule Actions Priority - The ID of the priority applied to the event.
- Severities
[]Service
Event Rule Actions Severity - The severity level of the event. Can be either
info
,error
,warning
, orcritical
. - Suppresses
[]Service
Event Rule Actions Suppress - Controls whether an alert is suppressed (does not create an incident).
- Suspends
[]Service
Event Rule Actions Suspend - An object with a single
value
field. The value sets the length of time to suspend the resulting alert before triggering.
- annotates
List<Service
Event Rule Actions Annotate> - Note added to the event.
- event
Actions List<ServiceEvent Rule Actions Event Action> - An object with a single
value
field. The value sets whether the resulting alert status istrigger
orresolve
. - extractions
List<Service
Event Rule Actions Extraction> - Allows you to copy important data from one event field to another. Extraction objects may use either of the following field structures:
- priorities
List<Service
Event Rule Actions Priority> - The ID of the priority applied to the event.
- severities
List<Service
Event Rule Actions Severity> - The severity level of the event. Can be either
info
,error
,warning
, orcritical
. - suppresses
List<Service
Event Rule Actions Suppress> - Controls whether an alert is suppressed (does not create an incident).
- suspends
List<Service
Event Rule Actions Suspend> - An object with a single
value
field. The value sets the length of time to suspend the resulting alert before triggering.
- annotates
Service
Event Rule Actions Annotate[] - Note added to the event.
- event
Actions ServiceEvent Rule Actions Event Action[] - An object with a single
value
field. The value sets whether the resulting alert status istrigger
orresolve
. - extractions
Service
Event Rule Actions Extraction[] - Allows you to copy important data from one event field to another. Extraction objects may use either of the following field structures:
- priorities
Service
Event Rule Actions Priority[] - The ID of the priority applied to the event.
- severities
Service
Event Rule Actions Severity[] - The severity level of the event. Can be either
info
,error
,warning
, orcritical
. - suppresses
Service
Event Rule Actions Suppress[] - Controls whether an alert is suppressed (does not create an incident).
- suspends
Service
Event Rule Actions Suspend[] - An object with a single
value
field. The value sets the length of time to suspend the resulting alert before triggering.
- annotates
Sequence[Service
Event Rule Actions Annotate] - Note added to the event.
- event_
actions Sequence[ServiceEvent Rule Actions Event Action] - An object with a single
value
field. The value sets whether the resulting alert status istrigger
orresolve
. - extractions
Sequence[Service
Event Rule Actions Extraction] - Allows you to copy important data from one event field to another. Extraction objects may use either of the following field structures:
- priorities
Sequence[Service
Event Rule Actions Priority] - The ID of the priority applied to the event.
- severities
Sequence[Service
Event Rule Actions Severity] - The severity level of the event. Can be either
info
,error
,warning
, orcritical
. - suppresses
Sequence[Service
Event Rule Actions Suppress] - Controls whether an alert is suppressed (does not create an incident).
- suspends
Sequence[Service
Event Rule Actions Suspend] - 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.
- event
Actions List<Property Map> - An object with a single
value
field. The value sets whether the resulting alert status istrigger
orresolve
. - 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
, orcritical
. - 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
- Threshold
Time intAmount - The number value of the
threshold_time_unit
before an incident is created. - Threshold
Time stringUnit - The
seconds
,minutes
, orhours
thethreshold_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.
- Threshold
Time intAmount - The number value of the
threshold_time_unit
before an incident is created. - Threshold
Time stringUnit - The
seconds
,minutes
, orhours
thethreshold_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.
- threshold
Time IntegerAmount - The number value of the
threshold_time_unit
before an incident is created. - threshold
Time StringUnit - The
seconds
,minutes
, orhours
thethreshold_time_amount
should be measured. - threshold
Value 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.
- threshold
Time numberAmount - The number value of the
threshold_time_unit
before an incident is created. - threshold
Time stringUnit - The
seconds
,minutes
, orhours
thethreshold_time_amount
should be measured. - threshold
Value 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_ intamount - The number value of the
threshold_time_unit
before an incident is created. - threshold_
time_ strunit - The
seconds
,minutes
, orhours
thethreshold_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.
- threshold
Time NumberAmount - The number value of the
threshold_time_unit
before an incident is created. - threshold
Time StringUnit - The
seconds
,minutes
, orhours
thethreshold_time_amount
should be measured. - threshold
Value 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
oror
. - Subconditions
List<Service
Event Rule Conditions Subcondition> - List of sub-conditions that define the condition.
- Operator string
- Operator to combine sub-conditions. Can be
and
oror
. - Subconditions
[]Service
Event Rule Conditions Subcondition - List of sub-conditions that define the condition.
- operator String
- Operator to combine sub-conditions. Can be
and
oror
. - subconditions
List<Service
Event Rule Conditions Subcondition> - List of sub-conditions that define the condition.
- operator string
- Operator to combine sub-conditions. Can be
and
oror
. - subconditions
Service
Event Rule Conditions Subcondition[] - List of sub-conditions that define the condition.
- operator str
- Operator to combine sub-conditions. Can be
and
oror
. - subconditions
Sequence[Service
Event Rule Conditions Subcondition] - List of sub-conditions that define the condition.
- operator String
- Operator to combine sub-conditions. Can be
and
oror
. - 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
, ornmatches
. - Parameters
List<Service
Event Rule Conditions Subcondition Parameter> - Parameter for the sub-condition. It requires both a
path
andvalue
to be set. Thepath
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
, ornmatches
. - Parameters
[]Service
Event Rule Conditions Subcondition Parameter - Parameter for the sub-condition. It requires both a
path
andvalue
to be set. Thepath
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
, ornmatches
. - parameters
List<Service
Event Rule Conditions Subcondition Parameter> - Parameter for the sub-condition. It requires both a
path
andvalue
to be set. Thepath
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
, ornmatches
. - parameters
Service
Event Rule Conditions Subcondition Parameter[] - Parameter for the sub-condition. It requires both a
path
andvalue
to be set. Thepath
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
, ornmatches
. - parameters
Sequence[Service
Event Rule Conditions Subcondition Parameter] - Parameter for the sub-condition. It requires both a
path
andvalue
to be set. Thepath
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
, ornmatches
. - parameters List<Property Map>
- Parameter for the sub-condition. It requires both a
path
andvalue
to be set. Thepath
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
- Active
Betweens List<ServiceEvent Rule Time Frame Active Between> - Values for executing the rule during a specific time period.
- Scheduled
Weeklies List<ServiceEvent Rule Time Frame Scheduled Weekly> - Values for executing the rule on a recurring schedule.
- Active
Betweens []ServiceEvent Rule Time Frame Active Between - Values for executing the rule during a specific time period.
- Scheduled
Weeklies []ServiceEvent Rule Time Frame Scheduled Weekly - Values for executing the rule on a recurring schedule.
- active
Betweens List<ServiceEvent Rule Time Frame Active Between> - Values for executing the rule during a specific time period.
- scheduled
Weeklies List<ServiceEvent Rule Time Frame Scheduled Weekly> - Values for executing the rule on a recurring schedule.
- active
Betweens ServiceEvent Rule Time Frame Active Between[] - Values for executing the rule during a specific time period.
- scheduled
Weeklies ServiceEvent Rule Time Frame Scheduled Weekly[] - Values for executing the rule on a recurring schedule.
- active_
betweens Sequence[ServiceEvent Rule Time Frame Active Between] - Values for executing the rule during a specific time period.
- scheduled_
weeklies Sequence[ServiceEvent Rule Time Frame Scheduled Weekly] - Values for executing the rule on a recurring schedule.
- active
Betweens List<Property Map> - Values for executing the rule during a specific time period.
- scheduled
Weeklies List<Property Map> - Values for executing the rule on a recurring schedule.
ServiceEventRuleTimeFrameActiveBetween, ServiceEventRuleTimeFrameActiveBetweenArgs
- 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.
ServiceEventRuleTimeFrameScheduledWeekly, ServiceEventRuleTimeFrameScheduledWeeklyArgs
- 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
of0
and aduration
of60,000
then that rule would be active from00:00
to00:01
. If thestart_time
was3,600,000
the it would be active starting at01: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.
- Start
Time int - Time when the schedule will start. Unix timestamp in milliseconds. For example, if you have a rule with a
start_time
of0
and aduration
of60,000
then that rule would be active from00:00
to00:01
. If thestart_time
was3,600,000
the it would be active starting at01: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.
- start
Time Integer - Time when the schedule will start. Unix timestamp in milliseconds. For example, if you have a rule with a
start_time
of0
and aduration
of60,000
then that rule would be active from00:00
to00:01
. If thestart_time
was3,600,000
the it would be active starting at01: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.
- start
Time number - Time when the schedule will start. Unix timestamp in milliseconds. For example, if you have a rule with a
start_time
of0
and aduration
of60,000
then that rule would be active from00:00
to00:01
. If thestart_time
was3,600,000
the it would be active starting at01: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
of0
and aduration
of60,000
then that rule would be active from00:00
to00:01
. If thestart_time
was3,600,000
the it would be active starting at01: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.
- start
Time Number - Time when the schedule will start. Unix timestamp in milliseconds. For example, if you have a rule with a
start_time
of0
and aduration
of60,000
then that rule would be active from00:00
to00:01
. If thestart_time
was3,600,000
the it would be active starting at01: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<Service
Event Rule Variable Parameter> - 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
[]Service
Event Rule Variable Parameter - 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<Service
Event Rule Variable Parameter> - 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
Service
Event Rule Variable Parameter[] - 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[Service
Event Rule Variable Parameter] - 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
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.