This document describes how to delete a Managed Kafka ACL resource. Deleting an ACL removes all of the individual permission rules that are specified in the list of ACL entries.
Required roles and permissions
To get the permission that
you need to delete a Managed Kafka ACL,
ask your administrator to grant you the Managed Kafka ACL Editor
( roles/managedkafka.aclEditor
) IAM role on your project.
For more information about granting roles, see Manage access to projects, folders, and organizations
.
This predefined role contains the managedkafka.acls.delete
permission,
which is required to
delete a Managed Kafka ACL.
You might also be able to get this permission with custom roles or other predefined roles .
Delete an ACL
gcloud
Run the gcloud managed-kafka acls delete
command:
gcloud
managed-kafka
acls
delete
ACL_ID
\
--cluster =
CLUSTER_ID
\
--location =
LOCATION
Replace the following:
-
ACL_ID. The ID of the Managed Kafka ACL resource to delete. For more information, see ACL ID . -
CLUSTER_IDThe ID of your Kafka cluster. -
LOCATION: The region of your Kafka cluster.
This command permanently deletes the specified ACL resource and all the underlying Apache Kafka ACL bindings associated with its resource pattern. You are prompted to confirm the deletion.
Sample command
Run the following command to delete an ACL called topic/test-topic
:
gcloud
managed-kafka
acls
delete
topic/test-topic
\
--project =
test-project
\
--location =
us-central1
\
--cluster =
test-cluster
The following is the sample output of the command:
You
are
about
to
delete
acl
[
topic/test-topic ]
.
Do
you
want
to
continue
(
Y/n )
?
y
Deleted
acl
[
topic/test-topic ]
.
The output of the delete
command includes a confirmation prompt before
proceeding with the deletion. Upon successful deletion, a message confirms that
the ACL resource is removed.

