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

com.pulumi.alicloud.polardb.ClusterEndpointArgs Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
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.alicloud.polardb;

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


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

    public static final ClusterEndpointArgs Empty = new ClusterEndpointArgs();

    /**
     * Whether the new node automatically joins the default cluster address. Valid values are `Enable`, `Disable`. When creating a new custom endpoint, default to `Disable`.
     * 
     */
    @Import(name="autoAddNewNodes")
    private @Nullable Output autoAddNewNodes;

    /**
     * @return Whether the new node automatically joins the default cluster address. Valid values are `Enable`, `Disable`. When creating a new custom endpoint, default to `Disable`.
     * 
     */
    public Optional> autoAddNewNodes() {
        return Optional.ofNullable(this.autoAddNewNodes);
    }

    /**
     * Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
     * 
     */
    @Import(name="connectionPrefix")
    private @Nullable Output connectionPrefix;

    /**
     * @return Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
     * 
     */
    public Optional> connectionPrefix() {
        return Optional.ofNullable(this.connectionPrefix);
    }

    /**
     * The Id of cluster that can run database.
     * 
     */
    @Import(name="dbClusterId", required=true)
    private Output dbClusterId;

    /**
     * @return The Id of cluster that can run database.
     * 
     */
    public Output dbClusterId() {
        return this.dbClusterId;
    }

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

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

    /**
     * The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the [description of EndpointConfig in the Request parameters table for details](https://www.alibabacloud.com/help/doc-detail/116593.htm).
     * 
     */
    @Import(name="endpointConfig")
    private @Nullable Output> endpointConfig;

    /**
     * @return The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the [description of EndpointConfig in the Request parameters table for details](https://www.alibabacloud.com/help/doc-detail/116593.htm).
     * 
     */
    public Optional>> endpointConfig() {
        return Optional.ofNullable(this.endpointConfig);
    }

    /**
     * The network type of the endpoint address.
     * 
     */
    @Import(name="netType")
    private @Nullable Output netType;

    /**
     * @return The network type of the endpoint address.
     * 
     */
    public Optional> netType() {
        return Optional.ofNullable(this.netType);
    }

    /**
     * Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
     * 
     */
    @Import(name="nodes")
    private @Nullable Output> nodes;

    /**
     * @return Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
     * 
     */
    public Optional>> nodes() {
        return Optional.ofNullable(this.nodes);
    }

    /**
     * Port of the specified endpoint. Valid values: 3000 to 5999.
     * 
     */
    @Import(name="port")
    private @Nullable Output port;

    /**
     * @return Port of the specified endpoint. Valid values: 3000 to 5999.
     * 
     */
    public Optional> port() {
        return Optional.ofNullable(this.port);
    }

    /**
     * Read or write mode. Valid values are `ReadWrite`, `ReadOnly`. When creating a new custom endpoint, default to `ReadOnly`.
     * 
     */
    @Import(name="readWriteMode")
    private @Nullable Output readWriteMode;

    /**
     * @return Read or write mode. Valid values are `ReadWrite`, `ReadOnly`. When creating a new custom endpoint, default to `ReadOnly`.
     * 
     */
    public Optional> readWriteMode() {
        return Optional.ofNullable(this.readWriteMode);
    }

    /**
     * Specifies whether automatic rotation of SSL certificates is enabled. Valid values: `Enable`,`Disable`.
     * **NOTE:** For a PolarDB for MySQL cluster, this parameter is required, and only one connection string in each endpoint can enable the ssl, for other notes, see [Configure SSL encryption](https://www.alibabacloud.com/help/doc-detail/153182.htm).
     * For a PolarDB for PostgreSQL cluster or a PolarDB-O cluster, this parameter is not required, by default, SSL encryption is enabled for all endpoints.
     * 
     */
    @Import(name="sslAutoRotate")
    private @Nullable Output sslAutoRotate;

    /**
     * @return Specifies whether automatic rotation of SSL certificates is enabled. Valid values: `Enable`,`Disable`.
     * **NOTE:** For a PolarDB for MySQL cluster, this parameter is required, and only one connection string in each endpoint can enable the ssl, for other notes, see [Configure SSL encryption](https://www.alibabacloud.com/help/doc-detail/153182.htm).
     * For a PolarDB for PostgreSQL cluster or a PolarDB-O cluster, this parameter is not required, by default, SSL encryption is enabled for all endpoints.
     * 
     */
    public Optional> sslAutoRotate() {
        return Optional.ofNullable(this.sslAutoRotate);
    }

    /**
     * Specifies how to modify the SSL encryption status. Valid values: `Disable`, `Enable`, `Update`.
     * 
     */
    @Import(name="sslEnabled")
    private @Nullable Output sslEnabled;

    /**
     * @return Specifies how to modify the SSL encryption status. Valid values: `Disable`, `Enable`, `Update`.
     * 
     */
    public Optional> sslEnabled() {
        return Optional.ofNullable(this.sslEnabled);
    }

    private ClusterEndpointArgs() {}

    private ClusterEndpointArgs(ClusterEndpointArgs $) {
        this.autoAddNewNodes = $.autoAddNewNodes;
        this.connectionPrefix = $.connectionPrefix;
        this.dbClusterId = $.dbClusterId;
        this.dbEndpointDescription = $.dbEndpointDescription;
        this.endpointConfig = $.endpointConfig;
        this.netType = $.netType;
        this.nodes = $.nodes;
        this.port = $.port;
        this.readWriteMode = $.readWriteMode;
        this.sslAutoRotate = $.sslAutoRotate;
        this.sslEnabled = $.sslEnabled;
    }

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

    public static final class Builder {
        private ClusterEndpointArgs $;

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

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

        /**
         * @param autoAddNewNodes Whether the new node automatically joins the default cluster address. Valid values are `Enable`, `Disable`. When creating a new custom endpoint, default to `Disable`.
         * 
         * @return builder
         * 
         */
        public Builder autoAddNewNodes(@Nullable Output autoAddNewNodes) {
            $.autoAddNewNodes = autoAddNewNodes;
            return this;
        }

        /**
         * @param autoAddNewNodes Whether the new node automatically joins the default cluster address. Valid values are `Enable`, `Disable`. When creating a new custom endpoint, default to `Disable`.
         * 
         * @return builder
         * 
         */
        public Builder autoAddNewNodes(String autoAddNewNodes) {
            return autoAddNewNodes(Output.of(autoAddNewNodes));
        }

        /**
         * @param connectionPrefix Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
         * 
         * @return builder
         * 
         */
        public Builder connectionPrefix(@Nullable Output connectionPrefix) {
            $.connectionPrefix = connectionPrefix;
            return this;
        }

        /**
         * @param connectionPrefix Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
         * 
         * @return builder
         * 
         */
        public Builder connectionPrefix(String connectionPrefix) {
            return connectionPrefix(Output.of(connectionPrefix));
        }

        /**
         * @param dbClusterId The Id of cluster that can run database.
         * 
         * @return builder
         * 
         */
        public Builder dbClusterId(Output dbClusterId) {
            $.dbClusterId = dbClusterId;
            return this;
        }

        /**
         * @param dbClusterId The Id of cluster that can run database.
         * 
         * @return builder
         * 
         */
        public Builder dbClusterId(String dbClusterId) {
            return dbClusterId(Output.of(dbClusterId));
        }

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

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

        /**
         * @param endpointConfig The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the [description of EndpointConfig in the Request parameters table for details](https://www.alibabacloud.com/help/doc-detail/116593.htm).
         * 
         * @return builder
         * 
         */
        public Builder endpointConfig(@Nullable Output> endpointConfig) {
            $.endpointConfig = endpointConfig;
            return this;
        }

        /**
         * @param endpointConfig The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the [description of EndpointConfig in the Request parameters table for details](https://www.alibabacloud.com/help/doc-detail/116593.htm).
         * 
         * @return builder
         * 
         */
        public Builder endpointConfig(Map endpointConfig) {
            return endpointConfig(Output.of(endpointConfig));
        }

        /**
         * @param netType The network type of the endpoint address.
         * 
         * @return builder
         * 
         */
        public Builder netType(@Nullable Output netType) {
            $.netType = netType;
            return this;
        }

        /**
         * @param netType The network type of the endpoint address.
         * 
         * @return builder
         * 
         */
        public Builder netType(String netType) {
            return netType(Output.of(netType));
        }

        /**
         * @param nodes Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
         * 
         * @return builder
         * 
         */
        public Builder nodes(@Nullable Output> nodes) {
            $.nodes = nodes;
            return this;
        }

        /**
         * @param nodes Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
         * 
         * @return builder
         * 
         */
        public Builder nodes(List nodes) {
            return nodes(Output.of(nodes));
        }

        /**
         * @param nodes Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
         * 
         * @return builder
         * 
         */
        public Builder nodes(String... nodes) {
            return nodes(List.of(nodes));
        }

        /**
         * @param port Port of the specified endpoint. Valid values: 3000 to 5999.
         * 
         * @return builder
         * 
         */
        public Builder port(@Nullable Output port) {
            $.port = port;
            return this;
        }

        /**
         * @param port Port of the specified endpoint. Valid values: 3000 to 5999.
         * 
         * @return builder
         * 
         */
        public Builder port(String port) {
            return port(Output.of(port));
        }

        /**
         * @param readWriteMode Read or write mode. Valid values are `ReadWrite`, `ReadOnly`. When creating a new custom endpoint, default to `ReadOnly`.
         * 
         * @return builder
         * 
         */
        public Builder readWriteMode(@Nullable Output readWriteMode) {
            $.readWriteMode = readWriteMode;
            return this;
        }

        /**
         * @param readWriteMode Read or write mode. Valid values are `ReadWrite`, `ReadOnly`. When creating a new custom endpoint, default to `ReadOnly`.
         * 
         * @return builder
         * 
         */
        public Builder readWriteMode(String readWriteMode) {
            return readWriteMode(Output.of(readWriteMode));
        }

        /**
         * @param sslAutoRotate Specifies whether automatic rotation of SSL certificates is enabled. Valid values: `Enable`,`Disable`.
         * **NOTE:** For a PolarDB for MySQL cluster, this parameter is required, and only one connection string in each endpoint can enable the ssl, for other notes, see [Configure SSL encryption](https://www.alibabacloud.com/help/doc-detail/153182.htm).
         * For a PolarDB for PostgreSQL cluster or a PolarDB-O cluster, this parameter is not required, by default, SSL encryption is enabled for all endpoints.
         * 
         * @return builder
         * 
         */
        public Builder sslAutoRotate(@Nullable Output sslAutoRotate) {
            $.sslAutoRotate = sslAutoRotate;
            return this;
        }

        /**
         * @param sslAutoRotate Specifies whether automatic rotation of SSL certificates is enabled. Valid values: `Enable`,`Disable`.
         * **NOTE:** For a PolarDB for MySQL cluster, this parameter is required, and only one connection string in each endpoint can enable the ssl, for other notes, see [Configure SSL encryption](https://www.alibabacloud.com/help/doc-detail/153182.htm).
         * For a PolarDB for PostgreSQL cluster or a PolarDB-O cluster, this parameter is not required, by default, SSL encryption is enabled for all endpoints.
         * 
         * @return builder
         * 
         */
        public Builder sslAutoRotate(String sslAutoRotate) {
            return sslAutoRotate(Output.of(sslAutoRotate));
        }

        /**
         * @param sslEnabled Specifies how to modify the SSL encryption status. Valid values: `Disable`, `Enable`, `Update`.
         * 
         * @return builder
         * 
         */
        public Builder sslEnabled(@Nullable Output sslEnabled) {
            $.sslEnabled = sslEnabled;
            return this;
        }

        /**
         * @param sslEnabled Specifies how to modify the SSL encryption status. Valid values: `Disable`, `Enable`, `Update`.
         * 
         * @return builder
         * 
         */
        public Builder sslEnabled(String sslEnabled) {
            return sslEnabled(Output.of(sslEnabled));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy