1. Packages
  2. Packages
  3. Rootly
  4. API Docs
  5. Schedule
Viewing docs for Rootly v3.3.0
published on Thursday, May 7, 2026 by rootlyhq
rootly logo
Viewing docs for Rootly v3.3.0
published on Thursday, May 7, 2026 by rootlyhq

    Example Usage

    data "rootly_user" "john" {
      email = "demo@rootly.com"
    }
    
    data "rootly_user" "jane" {
      email = "demo1@rootly.com"
    }
    
    resource "rootly_schedule" "primary" {
      name              = "Primary On-Call Schedule"
      owner_user_id     = data.rootly_user.john.id
      all_time_coverage = false
    }
    
    resource "rootly_schedule_rotation" "weekdays" {
      schedule_id     = rootly_schedule.primary.id
      name            = "weekdays"
      active_all_week = false
      active_days = [
        "M",
        "T",
        "W",
        "R",
        "F",
      ]
      active_time_type = "custom"
      position         = 1
      schedule_rotationable_attributes = {
        handoff_time = "T",
        handoff_time = "10:00"
      }
      schedule_rotationable_type = "ScheduleWeeklyRotation"
      time_zone                  = "America/Toronto"
    }
    
    # Define active days for the weekday rotation
    # Monday
    resource "rootly_schedule_rotation_active_day" "m1-weekday" {
      schedule_rotation_id = rootly_schedule_rotation.weekdays.id
      day_name             = "M"
      active_time_attributes {
        start_time = "10:00"
        end_time   = "18:00"
      }
    }
    # Tuesday
    resource "rootly_schedule_rotation_active_day" "t1-weekday" {
      schedule_rotation_id = rootly_schedule_rotation.weekdays.id
      day_name             = "T"
      active_time_attributes {
        start_time = "10:00"
        end_time   = "18:00"
      }
    }
    # Wednesday
    resource "rootly_schedule_rotation_active_day" "w1-weekday" {
      schedule_rotation_id = rootly_schedule_rotation.weekdays.id
      day_name             = "W"
      active_time_attributes {
        start_time = "10:00"
        end_time   = "18:00"
      }
    }
    # Thursday
    resource "rootly_schedule_rotation_active_day" "th1-weekday" {
      schedule_rotation_id = rootly_schedule_rotation.weekdays.id
      day_name             = "R"
      active_time_attributes {
        start_time = "10:00"
        end_time   = "18:00"
      }
    }
    # Friday
    resource "rootly_schedule_rotation_active_day" "f1-weekday" {
      schedule_rotation_id = rootly_schedule_rotation.weekdays.id
      day_name             = "F"
      active_time_attributes {
        start_time = "10:00"
        end_time   = "18:00"
      }
    }
    
    resource "rootly_schedule_rotation_user" "john" {
      schedule_rotation_id = rootly_schedule_rotation.weekdays.id
      position             = 1
      user_id              = data.rootly_user.john.id
    }
    
    resource "rootly_schedule_rotation_user" "jane" {
      schedule_rotation_id = rootly_schedule_rotation.weekdays.id
      position             = 2
      user_id              = data.rootly_user.jane.id
    }
    

    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: Optional[ScheduleArgs] = None,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Schedule(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 all_time_coverage: Optional[bool] = None,
                 description: Optional[str] = None,
                 name: Optional[str] = None,
                 owner_group_ids: Optional[Sequence[str]] = None,
                 owner_user_id: Optional[int] = None,
                 slack_channel: Optional[Mapping[str, str]] = None,
                 slack_user_group: Optional[Mapping[str, str]] = None)
    func NewSchedule(ctx *Context, name string, args *ScheduleArgs, opts ...ResourceOption) (*Schedule, error)
    public Schedule(string name, ScheduleArgs? args = null, CustomResourceOptions? opts = null)
    public Schedule(String name, ScheduleArgs args)
    public Schedule(String name, ScheduleArgs args, CustomResourceOptions options)
    
    type: rootly:Schedule
    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 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 Rootly.Schedule("scheduleResource", new()
    {
        AllTimeCoverage = false,
        Description = "string",
        Name = "string",
        OwnerGroupIds = new[]
        {
            "string",
        },
        OwnerUserId = 0,
        SlackChannel = 
        {
            { "string", "string" },
        },
        SlackUserGroup = 
        {
            { "string", "string" },
        },
    });
    
    example, err := rootly.NewSchedule(ctx, "scheduleResource", &rootly.ScheduleArgs{
    	AllTimeCoverage: pulumi.Bool(false),
    	Description:     pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	OwnerGroupIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	OwnerUserId: pulumi.Int(0),
    	SlackChannel: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	SlackUserGroup: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var scheduleResource = new Schedule("scheduleResource", ScheduleArgs.builder()
        .allTimeCoverage(false)
        .description("string")
        .name("string")
        .ownerGroupIds("string")
        .ownerUserId(0)
        .slackChannel(Map.of("string", "string"))
        .slackUserGroup(Map.of("string", "string"))
        .build());
    
    schedule_resource = rootly.Schedule("scheduleResource",
        all_time_coverage=False,
        description="string",
        name="string",
        owner_group_ids=["string"],
        owner_user_id=0,
        slack_channel={
            "string": "string",
        },
        slack_user_group={
            "string": "string",
        })
    
    const scheduleResource = new rootly.Schedule("scheduleResource", {
        allTimeCoverage: false,
        description: "string",
        name: "string",
        ownerGroupIds: ["string"],
        ownerUserId: 0,
        slackChannel: {
            string: "string",
        },
        slackUserGroup: {
            string: "string",
        },
    });
    
    type: rootly:Schedule
    properties:
        allTimeCoverage: false
        description: string
        name: string
        ownerGroupIds:
            - string
        ownerUserId: 0
        slackChannel:
            string: string
        slackUserGroup:
            string: 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:

    AllTimeCoverage bool
    24/7 coverage of the schedule. Value must be one of true or false
    Description string
    The description of the schedule
    Name string
    The name of the schedule
    OwnerGroupIds List<string>
    The owning teams for this schedules.
    OwnerUserId int
    ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
    SlackChannel Dictionary<string, string>
    Map must contain two fields, id and name. Synced slack channel of the schedule
    SlackUserGroup Dictionary<string, string>
    Map must contain two fields, id and name. Synced slack group of the schedule
    AllTimeCoverage bool
    24/7 coverage of the schedule. Value must be one of true or false
    Description string
    The description of the schedule
    Name string
    The name of the schedule
    OwnerGroupIds []string
    The owning teams for this schedules.
    OwnerUserId int
    ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
    SlackChannel map[string]string
    Map must contain two fields, id and name. Synced slack channel of the schedule
    SlackUserGroup map[string]string
    Map must contain two fields, id and name. Synced slack group of the schedule
    allTimeCoverage Boolean
    24/7 coverage of the schedule. Value must be one of true or false
    description String
    The description of the schedule
    name String
    The name of the schedule
    ownerGroupIds List<String>
    The owning teams for this schedules.
    ownerUserId Integer
    ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
    slackChannel Map<String,String>
    Map must contain two fields, id and name. Synced slack channel of the schedule
    slackUserGroup Map<String,String>
    Map must contain two fields, id and name. Synced slack group of the schedule
    allTimeCoverage boolean
    24/7 coverage of the schedule. Value must be one of true or false
    description string
    The description of the schedule
    name string
    The name of the schedule
    ownerGroupIds string[]
    The owning teams for this schedules.
    ownerUserId number
    ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
    slackChannel {[key: string]: string}
    Map must contain two fields, id and name. Synced slack channel of the schedule
    slackUserGroup {[key: string]: string}
    Map must contain two fields, id and name. Synced slack group of the schedule
    all_time_coverage bool
    24/7 coverage of the schedule. Value must be one of true or false
    description str
    The description of the schedule
    name str
    The name of the schedule
    owner_group_ids Sequence[str]
    The owning teams for this schedules.
    owner_user_id int
    ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
    slack_channel Mapping[str, str]
    Map must contain two fields, id and name. Synced slack channel of the schedule
    slack_user_group Mapping[str, str]
    Map must contain two fields, id and name. Synced slack group of the schedule
    allTimeCoverage Boolean
    24/7 coverage of the schedule. Value must be one of true or false
    description String
    The description of the schedule
    name String
    The name of the schedule
    ownerGroupIds List<String>
    The owning teams for this schedules.
    ownerUserId Number
    ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
    slackChannel Map<String>
    Map must contain two fields, id and name. Synced slack channel of the schedule
    slackUserGroup Map<String>
    Map must contain two fields, id and name. Synced slack group of the 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 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,
            all_time_coverage: Optional[bool] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            owner_group_ids: Optional[Sequence[str]] = None,
            owner_user_id: Optional[int] = None,
            slack_channel: Optional[Mapping[str, str]] = None,
            slack_user_group: Optional[Mapping[str, 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: rootly:Schedule    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:
    AllTimeCoverage bool
    24/7 coverage of the schedule. Value must be one of true or false
    Description string
    The description of the schedule
    Name string
    The name of the schedule
    OwnerGroupIds List<string>
    The owning teams for this schedules.
    OwnerUserId int
    ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
    SlackChannel Dictionary<string, string>
    Map must contain two fields, id and name. Synced slack channel of the schedule
    SlackUserGroup Dictionary<string, string>
    Map must contain two fields, id and name. Synced slack group of the schedule
    AllTimeCoverage bool
    24/7 coverage of the schedule. Value must be one of true or false
    Description string
    The description of the schedule
    Name string
    The name of the schedule
    OwnerGroupIds []string
    The owning teams for this schedules.
    OwnerUserId int
    ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
    SlackChannel map[string]string
    Map must contain two fields, id and name. Synced slack channel of the schedule
    SlackUserGroup map[string]string
    Map must contain two fields, id and name. Synced slack group of the schedule
    allTimeCoverage Boolean
    24/7 coverage of the schedule. Value must be one of true or false
    description String
    The description of the schedule
    name String
    The name of the schedule
    ownerGroupIds List<String>
    The owning teams for this schedules.
    ownerUserId Integer
    ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
    slackChannel Map<String,String>
    Map must contain two fields, id and name. Synced slack channel of the schedule
    slackUserGroup Map<String,String>
    Map must contain two fields, id and name. Synced slack group of the schedule
    allTimeCoverage boolean
    24/7 coverage of the schedule. Value must be one of true or false
    description string
    The description of the schedule
    name string
    The name of the schedule
    ownerGroupIds string[]
    The owning teams for this schedules.
    ownerUserId number
    ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
    slackChannel {[key: string]: string}
    Map must contain two fields, id and name. Synced slack channel of the schedule
    slackUserGroup {[key: string]: string}
    Map must contain two fields, id and name. Synced slack group of the schedule
    all_time_coverage bool
    24/7 coverage of the schedule. Value must be one of true or false
    description str
    The description of the schedule
    name str
    The name of the schedule
    owner_group_ids Sequence[str]
    The owning teams for this schedules.
    owner_user_id int
    ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
    slack_channel Mapping[str, str]
    Map must contain two fields, id and name. Synced slack channel of the schedule
    slack_user_group Mapping[str, str]
    Map must contain two fields, id and name. Synced slack group of the schedule
    allTimeCoverage Boolean
    24/7 coverage of the schedule. Value must be one of true or false
    description String
    The description of the schedule
    name String
    The name of the schedule
    ownerGroupIds List<String>
    The owning teams for this schedules.
    ownerUserId Number
    ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
    slackChannel Map<String>
    Map must contain two fields, id and name. Synced slack channel of the schedule
    slackUserGroup Map<String>
    Map must contain two fields, id and name. Synced slack group of the schedule

    Import

    rootly.Schedule can be imported using the import command.

    $ pulumi import rootly:index/schedule:Schedule primary a816421c-6ceb-481a-87c4-585e47451f24
    

    Or using an import block.

    Locate the resource id in the web app, or retrieve it by listing resources through the API if it’s not visible in the web app.

    HCL can be generated from the import block using the -generate-config-out flag.

    pulumi preview -generate-config-out=generated.tf
    

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

    Package Details

    Repository
    rootly rootlyhq/pulumi-rootly
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the rootly Terraform Provider.
    rootly logo
    Viewing docs for Rootly v3.3.0
    published on Thursday, May 7, 2026 by rootlyhq
      Try Pulumi Cloud free. Your team will thank you.