datadog.OnCallTeamRoutingRules
Provides a Datadog On-Call team routing rules resource.
Example Usage
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
  teamRulesTest:
    type: datadog:OnCallTeamRoutingRules
    name: team_rules_test
    properties:
      teamId: 00000000-aba2-0000-0000-000000000000
      rules:
        - query: tags.service:test
          actions:
            - sendSlackMessage:
                - workspace: workspace
                  channel: channel
          timeRestrictions:
            - timeZone: America/New_York
              restrictions:
                - endDay: monday
                  endTime: 17:00:00
                  startDay: monday
                  startTime: 09:00:00
        - escalationPolicy: 00000000-aba2-0000-0000-000000000000
          urgency: dynamic
Create OnCallTeamRoutingRules Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OnCallTeamRoutingRules(name: string, args: OnCallTeamRoutingRulesArgs, opts?: CustomResourceOptions);@overload
def OnCallTeamRoutingRules(resource_name: str,
                           args: OnCallTeamRoutingRulesArgs,
                           opts: Optional[ResourceOptions] = None)
@overload
def OnCallTeamRoutingRules(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           team_id: Optional[str] = None,
                           rules: Optional[Sequence[OnCallTeamRoutingRulesRuleArgs]] = None)func NewOnCallTeamRoutingRules(ctx *Context, name string, args OnCallTeamRoutingRulesArgs, opts ...ResourceOption) (*OnCallTeamRoutingRules, error)public OnCallTeamRoutingRules(string name, OnCallTeamRoutingRulesArgs args, CustomResourceOptions? opts = null)
