Grants permissions on topics. You must create a parent topic in the console before you call this API operation.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
InstanceId | string | Yes | The ID of the ApsaraMQ for MQTT instance. | mqtt-cn-0pp12gl**** |
IdentityType | string | Yes | The identity type. Valid values: USER and CLIENT. | USER |
Identity | string | Yes | The username or client ID. | test |
PermitAction | string | Yes | The permissions that you want to add. Enumeration Value:
| PUB_SUB |
Effect | string | Yes | Specify whether to allow or deny the permissions. Enumeration Value:
| ALLOW |
Topic | string | Yes | The topic on which you want to add the permissions. Multi-level topics and wildcard characters are supported. | test/t1 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "82B9E503-F4A1-4F30-976F-C6999FF9****",
"Code": 200,
"Success": true,
"Message": "operation success."
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InstancePermissionCheckFailed | An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings. | - |
400 | InvalidParameter.%s | An error occurred while validating the parameter. The parameter may be missing or invalid. | - |
400 | Customauth.over.capacity | Over custom auth capacity. | User-defined permission quantity capacity exceeds the limit |
404 | ApiNotSupport | The specified API is not supported. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|
No change history