Stay organized with collections
Save and categorize content based on your preferences.
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
This predefined role contains
the permissions required to delete a connector. To see the exact permissions that are
required, expand the Required permissions section:
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
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Delete a connector\n\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nDeleting a connector permanently removes it from the Connect cluster. This\naction stops the flow of data between the source and target systems. Ensure you\nunderstand the implications for your data pipeline before deleting a connector.\n\nTo delete a connector in a Connect cluster, you can use the Google Cloud console,\nthe gcloud CLI, the Managed Service for Apache Kafka\nclient library, or the Managed Kafka API. You can't use the open\nsource Apache Kafka API to delete connectors.\n\nRequired roles and permissions to delete a connector\n----------------------------------------------------\n\n\nTo get the permissions that\nyou need to delete a connector,\n\nask your administrator to grant you the\n\n\n[Managed Kafka Connector Editor](/iam/docs/roles-permissions/managedkafka#managedkafka.connectorEditor) (`roles/managedkafka.connectorEditor`)\nIAM role on the project containing the Connect cluster.\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nThis predefined role contains\n\nthe permissions required to delete a connector. To see the exact permissions that are\nrequired, expand the **Required permissions** section:\n\n\n#### Required permissions\n\nThe following permissions are required to delete a connector:\n\n- Grant the delete connector permission on the requested connector: ` ``managedkafka.connectors.delete`\n- Grant the list connectors permission on the Connect cluster containing the connector. This is only required for console deletion: ` ``managedkafka.connectors.list`\n\n\nYou might also be able to get\nthese permissions\nwith [custom roles](/iam/docs/creating-custom-roles) or\nother [predefined roles](/iam/docs/roles-overview#predefined).\n\nFor more information about the **Managed Kafka Connector Editor role** , see\n[Managed Service for Apache Kafka predefined roles](/managed-service-for-apache-kafka/docs/access-control#predefined-roles).\n\nDelete a connector\n------------------\n\n### Console\n\n1. In the Google Cloud console, go to the **Connect clusters** page.\n\n [Go to Connect clusters](https://console.cloud.google.com/managedkafka/connectClusters)\n2. Click the Connect cluster that hosts the connector that you want to delete.\n\n The **Connect cluster details** page is displayed.\n3. On the **Resources** tab, find the connector in the list and click its name.\n\n You are redirected to the **Connector details** page.\n4. Click **Delete**.\n\n### gcloud\n\n1. In the Google Cloud console, activate Cloud Shell.\n\n [Activate Cloud Shell](https://console.cloud.google.com/?cloudshell=true)\n\n\n At the bottom of the Google Cloud console, a\n [Cloud Shell](/shell/docs/how-cloud-shell-works)\n session starts and displays a command-line prompt. Cloud Shell is a shell environment\n with the Google Cloud CLI\n already installed and with values already set for\n your current project. It can take a few seconds for the session to initialize.\n2. Use the [`gcloud alpha managed-kafka connectors delete`](/sdk/gcloud/reference/alpha/managed-kafka/connectors/delete) command to delete a connector:\n\n \u003cbr /\u003e\n\n ```bash\n gcloud alpha managed-kafka connectors delete CONNECTOR_ID \\\n --location=LOCATION \\\n --connect_cluster=CONNECT_CLUSTER_ID\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eCONNECTOR_ID\u003c/var\u003e: Required. The ID of the connector\n you want to delete.\n\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: Required. The location of the\n [Connect cluster](/managed-service-for-apache-kafka/docs/connect-cluster/create-connect-cluster#location)\n containing the connector.\n\n - \u003cvar translate=\"no\"\u003eCONNECT_CLUSTER_ID\u003c/var\u003e: Required. The ID of the Connect\n cluster containing the connector.\n\n \u003cbr /\u003e\n\nExample command:\n\n\u003cbr /\u003e\n\n```bash\ngcloud alpha managed-kafka connectors delete test-connector \\\n --location=us-central1 \\\n --connect_cluster=test-connect-cluster\n```\n\n\u003cbr /\u003e\n\n*Apache Kafka® is a registered\ntrademark of The Apache Software Foundation or its affiliates in the United\nStates and/or other countries.*"]]