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

com.pulumi.consul.AutopilotConfigArgs Maven / Gradle / Ivy

There is a newer version: 3.13.0-alpha.1732771629
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.consul;

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


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

    public static final AutopilotConfigArgs Empty = new AutopilotConfigArgs();

    /**
     * Whether to remove failing servers when a
     * replacement comes online. Defaults to true.
     * 
     */
    @Import(name="cleanupDeadServers")
    private @Nullable Output cleanupDeadServers;

    /**
     * @return Whether to remove failing servers when a
     * replacement comes online. Defaults to true.
     * 
     */
    public Optional> cleanupDeadServers() {
        return Optional.ofNullable(this.cleanupDeadServers);
    }

    /**
     * The datacenter to use. This overrides the agent's
     * default datacenter and the datacenter in the provider setup.
     * 
     */
    @Import(name="datacenter")
    private @Nullable Output datacenter;

    /**
     * @return The datacenter to use. This overrides the agent's
     * default datacenter and the datacenter in the provider setup.
     * 
     */
    public Optional> datacenter() {
        return Optional.ofNullable(this.datacenter);
    }

    /**
     * Whether to disable [upgrade migrations](https://www.consul.io/docs/guides/autopilot.html#redundancy-zones).
     * Defaults to false.
     * 
     */
    @Import(name="disableUpgradeMigration")
    private @Nullable Output disableUpgradeMigration;

    /**
     * @return Whether to disable [upgrade migrations](https://www.consul.io/docs/guides/autopilot.html#redundancy-zones).
     * Defaults to false.
     * 
     */
    public Optional> disableUpgradeMigration() {
        return Optional.ofNullable(this.disableUpgradeMigration);
    }

    /**
     * The time after which a server is
     * considered as unhealthy and will be removed. Defaults to `"200ms"`.
     * 
     */
    @Import(name="lastContactThreshold")
    private @Nullable Output lastContactThreshold;

    /**
     * @return The time after which a server is
     * considered as unhealthy and will be removed. Defaults to `"200ms"`.
     * 
     */
    public Optional> lastContactThreshold() {
        return Optional.ofNullable(this.lastContactThreshold);
    }

    /**
     * The maximum number of Raft log entries a
     * server can trail the leader. Defaults to 250.
     * 
     */
    @Import(name="maxTrailingLogs")
    private @Nullable Output maxTrailingLogs;

    /**
     * @return The maximum number of Raft log entries a
     * server can trail the leader. Defaults to 250.
     * 
     */
    public Optional> maxTrailingLogs() {
        return Optional.ofNullable(this.maxTrailingLogs);
    }

    /**
     * The [redundancy zone](https://www.consul.io/docs/guides/autopilot.html#redundancy-zones)
     * tag to use. Consul will try to keep one voting server by zone to take advantage
     * of isolated failure domains. Defaults to an empty string.
     * 
     */
    @Import(name="redundancyZoneTag")
    private @Nullable Output redundancyZoneTag;

    /**
     * @return The [redundancy zone](https://www.consul.io/docs/guides/autopilot.html#redundancy-zones)
     * tag to use. Consul will try to keep one voting server by zone to take advantage
     * of isolated failure domains. Defaults to an empty string.
     * 
     */
    public Optional> redundancyZoneTag() {
        return Optional.ofNullable(this.redundancyZoneTag);
    }

    /**
     * The period to wait for a server to be
     * healthy and stable before being promoted to a full, voting member. Defaults to
     * `"10s"`.
     * 
     */
    @Import(name="serverStabilizationTime")
    private @Nullable Output serverStabilizationTime;

    /**
     * @return The period to wait for a server to be
     * healthy and stable before being promoted to a full, voting member. Defaults to
     * `"10s"`.
     * 
     */
    public Optional> serverStabilizationTime() {
        return Optional.ofNullable(this.serverStabilizationTime);
    }

    /**
     * The tag to override the version information
     * used during a migration. Defaults to an empty string.
     * 
     */
    @Import(name="upgradeVersionTag")
    private @Nullable Output upgradeVersionTag;

    /**
     * @return The tag to override the version information
     * used during a migration. Defaults to an empty string.
     * 
     */
    public Optional> upgradeVersionTag() {
        return Optional.ofNullable(this.upgradeVersionTag);
    }

    private AutopilotConfigArgs() {}

    private AutopilotConfigArgs(AutopilotConfigArgs $) {
        this.cleanupDeadServers = $.cleanupDeadServers;
        this.datacenter = $.datacenter;
        this.disableUpgradeMigration = $.disableUpgradeMigration;
        this.lastContactThreshold = $.lastContactThreshold;
        this.maxTrailingLogs = $.maxTrailingLogs;
        this.redundancyZoneTag = $.redundancyZoneTag;
        this.serverStabilizationTime = $.serverStabilizationTime;
        this.upgradeVersionTag = $.upgradeVersionTag;
    }

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

    public static final class Builder {
        private AutopilotConfigArgs $;

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

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

        /**
         * @param cleanupDeadServers Whether to remove failing servers when a
         * replacement comes online. Defaults to true.
         * 
         * @return builder
         * 
         */
        public Builder cleanupDeadServers(@Nullable Output cleanupDeadServers) {
            $.cleanupDeadServers = cleanupDeadServers;
            return this;
        }

        /**
         * @param cleanupDeadServers Whether to remove failing servers when a
         * replacement comes online. Defaults to true.
         * 
         * @return builder
         * 
         */
        public Builder cleanupDeadServers(Boolean cleanupDeadServers) {
            return cleanupDeadServers(Output.of(cleanupDeadServers));
        }

        /**
         * @param datacenter The datacenter to use. This overrides the agent's
         * default datacenter and the datacenter in the provider setup.
         * 
         * @return builder
         * 
         */
        public Builder datacenter(@Nullable Output datacenter) {
            $.datacenter = datacenter;
            return this;
        }

        /**
         * @param datacenter The datacenter to use. This overrides the agent's
         * default datacenter and the datacenter in the provider setup.
         * 
         * @return builder
         * 
         */
        public Builder datacenter(String datacenter) {
            return datacenter(Output.of(datacenter));
        }

        /**
         * @param disableUpgradeMigration Whether to disable [upgrade migrations](https://www.consul.io/docs/guides/autopilot.html#redundancy-zones).
         * Defaults to false.
         * 
         * @return builder
         * 
         */
        public Builder disableUpgradeMigration(@Nullable Output disableUpgradeMigration) {
            $.disableUpgradeMigration = disableUpgradeMigration;
            return this;
        }

        /**
         * @param disableUpgradeMigration Whether to disable [upgrade migrations](https://www.consul.io/docs/guides/autopilot.html#redundancy-zones).
         * Defaults to false.
         * 
         * @return builder
         * 
         */
        public Builder disableUpgradeMigration(Boolean disableUpgradeMigration) {
            return disableUpgradeMigration(Output.of(disableUpgradeMigration));
        }

        /**
         * @param lastContactThreshold The time after which a server is
         * considered as unhealthy and will be removed. Defaults to `"200ms"`.
         * 
         * @return builder
         * 
         */
        public Builder lastContactThreshold(@Nullable Output lastContactThreshold) {
            $.lastContactThreshold = lastContactThreshold;
            return this;
        }

        /**
         * @param lastContactThreshold The time after which a server is
         * considered as unhealthy and will be removed. Defaults to `"200ms"`.
         * 
         * @return builder
         * 
         */
        public Builder lastContactThreshold(String lastContactThreshold) {
            return lastContactThreshold(Output.of(lastContactThreshold));
        }

        /**
         * @param maxTrailingLogs The maximum number of Raft log entries a
         * server can trail the leader. Defaults to 250.
         * 
         * @return builder
         * 
         */
        public Builder maxTrailingLogs(@Nullable Output maxTrailingLogs) {
            $.maxTrailingLogs = maxTrailingLogs;
            return this;
        }

        /**
         * @param maxTrailingLogs The maximum number of Raft log entries a
         * server can trail the leader. Defaults to 250.
         * 
         * @return builder
         * 
         */
        public Builder maxTrailingLogs(Integer maxTrailingLogs) {
            return maxTrailingLogs(Output.of(maxTrailingLogs));
        }

        /**
         * @param redundancyZoneTag The [redundancy zone](https://www.consul.io/docs/guides/autopilot.html#redundancy-zones)
         * tag to use. Consul will try to keep one voting server by zone to take advantage
         * of isolated failure domains. Defaults to an empty string.
         * 
         * @return builder
         * 
         */
        public Builder redundancyZoneTag(@Nullable Output redundancyZoneTag) {
            $.redundancyZoneTag = redundancyZoneTag;
            return this;
        }

        /**
         * @param redundancyZoneTag The [redundancy zone](https://www.consul.io/docs/guides/autopilot.html#redundancy-zones)
         * tag to use. Consul will try to keep one voting server by zone to take advantage
         * of isolated failure domains. Defaults to an empty string.
         * 
         * @return builder
         * 
         */
        public Builder redundancyZoneTag(String redundancyZoneTag) {
            return redundancyZoneTag(Output.of(redundancyZoneTag));
        }

        /**
         * @param serverStabilizationTime The period to wait for a server to be
         * healthy and stable before being promoted to a full, voting member. Defaults to
         * `"10s"`.
         * 
         * @return builder
         * 
         */
        public Builder serverStabilizationTime(@Nullable Output serverStabilizationTime) {
            $.serverStabilizationTime = serverStabilizationTime;
            return this;
        }

        /**
         * @param serverStabilizationTime The period to wait for a server to be
         * healthy and stable before being promoted to a full, voting member. Defaults to
         * `"10s"`.
         * 
         * @return builder
         * 
         */
        public Builder serverStabilizationTime(String serverStabilizationTime) {
            return serverStabilizationTime(Output.of(serverStabilizationTime));
        }

        /**
         * @param upgradeVersionTag The tag to override the version information
         * used during a migration. Defaults to an empty string.
         * 
         * @return builder
         * 
         */
        public Builder upgradeVersionTag(@Nullable Output upgradeVersionTag) {
            $.upgradeVersionTag = upgradeVersionTag;
            return this;
        }

        /**
         * @param upgradeVersionTag The tag to override the version information
         * used during a migration. Defaults to an empty string.
         * 
         * @return builder
         * 
         */
        public Builder upgradeVersionTag(String upgradeVersionTag) {
            return upgradeVersionTag(Output.of(upgradeVersionTag));
        }

        public AutopilotConfigArgs build() {
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy