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

opsgenie.TeamRoutingRule

Explore with Pulumi AI

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

    Manages a Team Routing Rule within Opsgenie.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opsgenie from "@pulumi/opsgenie";
    
    const test = new opsgenie.Schedule("test", {
        name: "genieschedule",
        description: "schedule test",
        timezone: "Europe/Rome",
        enabled: false,
    });
    const testTeam = new opsgenie.Team("test", {
        name: "example team",
        description: "This team deals with all the things",
    });
    const testTeamRoutingRule = new opsgenie.TeamRoutingRule("test", {
        name: "routing rule example",
        teamId: testTeam.id,
        order: 0,
        timezone: "America/Los_Angeles",
        criterias: [{
            type: "match-any-condition",
            conditions: [{
                field: "message",
                operation: "contains",
                expectedValue: "expected1",
                not: false,
            }],
        }],
        timeRestrictions: [{
            type: "weekday-and-time-of-day",
            restrictionList: [{
                startDay: "monday",
                startHour: 8,
                startMin: 0,
                endDay: "tuesday",
                endHour: 18,
                endMin: 30,
            }],
        }],
        notifies: [{
            name: test.name,
            type: "schedule",
        }],
    });
    
    import pulumi
    import pulumi_opsgenie as opsgenie
    
    test = opsgenie.Schedule("test",
        name="genieschedule",
        description="schedule test",
        timezone="Europe/Rome",
        enabled=False)
    test_team = opsgenie.Team("test",
        name="example team",
        description="This team deals with all the things")
    test_team_routing_rule = opsgenie.TeamRoutingRule("test",
        name="routing rule example",
        team_id=test_team.id,
        order=0,
        timezone="America/Los_Angeles",
        criterias=[{
            "type": "match-any-condition",
            "conditions": [{
                "field": "message",
                "operation": "contains",
                "expected_value": "expected1",
                "not_": False,
            }],
        }],
        time_restrictions=[{
            "type": "weekday-and-time-of-day",
            "restriction_list": [{
                "start_day": "monday",
                "start_hour": 8,
                "start_min": 0,
                "end_day": "tuesday",
                "end_hour": 18,
                "end_min": 30,
            }],
        }],
        notifies=[{
            "name": test.name,
            "type": "schedule",
        }])
    
    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.NewSchedule(ctx, "test", &opsgenie.ScheduleArgs{
    			Name:        pulumi.String("genieschedule"),
    			Description: pulumi.String("schedule test"),
    			Timezone:    pulumi.String("Europe/Rome"),
    			Enabled:     pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		testTeam, 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.NewTeamRoutingRule(ctx, "test", &opsgenie.TeamRoutingRuleArgs{
    			Name:     pulumi.String("routing rule example"),
    			TeamId:   testTeam.ID(),
    			Order:    pulumi.Int(0),
    			Timezone: pulumi.String("America/Los_Angeles"),
    			Criterias: opsgenie.TeamRoutingRuleCriteriaArray{
    				&opsgenie.TeamRoutingRuleCriteriaArgs{
    					Type: pulumi.String("match-any-condition"),
    					Conditions: opsgenie.TeamRoutingRuleCriteriaConditionArray{
    						&opsgenie.TeamRoutingRuleCriteriaConditionArgs{
    							Field:         pulumi.String("message"),
    							Operation:     pulumi.String("contains"),
    							ExpectedValue: pulumi.String("expected1"),
    							Not:           pulumi.Bool(false),
    						},
    					},
    				},
    			},
    			TimeRestrictions: opsgenie.TeamRoutingRuleTimeRestrictionArray{
    				&opsgenie.TeamRoutingRuleTimeRestrictionArgs{
    					Type: pulumi.String("weekday-and-time-of-day"),
    					RestrictionList: opsgenie.TeamRoutingRuleTimeRestrictionRestrictionListArray{
    						&opsgenie.TeamRoutingRuleTimeRestrictionRestrictionListArgs{
    							StartDay:  pulumi.String("monday"),
    							StartHour: pulumi.Int(8),
    							StartMin:  pulumi.Int(0),
    							EndDay:    pulumi.String("tuesday"),
    							EndHour:   pulumi.Int(18),
    							EndMin:    pulumi.Int(30),
    						},
    					},
    				},
    			},
    			Notifies: opsgenie.TeamRoutingRuleNotifyArray{
    				&opsgenie.TeamRoutingRuleNotifyArgs{
    					Name: test.Name,
    					Type: pulumi.String("schedule"),
    				},
    			},
    		})
    		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.Schedule("test", new()
        {
            Name = "genieschedule",
            Description = "schedule test",
            Timezone = "Europe/Rome",
            Enabled = false,
        });
    
        var testTeam = new Opsgenie.Team("test", new()
        {
            Name = "example team",
            Description = "This team deals with all the things",
        });
    
        var testTeamRoutingRule = new Opsgenie.TeamRoutingRule("test", new()
        {
            Name = "routing rule example",
            TeamId = testTeam.Id,
            Order = 0,
            Timezone = "America/Los_Angeles",
            Criterias = new[]
            {
                new Opsgenie.Inputs.TeamRoutingRuleCriteriaArgs
                {
                    Type = "match-any-condition",
                    Conditions = new[]
                    {
                        new Opsgenie.Inputs.TeamRoutingRuleCriteriaConditionArgs
                        {
                            Field = "message",
                            Operation = "contains",
                            ExpectedValue = "expected1",
                            Not = false,
                        },
                    },
                },
            },
            TimeRestrictions = new[]
            {
                new Opsgenie.Inputs.TeamRoutingRuleTimeRestrictionArgs
                {
                    Type = "weekday-and-time-of-day",
                    RestrictionList = new[]
                    {
                        new Opsgenie.Inputs.TeamRoutingRuleTimeRestrictionRestrictionListArgs
                        {
                            StartDay = "monday",
                            StartHour = 8,
                            StartMin = 0,
                            EndDay = "tuesday",
                            EndHour = 18,
                            EndMin = 30,
                        },
                    },
                },
            },
            Notifies = new[]
            {
                new Opsgenie.Inputs.TeamRoutingRuleNotifyArgs
                {
                    Name = test.Name,
                    Type = "schedule",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opsgenie.Schedule;
    import com.pulumi.opsgenie.ScheduleArgs;
    import com.pulumi.opsgenie.Team;
    import com.pulumi.opsgenie.TeamArgs;
    import com.pulumi.opsgenie.TeamRoutingRule;
    import com.pulumi.opsgenie.TeamRoutingRuleArgs;
    import com.pulumi.opsgenie.inputs.TeamRoutingRuleCriteriaArgs;
    import com.pulumi.opsgenie.inputs.TeamRoutingRuleTimeRestrictionArgs;
    import com.pulumi.opsgenie.inputs.TeamRoutingRuleNotifyArgs;
    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 Schedule("test", ScheduleArgs.builder()
                .name("genieschedule")
                .description("schedule test")
                .timezone("Europe/Rome")
                .enabled(false)
                .build());
    
            var testTeam = new Team("testTeam", TeamArgs.builder()
                .name("example team")
                .description("This team deals with all the things")
                .build());
    
            var testTeamRoutingRule = new TeamRoutingRule("testTeamRoutingRule", TeamRoutingRuleArgs.builder()
                .name("routing rule example")
                .teamId(testTeam.id())
                .order(0)
                .timezone("America/Los_Angeles")
                .criterias(TeamRoutingRuleCriteriaArgs.builder()
                    .type("match-any-condition")
                    .conditions(TeamRoutingRuleCriteriaConditionArgs.builder()
                        .field("message")
                        .operation("contains")
                        .expectedValue("expected1")
                        .not(false)
                        .build())
                    .build())
                .timeRestrictions(TeamRoutingRuleTimeRestrictionArgs.builder()
                    .type("weekday-and-time-of-day")
                    .restrictionList(TeamRoutingRuleTimeRestrictionRestrictionListArgs.builder()
                        .startDay("monday")
                        .startHour(8)
                        .startMin(0)
                        .endDay("tuesday")
                        .endHour(18)
                        .endMin(30)
                        .build())
                    .build())
                .notifies(TeamRoutingRuleNotifyArgs.builder()
                    .name(test.name())
                    .type("schedule")
                    .build())
                .build());
    
        }
    }
    
    resources:
      test:
        type: opsgenie:Schedule
        properties:
          name: genieschedule
          description: schedule test
          timezone: Europe/Rome
          enabled: false
      testTeam:
        type: opsgenie:Team
        name: test
        properties:
          name: example team
          description: This team deals with all the things
      testTeamRoutingRule:
        type: opsgenie:TeamRoutingRule
        name: test
        properties:
          name: routing rule example
          teamId: ${testTeam.id}
          order: 0
          timezone: America/Los_Angeles
          criterias:
            - type: match-any-condition
              conditions:
                - field: message
                  operation: contains
                  expectedValue: expected1
                  not: false
          timeRestrictions:
            - type: weekday-and-time-of-day
              restrictionList:
                - startDay: monday
                  startHour: 8
                  startMin: 0
                  endDay: tuesday
                  endHour: 18
                  endMin: 30
          notifies:
            - name: ${test.name}
              type: schedule
    

    Create TeamRoutingRule Resource

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

    Constructor syntax

    new TeamRoutingRule(name: string, args: TeamRoutingRuleArgs, opts?: CustomResourceOptions);
    @overload
    def TeamRoutingRule(resource_name: str,
                        args: TeamRoutingRuleArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def TeamRoutingRule(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        notifies: Optional[Sequence[TeamRoutingRuleNotifyArgs]] = None,
                        team_id: Optional[str] = None,
                        criterias: Optional[Sequence[TeamRoutingRuleCriteriaArgs]] = None,
                        is_default: Optional[bool] = None,
                        name: Optional[str] = None,
                        order: Optional[int] = None,
                        time_restrictions: Optional[Sequence[TeamRoutingRuleTimeRestrictionArgs]] = None,
                        timezone: Optional[str] = None)
    func NewTeamRoutingRule(ctx *Context, name string, args TeamRoutingRuleArgs, opts ...ResourceOption) (*TeamRoutingRule, error)
    public TeamRoutingRule(string name, TeamRoutingRuleArgs args, CustomResourceOptions? opts = null)
    public TeamRoutingRule(String name, TeamRoutingRuleArgs args)
    public TeamRoutingRule(String name, TeamRoutingRuleArgs args, CustomResourceOptions options)
    
    type: opsgenie:TeamRoutingRule
    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 TeamRoutingRuleArgs
    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 TeamRoutingRuleArgs
    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 TeamRoutingRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TeamRoutingRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TeamRoutingRuleArgs
    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 teamRoutingRuleResource = new Opsgenie.TeamRoutingRule("teamRoutingRuleResource", new()
    {
        Notifies = new[]
        {
            new Opsgenie.Inputs.TeamRoutingRuleNotifyArgs
            {
                Type = "string",
                Id = "string",
                Name = "string",
            },
        },
        TeamId = "string",
        Criterias = new[]
        {
            new Opsgenie.Inputs.TeamRoutingRuleCriteriaArgs
            {
                Type = "string",
                Conditions = new[]
                {
                    new Opsgenie.Inputs.TeamRoutingRuleCriteriaConditionArgs
                    {
                        Field = "string",
                        Operation = "string",
                        ExpectedValue = "string",
                        Key = "string",
                        Not = false,
                        Order = 0,
                    },
                },
            },
        },
        IsDefault = false,
        Name = "string",
        Order = 0,
        TimeRestrictions = new[]
        {
            new Opsgenie.Inputs.TeamRoutingRuleTimeRestrictionArgs
            {
                Type = "string",
                Restriction = new[]
                {
                    new Opsgenie.Inputs.TeamRoutingRuleTimeRestrictionRestrictionArgs
                    {
                        EndHour = 0,
                        EndMin = 0,
                        StartHour = 0,
                        StartMin = 0,
                    },
                },
                RestrictionList = new[]
                {
                    new Opsgenie.Inputs.TeamRoutingRuleTimeRestrictionRestrictionListArgs
                    {
                        EndDay = "string",
                        EndHour = 0,
                        EndMin = 0,
                        StartDay = "string",
                        StartHour = 0,
                        StartMin = 0,
                    },
                },
            },
        },
        Timezone = "string",
    });
    
    example, err := opsgenie.NewTeamRoutingRule(ctx, "teamRoutingRuleResource", &opsgenie.TeamRoutingRuleArgs{
    	Notifies: opsgenie.TeamRoutingRuleNotifyArray{
    		&opsgenie.TeamRoutingRuleNotifyArgs{
    			Type: pulumi.String("string"),
    			Id:   pulumi.String("string"),
    			Name: pulumi.String("string"),
    		},
    	},
    	TeamId: pulumi.String("string"),
    	Criterias: opsgenie.TeamRoutingRuleCriteriaArray{
    		&opsgenie.TeamRoutingRuleCriteriaArgs{
    			Type: pulumi.String("string"),
    			Conditions: opsgenie.TeamRoutingRuleCriteriaConditionArray{
    				&opsgenie.TeamRoutingRuleCriteriaConditionArgs{
    					Field:         pulumi.String("string"),
    					Operation:     pulumi.String("string"),
    					ExpectedValue: pulumi.String("string"),
    					Key:           pulumi.String("string"),
    					Not:           pulumi.Bool(false),
    					Order:         pulumi.Int(0),
    				},
    			},
    		},
    	},
    	IsDefault: pulumi.Bool(false),
    	Name:      pulumi.String("string"),
    	Order:     pulumi.Int(0),
    	TimeRestrictions: opsgenie.TeamRoutingRuleTimeRestrictionArray{
    		&opsgenie.TeamRoutingRuleTimeRestrictionArgs{
    			Type: pulumi.String("string"),
    			Restriction: opsgenie.TeamRoutingRuleTimeRestrictionRestrictionArray{
    				&opsgenie.TeamRoutingRuleTimeRestrictionRestrictionArgs{
    					EndHour:   pulumi.Int(0),
    					EndMin:    pulumi.Int(0),
    					StartHour: pulumi.Int(0),
    					StartMin:  pulumi.Int(0),
    				},
    			},
    			RestrictionList: opsgenie.TeamRoutingRuleTimeRestrictionRestrictionListArray{
    				&opsgenie.TeamRoutingRuleTimeRestrictionRestrictionListArgs{
    					EndDay:    pulumi.String("string"),
    					EndHour:   pulumi.Int(0),
    					EndMin:    pulumi.Int(0),
    					StartDay:  pulumi.String("string"),
    					StartHour: pulumi.Int(0),
    					StartMin:  pulumi.Int(0),
    				},
    			},
    		},
    	},
    	Timezone: pulumi.String("string"),
    })
    
    var teamRoutingRuleResource = new TeamRoutingRule("teamRoutingRuleResource", TeamRoutingRuleArgs.builder()
        .notifies(TeamRoutingRuleNotifyArgs.builder()
            .type("string")
            .id("string")
            .name("string")
            .build())
        .teamId("string")
        .criterias(TeamRoutingRuleCriteriaArgs.builder()
            .type("string")
            .conditions(TeamRoutingRuleCriteriaConditionArgs.builder()
                .field("string")
                .operation("string")
                .expectedValue("string")
                .key("string")
                .not(false)
                .order(0)
                .build())
            .build())
        .isDefault(false)
        .name("string")
        .order(0)
        .timeRestrictions(TeamRoutingRuleTimeRestrictionArgs.builder()
            .type("string")
            .restriction(TeamRoutingRuleTimeRestrictionRestrictionArgs.builder()
                .endHour(0)
                .endMin(0)
                .startHour(0)
                .startMin(0)
                .build())
            .restrictionList(TeamRoutingRuleTimeRestrictionRestrictionListArgs.builder()
                .endDay("string")
                .endHour(0)
                .endMin(0)
                .startDay("string")
                .startHour(0)
                .startMin(0)
                .build())
            .build())
        .timezone("string")
        .build());
    
    team_routing_rule_resource = opsgenie.TeamRoutingRule("teamRoutingRuleResource",
        notifies=[{
            "type": "string",
            "id": "string",
            "name": "string",
        }],
        team_id="string",
        criterias=[{
            "type": "string",
            "conditions": [{
                "field": "string",
                "operation": "string",
                "expected_value": "string",
                "key": "string",
                "not_": False,
                "order": 0,
            }],
        }],
        is_default=False,
        name="string",
        order=0,
        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,
            }],
        }],
        timezone="string")
    
    const teamRoutingRuleResource = new opsgenie.TeamRoutingRule("teamRoutingRuleResource", {
        notifies: [{
            type: "string",
            id: "string",
            name: "string",
        }],
        teamId: "string",
        criterias: [{
            type: "string",
            conditions: [{
                field: "string",
                operation: "string",
                expectedValue: "string",
                key: "string",
                not: false,
                order: 0,
            }],
        }],
        isDefault: false,
        name: "string",
        order: 0,
        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,
            }],
        }],
        timezone: "string",
    });
    
    type: opsgenie:TeamRoutingRule
    properties:
        criterias:
            - conditions:
                - expectedValue: string
                  field: string
                  key: string
                  not: false
                  operation: string
                  order: 0
              type: string
        isDefault: false
        name: string
        notifies:
            - id: string
              name: string
              type: string
        order: 0
        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
        timezone: string
    

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

    Notifies List<TeamRoutingRuleNotify>
    Target entity of schedule, escalation, or the reserved word none which will be notified in routing rule. The possible values are: schedule, escalation, none
    TeamId string
    Id of the team owning the routing rule
    Criterias List<TeamRoutingRuleCriteria>
    You can refer Criteria for detailed information about criteria and its fields
    IsDefault bool
    Only use when importing default routing rule
    Name string
    Name of the team routing rule
    Order int
    The order of the team routing rule within the rules. order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n)
    TimeRestrictions List<TeamRoutingRuleTimeRestriction>
    You can refer Time Restriction for detailed information about time restriction and its fields.
    Timezone string
    Timezone of team routing rule. If timezone field is not given, account timezone is used as default.You can refer to Supported Locale IDs for available timezones
    Notifies []TeamRoutingRuleNotifyArgs
    Target entity of schedule, escalation, or the reserved word none which will be notified in routing rule. The possible values are: schedule, escalation, none
    TeamId string
    Id of the team owning the routing rule
    Criterias []TeamRoutingRuleCriteriaArgs
    You can refer Criteria for detailed information about criteria and its fields
    IsDefault bool
    Only use when importing default routing rule
    Name string
    Name of the team routing rule
    Order int
    The order of the team routing rule within the rules. order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n)
    TimeRestrictions []TeamRoutingRuleTimeRestrictionArgs
    You can refer Time Restriction for detailed information about time restriction and its fields.
    Timezone string
    Timezone of team routing rule. If timezone field is not given, account timezone is used as default.You can refer to Supported Locale IDs for available timezones
    notifies List<TeamRoutingRuleNotify>
    Target entity of schedule, escalation, or the reserved word none which will be notified in routing rule. The possible values are: schedule, escalation, none
    teamId String
    Id of the team owning the routing rule
    criterias List<TeamRoutingRuleCriteria>
    You can refer Criteria for detailed information about criteria and its fields
    isDefault Boolean
    Only use when importing default routing rule
    name String
    Name of the team routing rule
    order Integer
    The order of the team routing rule within the rules. order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n)
    timeRestrictions List<TeamRoutingRuleTimeRestriction>
    You can refer Time Restriction for detailed information about time restriction and its fields.
    timezone String
    Timezone of team routing rule. If timezone field is not given, account timezone is used as default.You can refer to Supported Locale IDs for available timezones
    notifies TeamRoutingRuleNotify[]
    Target entity of schedule, escalation, or the reserved word none which will be notified in routing rule. The possible values are: schedule, escalation, none
    teamId string
    Id of the team owning the routing rule
    criterias TeamRoutingRuleCriteria[]
    You can refer Criteria for detailed information about criteria and its fields
    isDefault boolean
    Only use when importing default routing rule
    name string
    Name of the team routing rule
    order number
    The order of the team routing rule within the rules. order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n)
    timeRestrictions TeamRoutingRuleTimeRestriction[]
    You can refer Time Restriction for detailed information about time restriction and its fields.
    timezone string
    Timezone of team routing rule. If timezone field is not given, account timezone is used as default.You can refer to Supported Locale IDs for available timezones
    notifies Sequence[TeamRoutingRuleNotifyArgs]
    Target entity of schedule, escalation, or the reserved word none which will be notified in routing rule. The possible values are: schedule, escalation, none
    team_id str
    Id of the team owning the routing rule
    criterias Sequence[TeamRoutingRuleCriteriaArgs]
    You can refer Criteria for detailed information about criteria and its fields
    is_default bool
    Only use when importing default routing rule
    name str
    Name of the team routing rule
    order int
    The order of the team routing rule within the rules. order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n)
    time_restrictions Sequence[TeamRoutingRuleTimeRestrictionArgs]
    You can refer Time Restriction for detailed information about time restriction and its fields.
    timezone str
    Timezone of team routing rule. If timezone field is not given, account timezone is used as default.You can refer to Supported Locale IDs for available timezones
    notifies List<Property Map>
    Target entity of schedule, escalation, or the reserved word none which will be notified in routing rule. The possible values are: schedule, escalation, none
    teamId String
    Id of the team owning the routing rule
    criterias List<Property Map>
    You can refer Criteria for detailed information about criteria and its fields
    isDefault Boolean
    Only use when importing default routing rule
    name String
    Name of the team routing rule
    order Number
    The order of the team routing rule within the rules. order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n)
    timeRestrictions List<Property Map>
    You can refer Time Restriction for detailed information about time restriction and its fields.
    timezone String
    Timezone of team routing rule. If timezone field is not given, account timezone is used as default.You can refer to Supported Locale IDs for available timezones

    Outputs

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

    Get an existing TeamRoutingRule 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?: TeamRoutingRuleState, opts?: CustomResourceOptions): TeamRoutingRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            criterias: Optional[Sequence[TeamRoutingRuleCriteriaArgs]] = None,
            is_default: Optional[bool] = None,
            name: Optional[str] = None,
            notifies: Optional[Sequence[TeamRoutingRuleNotifyArgs]] = None,
            order: Optional[int] = None,
            team_id: Optional[str] = None,
            time_restrictions: Optional[Sequence[TeamRoutingRuleTimeRestrictionArgs]] = None,
            timezone: Optional[str] = None) -> TeamRoutingRule
    func GetTeamRoutingRule(ctx *Context, name string, id IDInput, state *TeamRoutingRuleState, opts ...ResourceOption) (*TeamRoutingRule, error)
    public static TeamRoutingRule Get(string name, Input<string> id, TeamRoutingRuleState? state, CustomResourceOptions? opts = null)
    public static TeamRoutingRule get(String name, Output<String> id, TeamRoutingRuleState 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:
    Criterias List<TeamRoutingRuleCriteria>
    You can refer Criteria for detailed information about criteria and its fields
    IsDefault bool
    Only use when importing default routing rule
    Name string
    Name of the team routing rule
    Notifies List<TeamRoutingRuleNotify>
    Target entity of schedule, escalation, or the reserved word none which will be notified in routing rule. The possible values are: schedule, escalation, none
    Order int
    The order of the team routing rule within the rules. order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n)
    TeamId string
    Id of the team owning the routing rule
    TimeRestrictions List<TeamRoutingRuleTimeRestriction>
    You can refer Time Restriction for detailed information about time restriction and its fields.
    Timezone string
    Timezone of team routing rule. If timezone field is not given, account timezone is used as default.You can refer to Supported Locale IDs for available timezones
    Criterias []TeamRoutingRuleCriteriaArgs
    You can refer Criteria for detailed information about criteria and its fields
    IsDefault bool
    Only use when importing default routing rule
    Name string
    Name of the team routing rule
    Notifies []TeamRoutingRuleNotifyArgs
    Target entity of schedule, escalation, or the reserved word none which will be notified in routing rule. The possible values are: schedule, escalation, none
    Order int
    The order of the team routing rule within the rules. order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n)
    TeamId string
    Id of the team owning the routing rule
    TimeRestrictions []TeamRoutingRuleTimeRestrictionArgs
    You can refer Time Restriction for detailed information about time restriction and its fields.
    Timezone string
    Timezone of team routing rule. If timezone field is not given, account timezone is used as default.You can refer to Supported Locale IDs for available timezones
    criterias List<TeamRoutingRuleCriteria>
    You can refer Criteria for detailed information about criteria and its fields
    isDefault Boolean
    Only use when importing default routing rule
    name String
    Name of the team routing rule
    notifies List<TeamRoutingRuleNotify>
    Target entity of schedule, escalation, or the reserved word none which will be notified in routing rule. The possible values are: schedule, escalation, none
    order Integer
    The order of the team routing rule within the rules. order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n)
    teamId String
    Id of the team owning the routing rule
    timeRestrictions List<TeamRoutingRuleTimeRestriction>
    You can refer Time Restriction for detailed information about time restriction and its fields.
    timezone String
    Timezone of team routing rule. If timezone field is not given, account timezone is used as default.You can refer to Supported Locale IDs for available timezones
    criterias TeamRoutingRuleCriteria[]
    You can refer Criteria for detailed information about criteria and its fields
    isDefault boolean
    Only use when importing default routing rule
    name string
    Name of the team routing rule
    notifies TeamRoutingRuleNotify[]
    Target entity of schedule, escalation, or the reserved word none which will be notified in routing rule. The possible values are: schedule, escalation, none
    order number
    The order of the team routing rule within the rules. order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n)
    teamId string
    Id of the team owning the routing rule
    timeRestrictions TeamRoutingRuleTimeRestriction[]
    You can refer Time Restriction for detailed information about time restriction and its fields.
    timezone string
    Timezone of team routing rule. If timezone field is not given, account timezone is used as default.You can refer to Supported Locale IDs for available timezones
    criterias Sequence[TeamRoutingRuleCriteriaArgs]
    You can refer Criteria for detailed information about criteria and its fields
    is_default bool
    Only use when importing default routing rule
    name str
    Name of the team routing rule
    notifies Sequence[TeamRoutingRuleNotifyArgs]
    Target entity of schedule, escalation, or the reserved word none which will be notified in routing rule. The possible values are: schedule, escalation, none
    order int
    The order of the team routing rule within the rules. order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n)
    team_id str
    Id of the team owning the routing rule
    time_restrictions Sequence[TeamRoutingRuleTimeRestrictionArgs]
    You can refer Time Restriction for detailed information about time restriction and its fields.
    timezone str
    Timezone of team routing rule. If timezone field is not given, account timezone is used as default.You can refer to Supported Locale IDs for available timezones
    criterias List<Property Map>
    You can refer Criteria for detailed information about criteria and its fields
    isDefault Boolean
    Only use when importing default routing rule
    name String
    Name of the team routing rule
    notifies List<Property Map>
    Target entity of schedule, escalation, or the reserved word none which will be notified in routing rule. The possible values are: schedule, escalation, none
    order Number
    The order of the team routing rule within the rules. order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n)
    teamId String
    Id of the team owning the routing rule
    timeRestrictions List<Property Map>
    You can refer Time Restriction for detailed information about time restriction and its fields.
    timezone String
    Timezone of team routing rule. If timezone field is not given, account timezone is used as default.You can refer to Supported Locale IDs for available timezones

    Supporting Types

    TeamRoutingRuleCriteria, TeamRoutingRuleCriteriaArgs

    Type string
    Type of the operation will be applied on conditions. Should be one of match-all, match-any-condition or match-all-conditions.
    Conditions List<TeamRoutingRuleCriteriaCondition>
    List of conditions will be checked before applying team routing rule. This field declaration should be omitted if the criteria type is set to match-all.
    Type string
    Type of the operation will be applied on conditions. Should be one of match-all, match-any-condition or match-all-conditions.
    Conditions []TeamRoutingRuleCriteriaCondition
    List of conditions will be checked before applying team routing rule. This field declaration should be omitted if the criteria type is set to match-all.
    type String
    Type of the operation will be applied on conditions. Should be one of match-all, match-any-condition or match-all-conditions.
    conditions List<TeamRoutingRuleCriteriaCondition>
    List of conditions will be checked before applying team routing rule. This field declaration should be omitted if the criteria type is set to match-all.
    type string
    Type of the operation will be applied on conditions. Should be one of match-all, match-any-condition or match-all-conditions.
    conditions TeamRoutingRuleCriteriaCondition[]
    List of conditions will be checked before applying team routing rule. This field declaration should be omitted if the criteria type is set to match-all.
    type str
    Type of the operation will be applied on conditions. Should be one of match-all, match-any-condition or match-all-conditions.
    conditions Sequence[TeamRoutingRuleCriteriaCondition]
    List of conditions will be checked before applying team routing rule. This field declaration should be omitted if the criteria type is set to match-all.
    type String
    Type of the operation will be applied on conditions. Should be one of match-all, match-any-condition or match-all-conditions.
    conditions List<Property Map>
    List of conditions will be checked before applying team routing rule. This field declaration should be omitted if the criteria type is set to match-all.

    TeamRoutingRuleCriteriaCondition, TeamRoutingRuleCriteriaConditionArgs

    Field string
    Specifies which alert field will be used in condition. Possible values are message, alias, description, source, entity, tags, actions, extra-properties, recipients, teams or 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 and equals-ignore-whitespace.

    • expectedValue - (Optional) User defined value that will be compared with alert field according to the operation. Default: empty string.
    ExpectedValue 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 value is 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, extra-properties, recipients, teams or 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 and equals-ignore-whitespace.

    • expectedValue - (Optional) User defined value that will be compared with alert field according to the operation. Default: empty string.
    ExpectedValue 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 value is 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, extra-properties, recipients, teams or 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 and equals-ignore-whitespace.

    • expectedValue - (Optional) User defined value that will be compared with alert field according to the operation. Default: empty string.
    expectedValue 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 value is 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, extra-properties, recipients, teams or 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 and equals-ignore-whitespace.

    • expectedValue - (Optional) User defined value that will be compared with alert field according to the operation. Default: empty string.
    expectedValue 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 value is 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, extra-properties, recipients, teams or 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 and equals-ignore-whitespace.

    • expectedValue - (Optional) User defined value that will be compared with alert field according to the operation. Default: empty string.
    expected_value str
    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 value is 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, extra-properties, recipients, teams or 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 and equals-ignore-whitespace.

    • expectedValue - (Optional) User defined value that will be compared with alert field according to the operation. Default: empty string.
    expectedValue 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 value is false.
    order Number
    Order of the condition in conditions list.

    TeamRoutingRuleNotify, TeamRoutingRuleNotifyArgs

    Type string
    Id string
    Name string
    Type string
    Id string
    Name string
    type String
    id String
    name String
    type string
    id string
    name string
    type str
    id str
    name str
    type String
    id String
    name String

    TeamRoutingRuleTimeRestriction, TeamRoutingRuleTimeRestrictionArgs

    TeamRoutingRuleTimeRestrictionRestriction, TeamRoutingRuleTimeRestrictionRestrictionArgs

    endHour Integer
    endMin Integer
    startHour Integer
    startMin Integer
    endHour number
    endMin number
    startHour number
    startMin number
    endHour Number
    endMin Number
    startHour Number
    startMin Number

    TeamRoutingRuleTimeRestrictionRestrictionList, TeamRoutingRuleTimeRestrictionRestrictionListArgs

    EndDay string
    EndHour int
    EndMin int
    StartDay string
    StartHour int
    StartMin int
    EndDay string
    EndHour int
    EndMin int
    StartDay string
    StartHour int
    StartMin int
    endDay String
    endHour Integer
    endMin Integer
    startDay String
    startHour Integer
    startMin Integer
    endDay string
    endHour number
    endMin number
    startDay string
    startHour number
    startMin number
    endDay String
    endHour Number
    endMin Number
    startDay String
    startHour Number
    startMin Number

    Import

    Team Routing Rules can be imported using the team_id/routing_rule_id, e.g.

    $ pulumi import opsgenie:index/teamRoutingRule:TeamRoutingRule ruletest team_id/routing_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.12 published on Wednesday, Oct 16, 2024 by Pulumi