opsgenie.AlertPolicy
Explore with Pulumi AI
Manages a Alert Policy within Opsgenie.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opsgenie from "@pulumi/opsgenie";
const test = new opsgenie.Team("test", {
name: "example team",
description: "This team deals with all the things",
});
const testAlertPolicy = new opsgenie.AlertPolicy("test", {
filters: [{}],
name: "example policy",
teamId: test.id,
policyDescription: "This is sample policy",
message: "{{message}}",
timeRestrictions: [{
type: "weekday-and-time-of-day",
restrictionList: [
{
endDay: "monday",
endHour: 7,
endMin: 0,
startDay: "sunday",
startHour: 21,
startMin: 0,
},
{
endDay: "tuesday",
endHour: 7,
endMin: 0,
startDay: "monday",
startHour: 22,
startMin: 0,
},
],
}],
});
import pulumi
import pulumi_opsgenie as opsgenie
test = opsgenie.Team("test",
name="example team",
description="This team deals with all the things")
test_alert_policy = opsgenie.AlertPolicy("test",
filters=[{}],
name="example policy",
team_id=test.id,
policy_description="This is sample policy",
message="{{message}}",
time_restrictions=[{
"type": "weekday-and-time-of-day",
"restriction_list": [
{
"end_day": "monday",
"end_hour": 7,
"end_min": 0,
"start_day": "sunday",
"start_hour": 21,
"start_min": 0,
},
{
"end_day": "tuesday",
"end_hour": 7,
"end_min": 0,
"start_day": "monday",
"start_hour": 22,
"start_min": 0,
},
],
}])
package main
import (
"github.com/pulumi/pulumi-opsgenie/sdk/go/opsgenie"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
test, err := opsgenie.NewTeam(ctx, "test", &opsgenie.TeamArgs{
Name: pulumi.String("example team"),
Description: pulumi.String("This team deals with all the things"),
})
if err != nil {
return err
}
_, err = opsgenie.NewAlertPolicy(ctx, "test", &opsgenie.AlertPolicyArgs{
Filters: opsgenie.AlertPolicyFilterArray{
&opsgenie.AlertPolicyFilterArgs{},
},
Name: pulumi.String("example policy"),
TeamId: test.ID(),
PolicyDescription: pulumi.String("This is sample policy"),
Message: pulumi.String("{{message}}"),
TimeRestrictions: opsgenie.AlertPolicyTimeRestrictionArray{
&opsgenie.AlertPolicyTimeRestrictionArgs{
Type: pulumi.String("weekday-and-time-of-day"),
RestrictionList: opsgenie.AlertPolicyTimeRestrictionRestrictionListArray{
&opsgenie.AlertPolicyTimeRestrictionRestrictionListArgs{
EndDay: pulumi.String("monday"),
EndHour: pulumi.Int(7),
EndMin: pulumi.Int(0),
StartDay: pulumi.String("sunday"),
StartHour: pulumi.Int(21),
StartMin: pulumi.Int(0),
},
&opsgenie.AlertPolicyTimeRestrictionRestrictionListArgs{
EndDay: pulumi.String("tuesday"),
EndHour: pulumi.Int(7),
EndMin: pulumi.Int(0),
StartDay: pulumi.String("monday"),
StartHour: pulumi.Int(22),
StartMin: pulumi.Int(0),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opsgenie = Pulumi.Opsgenie;
return await Deployment.RunAsync(() =>
{
var test = new Opsgenie.Team("test", new()
{
Name = "example team",
Description = "This team deals with all the things",
});
var testAlertPolicy = new Opsgenie.AlertPolicy("test", new()
{
Filters = new[]
{
null,
},
Name = "example policy",
TeamId = test.Id,
PolicyDescription = "This is sample policy",
Message = "{{message}}",
TimeRestrictions = new[]
{
new Opsgenie.Inputs.AlertPolicyTimeRestrictionArgs
{
Type = "weekday-and-time-of-day",
RestrictionList = new[]
{
new Opsgenie.Inputs.AlertPolicyTimeRestrictionRestrictionListArgs
{
EndDay = "monday",
EndHour = 7,
EndMin = 0,
StartDay = "sunday",
StartHour = 21,
StartMin = 0,
},
new Opsgenie.Inputs.AlertPolicyTimeRestrictionRestrictionListArgs
{
EndDay = "tuesday",
EndHour = 7,
EndMin = 0,
StartDay = "monday",
StartHour = 22,
StartMin = 0,
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opsgenie.Team;
import com.pulumi.opsgenie.TeamArgs;
import com.pulumi.opsgenie.AlertPolicy;
import com.pulumi.opsgenie.AlertPolicyArgs;
import com.pulumi.opsgenie.inputs.AlertPolicyFilterArgs;
import com.pulumi.opsgenie.inputs.AlertPolicyTimeRestrictionArgs;
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 test = new Team("test", TeamArgs.builder()
.name("example team")
.description("This team deals with all the things")
.build());
var testAlertPolicy = new AlertPolicy("testAlertPolicy", AlertPolicyArgs.builder()
.filters()
.name("example policy")
.teamId(test.id())
.policyDescription("This is sample policy")
.message("{{message}}")
.timeRestrictions(AlertPolicyTimeRestrictionArgs.builder()
.type("weekday-and-time-of-day")
.restrictionList(
AlertPolicyTimeRestrictionRestrictionListArgs.builder()
.endDay("monday")
.endHour(7)
.endMin(0)
.startDay("sunday")
.startHour(21)
.startMin(0)
.build(),
AlertPolicyTimeRestrictionRestrictionListArgs.builder()
.endDay("tuesday")
.endHour(7)
.endMin(0)
.startDay("monday")
.startHour(22)
.startMin(0)
.build())
.build())
.build());
}
}
resources:
test:
type: opsgenie:Team
properties:
name: example team
description: This team deals with all the things
testAlertPolicy:
type: opsgenie:AlertPolicy
name: test
properties:
filters:
- {}
name: example policy
teamId: ${test.id}
policyDescription: This is sample policy
message: '{{message}}'
timeRestrictions:
- type: weekday-and-time-of-day
restrictionList:
- endDay: monday
endHour: 7
endMin: 0
startDay: sunday
startHour: 21
startMin: 0
- endDay: tuesday
endHour: 7
endMin: 0
startDay: monday
startHour: 22
startMin: 0
Create AlertPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AlertPolicy(name: string, args: AlertPolicyArgs, opts?: CustomResourceOptions);
@overload
def AlertPolicy(resource_name: str,
args: AlertPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AlertPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
message: Optional[str] = None,
ignore_original_tags: Optional[bool] = None,
time_restrictions: Optional[Sequence[AlertPolicyTimeRestrictionArgs]] = None,
ignore_original_responders: Optional[bool] = None,
enabled: Optional[bool] = None,
entity: Optional[str] = None,
filters: Optional[Sequence[AlertPolicyFilterArgs]] = None,
ignore_original_actions: Optional[bool] = None,
ignore_original_details: Optional[bool] = None,
continue_policy: Optional[bool] = None,
alias: Optional[str] = None,
name: Optional[str] = None,
alert_description: Optional[str] = None,
policy_description: Optional[str] = None,
priority: Optional[str] = None,
responders: Optional[Sequence[AlertPolicyResponderArgs]] = None,
source: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
team_id: Optional[str] = None,
actions: Optional[Sequence[str]] = None)
func NewAlertPolicy(ctx *Context, name string, args AlertPolicyArgs, opts ...ResourceOption) (*AlertPolicy, error)
public AlertPolicy(string name, AlertPolicyArgs args, CustomResourceOptions? opts = null)
public AlertPolicy(String name, AlertPolicyArgs args)
public AlertPolicy(String name, AlertPolicyArgs args, CustomResourceOptions options)
type: opsgenie:AlertPolicy
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 AlertPolicyArgs
- 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 AlertPolicyArgs
- 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 AlertPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlertPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlertPolicyArgs
- 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 alertPolicyResource = new Opsgenie.AlertPolicy("alertPolicyResource", new()
{
Message = "string",
IgnoreOriginalTags = false,
TimeRestrictions = new[]
{
new Opsgenie.Inputs.AlertPolicyTimeRestrictionArgs
{
Type = "string",
Restriction = new[]
{
new Opsgenie.Inputs.AlertPolicyTimeRestrictionRestrictionArgs
{
EndHour = 0,
EndMin = 0,
StartHour = 0,
StartMin = 0,
},
},
RestrictionList = new[]
{
new Opsgenie.Inputs.AlertPolicyTimeRestrictionRestrictionListArgs
{
EndDay = "string",
EndHour = 0,
EndMin = 0,
StartDay = "string",
StartHour = 0,
StartMin = 0,
},
},
},
},
IgnoreOriginalResponders = false,
Enabled = false,
Entity = "string",
Filters = new[]
{
new Opsgenie.Inputs.AlertPolicyFilterArgs
{
Conditions = new[]
{
new Opsgenie.Inputs.AlertPolicyFilterConditionArgs
{
Field = "string",
Operation = "string",
ExpectedValue = "string",
Key = "string",
Not = false,
Order = 0,
},
},
Type = "string",
},
},
IgnoreOriginalActions = false,
IgnoreOriginalDetails = false,
ContinuePolicy = false,
Alias = "string",
Name = "string",
AlertDescription = "string",
PolicyDescription = "string",
Priority = "string",
Responders = new[]
{
new Opsgenie.Inputs.AlertPolicyResponderArgs
{
Id = "string",
Type = "string",
Name = "string",
Username = "string",
},
},
Source = "string",
Tags = new[]
{
"string",
},
TeamId = "string",
Actions = new[]
{
"string",
},
});
example, err := opsgenie.NewAlertPolicy(ctx, "alertPolicyResource", &opsgenie.AlertPolicyArgs{
Message: pulumi.String("string"),
IgnoreOriginalTags: pulumi.Bool(false),
TimeRestrictions: opsgenie.AlertPolicyTimeRestrictionArray{
&opsgenie.AlertPolicyTimeRestrictionArgs{
Type: pulumi.String("string"),
Restriction: opsgenie.AlertPolicyTimeRestrictionRestrictionArray{
&opsgenie.AlertPolicyTimeRestrictionRestrictionArgs{
EndHour: pulumi.Int(0),
EndMin: pulumi.Int(0),
StartHour: pulumi.Int(0),
StartMin: pulumi.Int(0),
},
},
RestrictionList: opsgenie.AlertPolicyTimeRestrictionRestrictionListArray{
&opsgenie.AlertPolicyTimeRestrictionRestrictionListArgs{
EndDay: pulumi.String("string"),
EndHour: pulumi.Int(0),
EndMin: pulumi.Int(0),
StartDay: pulumi.String("string"),
StartHour: pulumi.Int(0),
StartMin: pulumi.Int(0),
},
},
},
},
IgnoreOriginalResponders: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
Entity: pulumi.String("string"),
Filters: opsgenie.AlertPolicyFilterArray{
&opsgenie.AlertPolicyFilterArgs{
Conditions: opsgenie.AlertPolicyFilterConditionArray{
&opsgenie.AlertPolicyFilterConditionArgs{
Field: pulumi.String("string"),
Operation: pulumi.String("string"),
ExpectedValue: pulumi.String("string"),
Key: pulumi.String("string"),
Not: pulumi.Bool(false),
Order: pulumi.Int(0),
},
},
Type: pulumi.String("string"),
},
},
IgnoreOriginalActions: pulumi.Bool(false),
IgnoreOriginalDetails: pulumi.Bool(false),
ContinuePolicy: pulumi.Bool(false),
Alias: pulumi.String("string"),
Name: pulumi.String("string"),
AlertDescription: pulumi.String("string"),
PolicyDescription: pulumi.String("string"),
Priority: pulumi.String("string"),
Responders: opsgenie.AlertPolicyResponderArray{
&opsgenie.AlertPolicyResponderArgs{
Id: pulumi.String("string"),
Type: pulumi.String("string"),
Name: pulumi.String("string"),
Username: pulumi.String("string"),
},
},
Source: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
TeamId: pulumi.String("string"),
Actions: pulumi.StringArray{
pulumi.String("string"),
},
})
var alertPolicyResource = new AlertPolicy("alertPolicyResource", AlertPolicyArgs.builder()
.message("string")
.ignoreOriginalTags(false)
.timeRestrictions(AlertPolicyTimeRestrictionArgs.builder()
.type("string")
.restriction(AlertPolicyTimeRestrictionRestrictionArgs.builder()
.endHour(0)
.endMin(0)
.startHour(0)
.startMin(0)
.build())
.restrictionList(AlertPolicyTimeRestrictionRestrictionListArgs.builder()
.endDay("string")
.endHour(0)
.endMin(0)
.startDay("string")
.startHour(0)
.startMin(0)
.build())
.build())
.ignoreOriginalResponders(false)
.enabled(false)
.entity("string")
.filters(AlertPolicyFilterArgs.builder()
.conditions(AlertPolicyFilterConditionArgs.builder()
.field("string")
.operation("string")
.expectedValue("string")
.key("string")
.not(false)
.order(0)
.build())
.type("string")
.build())
.ignoreOriginalActions(false)
.ignoreOriginalDetails(false)
.continuePolicy(false)
.alias("string")
.name("string")
.alertDescription("string")
.policyDescription("string")
.priority("string")
.responders(AlertPolicyResponderArgs.builder()
.id("string")
.type("string")
.name("string")
.username("string")
.build())
.source("string")
.tags("string")
.teamId("string")
.actions("string")
.build());
alert_policy_resource = opsgenie.AlertPolicy("alertPolicyResource",
message="string",
ignore_original_tags=False,
time_restrictions=[{
"type": "string",
"restriction": [{
"end_hour": 0,
"end_min": 0,
"start_hour": 0,
"start_min": 0,
}],
"restriction_list": [{
"end_day": "string",
"end_hour": 0,
"end_min": 0,
"start_day": "string",
"start_hour": 0,
"start_min": 0,
}],
}],
ignore_original_responders=False,
enabled=False,
entity="string",
filters=[{
"conditions": [{
"field": "string",
"operation": "string",
"expected_value": "string",
"key": "string",
"not_": False,
"order": 0,
}],
"type": "string",
}],
ignore_original_actions=False,
ignore_original_details=False,
continue_policy=False,
alias="string",
name="string",
alert_description="string",
policy_description="string",
priority="string",
responders=[{
"id": "string",
"type": "string",
"name": "string",
"username": "string",
}],
source="string",
tags=["string"],
team_id="string",
actions=["string"])
const alertPolicyResource = new opsgenie.AlertPolicy("alertPolicyResource", {
message: "string",
ignoreOriginalTags: false,
timeRestrictions: [{
type: "string",
restriction: [{
endHour: 0,
endMin: 0,
startHour: 0,
startMin: 0,
}],
restrictionList: [{
endDay: "string",
endHour: 0,
endMin: 0,
startDay: "string",
startHour: 0,
startMin: 0,
}],
}],
ignoreOriginalResponders: false,
enabled: false,
entity: "string",
filters: [{
conditions: [{
field: "string",
operation: "string",
expectedValue: "string",
key: "string",
not: false,
order: 0,
}],
type: "string",
}],
ignoreOriginalActions: false,
ignoreOriginalDetails: false,
continuePolicy: false,
alias: "string",
name: "string",
alertDescription: "string",
policyDescription: "string",
priority: "string",
responders: [{
id: "string",
type: "string",
name: "string",
username: "string",
}],
source: "string",
tags: ["string"],
teamId: "string",
actions: ["string"],
});
type: opsgenie:AlertPolicy
properties:
actions:
- string
alertDescription: string
alias: string
continuePolicy: false
enabled: false
entity: string
filters:
- conditions:
- expectedValue: string
field: string
key: string
not: false
operation: string
order: 0
type: string
ignoreOriginalActions: false
ignoreOriginalDetails: false
ignoreOriginalResponders: false
ignoreOriginalTags: false
message: string
name: string
policyDescription: string
priority: string
responders:
- id: string
name: string
type: string
username: string
source: string
tags:
- string
teamId: string
timeRestrictions:
- restriction:
- endHour: 0
endMin: 0
startHour: 0
startMin: 0
restrictionList:
- endDay: string
endHour: 0
endMin: 0
startDay: string
startHour: 0
startMin: 0
type: string
AlertPolicy 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 AlertPolicy resource accepts the following input properties:
- Message string
- Message of the alerts
- Actions List<string>
- Actions to add to the alerts original actions value as a list of strings. If
ignore_original_actions
field is set totrue
, this will replace the original actions. - Alert
Description string - Description of the alert. You can use
{{description}}
to refer to the original alert description. Default:{{description}}
- Alias string
- Alias of the alert. You can use
{{alias}}
to refer to the original alias. Default:{{alias}}
- Continue
Policy bool - It will trigger other modify policies if set to
true
. Default:false
- Enabled bool
- If policy should be enabled. Default:
true
- Entity string
- Entity field of the alert. You can use
{{entity}}
to refer to the original entity. Default:{{entity}}
- Filters
List<Alert
Policy Filter> - A alert filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - Ignore
Original boolActions - If set to
true
, policy will ignore the original actions of the alert. Default:false
- Ignore
Original boolDetails - If set to
true
, policy will ignore the original details of the alert. Default:false
- Ignore
Original boolResponders - If set to
true
, policy will ignore the original responders of the alert. Default:false
- bool
- If set to
true
, policy will ignore the original tags of the alert. Default:false
- Name string
- Name of the alert policy
- Policy
Description string - Description of the policy. This can be max 512 characters.
- Priority string
- Priority of the alert. Should be one of
P1
,P2
,P3
,P4
, orP5
- Responders
List<Alert
Policy Responder> - Responders to add to the alerts original responders value as a list of teams, users or the reserved word none or all. If
ignore_original_responders
field is set totrue
, this will replace the original responders. The possible values for responders are:user
,team
,escalation
,schedule
. This is a block, structure is documented below. - Source string
- Source field of the alert. You can use
{{source}}
to refer to the original source. Default:{{source}}
- List<string>
- Tags to add to the alerts original tags value as a list of strings. If
ignore_original_responders
field is set totrue
, this will replace the original responders. - Team
Id string - Id of team that this policy belongs to.
- Time
Restrictions List<AlertPolicy Time Restriction> - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
- Message string
- Message of the alerts
- Actions []string
- Actions to add to the alerts original actions value as a list of strings. If
ignore_original_actions
field is set totrue
, this will replace the original actions. - Alert
Description string - Description of the alert. You can use
{{description}}
to refer to the original alert description. Default:{{description}}
- Alias string
- Alias of the alert. You can use
{{alias}}
to refer to the original alias. Default:{{alias}}
- Continue
Policy bool - It will trigger other modify policies if set to
true
. Default:false
- Enabled bool
- If policy should be enabled. Default:
true
- Entity string
- Entity field of the alert. You can use
{{entity}}
to refer to the original entity. Default:{{entity}}
- Filters
[]Alert
Policy Filter Args - A alert filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - Ignore
Original boolActions - If set to
true
, policy will ignore the original actions of the alert. Default:false
- Ignore
Original boolDetails - If set to
true
, policy will ignore the original details of the alert. Default:false
- Ignore
Original boolResponders - If set to
true
, policy will ignore the original responders of the alert. Default:false
- bool
- If set to
true
, policy will ignore the original tags of the alert. Default:false
- Name string
- Name of the alert policy
- Policy
Description string - Description of the policy. This can be max 512 characters.
- Priority string
- Priority of the alert. Should be one of
P1
,P2
,P3
,P4
, orP5
- Responders
[]Alert
Policy Responder Args - Responders to add to the alerts original responders value as a list of teams, users or the reserved word none or all. If
ignore_original_responders
field is set totrue
, this will replace the original responders. The possible values for responders are:user
,team
,escalation
,schedule
. This is a block, structure is documented below. - Source string
- Source field of the alert. You can use
{{source}}
to refer to the original source. Default:{{source}}
- []string
- Tags to add to the alerts original tags value as a list of strings. If
ignore_original_responders
field is set totrue
, this will replace the original responders. - Team
Id string - Id of team that this policy belongs to.
- Time
Restrictions []AlertPolicy Time Restriction Args - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
- message String
- Message of the alerts
- actions List<String>
- Actions to add to the alerts original actions value as a list of strings. If
ignore_original_actions
field is set totrue
, this will replace the original actions. - alert
Description String - Description of the alert. You can use
{{description}}
to refer to the original alert description. Default:{{description}}
- alias String
- Alias of the alert. You can use
{{alias}}
to refer to the original alias. Default:{{alias}}
- continue
Policy Boolean - It will trigger other modify policies if set to
true
. Default:false
- enabled Boolean
- If policy should be enabled. Default:
true
- entity String
- Entity field of the alert. You can use
{{entity}}
to refer to the original entity. Default:{{entity}}
- filters
List<Alert
Policy Filter> - A alert filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - ignore
Original BooleanActions - If set to
true
, policy will ignore the original actions of the alert. Default:false
- ignore
Original BooleanDetails - If set to
true
, policy will ignore the original details of the alert. Default:false
- ignore
Original BooleanResponders - If set to
true
, policy will ignore the original responders of the alert. Default:false
- Boolean
- If set to
true
, policy will ignore the original tags of the alert. Default:false
- name String
- Name of the alert policy
- policy
Description String - Description of the policy. This can be max 512 characters.
- priority String
- Priority of the alert. Should be one of
P1
,P2
,P3
,P4
, orP5
- responders
List<Alert
Policy Responder> - Responders to add to the alerts original responders value as a list of teams, users or the reserved word none or all. If
ignore_original_responders
field is set totrue
, this will replace the original responders. The possible values for responders are:user
,team
,escalation
,schedule
. This is a block, structure is documented below. - source String
- Source field of the alert. You can use
{{source}}
to refer to the original source. Default:{{source}}
- List<String>
- Tags to add to the alerts original tags value as a list of strings. If
ignore_original_responders
field is set totrue
, this will replace the original responders. - team
Id String - Id of team that this policy belongs to.
- time
Restrictions List<AlertPolicy Time Restriction> - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
- message string
- Message of the alerts
- actions string[]
- Actions to add to the alerts original actions value as a list of strings. If
ignore_original_actions
field is set totrue
, this will replace the original actions. - alert
Description string - Description of the alert. You can use
{{description}}
to refer to the original alert description. Default:{{description}}
- alias string
- Alias of the alert. You can use
{{alias}}
to refer to the original alias. Default:{{alias}}
- continue
Policy boolean - It will trigger other modify policies if set to
true
. Default:false
- enabled boolean
- If policy should be enabled. Default:
true
- entity string
- Entity field of the alert. You can use
{{entity}}
to refer to the original entity. Default:{{entity}}
- filters
Alert
Policy Filter[] - A alert filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - ignore
Original booleanActions - If set to
true
, policy will ignore the original actions of the alert. Default:false
- ignore
Original booleanDetails - If set to
true
, policy will ignore the original details of the alert. Default:false
- ignore
Original booleanResponders - If set to
true
, policy will ignore the original responders of the alert. Default:false
- boolean
- If set to
true
, policy will ignore the original tags of the alert. Default:false
- name string
- Name of the alert policy
- policy
Description string - Description of the policy. This can be max 512 characters.
- priority string
- Priority of the alert. Should be one of
P1
,P2
,P3
,P4
, orP5
- responders
Alert
Policy Responder[] - Responders to add to the alerts original responders value as a list of teams, users or the reserved word none or all. If
ignore_original_responders
field is set totrue
, this will replace the original responders. The possible values for responders are:user
,team
,escalation
,schedule
. This is a block, structure is documented below. - source string
- Source field of the alert. You can use
{{source}}
to refer to the original source. Default:{{source}}
- string[]
- Tags to add to the alerts original tags value as a list of strings. If
ignore_original_responders
field is set totrue
, this will replace the original responders. - team
Id string - Id of team that this policy belongs to.
- time
Restrictions AlertPolicy Time Restriction[] - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
- message str
- Message of the alerts
- actions Sequence[str]
- Actions to add to the alerts original actions value as a list of strings. If
ignore_original_actions
field is set totrue
, this will replace the original actions. - alert_
description str - Description of the alert. You can use
{{description}}
to refer to the original alert description. Default:{{description}}
- alias str
- Alias of the alert. You can use
{{alias}}
to refer to the original alias. Default:{{alias}}
- continue_
policy bool - It will trigger other modify policies if set to
true
. Default:false
- enabled bool
- If policy should be enabled. Default:
true
- entity str
- Entity field of the alert. You can use
{{entity}}
to refer to the original entity. Default:{{entity}}
- filters
Sequence[Alert
Policy Filter Args] - A alert filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - ignore_
original_ boolactions - If set to
true
, policy will ignore the original actions of the alert. Default:false
- ignore_
original_ booldetails - If set to
true
, policy will ignore the original details of the alert. Default:false
- ignore_
original_ boolresponders - If set to
true
, policy will ignore the original responders of the alert. Default:false
- bool
- If set to
true
, policy will ignore the original tags of the alert. Default:false
- name str
- Name of the alert policy
- policy_
description str - Description of the policy. This can be max 512 characters.
- priority str
- Priority of the alert. Should be one of
P1
,P2
,P3
,P4
, orP5
- responders
Sequence[Alert
Policy Responder Args] - Responders to add to the alerts original responders value as a list of teams, users or the reserved word none or all. If
ignore_original_responders
field is set totrue
, this will replace the original responders. The possible values for responders are:user
,team
,escalation
,schedule
. This is a block, structure is documented below. - source str
- Source field of the alert. You can use
{{source}}
to refer to the original source. Default:{{source}}
- Sequence[str]
- Tags to add to the alerts original tags value as a list of strings. If
ignore_original_responders
field is set totrue
, this will replace the original responders. - team_
id str - Id of team that this policy belongs to.
- time_
restrictions Sequence[AlertPolicy Time Restriction Args] - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
- message String
- Message of the alerts
- actions List<String>
- Actions to add to the alerts original actions value as a list of strings. If
ignore_original_actions
field is set totrue
, this will replace the original actions. - alert
Description String - Description of the alert. You can use
{{description}}
to refer to the original alert description. Default:{{description}}
- alias String
- Alias of the alert. You can use
{{alias}}
to refer to the original alias. Default:{{alias}}
- continue
Policy Boolean - It will trigger other modify policies if set to
true
. Default:false
- enabled Boolean
- If policy should be enabled. Default:
true
- entity String
- Entity field of the alert. You can use
{{entity}}
to refer to the original entity. Default:{{entity}}
- filters List<Property Map>
- A alert filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - ignore
Original BooleanActions - If set to
true
, policy will ignore the original actions of the alert. Default:false
- ignore
Original BooleanDetails - If set to
true
, policy will ignore the original details of the alert. Default:false
- ignore
Original BooleanResponders - If set to
true
, policy will ignore the original responders of the alert. Default:false
- Boolean
- If set to
true
, policy will ignore the original tags of the alert. Default:false
- name String
- Name of the alert policy
- policy
Description String - Description of the policy. This can be max 512 characters.
- priority String
- Priority of the alert. Should be one of
P1
,P2
,P3
,P4
, orP5
- responders List<Property Map>
- Responders to add to the alerts original responders value as a list of teams, users or the reserved word none or all. If
ignore_original_responders
field is set totrue
, this will replace the original responders. The possible values for responders are:user
,team
,escalation
,schedule
. This is a block, structure is documented below. - source String
- Source field of the alert. You can use
{{source}}
to refer to the original source. Default:{{source}}
- List<String>
- Tags to add to the alerts original tags value as a list of strings. If
ignore_original_responders
field is set totrue
, this will replace the original responders. - team
Id String - Id of team that this policy belongs to.
- time
Restrictions List<Property Map> - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the AlertPolicy 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 AlertPolicy Resource
Get an existing AlertPolicy 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?: AlertPolicyState, opts?: CustomResourceOptions): AlertPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
actions: Optional[Sequence[str]] = None,
alert_description: Optional[str] = None,
alias: Optional[str] = None,
continue_policy: Optional[bool] = None,
enabled: Optional[bool] = None,
entity: Optional[str] = None,
filters: Optional[Sequence[AlertPolicyFilterArgs]] = None,
ignore_original_actions: Optional[bool] = None,
ignore_original_details: Optional[bool] = None,
ignore_original_responders: Optional[bool] = None,
ignore_original_tags: Optional[bool] = None,
message: Optional[str] = None,
name: Optional[str] = None,
policy_description: Optional[str] = None,
priority: Optional[str] = None,
responders: Optional[Sequence[AlertPolicyResponderArgs]] = None,
source: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
team_id: Optional[str] = None,
time_restrictions: Optional[Sequence[AlertPolicyTimeRestrictionArgs]] = None) -> AlertPolicy
func GetAlertPolicy(ctx *Context, name string, id IDInput, state *AlertPolicyState, opts ...ResourceOption) (*AlertPolicy, error)
public static AlertPolicy Get(string name, Input<string> id, AlertPolicyState? state, CustomResourceOptions? opts = null)
public static AlertPolicy get(String name, Output<String> id, AlertPolicyState 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 List<string>
- Actions to add to the alerts original actions value as a list of strings. If
ignore_original_actions
field is set totrue
, this will replace the original actions. - Alert
Description string - Description of the alert. You can use
{{description}}
to refer to the original alert description. Default:{{description}}
- Alias string
- Alias of the alert. You can use
{{alias}}
to refer to the original alias. Default:{{alias}}
- Continue
Policy bool - It will trigger other modify policies if set to
true
. Default:false
- Enabled bool
- If policy should be enabled. Default:
true
- Entity string
- Entity field of the alert. You can use
{{entity}}
to refer to the original entity. Default:{{entity}}
- Filters
List<Alert
Policy Filter> - A alert filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - Ignore
Original boolActions - If set to
true
, policy will ignore the original actions of the alert. Default:false
- Ignore
Original boolDetails - If set to
true
, policy will ignore the original details of the alert. Default:false
- Ignore
Original boolResponders - If set to
true
, policy will ignore the original responders of the alert. Default:false
- bool
- If set to
true
, policy will ignore the original tags of the alert. Default:false
- Message string
- Message of the alerts
- Name string
- Name of the alert policy
- Policy
Description string - Description of the policy. This can be max 512 characters.
- Priority string
- Priority of the alert. Should be one of
P1
,P2
,P3
,P4
, orP5
- Responders
List<Alert
Policy Responder> - Responders to add to the alerts original responders value as a list of teams, users or the reserved word none or all. If
ignore_original_responders
field is set totrue
, this will replace the original responders. The possible values for responders are:user
,team
,escalation
,schedule
. This is a block, structure is documented below. - Source string
- Source field of the alert. You can use
{{source}}
to refer to the original source. Default:{{source}}
- List<string>
- Tags to add to the alerts original tags value as a list of strings. If
ignore_original_responders
field is set totrue
, this will replace the original responders. - Team
Id string - Id of team that this policy belongs to.
- Time
Restrictions List<AlertPolicy Time Restriction> - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
- Actions []string
- Actions to add to the alerts original actions value as a list of strings. If
ignore_original_actions
field is set totrue
, this will replace the original actions. - Alert
Description string - Description of the alert. You can use
{{description}}
to refer to the original alert description. Default:{{description}}
- Alias string
- Alias of the alert. You can use
{{alias}}
to refer to the original alias. Default:{{alias}}
- Continue
Policy bool - It will trigger other modify policies if set to
true
. Default:false
- Enabled bool
- If policy should be enabled. Default:
true
- Entity string
- Entity field of the alert. You can use
{{entity}}
to refer to the original entity. Default:{{entity}}
- Filters
[]Alert
Policy Filter Args - A alert filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - Ignore
Original boolActions - If set to
true
, policy will ignore the original actions of the alert. Default:false
- Ignore
Original boolDetails - If set to
true
, policy will ignore the original details of the alert. Default:false
- Ignore
Original boolResponders - If set to
true
, policy will ignore the original responders of the alert. Default:false
- bool
- If set to
true
, policy will ignore the original tags of the alert. Default:false
- Message string
- Message of the alerts
- Name string
- Name of the alert policy
- Policy
Description string - Description of the policy. This can be max 512 characters.
- Priority string
- Priority of the alert. Should be one of
P1
,P2
,P3
,P4
, orP5
- Responders
[]Alert
Policy Responder Args - Responders to add to the alerts original responders value as a list of teams, users or the reserved word none or all. If
ignore_original_responders
field is set totrue
, this will replace the original responders. The possible values for responders are:user
,team
,escalation
,schedule
. This is a block, structure is documented below. - Source string
- Source field of the alert. You can use
{{source}}
to refer to the original source. Default:{{source}}
- []string
- Tags to add to the alerts original tags value as a list of strings. If
ignore_original_responders
field is set totrue
, this will replace the original responders. - Team
Id string - Id of team that this policy belongs to.
- Time
Restrictions []AlertPolicy Time Restriction Args - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
- actions List<String>
- Actions to add to the alerts original actions value as a list of strings. If
ignore_original_actions
field is set totrue
, this will replace the original actions. - alert
Description String - Description of the alert. You can use
{{description}}
to refer to the original alert description. Default:{{description}}
- alias String
- Alias of the alert. You can use
{{alias}}
to refer to the original alias. Default:{{alias}}
- continue
Policy Boolean - It will trigger other modify policies if set to
true
. Default:false
- enabled Boolean
- If policy should be enabled. Default:
true
- entity String
- Entity field of the alert. You can use
{{entity}}
to refer to the original entity. Default:{{entity}}
- filters
List<Alert
Policy Filter> - A alert filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - ignore
Original BooleanActions - If set to
true
, policy will ignore the original actions of the alert. Default:false
- ignore
Original BooleanDetails - If set to
true
, policy will ignore the original details of the alert. Default:false
- ignore
Original BooleanResponders - If set to
true
, policy will ignore the original responders of the alert. Default:false
- Boolean
- If set to
true
, policy will ignore the original tags of the alert. Default:false
- message String
- Message of the alerts
- name String
- Name of the alert policy
- policy
Description String - Description of the policy. This can be max 512 characters.
- priority String
- Priority of the alert. Should be one of
P1
,P2
,P3
,P4
, orP5
- responders
List<Alert
Policy Responder> - Responders to add to the alerts original responders value as a list of teams, users or the reserved word none or all. If
ignore_original_responders
field is set totrue
, this will replace the original responders. The possible values for responders are:user
,team
,escalation
,schedule
. This is a block, structure is documented below. - source String
- Source field of the alert. You can use
{{source}}
to refer to the original source. Default:{{source}}
- List<String>
- Tags to add to the alerts original tags value as a list of strings. If
ignore_original_responders
field is set totrue
, this will replace the original responders. - team
Id String - Id of team that this policy belongs to.
- time
Restrictions List<AlertPolicy Time Restriction> - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
- actions string[]
- Actions to add to the alerts original actions value as a list of strings. If
ignore_original_actions
field is set totrue
, this will replace the original actions. - alert
Description string - Description of the alert. You can use
{{description}}
to refer to the original alert description. Default:{{description}}
- alias string
- Alias of the alert. You can use
{{alias}}
to refer to the original alias. Default:{{alias}}
- continue
Policy boolean - It will trigger other modify policies if set to
true
. Default:false
- enabled boolean
- If policy should be enabled. Default:
true
- entity string
- Entity field of the alert. You can use
{{entity}}
to refer to the original entity. Default:{{entity}}
- filters
Alert
Policy Filter[] - A alert filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - ignore
Original booleanActions - If set to
true
, policy will ignore the original actions of the alert. Default:false
- ignore
Original booleanDetails - If set to
true
, policy will ignore the original details of the alert. Default:false
- ignore
Original booleanResponders - If set to
true
, policy will ignore the original responders of the alert. Default:false
- boolean
- If set to
true
, policy will ignore the original tags of the alert. Default:false
- message string
- Message of the alerts
- name string
- Name of the alert policy
- policy
Description string - Description of the policy. This can be max 512 characters.
- priority string
- Priority of the alert. Should be one of
P1
,P2
,P3
,P4
, orP5
- responders
Alert
Policy Responder[] - Responders to add to the alerts original responders value as a list of teams, users or the reserved word none or all. If
ignore_original_responders
field is set totrue
, this will replace the original responders. The possible values for responders are:user
,team
,escalation
,schedule
. This is a block, structure is documented below. - source string
- Source field of the alert. You can use
{{source}}
to refer to the original source. Default:{{source}}
- string[]
- Tags to add to the alerts original tags value as a list of strings. If
ignore_original_responders
field is set totrue
, this will replace the original responders. - team
Id string - Id of team that this policy belongs to.
- time
Restrictions AlertPolicy Time Restriction[] - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
- actions Sequence[str]
- Actions to add to the alerts original actions value as a list of strings. If
ignore_original_actions
field is set totrue
, this will replace the original actions. - alert_
description str - Description of the alert. You can use
{{description}}
to refer to the original alert description. Default:{{description}}
- alias str
- Alias of the alert. You can use
{{alias}}
to refer to the original alias. Default:{{alias}}
- continue_
policy bool - It will trigger other modify policies if set to
true
. Default:false
- enabled bool
- If policy should be enabled. Default:
true
- entity str
- Entity field of the alert. You can use
{{entity}}
to refer to the original entity. Default:{{entity}}
- filters
Sequence[Alert
Policy Filter Args] - A alert filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - ignore_
original_ boolactions - If set to
true
, policy will ignore the original actions of the alert. Default:false
- ignore_
original_ booldetails - If set to
true
, policy will ignore the original details of the alert. Default:false
- ignore_
original_ boolresponders - If set to
true
, policy will ignore the original responders of the alert. Default:false
- bool
- If set to
true
, policy will ignore the original tags of the alert. Default:false
- message str
- Message of the alerts
- name str
- Name of the alert policy
- policy_
description str - Description of the policy. This can be max 512 characters.
- priority str
- Priority of the alert. Should be one of
P1
,P2
,P3
,P4
, orP5
- responders
Sequence[Alert
Policy Responder Args] - Responders to add to the alerts original responders value as a list of teams, users or the reserved word none or all. If
ignore_original_responders
field is set totrue
, this will replace the original responders. The possible values for responders are:user
,team
,escalation
,schedule
. This is a block, structure is documented below. - source str
- Source field of the alert. You can use
{{source}}
to refer to the original source. Default:{{source}}
- Sequence[str]
- Tags to add to the alerts original tags value as a list of strings. If
ignore_original_responders
field is set totrue
, this will replace the original responders. - team_
id str - Id of team that this policy belongs to.
- time_
restrictions Sequence[AlertPolicy Time Restriction Args] - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
- actions List<String>
- Actions to add to the alerts original actions value as a list of strings. If
ignore_original_actions
field is set totrue
, this will replace the original actions. - alert
Description String - Description of the alert. You can use
{{description}}
to refer to the original alert description. Default:{{description}}
- alias String
- Alias of the alert. You can use
{{alias}}
to refer to the original alias. Default:{{alias}}
- continue
Policy Boolean - It will trigger other modify policies if set to
true
. Default:false
- enabled Boolean
- If policy should be enabled. Default:
true
- entity String
- Entity field of the alert. You can use
{{entity}}
to refer to the original entity. Default:{{entity}}
- filters List<Property Map>
- A alert filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - ignore
Original BooleanActions - If set to
true
, policy will ignore the original actions of the alert. Default:false
- ignore
Original BooleanDetails - If set to
true
, policy will ignore the original details of the alert. Default:false
- ignore
Original BooleanResponders - If set to
true
, policy will ignore the original responders of the alert. Default:false
- Boolean
- If set to
true
, policy will ignore the original tags of the alert. Default:false
- message String
- Message of the alerts
- name String
- Name of the alert policy
- policy
Description String - Description of the policy. This can be max 512 characters.
- priority String
- Priority of the alert. Should be one of
P1
,P2
,P3
,P4
, orP5
- responders List<Property Map>
- Responders to add to the alerts original responders value as a list of teams, users or the reserved word none or all. If
ignore_original_responders
field is set totrue
, this will replace the original responders. The possible values for responders are:user
,team
,escalation
,schedule
. This is a block, structure is documented below. - source String
- Source field of the alert. You can use
{{source}}
to refer to the original source. Default:{{source}}
- List<String>
- Tags to add to the alerts original tags value as a list of strings. If
ignore_original_responders
field is set totrue
, this will replace the original responders. - team
Id String - Id of team that this policy belongs to.
- time
Restrictions List<Property Map> - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
Supporting Types
AlertPolicyFilter, AlertPolicyFilterArgs
- Conditions
List<Alert
Policy Filter Condition> - Conditions applied to filter. This is a block, structure is documented below.
- Type string
- A filter type, supported types are:
match-all
,match-any-condition
,match-all-conditions
. Default:match-all
- Conditions
[]Alert
Policy Filter Condition - Conditions applied to filter. This is a block, structure is documented below.
- Type string
- A filter type, supported types are:
match-all
,match-any-condition
,match-all-conditions
. Default:match-all
- conditions
List<Alert
Policy Filter Condition> - Conditions applied to filter. This is a block, structure is documented below.
- type String
- A filter type, supported types are:
match-all
,match-any-condition
,match-all-conditions
. Default:match-all
- conditions
Alert
Policy Filter Condition[] - Conditions applied to filter. This is a block, structure is documented below.
- type string
- A filter type, supported types are:
match-all
,match-any-condition
,match-all-conditions
. Default:match-all
- conditions
Sequence[Alert
Policy Filter Condition] - Conditions applied to filter. This is a block, structure is documented below.
- type str
- A filter type, supported types are:
match-all
,match-any-condition
,match-all-conditions
. Default:match-all
- conditions List<Property Map>
- Conditions applied to filter. This is a block, structure is documented below.
- type String
- A filter type, supported types are:
match-all
,match-any-condition
,match-all-conditions
. Default:match-all
AlertPolicyFilterCondition, AlertPolicyFilterConditionArgs
- Field string
- Specifies which alert field will be used in condition. Possible values are
message
,alias
,description
,source
,entity
,tags
,actions
,details
,extra-properties
,responders
,teams
,priority
- Operation string
- It is the operation that will be executed for the given field and key. Possible operations are
matches
,contains
,starts-with
,ends-with
,equals
,contains-key
,contains-value
,greater-than
,less-than
,is-empty
,equals-ignore-whitespace
. - Expected
Value string - User defined value that will be compared with alert field according to the operation. Default: empty string
- Key string
- If
field
is set as extra-properties, key could be used for key-value pair - Not bool
- Indicates behaviour of the given operation. Default:
false
- Order int
- Order of the condition in conditions list
- Field string
- Specifies which alert field will be used in condition. Possible values are
message
,alias
,description
,source
,entity
,tags
,actions
,details
,extra-properties
,responders
,teams
,priority
- Operation string
- It is the operation that will be executed for the given field and key. Possible operations are
matches
,contains
,starts-with
,ends-with
,equals
,contains-key
,contains-value
,greater-than
,less-than
,is-empty
,equals-ignore-whitespace
. - Expected
Value string - User defined value that will be compared with alert field according to the operation. Default: empty string
- Key string
- If
field
is set as extra-properties, key could be used for key-value pair - Not bool
- Indicates behaviour of the given operation. Default:
false
- Order int
- Order of the condition in conditions list
- field String
- Specifies which alert field will be used in condition. Possible values are
message
,alias
,description
,source
,entity
,tags
,actions
,details
,extra-properties
,responders
,teams
,priority
- operation String
- It is the operation that will be executed for the given field and key. Possible operations are
matches
,contains
,starts-with
,ends-with
,equals
,contains-key
,contains-value
,greater-than
,less-than
,is-empty
,equals-ignore-whitespace
. - expected
Value String - User defined value that will be compared with alert field according to the operation. Default: empty string
- key String
- If
field
is set as extra-properties, key could be used for key-value pair - not Boolean
- Indicates behaviour of the given operation. Default:
false
- order Integer
- Order of the condition in conditions list
- field string
- Specifies which alert field will be used in condition. Possible values are
message
,alias
,description
,source
,entity
,tags
,actions
,details
,extra-properties
,responders
,teams
,priority
- operation string
- It is the operation that will be executed for the given field and key. Possible operations are
matches
,contains
,starts-with
,ends-with
,equals
,contains-key
,contains-value
,greater-than
,less-than
,is-empty
,equals-ignore-whitespace
. - expected
Value string - User defined value that will be compared with alert field according to the operation. Default: empty string
- key string
- If
field
is set as extra-properties, key could be used for key-value pair - not boolean
- Indicates behaviour of the given operation. Default:
false
- order number
- Order of the condition in conditions list
- field str
- Specifies which alert field will be used in condition. Possible values are
message
,alias
,description
,source
,entity
,tags
,actions
,details
,extra-properties
,responders
,teams
,priority
- operation str
- It is the operation that will be executed for the given field and key. Possible operations are
matches
,contains
,starts-with
,ends-with
,equals
,contains-key
,contains-value
,greater-than
,less-than
,is-empty
,equals-ignore-whitespace
. - expected_
value str - User defined value that will be compared with alert field according to the operation. Default: empty string
- key str
- If
field
is set as extra-properties, key could be used for key-value pair - not_ bool
- Indicates behaviour of the given operation. Default:
false
- order int
- Order of the condition in conditions list
- field String
- Specifies which alert field will be used in condition. Possible values are
message
,alias
,description
,source
,entity
,tags
,actions
,details
,extra-properties
,responders
,teams
,priority
- operation String
- It is the operation that will be executed for the given field and key. Possible operations are
matches
,contains
,starts-with
,ends-with
,equals
,contains-key
,contains-value
,greater-than
,less-than
,is-empty
,equals-ignore-whitespace
. - expected
Value String - User defined value that will be compared with alert field according to the operation. Default: empty string
- key String
- If
field
is set as extra-properties, key could be used for key-value pair - not Boolean
- Indicates behaviour of the given operation. Default:
false
- order Number
- Order of the condition in conditions list
AlertPolicyResponder, AlertPolicyResponderArgs
AlertPolicyTimeRestriction, AlertPolicyTimeRestrictionArgs
- Type string
- Defines if restriction should apply daily on given hours or on certain days and hours. Possible values are:
time-of-day
,weekday-and-time-of-day
- Restriction
List<Alert
Policy Time Restriction Restriction> - A definition of hourly definition applied daily, this has to be used with combination: type =
time-of-day
. This is a block, structure is documented below. - Restriction
List List<AlertPolicy Time Restriction Restriction List> - List of days and hours definitions for field type =
weekday-and-time-of-day
. This is a block, structure is documented below.
- Type string
- Defines if restriction should apply daily on given hours or on certain days and hours. Possible values are:
time-of-day
,weekday-and-time-of-day
- Restriction
[]Alert
Policy Time Restriction Restriction - A definition of hourly definition applied daily, this has to be used with combination: type =
time-of-day
. This is a block, structure is documented below. - Restriction
List []AlertPolicy Time Restriction Restriction List - List of days and hours definitions for field type =
weekday-and-time-of-day
. This is a block, structure is documented below.
- type String
- Defines if restriction should apply daily on given hours or on certain days and hours. Possible values are:
time-of-day
,weekday-and-time-of-day
- restriction
List<Alert
Policy Time Restriction Restriction> - A definition of hourly definition applied daily, this has to be used with combination: type =
time-of-day
. This is a block, structure is documented below. - restriction
List List<AlertPolicy Time Restriction Restriction List> - List of days and hours definitions for field type =
weekday-and-time-of-day
. This is a block, structure is documented below.
- type string
- Defines if restriction should apply daily on given hours or on certain days and hours. Possible values are:
time-of-day
,weekday-and-time-of-day
- restriction
Alert
Policy Time Restriction Restriction[] - A definition of hourly definition applied daily, this has to be used with combination: type =
time-of-day
. This is a block, structure is documented below. - restriction
List AlertPolicy Time Restriction Restriction List[] - List of days and hours definitions for field type =
weekday-and-time-of-day
. This is a block, structure is documented below.
- type str
- Defines if restriction should apply daily on given hours or on certain days and hours. Possible values are:
time-of-day
,weekday-and-time-of-day
- restriction
Sequence[Alert
Policy Time Restriction Restriction] - A definition of hourly definition applied daily, this has to be used with combination: type =
time-of-day
. This is a block, structure is documented below. - restriction_
list Sequence[AlertPolicy Time Restriction Restriction List] - List of days and hours definitions for field type =
weekday-and-time-of-day
. This is a block, structure is documented below.
- type String
- Defines if restriction should apply daily on given hours or on certain days and hours. Possible values are:
time-of-day
,weekday-and-time-of-day
- restriction List<Property Map>
- A definition of hourly definition applied daily, this has to be used with combination: type =
time-of-day
. This is a block, structure is documented below. - restriction
List List<Property Map> - List of days and hours definitions for field type =
weekday-and-time-of-day
. This is a block, structure is documented below.
AlertPolicyTimeRestrictionRestriction, AlertPolicyTimeRestrictionRestrictionArgs
- end_
hour int - Ending hour of restriction.
- end_
min int - Ending minute of restriction on defined
end_hour
- start_
hour int - Starting hour of restriction.
- start_
min int - Staring minute of restriction on defined
start_hour
AlertPolicyTimeRestrictionRestrictionList, AlertPolicyTimeRestrictionRestrictionListArgs
- End
Day string - Ending day of restriction (eg.
wednesday
) - End
Hour int - Ending hour of restriction on defined
end_day
- End
Min int - Ending minute of restriction on defined
end_hour
- Start
Day string - Starting day of restriction (eg.
monday
) - Start
Hour int - Starting hour of restriction on defined
start_day
- Start
Min int - Staring minute of restriction on defined
start_hour
- End
Day string - Ending day of restriction (eg.
wednesday
) - End
Hour int - Ending hour of restriction on defined
end_day
- End
Min int - Ending minute of restriction on defined
end_hour
- Start
Day string - Starting day of restriction (eg.
monday
) - Start
Hour int - Starting hour of restriction on defined
start_day
- Start
Min int - Staring minute of restriction on defined
start_hour
- end
Day String - Ending day of restriction (eg.
wednesday
) - end
Hour Integer - Ending hour of restriction on defined
end_day
- end
Min Integer - Ending minute of restriction on defined
end_hour
- start
Day String - Starting day of restriction (eg.
monday
) - start
Hour Integer - Starting hour of restriction on defined
start_day
- start
Min Integer - Staring minute of restriction on defined
start_hour
- end
Day string - Ending day of restriction (eg.
wednesday
) - end
Hour number - Ending hour of restriction on defined
end_day
- end
Min number - Ending minute of restriction on defined
end_hour
- start
Day string - Starting day of restriction (eg.
monday
) - start
Hour number - Starting hour of restriction on defined
start_day
- start
Min number - Staring minute of restriction on defined
start_hour
- end_
day str - Ending day of restriction (eg.
wednesday
) - end_
hour int - Ending hour of restriction on defined
end_day
- end_
min int - Ending minute of restriction on defined
end_hour
- start_
day str - Starting day of restriction (eg.
monday
) - start_
hour int - Starting hour of restriction on defined
start_day
- start_
min int - Staring minute of restriction on defined
start_hour
- end
Day String - Ending day of restriction (eg.
wednesday
) - end
Hour Number - Ending hour of restriction on defined
end_day
- end
Min Number - Ending minute of restriction on defined
end_hour
- start
Day String - Starting day of restriction (eg.
monday
) - start
Hour Number - Starting hour of restriction on defined
start_day
- start
Min Number - Staring minute of restriction on defined
start_hour
Import
Alert policies can be imported using the team_id/policy_id
, e.g.
$ pulumi import opsgenie:index/alertPolicy:AlertPolicy test team_id/policy_id`
You can import global polices using only policy identifier
$ pulumi import opsgenie:index/alertPolicy:AlertPolicy test policy_id`
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Opsgenie pulumi/pulumi-opsgenie
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
opsgenie
Terraform Provider.