gcloud managed-kafka connectors create (CONNECTOR : --connect-cluster=CONNECT_CLUSTER --location=LOCATION) (--config-file=JSON|YAML|FILE | --configs=[KEY=VALUE,…]) [--task-retry-disabled] [--task-restart-max-backoff=TASK_RESTART_MAX_BACKOFF --task-restart-min-backoff=TASK_RESTART_MIN_BACKOFF] [GCLOUD_WIDE_FLAG …]
gcloud managed-kafka connectors create myconnector --location=us-central1 --connect-cluster=mycluster --configs=connector.class="com.google.pubsub.kafka.source.CloudPubSubSourceConnector",cps.subscription="my-subscription",… [--task-restart-min-backoff=60s] [--task-restart-max-backoff=30m] [--task-retry-disabled=true] ORgcloud managed-kafka connectors create myconnector --location=us-central1 --connect-cluster=mycluster --config-file=my-config-file.yaml [--task-restart-min-backoff=60s] [--task-restart-max-backoff=30m] [--task-retry-disabled=true]
To set the project attribute:
connector on the command line with a fully
specified name;
--project on the command line;
core/project.
CONNECTOR
To set the connector attribute:
connector on the command line.
--connect-cluster=CONNECT_CLUSTERconnect-cluster attribute:
connector on the command line with a fully
specified name;
--connect-cluster on the command line.
--location=LOCATIONlocation attribute:
connector on the command line with a fully
specified name;
--location on the command line.
--config-file=JSON|YAML|FILEconfig_file value.
Input Example:
--config-file=string
File Example:
--config-file=path_to_file.(yaml|json)
--configs=[KEY=VALUE,…]cleanup.policy=compact,compression.type=producer.
--task-retry-disabled--task-restart-max-backoff=TASK_RESTART_MAX_BACKOFF--task-restart-min-backoff=TASK_RESTART_MIN_BACKOFF--access-token-file,
--account, --billing-project,
--configuration,
--flags-file,
--flatten, --format, --help, --impersonate-service-account,
--log-http,
--project, --quiet, --trace-token, --user-output-enabled,
--verbosity.
Run $ gcloud help for details.
managedkafka/v1 API. The full documentation
for this API can be found at: https://cloud.google.com/managed-service-for-apache-kafka/docs
gcloud alpha managed-kafka connectors creategcloud beta managed-kafka connectors create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-27 UTC.