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

com.pulumi.mysql.inputs.UserState Maven / Gradle / Ivy

There is a newer version: 3.3.0-alpha.1731736949
Show 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.mysql.inputs;

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


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

    public static final UserState Empty = new UserState();

    /**
     * Use an [authentication plugin][ref-auth-plugins] to authenticate the user instead of using password authentication.  Description of the fields allowed in the block below. Conflicts with `password` and `plaintext_password`.
     * 
     */
    @Import(name="authPlugin")
    private @Nullable Output authPlugin;

    /**
     * @return Use an [authentication plugin][ref-auth-plugins] to authenticate the user instead of using password authentication.  Description of the fields allowed in the block below. Conflicts with `password` and `plaintext_password`.
     * 
     */
    public Optional> authPlugin() {
        return Optional.ofNullable(this.authPlugin);
    }

    /**
     * The source host of the user. Defaults to "localhost".
     * 
     */
    @Import(name="host")
    private @Nullable Output host;

    /**
     * @return The source host of the user. Defaults to "localhost".
     * 
     */
    public Optional> host() {
        return Optional.ofNullable(this.host);
    }

    /**
     * Deprecated alias of `plaintext_password`, whose value is *stored as plaintext in state*. Prefer to use `plaintext_password` instead, which stores the password as an unsalted hash. Conflicts with `auth_plugin`.
     * 
     * @deprecated
     * Please use plaintext_password instead
     * 
     */
    @Deprecated /* Please use plaintext_password instead */
    @Import(name="password")
    private @Nullable Output password;

    /**
     * @return Deprecated alias of `plaintext_password`, whose value is *stored as plaintext in state*. Prefer to use `plaintext_password` instead, which stores the password as an unsalted hash. Conflicts with `auth_plugin`.
     * 
     * @deprecated
     * Please use plaintext_password instead
     * 
     */
    @Deprecated /* Please use plaintext_password instead */
    public Optional> password() {
        return Optional.ofNullable(this.password);
    }

    /**
     * The password for the user. This must be provided in plain text, so the data source for it must be secured. An _unsalted_ hash of the provided password is stored in state. Conflicts with `auth_plugin`.
     * 
     */
    @Import(name="plaintextPassword")
    private @Nullable Output plaintextPassword;

    /**
     * @return The password for the user. This must be provided in plain text, so the data source for it must be secured. An _unsalted_ hash of the provided password is stored in state. Conflicts with `auth_plugin`.
     * 
     */
    public Optional> plaintextPassword() {
        return Optional.ofNullable(this.plaintextPassword);
    }

    /**
     * An TLS-Option for the `CREATE USER` or `ALTER USER` statement. The value is suffixed to `REQUIRE`. A value of 'SSL' will generate a `CREATE USER ... REQUIRE SSL` statement. See the [MYSQL `CREATE USER` documentation](https://dev.mysql.com/doc/refman/5.7/en/create-user.html) for more. Ignored if MySQL version is under 5.7.0.
     * 
     * [ref-auth-plugins]: https://dev.mysql.com/doc/refman/5.7/en/authentication-plugins.html
     * 
     */
    @Import(name="tlsOption")
    private @Nullable Output tlsOption;

    /**
     * @return An TLS-Option for the `CREATE USER` or `ALTER USER` statement. The value is suffixed to `REQUIRE`. A value of 'SSL' will generate a `CREATE USER ... REQUIRE SSL` statement. See the [MYSQL `CREATE USER` documentation](https://dev.mysql.com/doc/refman/5.7/en/create-user.html) for more. Ignored if MySQL version is under 5.7.0.
     * 
     * [ref-auth-plugins]: https://dev.mysql.com/doc/refman/5.7/en/authentication-plugins.html
     * 
     */
    public Optional> tlsOption() {
        return Optional.ofNullable(this.tlsOption);
    }

    /**
     * The name of the user.
     * 
     */
    @Import(name="user")
    private @Nullable Output user;

    /**
     * @return The name of the user.
     * 
     */
    public Optional> user() {
        return Optional.ofNullable(this.user);
    }

    private UserState() {}

    private UserState(UserState $) {
        this.authPlugin = $.authPlugin;
        this.host = $.host;
        this.password = $.password;
        this.plaintextPassword = $.plaintextPassword;
        this.tlsOption = $.tlsOption;
        this.user = $.user;
    }

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

    public static final class Builder {
        private UserState $;

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

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

        /**
         * @param authPlugin Use an [authentication plugin][ref-auth-plugins] to authenticate the user instead of using password authentication.  Description of the fields allowed in the block below. Conflicts with `password` and `plaintext_password`.
         * 
         * @return builder
         * 
         */
        public Builder authPlugin(@Nullable Output authPlugin) {
            $.authPlugin = authPlugin;
            return this;
        }

        /**
         * @param authPlugin Use an [authentication plugin][ref-auth-plugins] to authenticate the user instead of using password authentication.  Description of the fields allowed in the block below. Conflicts with `password` and `plaintext_password`.
         * 
         * @return builder
         * 
         */
        public Builder authPlugin(String authPlugin) {
            return authPlugin(Output.of(authPlugin));
        }

        /**
         * @param host The source host of the user. Defaults to "localhost".
         * 
         * @return builder
         * 
         */
        public Builder host(@Nullable Output host) {
            $.host = host;
            return this;
        }

        /**
         * @param host The source host of the user. Defaults to "localhost".
         * 
         * @return builder
         * 
         */
        public Builder host(String host) {
            return host(Output.of(host));
        }

        /**
         * @param password Deprecated alias of `plaintext_password`, whose value is *stored as plaintext in state*. Prefer to use `plaintext_password` instead, which stores the password as an unsalted hash. Conflicts with `auth_plugin`.
         * 
         * @return builder
         * 
         * @deprecated
         * Please use plaintext_password instead
         * 
         */
        @Deprecated /* Please use plaintext_password instead */
        public Builder password(@Nullable Output password) {
            $.password = password;
            return this;
        }

        /**
         * @param password Deprecated alias of `plaintext_password`, whose value is *stored as plaintext in state*. Prefer to use `plaintext_password` instead, which stores the password as an unsalted hash. Conflicts with `auth_plugin`.
         * 
         * @return builder
         * 
         * @deprecated
         * Please use plaintext_password instead
         * 
         */
        @Deprecated /* Please use plaintext_password instead */
        public Builder password(String password) {
            return password(Output.of(password));
        }

        /**
         * @param plaintextPassword The password for the user. This must be provided in plain text, so the data source for it must be secured. An _unsalted_ hash of the provided password is stored in state. Conflicts with `auth_plugin`.
         * 
         * @return builder
         * 
         */
        public Builder plaintextPassword(@Nullable Output plaintextPassword) {
            $.plaintextPassword = plaintextPassword;
            return this;
        }

        /**
         * @param plaintextPassword The password for the user. This must be provided in plain text, so the data source for it must be secured. An _unsalted_ hash of the provided password is stored in state. Conflicts with `auth_plugin`.
         * 
         * @return builder
         * 
         */
        public Builder plaintextPassword(String plaintextPassword) {
            return plaintextPassword(Output.of(plaintextPassword));
        }

        /**
         * @param tlsOption An TLS-Option for the `CREATE USER` or `ALTER USER` statement. The value is suffixed to `REQUIRE`. A value of 'SSL' will generate a `CREATE USER ... REQUIRE SSL` statement. See the [MYSQL `CREATE USER` documentation](https://dev.mysql.com/doc/refman/5.7/en/create-user.html) for more. Ignored if MySQL version is under 5.7.0.
         * 
         * [ref-auth-plugins]: https://dev.mysql.com/doc/refman/5.7/en/authentication-plugins.html
         * 
         * @return builder
         * 
         */
        public Builder tlsOption(@Nullable Output tlsOption) {
            $.tlsOption = tlsOption;
            return this;
        }

        /**
         * @param tlsOption An TLS-Option for the `CREATE USER` or `ALTER USER` statement. The value is suffixed to `REQUIRE`. A value of 'SSL' will generate a `CREATE USER ... REQUIRE SSL` statement. See the [MYSQL `CREATE USER` documentation](https://dev.mysql.com/doc/refman/5.7/en/create-user.html) for more. Ignored if MySQL version is under 5.7.0.
         * 
         * [ref-auth-plugins]: https://dev.mysql.com/doc/refman/5.7/en/authentication-plugins.html
         * 
         * @return builder
         * 
         */
        public Builder tlsOption(String tlsOption) {
            return tlsOption(Output.of(tlsOption));
        }

        /**
         * @param user The name of the user.
         * 
         * @return builder
         * 
         */
        public Builder user(@Nullable Output user) {
            $.user = user;
            return this;
        }

        /**
         * @param user The name of the user.
         * 
         * @return builder
         * 
         */
        public Builder user(String user) {
            return user(Output.of(user));
        }

        public UserState build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy