datadog.OnCallTeamRoutingRules
Explore with Pulumi AI
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:
- Team
Id string - ID of the team to associate the routing rules with.
- Rules
List<On
Call Team Routing Rules Rule> - List of team routing rules.
- Team
Id string - ID of the team to associate the routing rules with.
- Rules
[]On
Call Team Routing Rules Rule Args - List of team routing rules.
- team
Id String - ID of the team to associate the routing rules with.
- rules
List<On
Call Team Routing Rules Rule> - List of team routing rules.
- team
Id string - ID of the team to associate the routing rules with.
- rules
On
Call Team Routing Rules Rule[] - List of team routing rules.
- team_
id str - ID of the team to associate the routing rules with.
- rules
Sequence[On
Call Team Routing Rules Rule Args] - List of team routing rules.
- team
Id 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) -> OnCallTeamRoutingRules
func 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<On
Call Team Routing Rules Rule> - List of team routing rules.
- Team
Id string - ID of the team to associate the routing rules with.
- Rules
[]On
Call Team Routing Rules Rule Args - List of team routing rules.
- Team
Id string - ID of the team to associate the routing rules with.
- rules
List<On
Call Team Routing Rules Rule> - List of team routing rules.
- team
Id String - ID of the team to associate the routing rules with.
- rules
On
Call Team Routing Rules Rule[] - List of team routing rules.
- team
Id string - ID of the team to associate the routing rules with.
- rules
Sequence[On
Call 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.
- team
Id String - ID of the team to associate the routing rules with.
Supporting Types
OnCallTeamRoutingRulesRule, OnCallTeamRoutingRulesRuleArgs
- Actions
List<On
Call Team Routing Rules Rule Action> - Specifies the list of actions to perform when the routing rule is matched.
- Escalation
Policy 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
""
. - Time
Restrictions 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_policy
is set. Valid values arehigh
,low
,dynamic
.
- Actions
[]On
Call Team Routing Rules Rule Action - Specifies the list of actions to perform when the routing rule is matched.
- Escalation
Policy 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
""
. - Time
Restrictions 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_policy
is set. Valid values arehigh
,low
,dynamic
.
- actions
List<On
Call Team Routing Rules Rule Action> - Specifies the list of actions to perform when the routing rule is matched.
- escalation
Policy 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
""
. - time
Restrictions 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_policy
is set. Valid values arehigh
,low
,dynamic
.
- actions
On
Call Team Routing Rules Rule Action[] - Specifies the list of actions to perform when the routing rule is matched.
- escalation
Policy 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
""
. - time
Restrictions 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_policy
is set. Valid values arehigh
,low
,dynamic
.
- actions
Sequence[On
Call 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_policy
is set. Valid values arehigh
,low
,dynamic
.
- actions List<Property Map>
- Specifies the list of actions to perform when the routing rule is matched.
- escalation
Policy 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
""
. - time
Restrictions 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_policy
is set. Valid values arehigh
,low
,dynamic
.
OnCallTeamRoutingRulesRuleAction, OnCallTeamRoutingRulesRuleActionArgs
OnCallTeamRoutingRulesRuleActionSendSlackMessage, OnCallTeamRoutingRulesRuleActionSendSlackMessageArgs
OnCallTeamRoutingRulesRuleActionSendTeamsMessage, OnCallTeamRoutingRulesRuleActionSendTeamsMessageArgs
OnCallTeamRoutingRulesRuleTimeRestrictions, OnCallTeamRoutingRulesRuleTimeRestrictionsArgs
- Restrictions
List<On
Call Team Routing Rules Rule Time Restrictions Restriction> - List of restrictions for the rule.
- Time
Zone string - Specifies the time zone applicable to the restrictions, e.g.
America/New_York
.
- Restrictions
[]On
Call Team Routing Rules Rule Time Restrictions Restriction - List of restrictions for the rule.
- Time
Zone string - Specifies the time zone applicable to the restrictions, e.g.
America/New_York
.
- restrictions
List<On
Call Team Routing Rules Rule Time Restrictions Restriction> - List of restrictions for the rule.
- time
Zone String - Specifies the time zone applicable to the restrictions, e.g.
America/New_York
.
- restrictions
On
Call Team Routing Rules Rule Time Restrictions Restriction[] - List of restrictions for the rule.
- time
Zone string - Specifies the time zone applicable to the restrictions, e.g.
America/New_York
.
- restrictions
Sequence[On
Call 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.
- time
Zone String - Specifies the time zone applicable to the restrictions, e.g.
America/New_York
.
OnCallTeamRoutingRulesRuleTimeRestrictionsRestriction, OnCallTeamRoutingRulesRuleTimeRestrictionsRestrictionArgs
- End
Day string - The weekday when the restriction period ends. Valid values are
monday
,tuesday
,wednesday
,thursday
,friday
,saturday
,sunday
. - End
Time string - The time of day when the restriction ends (hh:mm:ss).
- Start
Day string - The weekday when the restriction period starts. Valid values are
monday
,tuesday
,wednesday
,thursday
,friday
,saturday
,sunday
. - Start
Time string - The time of day when the restriction begins (hh:mm:ss).
- End
Day string - The weekday when the restriction period ends. Valid values are
monday
,tuesday
,wednesday
,thursday
,friday
,saturday
,sunday
. - End
Time string - The time of day when the restriction ends (hh:mm:ss).
- Start
Day string - The weekday when the restriction period starts. Valid values are
monday
,tuesday
,wednesday
,thursday
,friday
,saturday
,sunday
. - Start
Time string - The time of day when the restriction begins (hh:mm:ss).
- end
Day String - The weekday when the restriction period ends. Valid values are
monday
,tuesday
,wednesday
,thursday
,friday
,saturday
,sunday
. - end
Time String - The time of day when the restriction ends (hh:mm:ss).
- start
Day String - The weekday when the restriction period starts. Valid values are
monday
,tuesday
,wednesday
,thursday
,friday
,saturday
,sunday
. - start
Time String - The time of day when the restriction begins (hh:mm:ss).
- end
Day string - The weekday when the restriction period ends. Valid values are
monday
,tuesday
,wednesday
,thursday
,friday
,saturday
,sunday
. - end
Time string - The time of day when the restriction ends (hh:mm:ss).
- start
Day string - The weekday when the restriction period starts. Valid values are
monday
,tuesday
,wednesday
,thursday
,friday
,saturday
,sunday
. - start
Time 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).
- end
Day String - The weekday when the restriction period ends. Valid values are
monday
,tuesday
,wednesday
,thursday
,friday
,saturday
,sunday
. - end
Time String - The time of day when the restriction ends (hh:mm:ss).
- start
Day String - The weekday when the restriction period starts. Valid values are
monday
,tuesday
,wednesday
,thursday
,friday
,saturday
,sunday
. - start
Time String - The time of day when the restriction begins (hh:mm:ss).
Import
The pulumi import
command can be used, for example:
Import an existing on_call_schedule
$ 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
datadog
Terraform Provider.