ClientKeyArgs

data class ClientKeyArgs(val aapName: Output<String>? = null, val notAfter: Output<String>? = null, val notBefore: Output<String>? = null, val password: Output<String>? = null, val privateKeyDataFile: Output<String>? = null) : ConvertibleToJava<ClientKeyArgs>

Provides a KMS Client Key resource. Client key (of Application Access Point). For information about KMS Client Key and how to use it, see What is Client Key.

NOTE: Available since v1.210.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.ApplicationAccessPoint;
import com.pulumi.alicloud.kms.ApplicationAccessPointArgs;
import com.pulumi.alicloud.kms.ClientKey;
import com.pulumi.alicloud.kms.ClientKeyArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var aAP0 = new ApplicationAccessPoint("aAP0", ApplicationAccessPointArgs.builder()
.policies("aa")
.description("aa")
.applicationAccessPointName(name)
.build());
var default_ = new ClientKey("default", ClientKeyArgs.builder()
.aapName(aAP0.applicationAccessPointName())
.password("YouPassword123!")
.notBefore("2023-09-01T14:11:22Z")
.notAfter("2028-09-01T14:11:22Z")
.privateKeyDataFile("./private_key_data_file.txt")
.build());
}
}

Import

KMS Client Key can be imported using the id, e.g.

$ pulumi import alicloud:kms/clientKey:ClientKey example <id>

Resource attributes such as password, private_key_data_file are not available for imported resources as this information cannot be read from the KMS API.

Constructors

Link copied to clipboard
fun ClientKeyArgs(aapName: Output<String>? = null, notAfter: Output<String>? = null, notBefore: Output<String>? = null, password: Output<String>? = null, privateKeyDataFile: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): ClientKeyArgs

Properties

Link copied to clipboard
val aapName: Output<String>? = null

ClientKey's parent Application Access Point name.

Link copied to clipboard
val notAfter: Output<String>? = null

The ClientKey expiration time. Example: "2027-08-10 T08:03:30Z".

Link copied to clipboard
val notBefore: Output<String>? = null

The valid start time of the ClientKey. Example: "2022-08-10 T08:03:30Z".

Link copied to clipboard
val password: Output<String>? = null

To enhance security, set a password for the downloaded Client Key,When an application accesses KMS, you must use the ClientKey content and this password to initialize the SDK client.

Link copied to clipboard
val privateKeyDataFile: Output<String>? = null

The name of file that can save access key id and access key secret. Strongly suggest you to specified it when you creating access key, otherwise, you wouldn't get its secret ever.