文档

CreateGroupId - 创建 Group ID

更新时间:
一键部署

消息生产者和消费者客户端接入云消息队列 MQTT 版服务端收发消息时,需要指定Client ID,用于唯一标识一个客户端。 Client ID由两部分组成,组织形式为<GroupID>@@@<DeviceID>,DeviceID由客户端自定义,GroupID需要提前在云消息队列 MQTT 版服务端创建。

接口说明

每成功调用一次 CreateGroupId 接口,都会计算为一次消息 TPS,从而影响您的计费。详情请参见计费说明

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
GroupIdstring

您需创建的 Group ID。取值说明如下:

  • 以 "GID_" 或者 "GID-" 开头,只能包含字母、数字、连字符(-)和下划线(_),长度限制在 7~64 字符之间。
  • Group ID 一旦创建,则无法修改,详情请参见名词解释
GID_test
InstanceIdstring

创建的 Group ID 所在的实例 ID。

mqtt-cn-0pp1ldu****
说明 更多参数说明请参见公共参数服务接入点

返回参数

名称类型描述示例值
object
RequestIdstring

公共参数,每个请求的 ID 都是唯一的。

2C7D722D-0F3D-4415-A9CD-A464D82C****

示例

正常返回示例

JSON格式

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

错误码

HTTP status code错误码错误信息描述
400GroupIdAlreadyExsitedThe specified GroupId already exists. 当前Group ID已经存在。
400GroupIdAlreadyUsedByOtherUsersThe current GroupId is used by another user. Please change to a different GroupId.当前Group ID已经被其他用户占用,请更换其他名称。
400ParameterFieldCheckFailedFailed to validate the parameters. The parameters 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.实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。
400InstanceNotFoundFailed to find the instance. The instanceId may be invalid.无法找到实例。
400PermissionCheckFailedAn error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。
500CreateGroupIdErrorFailed to create GroupId. Try again later.创建Group ID请求执行失败,请稍后重试。
500InternalErrorAn error occurred while processing your request. Try again later.MQTT后端服务异常,请重试。

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
暂无变更历史
  • 本页导读 (1)
文档反馈