Creates a group ID on a Message Queue for MQTT instance.

Note Each successful call to the CreateGroupId operation is calculated as a message transaction per second (TPS). This way, you are billed for the call. For more information, see Billing.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateGroupId

The operation that you want to perform. Set the value to CreateGroupId.

GroupId String Yes GID_test

The group ID that you want to create. The value must meet the following requirements:

  • The value must start with GID_ or GID- and can contain letters, digits, hyphens (-), and underscores (_). It must be 7 to 64 characters in length.
  • A group ID cannot be modified after it is created. For more information, see Terms.
InstanceId String Yes mqtt-cn-0pp1ldu****

The ID of the Message Queue for MQTT instance to which the group ID belongs.

RegionId String Yes cn-hangzhou

The region ID of the Message Queue for MQTT instance to which the group ID belongs.

Note For more information about these parameters, see Common parameters and Endpoints.

Response parameters

Parameter Type Example Description
RequestId String 2C7D722D-0F3D-4415-A9CD-A464D82C****

The ID of the request.

Examples

Sample requests

http(s)://onsmqtt.cn-hangzhou.aliyuncs.com/? Action=CreateGroupId
&GroupId=GID_test
&InstanceId=mqtt-cn-0pp1ldu****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<CreateGroupIdResponse>
  <RequestId>2C7D722D-0F3D-4415-A9CD-A464D82C****</RequestId>
</CreateGroupIdResponse>

JSON format

{
  "RequestId": "2C7D722D-0F3D-4415-A9CD-A464D82C****"
}

Error codes

HTTP status code Error code Error message Description
500 CreateGroupIdError Failed to create GroupId. Try again later. The error message returned because the request to create the group ID failed. Please try again.
400 GroupIdAlreadyExsited The specified GroupId already exists. The error message returned because the group ID already exists.
400 GroupIdAlreadyUsedByOtherUsers The current GroupId is used by another user. Please change to a different GroupId. The error message returned because the group ID is used by another user. Please try another group ID.
500 InternalError An error occurred while processing your request. Try again later. The error message returned because an internal error occurred to the Message Queue for MQTT instance. Please try again.
400 ParameterFieldCheckFailed Failed to validate the parameters. The parameters may be missing or invalid. The error message returned because parameter verification failed. This parameter 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. The error message returned because instance permission verification failed. Check the ownership and authorization policy of the Message Queue for MQTT instance.
400 InstanceNotFound Failed to find the instance. The instanceId may be invalid. The error message returned because the specified instance is not found.
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. The error message returned because resource permission verification failed. Check the permissions and authorization policies of the instance, topic, and group ID.

For a list of error codes, visit the API Error Center.