public OnCallTeamRoutingRules(String name, OnCallTeamRoutingRulesArgs args)
public OnCallTeamRoutingRules(String name, OnCallTeamRoutingRulesArgs args, CustomResourceOptions options)
type: datadog:OnCallTeamRoutingRules
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 OnCallTeamRoutingRulesArgs
- 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 OnCallTeamRoutingRulesArgs
- 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 OnCallTeamRoutingRulesArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OnCallTeamRoutingRulesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OnCallTeamRoutingRulesArgs
- 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 onCallTeamRoutingRulesResource = new Datadog.OnCallTeamRoutingRules("onCallTeamRoutingRulesResource", new()
{
    TeamId = "string",
    Rules = new[]
    {
        new Datadog.Inputs.OnCallTeamRoutingRulesRuleArgs
        {
            Actions = new[]
            {
                new Datadog.Inputs.OnCallTeamRoutingRulesRuleActionArgs
                {
                    SendSlackMessage = new Datadog.Inputs.OnCallTeamRoutingRulesRuleActionSendSlackMessageArgs
                    {
                        Channel = "string",
                        Workspace = "string",
                    },
                    SendTeamsMessage = new Datadog.Inputs.OnCallTeamRoutingRulesRuleActionSendTeamsMessageArgs
                    {
                        Channel = "string",
                        Team = "string",
                        Tenant = "string",
                    },
                },
            },
            EscalationPolicy = "string",
            Id = "string",
            Query = "string",
            TimeRestrictions = new Datadog.Inputs.OnCallTeamRoutingRulesRuleTimeRestrictionsArgs
            {
                Restrictions = new[]
                {
                    new Datadog.Inputs.OnCallTeamRoutingRulesRuleTimeRestrictionsRestrictionArgs
                    {
                        EndDay = "string",
                        EndTime = "string",
                        StartDay = "string",
                        StartTime = "string",
                    },
                },
                TimeZone = "string",
            },
            Urgency = "string",
        },
    },
});
example, err := datadog.NewOnCallTeamRoutingRules(ctx, "onCallTeamRoutingRulesResource", &datadog.OnCallTeamRoutingRulesArgs{
	TeamId: pulumi.String("string"),
	Rules: datadog.OnCallTeamRoutingRulesRuleArray{
		&datadog.OnCallTeamRoutingRulesRuleArgs{
			Actions: datadog.OnCallTeamRoutingRulesRuleActionArray{
				&datadog.OnCallTeamRoutingRulesRuleActionArgs{
					SendSlackMessage: &datadog.OnCallTeamRoutingRulesRuleActionSendSlackMessageArgs{
						Channel:   pulumi.String("string"),
						Workspace: pulumi.String("string"),
					},
					SendTeamsMessage: &datadog.OnCallTeamRoutingRulesRuleActionSendTeamsMessageArgs{
						Channel: pulumi.String("string"),
						Team:    pulumi.String("string"),
						Tenant:  pulumi.String("string"),
					},
				},
			},
			EscalationPolicy: pulumi.String("string"),
			Id:               pulumi.String("string"),
			Query:            pulumi.String("string"),
			TimeRestrictions: &datadog.OnCallTeamRoutingRulesRuleTimeRestrictionsArgs{
				Restrictions: datadog.OnCallTeamRoutingRulesRuleTimeRestrictionsRestrictionArray{
					&datadog.OnCallTeamRoutingRulesRuleTimeRestrictionsRestrictionArgs{
						EndDay:    pulumi.String("string"),
						EndTime:   pulumi.String("string"),
						StartDay:  pulumi.String("string"),
						StartTime: pulumi.String("string"),
					},
				},
				TimeZone: pulumi.String("string"),
			},
			Urgency: pulumi.String("string"),
		},
	},
})
var onCallTeamRoutingRulesResource = new OnCallTeamRoutingRules("onCallTeamRoutingRulesResource", OnCallTeamRoutingRulesArgs.builder()
    .teamId("string")
    .rules(OnCallTeamRoutingRulesRuleArgs.builder()
        .actions(OnCallTeamRoutingRulesRuleActionArgs.builder()
            .sendSlackMessage(OnCallTeamRoutingRulesRuleActionSendSlackMessageArgs.builder()
                .channel("string")
                .workspace("string")
                .build())
            .sendTeamsMessage(OnCallTeamRoutingRulesRuleActionSendTeamsMessageArgs.builder()
                .channel("string")
                .team("string")
                .tenant("string")
                .build())
            .build())
        .escalationPolicy("string")
        .id("string")
        .query("string")
        .timeRestrictions(OnCallTeamRoutingRulesRuleTimeRestrictionsArgs.builder()
            .restrictions(OnCallTeamRoutingRulesRuleTimeRestrictionsRestrictionArgs.builder()
                .endDay("string")
                .endTime("string")
                .startDay("string")
                .startTime("string")
                .build())
            .timeZone("string")
            .build())
        .urgency("string")
        .build())
    .build());
on_call_team_routing_rules_resource = datadog.OnCallTeamRoutingRules("onCallTeamRoutingRulesResource",
    team_id="string",
    rules=[{
        "actions": [{
            "send_slack_message": {
                "channel": "string",
                "workspace": "string",
            },
            "send_teams_message": {
                "channel": "string",
                "team": "string",
                "tenant": "string",
            },
        }],
        "escalation_policy": "string",
        "id": "string",
        "query": "string",
        "time_restrictions": {
            "restrictions": [{
                "end_day": "string",
                "end_time": "string",
                "start_day": "string",
                "start_time": "string",
            }],
            "time_zone": "string",
        },
        "urgency": "string",
    }])
const onCallTeamRoutingRulesResource = new datadog.OnCallTeamRoutingRules("onCallTeamRoutingRulesResource", {
    teamId: "string",
    rules: [{
        actions: [{
            sendSlackMessage: {
                channel: "string",
                workspace: "string",
            },
            sendTeamsMessage: {
                channel: "string",
                team: "string",
                tenant: "string",
            },
        }],
        escalationPolicy: "string",
        id: "string",
        query: "string",
        timeRestrictions: {
            restrictions: [{
                endDay: "string",
                endTime: "string",
                startDay: "string",
                startTime: "string",
            }],
            timeZone: "string",
        },
        urgency: "string",
    }],
});
type: datadog:OnCallTeamRoutingRules
properties:
    rules:
        - actions:
            - sendSlackMessage:
                channel: string
                workspace: string
              sendTeamsMessage:
                channel: string
                team: string
                tenant: string
          escalationPolicy: string
          id: string
          query: string
          timeRestrictions:
            restrictions:
                - endDay: string
                  endTime: string
                  startDay: string
                  startTime: string
            timeZone: string
          urgency: string
    teamId: string
