You can call this operation to delete an existing group of AliwareMQ for IoT, that is, a group ID, from the MQTT broker.

Description

This operation is for users of Enterprise Platinum Edition instances only. For more information, go to Purchase of Enterprise Platinum Edition instances.

Scenarios

You can delete the group IDs that are not used during new application iteration in the console or by calling this operation.

Request parameters

Name Type Required Description
OnsPlatform String No The source of the request. By default, the request comes from the POP platform.
PreventCache Long Yes The parameter that is used for CSRF verification, which can be set to the current system time. Unit: ms
GroupId String Yes The group ID that you want to delete.
InstanceId String Yes The ID of the MQTT instance that corresponds to the group ID you want to delete.

Response parameters

Name Type Description
RequestId String A common parameter. Each request has a unique ID.
HelpUrl String A help link.

Example

The following example shows how to delete the group ID GID_MingduanTest in the China (Hangzhou) region.

 public static void main(String []args) {
            String regionId = "cn-hangzhou";
            String accessKey = "XXXXXXXXXXXXXXXXX";
            String secretKey = "XXXXXXXXXXXXXXXXX";
            IClientProfile profile= DefaultProfile.getProfile(regionId,accessKey,secretKey);
            IAcsClient iAcsClient= new DefaultAcsClient(profile);
          OnsMqttGroupIdDeleteRequest request = new OnsMqttGroupIdDeleteRequest();
          request.setPreventCache(System.currentTimeMillis());
          request.setAcceptFormat(FormatType.JSON);
          request.setGroupId("GID_MingduanTest");
		  request.setInstanceId("aaaaa");
          try {
              OnsMqttGroupIdDeleteResponse response=iAcsClient.getAcsResponse(request);
              System.out.println(response.getRequestId());
          } catch (ServerException e) {
              e.printStackTrace();
          } catch (ClientException e) {
              e.printStackTrace();
          }
      }