import * as pulumi from "@pulumi/pulumi"; /** * Provides an IAM user. * * > *NOTE:* If policies are attached to the user via the `aws.iam.PolicyAttachment` resource and you are modifying the user `name` or `path`, the `forceDestroy` argument must be set to `true` and applied before attempting the operation otherwise you will encounter a `DeleteConflict` error. The `aws.iam.UserPolicyAttachment` resource (recommended) does not have this requirement. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const lb = new aws.iam.User("lb", { * name: "loadbalancer", * path: "/system/", * tags: { * "tag-key": "tag-value", * }, * }); * const lbAccessKey = new aws.iam.AccessKey("lb", {user: lb.name}); * const lbRo = aws.iam.getPolicyDocument({ * statements: [{ * effect: "Allow", * actions: ["ec2:Describe*"], * resources: ["*"], * }], * }); * const lbRoUserPolicy = new aws.iam.UserPolicy("lb_ro", { * name: "test", * user: lb.name, * policy: lbRo.then(lbRo => lbRo.json), * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `name` (String) User name. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * Using `pulumi import`, import IAM Users using the `name`. For example: * * ```sh * $ pulumi import aws:iam/user:User example example-user * ``` */ 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, 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; /** * The ARN assigned by AWS for this user. */ readonly arn: pulumi.Output; /** * When destroying this user, destroy even if it * has non-provider-managed IAM access keys, login profile or MFA devices. Without `forceDestroy` * a user with non-provider-managed access keys and login profile will fail to be destroyed. This only deletes objects when the user is destroyed, not when setting this parameter to true. Once this parameter is set to true, there must be a successful pulumi up run before a destroy is required to update this value in the resource state. Without a successful pulumi up after this parameter is set, this flag will have no effect. If setting this field in the same operation that would require replacing the user or destroying the user, this flag will not work. Additionally when importing a user, a successful pulumi up is required to set this value in state before it will take effect on a destroy operation. */ readonly forceDestroy: pulumi.Output; /** * The user's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: `=,.@-_.`. User names are not distinguished by case. For example, you cannot create users named both "TESTUSER" and "testuser". */ readonly name: pulumi.Output; /** * Path in which to create the user. */ readonly path: pulumi.Output; /** * The ARN of the policy that is used to set the permissions boundary for the user. */ readonly permissionsBoundary: pulumi.Output; /** * Key-value mapping of tags for the IAM user. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * The [unique ID](https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html#GUIDs) assigned by AWS. */ readonly uniqueId: pulumi.Output; /** * 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 { /** * The ARN assigned by AWS for this user. */ arn?: pulumi.Input; /** * When destroying this user, destroy even if it * has non-provider-managed IAM access keys, login profile or MFA devices. Without `forceDestroy` * a user with non-provider-managed access keys and login profile will fail to be destroyed. This only deletes objects when the user is destroyed, not when setting this parameter to true. Once this parameter is set to true, there must be a successful pulumi up run before a destroy is required to update this value in the resource state. Without a successful pulumi up after this parameter is set, this flag will have no effect. If setting this field in the same operation that would require replacing the user or destroying the user, this flag will not work. Additionally when importing a user, a successful pulumi up is required to set this value in state before it will take effect on a destroy operation. */ forceDestroy?: pulumi.Input; /** * The user's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: `=,.@-_.`. User names are not distinguished by case. For example, you cannot create users named both "TESTUSER" and "testuser". */ name?: pulumi.Input; /** * Path in which to create the user. */ path?: pulumi.Input; /** * The ARN of the policy that is used to set the permissions boundary for the user. */ permissionsBoundary?: pulumi.Input; /** * Key-value mapping of tags for the IAM user. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The [unique ID](https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html#GUIDs) assigned by AWS. */ uniqueId?: pulumi.Input; } /** * The set of arguments for constructing a User resource. */ export interface UserArgs { /** * When destroying this user, destroy even if it * has non-provider-managed IAM access keys, login profile or MFA devices. Without `forceDestroy` * a user with non-provider-managed access keys and login profile will fail to be destroyed. This only deletes objects when the user is destroyed, not when setting this parameter to true. Once this parameter is set to true, there must be a successful pulumi up run before a destroy is required to update this value in the resource state. Without a successful pulumi up after this parameter is set, this flag will have no effect. If setting this field in the same operation that would require replacing the user or destroying the user, this flag will not work. Additionally when importing a user, a successful pulumi up is required to set this value in state before it will take effect on a destroy operation. */ forceDestroy?: pulumi.Input; /** * The user's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: `=,.@-_.`. User names are not distinguished by case. For example, you cannot create users named both "TESTUSER" and "testuser". */ name?: pulumi.Input; /** * Path in which to create the user. */ path?: pulumi.Input; /** * The ARN of the policy that is used to set the permissions boundary for the user. */ permissionsBoundary?: pulumi.Input; /** * Key-value mapping of tags for the IAM user. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; } //# sourceMappingURL=user.d.ts.map