Listing Kafka Connect Configurations

List Kafka Connect configurations in the Streaming service.

To review requirements for working with Kafka Connect see Using Kafka Connect.

    1. Open the navigation menu  and select Analytics & AI. Under Messaging, select Streaming.
    2. Under Analytics, select Kafka Connect Configurations.
    3. To view the Kafka Connect configurations in a different compartment, use the Compartment filter to switch compartments.
      You must have permission to work in a compartment to see the resources in it. If you're not sure which compartment to use, contact an administrator. For more information, see Understanding Compartments.
  • Use the oci streaming admin connect-harness list command and required parameters to list Kafka Connect configurations:

    oci streaming admin connect-harness list --compartment-id <compartment_OCID>

    For example:

    oci streaming admin connect-harness list --compartment-id exampleuniqueID
    {
      "data": [
        {
          "compartment-id": "ocid1.tenancy.oc1..exampleuniqueID",
          "defined-tags": {},
          "freeform-tags": {},
          "id": "ocid1.connectharness.oc1.phx.exampleuniqueID",
          "lifecycle-state": "ACTIVE",
          "name": "MyKafkaConnectConfig",
          "time-created": "2020-08-31T17:26:09.640000+00:00"
        }
      ]
    }

    By default, getting a list of Kafka Connect configurations returns up to the first 10 configurations in the compartment.

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the ListConnectHarnesses operation to list Kafka Connect configurations.

Using the SDK for Java

The following code example shows how to list Kafka Connect harnesses using the OCI SDK for Java:

ListConnectHarnessesRequest listConnectHarnessesRequest = ListConnectHarnessesRequest.builder()
    .compartmentId(compartment) // compartment id to list all the connect harnesses.
    .lifecycleState(ConnectHarnessSummary.LifecycleState.Active)
    .build();
 
ListConnectHarnessesResponse listConnectHarnessesResponse = streamAdminClient.listConnectHarnesses(listConnectHarnessesRequest);
List<ConnectHarnessSummary> items = listConnectHarnessesResponse.getItems();

To use Kafka Connect with Streaming, you need a Kafka Connect configuration, or Kafka Connect harness. You can retrieve the OCID for a harness when you create a new harness or use an existing one. For more information, see Using Kafka Connect.