OnCallTeamRoutingRules 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 OnCallTeamRoutingRules resource accepts the following input properties:
- TeamId string
- ID of the team to associate the routing rules with.
- Rules
List<OnCall Team Routing Rules Rule> 
- List of team routing rules.
- TeamId string
- ID of the team to associate the routing rules with.
- Rules
[]OnCall Team Routing Rules Rule Args 
- List of team routing rules.
- teamId String
- ID of the team to associate the routing rules with.
- rules
List<OnCall Team Routing Rules Rule> 
- List of team routing rules.
- teamId string
- ID of the team to associate the routing rules with.
- rules
OnCall Team Routing Rules Rule[] 
- List of team routing rules.
- team_id str
- ID of the team to associate the routing rules with.
- rules
Sequence[OnCall Team Routing Rules Rule Args] 
- List of team routing rules.
- teamId String
- ID of the team to associate the routing rules with.
- rules List<Property Map>
- List of team routing rules.
Outputs
All input properties are implicitly available as output properties. Additionally, the OnCallTeamRoutingRules 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 OnCallTeamRoutingRules Resource
Get an existing OnCallTeamRoutingRules 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?: OnCallTeamRoutingRulesState, opts?: CustomResourceOptions): OnCallTeamRoutingRules@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        rules: Optional[Sequence[OnCallTeamRoutingRulesRuleArgs]] = None,
        team_id: Optional[str] = None) -> OnCallTeamRoutingRulesfunc GetOnCallTeamRoutingRules(ctx *Context, name string, id IDInput, state *OnCallTeamRoutingRulesState, opts ...ResourceOption) (*OnCallTeamRoutingRules, error)public static OnCallTeamRoutingRules Get(string name, Input<string> id, OnCallTeamRoutingRulesState? state, CustomResourceOptions? opts = null)public static OnCallTeamRoutingRules get(String name, Output<String> id, OnCallTeamRoutingRulesState state, CustomResourceOptions options)resources:  _:    type: datadog:OnCallTeamRoutingRules    get:      id: ${id}- 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.
