PublicKeyArgs

data class PublicKeyArgs(val comment: Output<String>? = null, val encodedKey: Output<String>? = null, val name: Output<String>? = null, val namePrefix: Output<String>? = null) : ConvertibleToJava<PublicKeyArgs>

Example Usage

The following example below creates a CloudFront public key.

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.PublicKey;
import com.pulumi.aws.cloudfront.PublicKeyArgs;
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 example = new PublicKey("example", PublicKeyArgs.builder()
.comment("test public key")
.encodedKey(Files.readString(Paths.get("public_key.pem")))
.build());
}
}

Import

CloudFront Public Key can be imported using the id, e.g.,

$ pulumi import aws:cloudfront/publicKey:PublicKey example K3D5EWEUDCCXON

Constructors

Link copied to clipboard
constructor(comment: Output<String>? = null, encodedKey: Output<String>? = null, name: Output<String>? = null, namePrefix: Output<String>? = null)

Properties

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

An optional comment about the public key.

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

The encoded public key that you want to add to CloudFront to use with features like field-level encryption.

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

The name for the public key. By default generated by this provider.

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

The name for the public key. Conflicts with name. NOTE: When setting encoded_key value, there needs a newline at the end of string. Otherwise, multiple runs of pulumi will want to recreate the aws.cloudfront.PublicKey resource.

Functions

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