Stay organized with collectionsSave and categorize content based on your preferences.
You can remove a single existing permission rule called an ACL entry from a
Managed Service for Apache Kafka ACL resource without affecting other entries in the list.
This feature is useful for revoking specific permissions incrementally.
This operation is analogous to deleting a single Apache Kafka ACL binding and
does not require aneTagfor concurrency control.
This predefined role contains
the permissions required to remove an ACL entry. To see the exact permissions that are
required, expand theRequired permissionssection:
Required permissions
The following permissions are required to remove an ACL entry:
Grant this permission on the ACL:managedkafka.acls.updateEntries
ACL_ID(required): the unique ID of the
Managed Service for Apache Kafka ACL resource from which you want to remove an
entry. This variable identifies the resource pattern from which the entry is
removed. For more information about the ACL ID, seeACL
ID.
CLUSTER_ID(required): the ID of
the cluster containing the ACL resource.
LOCATION(required): the region where the
cluster is located. For more information about the region, seeSupported
locations.
PRINCIPAL(required): the principal
user or service account of the ACL entry to remove. Use the
formatUser:{google_service_account_email}or the wildcardUser:*.
OPERATION(required): the operation type of the ACL entry
to remove. Allowed values includeALL,READ,WRITE,CREATE,DELETE,ALTER,DESCRIBE,CLUSTER_ACTION,DESCRIBE_CONFIGS,ALTER_CONFIGS, andIDEMPOTENT_WRITE.
PERMISSION_TYPE(optional, default valueALLOW): the type of permission
to remove:ALLOWorDENY.
HOST(optional, default value*): the client host of the ACL entry to
remove. For Google Cloud Managed Service for Apache Kafka, this valuemustbe set to the
wildcard'*'.
Sample command
You must specify the exact details of the ACL
entry you want to remove using the--principal,--operation,--permission-type, and--hostflags.
Run the following command to remove an ACL entry that allows a specific service
account to read from a topic namedtest-topicin the clustertest-clusterin theus-central1region. If this ACL entry
was the only one, the ACL is deleted and the response containsdeleted: True.
Otherwise, the updated ACL entry is returned.
[[["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,["# Remove an ACL entry from a Managed Kafka ACL\n\nYou can remove a single existing permission rule called an ACL entry from a\nManaged Service for Apache Kafka ACL resource without affecting other entries in the list.\nThis feature is useful for revoking specific permissions incrementally.\n\nThis operation is analogous to deleting a single Apache Kafka ACL binding and\ndoes not require an [eTag](/managed-service-for-apache-kafka/docs/kafka-acls/create-kafka-acls#etag)\nfor concurrency control.\n\nRequired roles and permissions\n------------------------------\n\n\nTo get the permissions that\nyou need to remove an ACL entry,\n\nask your administrator to grant you the\n\n\n[Managed Kafka ACL Editor](/iam/docs/roles-permissions/managedkafka#managedkafka.aclEditor) (`roles/managedkafka.aclEditor`)\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 remove an ACL entry. 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 remove an ACL entry:\n\n- Grant this permission on the ACL: ` ``managedkafka.acls.updateEntries`\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\nThe **Managed Kafka ACL Editor** (`roles/managedkafka.aclEditor`) role\ncontains the necessary permission to add or remove individual ACL entries. For\nmore details, see [Google Cloud Managed Service for Apache Kafka predefined roles](/managed-service-for-apache-kafka/docs/access-control#predefined-roles).\n\nRemove an ACL entry\n-------------------\n\n1.\n [Install](/sdk/docs/install) the Google Cloud CLI.\n\n2. If you're using an external identity provider (IdP), you must first\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n3.\n To [initialize](/sdk/docs/initializing) the gcloud CLI, run the following command:\n\n ```bash\n gcloud init\n ```\n4. Run the [`gcloud managed-kafka acls remove-acl-entry`](/sdk/gcloud/reference/managed-kafka/acls/remove-acl-entry) command:\n\n```bash\ngcloud managed-kafka acls remove-acl-entry ACL_ID \\\n --cluster=CLUSTER_ID \\\n --location=LOCATION \\\n --principal=PRINCIPAL \\\n --operation=OPERATION \\\n --permission-type=PERMISSION-TYPE \\\n --host=HOST \\\n```\n5. Replace the following:\n - \u003cvar translate=\"no\"\u003eACL_ID\u003c/var\u003e (required): the unique ID of the Managed Service for Apache Kafka ACL resource from which you want to remove an entry. This variable identifies the resource pattern from which the entry is removed. For more information about the ACL ID, see [ACL\n ID](/managed-service-for-apache-kafka/docs/kafka-acls/create-kafka-acls#acl-id).\n - \u003cvar translate=\"no\"\u003eCLUSTER_ID\u003c/var\u003e (required): the ID of the cluster containing the ACL resource.\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e (required): the region where the cluster is located. For more information about the region, see [Supported\n locations](/managed-service-for-apache-kafka/docs/locations).\n - \u003cvar translate=\"no\"\u003ePRINCIPAL\u003c/var\u003e (required): the principal user or service account of the ACL entry to remove. Use the format `User:{google_service_account_email}` or the wildcard `User:*`.\n - \u003cvar translate=\"no\"\u003eOPERATION\u003c/var\u003e (required): the operation type of the ACL entry to remove. Allowed values include `ALL`, `READ`, `WRITE`, `CREATE`, `DELETE`, `ALTER`, `DESCRIBE`, `CLUSTER_ACTION`, `DESCRIBE_CONFIGS`, `ALTER_CONFIGS`, and `IDEMPOTENT_WRITE`.\n - \u003cvar translate=\"no\"\u003ePERMISSION_TYPE\u003c/var\u003e (optional, default value \u003cvar translate=\"no\"\u003eALLOW\u003c/var\u003e): the type of permission to remove: `ALLOW` or `DENY`.\n - \u003cvar translate=\"no\"\u003eHOST\u003c/var\u003e (optional, default value \u003cvar translate=\"no\"\u003e*\u003c/var\u003e): the client host of the ACL entry to remove. For Google Cloud Managed Service for Apache Kafka, this value **must** be set to the wildcard `'*'`.\n\nSample command\n--------------\n\nYou must specify the exact details of the ACL\nentry you want to remove using the `--principal`, `--operation`,\n`--permission-type`, and `--host` flags.\n\nRun the following command to remove an ACL entry that allows a specific service\naccount to read from a topic named `test-topic` in the cluster\n`test-cluster` in the `us-central1` region. If this ACL entry\nwas the only one, the ACL is deleted and the response contains `deleted: True`.\nOtherwise, the updated ACL entry is returned. \n\n gcloud managed-kafka acls remove-acl-entry topic/test-topic \\\n --cluster=test-cluster \\\n --location=us-central1 \\\n --principal='User:service-account@test-project.iam.gserviceaccount.com' \\\n --operation=READ \\\n --permission-type=ALLOW \\\n --host='*' \\\n\nWhat's next\n-----------\n\n- [List ACLs](/managed-service-for-apache-kafka/docs/kafka-acls/list-kafka-acls)\n\n- [View an ACL](/managed-service-for-apache-kafka/docs/kafka-acls/view-kafka-acl)\n\n- [Create an ACL](/managed-service-for-apache-kafka/docs/kafka-acls/create-kafka-acls)\n\n- [Add an ACL entry](/managed-service-for-apache-kafka/docs/kafka-acls/add-acl-entry)\n\n*Apache Kafka® is a registered\ntrademark of The Apache Software Foundation or its affiliates in the United\nStates and/or other countries.*"]]