You can call this operation to create a Message Queue for MQTT (MQTT) group ID on the specified MQTT broker.

Scenarios

This operation is only applicable to users of the Enterprise Platinum Edition.

When you launch new applications, if you need to use an MQTT client to send and receive messages after creating topics, you must first create a group ID in the console or by calling this operation.

Debugging

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

Request parameters

Parameter Type Required Example Description
Action String Yes OnsMqttGroupIdCreate

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

GroupId String Yes GID_test

The group ID that you want to create.

RegionId String Yes cn-hangzhou

The region ID of the MQTT instance to which the group you want to create belongs.

InstanceId String No post-cn-0pp12gl****

The ID of the MQTT instance to which the group ID you want to create belongs. This parameter is required for instances with separate namespaces.

Topic String No test

The parent topic that the group ID needs to subscribe to.

Response parameters

Parameter Type Example Description
RequestId String E052918F-CC0D-4FD8-948F-60E89C479E23

The ID of the request, which is a common parameter. Each request has a unique ID to facilitate troubleshooting and fault locating.

Examples

Sample request


http(s)://[Endpoint]/? Action=OnsMqttGroupIdCreate
&GroupId=GID_test
&RegionId=cn-hangzhou
&Topic=test
&InstanceId=post-cn-0pp12gl****
&<Common request parameters>

Sample success response

XML format

<OnsMqttGroupIdCreateResponse>
  <RequestId>E052918F-CC0D-4FD8-948F-60E89C479E23</RequestId>
</OnsMqttGroupIdCreateResponse>

JSON format

{
	"RequestId":"E052918F-CC0D-4FD8-948F-60E89C479E23"
}

Error codes

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