com.hashicorp.cdktf.ConsulBackend Maven / Gradle / Ivy
Show all versions of cdktf Show documentation
package com.hashicorp.cdktf;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.102.0 (build e354887)", date = "2024-11-11T10:07:41.849Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = com.hashicorp.cdktf.$Module.class, fqn = "cdktf.ConsulBackend")
public class ConsulBackend extends com.hashicorp.cdktf.TerraformBackend {
protected ConsulBackend(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected ConsulBackend(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public ConsulBackend(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull com.hashicorp.cdktf.ConsulBackendConfig props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* (experimental) Creates a TerraformRemoteState resource that accesses this backend.
*
* @param scope This parameter is required.
* @param name This parameter is required.
* @param _fromStack This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull com.hashicorp.cdktf.TerraformRemoteState getRemoteStateDataSource(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String name, final @org.jetbrains.annotations.NotNull java.lang.String _fromStack) {
return software.amazon.jsii.Kernel.call(this, "getRemoteStateDataSource", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.TerraformRemoteState.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(name, "name is required"), java.util.Objects.requireNonNull(_fromStack, "_fromStack is required") });
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
protected @org.jetbrains.annotations.NotNull java.util.Map synthesizeAttributes() {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "synthesizeAttributes", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class))));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
protected @org.jetbrains.annotations.NotNull java.util.Map synthesizeHclAttributes() {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "synthesizeHclAttributes", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class))));
}
/**
* (experimental) A fluent builder for {@link com.hashicorp.cdktf.ConsulBackend}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static Builder create(final software.constructs.Construct scope) {
return new Builder(scope);
}
private final software.constructs.Construct scope;
private final com.hashicorp.cdktf.ConsulBackendConfig.Builder props;
private Builder(final software.constructs.Construct scope) {
this.scope = scope;
this.props = new com.hashicorp.cdktf.ConsulBackendConfig.Builder();
}
/**
* (experimental) (Required) Access token.
*
* @return {@code this}
* @param accessToken (Required) Access token. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder accessToken(final java.lang.String accessToken) {
this.props.accessToken(accessToken);
return this;
}
/**
* (experimental) (Required) Path in the Consul KV store.
*
* @return {@code this}
* @param path (Required) Path in the Consul KV store. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder path(final java.lang.String path) {
this.props.path(path);
return this;
}
/**
* (experimental) (Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port.
*
* Defaults to the local agent HTTP listener.
*
* @return {@code this}
* @param address (Optional) DNS name and port of your Consul endpoint specified in the format dnsname:port. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder address(final java.lang.String address) {
this.props.address(address);
return this;
}
/**
* (experimental) (Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
*
* @return {@code this}
* @param caFile (Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder caFile(final java.lang.String caFile) {
this.props.caFile(caFile);
return this;
}
/**
* (experimental) (Optional) A path to a PEM-encoded certificate provided to the remote agent;
*
* requires use of key_file.
*
* @return {@code this}
* @param certFile (Optional) A path to a PEM-encoded certificate provided to the remote agent;. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder certFile(final java.lang.String certFile) {
this.props.certFile(certFile);
return this;
}
/**
* (experimental) (Optional) The datacenter to use.
*
* Defaults to that of the agent.
*
* @return {@code this}
* @param datacenter (Optional) The datacenter to use. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder datacenter(final java.lang.String datacenter) {
this.props.datacenter(datacenter);
return this;
}
/**
* (experimental) (Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed.
*
* @return {@code this}
* @param gzip (Optional) true to compress the state data using gzip, or false (the default) to leave it uncompressed. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder gzip(final java.lang.Boolean gzip) {
this.props.gzip(gzip);
return this;
}
/**
* (experimental) (Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass.
*
* @return {@code this}
* @param httpAuth (Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either user or user:pass. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder httpAuth(final java.lang.String httpAuth) {
this.props.httpAuth(httpAuth);
return this;
}
/**
* (experimental) (Optional) A path to a PEM-encoded private key, required if cert_file is specified.
*
* @return {@code this}
* @param keyFile (Optional) A path to a PEM-encoded private key, required if cert_file is specified. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder keyFile(final java.lang.String keyFile) {
this.props.keyFile(keyFile);
return this;
}
/**
* (experimental) (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.
*
* @return {@code this}
* @param lock (Optional) false to disable locking. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder lock(final java.lang.Boolean lock) {
this.props.lock(lock);
return this;
}
/**
* (experimental) (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.
*
* @return {@code this}
* @param scheme (Optional) Specifies what protocol to use when talking to the given address,either http or https. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder scheme(final java.lang.String scheme) {
this.props.scheme(scheme);
return this;
}
/**
* @return a newly built instance of {@link com.hashicorp.cdktf.ConsulBackend}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public com.hashicorp.cdktf.ConsulBackend build() {
return new com.hashicorp.cdktf.ConsulBackend(
this.scope,
this.props.build()
);
}
}
}