published on Tuesday, Sep 15, 2026 by rootlyhq
published on Tuesday, Sep 15, 2026 by rootlyhq
Manages the on-call role assigned to a Rootly user. The resource id is the user id. Destroying it stops managing the assignment but leaves the user’s on-call role unchanged.
Example Usage
data "rootly_user" "john" {
email = "john@acme.com"
}
resource "rootly_user_on_call_role" "john" {
user_id = data.rootly_user.john.id
on_call_role_id = "54725583-b47a-4397-aa50-c6b1db3c1da0"
}
Create UserOnCallRole Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new UserOnCallRole(name: string, args: UserOnCallRoleArgs, opts?: CustomResourceOptions);@overload
def UserOnCallRole(resource_name: str,
args: UserOnCallRoleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def UserOnCallRole(resource_name: str,
opts: Optional[ResourceOptions] = None,
on_call_role_id: Optional[str] = None,
user_id: Optional[str] = None)func NewUserOnCallRole(ctx *Context, name string, args UserOnCallRoleArgs, opts ...ResourceOption) (*UserOnCallRole, error)public UserOnCallRole(string name, UserOnCallRoleArgs args, CustomResourceOptions? opts = null)
public UserOnCallRole(String name, UserOnCallRoleArgs args)
public UserOnCallRole(String name, UserOnCallRoleArgs args, CustomResourceOptions options)
type: rootly:UserOnCallRole
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "rootly_user_on_call_role" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args UserOnCallRoleArgs
- 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 UserOnCallRoleArgs
- 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 UserOnCallRoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserOnCallRoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserOnCallRoleArgs
- 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 userOnCallRoleResource = new Rootly.UserOnCallRole("userOnCallRoleResource", new()
{
OnCallRoleId = "string",
UserId = "string",
});
example, err := rootly.NewUserOnCallRole(ctx, "userOnCallRoleResource", &rootly.UserOnCallRoleArgs{
OnCallRoleId: pulumi.String("string"),
UserId: pulumi.String("string"),
})
resource "rootly_user_on_call_role" "userOnCallRoleResource" {
lifecycle {
create_before_destroy = true
}
on_call_role_id = "string"
user_id = "string"
}
var userOnCallRoleResource = new UserOnCallRole("userOnCallRoleResource", UserOnCallRoleArgs.builder()
.onCallRoleId("string")
.userId("string")
.build());
user_on_call_role_resource = rootly.UserOnCallRole("userOnCallRoleResource",
on_call_role_id="string",
user_id="string")
const userOnCallRoleResource = new rootly.UserOnCallRole("userOnCallRoleResource", {
onCallRoleId: "string",
userId: "string",
});
type: rootly:UserOnCallRole
properties:
onCallRoleId: string
userId: string
UserOnCallRole 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 UserOnCallRole resource accepts the following input properties:
- On
Call stringRole Id - The id of the on-call role to assign.
- User
Id string - The id of the user to assign the on-call role to.
- On
Call stringRole Id - The id of the on-call role to assign.
- User
Id string - The id of the user to assign the on-call role to.
- on_
call_ stringrole_ id - The id of the on-call role to assign.
- user_
id string - The id of the user to assign the on-call role to.
- on
Call StringRole Id - The id of the on-call role to assign.
- user
Id String - The id of the user to assign the on-call role to.
- on
Call stringRole Id - The id of the on-call role to assign.
- user
Id string - The id of the user to assign the on-call role to.
- on_
call_ strrole_ id - The id of the on-call role to assign.
- user_
id str - The id of the user to assign the on-call role to.
- on
Call StringRole Id - The id of the on-call role to assign.
- user
Id String - The id of the user to assign the on-call role to.
Outputs
All input properties are implicitly available as output properties. Additionally, the UserOnCallRole 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 UserOnCallRole Resource
Get an existing UserOnCallRole 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?: UserOnCallRoleState, opts?: CustomResourceOptions): UserOnCallRole@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
on_call_role_id: Optional[str] = None,
user_id: Optional[str] = None) -> UserOnCallRolefunc GetUserOnCallRole(ctx *Context, name string, id IDInput, state *UserOnCallRoleState, opts ...ResourceOption) (*UserOnCallRole, error)public static UserOnCallRole Get(string name, Input<string> id, UserOnCallRoleState? state, CustomResourceOptions? opts = null)public static UserOnCallRole get(String name, Output<String> id, UserOnCallRoleState state, CustomResourceOptions options)resources: _: type: rootly:UserOnCallRole get: id: ${id}import {
to = rootly_user_on_call_role.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.
- On
Call stringRole Id - The id of the on-call role to assign.
- User
Id string - The id of the user to assign the on-call role to.
- On
Call stringRole Id - The id of the on-call role to assign.
- User
Id string - The id of the user to assign the on-call role to.
- on_
call_ stringrole_ id - The id of the on-call role to assign.
- user_
id string - The id of the user to assign the on-call role to.
- on
Call StringRole Id - The id of the on-call role to assign.
- user
Id String - The id of the user to assign the on-call role to.
- on
Call stringRole Id - The id of the on-call role to assign.
- user
Id string - The id of the user to assign the on-call role to.
- on_
call_ strrole_ id - The id of the on-call role to assign.
- user_
id str - The id of the user to assign the on-call role to.
- on
Call StringRole Id - The id of the on-call role to assign.
- user
Id String - The id of the user to assign the on-call role to.
Import
rootly.UserOnCallRole can be imported using the import command.
$ pulumi import rootly:index/userOnCallRole:UserOnCallRole 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
rootlyTerraform Provider.
published on Tuesday, Sep 15, 2026 by rootlyhq