UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

130 lines (129 loc) 4.93 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages an IAM user token resource within HuaweiCloud. * * ->**Note** The token can not be destroyed. It will be invalid after expiration time. If password or AK/SK is changed, * the token valid time will last less than 30 minutes. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const accountName = config.requireObject("accountName"); * const userName = config.requireObject("userName"); * const password = config.requireObject("password"); * const test = new huaweicloud.iam.UserToken("test", { * accountName: accountName, * userName: userName, * password: password, * }); * ``` */ export declare class UserToken extends pulumi.CustomResource { /** * Get an existing UserToken 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?: UserTokenState, opts?: pulumi.CustomResourceOptions): UserToken; /** * Returns true if the given object is an instance of UserToken. 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 UserToken; /** * Specifies the account name to which the IAM user belongs. * Changing this will create a new token. */ readonly accountName: pulumi.Output<string>; /** * The Time when the token will expire. The value is a UTC time in the YYYY-MM-DDTHH:mm:ss.ssssssZ format. */ readonly expiresAt: pulumi.Output<string>; /** * Specifies the IAM user password. Changing this will create a new token. */ readonly password: pulumi.Output<string>; /** * Specifies the project name. If it is blank, the token applies to global * services, otherwise the token applies to project-level services. Changing this will create a new token. */ readonly projectName: pulumi.Output<string | undefined>; /** * The token. Validity period is 24 hours. */ readonly token: pulumi.Output<string>; /** * Specifies the IAM user name. Changing this will create a new token. */ readonly userName: pulumi.Output<string>; /** * Create a UserToken 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: UserTokenArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering UserToken resources. */ export interface UserTokenState { /** * Specifies the account name to which the IAM user belongs. * Changing this will create a new token. */ accountName?: pulumi.Input<string>; /** * The Time when the token will expire. The value is a UTC time in the YYYY-MM-DDTHH:mm:ss.ssssssZ format. */ expiresAt?: pulumi.Input<string>; /** * Specifies the IAM user password. Changing this will create a new token. */ password?: pulumi.Input<string>; /** * Specifies the project name. If it is blank, the token applies to global * services, otherwise the token applies to project-level services. Changing this will create a new token. */ projectName?: pulumi.Input<string>; /** * The token. Validity period is 24 hours. */ token?: pulumi.Input<string>; /** * Specifies the IAM user name. Changing this will create a new token. */ userName?: pulumi.Input<string>; } /** * The set of arguments for constructing a UserToken resource. */ export interface UserTokenArgs { /** * Specifies the account name to which the IAM user belongs. * Changing this will create a new token. */ accountName: pulumi.Input<string>; /** * Specifies the IAM user password. Changing this will create a new token. */ password: pulumi.Input<string>; /** * Specifies the project name. If it is blank, the token applies to global * services, otherwise the token applies to project-level services. Changing this will create a new token. */ projectName?: pulumi.Input<string>; /** * Specifies the IAM user name. Changing this will create a new token. */ userName: pulumi.Input<string>; }