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

com.pulumi.consul.ProviderArgs 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.consul.inputs.ProviderAuthJwtArgs;
import com.pulumi.consul.inputs.ProviderHeaderArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ProviderArgs Empty = new ProviderArgs();

    /**
     * The HTTP(S) API address of the agent to use. Defaults to "127.0.0.1:8500".
     * 
     */
    @Import(name="address")
    private @Nullable Output address;

    /**
     * @return The HTTP(S) API address of the agent to use. Defaults to "127.0.0.1:8500".
     * 
     */
    public Optional> address() {
        return Optional.ofNullable(this.address);
    }

    /**
     * Authenticates to Consul using a JWT authentication method.
     * 
     */
    @Import(name="authJwt", json=true)
    private @Nullable Output authJwt;

    /**
     * @return Authenticates to Consul using a JWT authentication method.
     * 
     */
    public Optional> authJwt() {
        return Optional.ofNullable(this.authJwt);
    }

    /**
     * A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
     * 
     */
    @Import(name="caFile")
    private @Nullable Output caFile;

    /**
     * @return A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
     * 
     */
    public Optional> caFile() {
        return Optional.ofNullable(this.caFile);
    }

    /**
     * A path to a directory of PEM-encoded certificate authority files to use to check the authenticity of client and server
     * connections. Can also be specified with the `CONSUL_CAPATH` environment variable.
     * 
     */
    @Import(name="caPath")
    private @Nullable Output caPath;

    /**
     * @return A path to a directory of PEM-encoded certificate authority files to use to check the authenticity of client and server
     * connections. Can also be specified with the `CONSUL_CAPATH` environment variable.
     * 
     */
    public Optional> caPath() {
        return Optional.ofNullable(this.caPath);
    }

    /**
     * PEM-encoded certificate authority used to verify the remote agent's certificate.
     * 
     */
    @Import(name="caPem")
    private @Nullable Output caPem;

    /**
     * @return PEM-encoded certificate authority used to verify the remote agent's certificate.
     * 
     */
    public Optional> caPem() {
        return Optional.ofNullable(this.caPem);
    }

    /**
     * A path to a PEM-encoded certificate provided to the remote agent; requires use of `key_file` or `key_pem`.
     * 
     */
    @Import(name="certFile")
    private @Nullable Output certFile;

    /**
     * @return A path to a PEM-encoded certificate provided to the remote agent; requires use of `key_file` or `key_pem`.
     * 
     */
    public Optional> certFile() {
        return Optional.ofNullable(this.certFile);
    }

    /**
     * PEM-encoded certificate provided to the remote agent; requires use of `key_file` or `key_pem`.
     * 
     */
    @Import(name="certPem")
    private @Nullable Output certPem;

    /**
     * @return PEM-encoded certificate provided to the remote agent; requires use of `key_file` or `key_pem`.
     * 
     */
    public Optional> certPem() {
        return Optional.ofNullable(this.certPem);
    }

    /**
     * The datacenter to use. Defaults to that of the agent.
     * 
     */
    @Import(name="datacenter")
    private @Nullable Output datacenter;

    /**
     * @return The datacenter to use. Defaults to that of the agent.
     * 
     */
    public Optional> datacenter() {
        return Optional.ofNullable(this.datacenter);
    }

    /**
     * A configuration block, described below, that provides additional headers to be sent along with all requests to the
     * Consul server. This block can be specified multiple times.
     * 
     */
    @Import(name="headers", json=true)
    private @Nullable Output> headers;

    /**
     * @return A configuration block, described below, that provides additional headers to be sent along with all requests to the
     * Consul server. This block can be specified multiple times.
     * 
     */
    public Optional>> headers() {
        return Optional.ofNullable(this.headers);
    }

    /**
     * HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either `user` or
     * `user:pass`. This may also be specified using the `CONSUL_HTTP_AUTH` environment variable.
     * 
     */
    @Import(name="httpAuth")
    private @Nullable Output httpAuth;

    /**
     * @return HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either `user` or
     * `user:pass`. This may also be specified using the `CONSUL_HTTP_AUTH` environment variable.
     * 
     */
    public Optional> httpAuth() {
        return Optional.ofNullable(this.httpAuth);
    }

    /**
     * Boolean value to disable SSL certificate verification; setting this value to true is not recommended for production use.
     * Only use this with scheme set to "https".
     * 
     */
    @Import(name="insecureHttps", json=true)
    private @Nullable Output insecureHttps;

    /**
     * @return Boolean value to disable SSL certificate verification; setting this value to true is not recommended for production use.
     * Only use this with scheme set to "https".
     * 
     */
    public Optional> insecureHttps() {
        return Optional.ofNullable(this.insecureHttps);
    }

    /**
     * A path to a PEM-encoded private key, required if `cert_file` or `cert_pem` is specified.
     * 
     */
    @Import(name="keyFile")
    private @Nullable Output keyFile;

    /**
     * @return A path to a PEM-encoded private key, required if `cert_file` or `cert_pem` is specified.
     * 
     */
    public Optional> keyFile() {
        return Optional.ofNullable(this.keyFile);
    }

    /**
     * PEM-encoded private key, required if `cert_file` or `cert_pem` is specified.
     * 
     */
    @Import(name="keyPem")
    private @Nullable Output keyPem;

    /**
     * @return PEM-encoded private key, required if `cert_file` or `cert_pem` is specified.
     * 
     */
    public Optional> keyPem() {
        return Optional.ofNullable(this.keyPem);
    }

    @Import(name="namespace")
    private @Nullable Output namespace;

    public Optional> namespace() {
        return Optional.ofNullable(this.namespace);
    }

    /**
     * The URL scheme of the agent to use ("http" or "https"). Defaults to "http".
     * 
     */
    @Import(name="scheme")
    private @Nullable Output scheme;

    /**
     * @return The URL scheme of the agent to use ("http" or "https"). Defaults to "http".
     * 
     */
    public Optional> scheme() {
        return Optional.ofNullable(this.scheme);
    }

    /**
     * The ACL token to use by default when making requests to the agent. Can also be specified with `CONSUL_HTTP_TOKEN` or
     * `CONSUL_TOKEN` as an environment variable.
     * 
     */
    @Import(name="token")
    private @Nullable Output token;

    /**
     * @return The ACL token to use by default when making requests to the agent. Can also be specified with `CONSUL_HTTP_TOKEN` or
     * `CONSUL_TOKEN` as an environment variable.
     * 
     */
    public Optional> token() {
        return Optional.ofNullable(this.token);
    }

    private ProviderArgs() {}

    private ProviderArgs(ProviderArgs $) {
        this.address = $.address;
        this.authJwt = $.authJwt;
        this.caFile = $.caFile;
        this.caPath = $.caPath;
        this.caPem = $.caPem;
        this.certFile = $.certFile;
        this.certPem = $.certPem;
        this.datacenter = $.datacenter;
        this.headers = $.headers;
        this.httpAuth = $.httpAuth;
        this.insecureHttps = $.insecureHttps;
        this.keyFile = $.keyFile;
        this.keyPem = $.keyPem;
        this.namespace = $.namespace;
        this.scheme = $.scheme;
        this.token = $.token;
    }

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

    public static final class Builder {
        private ProviderArgs $;

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

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

        /**
         * @param address The HTTP(S) API address of the agent to use. Defaults to "127.0.0.1:8500".
         * 
         * @return builder
         * 
         */
        public Builder address(@Nullable Output address) {
            $.address = address;
            return this;
        }

        /**
         * @param address The HTTP(S) API address of the agent to use. Defaults to "127.0.0.1:8500".
         * 
         * @return builder
         * 
         */
        public Builder address(String address) {
            return address(Output.of(address));
        }

        /**
         * @param authJwt Authenticates to Consul using a JWT authentication method.
         * 
         * @return builder
         * 
         */
        public Builder authJwt(@Nullable Output authJwt) {
            $.authJwt = authJwt;
            return this;
        }

        /**
         * @param authJwt Authenticates to Consul using a JWT authentication method.
         * 
         * @return builder
         * 
         */
        public Builder authJwt(ProviderAuthJwtArgs authJwt) {
            return authJwt(Output.of(authJwt));
        }

        /**
         * @param caFile A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
         * 
         * @return builder
         * 
         */
        public Builder caFile(@Nullable Output caFile) {
            $.caFile = caFile;
            return this;
        }

        /**
         * @param caFile A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
         * 
         * @return builder
         * 
         */
        public Builder caFile(String caFile) {
            return caFile(Output.of(caFile));
        }

        /**
         * @param caPath A path to a directory of PEM-encoded certificate authority files to use to check the authenticity of client and server
         * connections. Can also be specified with the `CONSUL_CAPATH` environment variable.
         * 
         * @return builder
         * 
         */
        public Builder caPath(@Nullable Output caPath) {
            $.caPath = caPath;
            return this;
        }

        /**
         * @param caPath A path to a directory of PEM-encoded certificate authority files to use to check the authenticity of client and server
         * connections. Can also be specified with the `CONSUL_CAPATH` environment variable.
         * 
         * @return builder
         * 
         */
        public Builder caPath(String caPath) {
            return caPath(Output.of(caPath));
        }

        /**
         * @param caPem PEM-encoded certificate authority used to verify the remote agent's certificate.
         * 
         * @return builder
         * 
         */
        public Builder caPem(@Nullable Output caPem) {
            $.caPem = caPem;
            return this;
        }

        /**
         * @param caPem PEM-encoded certificate authority used to verify the remote agent's certificate.
         * 
         * @return builder
         * 
         */
        public Builder caPem(String caPem) {
            return caPem(Output.of(caPem));
        }

        /**
         * @param certFile A path to a PEM-encoded certificate provided to the remote agent; requires use of `key_file` or `key_pem`.
         * 
         * @return builder
         * 
         */
        public Builder certFile(@Nullable Output certFile) {
            $.certFile = certFile;
            return this;
        }

        /**
         * @param certFile A path to a PEM-encoded certificate provided to the remote agent; requires use of `key_file` or `key_pem`.
         * 
         * @return builder
         * 
         */
        public Builder certFile(String certFile) {
            return certFile(Output.of(certFile));
        }

        /**
         * @param certPem PEM-encoded certificate provided to the remote agent; requires use of `key_file` or `key_pem`.
         * 
         * @return builder
         * 
         */
        public Builder certPem(@Nullable Output certPem) {
            $.certPem = certPem;
            return this;
        }

        /**
         * @param certPem PEM-encoded certificate provided to the remote agent; requires use of `key_file` or `key_pem`.
         * 
         * @return builder
         * 
         */
        public Builder certPem(String certPem) {
            return certPem(Output.of(certPem));
        }

        /**
         * @param datacenter The datacenter to use. Defaults to that of the agent.
         * 
         * @return builder
         * 
         */
        public Builder datacenter(@Nullable Output datacenter) {
            $.datacenter = datacenter;
            return this;
        }

        /**
         * @param datacenter The datacenter to use. Defaults to that of the agent.
         * 
         * @return builder
         * 
         */
        public Builder datacenter(String datacenter) {
            return datacenter(Output.of(datacenter));
        }

        /**
         * @param headers A configuration block, described below, that provides additional headers to be sent along with all requests to the
         * Consul server. This block can be specified multiple times.
         * 
         * @return builder
         * 
         */
        public Builder headers(@Nullable Output> headers) {
            $.headers = headers;
            return this;
        }

        /**
         * @param headers A configuration block, described below, that provides additional headers to be sent along with all requests to the
         * Consul server. This block can be specified multiple times.
         * 
         * @return builder
         * 
         */
        public Builder headers(List headers) {
            return headers(Output.of(headers));
        }

        /**
         * @param headers A configuration block, described below, that provides additional headers to be sent along with all requests to the
         * Consul server. This block can be specified multiple times.
         * 
         * @return builder
         * 
         */
        public Builder headers(ProviderHeaderArgs... headers) {
            return headers(List.of(headers));
        }

        /**
         * @param httpAuth HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either `user` or
         * `user:pass`. This may also be specified using the `CONSUL_HTTP_AUTH` environment variable.
         * 
         * @return builder
         * 
         */
        public Builder httpAuth(@Nullable Output httpAuth) {
            $.httpAuth = httpAuth;
            return this;
        }

        /**
         * @param httpAuth HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either `user` or
         * `user:pass`. This may also be specified using the `CONSUL_HTTP_AUTH` environment variable.
         * 
         * @return builder
         * 
         */
        public Builder httpAuth(String httpAuth) {
            return httpAuth(Output.of(httpAuth));
        }

        /**
         * @param insecureHttps Boolean value to disable SSL certificate verification; setting this value to true is not recommended for production use.
         * Only use this with scheme set to "https".
         * 
         * @return builder
         * 
         */
        public Builder insecureHttps(@Nullable Output insecureHttps) {
            $.insecureHttps = insecureHttps;
            return this;
        }

        /**
         * @param insecureHttps Boolean value to disable SSL certificate verification; setting this value to true is not recommended for production use.
         * Only use this with scheme set to "https".
         * 
         * @return builder
         * 
         */
        public Builder insecureHttps(Boolean insecureHttps) {
            return insecureHttps(Output.of(insecureHttps));
        }

        /**
         * @param keyFile A path to a PEM-encoded private key, required if `cert_file` or `cert_pem` is specified.
         * 
         * @return builder
         * 
         */
        public Builder keyFile(@Nullable Output keyFile) {
            $.keyFile = keyFile;
            return this;
        }

        /**
         * @param keyFile A path to a PEM-encoded private key, required if `cert_file` or `cert_pem` is specified.
         * 
         * @return builder
         * 
         */
        public Builder keyFile(String keyFile) {
            return keyFile(Output.of(keyFile));
        }

        /**
         * @param keyPem PEM-encoded private key, required if `cert_file` or `cert_pem` is specified.
         * 
         * @return builder
         * 
         */
        public Builder keyPem(@Nullable Output keyPem) {
            $.keyPem = keyPem;
            return this;
        }

        /**
         * @param keyPem PEM-encoded private key, required if `cert_file` or `cert_pem` is specified.
         * 
         * @return builder
         * 
         */
        public Builder keyPem(String keyPem) {
            return keyPem(Output.of(keyPem));
        }

        public Builder namespace(@Nullable Output namespace) {
            $.namespace = namespace;
            return this;
        }

        public Builder namespace(String namespace) {
            return namespace(Output.of(namespace));
        }

        /**
         * @param scheme The URL scheme of the agent to use ("http" or "https"). Defaults to "http".
         * 
         * @return builder
         * 
         */
        public Builder scheme(@Nullable Output scheme) {
            $.scheme = scheme;
            return this;
        }

        /**
         * @param scheme The URL scheme of the agent to use ("http" or "https"). Defaults to "http".
         * 
         * @return builder
         * 
         */
        public Builder scheme(String scheme) {
            return scheme(Output.of(scheme));
        }

        /**
         * @param token The ACL token to use by default when making requests to the agent. Can also be specified with `CONSUL_HTTP_TOKEN` or
         * `CONSUL_TOKEN` as an environment variable.
         * 
         * @return builder
         * 
         */
        public Builder token(@Nullable Output token) {
            $.token = token;
            return this;
        }

        /**
         * @param token The ACL token to use by default when making requests to the agent. Can also be specified with `CONSUL_HTTP_TOKEN` or
         * `CONSUL_TOKEN` as an environment variable.
         * 
         * @return builder
         * 
         */
        public Builder token(String token) {
            return token(Output.of(token));
        }

        public ProviderArgs build() {
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy