Stay organized with collections
Save and categorize content based on your preferences.
Listing all connectors running in a Connect cluster provides an overview of the
data integrations that are configured. You can monitor the health
and status of your connectors, identify potential issues, and manage your data
flows effectively.
To list all connectors 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 list the connectors.
Required roles and permissions to list all connectors
This predefined role contains
the permissions required to list all connectors. To see the exact permissions that are
required, expand the Required permissions section:
Required permissions
The following permissions are required to list all connectors:
Grant the list connectors permission on the parent Connect cluster:
managedkafka.connectors.list
Grant the get connector details permission on the parent Connect cluster:
managedkafka.connectors.get
This view provides a quick way to monitor the status of your connectors
and identify any that require attention. You can then drill down into individual
connectors to view their details and configurations if needed.
Console
In the Google Cloud console, go to the Connect clusters page.
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.
LOCATION: Required. The location of the
Connect cluster
containing the connectors that you want to list.
CONNECT_CLUSTER_ID: Required. The ID of the Connect cluster containing the connectors you want to list.
EXPRESSION: (Optional) A Boolean filter expression to apply
to the list. If the expression evaluates to True, the item is included in
the list. For more details and examples, run gcloud topic filters.
Examples:
To list only connectors that are in the 'RUNNING' state:
--filter="state=RUNNING"
To list only 'Pub/Sub Sink' connectors:
--filter="connector_plugin='Pub/Sub Sink'"
To list connectors with a name containing 'prod':
--filter="name ~ 'prod'"
To list connectors that are either 'FAILED' or are 'Pub/Sub Source' plugins:
--filter="state=FAILED OR connector_plugin='Pub/Sub Source'"
LIMIT: (Optional) The maximum number of connectors to
display. If not specified, all connectors are listed.
PAGE_SIZE: (Optional) The number of results to display per page.
If not specified, the service determines a suitable page size.
SORT_BY: (Optional) A comma-separated list of fields to
sort by. The default sort order is ascending. To sort in descending order,
prefix the field with ~. Supported fields are likely name and state.
gcloudalphamanaged-kafkaconnectorslist\--location=us-central1\--connect_cluster=test-connect-cluster\--filter="state=RUNNING AND connector_plugin='Pub/Sub Sink'"\--limit=5
Example output:
NAME STATE CONNECTOR_PLUGIN
pubsub-sink-connector RUNNING Pub/Sub Sink
another-pubsub-sink RUNNING Pub/Sub Sink
prod-pubsub-sink RUNNING Pub/Sub Sink
Apache Kafka® is a registered
trademark of The Apache Software Foundation or its affiliates in the United
States and/or other countries.
[[["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,["# List all connectors\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\nListing all connectors running in a Connect cluster provides an overview of the\ndata integrations that are configured. You can monitor the health\nand status of your connectors, identify potential issues, and manage your data\nflows effectively.\n\nTo list all connectors 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 list the connectors.\n\nRequired roles and permissions to list all connectors\n-----------------------------------------------------\n\n\nTo get the permissions that\nyou need to list all connectors,\n\nask your administrator to grant you the\n\n\n[Managed Kafka Viewer](/iam/docs/roles-permissions/managedkafka#managedkafka.viewer) (`roles/managedkafka.viewer`)\nIAM role on your project.\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 list all connectors. 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 list all connectors:\n\n- Grant the list connectors permission on the parent Connect cluster: ` ``managedkafka.connectors.list`\n- Grant the get connector details permission on the parent Connect cluster: ` ``managedkafka.connectors.get`\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 Viewer role** ,\nsee [Managed Service for Apache Kafka predefined roles](/managed-service-for-apache-kafka/docs/access-control#predefined-roles).\n\nView all connectors\n-------------------\n\nThis view provides a quick way to monitor the status of your connectors\nand identify any that require attention. You can then drill down into individual\nconnectors to view their details and configurations if needed. \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 for which you want to list the connectors.\n\n The **Connect cluster details** page is displayed.\n3. The **Resources** tab displays a list of all connectors running in\n the cluster. The list includes the following information for each connector:\n\n - **Name**: The name of the connector.\n\n - **State**: The operational state of the connector. For example, Running, Failed.\n\n - **Connector type**: The type of connector plugin.\n\nYou can use the **Filter** option to search for specific connectors by name.\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 list`](/sdk/gcloud/reference/alpha/managed-kafka/connectors/list) command to list connectors:\n\n \u003cbr /\u003e\n\n ```bash\n gcloud alpha managed-kafka connectors list \\\n --location=LOCATION \\\n --connect_cluster=CONNECT_CLUSTER_ID\n ```\n3. To further refine the list of connectors, you can use additional flags:\n\n ```bash\n gcloud alpha managed-kafka connectors list \\\n --location=LOCATION \\\n --connect_cluster=CONNECT_CLUSTER_ID \\\n [--filter=EXPRESSION] \\\n [--limit=LIMIT] \\\n [--page-size=PAGE_SIZE] \\\n [--sort-by=SORT_BY]\n ```\n\n Replace the following:\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 connectors that you want to list.\n\n - \u003cvar translate=\"no\"\u003eCONNECT_CLUSTER_ID\u003c/var\u003e: Required. The ID of the Connect cluster containing the connectors you want to list.\n\n - \u003cvar translate=\"no\"\u003eEXPRESSION\u003c/var\u003e: (Optional) A Boolean filter expression to apply\n to the list. If the expression evaluates to `True`, the item is included in\n the list. For more details and examples, run `gcloud topic filters`.\n\n Examples:\n - To list only connectors that are in the 'RUNNING' state: \n\n ```bash\n --filter=\"state=RUNNING\"\n \n ```\n - To list only 'Pub/Sub Sink' connectors: \n\n ```bash\n --filter=\"connector_plugin='Pub/Sub Sink'\"\n \n ```\n - To list connectors with a name containing 'prod': \n\n ```bash\n --filter=\"name ~ 'prod'\"\n \n ```\n - To list connectors that are either 'FAILED' or are 'Pub/Sub Source' plugins: \n\n ```bash\n --filter=\"state=FAILED OR connector_plugin='Pub/Sub Source'\"\n \n ```\n\n \u003cbr /\u003e\n\n - \u003cvar translate=\"no\"\u003eLIMIT\u003c/var\u003e: (Optional) The maximum number of connectors to\n display. If not specified, all connectors are listed.\n\n - \u003cvar translate=\"no\"\u003ePAGE_SIZE\u003c/var\u003e: (Optional) The number of results to display per page.\n If not specified, the service determines a suitable page size.\n\n - \u003cvar translate=\"no\"\u003eSORT_BY\u003c/var\u003e: (Optional) A comma-separated list of fields to\n sort by. The default sort order is ascending. To sort in descending order,\n prefix the field with `~`. Supported fields are likely `name` and `state`.\n\nExample command with sorting:\n\n\u003cbr /\u003e\n\n```bash\ngcloud alpha managed-kafka connectors list \\\n --location=us-central1 \\\n --connect_cluster=test-connect-cluster \\\n --sort-by=~state,name\n```\n\nExample command with filtering and limiting: \n\n```bash\ngcloud alpha managed-kafka connectors list \\\n --location=us-central1 \\\n --connect_cluster=test-connect-cluster \\\n --filter=\"state=RUNNING AND connector_plugin='Pub/Sub Sink'\" \\\n --limit=5\n```\n\nExample output: \n\n```\nNAME STATE CONNECTOR_PLUGIN\npubsub-sink-connector RUNNING Pub/Sub Sink\nanother-pubsub-sink RUNNING Pub/Sub Sink\nprod-pubsub-sink RUNNING Pub/Sub Sink\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.*"]]