All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.cloudfront.PublicKeyArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

The newest version!
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.cloudfront;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class PublicKeyArgs extends com.pulumi.resources.ResourceArgs {

    public static final PublicKeyArgs Empty = new PublicKeyArgs();

    /**
     * An optional comment about the public key.
     * 
     */
    @Import(name="comment")
    private @Nullable Output comment;

    /**
     * @return An optional comment about the public key.
     * 
     */
    public Optional> comment() {
        return Optional.ofNullable(this.comment);
    }

    /**
     * The encoded public key that you want to add to CloudFront to use with features like field-level encryption.
     * 
     */
    @Import(name="encodedKey", required=true)
    private Output encodedKey;

    /**
     * @return The encoded public key that you want to add to CloudFront to use with features like field-level encryption.
     * 
     */
    public Output encodedKey() {
        return this.encodedKey;
    }

    /**
     * The name for the public key. By default generated by this provider. Note: Do not set if using the key's id in another resource (e.g. KeyGroup) since it will result in a dependency error from AWS. Instead, it is recommended to use Pulumi autonaming by leaving this property unset (default behavior) or set the `namePrefix` property to allow the provider to autoname the resource.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name for the public key. By default generated by this provider. Note: Do not set if using the key's id in another resource (e.g. KeyGroup) since it will result in a dependency error from AWS. Instead, it is recommended to use Pulumi autonaming by leaving this property unset (default behavior) or set the `namePrefix` property to allow the provider to autoname the resource.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * 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.
     * 
     */
    @Import(name="namePrefix")
    private @Nullable Output namePrefix;

    /**
     * @return 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.
     * 
     */
    public Optional> namePrefix() {
        return Optional.ofNullable(this.namePrefix);
    }

    private PublicKeyArgs() {}

    private PublicKeyArgs(PublicKeyArgs $) {
        this.comment = $.comment;
        this.encodedKey = $.encodedKey;
        this.name = $.name;
        this.namePrefix = $.namePrefix;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(PublicKeyArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private PublicKeyArgs $;

        public Builder() {
            $ = new PublicKeyArgs();
        }

        public Builder(PublicKeyArgs defaults) {
            $ = new PublicKeyArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param comment An optional comment about the public key.
         * 
         * @return builder
         * 
         */
        public Builder comment(@Nullable Output comment) {
            $.comment = comment;
            return this;
        }

        /**
         * @param comment An optional comment about the public key.
         * 
         * @return builder
         * 
         */
        public Builder comment(String comment) {
            return comment(Output.of(comment));
        }

        /**
         * @param encodedKey The encoded public key that you want to add to CloudFront to use with features like field-level encryption.
         * 
         * @return builder
         * 
         */
        public Builder encodedKey(Output encodedKey) {
            $.encodedKey = encodedKey;
            return this;
        }

        /**
         * @param encodedKey The encoded public key that you want to add to CloudFront to use with features like field-level encryption.
         * 
         * @return builder
         * 
         */
        public Builder encodedKey(String encodedKey) {
            return encodedKey(Output.of(encodedKey));
        }

        /**
         * @param name The name for the public key. By default generated by this provider. Note: Do not set if using the key's id in another resource (e.g. KeyGroup) since it will result in a dependency error from AWS. Instead, it is recommended to use Pulumi autonaming by leaving this property unset (default behavior) or set the `namePrefix` property to allow the provider to autoname the resource.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name for the public key. By default generated by this provider. Note: Do not set if using the key's id in another resource (e.g. KeyGroup) since it will result in a dependency error from AWS. Instead, it is recommended to use Pulumi autonaming by leaving this property unset (default behavior) or set the `namePrefix` property to allow the provider to autoname the resource.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param namePrefix 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.
         * 
         * @return builder
         * 
         */
        public Builder namePrefix(@Nullable Output namePrefix) {
            $.namePrefix = namePrefix;
            return this;
        }

        /**
         * @param namePrefix 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.
         * 
         * @return builder
         * 
         */
        public Builder namePrefix(String namePrefix) {
            return namePrefix(Output.of(namePrefix));
        }

        public PublicKeyArgs build() {
            if ($.encodedKey == null) {
                throw new MissingRequiredPropertyException("PublicKeyArgs", "encodedKey");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy