1. Packages
  2. Auth0 Provider
  3. API Docs
  4. UserPermissions
Auth0 v3.17.1 published on Tuesday, Apr 15, 2025 by Pulumi

auth0.UserPermissions

Explore with Pulumi AI

With this resource, you can manage all of a user’s permissions.

!> This resource manages all the permissions assigned to a user. In contrast, the auth0.UserPermission resource only appends a permissions to a user. To avoid potential issues, it is recommended not to use this resource in conjunction with the auth0.UserPermission resource when managing permissions for the same user id.

Create UserPermissions Resource

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

Constructor syntax

new UserPermissions(name: string, args: UserPermissionsArgs, opts?: CustomResourceOptions);
@overload
def UserPermissions(resource_name: str,
                    args: UserPermissionsArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def UserPermissions(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    permissions: Optional[Sequence[UserPermissionsPermissionArgs]] = None,
                    user_id: Optional[str] = None)
func NewUserPermissions(ctx *Context, name string, args UserPermissionsArgs, opts ...ResourceOption) (*UserPermissions, error)
public UserPermissions(string name, UserPermissionsArgs args, CustomResourceOptions? opts = null)
public UserPermissions(String name, UserPermissionsArgs args)
public UserPermissions(String name, UserPermissionsArgs args, CustomResourceOptions options)
type: auth0:UserPermissions
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. UserPermissionsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. UserPermissionsArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. UserPermissionsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. UserPermissionsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. UserPermissionsArgs
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 userPermissionsResource = new Auth0.UserPermissions("userPermissionsResource", new()
{
    Permissions = new[]
    {
        new Auth0.Inputs.UserPermissionsPermissionArgs
        {
            Name = "string",
            ResourceServerIdentifier = "string",
            Description = "string",
            ResourceServerName = "string",
        },
    },
    UserId = "string",
});
Copy
example, err := auth0.NewUserPermissions(ctx, "userPermissionsResource", &auth0.UserPermissionsArgs{
	Permissions: auth0.UserPermissionsPermissionArray{
		&auth0.UserPermissionsPermissionArgs{
			Name:                     pulumi.String("string"),
			ResourceServerIdentifier: pulumi.String("string"),
			Description:              pulumi.String("string"),
			ResourceServerName:       pulumi.String("string"),
		},
	},
	UserId: pulumi.String("string"),
})
Copy
var userPermissionsResource = new UserPermissions("userPermissionsResource", UserPermissionsArgs.builder()
    .permissions(UserPermissionsPermissionArgs.builder()
        .name("string")
        .resourceServerIdentifier("string")
        .description("string")
        .resourceServerName("string")
        .build())
    .userId("string")
    .build());
Copy
user_permissions_resource = auth0.UserPermissions("userPermissionsResource",
    permissions=[{
        "name": "string",
        "resource_server_identifier": "string",
        "description": "string",
        "resource_server_name": "string",
    }],
    user_id="string")
Copy
const userPermissionsResource = new auth0.UserPermissions("userPermissionsResource", {
    permissions: [{
        name: "string",
        resourceServerIdentifier: "string",
        description: "string",
        resourceServerName: "string",
    }],
    userId: "string",
});
Copy
type: auth0:UserPermissions
properties:
    permissions:
        - description: string
          name: string
          resourceServerIdentifier: string
          resourceServerName: string
    userId: string
Copy

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

Permissions This property is required. List<UserPermissionsPermission>
List of API permissions granted to the user.
UserId
This property is required.
Changes to this property will trigger replacement.
string
ID of the user to associate the permission to.
Permissions This property is required. []UserPermissionsPermissionArgs
List of API permissions granted to the user.
UserId
This property is required.
Changes to this property will trigger replacement.
string
ID of the user to associate the permission to.
permissions This property is required. List<UserPermissionsPermission>
List of API permissions granted to the user.
userId
This property is required.
Changes to this property will trigger replacement.
String
ID of the user to associate the permission to.
permissions This property is required. UserPermissionsPermission[]
List of API permissions granted to the user.
userId
This property is required.
Changes to this property will trigger replacement.
string
ID of the user to associate the permission to.
permissions This property is required. Sequence[UserPermissionsPermissionArgs]
List of API permissions granted to the user.
user_id
This property is required.
Changes to this property will trigger replacement.
str
ID of the user to associate the permission to.
permissions This property is required. List<Property Map>
List of API permissions granted to the user.
userId
This property is required.
Changes to this property will trigger replacement.
String
ID of the user to associate the permission to.

Outputs

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

Get an existing UserPermissions 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?: UserPermissionsState, opts?: CustomResourceOptions): UserPermissions
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        permissions: Optional[Sequence[UserPermissionsPermissionArgs]] = None,
        user_id: Optional[str] = None) -> UserPermissions
