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

com.pulumi.aws.iam.SshKeyArgs 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.iam;

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

    public static final SshKeyArgs Empty = new SshKeyArgs();

    /**
     * Specifies the public key encoding format to use in the response. To retrieve the public key in ssh-rsa format, use `SSH`. To retrieve the public key in PEM format, use `PEM`.
     * 
     */
    @Import(name="encoding", required=true)
    private Output encoding;

    /**
     * @return Specifies the public key encoding format to use in the response. To retrieve the public key in ssh-rsa format, use `SSH`. To retrieve the public key in PEM format, use `PEM`.
     * 
     */
    public Output encoding() {
        return this.encoding;
    }

    /**
     * The SSH public key. The public key must be encoded in ssh-rsa format or PEM format.
     * 
     */
    @Import(name="publicKey", required=true)
    private Output publicKey;

    /**
     * @return The SSH public key. The public key must be encoded in ssh-rsa format or PEM format.
     * 
     */
    public Output publicKey() {
        return this.publicKey;
    }

    /**
     * The status to assign to the SSH public key. Active means the key can be used for authentication with an AWS CodeCommit repository. Inactive means the key cannot be used. Default is `active`.
     * 
     */
    @Import(name="status")
    private @Nullable Output status;

    /**
     * @return The status to assign to the SSH public key. Active means the key can be used for authentication with an AWS CodeCommit repository. Inactive means the key cannot be used. Default is `active`.
     * 
     */
    public Optional> status() {
        return Optional.ofNullable(this.status);
    }

    /**
     * The name of the IAM user to associate the SSH public key with.
     * 
     */
    @Import(name="username", required=true)
    private Output username;

    /**
     * @return The name of the IAM user to associate the SSH public key with.
     * 
     */
    public Output username() {
        return this.username;
    }

    private SshKeyArgs() {}

    private SshKeyArgs(SshKeyArgs $) {
        this.encoding = $.encoding;
        this.publicKey = $.publicKey;
        this.status = $.status;
        this.username = $.username;
    }

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

    public static final class Builder {
        private SshKeyArgs $;

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

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

        /**
         * @param encoding Specifies the public key encoding format to use in the response. To retrieve the public key in ssh-rsa format, use `SSH`. To retrieve the public key in PEM format, use `PEM`.
         * 
         * @return builder
         * 
         */
        public Builder encoding(Output encoding) {
            $.encoding = encoding;
            return this;
        }

        /**
         * @param encoding Specifies the public key encoding format to use in the response. To retrieve the public key in ssh-rsa format, use `SSH`. To retrieve the public key in PEM format, use `PEM`.
         * 
         * @return builder
         * 
         */
        public Builder encoding(String encoding) {
            return encoding(Output.of(encoding));
        }

        /**
         * @param publicKey The SSH public key. The public key must be encoded in ssh-rsa format or PEM format.
         * 
         * @return builder
         * 
         */
        public Builder publicKey(Output publicKey) {
            $.publicKey = publicKey;
            return this;
        }

        /**
         * @param publicKey The SSH public key. The public key must be encoded in ssh-rsa format or PEM format.
         * 
         * @return builder
         * 
         */
        public Builder publicKey(String publicKey) {
            return publicKey(Output.of(publicKey));
        }

        /**
         * @param status The status to assign to the SSH public key. Active means the key can be used for authentication with an AWS CodeCommit repository. Inactive means the key cannot be used. Default is `active`.
         * 
         * @return builder
         * 
         */
        public Builder status(@Nullable Output status) {
            $.status = status;
            return this;
        }

        /**
         * @param status The status to assign to the SSH public key. Active means the key can be used for authentication with an AWS CodeCommit repository. Inactive means the key cannot be used. Default is `active`.
         * 
         * @return builder
         * 
         */
        public Builder status(String status) {
            return status(Output.of(status));
        }

        /**
         * @param username The name of the IAM user to associate the SSH public key with.
         * 
         * @return builder
         * 
         */
        public Builder username(Output username) {
            $.username = username;
            return this;
        }

        /**
         * @param username The name of the IAM user to associate the SSH public key with.
         * 
         * @return builder
         * 
         */
        public Builder username(String username) {
            return username(Output.of(username));
        }

        public SshKeyArgs build() {
            if ($.encoding == null) {
                throw new MissingRequiredPropertyException("SshKeyArgs", "encoding");
            }
            if ($.publicKey == null) {
                throw new MissingRequiredPropertyException("SshKeyArgs", "publicKey");
            }
            if ($.username == null) {
                throw new MissingRequiredPropertyException("SshKeyArgs", "username");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy