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 string
- The unique name of the resource.
- args UserPermissionsArgs
- 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 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 string
- The unique name of the resource.
- args UserPermissionsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserPermissionsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var userPermissionsResource = new UserPermissions("userPermissionsResource", UserPermissionsArgs.builder()
.permissions(UserPermissionsPermissionArgs.builder()
.name("string")
.resourceServerIdentifier("string")
.description("string")
.resourceServerName("string")
.build())
.userId("string")
.build());
user_permissions_resource = auth0.UserPermissions("userPermissionsResource",
permissions=[{
"name": "string",
"resource_server_identifier": "string",
"description": "string",
"resource_server_name": "string",
}],
user_id="string")
const userPermissionsResource = new auth0.UserPermissions("userPermissionsResource", {
permissions: [{
name: "string",
resourceServerIdentifier: "string",
description: "string",
resourceServerName: "string",
}],
userId: "string",
});
type: auth0:UserPermissions
properties:
permissions:
- description: string
name: string
resourceServerIdentifier: string
resourceServerName: string
userId: string
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
List<User
Permissions Permission> - List of API permissions granted to the user.
- User
Id string - ID of the user to associate the permission to.
- Permissions
[]User
Permissions Permission Args - List of API permissions granted to the user.
- User
Id string - ID of the user to associate the permission to.
- permissions
List<User
Permissions Permission> - List of API permissions granted to the user.
- user
Id String - ID of the user to associate the permission to.
- permissions
User
Permissions Permission[] - List of API permissions granted to the user.
- user
Id string - ID of the user to associate the permission to.
- permissions
Sequence[User
Permissions Permission Args] - List of API permissions granted to the user.
- user_
id str - ID of the user to associate the permission to.
- permissions List<Property Map>
- List of API permissions granted to the user.
- user
Id 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)
Resource lookup is not supported in YAML
- 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.
- Permissions
List<User
Permissions Permission> - List of API permissions granted to the user.
- User
Id string - ID of the user to associate the permission to.
- Permissions
[]User
Permissions Permission Args - List of API permissions granted to the user.
- User
Id string - ID of the user to associate the permission to.
- permissions
List<User
Permissions Permission> - List of API permissions granted to the user.
- user
Id String - ID of the user to associate the permission to.
- permissions
User
Permissions Permission[] - List of API permissions granted to the user.
- user
Id string - ID of the user to associate the permission to.
- permissions
Sequence[User
Permissions Permission Args] - List of API permissions granted to the user.
- user_
id str - ID of the user to associate the permission to.
- permissions List<Property Map>
- List of API permissions granted to the user.
- user
Id String - ID of the user to associate the permission to.
Supporting Types
UserPermissionsPermission, UserPermissionsPermissionArgs
- Name string
- Name of permission.
- Resource
Server stringIdentifier - Resource server identifier associated with the permission.
- Description string
- Description of the permission.
- Resource
Server stringName - Name of resource server that the permission is associated with.
- Name string
- Name of permission.
- Resource
Server stringIdentifier - Resource server identifier associated with the permission.
- Description string
- Description of the permission.
- Resource
Server stringName - Name of resource server that the permission is associated with.
- name String
- Name of permission.
- resource
Server StringIdentifier - Resource server identifier associated with the permission.
- description String
- Description of the permission.
- resource
Server StringName - Name of resource server that the permission is associated with.
- name string
- Name of permission.
- resource
Server stringIdentifier - Resource server identifier associated with the permission.
- description string
- Description of the permission.
- resource
Server stringName - Name of resource server that the permission is associated with.
- name str
- Name of permission.
- resource_
server_ stridentifier - Resource server identifier associated with the permission.
- description str
- Description of the permission.
- resource_
server_ strname - Name of resource server that the permission is associated with.
- name String
- Name of permission.
- resource
Server StringIdentifier - Resource server identifier associated with the permission.
- description String
- Description of the permission.
- resource
Server StringName - 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"
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.