1. Packages
  2. Opsgenie
  3. API Docs
  4. ServiceIncidentRule
Opsgenie v1.3.6 published on Tuesday, Feb 27, 2024 by Pulumi

opsgenie.ServiceIncidentRule

Explore with Pulumi AI

opsgenie logo
Opsgenie v1.3.6 published on Tuesday, Feb 27, 2024 by Pulumi

    Manages a Service Incident Rule within Opsgenie.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opsgenie = Pulumi.Opsgenie;
    
    return await Deployment.RunAsync(() => 
    {
        var testTeam = new Opsgenie.Team("testTeam", new()
        {
            Description = "This team deals with all the things",
        });
    
        var testService = new Opsgenie.Service("testService", new()
        {
            TeamId = testTeam.Id,
        });
    
        var testServiceIncidentRule = new Opsgenie.ServiceIncidentRule("testServiceIncidentRule", new()
        {
            ServiceId = testService.Id,
            IncidentRules = new[]
            {
                new Opsgenie.Inputs.ServiceIncidentRuleIncidentRuleArgs
                {
                    ConditionMatchType = "match-any-condition",
                    Conditions = new[]
                    {
                        new Opsgenie.Inputs.ServiceIncidentRuleIncidentRuleConditionArgs
                        {
                            Field = "message",
                            Not = false,
                            Operation = "contains",
                            ExpectedValue = "expected1",
                        },
                        new Opsgenie.Inputs.ServiceIncidentRuleIncidentRuleConditionArgs
                        {
                            Field = "message",
                            Not = false,
                            Operation = "contains",
                            ExpectedValue = "expected2",
                        },
                    },
                    IncidentProperties = new[]
                    {
                        new Opsgenie.Inputs.ServiceIncidentRuleIncidentRuleIncidentPropertyArgs
                        {
                            Message = "This is a test message",
                            Priority = "P3",
                            StakeholderProperties = new[]
                            {
                                new Opsgenie.Inputs.ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderPropertyArgs
                                {
                                    Message = "Message for stakeholders",
                                    Enable = true,
                                },
                            },
                        },
                    },
                },
            },
        });
    
    });
    
    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 {
    		testTeam, err := opsgenie.NewTeam(ctx, "testTeam", &opsgenie.TeamArgs{
    			Description: pulumi.String("This team deals with all the things"),
    		})
    		if err != nil {
    			return err
    		}
    		testService, err := opsgenie.NewService(ctx, "testService", &opsgenie.ServiceArgs{
    			TeamId: testTeam.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opsgenie.NewServiceIncidentRule(ctx, "testServiceIncidentRule", &opsgenie.ServiceIncidentRuleArgs{
    			ServiceId: testService.ID(),
    			IncidentRules: opsgenie.ServiceIncidentRuleIncidentRuleArray{
    				&opsgenie.ServiceIncidentRuleIncidentRuleArgs{
    					ConditionMatchType: pulumi.String("match-any-condition"),
    					Conditions: opsgenie.ServiceIncidentRuleIncidentRuleConditionArray{
    						&opsgenie.ServiceIncidentRuleIncidentRuleConditionArgs{
    							Field:         pulumi.String("message"),
    							Not:           pulumi.Bool(false),
    							Operation:     pulumi.String("contains"),
    							ExpectedValue: pulumi.String("expected1"),
    						},
    						&opsgenie.ServiceIncidentRuleIncidentRuleConditionArgs{
    							Field:         pulumi.String("message"),
    							Not:           pulumi.Bool(false),
    							Operation:     pulumi.String("contains"),
    							ExpectedValue: pulumi.String("expected2"),
    						},
    					},
    					IncidentProperties: opsgenie.ServiceIncidentRuleIncidentRuleIncidentPropertyArray{
    						&opsgenie.ServiceIncidentRuleIncidentRuleIncidentPropertyArgs{
    							Message:  pulumi.String("This is a test message"),
    							Priority: pulumi.String("P3"),
    							StakeholderProperties: opsgenie.ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderPropertyArray{
    								&opsgenie.ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderPropertyArgs{
    									Message: pulumi.String("Message for stakeholders"),
    									Enable:  pulumi.Bool(true),
    								},
    							},
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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.Service;
    import com.pulumi.opsgenie.ServiceArgs;
    import com.pulumi.opsgenie.ServiceIncidentRule;
    import com.pulumi.opsgenie.ServiceIncidentRuleArgs;
    import com.pulumi.opsgenie.inputs.ServiceIncidentRuleIncidentRuleArgs;
    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 testTeam = new Team("testTeam", TeamArgs.builder()        
                .description("This team deals with all the things")
                .build());
    
            var testService = new Service("testService", ServiceArgs.builder()        
                .teamId(testTeam.id())
                .build());
    
            var testServiceIncidentRule = new ServiceIncidentRule("testServiceIncidentRule", ServiceIncidentRuleArgs.builder()        
                .serviceId(testService.id())
                .incidentRules(ServiceIncidentRuleIncidentRuleArgs.builder()
                    .conditionMatchType("match-any-condition")
                    .conditions(                
                        ServiceIncidentRuleIncidentRuleConditionArgs.builder()
                            .field("message")
                            .not(false)
                            .operation("contains")
                            .expectedValue("expected1")
                            .build(),
                        ServiceIncidentRuleIncidentRuleConditionArgs.builder()
                            .field("message")
                            .not(false)
                            .operation("contains")
                            .expectedValue("expected2")
                            .build())
                    .incidentProperties(ServiceIncidentRuleIncidentRuleIncidentPropertyArgs.builder()
                        .message("This is a test message")
                        .priority("P3")
                        .stakeholderProperties(ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderPropertyArgs.builder()
                            .message("Message for stakeholders")
                            .enable("true")
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_opsgenie as opsgenie
    
    test_team = opsgenie.Team("testTeam", description="This team deals with all the things")
    test_service = opsgenie.Service("testService", team_id=test_team.id)
    test_service_incident_rule = opsgenie.ServiceIncidentRule("testServiceIncidentRule",
        service_id=test_service.id,
        incident_rules=[opsgenie.ServiceIncidentRuleIncidentRuleArgs(
            condition_match_type="match-any-condition",
            conditions=[
                opsgenie.ServiceIncidentRuleIncidentRuleConditionArgs(
                    field="message",
                    not_=False,
                    operation="contains",
                    expected_value="expected1",
                ),
                opsgenie.ServiceIncidentRuleIncidentRuleConditionArgs(
                    field="message",
                    not_=False,
                    operation="contains",
                    expected_value="expected2",
                ),
            ],
            incident_properties=[opsgenie.ServiceIncidentRuleIncidentRuleIncidentPropertyArgs(
                message="This is a test message",
                priority="P3",
                stakeholder_properties=[opsgenie.ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderPropertyArgs(
                    message="Message for stakeholders",
                    enable=True,
                )],
            )],
        )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as opsgenie from "@pulumi/opsgenie";
    
    const testTeam = new opsgenie.Team("testTeam", {description: "This team deals with all the things"});
    const testService = new opsgenie.Service("testService", {teamId: testTeam.id});
    const testServiceIncidentRule = new opsgenie.ServiceIncidentRule("testServiceIncidentRule", {
        serviceId: testService.id,
        incidentRules: [{
            conditionMatchType: "match-any-condition",
            conditions: [
                {
                    field: "message",
                    not: false,
                    operation: "contains",
                    expectedValue: "expected1",
                },
                {
                    field: "message",
                    not: false,
                    operation: "contains",
                    expectedValue: "expected2",
                },
            ],
            incidentProperties: [{
                message: "This is a test message",
                priority: "P3",
                stakeholderProperties: [{
                    message: "Message for stakeholders",
                    enable: true,
                }],
            }],
        }],
    });
    
    resources:
      testTeam:
        type: opsgenie:Team
        properties:
          description: This team deals with all the things
      testService:
        type: opsgenie:Service
        properties:
          teamId: ${testTeam.id}
      testServiceIncidentRule:
        type: opsgenie:ServiceIncidentRule
        properties:
          serviceId: ${testService.id}
          incidentRules:
            - conditionMatchType: match-any-condition
              conditions:
                - field: message
                  not: false
                  operation: contains
                  expectedValue: expected1
                - field: message
                  not: false
                  operation: contains
                  expectedValue: expected2
              incidentProperties:
                - message: This is a test message
                  priority: P3
                  stakeholderProperties:
                    - message: Message for stakeholders
                      enable: 'true'
    

    Create ServiceIncidentRule Resource

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

    Constructor syntax

    new ServiceIncidentRule(name: string, args: ServiceIncidentRuleArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceIncidentRule(resource_name: str,
                            args: ServiceIncidentRuleArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceIncidentRule(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            incident_rules: Optional[Sequence[ServiceIncidentRuleIncidentRuleArgs]] = None,
                            service_id: Optional[str] = None)
    func NewServiceIncidentRule(ctx *Context, name string, args ServiceIncidentRuleArgs, opts ...ResourceOption) (*ServiceIncidentRule, error)
    public ServiceIncidentRule(string name, ServiceIncidentRuleArgs args, CustomResourceOptions? opts = null)
    public ServiceIncidentRule(String name, ServiceIncidentRuleArgs args)
    public ServiceIncidentRule(String name, ServiceIncidentRuleArgs args, CustomResourceOptions options)
    
    type: opsgenie:ServiceIncidentRule
    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 ServiceIncidentRuleArgs
    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 ServiceIncidentRuleArgs
    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 ServiceIncidentRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceIncidentRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceIncidentRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var serviceIncidentRuleResource = new Opsgenie.ServiceIncidentRule("serviceIncidentRuleResource", new()
    {
        IncidentRules = new[]
        {
            new Opsgenie.Inputs.ServiceIncidentRuleIncidentRuleArgs
            {
                IncidentProperties = new[]
                {
                    new Opsgenie.Inputs.ServiceIncidentRuleIncidentRuleIncidentPropertyArgs
                    {
                        Message = "string",
                        Priority = "string",
                        StakeholderProperties = new[]
                        {
                            new Opsgenie.Inputs.ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderPropertyArgs
                            {
                                Message = "string",
                                Description = "string",
                                Enable = false,
                            },
                        },
                        Description = "string",
                        Details = 
                        {
                            { "string", "string" },
                        },
                        Tags = new[]
                        {
                            "string",
                        },
                    },
                },
                ConditionMatchType = "string",
                Conditions = new[]
                {
                    new Opsgenie.Inputs.ServiceIncidentRuleIncidentRuleConditionArgs
                    {
                        Field = "string",
                        Operation = "string",
                        ExpectedValue = "string",
                        Key = "string",
                        Not = false,
                    },
                },
            },
        },
        ServiceId = "string",
    });
    
    example, err := opsgenie.NewServiceIncidentRule(ctx, "serviceIncidentRuleResource", &opsgenie.ServiceIncidentRuleArgs{
    	IncidentRules: opsgenie.ServiceIncidentRuleIncidentRuleArray{
    		&opsgenie.ServiceIncidentRuleIncidentRuleArgs{
    			IncidentProperties: opsgenie.ServiceIncidentRuleIncidentRuleIncidentPropertyArray{
    				&opsgenie.ServiceIncidentRuleIncidentRuleIncidentPropertyArgs{
    					Message:  pulumi.String("string"),
    					Priority: pulumi.String("string"),
    					StakeholderProperties: opsgenie.ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderPropertyArray{
    						&opsgenie.ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderPropertyArgs{
    							Message:     pulumi.String("string"),
    							Description: pulumi.String("string"),
    							Enable:      pulumi.Bool(false),
    						},
    					},
    					Description: pulumi.String("string"),
    					Details: pulumi.StringMap{
    						"string": pulumi.String("string"),
    					},
    					Tags: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    			},
    			ConditionMatchType: pulumi.String("string"),
    			Conditions: opsgenie.ServiceIncidentRuleIncidentRuleConditionArray{
    				&opsgenie.ServiceIncidentRuleIncidentRuleConditionArgs{
    					Field:         pulumi.String("string"),
    					Operation:     pulumi.String("string"),
    					ExpectedValue: pulumi.String("string"),
    					Key:           pulumi.String("string"),
    					Not:           pulumi.Bool(false),
    				},
    			},
    		},
    	},
    	ServiceId: pulumi.String("string"),
    })
    
    var serviceIncidentRuleResource = new ServiceIncidentRule("serviceIncidentRuleResource", ServiceIncidentRuleArgs.builder()        
        .incidentRules(ServiceIncidentRuleIncidentRuleArgs.builder()
            .incidentProperties(ServiceIncidentRuleIncidentRuleIncidentPropertyArgs.builder()
                .message("string")
                .priority("string")
                .stakeholderProperties(ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderPropertyArgs.builder()
                    .message("string")
                    .description("string")
                    .enable(false)
                    .build())
                .description("string")
                .details(Map.of("string", "string"))
                .tags("string")
                .build())
            .conditionMatchType("string")
            .conditions(ServiceIncidentRuleIncidentRuleConditionArgs.builder()
                .field("string")
                .operation("string")
                .expectedValue("string")
                .key("string")
                .not(false)
                .build())
            .build())
        .serviceId("string")
        .build());
    
    service_incident_rule_resource = opsgenie.ServiceIncidentRule("serviceIncidentRuleResource",
        incident_rules=[opsgenie.ServiceIncidentRuleIncidentRuleArgs(
            incident_properties=[opsgenie.ServiceIncidentRuleIncidentRuleIncidentPropertyArgs(
                message="string",
                priority="string",
                stakeholder_properties=[opsgenie.ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderPropertyArgs(
                    message="string",
                    description="string",
                    enable=False,
                )],
                description="string",
                details={
                    "string": "string",
                },
                tags=["string"],
            )],
            condition_match_type="string",
            conditions=[opsgenie.ServiceIncidentRuleIncidentRuleConditionArgs(
                field="string",
                operation="string",
                expected_value="string",
                key="string",
                not_=False,
            )],
        )],
        service_id="string")
    
    const serviceIncidentRuleResource = new opsgenie.ServiceIncidentRule("serviceIncidentRuleResource", {
        incidentRules: [{
            incidentProperties: [{
                message: "string",
                priority: "string",
                stakeholderProperties: [{
                    message: "string",
                    description: "string",
                    enable: false,
                }],
                description: "string",
                details: {
                    string: "string",
                },
                tags: ["string"],
            }],
            conditionMatchType: "string",
            conditions: [{
                field: "string",
                operation: "string",
                expectedValue: "string",
                key: "string",
                not: false,
            }],
        }],
        serviceId: "string",
    });
    
    type: opsgenie:ServiceIncidentRule
    properties:
        incidentRules:
            - conditionMatchType: string
              conditions:
                - expectedValue: string
                  field: string
                  key: string
                  not: false
                  operation: string
              incidentProperties:
                - description: string
                  details:
                    string: string
                  message: string
                  priority: string
                  stakeholderProperties:
                    - description: string
                      enable: false
                      message: string
                  tags:
                    - string
        serviceId: string
    

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

    IncidentRules List<ServiceIncidentRuleIncidentRule>
    This is the rule configuration for this incident rule. This is a block, structure is documented below.
    ServiceId string
    ID of the service associated
    IncidentRules []ServiceIncidentRuleIncidentRuleArgs
    This is the rule configuration for this incident rule. This is a block, structure is documented below.
    ServiceId string
    ID of the service associated
    incidentRules List<ServiceIncidentRuleIncidentRule>
    This is the rule configuration for this incident rule. This is a block, structure is documented below.
    serviceId String
    ID of the service associated
    incidentRules ServiceIncidentRuleIncidentRule[]
    This is the rule configuration for this incident rule. This is a block, structure is documented below.
    serviceId string
    ID of the service associated
    incident_rules Sequence[ServiceIncidentRuleIncidentRuleArgs]
    This is the rule configuration for this incident rule. This is a block, structure is documented below.
    service_id str
    ID of the service associated
    incidentRules List<Property Map>
    This is the rule configuration for this incident rule. This is a block, structure is documented below.
    serviceId String
    ID of the service associated

    Outputs

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

    Get an existing ServiceIncidentRule 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?: ServiceIncidentRuleState, opts?: CustomResourceOptions): ServiceIncidentRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            incident_rules: Optional[Sequence[ServiceIncidentRuleIncidentRuleArgs]] = None,
            service_id: Optional[str] = None) -> ServiceIncidentRule
    func GetServiceIncidentRule(ctx *Context, name string, id IDInput, state *ServiceIncidentRuleState, opts ...ResourceOption) (*ServiceIncidentRule, error)
    public static ServiceIncidentRule Get(string name, Input<string> id, ServiceIncidentRuleState? state, CustomResourceOptions? opts = null)
    public static ServiceIncidentRule get(String name, Output<String> id, ServiceIncidentRuleState 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:
    IncidentRules List<ServiceIncidentRuleIncidentRule>
    This is the rule configuration for this incident rule. This is a block, structure is documented below.
    ServiceId string
    ID of the service associated
    IncidentRules []ServiceIncidentRuleIncidentRuleArgs
    This is the rule configuration for this incident rule. This is a block, structure is documented below.
    ServiceId string
    ID of the service associated
    incidentRules List<ServiceIncidentRuleIncidentRule>
    This is the rule configuration for this incident rule. This is a block, structure is documented below.
    serviceId String
    ID of the service associated
    incidentRules ServiceIncidentRuleIncidentRule[]
    This is the rule configuration for this incident rule. This is a block, structure is documented below.
    serviceId string
    ID of the service associated
    incident_rules Sequence[ServiceIncidentRuleIncidentRuleArgs]
    This is the rule configuration for this incident rule. This is a block, structure is documented below.
    service_id str
    ID of the service associated
    incidentRules List<Property Map>
    This is the rule configuration for this incident rule. This is a block, structure is documented below.
    serviceId String
    ID of the service associated

    Supporting Types

    ServiceIncidentRuleIncidentRule, ServiceIncidentRuleIncidentRuleArgs

    IncidentProperties List<ServiceIncidentRuleIncidentRuleIncidentProperty>
    Properties for incident rule. This is a block, structure is documented below.
    ConditionMatchType string
    A Condition type, supported types are: match-all, match-any-condition, match-all-conditions. Default: match-all
    Conditions List<ServiceIncidentRuleIncidentRuleCondition>
    Conditions applied to incident. This is a block, structure is documented below.
    IncidentProperties []ServiceIncidentRuleIncidentRuleIncidentProperty
    Properties for incident rule. This is a block, structure is documented below.
    ConditionMatchType string
    A Condition type, supported types are: match-all, match-any-condition, match-all-conditions. Default: match-all
    Conditions []ServiceIncidentRuleIncidentRuleCondition
    Conditions applied to incident. This is a block, structure is documented below.
    incidentProperties List<ServiceIncidentRuleIncidentRuleIncidentProperty>
    Properties for incident rule. This is a block, structure is documented below.
    conditionMatchType String
    A Condition type, supported types are: match-all, match-any-condition, match-all-conditions. Default: match-all
    conditions List<ServiceIncidentRuleIncidentRuleCondition>
    Conditions applied to incident. This is a block, structure is documented below.
    incidentProperties ServiceIncidentRuleIncidentRuleIncidentProperty[]
    Properties for incident rule. This is a block, structure is documented below.
    conditionMatchType string
    A Condition type, supported types are: match-all, match-any-condition, match-all-conditions. Default: match-all
    conditions ServiceIncidentRuleIncidentRuleCondition[]
    Conditions applied to incident. This is a block, structure is documented below.
    incident_properties Sequence[ServiceIncidentRuleIncidentRuleIncidentProperty]
    Properties for incident rule. This is a block, structure is documented below.
    condition_match_type str
    A Condition type, supported types are: match-all, match-any-condition, match-all-conditions. Default: match-all
    conditions Sequence[ServiceIncidentRuleIncidentRuleCondition]
    Conditions applied to incident. This is a block, structure is documented below.
    incidentProperties List<Property Map>
    Properties for incident rule. This is a block, structure is documented below.
    conditionMatchType String
    A Condition type, supported types are: match-all, match-any-condition, match-all-conditions. Default: match-all
    conditions List<Property Map>
    Conditions applied to incident. This is a block, structure is documented below.

    ServiceIncidentRuleIncidentRuleCondition, ServiceIncidentRuleIncidentRuleConditionArgs

    Field string
    Specifies which alert field will be used in condition. Possible values are message, alias, description, source, entity, tags, actions, details, extra-properties, recipients, 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
    Field string
    Specifies which alert field will be used in condition. Possible values are message, alias, description, source, entity, tags, actions, details, extra-properties, recipients, 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
    field String
    Specifies which alert field will be used in condition. Possible values are message, alias, description, source, entity, tags, actions, details, extra-properties, recipients, 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
    field string
    Specifies which alert field will be used in condition. Possible values are message, alias, description, source, entity, tags, actions, details, extra-properties, recipients, 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
    field str
    Specifies which alert field will be used in condition. Possible values are message, alias, description, source, entity, tags, actions, details, extra-properties, recipients, 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
    field String
    Specifies which alert field will be used in condition. Possible values are message, alias, description, source, entity, tags, actions, details, extra-properties, recipients, 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

    ServiceIncidentRuleIncidentRuleIncidentProperty, ServiceIncidentRuleIncidentRuleIncidentPropertyArgs

    Message string
    Message of the related incident rule.
    Priority string
    Priority level of the alert. Possible values are P1, P2, P3, P4 and P5
    StakeholderProperties List<ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderProperty>
    DEtails about stakeholders for this rule. This is a block, structure is documented below.
    Description string
    Description field of the incident rule.
    Details Dictionary<string, string>
    Map of key-value pairs to use as custom properties of the alert.
    Tags List<string>
    Tags of the alert.
    Message string
    Message of the related incident rule.
    Priority string
    Priority level of the alert. Possible values are P1, P2, P3, P4 and P5
    StakeholderProperties []ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderProperty
    DEtails about stakeholders for this rule. This is a block, structure is documented below.
    Description string
    Description field of the incident rule.
    Details map[string]string
    Map of key-value pairs to use as custom properties of the alert.
    Tags []string
    Tags of the alert.
    message String
    Message of the related incident rule.
    priority String
    Priority level of the alert. Possible values are P1, P2, P3, P4 and P5
    stakeholderProperties List<ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderProperty>
    DEtails about stakeholders for this rule. This is a block, structure is documented below.
    description String
    Description field of the incident rule.
    details Map<String,String>
    Map of key-value pairs to use as custom properties of the alert.
    tags List<String>
    Tags of the alert.
    message string
    Message of the related incident rule.
    priority string
    Priority level of the alert. Possible values are P1, P2, P3, P4 and P5
    stakeholderProperties ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderProperty[]
    DEtails about stakeholders for this rule. This is a block, structure is documented below.
    description string
    Description field of the incident rule.
    details {[key: string]: string}
    Map of key-value pairs to use as custom properties of the alert.
    tags string[]
    Tags of the alert.
    message str
    Message of the related incident rule.
    priority str
    Priority level of the alert. Possible values are P1, P2, P3, P4 and P5
    stakeholder_properties Sequence[ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderProperty]
    DEtails about stakeholders for this rule. This is a block, structure is documented below.
    description str
    Description field of the incident rule.
    details Mapping[str, str]
    Map of key-value pairs to use as custom properties of the alert.
    tags Sequence[str]
    Tags of the alert.
    message String
    Message of the related incident rule.
    priority String
    Priority level of the alert. Possible values are P1, P2, P3, P4 and P5
    stakeholderProperties List<Property Map>
    DEtails about stakeholders for this rule. This is a block, structure is documented below.
    description String
    Description field of the incident rule.
    details Map<String>
    Map of key-value pairs to use as custom properties of the alert.
    tags List<String>
    Tags of the alert.

    ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderProperty, ServiceIncidentRuleIncidentRuleIncidentPropertyStakeholderPropertyArgs

    Message string
    Message that is to be passed to audience that is generally used to provide a content information about the alert.
    Description string
    Description that is generally used to provide a detailed information about the alert.
    Enable bool
    Option to enable stakeholder notifications.Default value is true.
    Message string
    Message that is to be passed to audience that is generally used to provide a content information about the alert.
    Description string
    Description that is generally used to provide a detailed information about the alert.
    Enable bool
    Option to enable stakeholder notifications.Default value is true.
    message String
    Message that is to be passed to audience that is generally used to provide a content information about the alert.
    description String
    Description that is generally used to provide a detailed information about the alert.
    enable Boolean
    Option to enable stakeholder notifications.Default value is true.
    message string
    Message that is to be passed to audience that is generally used to provide a content information about the alert.
    description string
    Description that is generally used to provide a detailed information about the alert.
    enable boolean
    Option to enable stakeholder notifications.Default value is true.
    message str
    Message that is to be passed to audience that is generally used to provide a content information about the alert.
    description str
    Description that is generally used to provide a detailed information about the alert.
    enable bool
    Option to enable stakeholder notifications.Default value is true.
    message String
    Message that is to be passed to audience that is generally used to provide a content information about the alert.
    description String
    Description that is generally used to provide a detailed information about the alert.
    enable Boolean
    Option to enable stakeholder notifications.Default value is true.

    Import

    Service Incident Rule can be imported using the service_id/service_incident_rule_id, e.g.

    $ pulumi import opsgenie:index/serviceIncidentRule:ServiceIncidentRule this service_id/service_incident_rule_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.6 published on Tuesday, Feb 27, 2024 by Pulumi