auth0.UserPermission
Explore with Pulumi AI
With this resource, you can manage user permissions.
!> This resource appends a permission to a user. In contrast, the auth0.UserPermissions
resource manages all the
permissions assigned to a user. To avoid potential issues, it is recommended not to use this resource in conjunction
with the auth0.UserPermissions
resource when managing permissions for the same user id.
Create UserPermission Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new UserPermission(name: string, args: UserPermissionArgs, opts?: CustomResourceOptions);
@overload
def UserPermission(resource_name: str,
args: UserPermissionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def UserPermission(resource_name: str,
opts: Optional[ResourceOptions] = None,
permission: Optional[str] = None,
resource_server_identifier: Optional[str] = None,
user_id: Optional[str] = None)
func NewUserPermission(ctx *Context, name string, args UserPermissionArgs, opts ...ResourceOption) (*UserPermission, error)
public UserPermission(string name, UserPermissionArgs args, CustomResourceOptions? opts = null)
public UserPermission(String name, UserPermissionArgs args)
public UserPermission(String name, UserPermissionArgs args, CustomResourceOptions options)
type: auth0:UserPermission
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 UserPermissionArgs
- 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 UserPermissionArgs
- 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 UserPermissionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserPermissionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserPermissionArgs
- 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 userPermissionResource = new Auth0.UserPermission("userPermissionResource", new()
{
Permission = "string",
ResourceServerIdentifier = "string",
UserId = "string",
});
example, err := auth0.NewUserPermission(ctx, "userPermissionResource", &auth0.UserPermissionArgs{
Permission: pulumi.String("string"),
ResourceServerIdentifier: pulumi.String("string"),
UserId: pulumi.String("string"),
})
var userPermissionResource = new UserPermission("userPermissionResource", UserPermissionArgs.builder()
.permission("string")
.resourceServerIdentifier("string")
.userId("string")
.build());
user_permission_resource = auth0.UserPermission("userPermissionResource",
permission="string",
resource_server_identifier="string",
user_id="string")
const userPermissionResource = new auth0.UserPermission("userPermissionResource", {
permission: "string",
resourceServerIdentifier: "string",
userId: "string",
});
type: auth0:UserPermission
properties:
permission: string
resourceServerIdentifier: string
userId: string
UserPermission 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 UserPermission resource accepts the following input properties:
- Permission string
- Name of the permission.
- Resource
Server stringIdentifier - Identifier of the resource server that the permission is associated with.
- User
Id string - ID of the user to associate the permission to.
- Permission string
- Name of the permission.
- Resource
Server stringIdentifier - Identifier of the resource server that the permission is associated with.
- User
Id string - ID of the user to associate the permission to.
- permission String
- Name of the permission.
- resource
Server StringIdentifier - Identifier of the resource server that the permission is associated with.
- user
Id String - ID of the user to associate the permission to.
- permission string
- Name of the permission.
- resource
Server stringIdentifier - Identifier of the resource server that the permission is associated with.
- user
Id string - ID of the user to associate the permission to.
- permission str
- Name of the permission.
- resource_
server_ stridentifier - Identifier of the resource server that the permission is associated with.
- user_
id str - ID of the user to associate the permission to.
- permission String
- Name of the permission.
- resource
Server StringIdentifier - Identifier of the resource server that the permission is associated with.
- user
Id String - ID of the user to associate the permission to.
Outputs
All input properties are implicitly available as output properties. Additionally, the UserPermission resource produces the following output properties:
- Description string
- Description of the permission.
- Id string
- The provider-assigned unique ID for this managed resource.
- Resource
Server stringName - Name of the resource server that the permission is associated with.
- Description string
- Description of the permission.
- Id string
- The provider-assigned unique ID for this managed resource.
- Resource
Server stringName - Name of the resource server that the permission is associated with.
- description String
- Description of the permission.
- id String
- The provider-assigned unique ID for this managed resource.
- resource
Server StringName - Name of the resource server that the permission is associated with.
- description string
- Description of the permission.
- id string
- The provider-assigned unique ID for this managed resource.
- resource
Server stringName - Name of the resource server that the permission is associated with.
- description str
- Description of the permission.
- id str
- The provider-assigned unique ID for this managed resource.
- resource_
server_ strname - Name of the resource server that the permission is associated with.
- description String
- Description of the permission.
- id String
- The provider-assigned unique ID for this managed resource.
- resource
Server StringName - Name of the resource server that the permission is associated with.
Look up Existing UserPermission Resource
Get an existing UserPermission 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?: UserPermissionState, opts?: CustomResourceOptions): UserPermission
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
permission: Optional[str] = None,
resource_server_identifier: Optional[str] = None,
resource_server_name: Optional[str] = None,
user_id: Optional[str] = None) -> UserPermission
func GetUserPermission(ctx *Context, name string, id IDInput, state *UserPermissionState, opts ...ResourceOption) (*UserPermission, error)
public static UserPermission Get(string name, Input<string> id, UserPermissionState? state, CustomResourceOptions? opts = null)
public static UserPermission get(String name, Output<String> id, UserPermissionState 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.
- Description string
- Description of the permission.
- Permission string
- Name of the permission.
- Resource
Server stringIdentifier - Identifier of the resource server that the permission is associated with.
- Resource
Server stringName - Name of the resource server that the permission is associated with.
- User
Id string - ID of the user to associate the permission to.
- Description string
- Description of the permission.
- Permission string
- Name of the permission.
- Resource
Server stringIdentifier - Identifier of the resource server that the permission is associated with.
- Resource
Server stringName - Name of the resource server that the permission is associated with.
- User
Id string - ID of the user to associate the permission to.
- description String
- Description of the permission.
- permission String
- Name of the permission.
- resource
Server StringIdentifier - Identifier of the resource server that the permission is associated with.
- resource
Server StringName - Name of the resource server that the permission is associated with.
- user
Id String - ID of the user to associate the permission to.
- description string
- Description of the permission.
- permission string
- Name of the permission.
- resource
Server stringIdentifier - Identifier of the resource server that the permission is associated with.
- resource
Server stringName - Name of the resource server that the permission is associated with.
- user
Id string - ID of the user to associate the permission to.
- description str
- Description of the permission.
- permission str
- Name of the permission.
- resource_
server_ stridentifier - Identifier of the resource server that the permission is associated with.
- resource_
server_ strname - Name of the resource server that the permission is associated with.
- user_
id str - ID of the user to associate the permission to.
- description String
- Description of the permission.
- permission String
- Name of the permission.
- resource
Server StringIdentifier - Identifier of the resource server that the permission is associated with.
- resource
Server StringName - Name of the resource server that the permission is associated with.
- user
Id String - ID of the user to associate the permission to.
Import
This resource can be imported by specifying the
user ID, resource identifier and permission name separated by “::” (note the double colon)
Example:
$ pulumi import auth0:index/userPermission:UserPermission permission "auth0|111111111111111111111111::https://api.travel0.com/v1::read:posts"
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.