This provider is currently in preview.
published on Thursday, May 21, 2026 by Pulumi
This provider is currently in preview.
published on Thursday, May 21, 2026 by Pulumi
Creates a new custom role for an organization. Custom roles define fine-grained permission sets that can be assigned to organization members and teams, enabling precise access control beyond the built-in admin and member roles. Optionally, an associated policy and role binding can be created alongside the role. Role definitions are subject to two limits: a permission descriptor group may contain at most 500 entries (each directly-specified entity counts as one entry), and the total serialized size of the role definition may not exceed 1 MB. Exceeding either limit returns a 400 error. If you need to grant access to more than 500 individually listed resources, use tag-based (ABAC) rules instead.
Create Role Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Role(name: string, args: RoleArgs, opts?: CustomResourceOptions);@overload
def Role(resource_name: str,
args: RoleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Role(resource_name: str,
opts: Optional[ResourceOptions] = None,
org_name: Optional[str] = None,
create_policy_and_role: Optional[bool] = None,
description: Optional[str] = None,
details: Optional[Any] = None,
name: Optional[str] = None,
resource_type: Optional[str] = None,
role_id: Optional[str] = None,
ux_purpose: Optional[str] = None)func NewRole(ctx *Context, name string, args RoleArgs, opts ...ResourceOption) (*Role, error)public Role(string name, RoleArgs args, CustomResourceOptions? opts = null)type: pulumiservice:api:Role
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "pulumiservice_api_role" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args RoleArgs
- 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 RoleArgs
- 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 RoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RoleArgs
- 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 pulumiserviceRoleResource = new PulumiService.Api.Role("pulumiserviceRoleResource", new()
{
OrgName = "string",
CreatePolicyAndRole = false,
Description = "string",
Details = "any",
Name = "string",
ResourceType = "string",
RoleID = "string",
UxPurpose = "string",
});
example, err := api.NewRole(ctx, "pulumiserviceRoleResource", &api.RoleArgs{
OrgName: pulumi.String("string"),
CreatePolicyAndRole: pulumi.Bool(false),
Description: pulumi.String("string"),
Details: pulumi.Any("any"),
Name: pulumi.String("string"),
ResourceType: pulumi.String("string"),
RoleID: pulumi.String("string"),
UxPurpose: pulumi.String("string"),
})
resource "pulumiservice_api_role" "pulumiserviceRoleResource" {
org_name = "string"
create_policy_and_role = false
description = "string"
details = "any"
name = "string"
resource_type = "string"
role_id = "string"
ux_purpose = "string"
}
var pulumiserviceRoleResource = new Role("pulumiserviceRoleResource", RoleArgs.builder()
.orgName("string")
.createPolicyAndRole(false)
.description("string")
.details("any")
.name("string")
.resourceType("string")
.roleID("string")
.uxPurpose("string")
.build());
pulumiservice_role_resource = pulumiservice.api.Role("pulumiserviceRoleResource",
org_name="string",
create_policy_and_role=False,
description="string",
details="any",
name="string",
resource_type="string",
role_id="string",
ux_purpose="string")
const pulumiserviceRoleResource = new pulumiservice.api.Role("pulumiserviceRoleResource", {
orgName: "string",
createPolicyAndRole: false,
description: "string",
details: "any",
name: "string",
resourceType: "string",
roleID: "string",
uxPurpose: "string",
});
type: pulumiservice:api:Role
properties:
createPolicyAndRole: false
description: string
details: any
name: string
orgName: string
resourceType: string
roleID: string
uxPurpose: string
Role 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 Role resource accepts the following input properties:
- Org
Name string - The organization name
- Create
Policy boolAnd Role - Also create an associated policy and role binding alongside the role
- Description string
- A human-readable description of the permission descriptor.
- Details object
- The detailed permission descriptor tree.
- Name string
- The name of the permission descriptor.
- Resource
Type string - The resource type this permission descriptor applies to.
- Role
ID string - The role identifier
- Ux
Purpose string - The UX purpose of this permission descriptor (e.g. role, policy, set).
- Org
Name string - The organization name
- Create
Policy boolAnd Role - Also create an associated policy and role binding alongside the role
- Description string
- A human-readable description of the permission descriptor.
- Details interface{}
- The detailed permission descriptor tree.
- Name string
- The name of the permission descriptor.
- Resource
Type string - The resource type this permission descriptor applies to.
- Role
ID string - The role identifier
- Ux
Purpose string - The UX purpose of this permission descriptor (e.g. role, policy, set).
- org_
name string - The organization name
- create_
policy_ booland_ role - Also create an associated policy and role binding alongside the role
- description string
- A human-readable description of the permission descriptor.
- details any
- The detailed permission descriptor tree.
- name string
- The name of the permission descriptor.
- resource_
type string - The resource type this permission descriptor applies to.
- role_
id string - The role identifier
- ux_
purpose string - The UX purpose of this permission descriptor (e.g. role, policy, set).
- org
Name String - The organization name
- create
Policy BooleanAnd Role - Also create an associated policy and role binding alongside the role
- description String
- A human-readable description of the permission descriptor.
- details Object
- The detailed permission descriptor tree.
- name String
- The name of the permission descriptor.
- resource
Type String - The resource type this permission descriptor applies to.
- role
ID String - The role identifier
- ux
Purpose String - The UX purpose of this permission descriptor (e.g. role, policy, set).
- org
Name string - The organization name
- create
Policy booleanAnd Role - Also create an associated policy and role binding alongside the role
- description string
- A human-readable description of the permission descriptor.
- details any
- The detailed permission descriptor tree.
- name string
- The name of the permission descriptor.
- resource
Type string - The resource type this permission descriptor applies to.
- role
ID string - The role identifier
- ux
Purpose string - The UX purpose of this permission descriptor (e.g. role, policy, set).
- org_
name str - The organization name
- create_
policy_ booland_ role - Also create an associated policy and role binding alongside the role
- description str
- A human-readable description of the permission descriptor.
- details Any
- The detailed permission descriptor tree.
- name str
- The name of the permission descriptor.
- resource_
type str - The resource type this permission descriptor applies to.
- role_
id str - The role identifier
- ux_
purpose str - The UX purpose of this permission descriptor (e.g. role, policy, set).
- org
Name String - The organization name
- create
Policy BooleanAnd Role - Also create an associated policy and role binding alongside the role
- description String
- A human-readable description of the permission descriptor.
- details Any
- The detailed permission descriptor tree.
- name String
- The name of the permission descriptor.
- resource
Type String - The resource type this permission descriptor applies to.
- role
ID String - The role identifier
- ux
Purpose String - The UX purpose of this permission descriptor (e.g. role, policy, set).
Outputs
All input properties are implicitly available as output properties. Additionally, the Role resource produces the following output properties:
- Created string
- When the role was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Org boolDefault - Whether this role is the organization default.
- Modified string
- When the role was last modified.
- Org
Id string - The ID of the organization this role belongs to.
- Version int
- The version of this role.
- Default
Identifier string - The identifier for default roles. Empty for custom roles.
- Created string
- When the role was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Org boolDefault - Whether this role is the organization default.
- Modified string
- When the role was last modified.
- Org
Id string - The ID of the organization this role belongs to.
- Version int
- The version of this role.
- Default
Identifier string - The identifier for default roles. Empty for custom roles.
- created string
- When the role was created.
- id string
- The provider-assigned unique ID for this managed resource.
- is_
org_ booldefault - Whether this role is the organization default.
- modified string
- When the role was last modified.
- org_
id string - The ID of the organization this role belongs to.
- version number
- The version of this role.
- default_
identifier string - The identifier for default roles. Empty for custom roles.
- created String
- When the role was created.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Org BooleanDefault - Whether this role is the organization default.
- modified String
- When the role was last modified.
- org
Id String - The ID of the organization this role belongs to.
- version Integer
- The version of this role.
- default
Identifier String - The identifier for default roles. Empty for custom roles.
- created string
- When the role was created.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Org booleanDefault - Whether this role is the organization default.
- modified string
- When the role was last modified.
- org
Id string - The ID of the organization this role belongs to.
- version number
- The version of this role.
- default
Identifier string - The identifier for default roles. Empty for custom roles.
- created str
- When the role was created.
- id str
- The provider-assigned unique ID for this managed resource.
- is_
org_ booldefault - Whether this role is the organization default.
- modified str
- When the role was last modified.
- org_
id str - The ID of the organization this role belongs to.
- version int
- The version of this role.
- default_
identifier str - The identifier for default roles. Empty for custom roles.
- created String
- When the role was created.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Org BooleanDefault - Whether this role is the organization default.
- modified String
- When the role was last modified.
- org
Id String - The ID of the organization this role belongs to.
- version Number
- The version of this role.
- default
Identifier String - The identifier for default roles. Empty for custom roles.
Package Details
- Repository
- pulumiservice pulumi/pulumi-pulumiservice
- License
- Apache-2.0
This provider is currently in preview.
published on Thursday, May 21, 2026 by Pulumi