1. Registry
  2. Packages
  3. Incident Provider
  4. API Docs
  5. Schedule
Viewing docs for incident 7.0.0
published on Friday, Sep 11, 2026 by incident-io
Viewing docs for incident 7.0.0
published on Friday, Sep 11, 2026 by incident-io

    Manage an on-call schedule.

    A schedule holds the rotations that decide who is on call. This resource manages only the schedule itself — its name, timezone, owning teams and public holidays. Rotations are managed separately, as incident.ScheduleRotation, so adding or editing one never means rewriting the whole schedule.

    A schedule created here starts with no rotations, and nobody is on call until one is added.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as incident from "@pulumi/incident";
    
    // A schedule holds the rotations that decide who is on call. This resource covers
    // the schedule itself; rotations are managed separately, so a schedule created
    // here has none and nobody is on call until one is added.
    const platform = new incident.Schedule("platform", {
        name: "Platform on-call",
        timezone: "Europe/London",
        teamIds: [platformTeam.id],
        holidaysPublicConfig: {
            countryCodes: [
                "GB",
                "FR",
            ],
        },
    });
    
    import pulumi
    import pulumi_incident as incident
    
    # A schedule holds the rotations that decide who is on call. This resource covers
    # the schedule itself; rotations are managed separately, so a schedule created
    # here has none and nobody is on call until one is added.
    platform = incident.Schedule("platform",
        name="Platform on-call",
        timezone="Europe/London",
        team_ids=[platform_team["id"]],
        holidays_public_config={
            "country_codes": [
                "GB",
                "FR",
            ],
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/incident/v7/incident"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// A schedule holds the rotations that decide who is on call. This resource covers
    		// the schedule itself; rotations are managed separately, so a schedule created
    		// here has none and nobody is on call until one is added.
    		_, err := incident.NewSchedule(ctx, "platform", &incident.ScheduleArgs{
    			Name:     pulumi.String("Platform on-call"),
    			Timezone: pulumi.String("Europe/London"),
    			TeamIds: pulumi.StringArray{
    				platformTeam.Id,
    			},
    			HolidaysPublicConfig: &incident.ScheduleHolidaysPublicConfigArgs{
    				CountryCodes: pulumi.StringArray{
    					pulumi.String("GB"),
    					pulumi.String("FR"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Incident = Pulumi.Incident;
    
    return await Deployment.RunAsync(() => 
    {
        // A schedule holds the rotations that decide who is on call. This resource covers
        // the schedule itself; rotations are managed separately, so a schedule created
        // here has none and nobody is on call until one is added.
        var platform = new Incident.Schedule("platform", new()
        {
            Name = "Platform on-call",
            Timezone = "Europe/London",
            TeamIds = new[]
            {
                platformTeam.Id,
            },
            HolidaysPublicConfig = new Incident.Inputs.ScheduleHolidaysPublicConfigArgs
            {
                CountryCodes = new[]
                {
                    "GB",
                    "FR",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.incident.Schedule;
    import com.pulumi.incident.ScheduleArgs;
    import com.pulumi.incident.inputs.ScheduleHolidaysPublicConfigArgs;
    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) {
            // A schedule holds the rotations that decide who is on call. This resource covers
            // the schedule itself; rotations are managed separately, so a schedule created
            // here has none and nobody is on call until one is added.
            var platform = new Schedule("platform", ScheduleArgs.builder()
                .name("Platform on-call")
                .timezone("Europe/London")
                .teamIds(platformTeam.id())
                .holidaysPublicConfig(ScheduleHolidaysPublicConfigArgs.builder()
                    .countryCodes(                
                        "GB",
                        "FR")
                    .build())
                .build());
    
        }
    }
    
    resources:
      # A schedule holds the rotations that decide who is on call. This resource covers
      # the schedule itself; rotations are managed separately, so a schedule created
      # here has none and nobody is on call until one is added.
      platform:
        type: incident:Schedule
        properties:
          name: Platform on-call
          timezone: Europe/London
          teamIds:
            - ${platformTeam.id}
          holidaysPublicConfig:
            countryCodes:
              - GB
              - FR
    
    Example coming soon!
    

    Create Schedule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Schedule(name: string, args: ScheduleArgs, opts?: CustomResourceOptions);
    @overload
    def Schedule(resource_name: str,
                 args: ScheduleArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Schedule(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 timezone: Optional[str] = None,
                 holidays_public_config: Optional[ScheduleHolidaysPublicConfigArgs] = None,
                 name: Optional[str] = None,
                 team_ids: Optional[Sequence[str]] = None)
    func NewSchedule(ctx *Context, name string, args ScheduleArgs, opts ...ResourceOption) (*Schedule, error)
    public Schedule(string name, ScheduleArgs args, CustomResourceOptions? opts = null)
    public Schedule(String name, ScheduleArgs args)
    public Schedule(String name, ScheduleArgs args, CustomResourceOptions options)
    
    type: incident:Schedule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "incident_schedule" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ScheduleArgs
    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 ScheduleArgs
    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 ScheduleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScheduleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScheduleArgs
    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 scheduleResource = new Incident.Schedule("scheduleResource", new()
    {
        Timezone = "string",
        HolidaysPublicConfig = new Incident.Inputs.ScheduleHolidaysPublicConfigArgs
        {
            CountryCodes = new[]
            {
                "string",
            },
        },
        Name = "string",
        TeamIds = new[]
        {
            "string",
        },
    });
    
    example, err := incident.NewSchedule(ctx, "scheduleResource", &incident.ScheduleArgs{
    	Timezone: pulumi.String("string"),
    	HolidaysPublicConfig: &incident.ScheduleHolidaysPublicConfigArgs{
    		CountryCodes: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	Name: pulumi.String("string"),
    	TeamIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    resource "incident_schedule" "scheduleResource" {
      lifecycle {
        create_before_destroy = true
      }
      timezone = "string"
      holidays_public_config = {
        country_codes = ["string"]
      }
      name     = "string"
      team_ids = ["string"]
    }
    
    var scheduleResource = new Schedule("scheduleResource", ScheduleArgs.builder()
        .timezone("string")
        .holidaysPublicConfig(ScheduleHolidaysPublicConfigArgs.builder()
            .countryCodes("string")
            .build())
        .name("string")
        .teamIds("string")
        .build());
    
    schedule_resource = incident.Schedule("scheduleResource",
        timezone="string",
        holidays_public_config={
            "country_codes": ["string"],
        },
        name="string",
        team_ids=["string"])
    
    const scheduleResource = new incident.Schedule("scheduleResource", {
        timezone: "string",
        holidaysPublicConfig: {
            countryCodes: ["string"],
        },
        name: "string",
        teamIds: ["string"],
    });
    
    type: incident:Schedule
    properties:
        holidaysPublicConfig:
            countryCodes:
                - string
        name: string
        teamIds:
            - string
        timezone: string
    

    Schedule 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 Schedule resource accepts the following input properties:

    Timezone string
    Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.
    HolidaysPublicConfig ScheduleHolidaysPublicConfig
    Public holidays to show on this schedule. Omit the block entirely to show none.
    Name string
    Human readable name for the schedule
    TeamIds List<string>
    IDs of teams that own this schedule
    Timezone string
    Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.
    HolidaysPublicConfig ScheduleHolidaysPublicConfigArgs
    Public holidays to show on this schedule. Omit the block entirely to show none.
    Name string
    Human readable name for the schedule
    TeamIds []string
    IDs of teams that own this schedule
    timezone string
    Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.
    holidays_public_config object
    Public holidays to show on this schedule. Omit the block entirely to show none.
    name string
    Human readable name for the schedule
    team_ids list(string)
    IDs of teams that own this schedule
    timezone String
    Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.
    holidaysPublicConfig ScheduleHolidaysPublicConfig
    Public holidays to show on this schedule. Omit the block entirely to show none.
    name String
    Human readable name for the schedule
    teamIds List<String>
    IDs of teams that own this schedule
    timezone string
    Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.
    holidaysPublicConfig ScheduleHolidaysPublicConfig
    Public holidays to show on this schedule. Omit the block entirely to show none.
    name string
    Human readable name for the schedule
    teamIds string[]
    IDs of teams that own this schedule
    timezone str
    Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.
    holidays_public_config ScheduleHolidaysPublicConfigArgs
    Public holidays to show on this schedule. Omit the block entirely to show none.
    name str
    Human readable name for the schedule
    team_ids Sequence[str]
    IDs of teams that own this schedule
    timezone String
    Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.
    holidaysPublicConfig Property Map
    Public holidays to show on this schedule. Omit the block entirely to show none.
    name String
    Human readable name for the schedule
    teamIds List<String>
    IDs of teams that own this schedule

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Schedule 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 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 Schedule Resource

    Get an existing Schedule 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?: ScheduleState, opts?: CustomResourceOptions): Schedule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            holidays_public_config: Optional[ScheduleHolidaysPublicConfigArgs] = None,
            name: Optional[str] = None,
            team_ids: Optional[Sequence[str]] = None,
            timezone: Optional[str] = None) -> Schedule
    func GetSchedule(ctx *Context, name string, id IDInput, state *ScheduleState, opts ...ResourceOption) (*Schedule, error)
    public static Schedule Get(string name, Input<string> id, ScheduleState? state, CustomResourceOptions? opts = null)
    public static Schedule get(String name, Output<String> id, ScheduleState state, CustomResourceOptions options)
    resources:  _:    type: incident:Schedule    get:      id: ${id}
    import {
      to = incident_schedule.example
      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:
    HolidaysPublicConfig ScheduleHolidaysPublicConfig
    Public holidays to show on this schedule. Omit the block entirely to show none.
    Name string
    Human readable name for the schedule
    TeamIds List<string>
    IDs of teams that own this schedule
    Timezone string
    Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.
    HolidaysPublicConfig ScheduleHolidaysPublicConfigArgs
    Public holidays to show on this schedule. Omit the block entirely to show none.
    Name string
    Human readable name for the schedule
    TeamIds []string
    IDs of teams that own this schedule
    Timezone string
    Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.
    holidays_public_config object
    Public holidays to show on this schedule. Omit the block entirely to show none.
    name string
    Human readable name for the schedule
    team_ids list(string)
    IDs of teams that own this schedule
    timezone string
    Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.
    holidaysPublicConfig ScheduleHolidaysPublicConfig
    Public holidays to show on this schedule. Omit the block entirely to show none.
    name String
    Human readable name for the schedule
    teamIds List<String>
    IDs of teams that own this schedule
    timezone String
    Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.
    holidaysPublicConfig ScheduleHolidaysPublicConfig
    Public holidays to show on this schedule. Omit the block entirely to show none.
    name string
    Human readable name for the schedule
    teamIds string[]
    IDs of teams that own this schedule
    timezone string
    Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.
    holidays_public_config ScheduleHolidaysPublicConfigArgs
    Public holidays to show on this schedule. Omit the block entirely to show none.
    name str
    Human readable name for the schedule
    team_ids Sequence[str]
    IDs of teams that own this schedule
    timezone str
    Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.
    holidaysPublicConfig Property Map
    Public holidays to show on this schedule. Omit the block entirely to show none.
    name String
    Human readable name for the schedule
    teamIds List<String>
    IDs of teams that own this schedule
    timezone String
    Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.

    Supporting Types

    ScheduleHolidaysPublicConfig, ScheduleHolidaysPublicConfigArgs

    CountryCodes List<string>
    ISO 3166-1 alpha-2 country codes for the countries that this schedule is configured to view holidays for
    CountryCodes []string
    ISO 3166-1 alpha-2 country codes for the countries that this schedule is configured to view holidays for
    country_codes list(string)
    ISO 3166-1 alpha-2 country codes for the countries that this schedule is configured to view holidays for
    countryCodes List<String>
    ISO 3166-1 alpha-2 country codes for the countries that this schedule is configured to view holidays for
    countryCodes string[]
    ISO 3166-1 alpha-2 country codes for the countries that this schedule is configured to view holidays for
    country_codes Sequence[str]
    ISO 3166-1 alpha-2 country codes for the countries that this schedule is configured to view holidays for
    countryCodes List<String>
    ISO 3166-1 alpha-2 country codes for the countries that this schedule is configured to view holidays for

    Import

    Import is supported using an import block or the pulumi import command:

    The import block can be used with the id attribute, for example:

    terraform

    Import a schedule using its ID

    Replace the ID with a real ID from your incident.io organization

    import {

    to = incident_schedule.example

    id = “01ABC123DEF456GHI789JKL”

    }

    The pulumi import command can be used, for example:

    #!/bin/bash

    Import a schedule using its ID

    Replace the ID with a real ID from your incident.io organization

    $ pulumi import incident:index/schedule:Schedule example 01ABC123DEF456GHI789JKL
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    incident incident-io/terraform-provider-incident
    License
    Notes
    This Pulumi package is based on the incident Terraform Provider.
    Viewing docs for incident 7.0.0
    published on Friday, Sep 11, 2026 by incident-io

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial