Key Args
data class KeyArgs(val automaticRotation: Output<String>? = null, val deletionWindowInDays: Output<Int>? = null, val description: Output<String>? = null, val dkmsInstanceId: Output<String>? = null, val isEnabled: Output<Boolean>? = null, val keySpec: Output<String>? = null, val keyState: Output<String>? = null, val keyUsage: Output<String>? = null, val origin: Output<String>? = null, val pendingWindowInDays: Output<Int>? = null, val protectionLevel: Output<String>? = null, val rotationInterval: Output<String>? = null, val status: Output<String>? = null, val tags: Output<Map<String, Any>>? = null) : ConvertibleToJava<KeyArgs>
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());
}
}
Content copied to clipboard
Import
Alikms key can be imported using the id, e.g.
$ pulumi import alicloud:kms/key:Key example <id>
Content copied to clipboard
Constructors
Link copied to clipboard
fun KeyArgs(automaticRotation: Output<String>? = null, deletionWindowInDays: Output<Int>? = null, description: Output<String>? = null, dkmsInstanceId: Output<String>? = null, isEnabled: Output<Boolean>? = null, keySpec: Output<String>? = null, keyState: Output<String>? = null, keyUsage: Output<String>? = null, origin: Output<String>? = null, pendingWindowInDays: Output<Int>? = null, protectionLevel: Output<String>? = null, rotationInterval: Output<String>? = null, status: Output<String>? = null, tags: Output<Map<String, Any>>? = null)
Functions
Properties
Link copied to clipboard
Link copied to clipboard
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"