Adds identity authentication information, which can be specified at the client level.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mq:AddCustomAuthIdentity |
create |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the Message Queue for MQTT instance. |
mqtt-cn-xxxx |
| Username |
string |
Yes |
The username. |
test |
| Secret |
string |
Yes |
The AccessKey secret. |
xxxxx |
| IdentityType |
string |
Yes |
The identity type. Valid values:
|
USER |
| ClientId |
string |
No |
The client ID if you set IdentityType to CLIENT. |
GID_test@@@test |
| SignMode |
string |
Yes |
The signature verification mode. ORIGIN: directly compares the password with the AccessKey secret. SIGNED: uses the HMAC_SHA1 algorithm to sign the client ID to derive a password, and then compares the password. |
SIGNED |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The schema object. |
||
| RequestId |
string |
The request ID. |
020F6A43-19E6-4B6E-B846-44EB31DF**** |
| Code |
integer |
The HTTP status code. A value of 200 indicates a successful request. |
200 |
| Success |
boolean |
Indicates whether the operation was successful. Valid values: true and false. |
True |
| Message |
string |
The message returned. |
operation success. |
Examples
Success response
JSON format
{
"RequestId": "020F6A43-19E6-4B6E-B846-44EB31DF****",
"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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.