func GetUserPermissions(ctx *Context, name string, id IDInput, state *UserPermissionsState, opts ...ResourceOption) (*UserPermissions, error)
public static UserPermissions Get(string name, Input<string> id, UserPermissionsState? state, CustomResourceOptions? opts = null)
public static UserPermissions get(String name, Output<String> id, UserPermissionsState state, CustomResourceOptions options)
resources:  _:    type: auth0:UserPermissions    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Permissions List<UserPermissionsPermission>
List of API permissions granted to the user.
UserId Changes to this property will trigger replacement. string
ID of the user to associate the permission to.
Permissions []UserPermissionsPermissionArgs
List of API permissions granted to the user.
UserId Changes to this property will trigger replacement. string
ID of the user to associate the permission to.
permissions List<UserPermissionsPermission>
List of API permissions granted to the user.
userId Changes to this property will trigger replacement. String
ID of the user to associate the permission to.
permissions UserPermissionsPermission[]
List of API permissions granted to the user.
userId Changes to this property will trigger replacement. string
ID of the user to associate the permission to.
permissions Sequence[UserPermissionsPermissionArgs]
List of API permissions granted to the user.
user_id Changes to this property will trigger replacement. str
ID of the user to associate the permission to.
permissions List<Property Map>
List of API permissions granted to the user.
userId Changes to this property will trigger replacement. String
ID of the user to associate the permission to.

Supporting Types

UserPermissionsPermission
, UserPermissionsPermissionArgs

Name This property is required. string
Name of permission.
ResourceServerIdentifier This property is required. string
Resource server identifier associated with the permission.
Description string
Description of the permission.
ResourceServerName string
Name of resource server that the permission is associated with.
Name This property is required. string
Name of permission.
ResourceServerIdentifier This property is required. string
Resource server identifier associated with the permission.
Description string
Description of the permission.
ResourceServerName string
Name of resource server that the permission is associated with.
name This property is required. String
Name of permission.
resourceServerIdentifier This property is required. String
Resource server identifier associated with the permission.
description String
Description of the permission.
resourceServerName String
Name of resource server that the permission is associated with.
name This property is required. string
Name of permission.
resourceServerIdentifier This property is required. string
Resource server identifier associated with the permission.
description string
Description of the permission.
resourceServerName string
Name of resource server that the permission is associated with.
name This property is required. str
Name of permission.
resource_server_identifier This property is required. str
Resource server identifier associated with the permission.
description str
Description of the permission.
resource_server_name str
Name of resource server that the permission is associated with.
name This property is required. String
Name of permission.
resourceServerIdentifier This property is required. String
Resource server identifier associated with the permission.
description String
Description of the permission.
resourceServerName String
Name of resource server that the permission is associated with.

Import

This resource can be imported by specifying the user ID

Example:

$ pulumi import auth0:index/userPermissions:UserPermissions all_user_permissions "auth0|111111111111111111111111"
Copy

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

Package Details

Repository
Auth0 pulumi/pulumi-auth0
License
Apache-2.0
Notes
This Pulumi package is based on the auth0 Terraform Provider.