@@ -20,6 +20,18 @@ type Acl struct {
2020 Permission string `json:"permission,omitempty"`
2121}
2222
23+ // Returns a list of ACLs that match the search criteria.
24+ // Parameters:
25+ // cluster_id (string) – The Kafka cluster ID.
26+ // Query Parameters:
27+ // resource_type (string) – The ACL resource type.
28+ // resource_name (string) – The ACL resource name.
29+ // pattern_type (string) – The ACL pattern type.
30+ // principal (string) – The ACL principal.
31+ // host (string) – The ACL host.
32+ // operation (string) – The ACL operation.
33+ // permission (string) – The ACL permission.
34+ // @ref https://docs.confluent.io/platform/current/kafka-rest/api.html#get--clusters-cluster_id-acls
2335func (c * Client ) ListAcls (clusterId string ) ([]Acl , error ) {
2436 u := "/clusters/" + clusterId + "/" + aclsPath
2537 r , err := c .DoRequest ("GET" , u , nil )
@@ -39,6 +51,8 @@ func (c *Client) ListAcls(clusterId string) ([]Acl, error) {
3951 return body .Data , nil
4052}
4153
54+ // Creates an ACL.
55+ // @ref https://docs.confluent.io/platform/current/kafka-rest/api.html#post--clusters-cluster_id-acls
4256func (c * Client ) CreateAcl (clusterId string , aclConfig * Acl ) error {
4357 u := "/clusters/" + clusterId + "/" + aclsPath
4458
@@ -52,6 +66,18 @@ func (c *Client) CreateAcl(clusterId string, aclConfig *Acl) error {
5266 return nil
5367}
5468
69+ // Deletes the list of ACLs that matches the search criteria.
70+ // Parameters:
71+ // cluster_id (string) – The Kafka cluster ID.
72+ // Query Parameters:
73+ // resource_type (string) – The ACL resource type.
74+ // resource_name (string) – The ACL resource name.
75+ // pattern_type (string) – The ACL pattern type.
76+ // principal (string) – The ACL principal.
77+ // host (string) – The ACL host.
78+ // operation (string) – The ACL operation.
79+ // permission (string) – The ACL permission.
80+ // @ref https://docs.confluent.io/platform/current/kafka-rest/api.html#delete--clusters-cluster_id-acls
5581func (c * Client ) DeleteAcl (clusterId , resourceName string ) error {
5682 u := "/clusters/" + clusterId + "/" + aclsPath
5783
0 commit comments