UNPKG

@pulumi/sumologic

Version:

A Pulumi package for creating and managing sumologic cloud resources.

169 lines (168 loc) 5.49 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a [Sumologic User](https://help.sumologic.com/Manage/Users-and-Roles/Manage-Users). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sumologic from "@pulumi/sumologic"; * * const exampleRole = new sumologic.Role("example_role", { * name: "TestRole123", * description: "Testing resource sumologic_role", * }); * const exampleUser1 = new sumologic.User("example_user1", { * firstName: "Jon", * lastName: "Doe", * email: "jon.doe@gmail.com", * isActive: true, * roleIds: [exampleRole.id], * transferTo: "", * }); * const exampleUser2 = new sumologic.User("example_user2", { * firstName: "Jane", * lastName: "Smith", * email: "jane.smith@gmail.com", * roleIds: [exampleRole.id], * transferTo: exampleUser1.id, * }); * ``` * * ## Transfered content and email updates * * When a user is deleted, all of that user's content is transferred to another user. If `transferTo` is * set to another user's ID, then the content will be assigned to that user. If `transferTo` is empty, * then it will instead be assigned to the user executing the delete operation. * * A user's email address may not be changed. As a workaround, you may: * * 1. create a new `sumologic.User` with the desired email address * 2. set the `transferTo` of the existing user to the new user's ID * 3. delete the user with the old email address * * [1]: https://help.sumologic.com/Manage/Users-and-Roles/Manage-Users * * ## Import * * Users can be imported using the user id, e.g.: * * hcl * * ```sh * $ pulumi import sumologic:index/user:User user 1234567890 * ``` */ export declare class User extends pulumi.CustomResource { /** * Get an existing User 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<pulumi.ID>, state?: UserState, opts?: pulumi.CustomResourceOptions): User; /** * Returns true if the given object is an instance of User. 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 User; /** * Email of the user. */ readonly email: pulumi.Output<string>; /** * First name of the user. */ readonly firstName: pulumi.Output<string>; /** * This has the value true if the user is active and false if they have been deactivated. */ readonly isActive: pulumi.Output<boolean>; /** * Last name of the user. */ readonly lastName: pulumi.Output<string>; /** * List of roleIds associated with the user. */ readonly roleIds: pulumi.Output<string[]>; /** * UserId of user to transfer this user's content to on deletion, can be empty. Must be applied prior to deletion to take effect. * * The following attributes are exported: */ readonly transferTo: pulumi.Output<string>; /** * Create a User 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: UserArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering User resources. */ export interface UserState { /** * Email of the user. */ email?: pulumi.Input<string>; /** * First name of the user. */ firstName?: pulumi.Input<string>; /** * This has the value true if the user is active and false if they have been deactivated. */ isActive?: pulumi.Input<boolean>; /** * Last name of the user. */ lastName?: pulumi.Input<string>; /** * List of roleIds associated with the user. */ roleIds?: pulumi.Input<pulumi.Input<string>[]>; /** * UserId of user to transfer this user's content to on deletion, can be empty. Must be applied prior to deletion to take effect. * * The following attributes are exported: */ transferTo?: pulumi.Input<string>; } /** * The set of arguments for constructing a User resource. */ export interface UserArgs { /** * Email of the user. */ email: pulumi.Input<string>; /** * First name of the user. */ firstName: pulumi.Input<string>; /** * This has the value true if the user is active and false if they have been deactivated. */ isActive: pulumi.Input<boolean>; /** * Last name of the user. */ lastName: pulumi.Input<string>; /** * List of roleIds associated with the user. */ roleIds: pulumi.Input<pulumi.Input<string>[]>; /** * UserId of user to transfer this user's content to on deletion, can be empty. Must be applied prior to deletion to take effect. * * The following attributes are exported: */ transferTo: pulumi.Input<string>; }