1. Packages
  2. Datadog Provider
  3. API Docs
  4. OnCallSchedule
Datadog v4.51.0 published on Wednesday, Jun 11, 2025 by Pulumi

datadog.OnCallSchedule

Explore with Pulumi AI

datadog logo
Datadog v4.51.0 published on Wednesday, Jun 11, 2025 by Pulumi

    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.
    TimeZone string
    The time zone in which the schedule is defined.
    Layers List<OnCallScheduleLayer>
    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.
    TimeZone string
    The time zone in which the schedule is defined.
    Layers []OnCallScheduleLayerArgs
    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.
    timeZone String
    The time zone in which the schedule is defined.
    layers List<OnCallScheduleLayer>
    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.
    timeZone string
    The time zone in which the schedule is defined.
    layers OnCallScheduleLayer[]
    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[OnCallScheduleLayerArgs]
    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.
    timeZone 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.
    The following state arguments are supported:
    Layers List<OnCallScheduleLayer>
    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.
    TimeZone string
    The time zone in which the schedule is defined.
    Layers []OnCallScheduleLayerArgs
    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.
    TimeZone string
    The time zone in which the schedule is defined.
    layers List<OnCallScheduleLayer>
    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.
    timeZone String
    The time zone in which the schedule is defined.
    layers OnCallScheduleLayer[]
    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.
    timeZone string
    The time zone in which the schedule is defined.
    layers Sequence[OnCallScheduleLayerArgs]
    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.
    timeZone String
    The time zone in which the schedule is defined.

    Supporting Types

    OnCallScheduleLayer, OnCallScheduleLayerArgs

    EffectiveDate 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
    EndDate string
    The date/time after which this layer no longer applies (in ISO 8601).
    Id string
    The ID of this layer.
    Interval OnCallScheduleLayerInterval
    Restrictions List<OnCallScheduleLayerRestriction>
    List of restrictions for the layer.
    RotationStart string
    The date/time when the rotation for this layer starts (in ISO 8601).
    EffectiveDate 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
    EndDate string
    The date/time after which this layer no longer applies (in ISO 8601).
    Id string
    The ID of this layer.
    Interval OnCallScheduleLayerInterval
    Restrictions []OnCallScheduleLayerRestriction
    List of restrictions for the layer.
    RotationStart string
    The date/time when the rotation for this layer starts (in ISO 8601).
    effectiveDate 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
    endDate String
    The date/time after which this layer no longer applies (in ISO 8601).
    id String
    The ID of this layer.
    interval OnCallScheduleLayerInterval
    restrictions List<OnCallScheduleLayerRestriction>
    List of restrictions for the layer.
    rotationStart String
    The date/time when the rotation for this layer starts (in ISO 8601).
    effectiveDate 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
    endDate string
    The date/time after which this layer no longer applies (in ISO 8601).
    id string
    The ID of this layer.
    interval OnCallScheduleLayerInterval
    restrictions OnCallScheduleLayerRestriction[]
    List of restrictions for the layer.
    rotationStart 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 OnCallScheduleLayerInterval
    restrictions Sequence[OnCallScheduleLayerRestriction]
    List of restrictions for the layer.
    rotation_start str
    The date/time when the rotation for this layer starts (in ISO 8601).
    effectiveDate 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
    endDate 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.
    rotationStart String
    The date/time when the rotation for this layer starts (in ISO 8601).

    OnCallScheduleLayerInterval, OnCallScheduleLayerIntervalArgs

    Days int
    The number of full days in each rotation period.
    Seconds int
    For intervals that are not expressible in whole days, this will be added to days. Defaults to 0.
    Days int
    The number of full days in each rotation period.
    Seconds int
    For intervals that are not expressible in whole days, this will be added to days. Defaults to 0.
    days Integer
    The number of full days in each rotation period.
    seconds Integer
    For intervals that are not expressible in whole days, this will be added to days. Defaults to 0.
    days number
    The number of full days in each rotation period.
    seconds number
    For intervals that are not expressible in whole days, this will be added to days. Defaults to 0.
    days int
    The number of full days in each rotation period.
    seconds int
    For intervals that are not expressible in whole days, this will be added to days. Defaults to 0.
    days Number
    The number of full days in each rotation period.
    seconds Number
    For intervals that are not expressible in whole days, this will be added to days. Defaults to 0.

    OnCallScheduleLayerRestriction, OnCallScheduleLayerRestrictionArgs

    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

    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.
    datadog logo
    Datadog v4.51.0 published on Wednesday, Jun 11, 2025 by Pulumi