Key

class Key : KotlinCustomResource

A kms key can help user to protect data security in the transmission process. For information about Alikms Key and how to use it, see What is Resource Alikms Key.

NOTE: Available since v1.85.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.kms.Key;
import com.pulumi.alicloud.kms.KeyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var key = new Key("key", KeyArgs.builder()
.description("Hello KMS")
.pendingWindowInDays("7")
.status("Enabled")
.build());
}
}

Import

Alikms key can be imported using the id, e.g.

$ pulumi import alicloud:kms/key:Key example <id>

Properties

Link copied to clipboard
val arn: Output<String>

The Alicloud Resource Name (ARN) of the key.

Link copied to clipboard

Specifies whether to enable automatic key rotation. Default value: Disabled. Valid values:

Link copied to clipboard
val creationDate: Output<String>

The date and time when the CMK was created. The time is displayed in UTC.

Link copied to clipboard
val creator: Output<String>

The creator of the CMK.

Link copied to clipboard
val deleteDate: Output<String>

The scheduled date to delete CMK. The time is displayed in UTC. This value is returned only when the KeyState value is PendingDeletion.

Link copied to clipboard

Field deletion_window_in_days has been deprecated from provider version 1.85.0. New field pending_window_in_days instead.

Link copied to clipboard
val description: Output<String>?

The description of the CMK. The description can be 0 to 8,192 characters in length.

Link copied to clipboard
val dkmsInstanceId: Output<String>?

The instance ID of the exclusive KMS instance.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val isEnabled: Output<Boolean>?

Field is_enabled has been deprecated from provider version 1.85.0. New field status instead.

Link copied to clipboard
val keySpec: Output<String>

The type of the CMK. Default value: Aliyun_AES_256. Valid values: Aliyun_AES_256, Aliyun_AES_128, Aliyun_AES_192, Aliyun_SM4, RSA_2048, RSA_3072, EC_P256, EC_P256K, EC_SM2. Note: The default type of the CMK is Aliyun_AES_256. Only Dedicated KMS supports Aliyun_AES_128 and Aliyun_AES_192.

Link copied to clipboard
val keyState: Output<String>

Field key_state has been deprecated from provider version 1.123.1. New field status instead.

Link copied to clipboard
val keyUsage: Output<String>

The usage of the CMK. Default value: ENCRYPT/DECRYPT. Valid values:

Link copied to clipboard

The date and time the last rotation was performed. The time is displayed in UTC.

Link copied to clipboard

The time and date the key material for the CMK expires. The time is displayed in UTC. If the value is empty, the key material for the CMK does not expire.

Link copied to clipboard

The time the next rotation is scheduled for execution.

Link copied to clipboard
val origin: Output<String>

The source of key material. Default value: Aliyun_KMS. Valid values:

Link copied to clipboard

The number of days before the CMK is deleted. During this period, the CMK is in the PendingDeletion state. After this period ends, you cannot cancel the deletion. Valid values: 7 to 366. Unit: days. NOTE: From version 1.184.0, pending_window_in_days can be set to 366.

Link copied to clipboard

The ID of the current primary key version of the symmetric CMK.

Link copied to clipboard
val protectionLevel: Output<String>?

The protection level of the CMK. Default value: SOFTWARE. Valid values:

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val rotationInterval: Output<String>?

The interval for automatic key rotation. Specify the value in the integerunit format. The following units are supported: d (day), h (hour), m (minute), and s (second). For example, you can use either 7d or 604800s to specify a seven-day interval. The interval can range from 7 days to 730 days. NOTE: It is Required when automatic_rotation = "Enabled"

Link copied to clipboard
val status: Output<String>

The status of CMK. Default value: Enabled. Valid Values:

Link copied to clipboard
val tags: Output<Map<String, Any>>?

A mapping of tags to assign to the resource.

Link copied to clipboard
val urn: Output<String>