Creates an access control list (ACL) in a specific instance.
Debugging
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:
- The required resource types are displayed in bold characters.
- 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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
rocketmq:CreateInstanceAcl | create | *Instance acs:rocketmq:{#regionId}:{#accountId}:instance/{#InstanceId} |
| none |
Request syntax
POST /instances/{instanceId}/acl/account/{username} HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
instanceId | string | Yes | The instance ID. | rmq-cn-7e22ody**** |
username | string | Yes | The username of the account. | abc |
body | object | No | The request body. | |
resourceType | string | Yes | The type of the resource on which you want to grant permissions. Valid values:
| Topic |
resourceName | string | Yes | The name of the resource on which you want to grant permissions. | test |
decision | string | Yes | The decision result of the authorization. Valid values:
| Allow |
actions | string | Yes | The type of operations that can be performed on the resource. The following types of operations are supported based on the resource type:
Valid values:
| Pub |
ipWhitelists | array | No | The IP address whitelists. | |
string | No | The IP address whitelist. IP addresses and CIDR blocks are supported. | 0.0.0.0/0 |
Response parameters
Examples
Sample success responses
JSON
format
{
"requestId": "C7E8AE3A-219B-52EE-BE32-4036F5F88833",
"success": true,
"data": true,
"code": "MissingInstanceId",
"message": "Parameter instanceId is mandatory for this action .",
"httpStatusCode": 200,
"dynamicCode": "InstanceId",
"dynamicMessage": "instanceId",
"accessDeniedDetail": "xxx"
}
Error codes
For a list of error codes, visit the Service error codes.