- Rules
List<OnCall Team Routing Rules Rule> 
- List of team routing rules.
- TeamId string
- ID of the team to associate the routing rules with.
- Rules
[]OnCall Team Routing Rules Rule Args 
- List of team routing rules.
- TeamId string
- ID of the team to associate the routing rules with.
- rules
List<OnCall Team Routing Rules Rule> 
- List of team routing rules.
- teamId String
- ID of the team to associate the routing rules with.
- rules
OnCall Team Routing Rules Rule[] 
- List of team routing rules.
- teamId string
- ID of the team to associate the routing rules with.
- rules
Sequence[OnCall Team Routing Rules Rule Args] 
- List of team routing rules.
- team_id str
- ID of the team to associate the routing rules with.
- rules List<Property Map>
- List of team routing rules.
- teamId String
- ID of the team to associate the routing rules with.
Supporting Types
OnCallTeamRoutingRulesRule, OnCallTeamRoutingRulesRuleArgs            
- Actions
List<OnCall Team Routing Rules Rule Action> 
- Specifies the list of actions to perform when the routing rule is matched.
- EscalationPolicy string
- ID of the policy to be applied when this routing rule matches.
- Id string
- The ID of this rule.
- Query string
- Defines the query or condition that triggers this routing rule. Defaults to "".
- TimeRestrictions OnCall Team Routing Rules Rule Time Restrictions 
- Holds time zone information and a list of time restrictions for a routing rule.
- Urgency string
- Defines the urgency for pages created via this rule. Only valid if escalation_policyis set. Valid values arehigh,low,dynamic.
- Actions
[]OnCall Team Routing Rules Rule Action 
- Specifies the list of actions to perform when the routing rule is matched.
- EscalationPolicy string
- ID of the policy to be applied when this routing rule matches.
- Id string
- The ID of this rule.
- Query string
- Defines the query or condition that triggers this routing rule. Defaults to "".
- TimeRestrictions OnCall Team Routing Rules Rule Time Restrictions 
- Holds time zone information and a list of time restrictions for a routing rule.
- Urgency string
- Defines the urgency for pages created via this rule. Only valid if escalation_policyis set. Valid values arehigh,low,dynamic.
- actions
List<OnCall Team Routing Rules Rule Action> 
- Specifies the list of actions to perform when the routing rule is matched.
- escalationPolicy String
- ID of the policy to be applied when this routing rule matches.
- id String
- The ID of this rule.
- query String
- Defines the query or condition that triggers this routing rule. Defaults to "".
- timeRestrictions OnCall Team Routing Rules Rule Time Restrictions 
- Holds time zone information and a list of time restrictions for a routing rule.
- urgency String
- Defines the urgency for pages created via this rule. Only valid if escalation_policyis set. Valid values arehigh,low,dynamic.
- actions
OnCall Team Routing Rules Rule Action[] 
- Specifies the list of actions to perform when the routing rule is matched.
- escalationPolicy string
- ID of the policy to be applied when this routing rule matches.
- id string
- The ID of this rule.
- query string
- Defines the query or condition that triggers this routing rule. Defaults to "".
- timeRestrictions OnCall Team Routing Rules Rule Time Restrictions 
- Holds time zone information and a list of time restrictions for a routing rule.
- urgency string
- Defines the urgency for pages created via this rule. Only valid if escalation_policyis set. Valid values arehigh,low,dynamic.
- actions
Sequence[OnCall Team Routing Rules Rule Action] 
- Specifies the list of actions to perform when the routing rule is matched.
- escalation_policy str
- ID of the policy to be applied when this routing rule matches.
- id str
- The ID of this rule.
- query str
- Defines the query or condition that triggers this routing rule. Defaults to "".
- time_restrictions OnCall Team Routing Rules Rule Time Restrictions 
- Holds time zone information and a list of time restrictions for a routing rule.
- urgency str
- Defines the urgency for pages created via this rule. Only valid if escalation_policyis set. Valid values arehigh,low,dynamic.
- actions List<Property Map>
- Specifies the list of actions to perform when the routing rule is matched.
- escalationPolicy String
- ID of the policy to be applied when this routing rule matches.
- id String
- The ID of this rule.
- query String
- Defines the query or condition that triggers this routing rule. Defaults to "".
- timeRestrictions Property Map
- Holds time zone information and a list of time restrictions for a routing rule.
- urgency String
- Defines the urgency for pages created via this rule. Only valid if escalation_policyis set. Valid values arehigh,low,dynamic.
OnCallTeamRoutingRulesRuleAction, OnCallTeamRoutingRulesRuleActionArgs              
OnCallTeamRoutingRulesRuleActionSendSlackMessage, OnCallTeamRoutingRulesRuleActionSendSlackMessageArgs                    
OnCallTeamRoutingRulesRuleActionSendTeamsMessage, OnCallTeamRoutingRulesRuleActionSendTeamsMessageArgs                    
OnCallTeamRoutingRulesRuleTimeRestrictions, OnCallTeamRoutingRulesRuleTimeRestrictionsArgs                
- Restrictions
List<OnCall Team Routing Rules Rule Time Restrictions Restriction> 
- List of restrictions for the rule.
- TimeZone string
- Specifies the time zone applicable to the restrictions, e.g. America/New_York.
- Restrictions
[]OnCall Team Routing Rules Rule Time Restrictions Restriction 
- List of restrictions for the rule.
- TimeZone string
- Specifies the time zone applicable to the restrictions, e.g. America/New_York.
- restrictions
List<OnCall Team Routing Rules Rule Time Restrictions Restriction> 
- List of restrictions for the rule.
- timeZone String
- Specifies the time zone applicable to the restrictions, e.g. America/New_York.
- restrictions
OnCall Team Routing Rules Rule Time Restrictions Restriction[] 
- List of restrictions for the rule.
- timeZone string
- Specifies the time zone applicable to the restrictions, e.g. America/New_York.
- restrictions
Sequence[OnCall Team Routing Rules Rule Time Restrictions Restriction] 
- List of restrictions for the rule.
- time_zone str
- Specifies the time zone applicable to the restrictions, e.g. America/New_York.
- restrictions List<Property Map>
- List of restrictions for the rule.
- timeZone String
- Specifies the time zone applicable to the restrictions, e.g. America/New_York.
OnCallTeamRoutingRulesRuleTimeRestrictionsRestriction, OnCallTeamRoutingRulesRuleTimeRestrictionsRestrictionArgs                  
- EndDay string
- The weekday when the restriction period ends. Valid values are monday,tuesday,wednesday,thursday,friday,saturday,sunday.
- EndTime string
- The time of day when the restriction ends (hh:mm:ss).
- StartDay string
- The weekday when the restriction period starts. Valid values are monday,tuesday,wednesday,thursday,friday,saturday,sunday.
- StartTime string
- The time of day when the restriction begins (hh:mm:ss).
- EndDay string
- The weekday when the restriction period ends. Valid values are monday,tuesday,wednesday,thursday,friday,saturday,sunday.
- EndTime string
- The time of day when the restriction ends (hh:mm:ss).
- StartDay string
- The weekday when the restriction period starts. Valid values are monday,tuesday,wednesday,thursday,friday,saturday,sunday.
- StartTime string
- The time of day when the restriction begins (hh:mm:ss).
- endDay String
- The weekday when the restriction period ends. Valid values are monday,tuesday,wednesday,thursday,friday,saturday,sunday.
- endTime String
- The time of day when the restriction ends (hh:mm:ss).
- startDay String
- The weekday when the restriction period starts. Valid values are monday,tuesday,wednesday,thursday,friday,saturday,sunday.
- startTime String
- The time of day when the restriction begins (hh:mm:ss).
- endDay string
- The weekday when the restriction period ends. Valid values are monday,tuesday,wednesday,thursday,friday,saturday,sunday.
- endTime string
- The time of day when the restriction ends (hh:mm:ss).
- startDay string
- The weekday when the restriction period starts. Valid values are monday,tuesday,wednesday,thursday,friday,saturday,sunday.
- startTime string
- The time of day when the restriction begins (hh:mm:ss).
- end_day str
- The weekday when the restriction period ends. Valid values are monday,tuesday,wednesday,thursday,friday,saturday,sunday.
- end_time str
- The time of day when the restriction ends (hh:mm:ss).
- start_day str
- The weekday when the restriction period starts. Valid values are monday,tuesday,wednesday,thursday,friday,saturday,sunday.
- start_time str
- The time of day when the restriction begins (hh:mm:ss).
- endDay String
- The weekday when the restriction period ends. Valid values are monday,tuesday,wednesday,thursday,friday,saturday,sunday.
- endTime String
- The time of day when the restriction ends (hh:mm:ss).
- startDay String
- The weekday when the restriction period starts. Valid values are monday,tuesday,wednesday,thursday,friday,saturday,sunday.
- startTime String
- The time of day when the restriction begins (hh:mm:ss).
Import
The pulumi import command can be used, for example:
Import existing on_call_team_routing_rules
$ pulumi import datadog:index/onCallTeamRoutingRules:OnCallTeamRoutingRules test "b03a07d5-49da-43e9-83b4-5d84969b588b"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the datadogTerraform Provider.
