1. Packages
  2. Packages
  3. Incident Provider
  4. API Docs
  5. getScheduleRotationBeta
Viewing docs for incident 6.0.0
published on Monday, Aug 3, 2026 by incident-io
Viewing docs for incident 6.0.0
published on Monday, Aug 3, 2026 by incident-io

    Look up a rotation on a schedule by id or name. Exactly one lookup field should be set.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as incident from "@pulumi/incident";
    
    // Look up a rotation by name. Names are unique within a schedule, so this is
    // unambiguous.
    const primary = incident.getScheduleRotationBeta({
        scheduleId: platformIncidentScheduleBeta.id,
        name: "Primary",
    });
    // ...or by ID.
    const primaryById = incident.getScheduleRotationBeta({
        scheduleId: platformIncidentScheduleBeta.id,
        id: "01MNO456PQR789STU012VWX",
    });
    // Useful for pointing an escalation path at one rotation rather than the whole
    // schedule, when the rotation itself isn't managed here.
    const platform = new incident.EscalationPath("platform", {
        name: "Platform",
        paths: [{
            type: "level",
            level: {
                targets: [{
                    type: "schedule",
                    id: platformIncidentScheduleBeta.id,
                    urgency: "high",
                    scheduleMode: "all_users_for_rota",
                    selectedRotaId: primary.then(primary => primary.id),
                }],
            },
        }],
    });
    
    import pulumi
    import pulumi_incident as incident
    
    # Look up a rotation by name. Names are unique within a schedule, so this is
    # unambiguous.
    primary = incident.get_schedule_rotation_beta(schedule_id=platform_incident_schedule_beta["id"],
        name="Primary")
    # ...or by ID.
    primary_by_id = incident.get_schedule_rotation_beta(schedule_id=platform_incident_schedule_beta["id"],
        id="01MNO456PQR789STU012VWX")
    # Useful for pointing an escalation path at one rotation rather than the whole
    # schedule, when the rotation itself isn't managed here.
    platform = incident.EscalationPath("platform",
        name="Platform",
        paths=[{
            "type": "level",
            "level": {
                "targets": [{
                    "type": "schedule",
                    "id": platform_incident_schedule_beta["id"],
                    "urgency": "high",
                    "schedule_mode": "all_users_for_rota",
                    "selected_rota_id": primary.id,
                }],
            },
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/incident/v6/incident"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Look up a rotation by name. Names are unique within a schedule, so this is
    		// unambiguous.
    		primary, err := incident.LookupScheduleRotationBeta(ctx, &incident.LookupScheduleRotationBetaArgs{
    			ScheduleId: platformIncidentScheduleBeta.Id,
    			Name:       pulumi.StringRef("Primary"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// ...or by ID.
    		_, err = incident.LookupScheduleRotationBeta(ctx, &incident.LookupScheduleRotationBetaArgs{
    			ScheduleId: platformIncidentScheduleBeta.Id,
    			Id:         pulumi.StringRef("01MNO456PQR789STU012VWX"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Useful for pointing an escalation path at one rotation rather than the whole
    		// schedule, when the rotation itself isn't managed here.
    		_, err = incident.NewEscalationPath(ctx, "platform", &incident.EscalationPathArgs{
    			Name: pulumi.String("Platform"),
    			Paths: incident.EscalationPathPathArray{
    				&incident.EscalationPathPathArgs{
    					Type: pulumi.String("level"),
    					Level: &incident.EscalationPathPathLevelArgs{
    						Targets: incident.EscalationPathPathLevelTargetArray{
    							&incident.EscalationPathPathLevelTargetArgs{
    								Type:           pulumi.String("schedule"),
    								Id:             pulumi.Any(platformIncidentScheduleBeta.Id),
    								Urgency:        pulumi.String("high"),
    								ScheduleMode:   pulumi.String("all_users_for_rota"),
    								SelectedRotaId: pulumi.String(primary.Id),
    							},
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Incident = Pulumi.Incident;
    
    return await Deployment.RunAsync(() => 
    {
        // Look up a rotation by name. Names are unique within a schedule, so this is
        // unambiguous.
        var primary = Incident.GetScheduleRotationBeta.Invoke(new()
        {
            ScheduleId = platformIncidentScheduleBeta.Id,
            Name = "Primary",
        });
    
        // ...or by ID.
        var primaryById = Incident.GetScheduleRotationBeta.Invoke(new()
        {
            ScheduleId = platformIncidentScheduleBeta.Id,
            Id = "01MNO456PQR789STU012VWX",
        });
    
        // Useful for pointing an escalation path at one rotation rather than the whole
        // schedule, when the rotation itself isn't managed here.
        var platform = new Incident.EscalationPath("platform", new()
        {
            Name = "Platform",
            Paths = new[]
            {
                new Incident.Inputs.EscalationPathPathArgs
                {
                    Type = "level",
                    Level = new Incident.Inputs.EscalationPathPathLevelArgs
                    {
                        Targets = new[]
                        {
                            new Incident.Inputs.EscalationPathPathLevelTargetArgs
                            {
                                Type = "schedule",
                                Id = platformIncidentScheduleBeta.Id,
                                Urgency = "high",
                                ScheduleMode = "all_users_for_rota",
                                SelectedRotaId = primary.Apply(getScheduleRotationBetaResult => getScheduleRotationBetaResult.Id),
                            },
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.incident.IncidentFunctions;
    import com.pulumi.incident.inputs.GetScheduleRotationBetaArgs;
    import com.pulumi.incident.EscalationPath;
    import com.pulumi.incident.EscalationPathArgs;
    import com.pulumi.incident.inputs.EscalationPathPathArgs;
    import com.pulumi.incident.inputs.EscalationPathPathLevelArgs;
    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) {
            // Look up a rotation by name. Names are unique within a schedule, so this is
            // unambiguous.
            final var primary = IncidentFunctions.getScheduleRotationBeta(GetScheduleRotationBetaArgs.builder()
                .scheduleId(platformIncidentScheduleBeta.id())
                .name("Primary")
                .build());
    
            // ...or by ID.
            final var primaryById = IncidentFunctions.getScheduleRotationBeta(GetScheduleRotationBetaArgs.builder()
                .scheduleId(platformIncidentScheduleBeta.id())
                .id("01MNO456PQR789STU012VWX")
                .build());
    
            // Useful for pointing an escalation path at one rotation rather than the whole
            // schedule, when the rotation itself isn't managed here.
            var platform = new EscalationPath("platform", EscalationPathArgs.builder()
                .name("Platform")
                .paths(EscalationPathPathArgs.builder()
                    .type("level")
                    .level(EscalationPathPathLevelArgs.builder()
                        .targets(EscalationPathPathLevelTargetArgs.builder()
                            .type("schedule")
                            .id(platformIncidentScheduleBeta.id())
                            .urgency("high")
                            .scheduleMode("all_users_for_rota")
                            .selectedRotaId(primary.id())
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Useful for pointing an escalation path at one rotation rather than the whole
      # schedule, when the rotation itself isn't managed here.
      platform:
        type: incident:EscalationPath
        properties:
          name: Platform
          paths:
            - type: level
              level:
                targets:
                  - type: schedule
                    id: ${platformIncidentScheduleBeta.id}
                    urgency: high
                    scheduleMode: all_users_for_rota
                    selectedRotaId: ${primary.id}
    variables:
      # Look up a rotation by name. Names are unique within a schedule, so this is
      # unambiguous.
      primary:
        fn::invoke:
          function: incident:getScheduleRotationBeta
          arguments:
            scheduleId: ${platformIncidentScheduleBeta.id}
            name: Primary
      # ...or by ID.
      primaryById:
        fn::invoke:
          function: incident:getScheduleRotationBeta
          arguments:
            scheduleId: ${platformIncidentScheduleBeta.id}
            id: 01MNO456PQR789STU012VWX
    
    Example coming soon!
    

    Using getScheduleRotationBeta

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getScheduleRotationBeta(args: GetScheduleRotationBetaArgs, opts?: InvokeOptions): Promise<GetScheduleRotationBetaResult>
    function getScheduleRotationBetaOutput(args: GetScheduleRotationBetaOutputArgs, opts?: InvokeOptions): Output<GetScheduleRotationBetaResult>
    def get_schedule_rotation_beta(id: Optional[str] = None,
                                   name: Optional[str] = None,
                                   schedule_id: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetScheduleRotationBetaResult
    def get_schedule_rotation_beta_output(id: pulumi.Input[Optional[str]] = None,
                                   name: pulumi.Input[Optional[str]] = None,
                                   schedule_id: pulumi.Input[Optional[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetScheduleRotationBetaResult]
    func LookupScheduleRotationBeta(ctx *Context, args *LookupScheduleRotationBetaArgs, opts ...InvokeOption) (*LookupScheduleRotationBetaResult, error)
    func LookupScheduleRotationBetaOutput(ctx *Context, args *LookupScheduleRotationBetaOutputArgs, opts ...InvokeOption) LookupScheduleRotationBetaResultOutput

    > Note: This function is named LookupScheduleRotationBeta in the Go SDK.

    public static class GetScheduleRotationBeta 
    {
        public static Task<GetScheduleRotationBetaResult> InvokeAsync(GetScheduleRotationBetaArgs args, InvokeOptions? opts = null)
        public static Output<GetScheduleRotationBetaResult> Invoke(GetScheduleRotationBetaInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetScheduleRotationBetaResult> getScheduleRotationBeta(GetScheduleRotationBetaArgs args, InvokeOptions options)
    public static Output<GetScheduleRotationBetaResult> getScheduleRotationBeta(GetScheduleRotationBetaArgs args, InvokeOptions options)
    
    fn::invoke:
      function: incident:index/getScheduleRotationBeta:getScheduleRotationBeta
      arguments:
        # arguments dictionary
    data "incident_get_schedule_rotation_beta" "name" {
        # arguments
    }

    The following arguments are supported:

    ScheduleId string
    ID of the schedule this rotation belongs to
    Id string
    Look up the rotation by ID.
    Name string
    Look up the rotation by name, which is unique within the schedule.
    ScheduleId string
    ID of the schedule this rotation belongs to
    Id string
    Look up the rotation by ID.
    Name string
    Look up the rotation by name, which is unique within the schedule.
    schedule_id string
    ID of the schedule this rotation belongs to
    id string
    Look up the rotation by ID.
    name string
    Look up the rotation by name, which is unique within the schedule.
    scheduleId String
    ID of the schedule this rotation belongs to
    id String
    Look up the rotation by ID.
    name String
    Look up the rotation by name, which is unique within the schedule.
    scheduleId string
    ID of the schedule this rotation belongs to
    id string
    Look up the rotation by ID.
    name string
    Look up the rotation by name, which is unique within the schedule.
    schedule_id str
    ID of the schedule this rotation belongs to
    id str
    Look up the rotation by ID.
    name str
    Look up the rotation by name, which is unique within the schedule.
    scheduleId String
    ID of the schedule this rotation belongs to
    id String
    Look up the rotation by ID.
    name String
    Look up the rotation by name, which is unique within the schedule.

    getScheduleRotationBeta Result

    The following output properties are available:

    ConcurrentShifts double
    How many shifts run at the same time, which is how many people are on call at once
    EffectiveFrom string
    When this shape of the rotation took over. Unset when the rotation has only ever had one.
    FirstIntervalStartsAt string
    When the first handover interval starts being counted from, which fixes the time of day and day of week shifts change hands. The dashboard calls this the handover time.
    Handovers List<GetScheduleRotationBetaHandover>
    The cadence shifts hand over on, applied in turn
    Id string
    Look up the rotation by ID.
    Name string
    Look up the rotation by name, which is unique within the schedule.
    Rank double
    Where this rotation sits in the schedule's running order, lowest first. Unset when it has never been ordered.
    ScheduleId string
    ID of the schedule this rotation belongs to
    SchedulingMode string
    How users are allocated across shifts of differing length
    Users List<string>
    IDs of the people in the rotation, in the order they take shifts.
    WorkingIntervals List<GetScheduleRotationBetaWorkingInterval>
    Weekday intervals the rotation is on call for, if it's restricted to any.
    ConcurrentShifts float64
    How many shifts run at the same time, which is how many people are on call at once
    EffectiveFrom string
    When this shape of the rotation took over. Unset when the rotation has only ever had one.
    FirstIntervalStartsAt string
    When the first handover interval starts being counted from, which fixes the time of day and day of week shifts change hands. The dashboard calls this the handover time.
    Handovers []GetScheduleRotationBetaHandover
    The cadence shifts hand over on, applied in turn
    Id string
    Look up the rotation by ID.
    Name string
    Look up the rotation by name, which is unique within the schedule.
    Rank float64
    Where this rotation sits in the schedule's running order, lowest first. Unset when it has never been ordered.
    ScheduleId string
    ID of the schedule this rotation belongs to
    SchedulingMode string
    How users are allocated across shifts of differing length
    Users []string
    IDs of the people in the rotation, in the order they take shifts.
    WorkingIntervals []GetScheduleRotationBetaWorkingInterval
    Weekday intervals the rotation is on call for, if it's restricted to any.
    concurrent_shifts number
    How many shifts run at the same time, which is how many people are on call at once
    effective_from string
    When this shape of the rotation took over. Unset when the rotation has only ever had one.
    first_interval_starts_at string
    When the first handover interval starts being counted from, which fixes the time of day and day of week shifts change hands. The dashboard calls this the handover time.
    handovers list(object)
    The cadence shifts hand over on, applied in turn
    id string
    Look up the rotation by ID.
    name string
    Look up the rotation by name, which is unique within the schedule.
    rank number
    Where this rotation sits in the schedule's running order, lowest first. Unset when it has never been ordered.
    schedule_id string
    ID of the schedule this rotation belongs to
    scheduling_mode string
    How users are allocated across shifts of differing length
    users list(string)
    IDs of the people in the rotation, in the order they take shifts.
    working_intervals list(object)
    Weekday intervals the rotation is on call for, if it's restricted to any.
    concurrentShifts Double
    How many shifts run at the same time, which is how many people are on call at once
    effectiveFrom String
    When this shape of the rotation took over. Unset when the rotation has only ever had one.
    firstIntervalStartsAt String
    When the first handover interval starts being counted from, which fixes the time of day and day of week shifts change hands. The dashboard calls this the handover time.
    handovers List<GetScheduleRotationBetaHandover>
    The cadence shifts hand over on, applied in turn
    id String
    Look up the rotation by ID.
    name String
    Look up the rotation by name, which is unique within the schedule.
    rank Double
    Where this rotation sits in the schedule's running order, lowest first. Unset when it has never been ordered.
    scheduleId String
    ID of the schedule this rotation belongs to
    schedulingMode String
    How users are allocated across shifts of differing length
    users List<String>
    IDs of the people in the rotation, in the order they take shifts.
    workingIntervals List<GetScheduleRotationBetaWorkingInterval>
    Weekday intervals the rotation is on call for, if it's restricted to any.
    concurrentShifts number
    How many shifts run at the same time, which is how many people are on call at once
    effectiveFrom string
    When this shape of the rotation took over. Unset when the rotation has only ever had one.
    firstIntervalStartsAt string
    When the first handover interval starts being counted from, which fixes the time of day and day of week shifts change hands. The dashboard calls this the handover time.
    handovers GetScheduleRotationBetaHandover[]
    The cadence shifts hand over on, applied in turn
    id string
    Look up the rotation by ID.
    name string
    Look up the rotation by name, which is unique within the schedule.
    rank number
    Where this rotation sits in the schedule's running order, lowest first. Unset when it has never been ordered.
    scheduleId string
    ID of the schedule this rotation belongs to
    schedulingMode string
    How users are allocated across shifts of differing length
    users string[]
    IDs of the people in the rotation, in the order they take shifts.
    workingIntervals GetScheduleRotationBetaWorkingInterval[]
    Weekday intervals the rotation is on call for, if it's restricted to any.
    concurrent_shifts float
    How many shifts run at the same time, which is how many people are on call at once
    effective_from str
    When this shape of the rotation took over. Unset when the rotation has only ever had one.
    first_interval_starts_at str
    When the first handover interval starts being counted from, which fixes the time of day and day of week shifts change hands. The dashboard calls this the handover time.
    handovers Sequence[GetScheduleRotationBetaHandover]
    The cadence shifts hand over on, applied in turn
    id str
    Look up the rotation by ID.
    name str
    Look up the rotation by name, which is unique within the schedule.
    rank float
    Where this rotation sits in the schedule's running order, lowest first. Unset when it has never been ordered.
    schedule_id str
    ID of the schedule this rotation belongs to
    scheduling_mode str
    How users are allocated across shifts of differing length
    users Sequence[str]
    IDs of the people in the rotation, in the order they take shifts.
    working_intervals Sequence[GetScheduleRotationBetaWorkingInterval]
    Weekday intervals the rotation is on call for, if it's restricted to any.
    concurrentShifts Number
    How many shifts run at the same time, which is how many people are on call at once
    effectiveFrom String
    When this shape of the rotation took over. Unset when the rotation has only ever had one.
    firstIntervalStartsAt String
    When the first handover interval starts being counted from, which fixes the time of day and day of week shifts change hands. The dashboard calls this the handover time.
    handovers List<Property Map>
    The cadence shifts hand over on, applied in turn
    id String
    Look up the rotation by ID.
    name String
    Look up the rotation by name, which is unique within the schedule.
    rank Number
    Where this rotation sits in the schedule's running order, lowest first. Unset when it has never been ordered.
    scheduleId String
    ID of the schedule this rotation belongs to
    schedulingMode String
    How users are allocated across shifts of differing length
    users List<String>
    IDs of the people in the rotation, in the order they take shifts.
    workingIntervals List<Property Map>
    Weekday intervals the rotation is on call for, if it's restricted to any.

    Supporting Types

    GetScheduleRotationBetaHandover

    Interval double
    How many of the interval type to wait between handovers.
    IntervalType string
    One of hourly, daily or weekly.
    Interval float64
    How many of the interval type to wait between handovers.
    IntervalType string
    One of hourly, daily or weekly.
    interval number
    How many of the interval type to wait between handovers.
    interval_type string
    One of hourly, daily or weekly.
    interval Double
    How many of the interval type to wait between handovers.
    intervalType String
    One of hourly, daily or weekly.
    interval number
    How many of the interval type to wait between handovers.
    intervalType string
    One of hourly, daily or weekly.
    interval float
    How many of the interval type to wait between handovers.
    interval_type str
    One of hourly, daily or weekly.
    interval Number
    How many of the interval type to wait between handovers.
    intervalType String
    One of hourly, daily or weekly.

    GetScheduleRotationBetaWorkingInterval

    EndTime string
    Time of day this window closes, as HH:MM.
    StartTime string
    Time of day this window opens, as HH:MM.
    Weekday string
    Day of the week, lowercase, e.g. monday.
    EndTime string
    Time of day this window closes, as HH:MM.
    StartTime string
    Time of day this window opens, as HH:MM.
    Weekday string
    Day of the week, lowercase, e.g. monday.
    end_time string
    Time of day this window closes, as HH:MM.
    start_time string
    Time of day this window opens, as HH:MM.
    weekday string
    Day of the week, lowercase, e.g. monday.
    endTime String
    Time of day this window closes, as HH:MM.
    startTime String
    Time of day this window opens, as HH:MM.
    weekday String
    Day of the week, lowercase, e.g. monday.
    endTime string
    Time of day this window closes, as HH:MM.
    startTime string
    Time of day this window opens, as HH:MM.
    weekday string
    Day of the week, lowercase, e.g. monday.
    end_time str
    Time of day this window closes, as HH:MM.
    start_time str
    Time of day this window opens, as HH:MM.
    weekday str
    Day of the week, lowercase, e.g. monday.
    endTime String
    Time of day this window closes, as HH:MM.
    startTime String
    Time of day this window opens, as HH:MM.
    weekday String
    Day of the week, lowercase, e.g. monday.

    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 6.0.0
    published on Monday, Aug 3, 2026 by incident-io

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial