Package com.hashicorp.cdktf
Class ConsulBackendConfig.Builder
java.lang.Object
com.hashicorp.cdktf.ConsulBackendConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ConsulBackendConfig>
- Enclosing interface:
ConsulBackendConfig
@Stability(Experimental)
public static final class ConsulBackendConfig.Builder
extends Object
implements software.amazon.jsii.Builder<ConsulBackendConfig>
A builder for
ConsulBackendConfig-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccessToken(String accessToken) Sets the value ofConsulBackendConfig.getAccessToken()Sets the value ofConsulBackendConfig.getAddress()build()Builds the configured instance.Sets the value ofConsulBackendConfig.getCaFile()Sets the value ofConsulBackendConfig.getCertFile()datacenter(String datacenter) Sets the value ofConsulBackendConfig.getDatacenter()Sets the value ofConsulBackendConfig.getGzip()Sets the value ofConsulBackendConfig.getHttpAuth()Sets the value ofConsulBackendConfig.getKeyFile()Sets the value ofConsulBackendConfig.getLock()Sets the value ofConsulBackendConfig.getPath()Sets the value ofConsulBackendConfig.getScheme()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
accessToken
Sets the value ofConsulBackendConfig.getAccessToken()- Parameters:
accessToken- (Required) Access token. This parameter is required.- Returns:
this
-
path
Sets the value ofConsulBackendConfig.getPath()- Parameters:
path- (Required) Path in the Consul KV store. This parameter is required.- Returns:
this
-
address
Sets the value ofConsulBackendConfig.getAddress()- Parameters:
address- (Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port. Defaults to the local agent HTTP listener.- Returns:
this
-
caFile
Sets the value ofConsulBackendConfig.getCaFile()- Parameters:
caFile- (Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.- Returns:
this
-
certFile
Sets the value ofConsulBackendConfig.getCertFile()- Parameters:
certFile- (Optional) A path to a PEM-encoded certificate provided to the remote agent;. requires use of key_file.- Returns:
this
-
datacenter
Sets the value ofConsulBackendConfig.getDatacenter()- Parameters:
datacenter- (Optional) The datacenter to use. Defaults to that of the agent.- Returns:
this
-
gzip
Sets the value ofConsulBackendConfig.getGzip()- Parameters:
gzip- (Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed.- Returns:
this
-
httpAuth
Sets the value ofConsulBackendConfig.getHttpAuth()- Parameters:
httpAuth- (Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass.- Returns:
this
-
keyFile
Sets the value ofConsulBackendConfig.getKeyFile()- Parameters:
keyFile- (Optional) A path to a PEM-encoded private key, required if cert_file is specified.- Returns:
this
-
lock
Sets the value ofConsulBackendConfig.getLock()- Parameters:
lock- (Optional) false to disable locking. This defaults to true, but will require session permissions with Consul and at least kv write permissions on $path/.lock to perform locking.- Returns:
this
-
scheme
Sets the value ofConsulBackendConfig.getScheme()- Parameters:
scheme- (Optional) Specifies what protocol to use when talking to the given address,either http or https. SSL support can also be triggered by setting then environment variable CONSUL_HTTP_SSL to true.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ConsulBackendConfig>- Returns:
- a new instance of
ConsulBackendConfig - Throws:
NullPointerException- if any required attribute was not provided
-