Grants permissions on topics. You must create a parent topic in the console before you call this operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mq:AddCustomAuthPermission |
create |
*Instance
|
None | None |
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 to grant. |
PUB_SUB |
| Effect |
string |
Yes |
Specifies whether to allow or deny the access. |
ALLOW |
| Topic |
string |
Yes |
The topics on which to grant permissions. Multi-level topics and wildcard characters are supported. |
test/t1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The schema object. |
||
| RequestId |
string |
The request ID. |
82B9E503-F4A1-4F30-976F-C6999FF9**** |
| Code |
integer |
The HTTP status code. A value of 200 indicates a successful request. |
200 |
| Success |
boolean |
Indicates whether the request was successful. Valid values: true and false. |
True |
| Message |
string |
The error message returned. |
operation success. |
Examples
Success response
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. | |
| 404 | ApiNotSupport | The specified API is not supported. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.