> ## Documentation Index
> Fetch the complete documentation index at: https://cdktn.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Java: HttpBackendConfig

> CDKTN Core API Reference for HttpBackendConfig in Java.

Stores the state using a simple REST client.

State will be fetched via GET, updated via POST, and purged with DELETE.
The method used for updating is configurable.

This backend optionally supports state locking.
When locking support is enabled it will use LOCK and UNLOCK requests providing the lock info in the body.
The endpoint should return a 423: Locked or 409: Conflict with the holding lock info when
it's already taken, 200: OK for success. Any other status will be considered an error.
The ID of the holding lock info will be added as a query parameter to state updates requests.

Read more about this backend in the Terraform docs:
[https://developer.hashicorp.com/terraform/language/settings/backends/http](https://developer.hashicorp.com/terraform/language/settings/backends/http)

## Initializer <a name="Initializer" id="cdktn.HttpBackendConfig.Initializer" />

```java theme={null}
import io.cdktn.cdktn.HttpBackendConfig;

HttpBackendConfig.builder()
    .address(java.lang.String)
//  .clientCaCertificatePem(java.lang.String)
//  .clientCertificatePem(java.lang.String)
//  .clientPrivateKeyPem(java.lang.String)
//  .lockAddress(java.lang.String)
//  .lockMethod(java.lang.String)
//  .password(java.lang.String)
//  .retryMax(java.lang.Number)
//  .retryWaitMax(java.lang.Number)
//  .retryWaitMin(java.lang.Number)
//  .skipCertVerification(java.lang.Boolean)
//  .unlockAddress(java.lang.String)
//  .unlockMethod(java.lang.String)
//  .updateMethod(java.lang.String)
//  .username(java.lang.String)
    .build();
```

## Properties <a name="Properties" id="Properties" />

| **Name**                                                                                                   | **Type**                       | **Description**                                                                                                           |
| ---------------------------------------------------------------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------- |
| <code><a href="#cdktn.HttpBackendConfig.property.address">address</a></code>                               | <code>java.lang.String</code>  | (Required) The address of the REST endpoint.                                                                              |
| <code><a href="#cdktn.HttpBackendConfig.property.clientCaCertificatePem">clientCaCertificatePem</a></code> | <code>java.lang.String</code>  | (Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication. |
| <code><a href="#cdktn.HttpBackendConfig.property.clientCertificatePem">clientCertificatePem</a></code>     | <code>java.lang.String</code>  | (Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication.     |
| <code><a href="#cdktn.HttpBackendConfig.property.clientPrivateKeyPem">clientPrivateKeyPem</a></code>       | <code>java.lang.String</code>  | (Optional) A PEM-encoded private key, required if client\_certificate\_pem is specified.                                  |
| <code><a href="#cdktn.HttpBackendConfig.property.lockAddress">lockAddress</a></code>                       | <code>java.lang.String</code>  | (Optional) The address of the lock REST endpoint.                                                                         |
| <code><a href="#cdktn.HttpBackendConfig.property.lockMethod">lockMethod</a></code>                         | <code>java.lang.String</code>  | (Optional) The HTTP method to use when locking.                                                                           |
| <code><a href="#cdktn.HttpBackendConfig.property.password">password</a></code>                             | <code>java.lang.String</code>  | (Optional) The password for HTTP basic authentication.                                                                    |
| <code><a href="#cdktn.HttpBackendConfig.property.retryMax">retryMax</a></code>                             | <code>java.lang.Number</code>  | (Optional) The number of HTTP request retries.                                                                            |
| <code><a href="#cdktn.HttpBackendConfig.property.retryWaitMax">retryWaitMax</a></code>                     | <code>java.lang.Number</code>  | (Optional) The maximum time in seconds to wait between HTTP request attempts.                                             |
| <code><a href="#cdktn.HttpBackendConfig.property.retryWaitMin">retryWaitMin</a></code>                     | <code>java.lang.Number</code>  | (Optional) The minimum time in seconds to wait between HTTP request attempts.                                             |
| <code><a href="#cdktn.HttpBackendConfig.property.skipCertVerification">skipCertVerification</a></code>     | <code>java.lang.Boolean</code> | (Optional) Whether to skip TLS verification.                                                                              |
| <code><a href="#cdktn.HttpBackendConfig.property.unlockAddress">unlockAddress</a></code>                   | <code>java.lang.String</code>  | (Optional) The address of the unlock REST endpoint.                                                                       |
| <code><a href="#cdktn.HttpBackendConfig.property.unlockMethod">unlockMethod</a></code>                     | <code>java.lang.String</code>  | (Optional) The HTTP method to use when unlocking.                                                                         |
| <code><a href="#cdktn.HttpBackendConfig.property.updateMethod">updateMethod</a></code>                     | <code>java.lang.String</code>  | (Optional) HTTP method to use when updating state.                                                                        |
| <code><a href="#cdktn.HttpBackendConfig.property.username">username</a></code>                             | <code>java.lang.String</code>  | (Optional) The username for HTTP basic authentication.                                                                    |

***

### `address`<sup>Required</sup> <a name="address" id="cdktn.HttpBackendConfig.property.address" />

```java theme={null}
public java.lang.String getAddress();
```

* *Type:* java.lang.String

(Required) The address of the REST endpoint.

***

### `clientCaCertificatePem`<sup>Optional</sup> <a name="clientCaCertificatePem" id="cdktn.HttpBackendConfig.property.clientCaCertificatePem" />

```java theme={null}
public java.lang.String getClientCaCertificatePem();
```

* *Type:* java.lang.String

(Optional) A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication.

***

### `clientCertificatePem`<sup>Optional</sup> <a name="clientCertificatePem" id="cdktn.HttpBackendConfig.property.clientCertificatePem" />

```java theme={null}
public java.lang.String getClientCertificatePem();
```

* *Type:* java.lang.String

(Optional) A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication.

***

### `clientPrivateKeyPem`<sup>Optional</sup> <a name="clientPrivateKeyPem" id="cdktn.HttpBackendConfig.property.clientPrivateKeyPem" />

```java theme={null}
public java.lang.String getClientPrivateKeyPem();
```

* *Type:* java.lang.String

(Optional) A PEM-encoded private key, required if client\_certificate\_pem is specified.

***

### `lockAddress`<sup>Optional</sup> <a name="lockAddress" id="cdktn.HttpBackendConfig.property.lockAddress" />

```java theme={null}
public java.lang.String getLockAddress();
```

* *Type:* java.lang.String

(Optional) The address of the lock REST endpoint.

Defaults to disabled.

***

### `lockMethod`<sup>Optional</sup> <a name="lockMethod" id="cdktn.HttpBackendConfig.property.lockMethod" />

```java theme={null}
public java.lang.String getLockMethod();
```

* *Type:* java.lang.String

(Optional) The HTTP method to use when locking.

Defaults to LOCK.

***

### `password`<sup>Optional</sup> <a name="password" id="cdktn.HttpBackendConfig.property.password" />

```java theme={null}
public java.lang.String getPassword();
```

* *Type:* java.lang.String

(Optional) The password for HTTP basic authentication.

***

### `retryMax`<sup>Optional</sup> <a name="retryMax" id="cdktn.HttpBackendConfig.property.retryMax" />

```java theme={null}
public java.lang.Number getRetryMax();
```

* *Type:* java.lang.Number

(Optional) The number of HTTP request retries.

Defaults to 2.

***

### `retryWaitMax`<sup>Optional</sup> <a name="retryWaitMax" id="cdktn.HttpBackendConfig.property.retryWaitMax" />

```java theme={null}
public java.lang.Number getRetryWaitMax();
```

* *Type:* java.lang.Number

(Optional) The maximum time in seconds to wait between HTTP request attempts.

Defaults to 30.

***

### `retryWaitMin`<sup>Optional</sup> <a name="retryWaitMin" id="cdktn.HttpBackendConfig.property.retryWaitMin" />

```java theme={null}
public java.lang.Number getRetryWaitMin();
```

* *Type:* java.lang.Number

(Optional) The minimum time in seconds to wait between HTTP request attempts.

Defaults to 1.

***

### `skipCertVerification`<sup>Optional</sup> <a name="skipCertVerification" id="cdktn.HttpBackendConfig.property.skipCertVerification" />

```java theme={null}
public java.lang.Boolean getSkipCertVerification();
```

* *Type:* java.lang.Boolean

(Optional) Whether to skip TLS verification.

Defaults to false.

***

### `unlockAddress`<sup>Optional</sup> <a name="unlockAddress" id="cdktn.HttpBackendConfig.property.unlockAddress" />

```java theme={null}
public java.lang.String getUnlockAddress();
```

* *Type:* java.lang.String

(Optional) The address of the unlock REST endpoint.

Defaults to disabled.

***

### `unlockMethod`<sup>Optional</sup> <a name="unlockMethod" id="cdktn.HttpBackendConfig.property.unlockMethod" />

```java theme={null}
public java.lang.String getUnlockMethod();
```

* *Type:* java.lang.String

(Optional) The HTTP method to use when unlocking.

Defaults to UNLOCK.

***

### `updateMethod`<sup>Optional</sup> <a name="updateMethod" id="cdktn.HttpBackendConfig.property.updateMethod" />

```java theme={null}
public java.lang.String getUpdateMethod();
```

* *Type:* java.lang.String

(Optional) HTTP method to use when updating state.

Defaults to POST.

***

### `username`<sup>Optional</sup> <a name="username" id="cdktn.HttpBackendConfig.property.username" />

```java theme={null}
public java.lang.String getUsername();
```

* *Type:* java.lang.String

(Optional) The username for HTTP basic authentication.

***
