# Redis ElastiCache database plugin HTTP API

The Redis ElastiCache database plugin is one of the supported plugins for the database secrets engine. This plugin generates static database credentials based on configured roles for the Redis ElastiCache database.

### Configure connection <a href="#configure-connection" id="configure-connection"></a>

In addition to the parameters defined by the [Database Secrets Engine](https://developer.hashicorp.com/vault/api-docs/secret/databases#configure-connection), this plugin has a number of parameters to further configure a connection.

| Method | Path                     |
| ------ | ------------------------ |
| `POST` | `/database/config/:name` |

#### Parameters <a href="#parameters" id="parameters"></a>

* [`url`](https://developer.hashicorp.com/vault/api-docs/secret/databases/rediselasticache#url) `(string: <required>)` – Specifies the primary endpoint to connect to.
* [`access_key_id`](https://developer.hashicorp.com/vault/api-docs/secret/databases/rediselasticache#access_key_id) `(string)` – Specifies the IAM `access_key_id` for Vault to use. If omitted, authentication falls back on the AWS credentials provider chain and tries to infer authentication from the environment.
* [`secret_access_key`](https://developer.hashicorp.com/vault/api-docs/secret/databases/rediselasticache#secret_access_key) `(string)` – Specifies the IAM `secret_access_key` corresponding to the given `access_key_id`. If omitted, authentication falls back on the AWS credentials provider chain and tries to infer authentication from the environment.
* [`region`](https://developer.hashicorp.com/vault/api-docs/secret/databases/rediselasticache#region) `(string)` – Specifies the AWS region where to ElastiCache cluster is provisioned. If omitted, falls back on the context from the environment.

#### Deprecated parameters <a href="#deprecated-parameters" id="deprecated-parameters"></a>

* [`username`](https://developer.hashicorp.com/vault/api-docs/secret/databases/rediselasticache#username) `(string)` – Use `access_key_id` instead, it is strictly equivalent.
* [`password`](https://developer.hashicorp.com/vault/api-docs/secret/databases/rediselasticache#password) `(string)` – Use `secret_access_key` instead, it is strictly equivalent.

#### Sample payload <a href="#sample-payload" id="sample-payload"></a>

```json
{
  "plugin_name": "redis-elasticache-database-plugin",
  "url": "primary-endpoint.my-cluster.xxx.yyy.cache.amazonaws.com:6379",
  "access_key_id": "AKI***",
  "secret_access_key": "ktriNYvULAWLzUmTGb***",
  "region": "us-east-1",
  "allowed-roles": "*"
}
```

#### Sample request <a href="#sample-request" id="sample-request"></a>

```shell-session
$ curl \
    --header "X-Vault-Token: ..." \
    --request POST \
    --data @payload.json \
    http://127.0.0.1:8200/v1/database/config/my-redis-cluster
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.enclaive.cloud/vault/api/secrets-engines/database/redis-elasticache-database-plugin-http-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
