datadog.OnCallSchedule
Explore with Pulumi AI
Provides a Datadog On-Call schedule resource. This can be used to create and manage Datadog On-Call schedules.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
test:
type: datadog:OnCallSchedule
properties:
name: Team A On-Call
timeZone: America/New_York
teams:
- 00000000-aba2-0000-0000-000000000000
layers:
- name: Primary On-Call Layer
effectiveDate: 2025-01-01T00:00:00Z
endDate: 2026-01-01T00:00:00Z
rotationStart: 2025-01-01T00:00:00Z
interval:
- days: 1
seconds: 300
users:
- 00000000-aba1-0000-0000-000000000000
restrictions:
- endDay: monday
endTime: 17:00:00
startDay: monday
startTime: 09:00:00
Create OnCallSchedule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OnCallSchedule(name: string, args: OnCallScheduleArgs, opts?: CustomResourceOptions);
@overload
def OnCallSchedule(resource_name: str,
args: OnCallScheduleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OnCallSchedule(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
time_zone: Optional[str] = None,
layers: Optional[Sequence[OnCallScheduleLayerArgs]] = None,
teams: Optional[Sequence[str]] = None)
func NewOnCallSchedule(ctx *Context, name string, args OnCallScheduleArgs, opts ...ResourceOption) (*OnCallSchedule, error)
public OnCallSchedule(string name, OnCallScheduleArgs args, CustomResourceOptions? opts = null)
public OnCallSchedule(String name, OnCallScheduleArgs args)
public OnCallSchedule(String name, OnCallScheduleArgs args, CustomResourceOptions options)
type: datadog:OnCallSchedule
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 OnCallScheduleArgs
- 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 OnCallScheduleArgs
- 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 OnCallScheduleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OnCallScheduleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OnCallScheduleArgs
- 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 onCallScheduleResource = new Datadog.OnCallSchedule("onCallScheduleResource", new()
{
Name = "string",
TimeZone = "string",
Layers = new[]
{
new Datadog.Inputs.OnCallScheduleLayerArgs
{
EffectiveDate = "string",
Name = "string",
Users = new[]
{
"string",
},
EndDate = "string",
Id = "string",
Interval = new Datadog.Inputs.OnCallScheduleLayerIntervalArgs
{
Days = 0,
Seconds = 0,
},
Restrictions = new[]
{
new Datadog.Inputs.OnCallScheduleLayerRestrictionArgs
{
EndDay = "string",
EndTime = "string",
StartDay = "string",
StartTime = "string",
},
},
RotationStart = "string",
},
},
Teams = new[]
{
"string",
},
});
example, err := datadog.NewOnCallSchedule(ctx, "onCallScheduleResource", &datadog.OnCallScheduleArgs{
Name: pulumi.String("string"),
TimeZone: pulumi.String("string"),
Layers: datadog.OnCallScheduleLayerArray{
&datadog.OnCallScheduleLayerArgs{
EffectiveDate: pulumi.String("string"),
Name: pulumi.String("string"),
Users: pulumi.StringArray{
pulumi.String("string"),
},
EndDate: pulumi.String("string"),
Id: pulumi.String("string"),
Interval: &datadog.OnCallScheduleLayerIntervalArgs{
Days: pulumi.Int(0),
Seconds: pulumi.Int(0),
},
Restrictions: datadog.OnCallScheduleLayerRestrictionArray{
&datadog.OnCallScheduleLayerRestrictionArgs{
EndDay: pulumi.String("string"),
EndTime: pulumi.String("string"),
StartDay: pulumi.String("string"),
StartTime: pulumi.String("string"),
},
},
RotationStart: pulumi.String("string"),
},
},
Teams: pulumi.StringArray{
pulumi.String("string"),
},
})
var onCallScheduleResource = new OnCallSchedule("onCallScheduleResource", OnCallScheduleArgs.builder()
.name("string")
.timeZone("string")
.layers(OnCallScheduleLayerArgs.builder()
.effectiveDate("string")
.name("string")
.users("string")
.endDate("string")
.id("string")
.interval(OnCallScheduleLayerIntervalArgs.builder()
.days(0)
.seconds(0)
.build())
.restrictions(OnCallScheduleLayerRestrictionArgs.builder()
.endDay("string")
.endTime("string")
.startDay("string")
.startTime("string")
.build())
.rotationStart("string")
.build())
.teams("string")
.build());
on_call_schedule_resource = datadog.OnCallSchedule("onCallScheduleResource",
name="string",
time_zone="string",
layers=[{
"effective_date": "string",
"name": "string",
"users": ["string"],
"end_date": "string",
"id": "string",
"interval": {
"days": 0,
"seconds": 0,
},
"restrictions": [{
"end_day": "string",
"end_time": "string",
"start_day": "string",
"start_time": "string",
}],
"rotation_start": "string",
}],
teams=["string"])
const onCallScheduleResource = new datadog.OnCallSchedule("onCallScheduleResource", {
name: "string",
timeZone: "string",
layers: [{
effectiveDate: "string",
name: "string",
users: ["string"],
endDate: "string",
id: "string",
interval: {
days: 0,
seconds: 0,
},
restrictions: [{
endDay: "string",
endTime: "string",
startDay: "string",
startTime: "string",
}],
rotationStart: "string",
}],
teams: ["string"],
});
type: datadog:OnCallSchedule
properties:
layers:
- effectiveDate: string
endDate: string
id: string
interval:
days: 0
seconds: 0
name: string
restrictions:
- endDay: string
endTime: string
startDay: string
startTime: string
rotationStart: string
users:
- string
name: string
teams:
- string
timeZone: string
OnCallSchedule 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 OnCallSchedule resource accepts the following input properties:
- Name string
- A human-readable name for the new schedule.
- Time
Zone string - The time zone in which the schedule is defined.
- Layers
List<On
Call Schedule Layer> - List of layers for the schedule.
- Teams List<string>
- A list of team ids associated with the schedule.
- Name string
- A human-readable name for the new schedule.
- Time
Zone string - The time zone in which the schedule is defined.
- Layers
[]On
Call Schedule Layer Args - List of layers for the schedule.
- Teams []string
- A list of team ids associated with the schedule.
- name String
- A human-readable name for the new schedule.
- time
Zone String - The time zone in which the schedule is defined.
- layers
List<On
Call Schedule Layer> - List of layers for the schedule.
- teams List<String>
- A list of team ids associated with the schedule.
- name string
- A human-readable name for the new schedule.
- time
Zone string - The time zone in which the schedule is defined.
- layers
On
Call Schedule Layer[] - List of layers for the schedule.
- teams string[]
- A list of team ids associated with the schedule.
- name str
- A human-readable name for the new schedule.
- time_
zone str - The time zone in which the schedule is defined.
- layers
Sequence[On
Call Schedule Layer Args] - List of layers for the schedule.
- teams Sequence[str]
- A list of team ids associated with the schedule.
- name String
- A human-readable name for the new schedule.
- time
Zone String - The time zone in which the schedule is defined.
- layers List<Property Map>
- List of layers for the schedule.
- teams List<String>
- A list of team ids associated with the schedule.
Outputs
All input properties are implicitly available as output properties. Additionally, the OnCallSchedule 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 OnCallSchedule Resource
Get an existing OnCallSchedule 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?: OnCallScheduleState, opts?: CustomResourceOptions): OnCallSchedule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
layers: Optional[Sequence[OnCallScheduleLayerArgs]] = None,
name: Optional[str] = None,
teams: Optional[Sequence[str]] = None,
time_zone: Optional[str] = None) -> OnCallSchedule
func GetOnCallSchedule(ctx *Context, name string, id IDInput, state *OnCallScheduleState, opts ...ResourceOption) (*OnCallSchedule, error)
public static OnCallSchedule Get(string name, Input<string> id, OnCallScheduleState? state, CustomResourceOptions? opts = null)
public static OnCallSchedule get(String name, Output<String> id, OnCallScheduleState state, CustomResourceOptions options)
resources: _: type: datadog:OnCallSchedule 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.
- Layers
List<On
Call Schedule Layer> - List of layers for the schedule.
- Name string
- A human-readable name for the new schedule.
- Teams List<string>
- A list of team ids associated with the schedule.
- Time
Zone string - The time zone in which the schedule is defined.
- Layers
[]On
Call Schedule Layer Args - List of layers for the schedule.
- Name string
- A human-readable name for the new schedule.
- Teams []string
- A list of team ids associated with the schedule.
- Time
Zone string - The time zone in which the schedule is defined.
- layers
List<On
Call Schedule Layer> - List of layers for the schedule.
- name String
- A human-readable name for the new schedule.
- teams List<String>
- A list of team ids associated with the schedule.
- time
Zone String - The time zone in which the schedule is defined.
- layers
On
Call Schedule Layer[] - List of layers for the schedule.
- name string
- A human-readable name for the new schedule.
- teams string[]
- A list of team ids associated with the schedule.
- time
Zone string - The time zone in which the schedule is defined.
- layers
Sequence[On
Call Schedule Layer Args] - List of layers for the schedule.
- name str
- A human-readable name for the new schedule.
- teams Sequence[str]
- A list of team ids associated with the schedule.
- time_
zone str - The time zone in which the schedule is defined.
- layers List<Property Map>
- List of layers for the schedule.
- name String
- A human-readable name for the new schedule.
- teams List<String>
- A list of team ids associated with the schedule.
- time
Zone String - The time zone in which the schedule is defined.
Supporting Types
OnCallScheduleLayer, OnCallScheduleLayerArgs
- Effective
Date string - The date/time when this layer should become active (in ISO 8601).
- Name string
- The name of this layer. Should be unique within the schedule.
- Users List<string>
- List of user IDs for the layer. Can either be a valid user id or null
- End
Date string - The date/time after which this layer no longer applies (in ISO 8601).
- Id string
- The ID of this layer.
- Interval
On
Call Schedule Layer Interval - Restrictions
List<On
Call Schedule Layer Restriction> - List of restrictions for the layer.
- Rotation
Start string - The date/time when the rotation for this layer starts (in ISO 8601).
- Effective
Date string - The date/time when this layer should become active (in ISO 8601).
- Name string
- The name of this layer. Should be unique within the schedule.
- Users []string
- List of user IDs for the layer. Can either be a valid user id or null
- End
Date string - The date/time after which this layer no longer applies (in ISO 8601).
- Id string
- The ID of this layer.
- Interval
On
Call Schedule Layer Interval - Restrictions
[]On
Call Schedule Layer Restriction - List of restrictions for the layer.
- Rotation
Start string - The date/time when the rotation for this layer starts (in ISO 8601).
- effective
Date String - The date/time when this layer should become active (in ISO 8601).
- name String
- The name of this layer. Should be unique within the schedule.
- users List<String>
- List of user IDs for the layer. Can either be a valid user id or null
- end
Date String - The date/time after which this layer no longer applies (in ISO 8601).
- id String
- The ID of this layer.
- interval
On
Call Schedule Layer Interval - restrictions
List<On
Call Schedule Layer Restriction> - List of restrictions for the layer.
- rotation
Start String - The date/time when the rotation for this layer starts (in ISO 8601).
- effective
Date string - The date/time when this layer should become active (in ISO 8601).
- name string
- The name of this layer. Should be unique within the schedule.
- users string[]
- List of user IDs for the layer. Can either be a valid user id or null
- end
Date string - The date/time after which this layer no longer applies (in ISO 8601).
- id string
- The ID of this layer.
- interval
On
Call Schedule Layer Interval - restrictions
On
Call Schedule Layer Restriction[] - List of restrictions for the layer.
- rotation
Start string - The date/time when the rotation for this layer starts (in ISO 8601).
- effective_
date str - The date/time when this layer should become active (in ISO 8601).
- name str
- The name of this layer. Should be unique within the schedule.
- users Sequence[str]
- List of user IDs for the layer. Can either be a valid user id or null
- end_
date str - The date/time after which this layer no longer applies (in ISO 8601).
- id str
- The ID of this layer.
- interval
On
Call Schedule Layer Interval - restrictions
Sequence[On
Call Schedule Layer Restriction] - List of restrictions for the layer.
- rotation_
start str - The date/time when the rotation for this layer starts (in ISO 8601).
- effective
Date String - The date/time when this layer should become active (in ISO 8601).
- name String
- The name of this layer. Should be unique within the schedule.
- users List<String>
- List of user IDs for the layer. Can either be a valid user id or null
- end
Date String - The date/time after which this layer no longer applies (in ISO 8601).
- id String
- The ID of this layer.
- interval Property Map
- restrictions List<Property Map>
- List of restrictions for the layer.
- rotation
Start String - The date/time when the rotation for this layer starts (in ISO 8601).
OnCallScheduleLayerInterval, OnCallScheduleLayerIntervalArgs
OnCallScheduleLayerRestriction, OnCallScheduleLayerRestrictionArgs
- 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
Import an existing on_call_schedule
$ pulumi import datadog:index/onCallSchedule:OnCallSchedule 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.