import * as pulumi from "@pulumi/pulumi"; /** * With this resource, you can manage assigned roles for a user. * * !> This resource appends a role to a user. In contrast, the `auth0.UserRoles` resource manages all the roles assigned * to a user. To avoid potential issues, it is recommended not to use this resource in conjunction with the * `auth0.UserRoles` resource when managing roles for the same user id. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * * // Example: * const admin = new auth0.Role("admin", { * name: "admin", * description: "Administrator", * }); * const user = new auth0.User("user", { * connectionName: "Username-Password-Authentication", * username: "unique_username", * name: "Firstname Lastname", * email: "test@test.com", * password: "passpass$12$12", * }); * const userRoles = new auth0.UserRole("user_roles", { * userId: user.id, * roleId: admin.id, * }); * ``` * * ## Import * * This resource can be imported by specifying the * * user ID and role ID separated by "::" (note the double colon) * * :: * * Example: * * ```sh * $ pulumi import auth0:index/userRole:UserRole user_role "auth0|111111111111111111111111::role_123" * ``` */ export declare class UserRole extends pulumi.CustomResource { /** * Get an existing UserRole 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?: UserRoleState, opts?: pulumi.CustomResourceOptions): UserRole; /** * Returns true if the given object is an instance of UserRole. 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 UserRole; /** * Description of the role. */ readonly roleDescription: pulumi.Output; /** * ID of the role assigned to the user. */ readonly roleId: pulumi.Output; /** * Name of the role. */ readonly roleName: pulumi.Output; /** * ID of the user. */ readonly userId: pulumi.Output; /** * Create a UserRole 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: UserRoleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering UserRole resources. */ export interface UserRoleState { /** * Description of the role. */ roleDescription?: pulumi.Input; /** * ID of the role assigned to the user. */ roleId?: pulumi.Input; /** * Name of the role. */ roleName?: pulumi.Input; /** * ID of the user. */ userId?: pulumi.Input; } /** * The set of arguments for constructing a UserRole resource. */ export interface UserRoleArgs { /** * ID of the role assigned to the user. */ roleId: pulumi.Input; /** * ID of the user. */ userId: pulumi.Input; }