All Products
Search
Document Center

Message Queue for Apache Kafka:CreateAcl

Last Updated:Nov 18, 2022

Creates an access control list (ACL).

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the instance.

cn-hangzhou
InstanceIdstringYes

The ID of the instance.

alikafka_pre-cn-v0h1cng0****
UsernamestringYes

The name of the Simple Authentication and Security Layer (SASL) user.

You can use an asterisk (*) to represent all usernames.

test***
AclResourceTypestringYes

The type of the resource. Valid values:

  • Topic
  • Group
  • Cluster
  • TransactionalId
Group
AclResourceNamestringYes

The name or ID of the resource.

  • The value can be the name of a topic, consumer group, or cluster, or the ID of a transaction.
  • You can use an asterisk (*) to represent the names or IDs of all relevant resources.
X****
AclResourcePatternTypestringYes

The mode that is used to match resources. Valid values:

  • LITERAL: full-name match
  • PREFIXED: prefix match
LITERAL
AclOperationTypestringYes

The type of operation allowed by the ACL. Valid values:

  • Write: data writes.
  • Read: data reads.
  • Describe: reads of transaction IDs.
  • IdempotentWrite: idempotent data writes to clusters.
Read

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The HTTP status code returned. The HTTP status code 200 indicates that the request is successful.

200
Messagestring

The returned message.

operation success
RequestIdstring

The ID of the request.

56729737-C428-4E1B-AC68-7A8C2D5****
Successboolean

Indicates whether the request is successful.

true

Example

Normal return example

JSONFormat

{
  "Code": 200,
  "Message": "operation success",
  "RequestId": "56729737-C428-4E1B-AC68-7A8C2D5****",
  "Success": true
}

Error codes

For a list of error codes, visit the API error center.