Creates a group ID. Before you connect producers and consumers to an ApsaraMQ for MQTT broker to send and receive messages, you must specify a unique ID for each client for identification. A client ID is in the format of \\\<GroupID>@@@\\\<DeviceID>. In the preceding format, DeviceID is the custom ID that you specify for the client, and GroupID is the ID of the group that you create on the ApsaraMQ for MQTT broker in advance.
Operation description
Each successful call to the CreateGroupId operation increases the messaging transactions per second (TPS) by one. This affects the billing of your instance. For more information, see Billing rules.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
GroupId | string | Yes | The ID of the group that you want to create. The group ID must meet the following conventions:
| GID_test |
InstanceId | string | Yes | The ID of the ApsaraMQ for MQTT instance to which the group belongs. | mqtt-cn-0pp1ldu**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "2C7D722D-0F3D-4415-A9CD-A464D82C****"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | GroupIdAlreadyExsited | The specified GroupId already exists. |
400 | GroupIdAlreadyUsedByOtherUsers | The current GroupId is used by another user. Please change to a different GroupId. |
400 | ParameterFieldCheckFailed | Failed to validate the parameters. The parameters may be missing or invalid. |
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 | InstanceNotFound | Failed to find the instance. The instanceId may be invalid. |
400 | PermissionCheckFailed | An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings. |
500 | CreateGroupIdError | Failed to create GroupId. Try again later. |
500 | InternalError | An error occurred while processing your request. Try again later. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|