Delete a connector

Deleting a connector permanently removes it from the Connect cluster. This action stops the flow of data between the source and target systems. Ensure you understand the implications for your data pipeline before deleting a connector.

To delete a connector in a Connect cluster, you can use the Google Cloud console, the gcloud CLI, the Managed Service for Apache Kafka client library, or the Managed Kafka API. You can't use the open source Apache Kafka API to delete connectors.

Required roles and permissions to delete a connector

To get the permissions that you need to delete a connector, ask your administrator to grant you the Managed Kafka Connector Editor ( roles/managedkafka.connectorEditor ) IAM role on the project containing the Connect cluster. For more information about granting roles, see Manage access to projects, folders, and organizations .

This predefined role contains the permissions required to delete a connector. To see the exact permissions that are required, expand the Required permissionssection:

Required permissions

The following permissions are required to delete a connector:

  • Grant the delete connector permission on the requested connector: managedkafka.connectors.delete
  • Grant the list connectors permission on the Connect cluster containing the connector. This is only required for console deletion: managedkafka.connectors.list

You might also be able to get these permissions with custom roles or other predefined roles .

For more information about the Managed Kafka Connector Editor role, see Managed Service for Apache Kafka predefined roles .

Delete a connector

Console

  1. In the Google Cloud console, go to the Connect clusters page.

    Go to Connect clusters

  2. Click the Connect cluster that hosts the connector that you want to delete.

    The Connect cluster details page is displayed.

  3. On the Resources tab, find the connector in the list and click its name.

    You are redirected to the Connector details page.

  4. Click Delete .

gcloud

  1. In the Google Cloud console, activate Cloud Shell.

    Activate Cloud Shell

    At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.

  2. Use the gcloud alpha managed-kafka connectors delete command to delete a connector:

    gcloud  
    alpha  
    managed-kafka  
    connectors  
    delete  
     CONNECTOR_ID 
      
     \ 
      
    --location = 
     LOCATION 
      
     \ 
      
    --connect_cluster = 
     CONNECT_CLUSTER_ID 
    

    Replace the following:

    • CONNECTOR_ID : Required. The ID of the connector you want to delete.

    • LOCATION : Required. The location of the Connect cluster containing the connector.

    • CONNECT_CLUSTER_ID : Required. The ID of the Connect cluster containing the connector.

Example command:

gcloud  
alpha  
managed-kafka  
connectors  
delete  
test-connector  
 \ 
  
--location = 
us-central1  
 \ 
  
--connect_cluster = 
test-connect-cluster
Apache Kafka® is a registered trademark of The Apache Software Foundation or its affiliates in the United States and/or other countries.
Create a Mobile Website
View Site in Mobile | Classic
Share by: