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

com.pulumi.aws.kms.AliasArgs Maven / Gradle / Ivy

// *** 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.kms;

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 AliasArgs extends com.pulumi.resources.ResourceArgs {

    public static final AliasArgs Empty = new AliasArgs();

    /**
     * The display name of the alias. The name must start with the word "alias" followed by a forward slash (alias/)
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The display name of the alias. The name must start with the word "alias" followed by a forward slash (alias/)
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Creates an unique alias beginning with the specified prefix.
     * The name must start with the word "alias" followed by a forward slash (alias/).  Conflicts with `name`.
     * 
     */
    @Import(name="namePrefix")
    private @Nullable Output namePrefix;

    /**
     * @return Creates an unique alias beginning with the specified prefix.
     * The name must start with the word "alias" followed by a forward slash (alias/).  Conflicts with `name`.
     * 
     */
    public Optional> namePrefix() {
        return Optional.ofNullable(this.namePrefix);
    }

    /**
     * Identifier for the key for which the alias is for, can be either an ARN or key_id.
     * 
     */
    @Import(name="targetKeyId", required=true)
    private Output targetKeyId;

    /**
     * @return Identifier for the key for which the alias is for, can be either an ARN or key_id.
     * 
     */
    public Output targetKeyId() {
        return this.targetKeyId;
    }

    private AliasArgs() {}

    private AliasArgs(AliasArgs $) {
        this.name = $.name;
        this.namePrefix = $.namePrefix;
        this.targetKeyId = $.targetKeyId;
    }

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

    public static final class Builder {
        private AliasArgs $;

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

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

        /**
         * @param name The display name of the alias. The name must start with the word "alias" followed by a forward slash (alias/)
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The display name of the alias. The name must start with the word "alias" followed by a forward slash (alias/)
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param namePrefix Creates an unique alias beginning with the specified prefix.
         * The name must start with the word "alias" followed by a forward slash (alias/).  Conflicts with `name`.
         * 
         * @return builder
         * 
         */
        public Builder namePrefix(@Nullable Output namePrefix) {
            $.namePrefix = namePrefix;
            return this;
        }

        /**
         * @param namePrefix Creates an unique alias beginning with the specified prefix.
         * The name must start with the word "alias" followed by a forward slash (alias/).  Conflicts with `name`.
         * 
         * @return builder
         * 
         */
        public Builder namePrefix(String namePrefix) {
            return namePrefix(Output.of(namePrefix));
        }

        /**
         * @param targetKeyId Identifier for the key for which the alias is for, can be either an ARN or key_id.
         * 
         * @return builder
         * 
         */
        public Builder targetKeyId(Output targetKeyId) {
            $.targetKeyId = targetKeyId;
            return this;
        }

        /**
         * @param targetKeyId Identifier for the key for which the alias is for, can be either an ARN or key_id.
         * 
         * @return builder
         * 
         */
        public Builder targetKeyId(String targetKeyId) {
            return targetKeyId(Output.of(targetKeyId));
        }

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

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy