opsgenie.NotificationPolicy
Explore with Pulumi AI
Manages a Notification 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 testNotificationPolicy = new opsgenie.NotificationPolicy("test", {
filters: [{}],
name: "example policy",
teamId: test.id,
policyDescription: "This policy has a delay action",
delayActions: [{
delayOption: "next-time",
untilMinute: 1,
untilHour: 9,
}],
});
import pulumi
import pulumi_opsgenie as opsgenie
test = opsgenie.Team("test",
name="example team",
description="This team deals with all the things")
test_notification_policy = opsgenie.NotificationPolicy("test",
filters=[opsgenie.NotificationPolicyFilterArgs()],
name="example policy",
team_id=test.id,
policy_description="This policy has a delay action",
delay_actions=[opsgenie.NotificationPolicyDelayActionArgs(
delay_option="next-time",
until_minute=1,
until_hour=9,
)])
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.NewNotificationPolicy(ctx, "test", &opsgenie.NotificationPolicyArgs{
Filters: opsgenie.NotificationPolicyFilterArray{
nil,
},
Name: pulumi.String("example policy"),
TeamId: test.ID(),
PolicyDescription: pulumi.String("This policy has a delay action"),
DelayActions: opsgenie.NotificationPolicyDelayActionArray{
&opsgenie.NotificationPolicyDelayActionArgs{
DelayOption: pulumi.String("next-time"),
UntilMinute: pulumi.Int(1),
UntilHour: pulumi.Int(9),
},
},
})
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 testNotificationPolicy = new Opsgenie.NotificationPolicy("test", new()
{
Filters = new[]
{
null,
},
Name = "example policy",
TeamId = test.Id,
PolicyDescription = "This policy has a delay action",
DelayActions = new[]
{
new Opsgenie.Inputs.NotificationPolicyDelayActionArgs
{
DelayOption = "next-time",
UntilMinute = 1,
UntilHour = 9,
},
},
});
});
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.NotificationPolicy;
import com.pulumi.opsgenie.NotificationPolicyArgs;
import com.pulumi.opsgenie.inputs.NotificationPolicyFilterArgs;
import com.pulumi.opsgenie.inputs.NotificationPolicyDelayActionArgs;
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 testNotificationPolicy = new NotificationPolicy("testNotificationPolicy", NotificationPolicyArgs.builder()
.filters()
.name("example policy")
.teamId(test.id())
.policyDescription("This policy has a delay action")
.delayActions(NotificationPolicyDelayActionArgs.builder()
.delayOption("next-time")
.untilMinute(1)
.untilHour(9)
.build())
.build());
}
}
resources:
test:
type: opsgenie:Team
properties:
name: example team
description: This team deals with all the things
testNotificationPolicy:
type: opsgenie:NotificationPolicy
name: test
properties:
filters:
- {}
name: example policy
teamId: ${test.id}
policyDescription: This policy has a delay action
delayActions:
- delayOption: next-time
untilMinute: 1
untilHour: 9
Create NotificationPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NotificationPolicy(name: string, args: NotificationPolicyArgs, opts?: CustomResourceOptions);
@overload
def NotificationPolicy(resource_name: str,
args: NotificationPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NotificationPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
filters: Optional[Sequence[NotificationPolicyFilterArgs]] = None,
team_id: Optional[str] = None,
auto_close_actions: Optional[Sequence[NotificationPolicyAutoCloseActionArgs]] = None,
auto_restart_actions: Optional[Sequence[NotificationPolicyAutoRestartActionArgs]] = None,
de_duplication_actions: Optional[Sequence[NotificationPolicyDeDuplicationActionArgs]] = None,
delay_actions: Optional[Sequence[NotificationPolicyDelayActionArgs]] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
policy_description: Optional[str] = None,
suppress: Optional[bool] = None,
time_restrictions: Optional[Sequence[NotificationPolicyTimeRestrictionArgs]] = None)
func NewNotificationPolicy(ctx *Context, name string, args NotificationPolicyArgs, opts ...ResourceOption) (*NotificationPolicy, error)
public NotificationPolicy(string name, NotificationPolicyArgs args, CustomResourceOptions? opts = null)
public NotificationPolicy(String name, NotificationPolicyArgs args)
public NotificationPolicy(String name, NotificationPolicyArgs args, CustomResourceOptions options)
type: opsgenie:NotificationPolicy
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 NotificationPolicyArgs
- 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 NotificationPolicyArgs
- 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 NotificationPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NotificationPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NotificationPolicyArgs
- 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 notificationPolicyResource = new Opsgenie.NotificationPolicy("notificationPolicyResource", new()
{
Filters = new[]
{
new Opsgenie.Inputs.NotificationPolicyFilterArgs
{
Conditions = new[]
{
new Opsgenie.Inputs.NotificationPolicyFilterConditionArgs
{
Field = "string",
Operation = "string",
ExpectedValue = "string",
Key = "string",
Not = false,
Order = 0,
},
},
Type = "string",
},
},
TeamId = "string",
AutoCloseActions = new[]
{
new Opsgenie.Inputs.NotificationPolicyAutoCloseActionArgs
{
Durations = new[]
{
new Opsgenie.Inputs.NotificationPolicyAutoCloseActionDurationArgs
{
TimeAmount = 0,
TimeUnit = "string",
},
},
},
},
AutoRestartActions = new[]
{
new Opsgenie.Inputs.NotificationPolicyAutoRestartActionArgs
{
Durations = new[]
{
new Opsgenie.Inputs.NotificationPolicyAutoRestartActionDurationArgs
{
TimeAmount = 0,
TimeUnit = "string",
},
},
MaxRepeatCount = 0,
},
},
DeDuplicationActions = new[]
{
new Opsgenie.Inputs.NotificationPolicyDeDuplicationActionArgs
{
Count = 0,
DeDuplicationActionType = "string",
Durations = new[]
{
new Opsgenie.Inputs.NotificationPolicyDeDuplicationActionDurationArgs
{
TimeAmount = 0,
TimeUnit = "string",
},
},
},
},
DelayActions = new[]
{
new Opsgenie.Inputs.NotificationPolicyDelayActionArgs
{
DelayOption = "string",
Durations = new[]
{
new Opsgenie.Inputs.NotificationPolicyDelayActionDurationArgs
{
TimeAmount = 0,
TimeUnit = "string",
},
},
UntilHour = 0,
UntilMinute = 0,
},
},
Enabled = false,
Name = "string",
PolicyDescription = "string",
Suppress = false,
TimeRestrictions = new[]
{
new Opsgenie.Inputs.NotificationPolicyTimeRestrictionArgs
{
Type = "string",
Restriction = new[]
{
new Opsgenie.Inputs.NotificationPolicyTimeRestrictionRestrictionArgs
{
EndHour = 0,
EndMin = 0,
StartHour = 0,
StartMin = 0,
},
},
RestrictionList = new[]
{
new Opsgenie.Inputs.NotificationPolicyTimeRestrictionRestrictionListArgs
{
EndDay = "string",
EndHour = 0,
EndMin = 0,
StartDay = "string",
StartHour = 0,
StartMin = 0,
},
},
},
},
});
example, err := opsgenie.NewNotificationPolicy(ctx, "notificationPolicyResource", &opsgenie.NotificationPolicyArgs{
Filters: opsgenie.NotificationPolicyFilterArray{
&opsgenie.NotificationPolicyFilterArgs{
Conditions: opsgenie.NotificationPolicyFilterConditionArray{
&opsgenie.NotificationPolicyFilterConditionArgs{
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"),
},
},
TeamId: pulumi.String("string"),
AutoCloseActions: opsgenie.NotificationPolicyAutoCloseActionArray{
&opsgenie.NotificationPolicyAutoCloseActionArgs{
Durations: opsgenie.NotificationPolicyAutoCloseActionDurationArray{
&opsgenie.NotificationPolicyAutoCloseActionDurationArgs{
TimeAmount: pulumi.Int(0),
TimeUnit: pulumi.String("string"),
},
},
},
},
AutoRestartActions: opsgenie.NotificationPolicyAutoRestartActionArray{
&opsgenie.NotificationPolicyAutoRestartActionArgs{
Durations: opsgenie.NotificationPolicyAutoRestartActionDurationArray{
&opsgenie.NotificationPolicyAutoRestartActionDurationArgs{
TimeAmount: pulumi.Int(0),
TimeUnit: pulumi.String("string"),
},
},
MaxRepeatCount: pulumi.Int(0),
},
},
DeDuplicationActions: opsgenie.NotificationPolicyDeDuplicationActionArray{
&opsgenie.NotificationPolicyDeDuplicationActionArgs{
Count: pulumi.Int(0),
DeDuplicationActionType: pulumi.String("string"),
Durations: opsgenie.NotificationPolicyDeDuplicationActionDurationArray{
&opsgenie.NotificationPolicyDeDuplicationActionDurationArgs{
TimeAmount: pulumi.Int(0),
TimeUnit: pulumi.String("string"),
},
},
},
},
DelayActions: opsgenie.NotificationPolicyDelayActionArray{
&opsgenie.NotificationPolicyDelayActionArgs{
DelayOption: pulumi.String("string"),
Durations: opsgenie.NotificationPolicyDelayActionDurationArray{
&opsgenie.NotificationPolicyDelayActionDurationArgs{
TimeAmount: pulumi.Int(0),
TimeUnit: pulumi.String("string"),
},
},
UntilHour: pulumi.Int(0),
UntilMinute: pulumi.Int(0),
},
},
Enabled: pulumi.Bool(false),
Name: pulumi.String("string"),
PolicyDescription: pulumi.String("string"),
Suppress: pulumi.Bool(false),
TimeRestrictions: opsgenie.NotificationPolicyTimeRestrictionArray{
&opsgenie.NotificationPolicyTimeRestrictionArgs{
Type: pulumi.String("string"),
Restriction: opsgenie.NotificationPolicyTimeRestrictionRestrictionArray{
&opsgenie.NotificationPolicyTimeRestrictionRestrictionArgs{
EndHour: pulumi.Int(0),
EndMin: pulumi.Int(0),
StartHour: pulumi.Int(0),
StartMin: pulumi.Int(0),
},
},
RestrictionList: opsgenie.NotificationPolicyTimeRestrictionRestrictionListArray{
&opsgenie.NotificationPolicyTimeRestrictionRestrictionListArgs{
EndDay: pulumi.String("string"),
EndHour: pulumi.Int(0),
EndMin: pulumi.Int(0),
StartDay: pulumi.String("string"),
StartHour: pulumi.Int(0),
StartMin: pulumi.Int(0),
},
},
},
},
})
var notificationPolicyResource = new NotificationPolicy("notificationPolicyResource", NotificationPolicyArgs.builder()
.filters(NotificationPolicyFilterArgs.builder()
.conditions(NotificationPolicyFilterConditionArgs.builder()
.field("string")
.operation("string")
.expectedValue("string")
.key("string")
.not(false)
.order(0)
.build())
.type("string")
.build())
.teamId("string")
.autoCloseActions(NotificationPolicyAutoCloseActionArgs.builder()
.durations(NotificationPolicyAutoCloseActionDurationArgs.builder()
.timeAmount(0)
.timeUnit("string")
.build())
.build())
.autoRestartActions(NotificationPolicyAutoRestartActionArgs.builder()
.durations(NotificationPolicyAutoRestartActionDurationArgs.builder()
.timeAmount(0)
.timeUnit("string")
.build())
.maxRepeatCount(0)
.build())
.deDuplicationActions(NotificationPolicyDeDuplicationActionArgs.builder()
.count(0)
.deDuplicationActionType("string")
.durations(NotificationPolicyDeDuplicationActionDurationArgs.builder()
.timeAmount(0)
.timeUnit("string")
.build())
.build())
.delayActions(NotificationPolicyDelayActionArgs.builder()
.delayOption("string")
.durations(NotificationPolicyDelayActionDurationArgs.builder()
.timeAmount(0)
.timeUnit("string")
.build())
.untilHour(0)
.untilMinute(0)
.build())
.enabled(false)
.name("string")
.policyDescription("string")
.suppress(false)
.timeRestrictions(NotificationPolicyTimeRestrictionArgs.builder()
.type("string")
.restriction(NotificationPolicyTimeRestrictionRestrictionArgs.builder()
.endHour(0)
.endMin(0)
.startHour(0)
.startMin(0)
.build())
.restrictionList(NotificationPolicyTimeRestrictionRestrictionListArgs.builder()
.endDay("string")
.endHour(0)
.endMin(0)
.startDay("string")
.startHour(0)
.startMin(0)
.build())
.build())
.build());
notification_policy_resource = opsgenie.NotificationPolicy("notificationPolicyResource",
filters=[opsgenie.NotificationPolicyFilterArgs(
conditions=[opsgenie.NotificationPolicyFilterConditionArgs(
field="string",
operation="string",
expected_value="string",
key="string",
not_=False,
order=0,
)],
type="string",
)],
team_id="string",
auto_close_actions=[opsgenie.NotificationPolicyAutoCloseActionArgs(
durations=[opsgenie.NotificationPolicyAutoCloseActionDurationArgs(
time_amount=0,
time_unit="string",
)],
)],
auto_restart_actions=[opsgenie.NotificationPolicyAutoRestartActionArgs(
durations=[opsgenie.NotificationPolicyAutoRestartActionDurationArgs(
time_amount=0,
time_unit="string",
)],
max_repeat_count=0,
)],
de_duplication_actions=[opsgenie.NotificationPolicyDeDuplicationActionArgs(
count=0,
de_duplication_action_type="string",
durations=[opsgenie.NotificationPolicyDeDuplicationActionDurationArgs(
time_amount=0,
time_unit="string",
)],
)],
delay_actions=[opsgenie.NotificationPolicyDelayActionArgs(
delay_option="string",
durations=[opsgenie.NotificationPolicyDelayActionDurationArgs(
time_amount=0,
time_unit="string",
)],
until_hour=0,
until_minute=0,
)],
enabled=False,
name="string",
policy_description="string",
suppress=False,
time_restrictions=[opsgenie.NotificationPolicyTimeRestrictionArgs(
type="string",
restriction=[opsgenie.NotificationPolicyTimeRestrictionRestrictionArgs(
end_hour=0,
end_min=0,
start_hour=0,
start_min=0,
)],
restriction_list=[opsgenie.NotificationPolicyTimeRestrictionRestrictionListArgs(
end_day="string",
end_hour=0,
end_min=0,
start_day="string",
start_hour=0,
start_min=0,
)],
)])
const notificationPolicyResource = new opsgenie.NotificationPolicy("notificationPolicyResource", {
filters: [{
conditions: [{
field: "string",
operation: "string",
expectedValue: "string",
key: "string",
not: false,
order: 0,
}],
type: "string",
}],
teamId: "string",
autoCloseActions: [{
durations: [{
timeAmount: 0,
timeUnit: "string",
}],
}],
autoRestartActions: [{
durations: [{
timeAmount: 0,
timeUnit: "string",
}],
maxRepeatCount: 0,
}],
deDuplicationActions: [{
count: 0,
deDuplicationActionType: "string",
durations: [{
timeAmount: 0,
timeUnit: "string",
}],
}],
delayActions: [{
delayOption: "string",
durations: [{
timeAmount: 0,
timeUnit: "string",
}],
untilHour: 0,
untilMinute: 0,
}],
enabled: false,
name: "string",
policyDescription: "string",
suppress: 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,
}],
}],
});
type: opsgenie:NotificationPolicy
properties:
autoCloseActions:
- durations:
- timeAmount: 0
timeUnit: string
autoRestartActions:
- durations:
- timeAmount: 0
timeUnit: string
maxRepeatCount: 0
deDuplicationActions:
- count: 0
deDuplicationActionType: string
durations:
- timeAmount: 0
timeUnit: string
delayActions:
- delayOption: string
durations:
- timeAmount: 0
timeUnit: string
untilHour: 0
untilMinute: 0
enabled: false
filters:
- conditions:
- expectedValue: string
field: string
key: string
not: false
operation: string
order: 0
type: string
name: string
policyDescription: string
suppress: false
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
NotificationPolicy 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 NotificationPolicy resource accepts the following input properties:
- Filters
List<Notification
Policy Filter> - A notification filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - Team
Id string - Id of team that this policy belons to.
- Auto
Close List<NotificationActions Policy Auto Close Action> - Auto Restart Action of the policy. This is a block, structure is documented below.
- Auto
Restart List<NotificationActions Policy Auto Restart Action> - Auto Restart Action of the policy. This is a block, structure is documented below.
- De
Duplication List<NotificationActions Policy De Duplication Action> - Deduplication Action of the policy. This is a block, structure is documented below.
- Delay
Actions List<NotificationPolicy Delay Action> - Delay notifications. This is a block, structure is documented below.
- Enabled bool
- If policy should be enabled. Default:
true
- Name string
- Name of the notification policy
- Policy
Description string - Description of the policy. This can be max 512 characters.
- Suppress bool
- Suppress value of the policy. Values are:
true
,false
. Default:false
- Time
Restrictions List<NotificationPolicy Time Restriction> - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
- Filters
[]Notification
Policy Filter Args - A notification filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - Team
Id string - Id of team that this policy belons to.
- Auto
Close []NotificationActions Policy Auto Close Action Args - Auto Restart Action of the policy. This is a block, structure is documented below.
- Auto
Restart []NotificationActions Policy Auto Restart Action Args - Auto Restart Action of the policy. This is a block, structure is documented below.
- De
Duplication []NotificationActions Policy De Duplication Action Args - Deduplication Action of the policy. This is a block, structure is documented below.
- Delay
Actions []NotificationPolicy Delay Action Args - Delay notifications. This is a block, structure is documented below.
- Enabled bool
- If policy should be enabled. Default:
true
- Name string
- Name of the notification policy
- Policy
Description string - Description of the policy. This can be max 512 characters.
- Suppress bool
- Suppress value of the policy. Values are:
true
,false
. Default:false
- Time
Restrictions []NotificationPolicy 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.
- filters
List<Notification
Policy Filter> - A notification filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - team
Id String - Id of team that this policy belons to.
- auto
Close List<NotificationActions Policy Auto Close Action> - Auto Restart Action of the policy. This is a block, structure is documented below.
- auto
Restart List<NotificationActions Policy Auto Restart Action> - Auto Restart Action of the policy. This is a block, structure is documented below.
- de
Duplication List<NotificationActions Policy De Duplication Action> - Deduplication Action of the policy. This is a block, structure is documented below.
- delay
Actions List<NotificationPolicy Delay Action> - Delay notifications. This is a block, structure is documented below.
- enabled Boolean
- If policy should be enabled. Default:
true
- name String
- Name of the notification policy
- policy
Description String - Description of the policy. This can be max 512 characters.
- suppress Boolean
- Suppress value of the policy. Values are:
true
,false
. Default:false
- time
Restrictions List<NotificationPolicy Time Restriction> - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
- filters
Notification
Policy Filter[] - A notification filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - team
Id string - Id of team that this policy belons to.
- auto
Close NotificationActions Policy Auto Close Action[] - Auto Restart Action of the policy. This is a block, structure is documented below.
- auto
Restart NotificationActions Policy Auto Restart Action[] - Auto Restart Action of the policy. This is a block, structure is documented below.
- de
Duplication NotificationActions Policy De Duplication Action[] - Deduplication Action of the policy. This is a block, structure is documented below.
- delay
Actions NotificationPolicy Delay Action[] - Delay notifications. This is a block, structure is documented below.
- enabled boolean
- If policy should be enabled. Default:
true
- name string
- Name of the notification policy
- policy
Description string - Description of the policy. This can be max 512 characters.
- suppress boolean
- Suppress value of the policy. Values are:
true
,false
. Default:false
- time
Restrictions NotificationPolicy Time Restriction[] - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
- filters
Sequence[Notification
Policy Filter Args] - A notification filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - team_
id str - Id of team that this policy belons to.
- auto_
close_ Sequence[Notificationactions Policy Auto Close Action Args] - Auto Restart Action of the policy. This is a block, structure is documented below.
- auto_
restart_ Sequence[Notificationactions Policy Auto Restart Action Args] - Auto Restart Action of the policy. This is a block, structure is documented below.
- de_
duplication_ Sequence[Notificationactions Policy De Duplication Action Args] - Deduplication Action of the policy. This is a block, structure is documented below.
- delay_
actions Sequence[NotificationPolicy Delay Action Args] - Delay notifications. This is a block, structure is documented below.
- enabled bool
- If policy should be enabled. Default:
true
- name str
- Name of the notification policy
- policy_
description str - Description of the policy. This can be max 512 characters.
- suppress bool
- Suppress value of the policy. Values are:
true
,false
. Default:false
- time_
restrictions Sequence[NotificationPolicy 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.
- filters List<Property Map>
- A notification filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - team
Id String - Id of team that this policy belons to.
- auto
Close List<Property Map>Actions - Auto Restart Action of the policy. This is a block, structure is documented below.
- auto
Restart List<Property Map>Actions - Auto Restart Action of the policy. This is a block, structure is documented below.
- de
Duplication List<Property Map>Actions - Deduplication Action of the policy. This is a block, structure is documented below.
- delay
Actions List<Property Map> - Delay notifications. This is a block, structure is documented below.
- enabled Boolean
- If policy should be enabled. Default:
true
- name String
- Name of the notification policy
- policy
Description String - Description of the policy. This can be max 512 characters.
- suppress Boolean
- Suppress value of the policy. Values are:
true
,false
. Default:false
- 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 NotificationPolicy 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 NotificationPolicy Resource
Get an existing NotificationPolicy 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?: NotificationPolicyState, opts?: CustomResourceOptions): NotificationPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auto_close_actions: Optional[Sequence[NotificationPolicyAutoCloseActionArgs]] = None,
auto_restart_actions: Optional[Sequence[NotificationPolicyAutoRestartActionArgs]] = None,
de_duplication_actions: Optional[Sequence[NotificationPolicyDeDuplicationActionArgs]] = None,
delay_actions: Optional[Sequence[NotificationPolicyDelayActionArgs]] = None,
enabled: Optional[bool] = None,
filters: Optional[Sequence[NotificationPolicyFilterArgs]] = None,
name: Optional[str] = None,
policy_description: Optional[str] = None,
suppress: Optional[bool] = None,
team_id: Optional[str] = None,
time_restrictions: Optional[Sequence[NotificationPolicyTimeRestrictionArgs]] = None) -> NotificationPolicy
func GetNotificationPolicy(ctx *Context, name string, id IDInput, state *NotificationPolicyState, opts ...ResourceOption) (*NotificationPolicy, error)
public static NotificationPolicy Get(string name, Input<string> id, NotificationPolicyState? state, CustomResourceOptions? opts = null)
public static NotificationPolicy get(String name, Output<String> id, NotificationPolicyState 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.
- Auto
Close List<NotificationActions Policy Auto Close Action> - Auto Restart Action of the policy. This is a block, structure is documented below.
- Auto
Restart List<NotificationActions Policy Auto Restart Action> - Auto Restart Action of the policy. This is a block, structure is documented below.
- De
Duplication List<NotificationActions Policy De Duplication Action> - Deduplication Action of the policy. This is a block, structure is documented below.
- Delay
Actions List<NotificationPolicy Delay Action> - Delay notifications. This is a block, structure is documented below.
- Enabled bool
- If policy should be enabled. Default:
true
- Filters
List<Notification
Policy Filter> - A notification filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - Name string
- Name of the notification policy
- Policy
Description string - Description of the policy. This can be max 512 characters.
- Suppress bool
- Suppress value of the policy. Values are:
true
,false
. Default:false
- Team
Id string - Id of team that this policy belons to.
- Time
Restrictions List<NotificationPolicy Time Restriction> - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
- Auto
Close []NotificationActions Policy Auto Close Action Args - Auto Restart Action of the policy. This is a block, structure is documented below.
- Auto
Restart []NotificationActions Policy Auto Restart Action Args - Auto Restart Action of the policy. This is a block, structure is documented below.
- De
Duplication []NotificationActions Policy De Duplication Action Args - Deduplication Action of the policy. This is a block, structure is documented below.
- Delay
Actions []NotificationPolicy Delay Action Args - Delay notifications. This is a block, structure is documented below.
- Enabled bool
- If policy should be enabled. Default:
true
- Filters
[]Notification
Policy Filter Args - A notification filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - Name string
- Name of the notification policy
- Policy
Description string - Description of the policy. This can be max 512 characters.
- Suppress bool
- Suppress value of the policy. Values are:
true
,false
. Default:false
- Team
Id string - Id of team that this policy belons to.
- Time
Restrictions []NotificationPolicy 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.
- auto
Close List<NotificationActions Policy Auto Close Action> - Auto Restart Action of the policy. This is a block, structure is documented below.
- auto
Restart List<NotificationActions Policy Auto Restart Action> - Auto Restart Action of the policy. This is a block, structure is documented below.
- de
Duplication List<NotificationActions Policy De Duplication Action> - Deduplication Action of the policy. This is a block, structure is documented below.
- delay
Actions List<NotificationPolicy Delay Action> - Delay notifications. This is a block, structure is documented below.
- enabled Boolean
- If policy should be enabled. Default:
true
- filters
List<Notification
Policy Filter> - A notification filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - name String
- Name of the notification policy
- policy
Description String - Description of the policy. This can be max 512 characters.
- suppress Boolean
- Suppress value of the policy. Values are:
true
,false
. Default:false
- team
Id String - Id of team that this policy belons to.
- time
Restrictions List<NotificationPolicy Time Restriction> - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
- auto
Close NotificationActions Policy Auto Close Action[] - Auto Restart Action of the policy. This is a block, structure is documented below.
- auto
Restart NotificationActions Policy Auto Restart Action[] - Auto Restart Action of the policy. This is a block, structure is documented below.
- de
Duplication NotificationActions Policy De Duplication Action[] - Deduplication Action of the policy. This is a block, structure is documented below.
- delay
Actions NotificationPolicy Delay Action[] - Delay notifications. This is a block, structure is documented below.
- enabled boolean
- If policy should be enabled. Default:
true
- filters
Notification
Policy Filter[] - A notification filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - name string
- Name of the notification policy
- policy
Description string - Description of the policy. This can be max 512 characters.
- suppress boolean
- Suppress value of the policy. Values are:
true
,false
. Default:false
- team
Id string - Id of team that this policy belons to.
- time
Restrictions NotificationPolicy Time Restriction[] - Time restrictions specified in this field must be met for this policy to work. This is a block, structure is documented below.
- auto_
close_ Sequence[Notificationactions Policy Auto Close Action Args] - Auto Restart Action of the policy. This is a block, structure is documented below.
- auto_
restart_ Sequence[Notificationactions Policy Auto Restart Action Args] - Auto Restart Action of the policy. This is a block, structure is documented below.
- de_
duplication_ Sequence[Notificationactions Policy De Duplication Action Args] - Deduplication Action of the policy. This is a block, structure is documented below.
- delay_
actions Sequence[NotificationPolicy Delay Action Args] - Delay notifications. This is a block, structure is documented below.
- enabled bool
- If policy should be enabled. Default:
true
- filters
Sequence[Notification
Policy Filter Args] - A notification filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - name str
- Name of the notification policy
- policy_
description str - Description of the policy. This can be max 512 characters.
- suppress bool
- Suppress value of the policy. Values are:
true
,false
. Default:false
- team_
id str - Id of team that this policy belons to.
- time_
restrictions Sequence[NotificationPolicy 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.
- auto
Close List<Property Map>Actions - Auto Restart Action of the policy. This is a block, structure is documented below.
- auto
Restart List<Property Map>Actions - Auto Restart Action of the policy. This is a block, structure is documented below.
- de
Duplication List<Property Map>Actions - Deduplication Action of the policy. This is a block, structure is documented below.
- delay
Actions List<Property Map> - Delay notifications. This is a block, structure is documented below.
- enabled Boolean
- If policy should be enabled. Default:
true
- filters List<Property Map>
- A notification filter which will be applied. This filter can be empty:
filter {}
- this meansmatch-all
. This is a block, structure is documented below. - name String
- Name of the notification policy
- policy
Description String - Description of the policy. This can be max 512 characters.
- suppress Boolean
- Suppress value of the policy. Values are:
true
,false
. Default:false
- team
Id String - Id of team that this policy belons 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
NotificationPolicyAutoCloseAction, NotificationPolicyAutoCloseActionArgs
- Durations
List<Notification
Policy Auto Close Action Duration> - Duration of this action. This is a block, structure is documented below.
- Durations
[]Notification
Policy Auto Close Action Duration - Duration of this action. This is a block, structure is documented below.
- durations
List<Notification
Policy Auto Close Action Duration> - Duration of this action. This is a block, structure is documented below.
- durations
Notification
Policy Auto Close Action Duration[] - Duration of this action. This is a block, structure is documented below.
- durations
Sequence[Notification
Policy Auto Close Action Duration] - Duration of this action. This is a block, structure is documented below.
- durations List<Property Map>
- Duration of this action. This is a block, structure is documented below.
NotificationPolicyAutoCloseActionDuration, NotificationPolicyAutoCloseActionDurationArgs
- Time
Amount int - A amount of time in
time_units
. This is a integer attribute. - Time
Unit string - Valid time units are:
minutes
,hours
,days
. Default:minutes
- Time
Amount int - A amount of time in
time_units
. This is a integer attribute. - Time
Unit string - Valid time units are:
minutes
,hours
,days
. Default:minutes
- time
Amount Integer - A amount of time in
time_units
. This is a integer attribute. - time
Unit String - Valid time units are:
minutes
,hours
,days
. Default:minutes
- time
Amount number - A amount of time in
time_units
. This is a integer attribute. - time
Unit string - Valid time units are:
minutes
,hours
,days
. Default:minutes
- time_
amount int - A amount of time in
time_units
. This is a integer attribute. - time_
unit str - Valid time units are:
minutes
,hours
,days
. Default:minutes
- time
Amount Number - A amount of time in
time_units
. This is a integer attribute. - time
Unit String - Valid time units are:
minutes
,hours
,days
. Default:minutes
NotificationPolicyAutoRestartAction, NotificationPolicyAutoRestartActionArgs
- Durations
List<Notification
Policy Auto Restart Action Duration> - Duration of this action. This is a block, structure is documented below.
- Max
Repeat intCount - How many times to repeat. This is a integer attribute.
- Durations
[]Notification
Policy Auto Restart Action Duration - Duration of this action. This is a block, structure is documented below.
- Max
Repeat intCount - How many times to repeat. This is a integer attribute.
- durations
List<Notification
Policy Auto Restart Action Duration> - Duration of this action. This is a block, structure is documented below.
- max
Repeat IntegerCount - How many times to repeat. This is a integer attribute.
- durations
Notification
Policy Auto Restart Action Duration[] - Duration of this action. This is a block, structure is documented below.
- max
Repeat numberCount - How many times to repeat. This is a integer attribute.
- durations
Sequence[Notification
Policy Auto Restart Action Duration] - Duration of this action. This is a block, structure is documented below.
- max_
repeat_ intcount - How many times to repeat. This is a integer attribute.
- durations List<Property Map>
- Duration of this action. This is a block, structure is documented below.
- max
Repeat NumberCount - How many times to repeat. This is a integer attribute.
NotificationPolicyAutoRestartActionDuration, NotificationPolicyAutoRestartActionDurationArgs
- Time
Amount int - A amount of time in
time_units
. This is a integer attribute. - Time
Unit string - Valid time units are:
minutes
,hours
,days
. Default:minutes
- Time
Amount int - A amount of time in
time_units
. This is a integer attribute. - Time
Unit string - Valid time units are:
minutes
,hours
,days
. Default:minutes
- time
Amount Integer - A amount of time in
time_units
. This is a integer attribute. - time
Unit String - Valid time units are:
minutes
,hours
,days
. Default:minutes
- time
Amount number - A amount of time in
time_units
. This is a integer attribute. - time
Unit string - Valid time units are:
minutes
,hours
,days
. Default:minutes
- time_
amount int - A amount of time in
time_units
. This is a integer attribute. - time_
unit str - Valid time units are:
minutes
,hours
,days
. Default:minutes
- time
Amount Number - A amount of time in
time_units
. This is a integer attribute. - time
Unit String - Valid time units are:
minutes
,hours
,days
. Default:minutes
NotificationPolicyDeDuplicationAction, NotificationPolicyDeDuplicationActionArgs
- Count int
- Count
- De
Duplication stringAction Type - Deduplication type. Possible values are: "value-based", "frequency-based"
- Durations
List<Notification
Policy De Duplication Action Duration> - Duration of this action (only required for "frequency-based" de-duplication action). This is a block, structure is documented below.
- Count int
- Count
- De
Duplication stringAction Type - Deduplication type. Possible values are: "value-based", "frequency-based"
- Durations
[]Notification
Policy De Duplication Action Duration - Duration of this action (only required for "frequency-based" de-duplication action). This is a block, structure is documented below.
- count Integer
- Count
- de
Duplication StringAction Type - Deduplication type. Possible values are: "value-based", "frequency-based"
- durations
List<Notification
Policy De Duplication Action Duration> - Duration of this action (only required for "frequency-based" de-duplication action). This is a block, structure is documented below.
- count number
- Count
- de
Duplication stringAction Type - Deduplication type. Possible values are: "value-based", "frequency-based"
- durations
Notification
Policy De Duplication Action Duration[] - Duration of this action (only required for "frequency-based" de-duplication action). This is a block, structure is documented below.
- count int
- Count
- de_
duplication_ straction_ type - Deduplication type. Possible values are: "value-based", "frequency-based"
- durations
Sequence[Notification
Policy De Duplication Action Duration] - Duration of this action (only required for "frequency-based" de-duplication action). This is a block, structure is documented below.
- count Number
- Count
- de
Duplication StringAction Type - Deduplication type. Possible values are: "value-based", "frequency-based"
- durations List<Property Map>
- Duration of this action (only required for "frequency-based" de-duplication action). This is a block, structure is documented below.
NotificationPolicyDeDuplicationActionDuration, NotificationPolicyDeDuplicationActionDurationArgs
- Time
Amount int - A amount of time in
time_units
. This is a integer attribute. - Time
Unit string - Valid time units are:
minutes
,hours
,days
. Default:minutes
- Time
Amount int - A amount of time in
time_units
. This is a integer attribute. - Time
Unit string - Valid time units are:
minutes
,hours
,days
. Default:minutes
- time
Amount Integer - A amount of time in
time_units
. This is a integer attribute. - time
Unit String - Valid time units are:
minutes
,hours
,days
. Default:minutes
- time
Amount number - A amount of time in
time_units
. This is a integer attribute. - time
Unit string - Valid time units are:
minutes
,hours
,days
. Default:minutes
- time_
amount int - A amount of time in
time_units
. This is a integer attribute. - time_
unit str - Valid time units are:
minutes
,hours
,days
. Default:minutes
- time
Amount Number - A amount of time in
time_units
. This is a integer attribute. - time
Unit String - Valid time units are:
minutes
,hours
,days
. Default:minutes
NotificationPolicyDelayAction, NotificationPolicyDelayActionArgs
- Delay
Option string - Defines until what day to delay or for what duration. Possible values are:
for-duration
,next-time
,next-weekday
,next-monday
,next-tuesday
,next-wednesday
,next-thursday
,next-friday
,next-saturday
,next-sunday
- Durations
List<Notification
Policy Delay Action Duration> - Duration of this action. If
delay_option
=for-duration
this has to be set. This is a block, structure is documented below. - Until
Hour int - Until what hour notifications will be delayed. If
delay_option
is set to antyhing else thenfor-duration
this has to be set. - Until
Minute int - Until what minute on
until_hour
notifications will be delayed. Ifdelay_option
is set to antyhing else thenfor-duration
this has to be set.
- Delay
Option string - Defines until what day to delay or for what duration. Possible values are:
for-duration
,next-time
,next-weekday
,next-monday
,next-tuesday
,next-wednesday
,next-thursday
,next-friday
,next-saturday
,next-sunday
- Durations
[]Notification
Policy Delay Action Duration - Duration of this action. If
delay_option
=for-duration
this has to be set. This is a block, structure is documented below. - Until
Hour int - Until what hour notifications will be delayed. If
delay_option
is set to antyhing else thenfor-duration
this has to be set. - Until
Minute int - Until what minute on
until_hour
notifications will be delayed. Ifdelay_option
is set to antyhing else thenfor-duration
this has to be set.
- delay
Option String - Defines until what day to delay or for what duration. Possible values are:
for-duration
,next-time
,next-weekday
,next-monday
,next-tuesday
,next-wednesday
,next-thursday
,next-friday
,next-saturday
,next-sunday
- durations
List<Notification
Policy Delay Action Duration> - Duration of this action. If
delay_option
=for-duration
this has to be set. This is a block, structure is documented below. - until
Hour Integer - Until what hour notifications will be delayed. If
delay_option
is set to antyhing else thenfor-duration
this has to be set. - until
Minute Integer - Until what minute on
until_hour
notifications will be delayed. Ifdelay_option
is set to antyhing else thenfor-duration
this has to be set.
- delay
Option string - Defines until what day to delay or for what duration. Possible values are:
for-duration
,next-time
,next-weekday
,next-monday
,next-tuesday
,next-wednesday
,next-thursday
,next-friday
,next-saturday
,next-sunday
- durations
Notification
Policy Delay Action Duration[] - Duration of this action. If
delay_option
=for-duration
this has to be set. This is a block, structure is documented below. - until
Hour number - Until what hour notifications will be delayed. If
delay_option
is set to antyhing else thenfor-duration
this has to be set. - until
Minute number - Until what minute on
until_hour
notifications will be delayed. Ifdelay_option
is set to antyhing else thenfor-duration
this has to be set.
- delay_
option str - Defines until what day to delay or for what duration. Possible values are:
for-duration
,next-time
,next-weekday
,next-monday
,next-tuesday
,next-wednesday
,next-thursday
,next-friday
,next-saturday
,next-sunday
- durations
Sequence[Notification
Policy Delay Action Duration] - Duration of this action. If
delay_option
=for-duration
this has to be set. This is a block, structure is documented below. - until_
hour int - Until what hour notifications will be delayed. If
delay_option
is set to antyhing else thenfor-duration
this has to be set. - until_
minute int - Until what minute on
until_hour
notifications will be delayed. Ifdelay_option
is set to antyhing else thenfor-duration
this has to be set.
- delay
Option String - Defines until what day to delay or for what duration. Possible values are:
for-duration
,next-time
,next-weekday
,next-monday
,next-tuesday
,next-wednesday
,next-thursday
,next-friday
,next-saturday
,next-sunday
- durations List<Property Map>
- Duration of this action. If
delay_option
=for-duration
this has to be set. This is a block, structure is documented below. - until
Hour Number - Until what hour notifications will be delayed. If
delay_option
is set to antyhing else thenfor-duration
this has to be set. - until
Minute Number - Until what minute on
until_hour
notifications will be delayed. Ifdelay_option
is set to antyhing else thenfor-duration
this has to be set.
NotificationPolicyDelayActionDuration, NotificationPolicyDelayActionDurationArgs
- Time
Amount int - A amount of time in
time_units
. This is a integer attribute. - Time
Unit string - Valid time units are:
minutes
,hours
,days
. Default:minutes
- Time
Amount int - A amount of time in
time_units
. This is a integer attribute. - Time
Unit string - Valid time units are:
minutes
,hours
,days
. Default:minutes
- time
Amount Integer - A amount of time in
time_units
. This is a integer attribute. - time
Unit String - Valid time units are:
minutes
,hours
,days
. Default:minutes
- time
Amount number - A amount of time in
time_units
. This is a integer attribute. - time
Unit string - Valid time units are:
minutes
,hours
,days
. Default:minutes
- time_
amount int - A amount of time in
time_units
. This is a integer attribute. - time_
unit str - Valid time units are:
minutes
,hours
,days
. Default:minutes
- time
Amount Number - A amount of time in
time_units
. This is a integer attribute. - time
Unit String - Valid time units are:
minutes
,hours
,days
. Default:minutes
NotificationPolicyFilter, NotificationPolicyFilterArgs
- Conditions
List<Notification
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
[]Notification
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<Notification
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
Notification
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[Notification
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
NotificationPolicyFilterCondition, NotificationPolicyFilterConditionArgs
- 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
NotificationPolicyTimeRestriction, NotificationPolicyTimeRestrictionArgs
- 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<Notification
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<NotificationPolicy 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
[]Notification
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 []NotificationPolicy 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<Notification
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<NotificationPolicy 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
Notification
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 NotificationPolicy 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[Notification
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[NotificationPolicy 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.
NotificationPolicyTimeRestrictionRestriction, NotificationPolicyTimeRestrictionRestrictionArgs
- 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
NotificationPolicyTimeRestrictionRestrictionList, NotificationPolicyTimeRestrictionRestrictionListArgs
- 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
Notification policies can be imported using the team_id
and notification_policy_id
, e.g.
$ pulumi import opsgenie:index/notificationPolicy:NotificationPolicy test team_id/notification_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.