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

opsgenie.TeamRoutingRule

Explore with Pulumi AI

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

    Manages a Team Routing Rule within Opsgenie.

    Example Usage

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

    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.

    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=[opsgenie.TeamRoutingRuleNotifyArgs(
            type="string",
            id="string",
            name="string",
        )],
        team_id="string",
        criterias=[opsgenie.TeamRoutingRuleCriteriaArgs(
            type="string",
            conditions=[opsgenie.TeamRoutingRuleCriteriaConditionArgs(
                field="string",
                operation="string",
                expected_value="string",
                key="string",
                not_=False,
                order=0,
            )],
        )],
        is_default=False,
        name="string",
        order=0,
        time_restrictions=[opsgenie.TeamRoutingRuleTimeRestrictionArgs(
            type="string",
            restriction=[opsgenie.TeamRoutingRuleTimeRestrictionRestrictionArgs(
                end_hour=0,
                end_min=0,
                start_hour=0,
                start_min=0,
            )],
            restriction_list=[opsgenie.TeamRoutingRuleTimeRestrictionRestrictionListArgs(
                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

    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 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 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 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 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.
    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 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

    Type string
    Type of the operation will be applied on conditions. Should be one of match-all, match-any-condition or match-all-conditions.
    Restriction List<TeamRoutingRuleTimeRestrictionRestriction>
    RestrictionList List<TeamRoutingRuleTimeRestrictionRestrictionList>
    Type string
    Type of the operation will be applied on conditions. Should be one of match-all, match-any-condition or match-all-conditions.
    Restriction []TeamRoutingRuleTimeRestrictionRestriction
    RestrictionList []TeamRoutingRuleTimeRestrictionRestrictionList
    type String
    Type of the operation will be applied on conditions. Should be one of match-all, match-any-condition or match-all-conditions.
    restriction List<TeamRoutingRuleTimeRestrictionRestriction>
    restrictionList List<TeamRoutingRuleTimeRestrictionRestrictionList>
    type string
    Type of the operation will be applied on conditions. Should be one of match-all, match-any-condition or match-all-conditions.
    restriction TeamRoutingRuleTimeRestrictionRestriction[]
    restrictionList TeamRoutingRuleTimeRestrictionRestrictionList[]
    type str
    Type of the operation will be applied on conditions. Should be one of match-all, match-any-condition or match-all-conditions.
    restriction Sequence[TeamRoutingRuleTimeRestrictionRestriction]
    restriction_list Sequence[TeamRoutingRuleTimeRestrictionRestrictionList]
    type String
    Type of the operation will be applied on conditions. Should be one of match-all, match-any-condition or match-all-conditions.
    restriction List<Property Map>
    restrictionList List<Property Map>

    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.6 published on Tuesday, Feb 27, 2024 by Pulumi