1. Packages
  2. Opsgenie Provider
  3. API Docs
  4. AlertPolicy
Opsgenie v1.3.12 published on Wednesday, Oct 16, 2024 by Pulumi

opsgenie.AlertPolicy

Explore with Pulumi AI

opsgenie logo
Opsgenie v1.3.12 published on Wednesday, Oct 16, 2024 by Pulumi

    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 to true, this will replace the original actions.
    AlertDescription 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}}
    ContinuePolicy 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<AlertPolicyFilter>
    A alert filter which will be applied. This filter can be empty: filter {} - this means match-all. This is a block, structure is documented below.
    IgnoreOriginalActions bool
    If set to true, policy will ignore the original actions of the alert. Default: false
    IgnoreOriginalDetails bool
    If set to true, policy will ignore the original details of the alert. Default: false
    IgnoreOriginalResponders bool
    If set to true, policy will ignore the original responders of the alert. Default: false
    IgnoreOriginalTags bool
    If set to true, policy will ignore the original tags of the alert. Default: false
    Name string
    Name of the alert policy
    PolicyDescription 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, or P5
    Responders List<AlertPolicyResponder>
    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 to true, 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}}
    Tags List<string>
    Tags to add to the alerts original tags value as a list of strings. If ignore_original_responders field is set to true, this will replace the original responders.
    TeamId string
    Id of team that this policy belongs to.
    TimeRestrictions List<AlertPolicyTimeRestriction>
    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 to true, this will replace the original actions.
    AlertDescription 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}}
    ContinuePolicy 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 []AlertPolicyFilterArgs
    A alert filter which will be applied. This filter can be empty: filter {} - this means match-all. This is a block, structure is documented below.
    IgnoreOriginalActions bool
    If set to true, policy will ignore the original actions of the alert. Default: false
    IgnoreOriginalDetails bool
    If set to true, policy will ignore the original details of the alert. Default: false
    IgnoreOriginalResponders bool
    If set to true, policy will ignore the original responders of the alert. Default: false
    IgnoreOriginalTags bool
    If set to true, policy will ignore the original tags of the alert. Default: false
    Name string
    Name of the alert policy
    PolicyDescription 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, or P5
    Responders []AlertPolicyResponderArgs
    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 to true, 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}}
    Tags []string
    Tags to add to the alerts original tags value as a list of strings. If ignore_original_responders field is set to true, this will replace the original responders.
    TeamId string
    Id of team that this policy belongs to.
    TimeRestrictions []AlertPolicyTimeRestrictionArgs
    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 to true, this will replace the original actions.
    alertDescription 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}}
    continuePolicy 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<AlertPolicyFilter>
    A alert filter which will be applied. This filter can be empty: filter {} - this means match-all. This is a block, structure is documented below.
    ignoreOriginalActions Boolean
    If set to true, policy will ignore the original actions of the alert. Default: false
    ignoreOriginalDetails Boolean
    If set to true, policy will ignore the original details of the alert. Default: false
    ignoreOriginalResponders Boolean
    If set to true, policy will ignore the original responders of the alert. Default: false
    ignoreOriginalTags Boolean
    If set to true, policy will ignore the original tags of the alert. Default: false
    name String
    Name of the alert policy
    policyDescription 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, or P5
    responders List<AlertPolicyResponder>
    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 to true, 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}}
    tags List<String>
    Tags to add to the alerts original tags value as a list of strings. If ignore_original_responders field is set to true, this will replace the original responders.
    teamId String
    Id of team that this policy belongs to.
    timeRestrictions List<AlertPolicyTimeRestriction>
    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 to true, this will replace the original actions.
    alertDescription 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}}
    continuePolicy 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 AlertPolicyFilter[]
    A alert filter which will be applied. This filter can be empty: filter {} - this means match-all. This is a block, structure is documented below.
    ignoreOriginalActions boolean
    If set to true, policy will ignore the original actions of the alert. Default: false
    ignoreOriginalDetails boolean
    If set to true, policy will ignore the original details of the alert. Default: false
    ignoreOriginalResponders boolean
    If set to true, policy will ignore the original responders of the alert. Default: false
    ignoreOriginalTags boolean
    If set to true, policy will ignore the original tags of the alert. Default: false
    name string
    Name of the alert policy
    policyDescription 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, or P5
    responders AlertPolicyResponder[]
    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 to true, 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}}
    tags string[]
    Tags to add to the alerts original tags value as a list of strings. If ignore_original_responders field is set to true, this will replace the original responders.
    teamId string
    Id of team that this policy belongs to.
    timeRestrictions AlertPolicyTimeRestriction[]
    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 to true, 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[AlertPolicyFilterArgs]
    A alert filter which will be applied. This filter can be empty: filter {} - this means match-all. This is a block, structure is documented below.
    ignore_original_actions bool
    If set to true, policy will ignore the original actions of the alert. Default: false
    ignore_original_details bool
    If set to true, policy will ignore the original details of the alert. Default: false
    ignore_original_responders bool
    If set to true, policy will ignore the original responders of the alert. Default: false
    ignore_original_tags 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, or P5
    responders Sequence[AlertPolicyResponderArgs]
    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 to true, 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}}
    tags Sequence[str]
    Tags to add to the alerts original tags value as a list of strings. If ignore_original_responders field is set to true, this will replace the original responders.
    team_id str
    Id of team that this policy belongs to.
    time_restrictions Sequence[AlertPolicyTimeRestrictionArgs]
    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 to true, this will replace the original actions.
    alertDescription 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}}
    continuePolicy 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 means match-all. This is a block, structure is documented below.
    ignoreOriginalActions Boolean
    If set to true, policy will ignore the original actions of the alert. Default: false
    ignoreOriginalDetails Boolean
    If set to true, policy will ignore the original details of the alert. Default: false
    ignoreOriginalResponders Boolean
    If set to true, policy will ignore the original responders of the alert. Default: false
    ignoreOriginalTags Boolean
    If set to true, policy will ignore the original tags of the alert. Default: false
    name String
    Name of the alert policy
    policyDescription 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, or P5
    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 to true, 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}}
    tags List<String>
    Tags to add to the alerts original tags value as a list of strings. If ignore_original_responders field is set to true, this will replace the original responders.
    teamId String
    Id of team that this policy belongs to.
    timeRestrictions 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.
    The following state arguments are supported:
    Actions List<string>
    Actions to add to the alerts original actions value as a list of strings. If ignore_original_actions field is set to true, this will replace the original actions.
    AlertDescription 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}}
    ContinuePolicy 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<AlertPolicyFilter>
    A alert filter which will be applied. This filter can be empty: filter {} - this means match-all. This is a block, structure is documented below.
    IgnoreOriginalActions bool
    If set to true, policy will ignore the original actions of the alert. Default: false
    IgnoreOriginalDetails bool
    If set to true, policy will ignore the original details of the alert. Default: false
    IgnoreOriginalResponders bool
    If set to true, policy will ignore the original responders of the alert. Default: false
    IgnoreOriginalTags 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
    PolicyDescription 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, or P5
    Responders List<AlertPolicyResponder>
    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 to true, 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}}
    Tags List<string>
    Tags to add to the alerts original tags value as a list of strings. If ignore_original_responders field is set to true, this will replace the original responders.
    TeamId string
    Id of team that this policy belongs to.
    TimeRestrictions List<AlertPolicyTimeRestriction>
    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 to true, this will replace the original actions.
    AlertDescription 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}}
    ContinuePolicy 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 []AlertPolicyFilterArgs
    A alert filter which will be applied. This filter can be empty: filter {} - this means match-all. This is a block, structure is documented below.
    IgnoreOriginalActions bool
    If set to true, policy will ignore the original actions of the alert. Default: false
    IgnoreOriginalDetails bool
    If set to true, policy will ignore the original details of the alert. Default: false
    IgnoreOriginalResponders bool
    If set to true, policy will ignore the original responders of the alert. Default: false
    IgnoreOriginalTags 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
    PolicyDescription 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, or P5
    Responders []AlertPolicyResponderArgs
    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 to true, 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}}
    Tags []string
    Tags to add to the alerts original tags value as a list of strings. If ignore_original_responders field is set to true, this will replace the original responders.
    TeamId string
    Id of team that this policy belongs to.
    TimeRestrictions []AlertPolicyTimeRestrictionArgs
    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 to true, this will replace the original actions.
    alertDescription 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}}
    continuePolicy 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<AlertPolicyFilter>
    A alert filter which will be applied. This filter can be empty: filter {} - this means match-all. This is a block, structure is documented below.
    ignoreOriginalActions Boolean
    If set to true, policy will ignore the original actions of the alert. Default: false
    ignoreOriginalDetails Boolean
    If set to true, policy will ignore the original details of the alert. Default: false
    ignoreOriginalResponders Boolean
    If set to true, policy will ignore the original responders of the alert. Default: false
    ignoreOriginalTags 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
    policyDescription 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, or P5
    responders List<AlertPolicyResponder>
    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 to true, 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}}
    tags List<String>
    Tags to add to the alerts original tags value as a list of strings. If ignore_original_responders field is set to true, this will replace the original responders.
    teamId String
    Id of team that this policy belongs to.
    timeRestrictions List<AlertPolicyTimeRestriction>
    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 to true, this will replace the original actions.
    alertDescription 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}}
    continuePolicy 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 AlertPolicyFilter[]
    A alert filter which will be applied. This filter can be empty: filter {} - this means match-all. This is a block, structure is documented below.
    ignoreOriginalActions boolean
    If set to true, policy will ignore the original actions of the alert. Default: false
    ignoreOriginalDetails boolean
    If set to true, policy will ignore the original details of the alert. Default: false
    ignoreOriginalResponders boolean
    If set to true, policy will ignore the original responders of the alert. Default: false
    ignoreOriginalTags 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
    policyDescription 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, or P5
    responders AlertPolicyResponder[]
    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 to true, 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}}
    tags string[]
    Tags to add to the alerts original tags value as a list of strings. If ignore_original_responders field is set to true, this will replace the original responders.
    teamId string
    Id of team that this policy belongs to.
    timeRestrictions AlertPolicyTimeRestriction[]
    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 to true, 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[AlertPolicyFilterArgs]
    A alert filter which will be applied. This filter can be empty: filter {} - this means match-all. This is a block, structure is documented below.
    ignore_original_actions bool
    If set to true, policy will ignore the original actions of the alert. Default: false
    ignore_original_details bool
    If set to true, policy will ignore the original details of the alert. Default: false
    ignore_original_responders bool
    If set to true, policy will ignore the original responders of the alert. Default: false
    ignore_original_tags 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, or P5
    responders Sequence[AlertPolicyResponderArgs]
    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 to true, 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}}
    tags Sequence[str]
    Tags to add to the alerts original tags value as a list of strings. If ignore_original_responders field is set to true, this will replace the original responders.
    team_id str
    Id of team that this policy belongs to.
    time_restrictions Sequence[AlertPolicyTimeRestrictionArgs]
    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 to true, this will replace the original actions.
    alertDescription 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}}
    continuePolicy 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 means match-all. This is a block, structure is documented below.
    ignoreOriginalActions Boolean
    If set to true, policy will ignore the original actions of the alert. Default: false
    ignoreOriginalDetails Boolean
    If set to true, policy will ignore the original details of the alert. Default: false
    ignoreOriginalResponders Boolean
    If set to true, policy will ignore the original responders of the alert. Default: false
    ignoreOriginalTags 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
    policyDescription 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, or P5
    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 to true, 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}}
    tags List<String>
    Tags to add to the alerts original tags value as a list of strings. If ignore_original_responders field is set to true, this will replace the original responders.
    teamId String
    Id of team that this policy belongs to.
    timeRestrictions 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<AlertPolicyFilterCondition>
    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 []AlertPolicyFilterCondition
    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<AlertPolicyFilterCondition>
    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 AlertPolicyFilterCondition[]
    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[AlertPolicyFilterCondition]
    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.
    ExpectedValue 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.
    ExpectedValue 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.
    expectedValue 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.
    expectedValue 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.
    expectedValue 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

    Id string
    ID of the responder
    Type string
    Type of responder. Acceptable values are: user, team, escalation or schedule
    Name string
    Name of the responder
    Username string
    Username of the responder
    Id string
    ID of the responder
    Type string
    Type of responder. Acceptable values are: user, team, escalation or schedule
    Name string
    Name of the responder
    Username string
    Username of the responder
    id String
    ID of the responder
    type String
    Type of responder. Acceptable values are: user, team, escalation or schedule
    name String
    Name of the responder
    username String
    Username of the responder
    id string
    ID of the responder
    type string
    Type of responder. Acceptable values are: user, team, escalation or schedule
    name string
    Name of the responder
    username string
    Username of the responder
    id str
    ID of the responder
    type str
    Type of responder. Acceptable values are: user, team, escalation or schedule
    name str
    Name of the responder
    username str
    Username of the responder
    id String
    ID of the responder
    type String
    Type of responder. Acceptable values are: user, team, escalation or schedule
    name String
    Name of the responder
    username String
    Username of the responder

    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<AlertPolicyTimeRestrictionRestriction>
    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.
    RestrictionList List<AlertPolicyTimeRestrictionRestrictionList>
    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 []AlertPolicyTimeRestrictionRestriction
    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.
    RestrictionList []AlertPolicyTimeRestrictionRestrictionList
    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<AlertPolicyTimeRestrictionRestriction>
    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.
    restrictionList List<AlertPolicyTimeRestrictionRestrictionList>
    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 AlertPolicyTimeRestrictionRestriction[]
    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.
    restrictionList AlertPolicyTimeRestrictionRestrictionList[]
    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[AlertPolicyTimeRestrictionRestriction]
    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[AlertPolicyTimeRestrictionRestrictionList]
    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.
    restrictionList 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

    EndHour int
    Ending hour of restriction.
    EndMin int
    Ending minute of restriction on defined end_hour
    StartHour int
    Starting hour of restriction.
    StartMin int
    Staring minute of restriction on defined start_hour
    EndHour int
    Ending hour of restriction.
    EndMin int
    Ending minute of restriction on defined end_hour
    StartHour int
    Starting hour of restriction.
    StartMin int
    Staring minute of restriction on defined start_hour
    endHour Integer
    Ending hour of restriction.
    endMin Integer
    Ending minute of restriction on defined end_hour
    startHour Integer
    Starting hour of restriction.
    startMin Integer
    Staring minute of restriction on defined start_hour
    endHour number
    Ending hour of restriction.
    endMin number
    Ending minute of restriction on defined end_hour
    startHour number
    Starting hour of restriction.
    startMin number
    Staring minute of restriction on defined start_hour
    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
    endHour Number
    Ending hour of restriction.
    endMin Number
    Ending minute of restriction on defined end_hour
    startHour Number
    Starting hour of restriction.
    startMin Number
    Staring minute of restriction on defined start_hour

    AlertPolicyTimeRestrictionRestrictionList, AlertPolicyTimeRestrictionRestrictionListArgs

    EndDay string
    Ending day of restriction (eg. wednesday)
    EndHour int
    Ending hour of restriction on defined end_day
    EndMin int
    Ending minute of restriction on defined end_hour
    StartDay string
    Starting day of restriction (eg. monday)
    StartHour int
    Starting hour of restriction on defined start_day
    StartMin int
    Staring minute of restriction on defined start_hour
    EndDay string
    Ending day of restriction (eg. wednesday)
    EndHour int
    Ending hour of restriction on defined end_day
    EndMin int
    Ending minute of restriction on defined end_hour
    StartDay string
    Starting day of restriction (eg. monday)
    StartHour int
    Starting hour of restriction on defined start_day
    StartMin int
    Staring minute of restriction on defined start_hour
    endDay String
    Ending day of restriction (eg. wednesday)
    endHour Integer
    Ending hour of restriction on defined end_day
    endMin Integer
    Ending minute of restriction on defined end_hour
    startDay String
    Starting day of restriction (eg. monday)
    startHour Integer
    Starting hour of restriction on defined start_day
    startMin Integer
    Staring minute of restriction on defined start_hour
    endDay string
    Ending day of restriction (eg. wednesday)
    endHour number
    Ending hour of restriction on defined end_day
    endMin number
    Ending minute of restriction on defined end_hour
    startDay string
    Starting day of restriction (eg. monday)
    startHour number
    Starting hour of restriction on defined start_day
    startMin 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
    endDay String
    Ending day of restriction (eg. wednesday)
    endHour Number
    Ending hour of restriction on defined end_day
    endMin Number
    Ending minute of restriction on defined end_hour
    startDay String
    Starting day of restriction (eg. monday)
    startHour Number
    Starting hour of restriction on defined start_day
    startMin 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.
    opsgenie logo
    Opsgenie v1.3.12 published on Wednesday, Oct 16, 2024 by Pulumi