> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/c/confluent-cloud.md).

# Confluent Cloud

Confluent Cloud is a managed Apache Kafka service. OctoXLabs uses the management API to add organization users and the Kafka clusters, ksqlDB clusters and Flink compute pools of every environment to the inventory.

## Use cases

* List the Confluent Cloud users.

```
Adapters = confluent
```

* List the Confluent services (Kafka, ksqlDB, Flink) across environments.

```
Adapters = confluent
```

## Before you begin

### Network

| Source              | Destination                                                  | Port | Protocol |
| ------------------- | ------------------------------------------------------------ | ---- | -------- |
| OctoXLabs connector | Confluent Cloud management API (default api.confluent.cloud) | 443  | HTTPS    |

### Required permissions

| Scope or role                                                | Permission | Needed for                                                                |
| ------------------------------------------------------------ | ---------- | ------------------------------------------------------------------------- |
| OrganizationAdmin (service account owning the Cloud API key) | Read       | Users, environments, Kafka clusters, ksqlDB clusters, Flink compute pools |

## Create credentials in Confluent Cloud

{% stepper %}
{% step %}

### Create a service account

In the Confluent Cloud Console or with the Confluent CLI, create a service account with the **OrganizationAdmin** role.
{% endstep %}

{% step %}

### Create the Cloud API key

Create a Cloud API key owned by that service account, with **Cloud resource management** as its resource scope.

{% hint style="warning" %}
A key scoped to a Kafka cluster does not work. A Global API key cannot list users, ksqlDB clusters or Flink compute pools.
{% endhint %}
{% endstep %}

{% step %}

### Copy the key and secret

Copy the key ID and the secret.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter      | Required | Type     | Default             | Description                                                                                 |
| -------------- | -------- | -------- | ------------------- | ------------------------------------------------------------------------------------------- |
| Domain         | Yes      | Text     | api.confluent.cloud | Host of the management API, without `https://`. The same for every organization and region. |
| Api Key        | Yes      | Text     |                     | ID of the Cloud API key.                                                                    |
| Api Secret     | Yes      | Password |                     | Secret of the Cloud API key.                                                                |
| Fetch Users    | No       | Boolean  | True                | Collect organization users.                                                                 |
| Fetch Services | No       | Boolean  | True                | Collect Kafka clusters, ksqlDB clusters and Flink compute pools of every environment.       |
| Proxy          | No       | Text     |                     | Proxy in `host:port` format.                                                                |
| Timeout        | No       | Number   | 30                  | Seconds to wait for API responses.                                                          |

## Troubleshooting

| Error message                          | Cause                                        | Fix                                                                                   |
| -------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------- |
| Max retries exceeded. Status Code: ... | HTTP 429 persisted after 5 attempts.         | Wait and retry later.                                                                 |
| Confluent ... could not be read: ...   | A list of one environment could not be read. | The list is skipped and the rest is collected. Check the role of the service account. |

## Change history

{% hint style="info" %}
Available starting from version 6.9.1.
{% endhint %}
