Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The error_code field will be non-zero if the was an error that prevented processing any part of the request.  If the error_code field is non-zero, the addition_response array will be empty.  Otherwise, there will be an addition_response for each addition in the AddAclsRequest.  These responses will be appear in the same order which the requests appeared.  If the request completed successfully, error_code will be 0 and error_string will be null.  If there was an error, the error_code will be non-zero and the error_string will give a detailed error message describing why the addition could not be performed.

...

DeleteAclsRequest and

...

DeleteAclsResponse

RemoveAclsRequest DeleteAclsRequest handles removing ACLs.  Principals must possess Cluster:All permissions to call RemoveAclsRequestDeleteAclsRequest, or be superuser.  Unauthorized requests will receive a ClusterAuthorizationException.


RemoveAclsRequestDeleteAclsRequest (Version: 0) => [resource_request]
resource_request => resource_type resource_name [acl_request]
 resource_type => INT8
resource_name => NULLABLE_STRING
 acl_request => principal host operation permission_type
principal => NULLABLE_STRING
host => NULLABLE_STRING
  operation => INT8
permission_type => INT8

 

RemoveAclsRequest DeleteAclsRequest receives a list of filters.  It will attempt to remove all the ACLs which match each filter.

Just like AddAclsRequest, RemoveAclsRequest DeleteAclsRequest must be sent to the controller broker.  The request is not transactional: if one addition fails, the others may proceed.  Results are reported independently for each removal.

 

RemoveAclsResponseDeleteAclsResponse (Version: 0) => error_code [filter_response]
error_code => INT16
filter_response => error_code [matching_acl]
matching_acl => error_code error_string principal host operation permission_type
error_code => INT16
error_string => NULLABLE_STRING
principal => STRING
host => STRING
operation => INT8
permission_type => INT8

...

The error_code field will be non-zero if the was an error that prevented processing any part of the request.  If the error_code field is non-zero, the addition_response array will be empty.  Otherwise, there will be a removal_response for each filter that was passed in the RemoveAclsRequestDeleteAclsRequest.

Filter responses will be appear in the same order which the filters appeared.  If the filter_response has a non-zero error_code, that means that the filter could not be applied by the server, and the matching_acl array will be empty.  Otherwise, the matching_acl array contains a list of all the ACLs that matched the filter.  Each matching_acl will have a non-zero error code and error message if it could not be removed.

...

public AddAclsResult {
public KafkaFuture<Void> all();
public Map<AclDescription, KafkaFuture<Void>> results();
}

...

AdminClient#deleteAcls

The removeAcls deleteAcls API surfaces RemoveAclsRequestDeleteAclsRequest.

RemoveAclsResult AdminClient#removeAclsAdminClient#deleteAcls(Collection<AclFilter> filters, RemoveAclsOptionsDeleteAclsOptions options);
public RemoveAclsOptionsDeleteAclsOptions 
RemoveAclsOptionsDeleteAclsOptions setTimeout(Integer timeout);
}
public RemoveAclsResultDeleteAclsResult {
public KafkaFuture<Map<AclFilter, List<AclDescription>> all();
public Map<AclFilter, List<KafkaFuture<AclDescription>>> results();
}

...