1. Packages
  2. Auth0 Provider
  3. API Docs
  4. UserPermissions
Auth0 v3.8.3 published on Wednesday, Nov 6, 2024 by Pulumi

auth0.UserPermissions

Explore with Pulumi AI

auth0 logo
Auth0 v3.8.3 published on Wednesday, Nov 6, 2024 by Pulumi

    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<UserPermissionsPermission>
    List of API permissions granted to the user.
    UserId string
    ID of the user to associate the permission to.
    Permissions []UserPermissionsPermissionArgs
    List of API permissions granted to the user.
    UserId string
    ID of the user to associate the permission to.
    permissions List<UserPermissionsPermission>
    List of API permissions granted to the user.
    userId String
    ID of the user to associate the permission to.
    permissions UserPermissionsPermission[]
    List of API permissions granted to the user.
    userId string
    ID of the user to associate the permission to.
    permissions Sequence[UserPermissionsPermissionArgs]
    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.
    userId 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.
    The following state arguments are supported:
    Permissions List<UserPermissionsPermission>
    List of API permissions granted to the user.
    UserId string
    ID of the user to associate the permission to.
    Permissions []UserPermissionsPermissionArgs
    List of API permissions granted to the user.
    UserId string
    ID of the user to associate the permission to.
    permissions List<UserPermissionsPermission>
    List of API permissions granted to the user.
    userId String
    ID of the user to associate the permission to.
    permissions UserPermissionsPermission[]
    List of API permissions granted to the user.
    userId string
    ID of the user to associate the permission to.
    permissions Sequence[UserPermissionsPermissionArgs]
    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.
    userId String
    ID of the user to associate the permission to.

    Supporting Types

    UserPermissionsPermission, UserPermissionsPermissionArgs

    Name string
    Name of permission.
    ResourceServerIdentifier 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 string
    Name of permission.
    ResourceServerIdentifier 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 String
    Name of permission.
    resourceServerIdentifier 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 string
    Name of permission.
    resourceServerIdentifier 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 str
    Name of permission.
    resource_server_identifier 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 String
    Name of permission.
    resourceServerIdentifier 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"
    

    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.8.3 published on Wednesday, Nov 6, 2024 by Pulumi