@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
295 lines (294 loc) • 9.88 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Creates and manages Scaleway IAM Users.
* For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/iam/#path-users-list-users-of-an-organization).
*
* ## Example Usage
*
* ### Guest user
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const guest = new scaleway.iam.User("guest", {
* email: "foo@test.com",
* tags: ["test-tag"],
* });
* ```
*
* ### Member user
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const member = new scaleway.iam.User("member", {
* email: "foo@test.com",
* tags: ["test-tag"],
* username: "foo",
* firstName: "Foo",
* lastName: "Bar",
* });
* ```
*
* When `username` is set, the user is created as a [Member](https://www.scaleway.com/en/docs/iam/concepts/#member). Otherwise, it is created as a [Guest](https://www.scaleway.com/en/docs/iam/concepts/#guest).
*
* ## Import
*
* IAM users can be imported using the `{id}`, e.g.
*
* bash
*
* ```sh
* $ pulumi import scaleway:index/iamUser:IamUser basic 11111111-1111-1111-1111-111111111111
* ```
*
* @deprecated scaleway.index/iamuser.IamUser has been deprecated in favor of scaleway.iam/user.User
*/
export declare class IamUser extends pulumi.CustomResource {
/**
* Get an existing IamUser 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?: IamUserState, opts?: pulumi.CustomResourceOptions): IamUser;
/**
* Returns true if the given object is an instance of IamUser. 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 IamUser;
/**
* The ID of the account root user associated with the user.
*/
readonly accountRootUserId: pulumi.Output<string>;
/**
* The date and time of the creation of the IAM user.
*/
readonly createdAt: pulumi.Output<string>;
/**
* Whether the IAM user is deletable.
*/
readonly deletable: pulumi.Output<boolean>;
/**
* The email of the IAM user. For Guest users, this argument is not editable.
*/
readonly email: pulumi.Output<string>;
/**
* The user's first name.
*/
readonly firstName: pulumi.Output<string | undefined>;
/**
* The date of the last login.
*/
readonly lastLoginAt: pulumi.Output<string>;
/**
* The user's last name.
*/
readonly lastName: pulumi.Output<string | undefined>;
/**
* The user's locale (e.g., en_US).
*
* Important: When creating a Guest user, all arguments are ignored, except for `organizationId`, `email` and `tags`.
*/
readonly locale: pulumi.Output<string>;
/**
* Whether the user is locked.
*/
readonly locked: pulumi.Output<boolean>;
/**
* Whether the MFA is enabled.
*/
readonly mfa: pulumi.Output<boolean>;
/**
* `organizationId`) The ID of the organization the user is associated with.
*/
readonly organizationId: pulumi.Output<string>;
/**
* The password for first access.
*/
readonly password: pulumi.Output<string | undefined>;
/**
* The user's phone number.
*/
readonly phoneNumber: pulumi.Output<string | undefined>;
/**
* Whether or not to send an email containing the password for first access.
*/
readonly sendPasswordEmail: pulumi.Output<boolean | undefined>;
/**
* Whether or not to send a welcome email that includes onboarding information.
*/
readonly sendWelcomeEmail: pulumi.Output<boolean | undefined>;
/**
* The status of user invitation. Check the possible values in the [API doc](https://www.scaleway.com/en/developers/api/iam/#path-users-get-a-given-user).
*/
readonly status: pulumi.Output<string>;
/**
* The tags associated with the user.
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* The type of user. Check the possible values in the [API doc](https://www.scaleway.com/en/developers/api/iam/#path-users-get-a-given-user).
*/
readonly type: pulumi.Output<string>;
/**
* The date and time of the last update of the IAM user.
*/
readonly updatedAt: pulumi.Output<string>;
/**
* The username of the IAM user. When it is set, the user is created as a Member. When it is not set, the user is created as a Guest and the username is set as equal to the email.
*/
readonly username: pulumi.Output<string>;
/**
* Create a IamUser 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.
*/
/** @deprecated scaleway.index/iamuser.IamUser has been deprecated in favor of scaleway.iam/user.User */
constructor(name: string, args: IamUserArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering IamUser resources.
*/
export interface IamUserState {
/**
* The ID of the account root user associated with the user.
*/
accountRootUserId?: pulumi.Input<string>;
/**
* The date and time of the creation of the IAM user.
*/
createdAt?: pulumi.Input<string>;
/**
* Whether the IAM user is deletable.
*/
deletable?: pulumi.Input<boolean>;
/**
* The email of the IAM user. For Guest users, this argument is not editable.
*/
email?: pulumi.Input<string>;
/**
* The user's first name.
*/
firstName?: pulumi.Input<string>;
/**
* The date of the last login.
*/
lastLoginAt?: pulumi.Input<string>;
/**
* The user's last name.
*/
lastName?: pulumi.Input<string>;
/**
* The user's locale (e.g., en_US).
*
* Important: When creating a Guest user, all arguments are ignored, except for `organizationId`, `email` and `tags`.
*/
locale?: pulumi.Input<string>;
/**
* Whether the user is locked.
*/
locked?: pulumi.Input<boolean>;
/**
* Whether the MFA is enabled.
*/
mfa?: pulumi.Input<boolean>;
/**
* `organizationId`) The ID of the organization the user is associated with.
*/
organizationId?: pulumi.Input<string>;
/**
* The password for first access.
*/
password?: pulumi.Input<string>;
/**
* The user's phone number.
*/
phoneNumber?: pulumi.Input<string>;
/**
* Whether or not to send an email containing the password for first access.
*/
sendPasswordEmail?: pulumi.Input<boolean>;
/**
* Whether or not to send a welcome email that includes onboarding information.
*/
sendWelcomeEmail?: pulumi.Input<boolean>;
/**
* The status of user invitation. Check the possible values in the [API doc](https://www.scaleway.com/en/developers/api/iam/#path-users-get-a-given-user).
*/
status?: pulumi.Input<string>;
/**
* The tags associated with the user.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The type of user. Check the possible values in the [API doc](https://www.scaleway.com/en/developers/api/iam/#path-users-get-a-given-user).
*/
type?: pulumi.Input<string>;
/**
* The date and time of the last update of the IAM user.
*/
updatedAt?: pulumi.Input<string>;
/**
* The username of the IAM user. When it is set, the user is created as a Member. When it is not set, the user is created as a Guest and the username is set as equal to the email.
*/
username?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a IamUser resource.
*/
export interface IamUserArgs {
/**
* The email of the IAM user. For Guest users, this argument is not editable.
*/
email: pulumi.Input<string>;
/**
* The user's first name.
*/
firstName?: pulumi.Input<string>;
/**
* The user's last name.
*/
lastName?: pulumi.Input<string>;
/**
* The user's locale (e.g., en_US).
*
* Important: When creating a Guest user, all arguments are ignored, except for `organizationId`, `email` and `tags`.
*/
locale?: pulumi.Input<string>;
/**
* `organizationId`) The ID of the organization the user is associated with.
*/
organizationId?: pulumi.Input<string>;
/**
* The password for first access.
*/
password?: pulumi.Input<string>;
/**
* The user's phone number.
*/
phoneNumber?: pulumi.Input<string>;
/**
* Whether or not to send an email containing the password for first access.
*/
sendPasswordEmail?: pulumi.Input<boolean>;
/**
* Whether or not to send a welcome email that includes onboarding information.
*/
sendWelcomeEmail?: pulumi.Input<boolean>;
/**
* The tags associated with the user.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The username of the IAM user. When it is set, the user is created as a Member. When it is not set, the user is created as a Guest and the username is set as equal to the email.
*/
username?: pulumi.Input<string>;
}