You can call this operation to create a Group ID.

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

ParameterTypeRequiredExampleDescription
ActionStringYesCreateGroupId

The operation that you want to perform. Value: CreateGroupId

GroupIdStringYesGID_test

The Group ID that you want to create. Valid values:

  • The name must be 7 to 64 characters in length and can contain letters, digits, hyphens (-), and underscores (_). It must start with "GID_" or "GID-".
  • A Group ID cannot be modified after it is created. For more information, see Terms.
InstanceIdStringYesmqtt-cn-0pp1ldu automatic snapshot policies *

The ID of the instance to which the Group ID belongs.

Region IDStringYescn-hangzhou

The region of the instance to which the Group ID belongs.

Note For more information about these parameters, see Common parameters and Make API requests.

Response parameters

ParameterTypeExampleDescription
RequestIdString2 C7D722 D-0F3D-4415-A9CD-A464D82C5FB4

The ID of the request, which is a common parameter. Each request has a unique ID.

Examples

Sample requests

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

Sample success responses

XML format

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

JSON format

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

Error codes

HTTP status codeErrorError messageDescription
500CreateGroupIdErrorFailed to create GroupId. Try again later.The request to create a Group ID failed. Try again later.
400GroupIdAlreadyExsitedThe specified GroupId already exists. The current Group ID already exists.
400GroupIdAlreadyUsedByOtherUsersThe current GroupId is used by another user. Please change to a different GroupId.The specified Group ID is already owned by another user.
500InternalErrorAn error occurred while processing your request. Try again later.The MQTT backend service is abnormal. Please try again.
400ParameterFieldCheckFailedFailed to validate the parameters. The parameters may be missing or invalid.The parameter verification fails. This parameter may be missing or invalid.
400InstancePermissionCheckFailedAn 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 the instance permission verification fails. Check the ownership and authorization policy of the MQTT instance.
400InstanceNotFoundFailed to find the instance. The instanceId may be invalid.Unable to find instance.
400PermissionCheckFailedAn 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 the resource permission verification failed. Check the instance, Topic, and Group ID for their permissions and authorization policies.

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