@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
283 lines (282 loc) • 7.7 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Provides a resource to manage kms key
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@volcengine/pulumi";
*
* const fooKeyring = new volcengine.kms.Keyring("fooKeyring", {
* keyringName: "tf-test",
* description: "tf-test",
* projectName: "default",
* });
* const fooKey = new volcengine.kms.Key("fooKey", {
* keyringName: fooKeyring.keyringName,
* keyName: "mrk-tf-key-mod",
* description: "tf test key-mod",
* tags: [{
* key: "tfkey3",
* value: "tfvalue3",
* }],
* });
* ```
*
* ## Import
*
* KmsKey can be imported using the id, e.g.
*
* ```sh
* $ pulumi import volcengine:kms/key:Key default resource_id
* ```
*/
export declare class Key extends pulumi.CustomResource {
/**
* Get an existing Key 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?: KeyState, opts?: pulumi.CustomResourceOptions): Key;
/**
* Returns true if the given object is an instance of Key. 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 Key;
/**
* The date when the keyring was created.
*/
readonly creationDate: pulumi.Output<number>;
/**
* The description of the key.
*/
readonly description: pulumi.Output<string>;
/**
* The time when the key material will expire.
*/
readonly keyMaterialExpireTime: pulumi.Output<string>;
/**
* The name of the CMK.
*/
readonly keyName: pulumi.Output<string>;
/**
* The type of the keys.
*/
readonly keySpec: pulumi.Output<string>;
/**
* The usage of the key.
*/
readonly keyUsage: pulumi.Output<string>;
/**
* The name of the keyring.
*/
readonly keyringName: pulumi.Output<string>;
/**
* The last time the key was rotated.
*/
readonly lastRotationTime: pulumi.Output<string>;
/**
* Whether it is the master key of the Multi-region type.
*/
readonly multiRegion: pulumi.Output<boolean>;
/**
* The configuration of Multi-region key.
*/
readonly multiRegionConfiguration: pulumi.Output<outputs.kms.KeyMultiRegionConfiguration>;
/**
* The origin of the key.
*/
readonly origin: pulumi.Output<string>;
/**
* The pre-deletion cycle of the key.
*/
readonly pendingWindowInDays: pulumi.Output<number | undefined>;
/**
* The protection level of the key.
*/
readonly protectionLevel: pulumi.Output<string>;
/**
* The rotation state of the key.
*/
readonly rotateState: pulumi.Output<string | undefined>;
/**
* The rotation configuration of the key.
*/
readonly rotationState: pulumi.Output<string>;
/**
* The time when the key will be deleted.
*/
readonly scheduleDeleteTime: pulumi.Output<string>;
/**
* The next time the key will be rotated.
*/
readonly scheduleRotationTime: pulumi.Output<string>;
/**
* The state of the key.
*/
readonly state: pulumi.Output<string>;
/**
* Tags.
*/
readonly tags: pulumi.Output<outputs.kms.KeyTag[] | undefined>;
/**
* The name of the resource.
*/
readonly trn: pulumi.Output<string>;
/**
* The date when the keyring was updated.
*/
readonly updateDate: pulumi.Output<number>;
/**
* Create a Key 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: KeyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Key resources.
*/
export interface KeyState {
/**
* The date when the keyring was created.
*/
creationDate?: pulumi.Input<number>;
/**
* The description of the key.
*/
description?: pulumi.Input<string>;
/**
* The time when the key material will expire.
*/
keyMaterialExpireTime?: pulumi.Input<string>;
/**
* The name of the CMK.
*/
keyName?: pulumi.Input<string>;
/**
* The type of the keys.
*/
keySpec?: pulumi.Input<string>;
/**
* The usage of the key.
*/
keyUsage?: pulumi.Input<string>;
/**
* The name of the keyring.
*/
keyringName?: pulumi.Input<string>;
/**
* The last time the key was rotated.
*/
lastRotationTime?: pulumi.Input<string>;
/**
* Whether it is the master key of the Multi-region type.
*/
multiRegion?: pulumi.Input<boolean>;
/**
* The configuration of Multi-region key.
*/
multiRegionConfiguration?: pulumi.Input<inputs.kms.KeyMultiRegionConfiguration>;
/**
* The origin of the key.
*/
origin?: pulumi.Input<string>;
/**
* The pre-deletion cycle of the key.
*/
pendingWindowInDays?: pulumi.Input<number>;
/**
* The protection level of the key.
*/
protectionLevel?: pulumi.Input<string>;
/**
* The rotation state of the key.
*/
rotateState?: pulumi.Input<string>;
/**
* The rotation configuration of the key.
*/
rotationState?: pulumi.Input<string>;
/**
* The time when the key will be deleted.
*/
scheduleDeleteTime?: pulumi.Input<string>;
/**
* The next time the key will be rotated.
*/
scheduleRotationTime?: pulumi.Input<string>;
/**
* The state of the key.
*/
state?: pulumi.Input<string>;
/**
* Tags.
*/
tags?: pulumi.Input<pulumi.Input<inputs.kms.KeyTag>[]>;
/**
* The name of the resource.
*/
trn?: pulumi.Input<string>;
/**
* The date when the keyring was updated.
*/
updateDate?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a Key resource.
*/
export interface KeyArgs {
/**
* The description of the key.
*/
description?: pulumi.Input<string>;
/**
* The name of the CMK.
*/
keyName: pulumi.Input<string>;
/**
* The type of the keys.
*/
keySpec?: pulumi.Input<string>;
/**
* The usage of the key.
*/
keyUsage?: pulumi.Input<string>;
/**
* The name of the keyring.
*/
keyringName: pulumi.Input<string>;
/**
* Whether it is the master key of the Multi-region type.
*/
multiRegion?: pulumi.Input<boolean>;
/**
* The origin of the key.
*/
origin?: pulumi.Input<string>;
/**
* The pre-deletion cycle of the key.
*/
pendingWindowInDays?: pulumi.Input<number>;
/**
* The protection level of the key.
*/
protectionLevel?: pulumi.Input<string>;
/**
* The rotation state of the key.
*/
rotateState?: pulumi.Input<string>;
/**
* Tags.
*/
tags?: pulumi.Input<pulumi.Input<inputs.kms.KeyTag>[]>;
}