import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * 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. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * * const resourceServer = new auth0.ResourceServer("resource_server", { * name: "Example Resource Server (Managed by Terraform)", * identifier: "https://api.example.com", * scopes: [ * { * value: "create:foo", * description: "Create foos", * }, * { * value: "read:foo", * description: "Read foos", * }, * ], * }); * const user = new auth0.User("user", { * connectionName: "Username-Password-Authentication", * userId: "12345", * username: "unique_username", * name: "Firstname Lastname", * nickname: "some.nickname", * email: "test@test.com", * emailVerified: true, * password: "passpass$12$12", * picture: "https://www.example.com/a-valid-picture-url.jpg", * }); * const allUserPermissions = new auth0.UserPermissions("all_user_permissions", { * userId: user.id, * permissions: [ * { * name: resourceServer.scopes[0], * resourceServerIdentifier: resourceServer.identifier, * }, * { * name: resourceServer.scopes[1], * resourceServerIdentifier: resourceServer.identifier, * }, * ], * }); * ``` * * ## Import * * This resource can be imported by specifying the user ID * * Example: * * ```sh * $ pulumi import auth0:index/userPermissions:UserPermissions all_user_permissions "auth0|111111111111111111111111" * ``` */ export declare class UserPermissions extends pulumi.CustomResource { /** * Get an existing UserPermissions resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: UserPermissionsState, opts?: pulumi.CustomResourceOptions): UserPermissions; /** * Returns true if the given object is an instance of UserPermissions. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is UserPermissions; /** * List of API permissions granted to the user. */ readonly permissions: pulumi.Output; /** * ID of the user to associate the permission to. */ readonly userId: pulumi.Output; /** * Create a UserPermissions resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: UserPermissionsArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering UserPermissions resources. */ export interface UserPermissionsState { /** * List of API permissions granted to the user. */ permissions?: pulumi.Input[]>; /** * ID of the user to associate the permission to. */ userId?: pulumi.Input; } /** * The set of arguments for constructing a UserPermissions resource. */ export interface UserPermissionsArgs { /** * List of API permissions granted to the user. */ permissions: pulumi.Input[]>; /** * ID of the user to associate the permission to. */ userId: pulumi.Input; }