All Products
Search
Document Center

ApsaraMQ for RocketMQ:GetInstanceAcl

Last Updated:Jul 31, 2025

Queries information about the access control list (ACL) of an instance.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
rocketmq:GetInstanceAclget
*Acl
acs:rocketmq:{#regionId}:{#accountId}:instance/{#InstanceId}
    none
none

Request syntax

GET /instances/{instanceId}/acl/account/{username} HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
instanceIdstringYes

The instance ID.

rmq-cn-7e22ody****
usernamestringYes

The username.

abc
resourceTypestringYes

The type of the resource on which you want to grant permissions.

Valid values:

  • Group
  • Topic
Topic
resourceNamestringYes

The name of the resource on which you want to grant permissions.

test

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

requestIdstring

The request ID

AF9A8B10-C426-530F-A0DD-96320B39****
successboolean

Indicates whether the request was successful.

true
dataobject

The returned data.

regionIdstring

The region ID.

cn-hangzhou
instanceIdstring

The instance ID.

rmq-cn-7e22ody****
aclTypestring

The authentication type of the instance.

Valid values:

  • apache_acl: open source access control list (ACL)
  • default: the default account of the instance
apache_acl
usernamestring

The username.

abc
resourceTypestring

The type of the resource on which the permissions are granted.

Topic
resourceNamestring

The name of the resource on which the permissions are granted.

test
decisionstring

The decision result of the authorization.

Allow
actionsarray

The type of operations that can be performed on the resource.

actionstring

The type of operation that can be performed on the resource.

Pub
ipWhitelistsarray

The IP address whitelists.

ipWhiteliststring

The IP address whitelist. IP addresses and CIDR blocks are supported.

0.0.0.0/0
codestring

The error code.

MissingInstanceId
messagestring

The error message.

The instance cannot be found.
httpStatusCodeinteger

The response code.

200
dynamicCodestring

The dynamic error code.

xxx
dynamicMessagestring

The dynamic error message.

xxx

Examples

Sample success responses

JSONformat

{
  "requestId": "AF9A8B10-C426-530F-A0DD-96320B39****",
  "success": true,
  "data": {
    "regionId": "cn-hangzhou",
    "instanceId": "rmq-cn-7e22ody****",
    "aclType": "apache_acl",
    "username": "abc",
    "resourceType": "Topic",
    "resourceName": "test",
    "decision": "Allow",
    "actions": [
      "Pub"
    ],
    "ipWhitelists": [
      "0.0.0.0/0"
    ]
  },
  "code": "MissingInstanceId",
  "message": "The instance cannot be found.",
  "httpStatusCode": 200,
  "dynamicCode": "xxx",
  "dynamicMessage": "xxx"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history