1. Packages
  2. Packages
  3. Rootly
  4. API Docs
  5. OnCallShadow
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

    resource "rootly_on_call_shadow" "new_hire_shadow" {
      schedule_id     = rootly_schedule.primary_oncall.id
      shadow_user_id  = data.rootly_user.new_hire.id
      shadowable_id   = data.rootly_user.senior_engineer.id
      shadowable_type = "User"
      starts_at       = "2026-06-01T00:00:00Z"
      ends_at         = "2026-06-14T00:00:00Z"
    }
    

    Create OnCallShadow Resource

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

    Constructor syntax

    new OnCallShadow(name: string, args: OnCallShadowArgs, opts?: CustomResourceOptions);
    @overload
    def OnCallShadow(resource_name: str,
                     args: OnCallShadowArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def OnCallShadow(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     ends_at: Optional[str] = None,
                     shadow_user_id: Optional[int] = None,
                     shadowable_id: Optional[str] = None,
                     starts_at: Optional[str] = None,
                     schedule_id: Optional[str] = None,
                     shadowable_type: Optional[str] = None)
    func NewOnCallShadow(ctx *Context, name string, args OnCallShadowArgs, opts ...ResourceOption) (*OnCallShadow, error)
    public OnCallShadow(string name, OnCallShadowArgs args, CustomResourceOptions? opts = null)
    public OnCallShadow(String name, OnCallShadowArgs args)
    public OnCallShadow(String name, OnCallShadowArgs args, CustomResourceOptions options)
    
    type: rootly:OnCallShadow
    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 OnCallShadowArgs
    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 OnCallShadowArgs
    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 OnCallShadowArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OnCallShadowArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OnCallShadowArgs
    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 onCallShadowResource = new Rootly.OnCallShadow("onCallShadowResource", new()
    {
        EndsAt = "string",
        ShadowUserId = 0,
        ShadowableId = "string",
        StartsAt = "string",
        ScheduleId = "string",
        ShadowableType = "string",
    });
    
    example, err := rootly.NewOnCallShadow(ctx, "onCallShadowResource", &rootly.OnCallShadowArgs{
    	EndsAt:         pulumi.String("string"),
    	ShadowUserId:   pulumi.Int(0),
    	ShadowableId:   pulumi.String("string"),
    	StartsAt:       pulumi.String("string"),
    	ScheduleId:     pulumi.String("string"),
    	ShadowableType: pulumi.String("string"),
    })
    
    var onCallShadowResource = new OnCallShadow("onCallShadowResource", OnCallShadowArgs.builder()
        .endsAt("string")
        .shadowUserId(0)
        .shadowableId("string")
        .startsAt("string")
        .scheduleId("string")
        .shadowableType("string")
        .build());
    
    on_call_shadow_resource = rootly.OnCallShadow("onCallShadowResource",
        ends_at="string",
        shadow_user_id=0,
        shadowable_id="string",
        starts_at="string",
        schedule_id="string",
        shadowable_type="string")
    
    const onCallShadowResource = new rootly.OnCallShadow("onCallShadowResource", {
        endsAt: "string",
        shadowUserId: 0,
        shadowableId: "string",
        startsAt: "string",
        scheduleId: "string",
        shadowableType: "string",
    });
    
    type: rootly:OnCallShadow
    properties:
        endsAt: string
        scheduleId: string
        shadowUserId: 0
        shadowableId: string
        shadowableType: string
        startsAt: string
    

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

    EndsAt string
    End datetime for shadow shift
    ShadowUserId int
    Which user the shadow shift belongs to.
    ShadowableId string
    ID of schedule or user the shadow user is shadowing
    StartsAt string
    Start datetime of shadow shift
    ScheduleId string
    ID of schedule the shadow shift belongs to
    ShadowableType string
    Value must be one of User, Schedule.
    EndsAt string
    End datetime for shadow shift
    ShadowUserId int
    Which user the shadow shift belongs to.
    ShadowableId string
    ID of schedule or user the shadow user is shadowing
    StartsAt string
    Start datetime of shadow shift
    ScheduleId string
    ID of schedule the shadow shift belongs to
    ShadowableType string
    Value must be one of User, Schedule.
    endsAt String
    End datetime for shadow shift
    shadowUserId Integer
    Which user the shadow shift belongs to.
    shadowableId String
    ID of schedule or user the shadow user is shadowing
    startsAt String
    Start datetime of shadow shift
    scheduleId String
    ID of schedule the shadow shift belongs to
    shadowableType String
    Value must be one of User, Schedule.
    endsAt string
    End datetime for shadow shift
    shadowUserId number
    Which user the shadow shift belongs to.
    shadowableId string
    ID of schedule or user the shadow user is shadowing
    startsAt string
    Start datetime of shadow shift
    scheduleId string
    ID of schedule the shadow shift belongs to
    shadowableType string
    Value must be one of User, Schedule.
    ends_at str
    End datetime for shadow shift
    shadow_user_id int
    Which user the shadow shift belongs to.
    shadowable_id str
    ID of schedule or user the shadow user is shadowing
    starts_at str
    Start datetime of shadow shift
    schedule_id str
    ID of schedule the shadow shift belongs to
    shadowable_type str
    Value must be one of User, Schedule.
    endsAt String
    End datetime for shadow shift
    shadowUserId Number
    Which user the shadow shift belongs to.
    shadowableId String
    ID of schedule or user the shadow user is shadowing
    startsAt String
    Start datetime of shadow shift
    scheduleId String
    ID of schedule the shadow shift belongs to
    shadowableType String
    Value must be one of User, Schedule.

    Outputs

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

    Get an existing OnCallShadow 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?: OnCallShadowState, opts?: CustomResourceOptions): OnCallShadow
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ends_at: Optional[str] = None,
            schedule_id: Optional[str] = None,
            shadow_user_id: Optional[int] = None,
            shadowable_id: Optional[str] = None,
            shadowable_type: Optional[str] = None,
            starts_at: Optional[str] = None) -> OnCallShadow
    func GetOnCallShadow(ctx *Context, name string, id IDInput, state *OnCallShadowState, opts ...ResourceOption) (*OnCallShadow, error)
    public static OnCallShadow Get(string name, Input<string> id, OnCallShadowState? state, CustomResourceOptions? opts = null)
    public static OnCallShadow get(String name, Output<String> id, OnCallShadowState state, CustomResourceOptions options)
    resources:  _:    type: rootly:OnCallShadow    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:
    EndsAt string
    End datetime for shadow shift
    ScheduleId string
    ID of schedule the shadow shift belongs to
    ShadowUserId int
    Which user the shadow shift belongs to.
    ShadowableId string
    ID of schedule or user the shadow user is shadowing
    ShadowableType string
    Value must be one of User, Schedule.
    StartsAt string
    Start datetime of shadow shift
    EndsAt string
    End datetime for shadow shift
    ScheduleId string
    ID of schedule the shadow shift belongs to
    ShadowUserId int
    Which user the shadow shift belongs to.
    ShadowableId string
    ID of schedule or user the shadow user is shadowing
    ShadowableType string
    Value must be one of User, Schedule.
    StartsAt string
    Start datetime of shadow shift
    endsAt String
    End datetime for shadow shift
    scheduleId String
    ID of schedule the shadow shift belongs to
    shadowUserId Integer
    Which user the shadow shift belongs to.
    shadowableId String
    ID of schedule or user the shadow user is shadowing
    shadowableType String
    Value must be one of User, Schedule.
    startsAt String
    Start datetime of shadow shift
    endsAt string
    End datetime for shadow shift
    scheduleId string
    ID of schedule the shadow shift belongs to
    shadowUserId number
    Which user the shadow shift belongs to.
    shadowableId string
    ID of schedule or user the shadow user is shadowing
    shadowableType string
    Value must be one of User, Schedule.
    startsAt string
    Start datetime of shadow shift
    ends_at str
    End datetime for shadow shift
    schedule_id str
    ID of schedule the shadow shift belongs to
    shadow_user_id int
    Which user the shadow shift belongs to.
    shadowable_id str
    ID of schedule or user the shadow user is shadowing
    shadowable_type str
    Value must be one of User, Schedule.
    starts_at str
    Start datetime of shadow shift
    endsAt String
    End datetime for shadow shift
    scheduleId String
    ID of schedule the shadow shift belongs to
    shadowUserId Number
    Which user the shadow shift belongs to.
    shadowableId String
    ID of schedule or user the shadow user is shadowing
    shadowableType String
    Value must be one of User, Schedule.
    startsAt String
    Start datetime of shadow shift

    Import

    rootly.OnCallShadow can be imported using the import command.

    $ pulumi import rootly:index/onCallShadow:OnCallShadow 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.