@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
163 lines (162 loc) • 5.98 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a permanent Access Key resource within HuaweiCloud IAM service.
*
* > **NOTE:** You *must* have admin privileges in your HuaweiCloud cloud to use this resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const user1Password = config.requireObject("user1Password");
* const user1 = new huaweicloud.iam.User("user1", {
* description: "A user",
* password: user1Password,
* });
* const key1 = new huaweicloud.iam.AccessKey("key1", {userId: user1.id});
* ```
*/
export declare class AccessKey extends pulumi.CustomResource {
/**
* Get an existing AccessKey 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?: AccessKeyState, opts?: pulumi.CustomResourceOptions): AccessKey;
/**
* Returns true if the given object is an instance of AccessKey. 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 AccessKey;
/**
* The time when the access key was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* Specifies the description of the access key.
*/
readonly description: pulumi.Output<string | undefined>;
readonly encryptedSecret: pulumi.Output<string>;
/**
* The fingerprint of the PGP key used to encrypt the secret
*/
readonly keyFingerprint: pulumi.Output<string>;
/**
* Either a base-64 encoded PGP public key, or a keybase username in the form
* `keybase:some_person_that_exists`. Changing this creates a new resource.
*/
readonly pgpKey: pulumi.Output<string | undefined>;
/**
* The access secret key. Setting the value only when writing to `secretFile` failed.
*/
readonly secret: pulumi.Output<string>;
/**
* Specifies the file name that can save access key and access secret key.
* Defaults to *./credentials-{{user name}}.csv*. Changing this creates a new resource.
*/
readonly secretFile: pulumi.Output<string | undefined>;
/**
* Specifies the status of the access key. It must be *active* or *inactive*. Default value
* is *active*.
*/
readonly status: pulumi.Output<string>;
/**
* Specifies the ID of the user who is requesting to create an access key.
* Changing this creates a new resource.
*/
readonly userId: pulumi.Output<string>;
/**
* The name of IAM user.
*/
readonly userName: pulumi.Output<string>;
/**
* Create a AccessKey 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: AccessKeyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering AccessKey resources.
*/
export interface AccessKeyState {
/**
* The time when the access key was created.
*/
createTime?: pulumi.Input<string>;
/**
* Specifies the description of the access key.
*/
description?: pulumi.Input<string>;
encryptedSecret?: pulumi.Input<string>;
/**
* The fingerprint of the PGP key used to encrypt the secret
*/
keyFingerprint?: pulumi.Input<string>;
/**
* Either a base-64 encoded PGP public key, or a keybase username in the form
* `keybase:some_person_that_exists`. Changing this creates a new resource.
*/
pgpKey?: pulumi.Input<string>;
/**
* The access secret key. Setting the value only when writing to `secretFile` failed.
*/
secret?: pulumi.Input<string>;
/**
* Specifies the file name that can save access key and access secret key.
* Defaults to *./credentials-{{user name}}.csv*. Changing this creates a new resource.
*/
secretFile?: pulumi.Input<string>;
/**
* Specifies the status of the access key. It must be *active* or *inactive*. Default value
* is *active*.
*/
status?: pulumi.Input<string>;
/**
* Specifies the ID of the user who is requesting to create an access key.
* Changing this creates a new resource.
*/
userId?: pulumi.Input<string>;
/**
* The name of IAM user.
*/
userName?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a AccessKey resource.
*/
export interface AccessKeyArgs {
/**
* Specifies the description of the access key.
*/
description?: pulumi.Input<string>;
/**
* Either a base-64 encoded PGP public key, or a keybase username in the form
* `keybase:some_person_that_exists`. Changing this creates a new resource.
*/
pgpKey?: pulumi.Input<string>;
/**
* Specifies the file name that can save access key and access secret key.
* Defaults to *./credentials-{{user name}}.csv*. Changing this creates a new resource.
*/
secretFile?: pulumi.Input<string>;
/**
* Specifies the status of the access key. It must be *active* or *inactive*. Default value
* is *active*.
*/
status?: pulumi.Input<string>;
/**
* Specifies the ID of the user who is requesting to create an access key.
* Changing this creates a new resource.
*/
userId: pulumi.Input<string>;
}