1. Packages
  2. Auth0
  3. API Docs
  4. UserPermission
Auth0 v3.4.0 published on Wednesday, Jun 19, 2024 by Pulumi

auth0.UserPermission

Explore with Pulumi AI

auth0 logo
Auth0 v3.4.0 published on Wednesday, Jun 19, 2024 by Pulumi

    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

    The UserPermission resource accepts the following input properties:

    Permission string
    Name of the permission.
    ResourceServerIdentifier string
    Identifier of the resource server that the permission is associated with.
    UserId string
    ID of the user to associate the permission to.
    Permission string
    Name of the permission.
    ResourceServerIdentifier string
    Identifier of the resource server that the permission is associated with.
    UserId string
    ID of the user to associate the permission to.
    permission String
    Name of the permission.
    resourceServerIdentifier String
    Identifier of the resource server that the permission is associated with.
    userId String
    ID of the user to associate the permission to.
    permission string
    Name of the permission.
    resourceServerIdentifier string
    Identifier of the resource server that the permission is associated with.
    userId string
    ID of the user to associate the permission to.
    permission str
    Name of the permission.
    resource_server_identifier str
    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.
    resourceServerIdentifier String
    Identifier of the resource server that the permission is associated with.
    userId 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.
    ResourceServerName string
    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.
    ResourceServerName string
    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.
    resourceServerName String
    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.
    resourceServerName string
    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_name str
    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.
    resourceServerName String
    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.
    The following state arguments are supported:
    Description string
    Description of the permission.
    Permission string
    Name of the permission.
    ResourceServerIdentifier string
    Identifier of the resource server that the permission is associated with.
    ResourceServerName string
    Name of the resource server that the permission is associated with.
    UserId string
    ID of the user to associate the permission to.
    Description string
    Description of the permission.
    Permission string
    Name of the permission.
    ResourceServerIdentifier string
    Identifier of the resource server that the permission is associated with.
    ResourceServerName string
    Name of the resource server that the permission is associated with.
    UserId string
    ID of the user to associate the permission to.
    description String
    Description of the permission.
    permission String
    Name of the permission.
    resourceServerIdentifier String
    Identifier of the resource server that the permission is associated with.
    resourceServerName String
    Name of the resource server that the permission is associated with.
    userId String
    ID of the user to associate the permission to.
    description string
    Description of the permission.
    permission string
    Name of the permission.
    resourceServerIdentifier string
    Identifier of the resource server that the permission is associated with.
    resourceServerName string
    Name of the resource server that the permission is associated with.
    userId string
    ID of the user to associate the permission to.
    description str
    Description of the permission.
    permission str
    Name of the permission.
    resource_server_identifier str
    Identifier of the resource server that the permission is associated with.
    resource_server_name str
    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.
    resourceServerIdentifier String
    Identifier of the resource server that the permission is associated with.
    resourceServerName String
    Name of the resource server that the permission is associated with.
    userId 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.
    auth0 logo
    Auth0 v3.4.0 published on Wednesday, Jun 19, 2024 by Pulumi