From 1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634 Mon Sep 17 00:00:00 2001 From: Zhineng Li Date: Sun, 12 Jul 2026 17:11:17 +0800 Subject: update APIs 20260712 --- data/zh_cn/onsmqtt/2020-04-20/api-docs.php | 10073 +++++++++++---------------- 1 file changed, 4162 insertions(+), 5911 deletions(-) (limited to 'data/zh_cn/onsmqtt/2020-04-20/api-docs.php') diff --git a/data/zh_cn/onsmqtt/2020-04-20/api-docs.php b/data/zh_cn/onsmqtt/2020-04-20/api-docs.php index efbd975..3890035 100644 --- a/data/zh_cn/onsmqtt/2020-04-20/api-docs.php +++ b/data/zh_cn/onsmqtt/2020-04-20/api-docs.php @@ -1,314 +1,167 @@ '1.0', - 'info' => [ - 'style' => 'RPC', - 'product' => 'OnsMqtt', - 'version' => '2020-04-20', - ], + 'info' => ['style' => 'RPC', 'product' => 'OnsMqtt', 'version' => '2020-04-20'], 'directories' => [ [ - 'id' => 321803, - 'title' => 'Token', + 'children' => ['ApplyToken', 'QueryToken'], 'type' => 'directory', - 'children' => [ - 'ApplyToken', - 'QueryToken', - 'RevokeToken', - ], + 'title' => 'Token', + 'id' => 98709, ], [ - 'id' => 321807, - 'title' => 'Instance', + 'children' => ['CreateGroupId', 'DeleteGroupId', 'ListGroupId'], 'type' => 'directory', - 'children' => [ - 'ListInstances', - ], - ], - [ - 'id' => 321809, 'title' => 'Group ID', - 'type' => 'directory', - 'children' => [ - 'CreateGroupId', - 'DeleteGroupId', - 'ListGroupId', - ], + 'id' => 98713, ], [ - 'id' => 321813, - 'title' => '消息', + 'children' => ['SendMessage'], 'type' => 'directory', - 'children' => [ - 'SendMessage', - ], + 'title' => '消息', + 'id' => 98707, ], [ - 'id' => 321815, - 'title' => '客户端', + 'children' => ['QuerySessionByClientId', 'BatchQuerySessionByClientIds', 'CloseConnection'], 'type' => 'directory', - 'children' => [ - 'QuerySessionByClientId', - 'BatchQuerySessionByClientIds', - 'CloseConnection', - ], + 'title' => '客户端', + 'id' => 98703, ], [ - 'id' => 321819, - 'title' => '一机一密', + 'children' => ['GetDeviceCredential', 'RefreshDeviceCredential', 'RegisterDeviceCredential', 'UnRegisterDeviceCredential', 'ListDeviceCredentialClientId'], 'type' => 'directory', - 'children' => [ - 'GetDeviceCredential', - 'RefreshDeviceCredential', - 'RegisterDeviceCredential', - 'UnRegisterDeviceCredential', - 'ListDeviceCredentialClientId', - ], + 'title' => '一机一密', + 'id' => 98717, ], [ - 'id' => 321825, - 'title' => '轨迹', + 'children' => ['QueryMqttTraceDevice', 'QueryMqttTraceMessageOfClient', 'QueryMqttTraceMessagePublish', 'QueryMqttTraceMessageSubscribe'], 'type' => 'directory', - 'children' => [ - 'QueryMqttTraceDevice', - 'QueryMqttTraceMessageOfClient', - 'QueryMqttTraceMessagePublish', - 'QueryMqttTraceMessageSubscribe', - ], + 'title' => '轨迹', + 'id' => 98723, ], [ - 'id' => 321830, - 'title' => 'CA证书', + 'children' => ['RegisterCaCertificate', 'ActiveCaCertificate', 'InactivateCaCertificate', 'ListCaCertificate', 'GetCaCertificate', 'GetRegisterCode', 'DeleteCaCertificate'], 'type' => 'directory', - 'children' => [ - 'RegisterCaCertificate', - 'ActiveCaCertificate', - 'InactivateCaCertificate', - 'ListCaCertificate', - 'GetCaCertificate', - 'GetRegisterCode', - 'DeleteCaCertificate', - ], + 'title' => 'CA证书', + 'id' => 98728, ], [ - 'id' => 321838, - 'title' => '设备证书', + 'children' => ['ActiveDeviceCertificate', 'InactivateDeviceCertificate', 'ListDeviceCertificate', 'ListDeviceCertificateByCaSn', 'GetDeviceCertificate', 'DeleteDeviceCertificate'], 'type' => 'directory', - 'children' => [ - 'ActiveDeviceCertificate', - 'InactivateDeviceCertificate', - 'ListDeviceCertificate', - 'ListDeviceCertificateByCaSn', - 'GetDeviceCertificate', - 'DeleteDeviceCertificate', - ], + 'title' => '设备证书', + 'id' => 98736, ], [ - 'id' => 321845, - 'title' => '自定义权限', + 'children' => ['AddCustomAuthIdentity', 'UpdateCustomAuthIdentity', 'QueryCustomAuthIdentity', 'DeleteCustomAuthIdentity', 'AddCustomAuthPermission', 'UpdateCustomAuthPermission', 'QueryCustomAuthPermission', 'DeleteCustomAuthPermission', 'AddCustomAuthConnectBlack', 'DeleteCustomAuthConnectBlack', 'QueryCustomAuthConnectBlack'], 'type' => 'directory', - 'children' => [ - 'AddCustomAuthIdentity', - 'UpdateCustomAuthIdentity', - 'QueryCustomAuthIdentity', - 'DeleteCustomAuthIdentity', - 'AddCustomAuthPermission', - 'UpdateCustomAuthPermission', - 'QueryCustomAuthPermission', - 'DeleteCustomAuthPermission', - 'AddCustomAuthConnectBlack', - 'DeleteCustomAuthConnectBlack', - 'QueryCustomAuthConnectBlack', - ], + 'title' => '自定义权限', + 'id' => 98743, ], [ - 'id' => 321857, - 'title' => '标签', + 'children' => ['SetSniConfig', 'DisasterDowngrade', 'DisasterRecovery', 'ListInstances', 'ListTagResources', 'RevokeToken', 'TagResources', 'UntagResources'], 'type' => 'directory', - 'children' => [ - 'TagResources', - 'ListTagResources', - 'UntagResources', - ], - ], - [ - 'id' => 321861, 'title' => '其他', - 'type' => 'directory', - 'children' => [ - 'SetSniConfig', - 'DisasterDowngrade', - 'DisasterRecovery', - ], + 'id' => 98755, ], ], 'components' => [ 'schemas' => [], ], 'apis' => [ - 'ApplyToken' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'ActiveCaCertificate' => [ + 'summary' => '云消息队列 MQTT 版支持X.509证书认证,客户端可通过设备证书完成接入认证。CA证书用于为客户端签发设备证书,并验证设备证书的正确性,需要在激活状态下使用。'."\n" + .'CA证书注册后默认为激活状态,若您需要使用的CA证书被修改为未激活状态,您可以调用本接口将CA证书重新激活。', + 'methods' => ['get', 'post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'write', + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'create', + 'operationType' => 'none', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREonsQV6LXV'], ], 'parameters' => [ [ - 'name' => 'Resources', - 'in' => 'query', - 'schema' => [ - 'description' => '资源名称,即云消息队列 MQTT 版的Topic,多个Topic以逗号(,)分隔,每个Token最多运行操作100个资源。当有多个Topic时,需要按照字典顺序排序。'."\n" - .'申请Token时注册的资源参数支持MQTT通配符语法,包含加号单级通配符(+)和井号多级通配符(#)。'."\n" - ."\n" - .'例如,如果申请Token时指定**Resources**为“Topic1/+”,则客户端可以操作“Topic1/xxx”的任意Topic;如果申请Token时指定**Resources**为“Topic1/#”,则客户端可以操作“Topic1/xxx/xxx/xxx”的任意多级Topic。'."\n" - ."\n" - .'> 云消息队列 MQTT 版支持匹配子级Topic,子级Topic无需在控制台创建,直接在消息收发代码中设置即可。Topic名称中的正斜线(/)用于分隔父级Topic和各子级Topic。更多信息,请参见[基本概念](~~42420~~)。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'TopicA/+', - ], - ], - [ - 'name' => 'InstanceId', - 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。该实例ID在[控制台](https://mqtt.console.aliyun.com/)**实例详情**页面获取。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'post-cn-0pp12gl****', - ], - ], - [ - 'name' => 'ExpireTime', + 'name' => 'MqttInstanceId', 'in' => 'query', - 'schema' => [ - 'description' => 'Token失效的毫秒时间戳。允许设置的失效最小间隔是60秒,最长为30天。如果输入的取值超过30天,申请接口不会报错,但实际生效时间为30天。'."\n" - ."\n" - .'示例:如果Token的失效间隔需设置为60秒,当前的系统时间毫秒时间戳为1609434061000,那么该参数的取值需设置为**1609434121000**,即1609434061000+60x1000之和。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'docRequired' => true, - 'example' => '1609434121000', - ], + 'schema' => ['description' => 'CA证书所绑定的实例ID,即云消息队列 MQTT 版的实例ID。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-7mz2d******'], ], [ - 'name' => 'Actions', + 'name' => 'Sn', 'in' => 'query', - 'schema' => [ - 'description' => 'Token的权限类型,取值说明如下:'."\n" - .'- **R**:只有读权限,即只能订阅指定的Topic,不能向Topic生产消息。'."\n" - .'- **W**:只有写权限,即只能向指定Topic生产消息,不能订阅指定Topic。'."\n" - .'- **R,W**:同时拥有读和写的权限,即同时拥有向指定Topic生产消息或订阅指定Topic的权限。**R**和**W**之间需要用逗号(,)隔开。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'R', - ], + 'schema' => ['description' => '待激活CA证书的SN序列号,用于唯一标识一个CA证书。'."\n" + ."\n" + .'取值范围:不超过128 Byte。', 'type' => 'string', 'required' => true, 'example' => '007269004887******'], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'Token' => [ - 'description' => '服务端返回的Token值。'."\n" - ."\n" - .'> 请勿对返回的Token内容做任何长度、格式或规则的假设。以具体返回值为准。'."\n", - 'type' => 'string', - 'example' => 'LzMT+XLFl5s/YWJ/MlDz4t/Lq5HC1iGU1P28HAMaxYxn8aQbALNtml7QZKl9L9kPe6LqUb95tEVo+zUqOogs9+jZwDUSzsd4X4qaD3n2TrBEuMOqKkk1Xdrvu9VBQQvIYbz7MJWZDYC3DlW7gLEr33Cuj54iIhagtBi3epStJitsssWs7otY9zhKOSZxhr49G3d0bh35mwyP18EMvDas8UlzeSozsSrujNUqZXOGK0PEBSd+rWMGDJlCt6GFmJgm2JFY7PJwf/7OOSmUYIYFs5o/PuPpoTMF+hcVXMs+0yDukIMTOzG9m3t8k36PVrghFmnK6pC3Rt3mibjW****ng==', - ], - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的。', - 'type' => 'string', - 'example' => '31782AAF-D0CC-44C3-ABFD-1B500276****', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], + 'Sn' => ['description' => '已激活CA证书的SN序列号,用于唯一标识一个CA证书。', 'type' => 'string', 'example' => '007269004887******'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ApplyTokenOverFlow', - 'errorMessage' => 'You have applied for tokens too many times. Please try again later.', - ], - [ - 'errorCode' => 'CheckAccountInfoFailed', - 'errorMessage' => 'An error occurred while checking the account information by the STS token.', - ], - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'ParameterCheckFailed', - 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], - ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'MqttApplyCluster4InstanceFailed', 'errorMessage' => 'the instance can not find cluster.', 'description' => '该实例获取集群信息失败'], + ['errorCode' => 'FindCaBySnError', 'errorMessage' => 'Failed to find the CA by the SN. Please check sn is valid.', 'description' => 'SN不存在'], + ['errorCode' => 'MqttInstanceNotFound', 'errorMessage' => 'Specified instance is not found', 'description' => '实例不存在'], + ['errorCode' => 'SystemError', 'errorMessage' => 'system error.', 'description' => '系统错误,请重试'], ], - 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', - ], - [ - 'errorCode' => 'SystemOverFlow', - 'errorMessage' => 'An error occurred while processing your request. Please try again.', - ], + 403 => [ + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => 'ram权限检查失败'], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => ''], ], ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Token\\": \\"LzMT+XLFl5s/YWJ/MlDz4t/Lq5HC1iGU1P28HAMaxYxn8aQbALNtml7QZKl9L9kPe6LqUb95tEVo+zUqOogs9+jZwDUSzsd4X4qaD3n2TrBEuMOqKkk1Xdrvu9VBQQvIYbz7MJWZDYC3DlW7gLEr33Cuj54iIhagtBi3epStJitsssWs7otY9zhKOSZxhr49G3d0bh35mwyP18EMvDas8UlzeSozsSrujNUqZXOGK0PEBSd+rWMGDJlCt6GFmJgm2JFY7PJwf/7OOSmUYIYFs5o/PuPpoTMF+hcVXMs+0yDukIMTOzG9m3t8k36PVrghFmnK6pC3Rt3mibjW****ng==\\",\\n \\"RequestId\\": \\"31782AAF-D0CC-44C3-ABFD-1B500276****\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 31782AAF-D0CC-44C3-ABFD-1B500276****\\n LzMT+XLFl5s/YWJ/MlDz4t/Lq5HC1iGU1P28HAMaxYxn8aQbALNtml7QZKl9L9kPe6LqUb95tEVo+zUqOogs9+jZwDUSzsd4X4qaD3n2TrBEuMOqKkk1Xdrvu9VBQQvIYbz7MJWZDYC3DlW7gLEr33Cuj54iIhagtBi3epStJitsssWs7otY9zhKOSZxhr49G3d0bh35mwyP18EMvDas8UlzeSozsSrujNUqZXOGK0PEBSd+rWMGDJlCt6GFmJgm2JFY7PJwf/7OOSmUYIYFs5o/PuPpoTMF+hcVXMs+0yDukIMTOzG9m3t8k36PVrghFmnK6pC3Rt3mibjW****ng==\\n","errorExample":""}]', - 'title' => '创建临时访问 Token', - 'summary' => 'Token鉴权方式下,云消息队列 MQTT 版服务端会颁发Token(临时凭证)给客户端,客户端访问云消息队列 MQTT 版服务端时需要携带Token用于权限验证。'."\n" - .'本接口用于向云消息队列 MQTT 版申请临时Token。', - 'description' => '- 单用户请求频率限制为100次/秒。如有特殊需求,请联系云消息队列'."\n" - .' MQTT 版技术支持,钉钉群号:35228338。'."\n" - .'- 每成功调用一次**ApplyToken**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。', - 'requestParamsDescription' => ' > 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'QueryToken' => [ - 'methods' => [ - 'post', - 'get', + 'title' => '激活CA证书', + 'description' => '- 仅铂金版和专业版实例支持使用ActiveCaCertificate接口。'."\n" + .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。'."\n" + .'- ActiveCaCertificate接口仅支持对已在云消息队列 MQTT 版服务端注册的CA证书进行操作,您可以通过[ListCaCertificate](~~2604958~~)接口查询指定实例下已注册的CA证书。', + 'extraInfo' => '### 控制台操作'."\n" + .'除了调用ActiveCaCertificate接口,您还可以通过微消息队列MQTT版控制台激活CA证书。具体操作,请参见[CA证书管理](~~436873~~)。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ActiveCaCertificate'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:ActiveCaCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Sn\\": \\"007269004887******\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 007269004887******\\n","errorExample":""}]', + ], + 'ActiveDeviceCertificate' => [ + 'methods' => ['get', 'post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -317,557 +170,395 @@ 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'get', + 'operationType' => 'none', + 'riskType' => 'high', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREons0PHGX2'], ], 'parameters' => [ [ - 'name' => 'Token', + 'name' => 'MqttInstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '您需查询的Token。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'LzMT+XLFl5s/YWJ/MlDz4t/Lq5HC1iGU1P28HAMaxYxn8aQbALNtml7QZKl9L9kPe6LqUb95tEVo+zUqOogs9+jZwDUSzsd4X4qaD3n2TrBEuMOqKkk1Xdrvu9VBQQvIYbz7MJWZDYC3DlW7gLEr33Cuj54iIhagtBi3epStJitsssWs7otY9zhKOSZxhr49G3d0bh35mwyP18EMvDas8UlzeSozsSrujNUqZXOGK0PEBSd+rWMGDJlCt6GFmJgm2JFY7PJwf/7OOSmUYIYFs5o/PuPpoTMF+hcVXMs+0yDukIMTOzG9m3t8k36PVrghFmnK6pC3Rt3mibjW****ng==', - ], + 'schema' => ['description' => '设备证书所绑定的实例ID,即微消息队列MQTT版的实例ID。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-7mz2d******'], ], [ - 'name' => 'InstanceId', + 'name' => 'DeviceSn', 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。该实例ID在[控制台](https://mqtt.console.aliyun.com/)**实例详情**页面获取。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'post-cn-0pp12gl****', - ], + 'schema' => ['description' => '待激活设备证书的SN序列号,用于唯一标识一个设备证书。', 'type' => 'string', 'required' => true, 'example' => '356217374433******'], + ], + [ + 'name' => 'CaSn', + 'in' => 'query', + 'schema' => ['description' => '待激活设备证书所属的CA证书的SN序列号,用于唯一标识一个CA证书。'."\n" + ."\n" + .'取值范围:不超过128 Byte。', 'type' => 'string', 'required' => true, 'example' => '007269004887******'], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'TokenStatus' => [ - 'description' => '您所校验的Token的状态。取值说明如下:'."\n" - .'- **true**:该Token有效。'."\n" - .'- **false**:该Token无效。', - 'type' => 'boolean', - 'example' => 'true', - ], - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的。', - 'type' => 'string', - 'example' => '5C8AADD0-6A95-436D-AFA0-3405CCE3****', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], + 'DeviceSn' => ['description' => '已激活设备证书的SN序列号,用于唯一标识一个设备证书。', 'type' => 'string', 'example' => '356217374433******'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'CheckAccountInfoFailed', - 'errorMessage' => 'An error occurred while checking the account information by the STS token.', - ], - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'ParameterCheckFailed', - 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', - ], - [ - 'errorCode' => 'QueryTokenOverFlow', - 'errorMessage' => 'You have queried tokens too many times. Please try again later.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + 403 => [ + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => 'ram权限检查失败'], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => ''], ], 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', - ], - [ - 'errorCode' => 'SystemOverFlow', - 'errorMessage' => 'An error occurred while processing your request. Please try again.', - ], + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'FindDeviceBySnError', 'errorMessage' => 'Failed to find the device certificate by the SN. Please check sn is valid', 'description' => ''], + ['errorCode' => 'MqttInstanceNotFound', 'errorMessage' => 'Specified instance is not found', 'description' => ''], ], ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"TokenStatus\\": true,\\n \\"RequestId\\": \\"5C8AADD0-6A95-436D-AFA0-3405CCE3****\\"\\n}","errorExample":""},{"type":"xml","example":"\\r\\n5C8AADD0-6A95-436D-AFA0-3405CCE3****\\r\\ntrue\\r\\n","errorExample":""}]', - 'title' => '校验Token的有效性', - 'summary' => 'Token鉴权方式下,云消息队列 MQTT 版服务端会颁发Token(临时凭证)给客户端,客户端访问云消息队列 MQTT 版服务端时需要携带Token用于权限验证。'."\n" - .'Token为临时访问凭证具有一定的时效性,您可以通过本接口查询Token是否失效。', - 'description' => '- 单用户请求频率限制为100次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。'."\n" - .'- 每成功调用一次**QueryToken**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。', - 'requestParamsDescription' => '> 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'RevokeToken' => [ - 'methods' => [ - 'post', + 'title' => '激活设备证书', + 'summary' => '设备证书是由CA根证书签发给客户端设备使用的数字证书,用于客户端和服务端连接时,服务端对客户端进行安全认证。'."\n" + .'客户端设备使用设备证书进行接入认证时,服务端会根据已注册的CA证书验证设备证书是否正确,若CA证书和设备证书匹配成功,则客户端认证通过,且系统会将该设备证书自动注册到服务端中。 '."\n" + .'设备证书在服务端注册后默认为激活状态,若您需要使用的设备证书被修改为未激活状态,您可以调用本接口将设备证书重新激活。', + 'description' => '- 仅铂金版和专业版实例支持使用ActiveDeviceCertificate接口。'."\n" + .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系微消息队列MQTT版技术支持,钉钉群号:35228338。', + 'extraInfo' => '### 控制台操作'."\n" + .'除了调用ActiveDeviceCertificate接口,您还可以通过微消息队列MQTT版控制台激活设备证书。具体操作,请参见[设备证书管理](~~449435~~) 。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ActiveDeviceCertificate'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:ActiveDeviceCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"DeviceSn\\": \\"356217374433******\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 356217374433******\\n","errorExample":""}]', + ], + 'AddCustomAuthConnectBlack' => [ + 'summary' => '添加连接黑名单,禁用某个设备连接。', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'write', + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'delete', - ], + 'systemTags' => ['operationType' => 'create', 'riskType' => 'high', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'Token', - 'in' => 'query', - 'schema' => [ - 'description' => '您需要吊销的Token。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'LzMT+XLFl5s/YWJ/MlDz4t/Lq5HC1iGU1P28HAMaxYxn8aQbALNtml7QZKl9L9kPe6LqUb95tEVo+zUqOogs9+jZwDUSzsd4X4qaD3n2TrBEuMOqKkk1Xdrvu9VBQQvIYbz7MJWZDYC3DlW7gLEr33Cuj54iIhagtBi3epStJitsssWs7otY9zhKOSZxhr49G3d0bh35mwyP18EMvDas8UlzeSozsSrujNUqZXOGK0PEBSd+rWMGDJlCt6GFmJgm2JFY7PJwf/7OOSmUYIYFs5o/PuPpoTMF+hcVXMs+0yDukIMTOzG9m3t8k36PVrghFmnK6pC3Rt3mibjW****ng==', - ], + 'name' => 'InstanceId', + 'in' => 'formData', + 'schema' => ['description' => '云消息队列MQTT版实例的ID。', 'type' => 'string', 'required' => true, 'example' => 'mqtt-cn-i7m26mf****'], ], [ - 'name' => 'InstanceId', - 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。该实例ID在[控制台](https://mqtt.console.aliyun.com/)**实例详情**页面获取。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'post-cn-0pp12gl****', - ], + 'name' => 'ClientId', + 'in' => 'formData', + 'schema' => ['description' => '禁止连接的设备ClientID。', 'type' => 'string', 'required' => true, 'example' => 'GID_test@@@test'], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的。', - 'type' => 'string', - 'example' => '833EDFCB-C447-4CE3-B21F-3A4C2D1B****', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '82B9E503-F4A1-4F30-976F-C6999FF9****'], + 'Code' => ['description' => '状态码。说明 200表示成功。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Success' => ['description' => '操作是否成功。取值:true:成功。false:失败。', 'type' => 'boolean', 'example' => 'True'], + 'Message' => ['description' => '返回信息。', 'type' => 'string', 'example' => 'operation success.'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'CheckAccountInfoFailed', - 'errorMessage' => 'An error occurred while checking the account information by the STS token.', - ], - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'ParameterCheckFailed', - 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', - ], - [ - 'errorCode' => 'RevokeTokenOverFlow', - 'errorMessage' => 'You have revoked tokens too many times. Please try again later.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'Customauth.over.capacity', 'errorMessage' => 'Over custom auth capacity.', 'description' => '自定义权限数量容量超限'], ], 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], - ], - 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', - ], - [ - 'errorCode' => 'SystemOverFlow', - 'errorMessage' => 'An error occurred while processing your request. Please try again.', - ], + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], ], ], + 'staticInfo' => ['returnType' => 'synchronous'], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"833EDFCB-C447-4CE3-B21F-3A4C2D1B****\\"\\n}","errorExample":""},{"type":"xml","example":"\\r\\n833EDFCB-C447-4CE3-B21F-3A4C2D1B****\\r\\n","errorExample":""}]', - 'title' => '吊销 Token', - 'summary' => '调用RevokeToken接口吊销Token。', - 'description' => '- 单用户请求频率限制为5次/秒。请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。'."\n" - .'- 每成功调用一次**RevokeToken**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。', - 'requestParamsDescription' => '> 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'ListInstances' => [ - 'summary' => '查询实例列表。', - 'methods' => [ - 'post', - 'get', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"82B9E503-F4A1-4F30-976F-C6999FF9****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', + 'title' => '添加连接黑名单', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddCustomAuthConnectBlack'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'mq:AddCustomAuthConnectBlack', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + ], + 'AddCustomAuthIdentity' => [ + 'summary' => '添加账号身份认证信息,可以具体到客户端。', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'read', + 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'none', + 'operationType' => 'create', + 'riskType' => 'high', 'chargeType' => 'free', - 'abilityTreeCode' => '265380', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', - ], + 'abilityTreeCode' => '207003', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ [ - 'name' => 'Tags', - 'in' => 'query', - 'schema' => [ - 'description' => 'json格式的资源标签列表。', - 'type' => 'string', - 'required' => false, - 'example' => '[{"key":"test","value":"test"}]', - ], + 'name' => 'InstanceId', + 'in' => 'formData', + 'schema' => ['description' => '云消息队列 MQTT 版实例的 ID。', 'type' => 'string', 'required' => true, 'example' => 'mqtt-cn-xxxx'], + ], + [ + 'name' => 'Username', + 'in' => 'formData', + 'schema' => ['description' => '用户名。', 'type' => 'string', 'required' => true, 'example' => 'test'], + ], + [ + 'name' => 'Secret', + 'in' => 'formData', + 'schema' => ['description' => '密钥。', 'type' => 'string', 'required' => true, 'example' => 'xxxxx'], + ], + [ + 'name' => 'IdentityType', + 'in' => 'formData', + 'schema' => [ + 'description' => '身份类型。'."\n" + ."\n" + .'- USER:仅用户名。'."\n" + ."\n" + .'- CLIENT:具体到客户端。', + 'type' => 'string', + 'required' => true, + 'example' => 'USER', + 'enum' => ['USER', 'CLIENT'], + ], + ], + [ + 'name' => 'ClientId', + 'in' => 'formData', + 'schema' => ['description' => '当身份类型是CLIENT时,指定设备的ClientID。', 'type' => 'string', 'required' => false, 'example' => 'GID_test@@@test'], + ], + [ + 'name' => 'SignMode', + 'in' => 'formData', + 'schema' => [ + 'description' => '签名校验方式,ORIGIN:原始值比较,即比较password与secret,SIGNED: 对clientId进行HmacSHA1加签(使用secret,参考签名模式)验证,然后比较password。', + 'type' => 'string', + 'required' => true, + 'example' => 'SIGNED', + 'enum' => ['ORIGIN', 'SIGNED'], + ], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'description' => '返回对象。', + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '294F5B26-FADF-41D0-BE68-14ABE4EB****', - ], - 'Code' => [ - 'description' => '响应code。', - 'type' => 'string', - 'example' => '200', - ], - 'Message' => [ - 'description' => '信息。', - 'type' => 'string', - 'example' => 'operation success.', - ], - 'Success' => [ - 'description' => '请求是否成功。', - 'type' => 'string', - 'example' => 'true', - ], - 'Instances' => [ - 'description' => '实例列表。', - 'type' => 'array', - 'items' => [ - 'description' => '实例对象。', - 'type' => 'object', - 'properties' => [ - 'InstanceId' => [ - 'description' => '实例Id', - 'type' => 'string', - 'example' => 'mqtt-cn-xxxxxxx', - ], - 'InstanceName' => [ - 'description' => '实例名称。', - 'type' => 'string', - 'example' => 'mqtt-cn-xxxxxxx', - ], - 'InstanceStatus' => [ - 'description' => '实例状态。'."\n" - .'- 0:准备中。'."\n" - .'- 5:服务中。'."\n" - .'- 7:升级中。'."\n" - .'- 15:冻结中。'."\n" - .'- 10:已释放。'."\n" - .'- 1:未开通。'."\n" - .'- 2:欠费。'."\n" - .'- 3:欠费超期。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '5', - ], - 'InstanceType' => [ - 'description' => '实例类型:'."\n" - .'- 0:基础版。'."\n" - .'- 1:铂金版。'."\n" - .'- 2:按量付费。'."\n" - .'- 3:预付费轻量实例。'."\n" - .'- 4:专业版。'."\n" - .'- 5:Serverless 版。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '4', - ], - 'Specific' => [ - 'description' => '专业版实例规格。', - 'type' => 'string', - 'example' => 'mqtt.p2.1xlarge', - ], - 'RegionId' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'example' => 'cn-shenzhen', - ], - 'CreateTime' => [ - 'description' => '实例的创建时间。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1739345768000', - ], - 'ExpireTime' => [ - 'description' => '实例到期时间。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1741795200000', - ], - 'KernelVersion' => [ - 'description' => '内核版本', - 'type' => 'string', - 'example' => 'V3.3.0', - ], - 'MqttTags' => [ - 'description' => '标签列表。', - 'type' => 'array', - 'items' => [ - 'description' => '标签对象。', - 'type' => 'object', - 'properties' => [ - 'TagKey' => [ - 'description' => '标签键。', - 'type' => 'string', - 'example' => 'test', - ], - 'TagValue' => [ - 'description' => '标签值。', - 'type' => 'string', - 'example' => 'test', - ], - ], - ], - ], - 'OrderId' => [ - 'description' => '订单id。', - 'type' => 'string', - 'example' => '245949616640095', - ], - ], - ], - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], + 'Code' => ['description' => '状态码。说明 200表示成功。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], + 'Message' => ['description' => '返回信息。', 'type' => 'string', 'example' => 'operation success.'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], - [ - 'errorCode' => 'ServiceUnable', - 'errorMessage' => 'The current user has not activated the ONS service. Please activate the service first.', - ], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'Customauth.over.capacity', 'errorMessage' => 'Over custom auth capacity.', 'description' => '自定义权限数量容量超限'], ], - 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', - ], + 404 => [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"294F5B26-FADF-41D0-BE68-14ABE4EB****\\",\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"operation success.\\",\\n \\"Success\\": \\"true\\",\\n \\"Instances\\": [\\n {\\n \\"InstanceId\\": \\"mqtt-cn-xxxxxxx\\",\\n \\"InstanceName\\": \\"mqtt-cn-xxxxxxx\\",\\n \\"InstanceStatus\\": 5,\\n \\"InstanceType\\": 4,\\n \\"Specific\\": \\"mqtt.p2.1xlarge\\",\\n \\"RegionId\\": \\"cn-shenzhen\\",\\n \\"CreateTime\\": 1739345768000,\\n \\"ExpireTime\\": 1741795200000,\\n \\"KernelVersion\\": \\"V3.3.0\\",\\n \\"MqttTags\\": [\\n {\\n \\"TagKey\\": \\"test\\",\\n \\"TagValue\\": \\"test\\"\\n }\\n ],\\n \\"OrderId\\": \\"245949616640095\\"\\n }\\n ]\\n}","type":"json"}]', - 'title' => '查询实例列表', - ], - 'CreateGroupId' => [ - 'summary' => '消息生产者和消费者客户端接入云消息队列 MQTT 版服务端收发消息时,需要指定Client ID,用于唯一标识一个客户端。'."\n" - .'Client ID由两部分组成,组织形式为@@@,DeviceID由客户端自定义,GroupID需要提前在云消息队列 MQTT 版服务端创建。', - 'methods' => [ - 'post', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', + 'title' => '添加身份认证', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddCustomAuthIdentity'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'mq:AddCustomAuthIdentity', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + ], + 'AddCustomAuthPermission' => [ + 'summary' => '添加Topic资源授权信息,且需要在控制台提前创建一级Topic。', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'write', + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'create', - 'riskType' => 'none', - 'chargeType' => 'free', - 'abilityTreeCode' => '84611', - 'abilityTreeNodes' => [ - 'FEATUREons4L127M', - ], - ], + 'systemTags' => ['operationType' => 'create', 'riskType' => 'high', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'GroupId', - 'in' => 'query', + 'name' => 'InstanceId', + 'in' => 'formData', + 'schema' => ['description' => '消息队列MQTT版实例的ID。', 'type' => 'string', 'required' => true, 'example' => 'mqtt-cn-0pp12gl****'], + ], + [ + 'name' => 'IdentityType', + 'in' => 'formData', 'schema' => [ - 'description' => '您需创建的Group ID。取值说明如下:'."\n" - ."\n" - .'- 以 "GID_" 或者 "GID-" 开头,只能包含字母、数字、连字符(-)和下划线(_),长度限制在 7~64 字符之间。'."\n" - .'- Group ID 一旦创建,则无法修改,详情请参见[名词解释](~~42420~~)。', + 'description' => '身份类型,USER: 仅用户名,CLIENT: 具体到客户端', 'type' => 'string', 'required' => true, - 'docRequired' => true, - 'example' => 'GID_test', + 'example' => 'USER', + 'enum' => ['USER', 'CLIENT'], ], ], [ - 'name' => 'InstanceId', - 'in' => 'query', + 'name' => 'Identity', + 'in' => 'formData', + 'schema' => ['description' => '用户名或客户端ID。', 'type' => 'string', 'required' => true, 'example' => 'test'], + ], + [ + 'name' => 'PermitAction', + 'in' => 'formData', 'schema' => [ - 'description' => '创建的Group ID所在的实例ID。', + 'description' => '授权操作。', 'type' => 'string', 'required' => true, - 'docRequired' => true, - 'example' => 'mqtt-cn-0pp1ldu****', + 'example' => 'PUB_SUB', + 'enum' => ['PUB', 'SUB', 'PUB_SUB'], ], ], [ - 'name' => 'Tag', - 'in' => 'query', - 'style' => 'repeatList', + 'name' => 'Effect', + 'in' => 'formData', 'schema' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'Key' => [ - 'type' => 'string', - 'required' => false, - ], - 'Value' => [ - 'type' => 'string', - 'required' => false, - ], - ], - 'required' => false, - ], - 'required' => false, - 'maxItems' => 100, + 'description' => '允许或拒绝。', + 'type' => 'string', + 'required' => true, + 'example' => 'ALLOW', + 'enum' => ['ALLOW', 'DENY'], ], ], + [ + 'name' => 'Topic', + 'in' => 'formData', + 'schema' => ['description' => '授权的topic,支持mqtt多级topic与通配符。', 'type' => 'string', 'required' => true, 'example' => 'test/t1'], + ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '公共参数,每个请求的 ID 都是唯一的。', - 'type' => 'string', - 'example' => '2C7D722D-0F3D-4415-A9CD-A464D82C****', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '82B9E503-F4A1-4F30-976F-C6999FF9****'], + 'Code' => ['description' => '状态码。说明 200表示成功。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Success' => ['description' => '是否调用成功。返回值:true:调用成功。 false:调用失败。', 'type' => 'boolean', 'example' => 'True'], + 'Message' => ['description' => '返回信息。', 'type' => 'string', 'example' => 'operation success.'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'GroupIdAlreadyExsited', - 'errorMessage' => 'The specified GroupId already exists.', - ], - [ - 'errorCode' => 'GroupIdAlreadyUsedByOtherUsers', - 'errorMessage' => 'The current GroupId is used by another user. Please change to a different GroupId.', - ], - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'InstanceNotFound', - 'errorMessage' => 'Failed to find the instance. The instanceId may be invalid.', - ], - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', - ], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => ''], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => ''], + ['errorCode' => 'Customauth.over.capacity', 'errorMessage' => 'Over custom auth capacity.', 'description' => ''], ], - 500 => [ - [ - 'errorCode' => 'CreateGroupIdError', - 'errorMessage' => 'Failed to create GroupId. Try again later.', - ], - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', - ], + 404 => [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => ''], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2C7D722D-0F3D-4415-A9CD-A464D82C****\\"\\n}","errorExample":""},{"type":"xml","example":"\\r\\n2C7D722D-0F3D-4415-A9CD-A464D82C****\\r\\n","errorExample":""}]', - 'title' => '创建 Group ID', - 'description' => '每成功调用一次 **CreateGroupId** 接口,都会计算为一次消息 TPS,从而影响您的计费。详情请参见[计费说明](~~52819~~)。', - 'requestParamsDescription' => '> 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'DeleteGroupId' => [ - 'methods' => [ - 'post', + 'staticInfo' => ['returnType' => 'synchronous'], + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], ], - 'schemes' => [ - 'http', - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"82B9E503-F4A1-4F30-976F-C6999FF9****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', + 'title' => '添加Topic授权', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'mq:AddCustomAuthPermission', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + ], + 'ApplyToken' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -875,31 +566,37 @@ ], 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'delete', - ], + 'systemTags' => ['operationType' => 'create'], 'parameters' => [ [ - 'name' => 'GroupId', + 'name' => 'Resources', 'in' => 'query', - 'schema' => [ - 'description' => '您需要删除的Group ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'GID_test', - ], + 'schema' => ['description' => '资源名称,即云消息队列 MQTT 版的Topic,多个Topic以逗号(,)分隔,每个Token最多运行操作100个资源。当有多个Topic时,需要按照字典顺序排序。'."\n" + .'申请Token时注册的资源参数支持MQTT通配符语法,包含加号单级通配符(+)和井号多级通配符(#)。'."\n" + ."\n" + .'例如,如果申请Token时指定**Resources**为“Topic1/+”,则客户端可以操作“Topic1/xxx”的任意Topic;如果申请Token时指定**Resources**为“Topic1/#”,则客户端可以操作“Topic1/xxx/xxx/xxx”的任意多级Topic。'."\n" + ."\n" + .'> 云消息队列 MQTT 版支持匹配子级Topic,子级Topic无需在控制台创建,直接在消息收发代码中设置即可。Topic名称中的正斜线(/)用于分隔父级Topic和各子级Topic。更多信息,请参见[基本概念](~~42420~~)。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'TopicA/+'], ], [ 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '您需要删除的Group ID所在实例的ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'mqtt-cn-0pp1ldu****', - ], + 'schema' => ['description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。该实例ID在[控制台](https://mqtt.console.aliyun.com/)**实例详情**页面获取。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'post-cn-0pp12gl****'], + ], + [ + 'name' => 'ExpireTime', + 'in' => 'query', + 'schema' => ['description' => 'Token失效的毫秒时间戳。允许设置的失效最小间隔是60秒,最长为30天。如果输入的取值超过30天,申请接口不会报错,但实际生效时间为30天。'."\n" + ."\n" + .'示例:如果Token的失效间隔需设置为60秒,当前的系统时间毫秒时间戳为1609434061000,那么该参数的取值需设置为**1609434121000**,即1609434061000+60x1000之和。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'example' => '1609434121000'], + ], + [ + 'name' => 'Actions', + 'in' => 'query', + 'schema' => ['description' => 'Token的权限类型,取值说明如下:'."\n" + .'- **R**:只有读权限,即只能订阅指定的Topic,不能向Topic生产消息。'."\n" + .'- **W**:只有写权限,即只能向指定Topic生产消息,不能订阅指定Topic。'."\n" + .'- **R,W**:同时拥有读和写的权限,即同时拥有向指定Topic生产消息或订阅指定Topic的权限。**R**和**W**之间需要用逗号(,)隔开。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'R'], ], ], 'responses' => [ @@ -907,71 +604,68 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的。', - 'type' => 'string', - 'example' => '0621DDD7-F0E9-4D35-8900-518116D6****', - ], + 'Token' => ['description' => '服务端返回的Token值。'."\n" + ."\n" + .'> 请勿对返回的Token内容做任何长度、格式或规则的假设。以具体返回值为准。'."\n", 'type' => 'string', 'example' => 'LzMT+XLFl5s/YWJ/MlDz4t/Lq5HC1iGU1P28HAMaxYxn8aQbALNtml7QZKl9L9kPe6LqUb95tEVo+zUqOogs9+jZwDUSzsd4X4qaD3n2TrBEuMOqKkk1Xdrvu9VBQQvIYbz7MJWZDYC3DlW7gLEr33Cuj54iIhagtBi3epStJitsssWs7otY9zhKOSZxhr49G3d0bh35mwyP18EMvDas8UlzeSozsSrujNUqZXOGK0PEBSd+rWMGDJlCt6GFmJgm2JFY7PJwf/7OOSmUYIYFs5o/PuPpoTMF+hcVXMs+0yDukIMTOzG9m3t8k36PVrghFmnK6pC3Rt3mibjW****ng=='], + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的。', 'type' => 'string', 'example' => '31782AAF-D0CC-44C3-ABFD-1B500276****'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', - ], - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'InstanceNotFound', - 'errorMessage' => 'Failed to find the instance. The instanceId may be invalid.', - ], - [ - 'errorCode' => 'ResourcePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', - ], + ['errorCode' => 'ApplyTokenOverFlow', 'errorMessage' => 'You have applied for tokens too many times. Please try again later.', 'description' => '申请Token频率过高,系统限流,请重试。'], + ['errorCode' => 'CheckAccountInfoFailed', 'errorMessage' => 'An error occurred while checking the account information by the STS token.', 'description' => '解析STS Token账号信息失败。'], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'ParameterCheckFailed', 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ], + 404 => [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], ], 500 => [ - [ - 'errorCode' => 'DeleteGroupIdError', - 'errorMessage' => 'Failed to delete GroupId. Try again later.', - ], - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', - ], + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => 'MQTT后端服务异常,请重试。'], + ['errorCode' => 'SystemOverFlow', 'errorMessage' => 'An error occurred while processing your request. Please try again.', 'description' => '系统限流,请重试。'], ], ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"0621DDD7-F0E9-4D35-8900-518116D6****\\"\\n}","errorExample":""},{"type":"xml","example":"\\r\\n0621DDD7-F0E9-4D35-8900-518116D6****\\r\\n","errorExample":""}]', - 'title' => '删除 Group ID', - 'summary' => '调用DeleteGroupId删除Group ID。', - 'description' => '每成功调用一次**DeleteGroupId**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。', - 'requestParamsDescription' => '> 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Token\\": \\"LzMT+XLFl5s/YWJ/MlDz4t/Lq5HC1iGU1P28HAMaxYxn8aQbALNtml7QZKl9L9kPe6LqUb95tEVo+zUqOogs9+jZwDUSzsd4X4qaD3n2TrBEuMOqKkk1Xdrvu9VBQQvIYbz7MJWZDYC3DlW7gLEr33Cuj54iIhagtBi3epStJitsssWs7otY9zhKOSZxhr49G3d0bh35mwyP18EMvDas8UlzeSozsSrujNUqZXOGK0PEBSd+rWMGDJlCt6GFmJgm2JFY7PJwf/7OOSmUYIYFs5o/PuPpoTMF+hcVXMs+0yDukIMTOzG9m3t8k36PVrghFmnK6pC3Rt3mibjW****ng==\\",\\n \\"RequestId\\": \\"31782AAF-D0CC-44C3-ABFD-1B500276****\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 31782AAF-D0CC-44C3-ABFD-1B500276****\\n LzMT+XLFl5s/YWJ/MlDz4t/Lq5HC1iGU1P28HAMaxYxn8aQbALNtml7QZKl9L9kPe6LqUb95tEVo+zUqOogs9+jZwDUSzsd4X4qaD3n2TrBEuMOqKkk1Xdrvu9VBQQvIYbz7MJWZDYC3DlW7gLEr33Cuj54iIhagtBi3epStJitsssWs7otY9zhKOSZxhr49G3d0bh35mwyP18EMvDas8UlzeSozsSrujNUqZXOGK0PEBSd+rWMGDJlCt6GFmJgm2JFY7PJwf/7OOSmUYIYFs5o/PuPpoTMF+hcVXMs+0yDukIMTOzG9m3t8k36PVrghFmnK6pC3Rt3mibjW****ng==\\n","errorExample":""}]', + 'title' => '创建临时访问 Token', + 'summary' => 'Token鉴权方式下,云消息队列 MQTT 版服务端会颁发Token(临时凭证)给客户端,客户端访问云消息队列 MQTT 版服务端时需要携带Token用于权限验证。'."\n" + .'本接口用于向云消息队列 MQTT 版申请临时Token。', + 'description' => '- 单用户请求频率限制为100次/秒。如有特殊需求,请联系云消息队列'."\n" + .' MQTT 版技术支持,钉钉群号:35228338。'."\n" + .'- 每成功调用一次**ApplyToken**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。', + 'requestParamsDescription' => ' > 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'ListGroupId' => [ - 'summary' => '调用ListGroupId查看某实例下的所有Group ID。', - 'methods' => [ - 'post', - 'get', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ApplyToken'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'mq:ApplyToken', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + ], + 'BatchQuerySessionByClientIds' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -980,48 +674,30 @@ 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'get', + 'operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', - 'abilityTreeCode' => '84622', - 'abilityTreeNodes' => [ - 'FEATUREons4L127M', - ], + 'abilityTreeNodes' => ['FEATUREonsICR0M4'], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '需查询的Group ID列表的实例的ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'mqtt-cn-0pp1ldu****', - ], + 'schema' => ['description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在[控制台](https://mqtt.console.aliyun.com)**实例详情**页面获取该ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'post-cn-0pp12gl****'], ], [ - 'name' => 'Tag', + 'name' => 'ClientIdList', 'in' => 'query', 'style' => 'repeatList', 'schema' => [ + 'description' => '客户端列表。', 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'Key' => [ - 'type' => 'string', - 'required' => false, - ], - 'Value' => [ - 'type' => 'string', - 'required' => false, - ], - ], - 'required' => false, - ], - 'required' => false, - 'maxItems' => 100, + 'items' => ['description' => '客户端编号,表示第N个Client ID。'."\n" + ."\n" + .'> 单次最多批量查询10个Client ID的状态,即N的取值范围为1~10。', 'type' => 'string', 'required' => false, 'example' => 'ClientIdList.1'], + 'required' => true, + 'example' => 'ClientIdList.1', + 'maxItems' => 10, ], ], ], @@ -1030,269 +706,203 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的。', - 'type' => 'string', - 'example' => '95996EEB-D894-44FA-A87C-940F5CD9****', - ], - 'Data' => [ - 'description' => '所查询的Group ID的详细信息。', + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的。', 'type' => 'string', 'example' => '63309FDB-ED6C-46AE-B31C-A172FBA0****'], + 'OnlineStatusList' => [ + 'description' => '客户端状态列表。', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ - 'UpdateTime' => [ - 'description' => '该Group ID的最近一次更新时间。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1564577317000', - ], - 'InstanceId' => [ - 'description' => '查询的Group ID所属实例的ID。', - 'type' => 'string', - 'example' => 'post-cn-45910tj****', - ], - 'IndependentNaming' => [ - 'description' => '该实例是否有独立命名空间。取值如下:'."\n" - ."\n" - .'- **true**:有独立命名空间,该实例下的资源需保证命名唯一,跨实例可重名。'."\n" - ."\n" - .'- **false**:无独立命名空间,该实例下的资源需保证全局命名唯一,跨实例不可重名。', - 'type' => 'boolean', - 'example' => 'true', - ], - 'GroupId' => [ - 'description' => '查询到的属于该实例的Group ID。', - 'type' => 'string', - 'example' => 'GID_test1', - ], - 'CreateTime' => [ - 'description' => '该Group ID的创建时间。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1564577317000', - ], - 'Tags' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'TagKey' => [ - 'type' => 'string', - ], - 'TagValue' => [ - 'type' => 'string', - ], - ], - ], - ], + 'OnlineStatus' => ['description' => '设备是否在线,取值说明如下:'."\n" + ."\n" + .'- **true**:在线'."\n" + .'- **false**:不在线', 'type' => 'boolean', 'example' => 'true'], + 'ClientId' => ['description' => '客户端的Client ID。Client ID的详细信息,请参见[名词解释](~~42420~~)。', 'type' => 'string', 'example' => 'GID_test@0001'], ], + 'description' => '', ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'InstanceNotFound', - 'errorMessage' => 'Failed to find the instance. The instanceId may be invalid.', - ], - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', - ], + ['errorCode' => 'CheckAccountInfoFailed', 'errorMessage' => 'An error occurred while checking the account information by the STS token.', 'description' => '解析STS Token账号信息失败。'], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'ParameterCheckFailed', 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], ], - 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', - ], + 403 => [ + ['errorCode' => 'SystemOverFlow', 'errorMessage' => 'An error occurred while processing your request. Please try again.', 'description' => ''], + ], + [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], + ], + 417 => [ + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => ''], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"95996EEB-D894-44FA-A87C-940F5CD9****\\",\\n \\"Data\\": [\\n {\\n \\"UpdateTime\\": 1564577317000,\\n \\"InstanceId\\": \\"post-cn-45910tj****\\",\\n \\"IndependentNaming\\": true,\\n \\"GroupId\\": \\"GID_test1\\",\\n \\"CreateTime\\": 1564577317000,\\n \\"Tags\\": [\\n {\\n \\"TagKey\\": \\"\\",\\n \\"TagValue\\": \\"\\"\\n }\\n ]\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"\\n95996EEB-D894-44FA-A87C-940F5CD9****\\n\\n post-cn-45910tj****\\n 1564577317000\\n 1564577317000\\n true\\n GID_test2\\n\\n\\n post-cn-45910tj****\\n 1563200655000\\n 1563200655000\\n true\\n GID_test1\\n\\n","errorExample":""}]', - 'title' => '查看某实例下的所有 Group ID', - 'description' => '每成功调用一次**ListGroupId**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。', - 'requestParamsDescription' => '> 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], + ], + 'title' => '批量查询客户端在线状态', + 'summary' => '根据 Client ID 批量查询客户端在线状态。', + 'description' => '- **BatchQuerySessionByClientIds**接口的QPS为100。更多信息,请参见[QPS限制](~~163047~~)。'."\n" + .'- 每次调用**BatchQuerySessionByClientIds**接口最多查询10个Client ID对应的客户端的在线状态。'."\n" + .'- 每成功调用一次**BatchQuerySessionByClientIds**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。'."\n" + .'- 考虑到性能影响,**BatchQuerySessionByClientIds**接口使用内部缓存进行查询,可能会导致数据不一致的情况。如需进行精确查询,建议使用[QuerySessionByClientId](~~2603924~~)接口查询。', + 'requestParamsDescription' => ' > 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'SendMessage' => [ - 'methods' => [ - 'post', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'BatchQuerySessionByClientIds'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:BatchQuerySessionByClientIds', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"63309FDB-ED6C-46AE-B31C-A172FBA0****\\",\\n \\"OnlineStatusList\\": [\\n {\\n \\"OnlineStatus\\": true,\\n \\"ClientId\\": \\"GID_test@0001\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"\\r\\n \\r\\n GID_test@0001\\r\\n true\\r\\n \\r\\n \\r\\n GID_test@0002\\r\\n false\\r\\n \\r\\n 63309FDB-ED6C-46AE-B31C-A172FBA0****\\r\\n","errorExample":""}]', + ], + 'CloseConnection' => [ + 'summary' => '主动关闭在线连接,不过设备仍然可能会重连,取决于客户端重连机制。', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'write', + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - ], + 'systemTags' => ['operationType' => 'none', 'riskType' => 'high', 'chargeType' => 'free'], 'parameters' => [ - [ - 'name' => 'MqttTopic', - 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版的Topic,即消息发送的目标Topic。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'TopicA', - ], - ], [ 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在[控制台](https://mqtt.console.aliyun.com)**实例详情**页面的**基础信息**区域查看。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'post-cn-0pp12gl****', - ], + 'schema' => ['description' => '微消息队列 MQTT 版实例的 ID。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-0pp12gl****'], ], [ - 'name' => 'Payload', + 'name' => 'ClientId', 'in' => 'query', - 'schema' => [ - 'description' => '消息内容,即消息负载。建议自行做Base64编码,避免传输不可见字符。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'test', - ], + 'schema' => ['description' => '设备的Client ID。', 'type' => 'string', 'required' => true, 'example' => 'GID_test@@@test'], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'MsgId' => [ - 'description' => '消息的唯一标识,消息发送成功后服务端会返回消息ID。', - 'type' => 'string', - 'example' => '0B736D997B7F45FF54E61C1C1B58****', - ], - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的。', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '82B9E503-F4A1-4F30-976F-C6999FF9****'], + 'Code' => ['description' => '接口返回码:200:表示成功。 其它:表示错误码。错误码详情,请参见错误码。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '调用结果信息', 'type' => 'string', 'example' => 'operation success.'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'CheckAccountInfoFailed', - 'errorMessage' => 'An error occurred while checking the account information by the STS token.', - ], - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'ParameterCheckFailed', - 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => ''], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'description' => ''], ], 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => ''], ], 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', - ], - [ - 'errorCode' => 'SendMessageFailed', - 'errorMessage' => 'A storage exception occurred while sending the message. Please try again.', - ], - [ - 'errorCode' => 'SystemOverFlow', - 'errorMessage' => 'An error occurred while processing your request. Please try again.', - ], + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => ''], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"MsgId\\": \\"0B736D997B7F45FF54E61C1C1B58****\\",\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 0B736D997B7F45FF54E61C1C1B58****\\n","errorExample":""}]', - 'title' => '向云消息队列 MQTT 版发送单条消息', - 'summary' => '从服务端应用向云消息队列 MQTT 版发送单条消息。', - 'description' => '- **SendMessage**接口为服务端应用调用,与MQTT客户端发送消息互补。服务端和客户端的使用场景区别,请参见[开发指南使用指引](~~179160~~)。'."\n" - .'- 调用**SendMessage**接口发送的消息不支持流转至云消息队列 RocketMQ 版。若需要通过MQTT服务端将消息流转至云消息队列 RocketMQ 版,请使用[SDK发送消息](~~174527~~)。'."\n" - .'**SendMessage**接口的QPS限制为1000。更多信息,请参见[QPS限制](~~163047~~)。'."\n" - .'- 每成功调用一次**SendMessage**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。', - 'requestParamsDescription' => ' > 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'QuerySessionByClientId' => [ - 'methods' => [ - 'post', - 'get', + 'staticInfo' => ['returnType' => 'synchronous'], + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], ], - 'schemes' => [ - 'http', - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"82B9E503-F4A1-4F30-976F-C6999FF9****\\",\\n \\"Code\\": 200,\\n \\"Message\\": \\"operation success.\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '关闭在线连接', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:CloseConnection', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + ], + 'CreateGroupId' => [ + 'summary' => '消息生产者和消费者客户端接入云消息队列 MQTT 版服务端收发消息时,需要指定Client ID,用于唯一标识一个客户端。'."\n" + .'Client ID由两部分组成,组织形式为@@@,DeviceID由客户端自定义,GroupID需要提前在云消息队列 MQTT 版服务端创建。', + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'read', + 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'get', + 'operationType' => 'create', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '84611', + 'abilityTreeNodes' => ['FEATUREons4L127M'], ], 'parameters' => [ [ - 'name' => 'ClientId', + 'name' => 'GroupId', 'in' => 'query', - 'schema' => [ - 'description' => '需要查询的目标Client ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'GID_test@@@test', - ], + 'schema' => ['description' => '您需创建的Group ID。取值说明如下:'."\n" + ."\n" + .'- 以 "GID_" 或者 "GID-" 开头,只能包含字母、数字、连字符(-)和下划线(_),长度限制在 7~64 字符之间。'."\n" + .'- Group ID 一旦创建,则无法修改,详情请参见[名词解释](~~42420~~)。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test'], ], [ 'name' => 'InstanceId', 'in' => 'query', + 'schema' => ['description' => '创建的Group ID所在的实例ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'mqtt-cn-0pp1ldu****'], + ], + [ + 'name' => 'Tag', + 'in' => 'query', + 'style' => 'repeatList', 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在[控制台](https://mqtt.console.aliyun.com)**实例详情**页面获取该ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'post-cn-0pp12gl****', + 'description' => '标签键值对数组。', + 'type' => 'array', + 'items' => [ + 'description' => '资源标签列表,一次最多添加20个标签,一个资源最多可以添加20个标签', + 'type' => 'object', + 'properties' => [ + 'Key' => ['description' => '标签键', 'type' => 'string', 'required' => false, 'example' => 'test'], + 'Value' => ['description' => '标签值。', 'type' => 'string', 'required' => false, 'example' => 'test'], + ], + 'required' => false, + ], + 'required' => false, + 'maxItems' => 100, ], ], ], @@ -1301,85 +911,60 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'OnlineStatus' => [ - 'description' => '设备是否在线,取值说明如下:'."\n" - ."\n" - .'- **true**:在线'."\n" - .'- **false**:不在线', - 'type' => 'boolean', - 'example' => 'true', - ], - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的。', - 'type' => 'string', - 'example' => 'E4581CCF-62AF-44D9-B5B4-D1DBBC0E****', - ], + 'RequestId' => ['description' => '公共参数,每个请求的 ID 都是唯一的。', 'type' => 'string', 'example' => '2C7D722D-0F3D-4415-A9CD-A464D82C****'], ], + 'description' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'CheckAccountInfoFailed', - 'errorMessage' => 'An error occurred while checking the account information by the STS token.', - ], - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'ParameterCheckFailed', - 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], - ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + ['errorCode' => 'GroupIdAlreadyExsited', 'errorMessage' => 'The specified GroupId already exists.', 'description' => ' 当前Group ID已经存在。'], + ['errorCode' => 'GroupIdAlreadyUsedByOtherUsers', 'errorMessage' => 'The current GroupId is used by another user. Please change to a different GroupId.', 'description' => '当前Group ID已经被其他用户占用,请更换其他名称。'], + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'InstanceNotFound', 'errorMessage' => 'Failed to find the instance. The instanceId may be invalid.', 'description' => '无法找到实例。'], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], ], 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', - ], - [ - 'errorCode' => 'SystemOverFlow', - 'errorMessage' => 'An error occurred while processing your request. Please try again.', - ], + ['errorCode' => 'CreateGroupIdError', 'errorMessage' => 'Failed to create GroupId. Try again later.', 'description' => '创建Group ID请求执行失败,请稍后重试。'], + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => 'MQTT后端服务异常,请重试。'], ], ], - 'eventInfo' => [ - 'enable' => false, - 'eventNames' => [], - ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"OnlineStatus\\": true,\\n \\"RequestId\\": \\"E4581CCF-62AF-44D9-B5B4-D1DBBC0E****\\"\\n}","errorExample":""},{"type":"xml","example":"\\r\\n true\\r\\n E4581CCF-62AF-44D9-B5B4-D1DBBC0E****\\r\\n","errorExample":""}]', - 'title' => '查询客户端在线状态', - 'summary' => '**QuerySessionByClientId**接口一般用于线上追踪单个设备的运行状态,再根据查询到的信息排查问题。输入Client ID即可查到对应设备是否在线、设备地址等信息。', - 'description' => '- **QuerySessionByClientId**接口的QPS限制为500。更多信息请参见[QPS限制](~~163047~~)。'."\n" - .'- 每成功调用一次**QuerySessionByClientId**接口,都会计算为一次消息TPS,从而影响您的计费。详情请参见[计费说明](~~52819~~)。', - 'requestParamsDescription' => '> 更多参数说明请参见[公共参数](~~178121~~)和[服务接入点](~~181438~~)。', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2C7D722D-0F3D-4415-A9CD-A464D82C****\\"\\n}","errorExample":""},{"type":"xml","example":"\\r\\n2C7D722D-0F3D-4415-A9CD-A464D82C****\\r\\n","errorExample":""}]', + 'title' => '创建 Group ID', + 'description' => '每成功调用一次 **CreateGroupId** 接口,都会计算为一次消息 TPS,从而影响您的计费。详情请参见[计费说明](~~52819~~)。', + 'requestParamsDescription' => '> 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'BatchQuerySessionByClientIds' => [ - 'methods' => [ - 'post', - 'get', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateGroupId'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'mq:CreateMqttGroupId', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + ], ], + ], + 'DeleteCaCertificate' => [ + 'summary' => '云消息队列 MQTT 版支持X.509证书认证,客户端可通过设备证书完成接入认证。CA证书用于为客户端签发设备证书,并验证设备证书的正确性。'."\n" + .'使用CA证书需要先将证书注册到云消息队列 MQTT 版服务端,若您不再需要使用某个CA证书,您可以调用DeleteCaCertificate接口将该证书从服务端记录中删除。', + 'methods' => ['get', 'post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -1388,172 +973,101 @@ 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'none', + 'operationType' => 'delete', + 'riskType' => 'high', + 'chargeType' => 'free', + 'abilityTreeCode' => '142200', + 'abilityTreeNodes' => ['FEATUREonsQV6LXV'], ], 'parameters' => [ [ - 'name' => 'InstanceId', + 'name' => 'MqttInstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在[控制台](https://mqtt.console.aliyun.com)**实例详情**页面获取该ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'post-cn-0pp12gl****', - ], + 'schema' => ['description' => 'CA证书所绑定的实例ID,即云消息队列 MQTT 版的实例ID。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-7mz2d******'], ], [ - 'name' => 'ClientIdList', + 'name' => 'Sn', 'in' => 'query', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '客户端列表。', - 'type' => 'array', - 'items' => [ - 'description' => '客户端编号,表示第N个Client ID。'."\n" - ."\n" - .'> 单次最多批量查询10个Client ID的状态,即N的取值范围为1~10。', - 'type' => 'string', - 'required' => false, - 'example' => 'ClientIdList.1', - ], - 'required' => true, - 'example' => 'ClientIdList.1', - 'maxItems' => 10, - ], + 'schema' => ['description' => '待删除CA证书的SN序列号,用于唯一标识一个CA证书。'."\n" + ."\n" + .'取值范围:不超过128 Byte。', 'type' => 'string', 'required' => true, 'example' => '007269004887******'], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的。', - 'type' => 'string', - 'example' => '63309FDB-ED6C-46AE-B31C-A172FBA0****', - ], - 'OnlineStatusList' => [ - 'description' => '客户端状态列表。', - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'OnlineStatus' => [ - 'description' => '设备是否在线,取值说明如下:'."\n" - ."\n" - .'- **true**:在线'."\n" - .'- **false**:不在线', - 'type' => 'boolean', - 'example' => 'true', - ], - 'ClientId' => [ - 'description' => '客户端的Client ID。Client ID的详细信息,请参见[名词解释](~~42420~~)。', - 'type' => 'string', - 'example' => 'GID_test@0001', - ], - ], - ], - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], + 'Sn' => ['description' => '已删除CA证书的SN序列号,用于唯一标识一个CA证书。', 'type' => 'string', 'example' => '007269004887******'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'CheckAccountInfoFailed', - 'errorMessage' => 'An error occurred while checking the account information by the STS token.', - ], - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'ParameterCheckFailed', - 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => ''], ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + 403 => [ + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => ''], ], 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'FindCaBySnError', 'errorMessage' => 'Failed to find the CA by the SN. Please check sn is valid.', 'description' => ''], + ['errorCode' => 'MqttInstanceNotFound', 'errorMessage' => 'Specified instance is not found', 'description' => ''], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Sn\\": \\"007269004887******\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 007269004887******\\n","errorExample":""}]', + 'title' => '删除CA证书', + 'description' => '- 仅铂金版和专业版实例支持使用DeleteCaCertificate接口。'."\n" + .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。'."\n" + .'- DeleteCaCertificate接口仅支持对已在云消息队列 MQTT 版服务端注册的CA证书进行操作,您可以通过[ListCaCertificate](~~2604958~~)接口查询指定实例下已注册的CA证书。'."\n" + .'- 删除指定CA证书,由该CA证书签发的且已在云消息队列 MQTT 版服务端注册的所有设备证书也将被自动删除。', + 'extraInfo' => '### 控制台操作'."\n" + .'除了调用DeleteCaCertificate接口,您还可以通过微消息队列MQTT版控制台删除CA证书。具体操作,请参见[CA证书管理](~~436873~~)。', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'mq:DeleteCaCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], ], - [ - 'errorCode' => 'SystemOverFlow', - 'errorMessage' => 'An error occurred while processing your request. Please try again.', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], ], ], ], - 'eventInfo' => [ - 'enable' => false, - 'eventNames' => [], - ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"63309FDB-ED6C-46AE-B31C-A172FBA0****\\",\\n \\"OnlineStatusList\\": [\\n {\\n \\"OnlineStatus\\": true,\\n \\"ClientId\\": \\"GID_test@0001\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"\\r\\n \\r\\n GID_test@0001\\r\\n true\\r\\n \\r\\n \\r\\n GID_test@0002\\r\\n false\\r\\n \\r\\n 63309FDB-ED6C-46AE-B31C-A172FBA0****\\r\\n","errorExample":""}]', - 'title' => '批量查询客户端在线状态', - 'summary' => '根据 Client ID 批量查询客户端在线状态。', - 'description' => '- **BatchQuerySessionByClientIds**接口的QPS为100。更多信息,请参见[QPS限制](~~163047~~)。'."\n" - .'- 每次调用**BatchQuerySessionByClientIds**接口最多查询10个Client ID对应的客户端的在线状态。'."\n" - .'- 每成功调用一次**BatchQuerySessionByClientIds**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。'."\n" - .'- 考虑到性能影响,**BatchQuerySessionByClientIds**接口使用内部缓存进行查询,可能会导致数据不一致的情况。如需进行精确查询,建议使用[QuerySessionByClientId](~~2603924~~)接口查询。', - 'requestParamsDescription' => ' > 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'CloseConnection' => [ - 'summary' => '主动关闭在线连接,不过设备仍然可能会重连,取决于客户端重连机制。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], - 'security' => [ - [ - 'AK' => [], - ], + ], + 'DeleteCustomAuthConnectBlack' => [ + 'summary' => '删除连接黑名单。', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], ], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'high', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'high', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'InstanceId', - 'in' => 'query', - 'schema' => [ - 'description' => '微消息队列 MQTT 版实例的 ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-0pp12gl****', - ], + 'in' => 'formData', + 'schema' => ['description' => '消息队列 MQTT 版实例的 ID。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-0pp12gl****'], ], [ 'name' => 'ClientId', - 'in' => 'query', - 'schema' => [ - 'description' => '设备的Client ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'GID_test@@@test', - ], + 'in' => 'formData', + 'schema' => ['description' => '设备的Client ID。', 'type' => 'string', 'required' => true, 'example' => 'GID_test@@@test'], ], ], 'responses' => [ @@ -1563,235 +1077,139 @@ 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '82B9E503-F4A1-4F30-976F-C6999FF9****', - ], - 'Code' => [ - 'description' => '接口返回码:200:表示成功。 其它:表示错误码。错误码详情,请参见错误码。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '调用结果信息', - 'type' => 'string', - 'example' => 'operation success.', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '317076B7-F946-46BC-A98F-4CF9777C****'], + 'Code' => ['description' => '状态码。说明 200表示成功。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], + 'Message' => ['description' => '调用结果信息', 'type' => 'string', 'example' => 'operation success.'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', - ], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => ''], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => ''], ], 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], - ], - 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', - ], + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => ''], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], + 'staticInfo' => ['returnType' => 'synchronous'], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"82B9E503-F4A1-4F30-976F-C6999FF9****\\",\\n \\"Code\\": 200,\\n \\"Message\\": \\"operation success.\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '关闭在线连接', - ], - 'GetDeviceCredential' => [ - 'summary' => '一机一密认证方式下,设备与云消息队列 MQTT 版建立连接时,需要携带提前申请的设备访问凭证信息向云消息队列 MQTT 版发起认证请求,请求通过则允许设备接入服务端。本接口用于查询指定设备的访问凭证。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"317076B7-F946-46BC-A98F-4CF9777C****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', + 'title' => '删除连接黑名单', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'mq:DeleteCustomAuthConnectBlack', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + ], + 'DeleteCustomAuthIdentity' => [ + 'summary' => '删除自定义身份认证。', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'read', + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', - ], - ], + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'high', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'ClientId', - 'in' => 'query', - 'schema' => [ - 'description' => '需要查询访问凭证的设备的Client ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'GID_test@@@test', - ], + 'name' => 'InstanceId', + 'in' => 'formData', + 'schema' => ['description' => '微消息队列 MQTT 版实例的 ID。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-0pp12gl****'], ], [ - 'name' => 'InstanceId', - 'in' => 'query', + 'name' => 'Username', + 'in' => 'formData', + 'schema' => ['description' => '用户名。', 'type' => 'string', 'required' => true, 'example' => 'test'], + ], + [ + 'name' => 'IdentityType', + 'in' => 'formData', 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面获取该ID。', + 'description' => '身份类型。'."\n" + ."\n" + .'- USER:仅用户名。'."\n" + ."\n" + .'- CLIENT:具体到客户端。', 'type' => 'string', 'required' => true, - 'docRequired' => true, - 'example' => 'post-cn-0pp12gl****', + 'example' => 'USER', + 'enum' => ['USER', 'CLIENT'], ], ], + [ + 'name' => 'ClientId', + 'in' => 'formData', + 'schema' => ['description' => '当身份类型是CLIENT时,指定设备的ClientID。', 'type' => 'string', 'required' => false, 'example' => 'GID_test@@@test'], + ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的。', - 'type' => 'string', - 'example' => 'E4581CCF-62AF-44D9-B5B4-D1DQDC0E****', - ], - 'DeviceCredential' => [ - 'description' => '设备的访问凭证信息。', - 'type' => 'object', - 'properties' => [ - 'UpdateTime' => [ - 'description' => '设备访问凭证上一次更新的毫秒时间戳。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1605541382000', - ], - 'DeviceAccessKeyId' => [ - 'description' => '设备的AccessKey ID。', - 'type' => 'string', - 'example' => 'DC.Z5fXh9sRRVufyLi6wo****', - ], - 'CreateTime' => [ - 'description' => '设备访问凭证创建的毫秒时间戳。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1605541382000', - ], - 'InstanceId' => [ - 'description' => '云消息队列 MQTT 版实例的ID。', - 'type' => 'string', - 'example' => 'post-cn-0pp12gl****', - ], - 'DeviceAccessKeySecret' => [ - 'description' => '设备的AccessKey Secret。', - 'type' => 'string', - 'example' => 'DC.BJMkn4eMQJK2vaApTS****', - ], - 'ClientId' => [ - 'description' => '设备的Client ID。', - 'type' => 'string', - 'example' => 'GID_test@@@test', - ], - ], - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '11568B5B-13A8-4E72-9DBA-3A14F7D3****'], + 'Code' => ['description' => '状态码。200为成功,其他状态码为异常。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Success' => ['description' => '操作是否成功。取值:true:成功。false:失败。', 'type' => 'boolean', 'example' => 'True'], + 'Message' => ['description' => '返回信息。', 'type' => 'string', 'example' => 'operation success.'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ApplyTokenOverFlow', - 'errorMessage' => 'You have applied for tokens too many times. Please try again later.', - ], - [ - 'errorCode' => 'CheckAccountInfoFailed', - 'errorMessage' => 'An error occurred while checking the account information by the STS token.', - ], - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'ParameterCheckFailed', - 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], - [ - 'errorCode' => 'DeviceCredentialNotFound', - 'errorMessage' => 'Device Credential Not Found. Check if the device certificate is registered.', - ], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => ''], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => ''], ], 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], - ], - 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', - ], - [ - 'errorCode' => 'SystemOverFlow', - 'errorMessage' => 'An error occurred while processing your request. Please try again.', - ], + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => ''], ], ], + 'staticInfo' => ['returnType' => 'synchronous'], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"E4581CCF-62AF-44D9-B5B4-D1DQDC0E****\\",\\n \\"DeviceCredential\\": {\\n \\"UpdateTime\\": 1605541382000,\\n \\"DeviceAccessKeyId\\": \\"DC.Z5fXh9sRRVufyLi6wo****\\",\\n \\"CreateTime\\": 1605541382000,\\n \\"InstanceId\\": \\"post-cn-0pp12gl****\\",\\n \\"DeviceAccessKeySecret\\": \\"DC.BJMkn4eMQJK2vaApTS****\\",\\n \\"ClientId\\": \\"GID_test@@@test\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\nE4581CCF-62AF-44D9-B5B4-D1DQDC0E****\\n\\n post-cn-0pp12gl****\\n DC.BJMkn4eMQJK2vaApTS****\\n 1605541382000\\n 1605541382000\\n DC.Z5fXh9sRRVufyLi6wo****\\n GID_test@@@test\\n\\n","errorExample":""}]', - 'title' => '查询设备的访问凭证', - 'description' => '- 本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见[QPS限制](~~163047~~)。'."\n" - .'- 每成功调用一次**GetDeviceCredential**接口,都会计算为一次消息TPS,从而影响您的计费。详细信息,请参见[计费说明](~~52819~~)。', - 'requestParamsDescription' => ' > 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'RefreshDeviceCredential' => [ - 'summary' => '调用RefreshDeviceCredential更新设备的访问凭证。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"11568B5B-13A8-4E72-9DBA-3A14F7D3****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', + 'title' => '删除身份认证', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'mq:DeleteCustomAuthIdentity', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + ], + 'DeleteCustomAuthPermission' => [ + 'summary' => '删除Topic授权。', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -1799,375 +1217,207 @@ ], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', - ], - ], + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'high', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'ClientId', - 'in' => 'query', - 'schema' => [ - 'description' => '需要更新访问凭证的设备的Client ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'GID_test@@@test', - ], + 'name' => 'InstanceId', + 'in' => 'formData', + 'schema' => ['description' => '微消息队列 MQTT 版实例的 ID。', 'type' => 'string', 'required' => true, 'example' => 'mqtt-cn-0pp1ldu****'], ], [ - 'name' => 'InstanceId', - 'in' => 'query', + 'name' => 'IdentityType', + 'in' => 'formData', 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面获取该ID。', + 'description' => '身份类型。'."\n" + ."\n" + .'- USER:仅用户名。'."\n" + ."\n" + .'- CLIENT:具体到客户端。', 'type' => 'string', 'required' => true, - 'docRequired' => true, - 'example' => 'post-cn-0pp12gl****', + 'example' => 'USER', + 'enum' => ['USER', 'CLIENT'], ], ], + [ + 'name' => 'Identity', + 'in' => 'formData', + 'schema' => ['description' => '用户名或客户端ID。', 'type' => 'string', 'required' => true, 'example' => 'test'], + ], + [ + 'name' => 'Topic', + 'in' => 'formData', + 'schema' => ['description' => '授权的Topic,支持mqtt多级topic与通配符。', 'type' => 'string', 'required' => true, 'example' => 'test/t1'], + ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的。', - 'type' => 'string', - 'example' => 'E4581CCF-62AF-44D9-B5B4-D1DBDC0F****', - ], - 'DeviceCredential' => [ - 'description' => '设备的访问凭证信息。', - 'type' => 'object', - 'properties' => [ - 'UpdateTime' => [ - 'description' => '设备访问凭证上一次更新的毫秒时间戳。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1605541382000', - ], - 'DeviceAccessKeyId' => [ - 'description' => '设备的AccessKey ID。', - 'type' => 'string', - 'example' => 'DC.Z5fXh9sRRVufyLi6wo****', - ], - 'CreateTime' => [ - 'description' => '设备访问凭证创建的毫秒时间戳。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1605541382000', - ], - 'InstanceId' => [ - 'description' => '云消息队列 MQTT 版实例的ID。', - 'type' => 'string', - 'example' => 'post-cn-0pp12gl****', - ], - 'DeviceAccessKeySecret' => [ - 'description' => '设备的AccessKey Secret。', - 'type' => 'string', - 'example' => 'DC.BJMkn4eMQJK2vaApTS****', - ], - 'ClientId' => [ - 'description' => '设备的Client ID。', - 'type' => 'string', - 'example' => 'GID_test@@@test', - ], - ], - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '34063BCA-0946-49C1-B824-2ED2C905****'], + 'Code' => ['description' => 'Code码。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Success' => ['description' => '请求结果,取值如下:true:请求成功。 false:请求失败。', 'type' => 'boolean', 'example' => 'True'], + 'Message' => ['description' => '请求返回的信息。', 'type' => 'string', 'example' => 'operation success.'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ApplyTokenOverFlow', - 'errorMessage' => 'You have applied for tokens too many times. Please try again later.', - ], - [ - 'errorCode' => 'CheckAccountInfoFailed', - 'errorMessage' => 'An error occurred while checking the account information by the STS token.', - ], - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'ParameterCheckFailed', - 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], - [ - 'errorCode' => 'DeviceCredentialNotFound', - 'errorMessage' => 'Device Credential Not Found.Check if the device certificate is registered.', - ], - [ - 'errorCode' => 'DeviceCredentialNumExceed', - 'errorMessage' => 'The number of device credentia exceeds the limit. Please revoke unused device certificates.', - ], - [ - 'errorCode' => 'DeviceCredentialExsit', - 'errorMessage' => 'Device Credential Exsit.', - ], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], ], 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], - ], - 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', - ], - [ - 'errorCode' => 'SystemOverFlow', - 'errorMessage' => 'An error occurred while processing your request. Please try again.', - ], + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], ], ], + 'staticInfo' => ['returnType' => 'synchronous'], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"E4581CCF-62AF-44D9-B5B4-D1DBDC0F****\\",\\n \\"DeviceCredential\\": {\\n \\"UpdateTime\\": 1605541382000,\\n \\"DeviceAccessKeyId\\": \\"DC.Z5fXh9sRRVufyLi6wo****\\",\\n \\"CreateTime\\": 1605541382000,\\n \\"InstanceId\\": \\"post-cn-0pp12gl****\\",\\n \\"DeviceAccessKeySecret\\": \\"DC.BJMkn4eMQJK2vaApTS****\\",\\n \\"ClientId\\": \\"GID_test@@@test\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\nE4581CCF-62AF-44D9-B5B4-D1DBDC0F****\\n\\n post-cn-0pp12gl****\\n DC.BJMkn4eMQJK2vaApTS****\\n 1605541382000\\n 1605541382000\\n DC.Z5fXh9sRRVufyLi6wo****\\n GID_test@@@test\\n\\n","errorExample":""}]', - 'title' => '更新设备的访问凭证', - 'description' => '- 本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见[QPS限制](~~163047~~)。'."\n" - .'- 每成功调用一次**RefreshDeviceCredential**接口,都会计算为一次消息TPS,从而影响您的计费。详细信息,请参见[计费说明](~~52819~~)。', - 'requestParamsDescription' => ' > 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'RegisterDeviceCredential' => [ - 'summary' => '一机一密认证方法,即预先为每个设备申请唯一的访问凭证(ClientId、DeviceAccessKeyId和DeviceAccessKeySecret)。当设备与云消息队列 MQTT 版建立连接时,需要将设备访问凭证中的信息按照约定的形式设置到Username和Password中,向云消息队列 MQTT 版发起认证请求,云消息队列 MQTT 版认证通过后激活设备,设备与云消息队列 MQTT 版间才可传输数据。'."\n" - .'本接口用于为指定设备申请访问凭证。', - 'methods' => [ - 'post', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"34063BCA-0946-49C1-B824-2ED2C905****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', + 'title' => '删除Topic授权', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteCustomAuthPermission'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'mq:DeleteCustomAuthPermission', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + ], + 'DeleteDeviceCertificate' => [ + 'summary' => '设备证书是由CA根证书签发给客户端设备使用的数字证书,用于客户端和服务端连接时,服务端对客户端进行安全认证。认证通过后服务端和客户端可基于证书内的加密密钥进行安全通信,若认证不通过则服务端拒绝客户端接入。'."\n" + .'若您不想需要使用某个设备证书,您可以调用本接口将指定设备证书的注册信息从服务端的存储记录中删除。', + 'methods' => ['get', 'post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'write', + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'create', - 'riskType' => 'none', + 'operationType' => 'delete', + 'riskType' => 'high', 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', - ], + 'abilityTreeCode' => '145869', + 'abilityTreeNodes' => ['FEATUREons0PHGX2'], ], 'parameters' => [ [ - 'name' => 'ClientId', + 'name' => 'MqttInstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '需要注册访问凭证的设备的Client ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'GID_test@@@test', - ], + 'schema' => ['description' => '设备证书所绑定的实例ID,即云消息队列 MQTT 版的实例ID。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-7mz2d******'], ], [ - 'name' => 'InstanceId', + 'name' => 'DeviceSn', 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面获取该ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'post-cn-0pp12gl****', - ], + 'schema' => ['description' => '待删除设备证书的SN序列号,用于唯一标识一个设备证书。'."\n" + ."\n" + .'取值范围:不超过128 Byte。', 'type' => 'string', 'required' => true, 'example' => '356217374433****'], + ], + [ + 'name' => 'CaSn', + 'in' => 'query', + 'schema' => ['description' => '设备证书所属的CA证书的序列号,用于唯一标识一个CA证书。CA证书用于验证设备证书的正确性。'."\n" + ."\n" + .'取值范围:不超过128 Byte。'."\n", 'type' => 'string', 'required' => true, 'example' => '007269004887******'], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的。', - 'type' => 'string', - 'example' => 'E4581CCF-62AF-44D9-B5B4-D1DBDC0E****', - ], - 'DeviceCredential' => [ - 'description' => '设备的访问凭证信息。', - 'type' => 'object', - 'properties' => [ - 'UpdateTime' => [ - 'description' => '设备访问凭证上一次更新的毫秒时间戳。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1605541382000', - ], - 'DeviceAccessKeyId' => [ - 'description' => '设备的AccessKey ID。', - 'type' => 'string', - 'example' => 'DC.Z5fXh9sRRVufyLi6wo****', - ], - 'CreateTime' => [ - 'description' => '设备访问凭证创建的毫秒时间戳。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1605541382000', - ], - 'InstanceId' => [ - 'description' => '云消息队列 MQTT 版实例的ID。', - 'type' => 'string', - 'example' => 'post-cn-0pp12gl****', - ], - 'DeviceAccessKeySecret' => [ - 'description' => '设备的AccessKey Secret。', - 'type' => 'string', - 'example' => 'DC.BJMkn4eMQJK2vaApTS****', - ], - 'ClientId' => [ - 'description' => '设备的Client ID。', - 'type' => 'string', - 'example' => 'GID_test@@@test', - ], - ], - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], + 'DeviceSn' => ['description' => '已删除设备证书的SN序列号,用于唯一标识一个设备证书。', 'type' => 'string', 'example' => '356217374433******'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ApplyTokenOverFlow', - 'errorMessage' => 'You have applied for tokens too many times. Please try again later.', - ], - [ - 'errorCode' => 'CheckAccountInfoFailed', - 'errorMessage' => 'An error occurred while checking the account information by the STS token.', - ], - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'ParameterCheckFailed', - 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], - [ - 'errorCode' => 'DeviceCredentialNumExceed', - 'errorMessage' => 'The number of device credentia exceeds the limit. Please revoke unused device certificates.', - ], - [ - 'errorCode' => 'DeviceCredentialNotFound', - 'errorMessage' => 'Device Credential Not Found.Check if the device certificate is registered.', - ], - [ - 'errorCode' => 'DeviceCredentialExsit', - 'errorMessage' => 'Device Credential Exsit.', - ], + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => ''], ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + 403 => [ + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => ''], ], 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'FindDeviceBySnError', 'errorMessage' => 'Failed to find the device certificate by the SN. Please check sn is valid', 'description' => ''], + ['errorCode' => 'MqttInstanceNotFound', 'errorMessage' => 'Specified instance is not found', 'description' => ''], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"DeviceSn\\": \\"356217374433******\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 356217374433******\\n","errorExample":""}]', + 'title' => '删除设备证书', + 'description' => '- 仅铂金版和专业版实例支持使用DeleteDeviceCertificate接口。'."\n" + .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。', + 'extraInfo' => '### 控制台操作'."\n" + .'除了调用DeleteDeviceCertificate接口,您还可以通过微消息队列MQTT版控制台删除设备证书。具体操作,请参见[设备证书管理](~~449435~~)。', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'mq:DeleteDeviceCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], ], - [ - 'errorCode' => 'SystemOverFlow', - 'errorMessage' => 'An error occurred while processing your request. Please try again.', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], ], ], ], - 'eventInfo' => [ - 'enable' => false, - 'eventNames' => [], - ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"E4581CCF-62AF-44D9-B5B4-D1DBDC0E****\\",\\n \\"DeviceCredential\\": {\\n \\"UpdateTime\\": 1605541382000,\\n \\"DeviceAccessKeyId\\": \\"DC.Z5fXh9sRRVufyLi6wo****\\",\\n \\"CreateTime\\": 1605541382000,\\n \\"InstanceId\\": \\"post-cn-0pp12gl****\\",\\n \\"DeviceAccessKeySecret\\": \\"DC.BJMkn4eMQJK2vaApTS****\\",\\n \\"ClientId\\": \\"GID_test@@@test\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\nE4581CCF-62AF-44D9-B5B4-D1DBDC0E****\\n\\n post-cn-0pp12gl****\\n DC.BJMkn4eMQJK2vaApTS****\\n 1605541382000\\n 1605541382000\\n DC.Z5fXh9sRRVufyLi6wo****\\n GID_test@@@test\\n\\n","errorExample":""}]', - 'title' => '为某个设备注册访问凭证', - 'description' => '- 一个设备只能申请一个访问凭证,若调用本接口申请多次,以最近一次返回的访问凭证为准。'."\n" - .'- 本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见[QPS限制](~~163047~~)。'."\n" - .'- 每成功调用一次**RegisterDeviceCredential**接口,都会计算为一次消息TPS,从而影响您的计费。详细信息,请参见[计费说明](~~52819~~)。', - 'requestParamsDescription' => ' > 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', ], - 'UnRegisterDeviceCredential' => [ - 'summary' => '一机一密认证方法,即预先为每个设备申请唯一的访问凭证(ClientId、DeviceAccessKeyId和DeviceAccessKeySecret)。当设备与云消息队列 MQTT 版建立连接时,需要将设备访问凭证中的信息按照约定的形式设置到Username和Password中,向云消息队列 MQTT 版发起认证请求,云消息队列 MQTT 版认证通过后激活设备,设备与云消息队列 MQTT 版间才可传输数据。'."\n" - .'若您不需要再使用某个设备访问凭证,您可以调用本接口注销指定的设备访问凭证。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'DeleteGroupId' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'delete', - 'riskType' => 'high', + 'riskType' => 'none', 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', - ], + 'abilityTreeNodes' => ['FEATUREonsICR0M4'], ], 'parameters' => [ [ - 'name' => 'ClientId', + 'name' => 'GroupId', 'in' => 'query', - 'schema' => [ - 'description' => '需要注销访问凭证的设备的Client ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'GID_test@@@test', - ], + 'schema' => ['description' => '您需要删除的Group ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test'], ], [ 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面获取该ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'post-cn-0pp12gl****', - ], + 'schema' => ['description' => '您需要删除的Group ID所在实例的ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'mqtt-cn-0pp1ldu****'], ], ], 'responses' => [ @@ -2175,289 +1425,217 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的。', - 'type' => 'string', - 'example' => 'E4581CCD-62AF-44D9-B5B4-D1DBDC0E****', - ], + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的。', 'type' => 'string', 'example' => '0621DDD7-F0E9-4D35-8900-518116D6****'], ], + 'description' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ApplyTokenOverFlow', - 'errorMessage' => 'You have applied for tokens too many times. Please try again later.', - ], - [ - 'errorCode' => 'CheckAccountInfoFailed', - 'errorMessage' => 'An error occurred while checking the account information by the STS token.', - ], - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'ParameterCheckFailed', - 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], - [ - 'errorCode' => 'DeviceCredentialNotFound', - 'errorMessage' => 'Device Credential Not Found. Check if the device certificate is registered.', - ], - [ - 'errorCode' => 'DeviceCredentialExsit', - 'errorMessage' => 'Device Credential Exsit.', - ], - [ - 'errorCode' => 'DeviceCredentialNumExceed', - 'errorMessage' => 'The number of device credentia exceeds the limit. Please revoke unused device certificates.', - ], - ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'InstanceNotFound', 'errorMessage' => 'Failed to find the instance. The instanceId may be invalid.', 'description' => '无法找到实例。'], + ['errorCode' => 'ResourcePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], + ['errorCode' => 'SystemError', 'errorMessage' => 'system error.', 'description' => '系统错误,请重试'], ], - 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', - ], - [ - 'errorCode' => 'SystemOverFlow', - 'errorMessage' => 'An error occurred while processing your request. Please try again.', - ], + 417 => [ + ['errorCode' => 'DeleteGroupIdError', 'errorMessage' => 'Failed to delete GroupId. Try again later.', 'description' => ''], + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => ''], ], ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"E4581CCD-62AF-44D9-B5B4-D1DBDC0E****\\"\\n}","errorExample":""},{"type":"xml","example":"\\r\\nE4581CCD-62AF-44D9-B5B4-D1DBDC0E****\\r\\n","errorExample":""}]', - 'title' => '注销设备的访问凭证', - 'description' => '- 指定设备访问凭证被注销后,使用该访问凭证连接的客户端暂时不受影响,若客户端连接断开,则无法再次使用该访问凭证通过服务端认证。'."\n" - .'- 本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见[QPS限制](~~163047~~)。'."\n" - .'- 每成功调用一次**UnRegisterDeviceCredential**接口,都会计算为一次消息TPS,从而影响您的计费。详细信息,请参见[计费说明](~~52819~~)。', - 'requestParamsDescription' => ' > 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', + 'title' => '删除 Group ID', + 'summary' => '调用DeleteGroupId删除Group ID。', + 'description' => '每成功调用一次**DeleteGroupId**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。', + 'requestParamsDescription' => '> 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'ListDeviceCredentialClientId' => [ - 'summary' => '用于查询指定实例下有哪些设备申请了设备访问凭证(一机一密)。', - 'methods' => [ - 'post', - 'get', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteGroupId'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'mq:DeleteMqttGroupId', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"0621DDD7-F0E9-4D35-8900-518116D6****\\"\\n}","errorExample":""},{"type":"xml","example":"\\r\\n0621DDD7-F0E9-4D35-8900-518116D6****\\r\\n","errorExample":""}]', + ], + 'DisasterDowngrade' => [ + 'summary' => '多实例容灾降级,该接口作用是降级其中某个实例的公网VIP接入,目前只支持铂金版实例,需要提交工单申请', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'read', + 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', - ], + 'operationType' => 'update', + 'riskType' => 'high', + 'abilityTreeCode' => '263645', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ [ 'name' => 'InstanceId', - 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面获取该ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'mqtt-xxxxxxxx', - ], + 'in' => 'formData', + 'schema' => ['description' => '云消息队列 MQTT 版实例的 ID。', 'type' => 'string', 'required' => true, 'example' => 'mqtt-cn-xxx'], ], [ - 'name' => 'GroupId', - 'in' => 'query', + 'name' => 'DowngradeInstanceId', + 'in' => 'formData', + 'schema' => ['description' => '降级的实例ID', 'type' => 'string', 'required' => true, 'example' => 'mqtt-cn-xxxx'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '微消息队列 MQTT 版的 Group ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'GID_xxx', + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '82B9E503-F4A1-4F30-976F-C6999FF9****'], + 'Code' => ['description' => '接口返回码:200:表示成功。 其它:表示错误码。错误码详情,请参见错误码。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Success' => ['description' => '是否调用成功。true:调用成功。 false:调用失败。', 'type' => 'boolean', 'example' => 'True'], + 'Message' => ['description' => '调用结果信息', 'type' => 'string', 'example' => 'operation success.'], + 'AccessDeniedDetail' => ['description' => '访问被拒绝详细信息;只有RAM校验失败才会返回此字段。', 'type' => 'string', 'example' => 'None'], + ], ], ], - [ - 'name' => 'PageNo', - 'in' => 'query', - 'schema' => [ - 'description' => '查询第几页的返回结果。起始页从第1页开始计算。', - 'type' => 'string', - 'required' => false, - 'docRequired' => true, - 'example' => '1', + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => ''], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => ''], + ], + 404 => [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => ''], + ], + 500 => [ + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"82B9E503-F4A1-4F30-976F-C6999FF9****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\",\\n \\"AccessDeniedDetail\\": \\"None\\"\\n}","type":"json"}]', + 'title' => '容灾降级', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'mq:DisasterDowngrade', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], + 'additionalActions' => [], ], + ], + ], + 'DisasterRecovery' => [ + 'summary' => '多实例容灾降级恢复,该接口作用是恢复其中某个实例的公网VIP接入,目前只支持铂金版实例,需要提交工单申请', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'PageSize', - 'in' => 'query', - 'schema' => [ - 'description' => '每页最多显示几条查询记录。'."\n" - ."\n" - .'取值范围:1~100。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '100', - ], + 'AK' => [], ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'update', + 'riskType' => 'high', + 'abilityTreeCode' => '263654', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], + ], + 'parameters' => [ [ - 'name' => 'NextToken', - 'in' => 'query', - 'schema' => [ - 'description' => '下一页查询开始的Token。', - 'type' => 'string', - 'required' => false, - 'example' => 'FFdXXXXXWa', - ], + 'name' => 'InstanceId', + 'in' => 'formData', + 'schema' => ['description' => '消息队列 MQTT 版实例的 ID。', 'type' => 'string', 'required' => true, 'example' => 'mqtt-cn-xxx'], + ], + [ + 'name' => 'RecoveryInstanceId', + 'in' => 'formData', + 'schema' => ['description' => '需要恢复的实例ID', 'type' => 'string', 'required' => true, 'example' => 'mqtt-cn-xxx'], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], - 'DeviceCredentialClientIdList' => [ - 'description' => '返回信息列表。', - 'type' => 'object', - 'properties' => [ - 'Total' => [ - 'description' => '查询结果总数。', - 'type' => 'string', - 'example' => '10', - ], - 'ClientIdList' => [ - 'description' => '客户端列表。', - 'type' => 'array', - 'items' => [ - 'description' => '客户端ID。', - 'type' => 'string', - 'example' => 'GID_test@@@pub-1', - ], - ], - 'PageNo' => [ - 'description' => '当前返回的查询记录是第几页。', - 'type' => 'string', - 'example' => '1', - ], - 'PageSize' => [ - 'description' => '每页显示的最大结果数。', - 'type' => 'string', - 'example' => '100', - ], - 'NextToken' => [ - 'description' => '是否拥有下一次查询的令牌(Token)。取值:'."\n" - .'- 第一次查询和没有下一次查询时,均无需填写。'."\n" - .'- 如果有下一次查询,取值为上一次API调用返回的NextToken值。', - 'type' => 'string', - 'example' => '634dxxxxx75b5f', - ], - ], - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '135F8639-F262-4417-98D1-4DE4595C****'], + 'Code' => ['description' => '接口返回码:200:表示成功。 其它:表示错误码。错误码详情,请参见错误码。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Success' => ['description' => '是否调用成功。true:调用成功。 false:调用失败。', 'type' => 'boolean', 'example' => 'True'], + 'Message' => ['description' => '调用结果信息', 'type' => 'string', 'example' => 'operation success.'], + 'AccessDeniedDetail' => ['description' => '访问被拒绝详细信息;只有校验RAM失败后,字段才会返回。', 'type' => 'string', 'example' => '{}'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ApplyTokenOverFlow', - 'errorMessage' => 'You have applied for tokens too many times. Please try again later.', - ], - [ - 'errorCode' => 'CheckAccountInfoFailed', - 'errorMessage' => 'An error occurred while checking the account information by the STS token.', - ], - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'ParameterCheckFailed', - 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], - [ - 'errorCode' => 'DeviceCredentialNotFound', - 'errorMessage' => 'Device Credential Not Found.Check if the device certificate is registered.', - ], - [ - 'errorCode' => 'DeviceCredentialNumExceed', - 'errorMessage' => 'The number of device credentia exceeds the limit. Please revoke unused device certificates.', - ], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], ], 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], ], 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', - ], - [ - 'errorCode' => 'SystemOverFlow', - 'errorMessage' => 'An error occurred while processing your request. Please try again.', - ], + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => 'MQTT后端服务异常,请重试。'], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"135F8639-F262-4417-98D1-4DE4595C****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\",\\n \\"AccessDeniedDetail\\": \\"{}\\"\\n}","type":"json"}]', + 'title' => '容灾恢复', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DisasterRecovery'], + ], ], - 'eventInfo' => [ - 'enable' => false, - 'eventNames' => [], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'mq:DisasterRecovery', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + 'additionalActions' => [], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"DeviceCredentialClientIdList\\": {\\n \\"Total\\": \\"10\\",\\n \\"ClientIdList\\": [\\n \\"GID_test@@@pub-1\\"\\n ],\\n \\"PageNo\\": \\"1\\",\\n \\"PageSize\\": \\"100\\",\\n \\"NextToken\\": \\"634dxxxxx75b5f\\"\\n }\\n}","type":"json"}]', - 'title' => '查询已注册访问凭证的设备列表', ], - 'QueryMqttTraceDevice' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'GetCaCertificate' => [ + 'summary' => '云消息队列 MQTT 版支持X.509证书认证,客户端可通过设备证书完成接入认证。CA证书用于为客户端签发设备证书,并验证设备证书的正确性。'."\n" + .'您可以调用本接口查询指定CA证书的证书内容以及激活状态等详细信息。', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -2466,210 +1644,166 @@ 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'none', - 'abilityTreeCode' => '84626', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', - ], + 'operationType' => 'get', + 'riskType' => 'high', + 'chargeType' => 'free', + 'abilityTreeCode' => '141174', + 'abilityTreeNodes' => ['FEATUREonsQV6LXV'], ], 'parameters' => [ [ - 'name' => 'MqttRegionId', + 'name' => 'MqttInstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例地域(Region)的ID。更多信息,请参见[服务接入点](~~181438~~)。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'cn-hangzhou', - ], + 'schema' => ['description' => 'CA证书所绑定的实例ID,即云消息队列 MQTT 版的实例ID。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-7mz2d******'], ], [ - 'name' => 'InstanceId', + 'name' => 'Sn', 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面的**基础信息**区域查看。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'mqtt-cn-i7m26mf****', - ], + 'schema' => ['description' => '待查询CA证书的SN序列号,用于唯一标识一个CA证书。', 'type' => 'string', 'required' => true, 'example' => '007269004887******'], ], - [ - 'name' => 'Reverse', - 'in' => 'query', + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '返回结果是否倒序显示。取值说明如下:'."\n" - ."\n" - .'- **true**:按照设备活动时间倒序显示,最后一次的设备活动信息显示在第一条,最早一次的设备活动信息显示在最后一条。'."\n" - ."\n" - .'- **false**:按照设备活动时间顺序显示,最早一次的设备活动信息显示在第一条,最后一次的设备活动信息显示在最后一条。'."\n" - ."\n" - .'若不输入,则返回结果默认按照设备活动时间顺序显示。', - 'type' => 'boolean', - 'required' => false, - 'docRequired' => true, - 'example' => 'false', + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['title' => 'Id of the request', 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], + 'Data' => [ + 'description' => '证书详细信息。', + 'type' => 'object', + 'properties' => [ + 'RegistrationCode' => ['description' => 'CA证书的注册码。', 'type' => 'string', 'example' => '13274673-8f90-4630-bea1-9cccb25756ad2089******'], + 'CaName' => ['description' => 'CA证书的名称。', 'type' => 'string', 'example' => 'mqtt_ca'], + 'Sn' => ['description' => 'CA证书的SN序列号,用于唯一标识一个CA证书。'."\n" + ."\n" + .'取值范围:不超过128 Byte。', 'type' => 'string', 'example' => '00f26900ba87******'], + 'CaContent' => ['description' => 'CA证书内容。'."\n" + ."\n" + .'> \\n表示换行。', 'type' => 'string', 'example' => '-----BEGIN CERTIFICATE-----\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\n-----END CERTIFICATE-----'], + 'VerificationContent' => ['description' => '验证证书内容。'."\n" + .'> \\n表示换行。', 'type' => 'string', 'example' => '-----BEGIN CERTIFICATE-----\\nMIID/DCCAu+Y5sRMpp9tnd+4s******\\n-----END CERTIFICATE-----'], + 'ValidBegin' => ['description' => 'CA证书生效的起始时间。格式为毫秒级别的Unix时间戳。', 'type' => 'string', 'example' => '1654137303000'], + 'ValidEnd' => ['description' => 'CA证书生效的终止时间。格式为毫秒级别的Unix时间戳。', 'type' => 'string', 'example' => '1969497303000'], + 'Status' => ['description' => 'CA证书的状态。取值如下:'."\n" + ."\n" + .'- **0**:表示证书为未激活状态。'."\n" + ."\n" + .'- **1**:表示证书为激活状态。'."\n" + ."\n" + .'> CA证书注册后,默认为激活状态。', 'type' => 'string', 'example' => '1'], + ], + ], + ], ], ], - [ - 'name' => 'ClientId', - 'in' => 'query', - 'schema' => [ - 'description' => '需要查询轨迹信息的设备的Client ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'GID_test@@@producer', + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => ''], + ], + 403 => [ + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => ''], + ], + 500 => [ + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'FindCaBySnError', 'errorMessage' => 'Failed to find the CA by the SN. Please check sn is valid.', 'description' => ''], + ['errorCode' => 'MqttInstanceNotFound', 'errorMessage' => 'Specified instance is not found', 'description' => ''], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Data\\": {\\n \\"RegistrationCode\\": \\"13274673-8f90-4630-bea1-9cccb25756ad2089******\\",\\n \\"CaName\\": \\"mqtt_ca\\",\\n \\"Sn\\": \\"00f26900ba87******\\",\\n \\"CaContent\\": \\"-----BEGIN CERTIFICATE-----\\\\\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\\\\\n-----END CERTIFICATE-----\\",\\n \\"VerificationContent\\": \\"-----BEGIN CERTIFICATE-----\\\\\\\\nMIID/DCCAu+Y5sRMpp9tnd+4s******\\\\\\\\n-----END CERTIFICATE-----\\",\\n \\"ValidBegin\\": \\"1654137303000\\",\\n \\"ValidEnd\\": \\"1969497303000\\",\\n \\"Status\\": \\"1\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n \\n 13274673-8f90-4630-bea1-9cccb25756ad2089******\\n mqtt_ca\\n 00f26900ba87******\\n -----BEGIN CERTIFICATE-----\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\n-----END CERTIFICATE-----\\n -----BEGIN CERTIFICATE-----\\\\nMIID/DCCAu+Y5sRMpp9tnd+4s******\\\\n-----END CERTIFICATE-----\\n 1654137303000\\n 1969497303000\\n 1\\n \\n","errorExample":""}]', + 'title' => '获取CA证书详情', + 'description' => '- 仅铂金版和专业版实例支持使用GetCaCertificate接口。'."\n" + .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。', + 'extraInfo' => '### 控制台操作'."\n" + .'除了调用GetCaCertificate接口,您还可以通过微消息队列MQTT版控制台查看指定的CA证书。具体操作,请参见[CA证书管理](~~436873~~)。', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:GetCaCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], ], ], + ], + ], + 'GetDeviceCertificate' => [ + 'summary' => '设备证书是由CA根证书签发给客户端设备使用的数字证书,用于客户端和服务端连接时,服务端对客户端进行安全认证。认证通过后服务端和客户端可基于证书内的加密密钥进行安全通信,若认证不通过则服务端拒绝客户端接入。'."\n" + .'您可以调用本接口获取设备证书的详细信息。', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], + 'security' => [ [ - 'name' => 'BeginTime', - 'in' => 'query', - 'schema' => [ - 'description' => '查询范围的起始时间戳。单位:毫秒。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'docRequired' => true, - 'maximum' => '9223372036854774807', - 'minimum' => '-9223372036854774808', - 'example' => '1621580400000', - ], + 'AK' => [], ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'high', + 'chargeType' => 'free', + 'abilityTreeCode' => '145870', + 'abilityTreeNodes' => ['FEATUREons0PHGX2'], + ], + 'parameters' => [ [ - 'name' => 'EndTime', + 'name' => 'MqttInstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '查询范围的终止时间戳。单位:毫秒。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'docRequired' => true, - 'maximum' => '9223372036854774807', - 'minimum' => '-9223372036854774808', - 'example' => '1621584000000', - ], + 'schema' => ['description' => '设备证书所绑定的实例ID,即云消息队列 MQTT 版的实例ID。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-7mz2d******'], ], [ - 'name' => 'CurrentPage', + 'name' => 'DeviceSn', 'in' => 'query', - 'schema' => [ - 'description' => '当前取第几页消息,从1开始递增。若输入参数大于总页数,则返回结果为空。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => true, - 'docRequired' => true, - 'maximum' => '2147483647', - 'minimum' => '-2147483648', - 'example' => '1', - ], + 'schema' => ['description' => '待查询设备证书的SN序列号,用于唯一标识一个设备证书。'."\n" + ."\n" + .'取值范围:不超过128 Byte。', 'type' => 'string', 'required' => true, 'example' => '356217374433******'], ], [ - 'name' => 'PageSize', + 'name' => 'CaSn', 'in' => 'query', - 'schema' => [ - 'description' => '分页查询,每页最多显示的消息数量,最小1条,最多100条。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => true, - 'docRequired' => true, - 'maximum' => '2147483647', - 'minimum' => '-2147483648', - 'example' => '5', - ], + 'schema' => ['description' => '待查询设备证书所属的CA证书的SN序列号,用于唯一标识一个CA证书。'."\n" + ."\n" + .'取值范围:不超过128 Byte。', 'type' => 'string', 'required' => true, 'example' => '007269004887******'], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'CurrentPage' => [ - 'description' => '当前位于第几页。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '317076B7-F946-46BC-A98F-4CF9777C****', - ], - 'PageSize' => [ - 'description' => '每页最多显示的设备活动信息数量。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '2', - ], - 'Total' => [ - 'description' => '查询到的设备活动信息总数。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '3', - ], - 'DeviceInfoList' => [ - 'description' => '查询的设备活动信息明细。', - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'ChannelId' => [ - 'description' => '设备连接标识。', - 'type' => 'string', - 'example' => 'c69fe839209547fa9d073781b9cd****', - ], - 'Time' => [ - 'description' => '设备动作发生的时间。', - 'type' => 'string', - 'example' => '2021-05-21 15:51:54.867', - ], - 'ActionCode' => [ - 'description' => '设备动作的返回码。取值说明如下:'."\n" - ."\n" - .'- **mqtt.trace.action.connect**:设备动作为**connect**时返回该参数值。'."\n" - ."\n" - .'- **mqtt.trace.action.close**:设备动作为**close**时返回该参数值。'."\n" - ."\n" - .'- **mqtt.trace.action.disconnect**:设备动作为**disconnect**时返回该参数值。', - 'type' => 'string', - 'example' => 'mqtt.trace.action.connect', - ], - 'Action' => [ - 'description' => '设备动作。取值说明如下:'."\n" - ."\n" - .'- **connect**:客户端请求与服务端连接。'."\n" - ."\n" - .'- **close**:TCP连接断开。'."\n" - ."\n" - .'- **disconnect**:客户端请求与服务端断开连接。', - 'type' => 'string', - 'example' => 'connect', - ], - 'ActionInfo' => [ - 'description' => '设备动作的描述信息。取值说明如下:'."\n" - ."\n" - .'- **accepted**:服务端接收客户端发起的连接请求。'."\n" - ."\n" - .'- **not authorized**:客户端访问的实例权限校验失败导致TCP连接断开。'."\n" - ."\n" - .'- **clientId conflict**:客户端标识冲突导致TCP连接断开。'."\n" - ."\n" - .'- **resource auth failed**:客户端访问的Topic或Group ID资源权限校验失败导致TCP连接断开。'."\n" - ."\n" - .'- **no heart**:客户端无心跳导致TCP连接断开。'."\n" - ."\n" - .'- **closed by client**:客户端异常导致TCP连接断开。'."\n" - ."\n" - .'- **disconnected by client**:客户端请求断开连接。'."\n" - ."\n" - .'- **invalid param**:请求参数不合法导致TCP连接断开。'."\n" - ."\n" - .'- **Socket IOException**:网络抖动或丢包导致TCP连接断开。', - 'type' => 'string', - 'example' => 'accept', - ], - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], + 'Data' => [ + 'description' => '证书详细信息。', + 'type' => 'object', + 'properties' => [ + 'ValidBegin' => ['description' => '设备证书生效的起始时间。格式为毫秒级别的Unix时间戳。', 'type' => 'string', 'example' => '1654137303000'], + 'ValidEnd' => ['description' => '设备证书生效的终止时间。格式为毫秒级别的Unix时间戳。', 'type' => 'string', 'example' => '1969497303000'], + 'DeviceSn' => ['description' => '设备证书的SN序列号,用于唯一标识一个设备证书。', 'type' => 'string', 'example' => '356217374433******'], + 'DeviceName' => ['description' => '设备证书的名称。', 'type' => 'string', 'example' => 'mqtt_device'], + 'DeviceContent' => ['description' => '设备证书的内容。'."\n" + ."\n" + .'\\n表示换行。', 'type' => 'string', 'example' => '-----BEGIN DEVICECERTIFICATE-----\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\n-----END DEVICECERTIFICATE-----'], + 'CaSn' => ['description' => '设备证书所属的CA证书的SN序列号,用于唯一标识一个CA证书。', 'type' => 'string', 'example' => '00f26900ba87******'], + 'Status' => ['description' => '设备证书的状态。取值如下:'."\n" + ."\n" + .'- **0**:表示证书为未激活状态。'."\n" + ."\n" + .'- **1**:表示证书为激活状态。'."\n" + ."\n" + .'> 设备证书注册后,默认为激活状态。', 'type' => 'string', 'example' => '1'], ], ], ], @@ -2678,161 +1812,68 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => ''], ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + 403 => [ + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => ''], ], 500 => [ - [ - 'errorCode' => 'SystemOverFlow', - 'errorMessage' => 'An error occurred while processing your request. Please try again.', + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'FindDeviceBySnError', 'errorMessage' => 'Failed to find the device certificate by the SN. Please check sn is valid', 'description' => ''], + ['errorCode' => 'MqttInstanceNotFound', 'errorMessage' => 'Specified instance is not found', 'description' => ''], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Data\\": {\\n \\"ValidBegin\\": \\"1654137303000\\",\\n \\"ValidEnd\\": \\"1969497303000\\",\\n \\"DeviceSn\\": \\"356217374433******\\",\\n \\"DeviceName\\": \\"mqtt_device\\",\\n \\"DeviceContent\\": \\"-----BEGIN DEVICECERTIFICATE-----\\\\\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\\\\\n-----END DEVICECERTIFICATE-----\\",\\n \\"CaSn\\": \\"00f26900ba87******\\",\\n \\"Status\\": \\"1\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n \\n 1654137303000\\n 1969497303000\\n 356217374433******\\n mqtt_device\\n -----BEGIN DEVICECERTIFICATE-----\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\n-----END DEVICECERTIFICATE-----\\n 00f26900ba87******\\n 1\\n \\n","errorExample":""}]', + 'title' => '获取设备证书详情', + 'description' => '- 仅铂金版和专业版实例支持使用GetDeviceCertificate接口。'."\n" + .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。', + 'extraInfo' => '### 控制台操作'."\n" + .'除了调用GetDeviceCertificate接口,您还可以通过微消息队列MQTT版控制台查看指定设备证书的详细信息。具体操作,请参见[CA证书管理](~~436873~~)。', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:GetDeviceCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"CurrentPage\\": 1,\\n \\"RequestId\\": \\"317076B7-F946-46BC-A98F-4CF9777C****\\",\\n \\"PageSize\\": 2,\\n \\"Total\\": 3,\\n \\"DeviceInfoList\\": [\\n {\\n \\"ChannelId\\": \\"c69fe839209547fa9d073781b9cd****\\",\\n \\"Time\\": \\"2021-05-21 15:51:54.867\\",\\n \\"ActionCode\\": \\"mqtt.trace.action.connect\\",\\n \\"Action\\": \\"connect\\",\\n \\"ActionInfo\\": \\"accept\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"\\n\\n connect\\n mqtt.trace.action.connect\\n accepted\\n \\n 27e1c09a1d7d4944901500db7186****\\n \\n \\n close\\n mqtt.trace.action.close\\n no heart\\n \\n 27e1c09a1d7d4944901500db7186****\\n \\n \\n connect\\n mqtt.trace.action.connect\\n accepted\\n \\n 34022074d3c1403faba6e0334121****\\n \\n 5\\n 1\\n 3\\n 317076B7-F946-46BC-A98F-4CF9777C****\\n","errorExample":""}]', - 'title' => '查询设备轨迹', - 'summary' => '分页查询微消息队列MQTT版客户端的设备轨迹。当设备的状态出现异常时,您可以通过该接口查询指定设备的连接历史,帮助您快速定位异常原因。', - 'description' => '- 每成功调用一次**QueryMqttTraceDevice**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。'."\n" - .'- 本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见[QPS限制](~~163047~~)。', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - 'extraInfo' => '## 控制台操作'."\n" - .'除了调用**QueryMqttTraceDevice**接口,您还可以通过微消息队列MQTT版控制台查看设备轨迹信息。具体操作,请参见[设备轨迹查询](~~140951~~)。', ], - 'QueryMqttTraceMessageOfClient' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'GetDeviceCredential' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'read', + 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'none', - 'abilityTreeCode' => '84627', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', - ], + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ - [ - 'name' => 'MqttRegionId', - 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例地域(Region)的ID。请参见[服务接入点](~~181438~~)。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'cn-hangzhou', - ], - ], - [ - 'name' => 'InstanceId', - 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面的**基础信息**区域查看。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'mqtt-cn-i7m26mf****', - ], - ], [ 'name' => 'ClientId', 'in' => 'query', - 'schema' => [ - 'description' => '需要查询消息列表的设备的Client ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'GID_test@@@producer', - ], - ], - [ - 'name' => 'BeginTime', - 'in' => 'query', - 'schema' => [ - 'description' => '查询范围的起始时间戳。单位:毫秒。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'docRequired' => true, - 'maximum' => '9223372036854774807', - 'minimum' => '-9223372036854774808', - 'example' => '1618646400000', - ], - ], - [ - 'name' => 'EndTime', - 'in' => 'query', - 'schema' => [ - 'description' => '查询范围的终止时间戳。单位:毫秒。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'docRequired' => true, - 'maximum' => '9223372036854774807', - 'minimum' => '-9223372036854774808', - 'example' => '1621591200000', - ], - ], - [ - 'name' => 'CurrentPage', - 'in' => 'query', - 'schema' => [ - 'description' => '当前取第几页消息,从1开始递增。若输入参数大于总页数,则返回结果为空。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => true, - 'docRequired' => true, - 'maximum' => '2147483647', - 'minimum' => '-2147483648', - 'example' => '1', - ], - ], - [ - 'name' => 'PageSize', - 'in' => 'query', - 'schema' => [ - 'description' => '分页查询,每页最多显示的消息数量,最小1条,最多100条。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => true, - 'docRequired' => true, - 'maximum' => '2147483647', - 'minimum' => '-2147483648', - 'example' => '5', - ], + 'schema' => ['description' => '需要查询访问凭证的设备的Client ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test@@@test'], ], [ - 'name' => 'Reverse', + 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '返回结果是否倒序显示。取值说明如下:'."\n" - ."\n" - .'- **true**:按照消息发送或消费时间倒序显示,最后一条发送或消费的消息显示在第一条,最早一条发送或消费的消息显示在最后一条。'."\n" - ."\n" - .'- **false**:按照消息发送或消费时间顺序显示,最早一条发送或消费的消息显示在第一条,最后一条发送或消费的消息显示在最后一条。'."\n" - ."\n" - .'若不输入,则返回结果默认按照消息发送或消费的时间顺序显示。', - 'type' => 'boolean', - 'required' => false, - 'example' => 'false', - ], + 'schema' => ['description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面获取该ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'post-cn-0pp12gl****'], ], ], 'responses' => [ @@ -2840,135 +1881,78 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'CurrentPage' => [ - 'description' => '当前位于第几页。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => 'B096B9D6-62F3-4567-BB59-58D1362E****', - ], - 'PageSize' => [ - 'description' => '每页最多显示的消息数量。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '10', - ], - 'Total' => [ - 'description' => '查询到的消息总数。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '5', - ], - 'MessageOfClientList' => [ - 'description' => '返回的消息列表。', - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'Time' => [ - 'description' => '消息发送的时间或被消费的时间。', - 'type' => 'string', - 'example' => '2021-05-21 15:08:19.234', - ], - 'Action' => [ - 'description' => '消息动作。取值说明如下:'."\n" - ."\n" - .'- **pub_mqtt**:微消息队列MQTT版客户端发送消息。'."\n" - ."\n" - .'- **sub**:微消息队列MQTT版客户端订阅消息。'."\n" - ."\n" - .'- **push_offline**:服务端推送离线消息到微消息队列MQTT版客户端。'."\n" - ."\n" - .'- **ServerPush**:推送至云端消费。', - 'type' => 'string', - 'example' => 'pub_mqtt', - ], - 'ActionCode' => [ - 'description' => '消息动作的返回码。取值说明如下'."\n" - ."\n" - .'- **mqtt.trace.action.msg.pub.mqtt**:消息动作取值为**pub_mqtt**时返回该参数值。'."\n" - ."\n" - .'- **mqtt.trace.action.msg.sub**:消息动作取值为**sub**时返回该参数值。'."\n" - ."\n" - .'- **mqtt.trace.action.msg.push.offline**:消息动作取值为**push_offline**时返回该参数值。'."\n" - ."\n" - .'- **mqtt.trace.action.server.push**:消息动作取值为**ServerPush**时返回该参数值。', - 'type' => 'string', - 'example' => 'mqtt.trace.action.msg.pub.mqtt', - ], - 'ActionInfo' => [ - 'description' => '消息动作的返回信息。取值说明如下:'."\n" - ."\n" - .'- **Pub From Mqtt Client**:消息动作取值为**pub_mqtt**时返回该参数值。'."\n" - ."\n" - .'- **Push To Mqtt Client**:消息动作取值为**sub**时返回该参数值。'."\n" - ."\n" - .'- **Push Offline Msg To Mqtt Client**:消息动作取值为**push_offline**时返回该参数值。'."\n" - ."\n" - .'- **Server Push**:消息动作取值为**ServerPush**时返回该参数值。', - 'type' => 'string', - 'example' => 'Pub From Mqtt Client', - ], - 'MsgId' => [ - 'description' => '消息ID,即Message ID。', - 'type' => 'string', - 'example' => 'AC1EC0030EAB78308DB16A3EC773****', - ], - 'ClientId' => [ - 'description' => '设备的Client ID。', - 'type' => 'string', - 'example' => 'GID_test@@@producer', - ], - ], + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的。', 'type' => 'string', 'example' => 'E4581CCF-62AF-44D9-B5B4-D1DQDC0E****'], + 'DeviceCredential' => [ + 'description' => '设备的访问凭证信息。', + 'type' => 'object', + 'properties' => [ + 'UpdateTime' => ['description' => '设备访问凭证上一次更新的毫秒时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1605541382000'], + 'DeviceAccessKeyId' => ['description' => '设备的AccessKey ID。', 'type' => 'string', 'example' => 'DC.Z5fXh9sRRVufyLi6wo****'], + 'CreateTime' => ['description' => '设备访问凭证创建的毫秒时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1605541382000'], + 'InstanceId' => ['description' => '云消息队列 MQTT 版实例的ID。', 'type' => 'string', 'example' => 'post-cn-0pp12gl****'], + 'DeviceAccessKeySecret' => ['description' => '设备的AccessKey Secret。', 'type' => 'string', 'example' => 'DC.BJMkn4eMQJK2vaApTS****'], + 'ClientId' => ['description' => '设备的Client ID。', 'type' => 'string', 'example' => 'GID_test@@@test'], ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], + ['errorCode' => 'ApplyTokenOverFlow', 'errorMessage' => 'You have applied for tokens too many times. Please try again later.', 'description' => '申请Token频率过高,系统限流,请重试。'], + ['errorCode' => 'CheckAccountInfoFailed', 'errorMessage' => 'An error occurred while checking the account information by the STS token.', 'description' => '解析STS Token账号信息失败。'], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'ParameterCheckFailed', 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'DeviceCredentialNotFound', 'errorMessage' => 'Device Credential Not Found. Check if the device certificate is registered.', 'description' => '设备证书不存在,请检查是否注册了该设备证书'], ], 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], ], 500 => [ - [ - 'errorCode' => 'SystemOverFlow', - 'errorMessage' => 'An error occurred while processing your request. Please try again.', - ], + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => 'MQTT后端服务异常,请重试。'], + ['errorCode' => 'SystemOverFlow', 'errorMessage' => 'An error occurred while processing your request. Please try again.', 'description' => '系统限流,请重试。'], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"CurrentPage\\": 1,\\n \\"RequestId\\": \\"B096B9D6-62F3-4567-BB59-58D1362E****\\",\\n \\"PageSize\\": 10,\\n \\"Total\\": 5,\\n \\"MessageOfClientList\\": [\\n {\\n \\"Time\\": \\"2021-05-21 15:08:19.234\\",\\n \\"Action\\": \\"pub_mqtt\\",\\n \\"ActionCode\\": \\"mqtt.trace.action.msg.pub.mqtt\\",\\n \\"ActionInfo\\": \\"Pub From Mqtt Client\\",\\n \\"MsgId\\": \\"AC1EC0030EAB78308DB16A3EC773****\\",\\n \\"ClientId\\": \\"GID_test@@@producer\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"\\n B096B9D6-62F3-4567-BB59-58D1362E****\\n 10\\n 1\\n 5\\n \\n pub_mqtt\\n mqtt.trace.action.msg.pub.mqtt\\n GID_test@@@producer\\n Pub From Mqtt Client\\n \\n AC1EC0030EAB78308DB16A3EC773****\\n \\n \\n pub_mqtt\\n mqtt.trace.action.msg.pub.mqtt\\n GID_test@@@producer\\n Pub From Mqtt Client\\n \\n AC1EC0030EAB78308DB16A3EC78F****\\n \\n \\n pub_mqtt\\n mqtt.trace.action.msg.pub.mqtt\\n GID_test@@@producer\\n Pub From Mqtt Client\\n \\n AC1EC0030EAB78308DB16A3EC78F****\\n \\n \\n pub_mqtt\\n mqtt.trace.action.msg.pub.mqtt\\n GID_test@@@producer\\n Pub From Mqtt Client\\n \\n AC1EC0030EAB78308DB16A3EC78F****\\n \\n \\n pub_mqtt\\n mqtt.trace.action.msg.pub.mqtt\\n GID_test@@@producer\\n Pub From Mqtt Client\\n \\n AC1EC0030EAB78308DB16A3EC78F****\\n \\n","errorExample":""}]', - 'title' => '查询消息轨迹', - 'summary' => '查询指定设备在一定时间段内的消息列表。当消息的收发不符合预期时,您可以通过该接口查看消息的收发状态等轨迹信息,帮助您快速定位异常原因。', - 'description' => '- 每成功调用一次**QueryMqttTraceMessageOfClient**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。'."\n" - .'- 本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见[QPS限制](~~163047~~)。', - 'requestParamsDescription' => ' ', + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], + ], + 'title' => '查询设备的访问凭证', + 'summary' => '一机一密认证方式下,设备与云消息队列 MQTT 版建立连接时,需要携带提前申请的设备访问凭证信息向云消息队列 MQTT 版发起认证请求,请求通过则允许设备接入服务端。本接口用于查询指定设备的访问凭证。', + 'description' => '- 本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见[QPS限制](~~163047~~)。'."\n" + .'- 每成功调用一次**GetDeviceCredential**接口,都会计算为一次消息TPS,从而影响您的计费。详细信息,请参见[计费说明](~~52819~~)。', + 'requestParamsDescription' => ' > 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', 'responseParamsDescription' => ' ', - 'extraInfo' => '## 控制台操作'."\n" - .'除了调用**QueryMqttTraceMessageOfClient**接口,您还可以通过微消息队列MQTT版控制台查看设备的消息列表。具体操作,请参见[消息轨迹查询](~~205708~~)。', - ], - 'QueryMqttTraceMessagePublish' => [ - 'methods' => [ - 'post', - 'get', + 'extraInfo' => ' ', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetDeviceCredential'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:GetDeviceCredential', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"E4581CCF-62AF-44D9-B5B4-D1DQDC0E****\\",\\n \\"DeviceCredential\\": {\\n \\"UpdateTime\\": 1605541382000,\\n \\"DeviceAccessKeyId\\": \\"DC.Z5fXh9sRRVufyLi6wo****\\",\\n \\"CreateTime\\": 1605541382000,\\n \\"InstanceId\\": \\"post-cn-0pp12gl****\\",\\n \\"DeviceAccessKeySecret\\": \\"DC.BJMkn4eMQJK2vaApTS****\\",\\n \\"ClientId\\": \\"GID_test@@@test\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\nE4581CCF-62AF-44D9-B5B4-D1DQDC0E****\\n\\n post-cn-0pp12gl****\\n DC.BJMkn4eMQJK2vaApTS****\\n 1605541382000\\n 1605541382000\\n DC.Z5fXh9sRRVufyLi6wo****\\n GID_test@@@test\\n\\n","errorExample":""}]', + ], + 'GetRegisterCode' => [ + 'summary' => '注册CA证书到云消息队列 MQTT 版服务端时,需要上传CA证书的验证证书,用于验证用户是否有该CA证书的私钥。CA证书的验证证书需要通过CA证书的注册码生成,本接口用于获取指定CA证书的注册码。', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -2977,501 +1961,286 @@ 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'none', - 'abilityTreeCode' => '84628', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', - ], + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '140814', + 'abilityTreeNodes' => ['FEATUREonsQV6LXV'], ], 'parameters' => [ [ - 'name' => 'MqttRegionId', + 'name' => 'MqttInstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例地域(Region)的ID。请参见[服务接入点](~~181438~~)。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'cn-hangzhou', - ], - ], - [ - 'name' => 'InstanceId', - 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面的**基础信息**区域查看。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'mqtt-cn-i7m26mf****', - ], - ], - [ - 'name' => 'MsgId', - 'in' => 'query', - 'schema' => [ - 'description' => '消息ID,即Message ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'AC1EC0030EAB78308DB16A3EC773****', - ], - ], - [ - 'name' => 'BeginTime', - 'in' => 'query', - 'schema' => [ - 'description' => '查询范围的起始时间戳。单位:毫秒。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'docRequired' => true, - 'maximum' => '9223372036854774807', - 'minimum' => '-9223372036854774808', - 'example' => '1618646400000', - ], - ], - [ - 'name' => 'EndTime', - 'in' => 'query', - 'schema' => [ - 'description' => '查询范围的终止时间戳。单位:毫秒。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'docRequired' => true, - 'maximum' => '9223372036854774807', - 'minimum' => '-9223372036854774808', - 'example' => '1621591200000', - ], + 'schema' => ['description' => '云消息队列 MQTT 版的实例ID。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-7mz2d******'], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '69AD5550-BF22-438A-9202-A6E89185****', - ], - 'MessageTraceLists' => [ - 'description' => '返回的消息发送轨迹列表。', - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'Time' => [ - 'description' => '消息的发送时间。', - 'type' => 'string', - 'example' => '2021-05-21 15:08:19.210', - ], - 'Action' => [ - 'description' => '消息动作。取值说明如下:'."\n" - ."\n" - .'- **pub_mqtt**:表示消息的发送者是云消息队列 MQTT 版客户端。'."\n" - ."\n" - .'- **pub_mq**:表示消息的发送者是云消息队列 RocketMQ 版客户端。'."\n" - ."\n" - .'- **ServerSend**:表示消息的发送者是云端SDK。', - 'type' => 'string', - 'example' => 'pub_mqtt', - ], - 'ActionCode' => [ - 'description' => '消息动作的返回码。取值说明如下:'."\n" - ."\n" - .'- **mqtt.trace.action.msg.pub.mqtt**:消息动作取值为**pub_mqtt**时返回该参数值。'."\n" - ."\n" - .'- **mqtt.trace.action.msg.pub.mq**:消息动作取值为**pub_mq**时返回该参数值。'."\n" - ."\n" - .'- **mqtt.trace.action.msg.server.send**:消息动作取值为**ServerSend**时返回该参数值。', - 'type' => 'string', - 'example' => 'mqtt.trace.action.msg.pub.mqtt', - ], - 'ActionInfo' => [ - 'description' => '消息动作的说明信息。取值说明如下:'."\n" - ."\n" - .'- **Pub From Mqtt Client**:消息动作取值为**pub_mqtt**时返回该参数值。'."\n" - ."\n" - .'- **Pub From MQ**:消息动作取值为**pub_mq**时返回该参数值。'."\n" - ."\n" - .'- **Server Send**:消息动作取值为**ServerSend**时返回该参数值。', - 'type' => 'string', - 'example' => 'Pub From Mqtt Client', - ], - 'MsgId' => [ - 'description' => '消息ID,即Message ID。', - 'type' => 'string', - 'example' => 'AC1EC0030EAB78308DB16A3EC773BD95', - ], - 'ClientId' => [ - 'description' => '发送消息的客户端ID。', - 'type' => 'string', - 'example' => 'GID_test@@@producer', - ], - ], - ], - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], + 'RegisterCode' => ['title' => '注册码', 'description' => '返回的CA证书的注册码。', 'type' => 'string', 'example' => '13274673-8f90-4630-bea1-9cccb25756ad2089******'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => ''], ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + 403 => [ + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => ''], ], 500 => [ - [ - 'errorCode' => 'SystemOverFlow', - 'errorMessage' => 'An error occurred while processing your request. Please try again.', + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'MqttInstanceNotFound', 'errorMessage' => 'Specified instance is not found', 'description' => ''], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"RegisterCode\\": \\"13274673-8f90-4630-bea1-9cccb25756ad2089******\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 13274673-8f90-4630-bea1-9cccb25756ad2089******\\n","errorExample":""}]', + 'title' => '获取CA证书注册码', + 'description' => '- 仅铂金版和专业版实例支持使用GetRegisterCode接口。'."\n" + .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:GetRegisterCode', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"69AD5550-BF22-438A-9202-A6E89185****\\",\\n \\"MessageTraceLists\\": [\\n {\\n \\"Time\\": \\"2021-05-21 15:08:19.210\\",\\n \\"Action\\": \\"pub_mqtt\\",\\n \\"ActionCode\\": \\"mqtt.trace.action.msg.pub.mqtt\\",\\n \\"ActionInfo\\": \\"Pub From Mqtt Client\\",\\n \\"MsgId\\": \\"AC1EC0030EAB78308DB16A3EC773BD95\\",\\n \\"ClientId\\": \\"GID_test@@@producer\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"\\n \\n pub_mqtt\\n mqtt.trace.action.msg.pub.mqtt\\n GID_test@@@producer\\n \\n Pub From Mqtt Client\\n AC1EC0030EAB78308DB16A3EC773****\\n \\n 69AD5550-BF22-438A-9202-A6E89185****\\n","errorExample":""}]', - 'title' => '查询消息发送轨迹', - 'summary' => '查询指定消息的发送轨迹。当消息的收发不符合预期时,您可以通过该接口查看消息的发布时间、发布客户端等详细信息,帮助您快速定位异常原因。', - 'description' => '- 每成功调用一次**QueryMqttTraceMessagePublish**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。'."\n" - .'- 本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见[QPS限制](~~163047~~)。', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - 'extraInfo' => '## 控制台操作'."\n" - .'除了调用**QueryMqttTraceMessagePublish**接口,您还可以通过微消息队列MQTT版控制台查看消息的发送轨迹。具体操作,请参见[消息轨迹查询](~~205708~~)。', ], - 'QueryMqttTraceMessageSubscribe' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'InactivateCaCertificate' => [ + 'summary' => '微消息队列MQTT版支持X.509证书认证,客户端可通过设备证书完成接入认证。CA证书用于为客户端签发设备证书,并验证设备证书的正确性。'."\n" + .'若您暂时不需要使用某个CA证书,可通过本接口注销CA证书,将CA证书状态变成未激活。当您需要继续使用该CA证书时,可通过ActiveCaCertificate接口将CA证书重新激活。', + 'methods' => ['get', 'post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'read', + 'deprecated' => false, 'systemTags' => [ 'operationType' => 'none', - 'abilityTreeCode' => '84629', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', - ], + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREonsQV6LXV'], ], 'parameters' => [ [ - 'name' => 'MqttRegionId', + 'name' => 'MqttInstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例地域(Region)的ID。请参见[服务接入点](~~181438~~)。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'cn-hangzhou', - ], + 'schema' => ['description' => 'CA证书所绑定的实例ID,即云消息队列 MQTT 版的实例ID。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-7mz2d******'], ], [ - 'name' => 'InstanceId', + 'name' => 'Sn', 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面的**基础信息**区域查看。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'mqtt-cn-i7m26mf****', - ], + 'schema' => ['description' => '待注销CA证书的SN序列号,用于唯一标识一个CA证书。'."\n" + ."\n" + .'取值范围:不超过128 Byte。', 'type' => 'string', 'required' => true, 'example' => '007269004887******'], ], - [ - 'name' => 'Reverse', - 'in' => 'query', + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '返回结果是否倒序显示。取值说明如下:'."\n" - ."\n" - .'- **true**:按照消息的投递时间倒序显示,最后一条消费的消息显示在第一条,最早一条消费的消息显示在最后一条。'."\n" - ."\n" - .'- **false**:按照消息的投递时间顺序显示,最早一条消费的消息显示在第一条,最后一条消费的消息显示在最后一条。'."\n" - ."\n" - .'若不输入,则返回结果默认按照消息的投递时间顺序显示。', - 'type' => 'boolean', - 'required' => false, - 'docRequired' => true, - 'example' => 'false', + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['title' => 'Id of the request', 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], + 'Sn' => ['description' => '已注销CA证书的SN序列号,用于唯一标识一个CA证书。', 'type' => 'string', 'example' => '007269004887******'], + ], ], ], - [ - 'name' => 'ClientId', - 'in' => 'query', - 'schema' => [ - 'description' => '指定订阅消息的客户端ID。若不输入,则返回所有订阅该消息的客户端信息。', - 'type' => 'string', - 'required' => false, - 'docRequired' => true, - 'example' => 'GID_test@@@consumer', - ], + ], + 'errorCodes' => [ + 403 => [ + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => 'ram权限检查失败'], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => ''], ], + 500 => [ + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'FindCaBySnError', 'errorMessage' => 'Failed to find the CA by the SN. Please check sn is valid.', 'description' => ''], + ['errorCode' => 'MqttInstanceNotFound', 'errorMessage' => 'Specified instance is not found', 'description' => ''], + ], + ], + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], + ], + 'title' => '注销CA证书', + 'description' => '- 仅铂金版和专业版实例支持使用InactivateCaCertificate接口。'."\n" + .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系微消息队列MQTT版技术支持,钉钉群号:35228338。'."\n" + .'- InactivateCaCertificate接口仅支持对已在微消息队列MQTT版服务端注册的CA证书进行操作,您可以通过[ListCaCertificate](~~2604958~~)接口查询指定实例下已注册的CA证书。', + 'extraInfo' => '### 控制台操作'."\n" + .'除了调用InactivateCaCertificate接口,您还可以通过微消息队列MQTT版控制台注销指定的CA证书。具体操作,请参见[CA证书管理](~~436873~~)。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'InactivateCaCertificate'], + ], + ], + 'ramActions' => [ [ - 'name' => 'BeginTime', - 'in' => 'query', - 'schema' => [ - 'description' => '查询范围的起始时间戳。单位:毫秒。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'docRequired' => true, - 'maximum' => '9223372036854774807', - 'minimum' => '-9223372036854774808', - 'example' => '1621936800000', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:UnregisterCaCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], ], ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Sn\\": \\"007269004887******\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 007269004887******\\n","errorExample":""}]', + ], + 'InactivateDeviceCertificate' => [ + 'summary' => '设备证书是由CA根证书签发给客户端设备使用的数字证书,用于客户端和服务端连接时,服务端对客户端进行安全认证。认证通过后服务端和客户端可基于证书内的加密密钥进行安全通信,若认证不通过则服务端拒绝客户端接入。'."\n" + .'若您暂时不需要使用某个设备证书,可通过该接口注销设备证书,将设备证书状态变成未激活。', + 'methods' => ['get', 'post'], + 'schemes' => ['http', 'https'], + 'security' => [ [ - 'name' => 'EndTime', - 'in' => 'query', - 'schema' => [ - 'description' => '查询范围的终止时间戳。单位:毫秒。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'docRequired' => true, - 'maximum' => '9223372036854774807', - 'minimum' => '-9223372036854774808', - 'example' => '1618646400000', - ], + 'AK' => [], ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'none', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREons0PHGX2'], + ], + 'parameters' => [ [ - 'name' => 'CurrentPage', + 'name' => 'MqttInstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '当前取第几页消息,从1开始递增。若输入参数大于总页数,则返回结果为空。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => true, - 'docRequired' => true, - 'maximum' => '2147483647', - 'minimum' => '-2147483648', - 'example' => '1', - ], + 'schema' => ['description' => '设备证书所绑定的实例ID,即云消息队列 MQTT 版的实例ID。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-7mz2d******'], ], [ - 'name' => 'PageSize', + 'name' => 'DeviceSn', 'in' => 'query', - 'schema' => [ - 'description' => '分页查询,每页最多显示的消息数量,最小1条,最多100条。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => true, - 'docRequired' => true, - 'maximum' => '2147483647', - 'minimum' => '-2147483648', - 'example' => '5', - ], + 'schema' => ['description' => '待注销设备证书的SN序列号,用于唯一标识一个设备证书。', 'type' => 'string', 'required' => true, 'example' => '356217374433******'], ], [ - 'name' => 'MsgId', + 'name' => 'CaSn', 'in' => 'query', - 'schema' => [ - 'description' => '消息ID,即Message ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'AC1EC1B33D5978308DB17F3245E4****', - 'maxLength' => 2147483647, - 'minLength' => 0, - ], + 'schema' => ['description' => '待注销设备证书所属的CA证书的SN序列号,用于唯一标识一个CA证书。'."\n" + ."\n" + .'取值范围:不超过128 Byte。', 'type' => 'string', 'required' => true, 'example' => '007269004887******'], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'CurrentPage' => [ - 'description' => '当前位于第几页。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'RequestId' => [ - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '4E685844-ADAF-4D85-9EAC-F9471E8C****', - ], - 'PageSize' => [ - 'description' => '每页最多显示的消息数量。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '5', - ], - 'Total' => [ - 'description' => '查询到的消息轨迹总数。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '2', - ], - 'MessageTraceLists' => [ - 'description' => '返回的消息投递轨迹列表。', - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'Time' => [ - 'description' => '消息的投递时间。', - 'type' => 'string', - 'example' => '2021-05-25 16:46:41.274', - ], - 'Action' => [ - 'description' => '消息动作。取值说明如下:'."\n" - ."\n" - .'- **sub**:微消息队列MQTT版客户端订阅消息。'."\n" - ."\n" - .'- **push_offline**:服务端推送离线消息到微消息队列MQTT版客户端。', - 'type' => 'string', - 'example' => 'sub', - ], - 'ActionCode' => [ - 'description' => '消息动作的返回码。取值说明如下:'."\n" - ."\n" - .'- **mqtt.trace.action.msg.sub**:消息动作取值为**sub**时返回该参数值。'."\n" - ."\n" - .'- **mqtt.trace.action.msg.push.offline**:消息动作取值为**push_offline**时返回该参数值。', - 'type' => 'string', - 'example' => 'mqtt.trace.action.msg.sub', - ], - 'ActionInfo' => [ - 'description' => '消息动作的说明信息。取值说明如下:'."\n" - ."\n" - .'- **Push To Mqtt Client**:消息动作取值为**sub**时返回该参数值。'."\n" - ."\n" - .'- **Push Offline Msg To Mqtt Client**:消息动作取值为**push_offline**时返回该参数值。', - 'type' => 'string', - 'example' => 'Push To Mqtt Client', - ], - 'MsgId' => [ - 'description' => '消息ID,即Message ID。', - 'type' => 'string', - 'example' => 'AC1EC1B33D5978308DB17F3245E4****', - ], - 'ClientId' => [ - 'description' => '订阅消息的客户端ID。', - 'type' => 'string', - 'example' => 'GID_test@@@consumer', - ], - ], - ], - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], + 'DeviceSn' => ['description' => '已注销设备证书的SN序列号,用于唯一标识一个设备证书。', 'type' => 'string', 'example' => '356217374433******'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + 403 => [ + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => 'ram权限检查失败'], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => ''], ], 500 => [ - [ - 'errorCode' => 'SystemOverFlow', - 'errorMessage' => 'An error occurred while processing your request. Please try again.', - ], + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'FindDeviceBySnError', 'errorMessage' => 'Failed to find the device certificate by the SN. Please check sn is valid', 'description' => ''], + ['errorCode' => 'MqttInstanceNotFound', 'errorMessage' => 'Specified instance is not found', 'description' => ''], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"CurrentPage\\": 1,\\n \\"RequestId\\": \\"4E685844-ADAF-4D85-9EAC-F9471E8C****\\",\\n \\"PageSize\\": 5,\\n \\"Total\\": 2,\\n \\"MessageTraceLists\\": [\\n {\\n \\"Time\\": \\"2021-05-25 16:46:41.274\\",\\n \\"Action\\": \\"sub\\",\\n \\"ActionCode\\": \\"mqtt.trace.action.msg.sub\\",\\n \\"ActionInfo\\": \\"Push To Mqtt Client\\",\\n \\"MsgId\\": \\"AC1EC1B33D5978308DB17F3245E4****\\",\\n \\"ClientId\\": \\"GID_test@@@consumer\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"\\n \\n sub\\n mqtt.trace.action.msg.sub\\n GID_test@@@consumer\\n Push To Mqtt Client\\n \\n AC1EC1B33D5978308DB17F3245E4****\\n \\n \\n sub\\n mqtt.trace.action.msg.sub\\n GID_test@@@consumer2\\n Push To Mqtt Client\\n \\n AC1EC1B33D5978308DB17F3245E4****\\n \\n 4E685844-ADAF-4D85-9EAC-F9471E8C****\\n 5\\n 1\\n 2\\n","errorExample":""}]', - 'title' => '查询消息消费轨迹', - 'summary' => '查询指定消息的投递轨迹。当消息的收发不符合预期时,您可以通过该接口查看订阅该消息的客户端、消息的投递时间等详细信息,帮助您快速定位异常原因。', - 'description' => '- 每成功调用一次**QueryMqttTraceMessageSubscribe**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。'."\n" - .'- 本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见[QPS限制](~~163047~~)。', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - 'extraInfo' => '## 控制台操作'."\n" - .'除了调用**QueryMqttTraceMessageSubscribe**接口,您还可以通过微消息队列MQTT版控制台查看消息的投递轨迹。具体操作,请参见[消息轨迹查询](~~205708~~)。', - ], - 'RegisterCaCertificate' => [ - 'summary' => '云消息队列 MQTT 版支持X.509证书认证,客户端可通过设备证书完成接入认证。CA证书用于为客户端签发设备证书,并验证设备证书的正确性,您需要先将申请的CA证书注册到云消息队列 MQTT 版的服务端上,才能用于认证设备证书。本接口用于将指定CA证书注册到云消息队列 MQTT 版服务端。', - 'methods' => [ - 'post', - 'get', + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], + ], + 'title' => ' 注销设备证书', + 'description' => '- 仅铂金版和专业版实例支持使用 InactivateDeviceCertificate接口。'."\n" + .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。', + 'extraInfo' => '### 控制台操作'."\n" + .'除了调用InactivateDeviceCertificate接口,您还可以通过微消息队列MQTT版控制台注销设备证书。具体操作,请参见[设备证书管理](~~449435~~) 。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'InactivateDeviceCertificate'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:UnregisterDeviceCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"DeviceSn\\": \\"356217374433******\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 356217374433******\\n","errorExample":""}]', + ], + 'ListCaCertificate' => [ + 'summary' => '云消息队列 MQTT 版支持X.509证书认证,客户端可通过设备证书完成接入认证。CA证书用于为客户端签发设备证书,并验证设备证书的正确性。'."\n" + .'本接口用于查询指定实例下所有注册的CA证书。', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'create', + 'operationType' => 'list', 'riskType' => 'high', 'chargeType' => 'free', - 'abilityTreeCode' => '141175', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', - ], + 'abilityTreeCode' => '141168', + 'abilityTreeNodes' => ['FEATUREonsQV6LXV'], ], 'parameters' => [ [ 'name' => 'MqttInstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版的实例ID。注册CA证书时,需要指定一个实例进行绑定。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-7mz2d******', - ], + 'schema' => ['description' => '云消息队列 MQTT 版的实例ID,表示需要查看哪个实例下的所有CA证书。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-7mz2d******'], ], [ - 'name' => 'CaName', + 'name' => 'PageNo', 'in' => 'query', - 'schema' => [ - 'description' => '待注册CA证书的名称。', - 'type' => 'string', - 'required' => true, - 'example' => 'mqtt_ca', - ], + 'schema' => ['description' => '查询第几页的返回结果。起始页从第1页开始计算。', 'type' => 'string', 'required' => true, 'example' => '2'], ], [ - 'name' => 'CaContent', + 'name' => 'PageSize', 'in' => 'query', - 'schema' => [ - 'description' => '待注册CA证书的内容。'."\n" - ."\n" - .'> 示例中的\\n表示换行。', - 'type' => 'string', - 'required' => true, - 'example' => '-----BEGIN CERTIFICATE-----\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\n-----END CERTIFICATE-----', - ], - ], - [ - 'name' => 'VerificationContent', - 'in' => 'query', - 'schema' => [ - 'description' => '待注册CA证书的验证证书的内容。和CA证书的注册码一起使用,用于验证用户拥有该CA证书的私钥。'."\n" - .'> 示例中的\\n表示换行。', - 'type' => 'string', - 'required' => true, - 'example' => '-----BEGIN CERTIFICATE-----\\nMIID/DCCAu+Y5sRMpp9tnd+4s******\\n-----END CERTIFICATE-----', - ], + 'schema' => ['description' => '每页最多显示几条查询记录。'."\n" + ."\n" + .'取值范围:1~100。', 'type' => 'string', 'required' => true, 'example' => '10'], ], ], 'responses' => [ @@ -3481,16 +2250,39 @@ 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], - 'Sn' => [ - 'description' => '已注册的CA证书的SN序列号,用于唯一标识一个CA证书。', - 'type' => 'string', - 'example' => '007269004887******', + 'RequestId' => ['title' => 'Id of the request', 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], + 'Data' => [ + 'description' => '查询结果。', + 'type' => 'object', + 'properties' => [ + 'Total' => ['description' => '查询结果最大页数。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'PageNo' => ['description' => '当前返回的查询记录是第几页。', 'type' => 'integer', 'format' => 'int32', 'example' => '2'], + 'PageSize' => ['description' => '每页显示的最大结果数。', 'type' => 'integer', 'format' => 'int32', 'example' => '10'], + 'CaCertificateVOS' => [ + 'description' => 'CA证书的详细信息。', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'RegistrationCode' => ['description' => 'CA证书的注册码。', 'type' => 'string', 'example' => '13274673-8f90-4630-bea1-9cccb25756ad2089******'], + 'CaName' => ['description' => 'CA证书的名称。', 'type' => 'string', 'example' => 'mqtt_ca'], + 'Sn' => ['description' => 'CA证书的SN序列号。', 'type' => 'string', 'example' => '007269004887******'], + 'CaContent' => ['description' => 'CA证书内容。'."\n" + .'> \\n表示换行。', 'type' => 'string', 'example' => '-----BEGIN CERTIFICATE-----\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\n-----END CERTIFICATE-----'], + 'VerificationContent' => ['description' => '验证证书内容。'."\n" + .'> \\n表示换行。', 'type' => 'string', 'example' => '-----BEGIN CERTIFICATE-----\\nMIID/DCCAu+Y5sRMpp9tnd+4s******\\n-----END CERTIFICATE-----'], + 'ValidBegin' => ['description' => 'CA证书生效的起始时间。格式为毫秒级别的Unix时间戳。', 'type' => 'string', 'example' => '1654137303000'], + 'ValidEnd' => ['description' => 'CA证书生效的终止时间。格式为毫秒级别的Unix时间戳。', 'type' => 'string', 'example' => '1969497303000'], + 'Status' => ['description' => 'CA证书的状态。取值如下:'."\n" + ."\n" + .'- **0**:表示证书为未激活状态。'."\n" + .'- **1**:表示证书为激活状态。'."\n" + ."\n" + .'> CA证书注册后,默认为激活状态。', 'type' => 'string', 'example' => '1'], + ], + ], + ], + ], ], ], ], @@ -3498,78 +2290,50 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => '实例权限校验失败'], ], 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', - ], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => 'ram权限检查失败'], ], 500 => [ - [ - 'errorCode' => 'RegisterCodeError', - 'errorMessage' => 'Register code error in verification certificate.', - ], - [ - 'errorCode' => 'RegisterCodeUsed', - 'errorMessage' => 'Register code has been used.', - ], - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'GetCaNumError', - 'errorMessage' => 'Failed to get ca num. Try again later.', - ], - [ - 'errorCode' => 'CaNumExceed', - 'errorMessage' => 'CA certificate num exceed', - ], - [ - 'errorCode' => 'CertificateContentError', - 'errorMessage' => 'Certificate content error, please check ca/verification certificate content. BasicConstraints extension should be set to true in CA certificate', - ], - [ - 'errorCode' => 'SnNotUnique', - 'errorMessage' => 'Sn is not unique in gloabal', - ], - [ - 'errorCode' => 'MqttInstanceNotFound', - 'errorMessage' => 'Specified instance is not found', - ], + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'MqttInstanceNotFound', 'errorMessage' => 'Specified instance is not found', 'description' => ''], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Sn\\": \\"007269004887******\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 007269004887******\\n","errorExample":""}]', - 'title' => '注册CA证书', - 'description' => '- 仅铂金版和专业版实例支持使用RegisterCaCertificate接口。'."\n" - .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Data\\": {\\n \\"Total\\": 1,\\n \\"PageNo\\": 2,\\n \\"PageSize\\": 10,\\n \\"CaCertificateVOS\\": [\\n {\\n \\"RegistrationCode\\": \\"13274673-8f90-4630-bea1-9cccb25756ad2089******\\",\\n \\"CaName\\": \\"mqtt_ca\\",\\n \\"Sn\\": \\"007269004887******\\",\\n \\"CaContent\\": \\"-----BEGIN CERTIFICATE-----\\\\\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\\\\\n-----END CERTIFICATE-----\\",\\n \\"VerificationContent\\": \\"-----BEGIN CERTIFICATE-----\\\\\\\\nMIID/DCCAu+Y5sRMpp9tnd+4s******\\\\\\\\n-----END CERTIFICATE-----\\",\\n \\"ValidBegin\\": \\"1654137303000\\",\\n \\"ValidEnd\\": \\"1969497303000\\",\\n \\"Status\\": \\"1\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n \\n 1\\n 2\\n 10\\n \\n 13274673-8f90-4630-bea1-9cccb25756ad2089******\\n mqtt_ca\\n 007269004887******\\n -----BEGIN CERTIFICATE-----\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\n-----END CERTIFICATE-----\\n -----BEGIN CERTIFICATE-----\\\\nMIID/DCCAu+Y5sRMpp9tnd+4s******\\\\n-----END CERTIFICATE-----\\n 1654137303000\\n 1969497303000\\n 1\\n \\n \\n","errorExample":""}]', + 'title' => '查询CA证书列表', + 'description' => '- 仅铂金版和专业版实例支持使用ListCaCertificate接口。'."\n" + .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系微消息队列MQTT版技术支持,钉钉群号:35228338。', 'extraInfo' => '### 控制台操作'."\n" - .'除了调用RegisterCaCertificate接口,您还可以通过微消息队列MQTT版控制台注册CA证书。具体操作,请参见[CA证书管理](~~436873~~)。', - ], - 'ActiveCaCertificate' => [ - 'summary' => '云消息队列 MQTT 版支持X.509证书认证,客户端可通过设备证书完成接入认证。CA证书用于为客户端签发设备证书,并验证设备证书的正确性,需要在激活状态下使用。'."\n" - .'CA证书注册后默认为激活状态,若您需要使用的CA证书被修改为未激活状态,您可以调用本接口将CA证书重新激活。', - 'methods' => [ - 'get', - 'post', + .'除了调用ListCaCertificate接口,您还可以通过微消息队列MQTT版控制台查看指定实例下所有已注册的CA证书。具体操作,请参见[CA证书管理](~~436873~~)。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListCaCertificate'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'mq:ListCaCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + ], ], + ], + 'ListDeviceCertificate' => [ + 'summary' => '设备证书是由CA根证书签发给客户端设备使用的数字证书,用于客户端和服务端连接时,服务端对客户端进行安全认证。认证通过后服务端和客户端可基于证书内的加密密钥进行安全通信,若认证不通过则服务端拒绝客户端接入。'."\n" + .'本接口用于查询指定实例下所有注册的设备证书。', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -3578,35 +2342,29 @@ 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', + 'operationType' => 'list', + 'riskType' => 'high', 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATUREonsQV6LXV', - ], + 'abilityTreeCode' => '145872', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ [ 'name' => 'MqttInstanceId', 'in' => 'query', - 'schema' => [ - 'description' => 'CA证书所绑定的实例ID,即云消息队列 MQTT 版的实例ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-7mz2d******', - ], + 'schema' => ['description' => '云消息队列 MQTT 版的实例ID,表示需要查看哪个实例下的所有设备证书。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-7mz2d******'], ], [ - 'name' => 'Sn', + 'name' => 'PageNo', 'in' => 'query', - 'schema' => [ - 'description' => '待激活CA证书的SN序列号,用于唯一标识一个CA证书。'."\n" - ."\n" - .'取值范围:不超过128 Byte。', - 'type' => 'string', - 'required' => true, - 'example' => '007269004887******', - ], + 'schema' => ['description' => '查询第几页的返回结果。起始页从第1页开始计算。', 'type' => 'string', 'required' => true, 'example' => '2'], + ], + [ + 'name' => 'PageSize', + 'in' => 'query', + 'schema' => ['description' => '每页最多显示几条查询记录。'."\n" + ."\n" + .'取值范围:1~100。', 'type' => 'string', 'required' => true, 'example' => '10'], ], ], 'responses' => [ @@ -3616,16 +2374,39 @@ 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], - 'Sn' => [ - 'description' => '已激活CA证书的SN序列号,用于唯一标识一个CA证书。', - 'type' => 'string', - 'example' => '007269004887******', + 'RequestId' => ['title' => 'Id of the request', 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], + 'Data' => [ + 'description' => '查询结果。', + 'type' => 'object', + 'properties' => [ + 'Total' => ['description' => '查询结果最大页数。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'PageNo' => ['description' => '当前返回的查询记录是第几页。', 'type' => 'integer', 'format' => 'int32', 'example' => '2'], + 'PageSize' => ['description' => '每页显示的最大结果数。', 'type' => 'integer', 'format' => 'int32', 'example' => '10'], + 'DeviceCertificateVOS' => [ + 'description' => '设备证书的详细信息。', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'ValidBegin' => ['description' => '设备证书生效的起始时间。格式为毫秒级别的Unix时间戳。', 'type' => 'string', 'example' => '1654137303000'], + 'ValidEnd' => ['description' => '设备证书生效的终止时间。格式为毫秒级别的Unix时间戳。', 'type' => 'string', 'example' => '1969497303000'], + 'DeviceSn' => ['description' => '设备证书的SN序列号,用于唯一标识一个设备证书。', 'type' => 'string', 'example' => '356217374433******'], + 'DeviceContent' => ['description' => '设备证书的内容。'."\n" + ."\n" + .'\\n表示换行。', 'type' => 'string', 'example' => '-----BEGIN DEVICECERTIFICATE-----\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\n-----END DEVICECERTIFICATE-----'], + 'Status' => ['description' => '设备证书的状态。取值如下:'."\n" + ."\n" + .'- 0:表示证书为未激活状态。'."\n" + ."\n" + .'- 1:表示证书为激活状态。'."\n" + ."\n" + .'设备证书注册后,默认为激活状态。', 'type' => 'string', 'example' => '1'], + 'CaSn' => ['description' => '设备证书所属的CA证书的SN序列号,用于唯一标识一个CA证书。', 'type' => 'string', 'example' => '00f26900ba87******'], + 'DeviceName' => ['description' => '设备证书的名称。', 'type' => 'string', 'example' => 'mqtt_device'], + ], + ], + ], + ], ], ], ], @@ -3633,59 +2414,47 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', - ], - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => ''], ], 500 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'FindCaBySnError', - 'errorMessage' => 'Failed to find the CA by the SN. Please check sn is valid.', + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'FindDeviceBySnError', 'errorMessage' => 'Failed to find the device certificate by the SN. Please check sn is valid', 'description' => ''], + ['errorCode' => 'MqttInstanceNotFound', 'errorMessage' => 'Specified instance is not found', 'description' => ''], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Data\\": {\\n \\"Total\\": 1,\\n \\"PageNo\\": 2,\\n \\"PageSize\\": 10,\\n \\"DeviceCertificateVOS\\": [\\n {\\n \\"ValidBegin\\": \\"1654137303000\\",\\n \\"ValidEnd\\": \\"1969497303000\\",\\n \\"DeviceSn\\": \\"356217374433******\\",\\n \\"DeviceContent\\": \\"-----BEGIN DEVICECERTIFICATE-----\\\\\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\\\\\n-----END DEVICECERTIFICATE-----\\",\\n \\"Status\\": \\"1\\",\\n \\"CaSn\\": \\"00f26900ba87******\\",\\n \\"DeviceName\\": \\"mqtt_device\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n \\n 1\\n 2\\n 10\\n \\n 1654137303000\\n 1969497303000\\n 356217374433******\\n -----BEGIN DEVICECERTIFICATE-----\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\n-----END DEVICECERTIFICATE-----\\n 1\\n 00f26900ba87******\\n mqtt_device\\n \\n \\n","errorExample":""}]', + 'title' => '查询设备证书列表', + 'description' => '- 仅铂金版和专业版实例支持使用ListDeviceCertificate接口。'."\n" + .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。', + 'extraInfo' => '### 控制台操作'."\n" + .'除了调用ListDeviceCertificate接口,您还可以通过微消息队列MQTT版控制台查看指定实例下所有注册的设备证书。具体操作,请参见[设备证书管理](~~449435~~)。', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'mq:ListDeviceCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], ], - [ - 'errorCode' => 'MqttInstanceNotFound', - 'errorMessage' => 'Specified instance is not found', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], ], ], ], - 'eventInfo' => [ - 'enable' => false, - 'eventNames' => [], - ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Sn\\": \\"007269004887******\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 007269004887******\\n","errorExample":""}]', - 'title' => '激活CA证书', - 'description' => '- 仅铂金版和专业版实例支持使用ActiveCaCertificate接口。'."\n" - .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。'."\n" - .'- ActiveCaCertificate接口仅支持对已在云消息队列 MQTT 版服务端注册的CA证书进行操作,您可以通过[ListCaCertificate](~~2604958~~)接口查询指定实例下已注册的CA证书。', - 'extraInfo' => '### 控制台操作'."\n" - .'除了调用ActiveCaCertificate接口,您还可以通过微消息队列MQTT版控制台激活CA证书。具体操作,请参见[CA证书管理](~~436873~~)。', ], - 'InactivateCaCertificate' => [ - 'summary' => '微消息队列MQTT版支持X.509证书认证,客户端可通过设备证书完成接入认证。CA证书用于为客户端签发设备证书,并验证设备证书的正确性。'."\n" - .'若您暂时不需要使用某个CA证书,可通过本接口注销CA证书,将CA证书状态变成未激活。当您需要继续使用该CA证书时,可通过ActiveCaCertificate接口将CA证书重新激活。', - 'methods' => [ - 'get', - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'ListDeviceCertificateByCaSn' => [ + 'summary' => '设备证书是由CA根证书签发给客户端设备使用的数字证书,用于客户端和服务端连接时,服务端对客户端进行安全认证。认证通过后服务端和客户端可基于证书内的加密密钥进行安全通信,若认证不通过则服务端拒绝客户端接入。'."\n" + .'本接口用于查询由指定CA证书签发且已在微消息队列MQTT版服务端注册的所有设备证书。', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -3694,35 +2463,34 @@ 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', + 'operationType' => 'list', + 'riskType' => 'high', 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATUREonsQV6LXV', - ], + 'abilityTreeCode' => '145874', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ [ 'name' => 'MqttInstanceId', 'in' => 'query', - 'schema' => [ - 'description' => 'CA证书所绑定的实例ID,即云消息队列 MQTT 版的实例ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-7mz2d******', - ], + 'schema' => ['description' => 'CA证书所绑定的实例ID,即云消息队列 MQTT 版的实例ID。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-7mz2d******'], ], [ - 'name' => 'Sn', + 'name' => 'PageNo', 'in' => 'query', - 'schema' => [ - 'description' => '待注销CA证书的SN序列号,用于唯一标识一个CA证书。'."\n" - ."\n" - .'取值范围:不超过128 Byte。', - 'type' => 'string', - 'required' => true, - 'example' => '007269004887******', - ], + 'schema' => ['description' => '查询第几页的返回结果。起始页从第1页开始计算。', 'type' => 'string', 'required' => true, 'example' => '2'], + ], + [ + 'name' => 'PageSize', + 'in' => 'query', + 'schema' => ['description' => '每页最多显示几条查询记录。'."\n" + ."\n" + .'取值范围:1~100。', 'type' => 'string', 'required' => true, 'example' => '10'], + ], + [ + 'name' => 'CaSn', + 'in' => 'query', + 'schema' => ['description' => '待查询CA证书的SN序列码,表示查询哪一个CA证书下所有已注册的设备证书。', 'type' => 'string', 'required' => true, 'example' => '007269004887******'], ], ], 'responses' => [ @@ -3732,69 +2500,85 @@ 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], - 'Sn' => [ - 'description' => '已注销CA证书的SN序列号,用于唯一标识一个CA证书。', - 'type' => 'string', - 'example' => '007269004887******', + 'RequestId' => ['title' => 'Id of the request', 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], + 'Data' => [ + 'description' => '查询结果。', + 'type' => 'object', + 'properties' => [ + 'Total' => ['description' => '查询结果总数。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'PageNo' => ['description' => '当前返回的查询记录是第几页。', 'type' => 'integer', 'format' => 'int32', 'example' => '2'], + 'PageSize' => ['description' => '每页显示的最大结果数。', 'type' => 'integer', 'format' => 'int32', 'example' => '10'], + 'DeviceCertificateVOS' => [ + 'description' => '设备证书的详细信息。', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'ValidBegin' => ['description' => '设备证书生效的起始时间。格式为毫秒级别的Unix时间戳。', 'type' => 'string', 'example' => '1654137303000'], + 'ValidEnd' => ['description' => '设备证书生效的终止时间。格式为毫秒级别的Unix时间戳。', 'type' => 'string', 'example' => '1969497303000'], + 'DeviceSn' => ['description' => '设备证书的SN序列号,用于唯一标识一个设备证书。', 'type' => 'string', 'example' => '356217374433******'], + 'DeviceContent' => ['description' => '设备证书的内容。'."\n" + ."\n" + .'\\n表示换行。', 'type' => 'string', 'example' => '-----BEGIN DEVICECERTIFICATE-----\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\n-----END DEVICECERTIFICATE-----'], + 'Status' => ['description' => '设备证书的状态。取值如下:'."\n" + ."\n" + .'- 0:表示证书为未激活状态。'."\n" + ."\n" + .'- 1:表示证书为激活状态。'."\n" + ."\n" + .'设备证书注册后,默认为激活状态。', 'type' => 'string', 'example' => '1'], + 'CaSn' => ['description' => '设备证书所属的CA证书的SN序列号,用于唯一标识一个CA证书。', 'type' => 'string', 'example' => '00f26900ba87******'], + 'DeviceName' => ['description' => '设备证书的名称。', 'type' => 'string', 'example' => 'mqtt_device'], + ], + ], + ], + ], ], ], ], ], ], 'errorCodes' => [ + 400 => [ + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => ''], + ], 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', - ], - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => ''], ], 500 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'FindCaBySnError', - 'errorMessage' => 'Failed to find the CA by the SN. Please check sn is valid.', + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'FindDeviceBySnError', 'errorMessage' => 'Failed to find the device certificate by the SN. Please check sn is valid', 'description' => ''], + ['errorCode' => 'MqttInstanceNotFound', 'errorMessage' => 'Specified instance is not found', 'description' => ''], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Data\\": {\\n \\"Total\\": 1,\\n \\"PageNo\\": 2,\\n \\"PageSize\\": 10,\\n \\"DeviceCertificateVOS\\": [\\n {\\n \\"ValidBegin\\": \\"1654137303000\\",\\n \\"ValidEnd\\": \\"1969497303000\\",\\n \\"DeviceSn\\": \\"356217374433******\\",\\n \\"DeviceContent\\": \\"-----BEGIN DEVICECERTIFICATE-----\\\\\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\\\\\n-----END DEVICECERTIFICATE-----\\",\\n \\"Status\\": \\"1\\",\\n \\"CaSn\\": \\"00f26900ba87******\\",\\n \\"DeviceName\\": \\"mqtt_device\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n \\n 1\\n 2\\n 10\\n \\n 1654137303000\\n 1969497303000\\n 356217374433******\\n -----BEGIN DEVICECERTIFICATE-----\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\n-----END DEVICECERTIFICATE-----\\n 1\\n 00f26900ba87******\\n mqtt_device\\n \\n \\n","errorExample":""}]', + 'title' => '查询CA证书下设备证书', + 'description' => '- 仅铂金版和专业版实例支持使用ListDeviceCertificateByCaSn接口。'."\n" + .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。', + 'extraInfo' => '### 控制台操作'."\n" + .'除了调用ListDeviceCertificateByCaSn接口,您还可以通过微消息队列MQTT版控制台查看指定CA证书下所有已注册的设备证书。具体操作,请参见[设备证书管理](~~449435~~)。', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'mq:ListDeviceCertificateByCaSn', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], ], - [ - 'errorCode' => 'MqttInstanceNotFound', - 'errorMessage' => 'Specified instance is not found', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], ], ], ], - 'eventInfo' => [ - 'enable' => false, - 'eventNames' => [], - ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Sn\\": \\"007269004887******\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 007269004887******\\n","errorExample":""}]', - 'title' => '注销CA证书', - 'description' => '- 仅铂金版和专业版实例支持使用InactivateCaCertificate接口。'."\n" - .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系微消息队列MQTT版技术支持,钉钉群号:35228338。'."\n" - .'- InactivateCaCertificate接口仅支持对已在微消息队列MQTT版服务端注册的CA证书进行操作,您可以通过[ListCaCertificate](~~2604958~~)接口查询指定实例下已注册的CA证书。', - 'extraInfo' => '### 控制台操作'."\n" - .'除了调用InactivateCaCertificate接口,您还可以通过微消息队列MQTT版控制台注销指定的CA证书。具体操作,请参见[CA证书管理](~~436873~~)。', ], - 'ListCaCertificate' => [ - 'summary' => '云消息队列 MQTT 版支持X.509证书认证,客户端可通过设备证书完成接入认证。CA证书用于为客户端签发设备证书,并验证设备证书的正确性。'."\n" - .'本接口用于查询指定实例下所有注册的CA证书。', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'ListDeviceCredentialClientId' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -3804,185 +2588,118 @@ 'deprecated' => false, 'systemTags' => [ 'operationType' => 'list', - 'riskType' => 'high', + 'riskType' => 'none', 'chargeType' => 'free', - 'abilityTreeCode' => '141168', - 'abilityTreeNodes' => [ - 'FEATUREonsQV6LXV', - ], + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ [ - 'name' => 'MqttInstanceId', + 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版的实例ID,表示需要查看哪个实例下的所有CA证书。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-7mz2d******', - ], + 'schema' => ['description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面获取该ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'mqtt-xxxxxxxx'], + ], + [ + 'name' => 'GroupId', + 'in' => 'query', + 'schema' => ['description' => '微消息队列 MQTT 版的 Group ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_xxx'], ], [ 'name' => 'PageNo', 'in' => 'query', - 'schema' => [ - 'description' => '查询第几页的返回结果。起始页从第1页开始计算。', - 'type' => 'string', - 'required' => true, - 'example' => '2', - ], + 'schema' => ['description' => '查询第几页的返回结果。起始页从第1页开始计算。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => '1'], ], [ 'name' => 'PageSize', 'in' => 'query', - 'schema' => [ - 'description' => '每页最多显示几条查询记录。'."\n" - ."\n" - .'取值范围:1~100。', - 'type' => 'string', - 'required' => true, - 'example' => '10', - ], + 'schema' => ['description' => '每页最多显示几条查询记录。'."\n" + ."\n" + .'取值范围:1~100。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '100'], + ], + [ + 'name' => 'NextToken', + 'in' => 'query', + 'schema' => ['description' => '下一页查询开始的Token。', 'type' => 'string', 'required' => false, 'example' => 'FFdXXXXXWa'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], - 'Data' => [ - 'description' => '查询结果。', + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], + 'DeviceCredentialClientIdList' => [ + 'description' => '返回信息列表。', 'type' => 'object', 'properties' => [ - 'Total' => [ - 'description' => '查询结果最大页数。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'PageNo' => [ - 'description' => '当前返回的查询记录是第几页。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '2', - ], - 'PageSize' => [ - 'description' => '每页显示的最大结果数。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '10', - ], - 'CaCertificateVOS' => [ - 'description' => 'CA证书的详细信息。', + 'Total' => ['description' => '查询结果总数。', 'type' => 'string', 'example' => '10'], + 'ClientIdList' => [ + 'description' => '客户端列表。', 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'RegistrationCode' => [ - 'description' => 'CA证书的注册码。', - 'type' => 'string', - 'example' => '13274673-8f90-4630-bea1-9cccb25756ad2089******', - ], - 'CaName' => [ - 'description' => 'CA证书的名称。', - 'type' => 'string', - 'example' => 'mqtt_ca', - ], - 'Sn' => [ - 'description' => 'CA证书的SN序列号。', - 'type' => 'string', - 'example' => '007269004887******', - ], - 'CaContent' => [ - 'description' => 'CA证书内容。'."\n" - .'> \\n表示换行。', - 'type' => 'string', - 'example' => '-----BEGIN CERTIFICATE-----\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\n-----END CERTIFICATE-----', - ], - 'VerificationContent' => [ - 'description' => '验证证书内容。'."\n" - .'> \\n表示换行。', - 'type' => 'string', - 'example' => '-----BEGIN CERTIFICATE-----\\nMIID/DCCAu+Y5sRMpp9tnd+4s******\\n-----END CERTIFICATE-----', - ], - 'ValidBegin' => [ - 'description' => 'CA证书生效的起始时间。格式为毫秒级别的Unix时间戳。', - 'type' => 'string', - 'example' => '1654137303000', - ], - 'ValidEnd' => [ - 'description' => 'CA证书生效的终止时间。格式为毫秒级别的Unix时间戳。', - 'type' => 'string', - 'example' => '1969497303000', - ], - 'Status' => [ - 'description' => 'CA证书的状态。取值如下:'."\n" - ."\n" - .'- **0**:表示证书为未激活状态。'."\n" - .'- **1**:表示证书为激活状态。'."\n" - ."\n" - .'> CA证书注册后,默认为激活状态。', - 'type' => 'string', - 'example' => '1', - ], - ], - ], + 'items' => ['description' => '客户端ID。', 'type' => 'string', 'example' => 'GID_test@@@pub-1'], ], + 'PageNo' => ['description' => '当前返回的查询记录是第几页。', 'type' => 'string', 'example' => '1'], + 'PageSize' => ['description' => '每页显示的最大结果数。', 'type' => 'string', 'example' => '100'], + 'NextToken' => ['description' => '是否拥有下一次查询的令牌(Token)。取值:'."\n" + .'- 第一次查询和没有下一次查询时,均无需填写。'."\n" + .'- 如果有下一次查询,取值为上一次API调用返回的NextToken值。', 'type' => 'string', 'example' => '634dxxxxx75b5f'], ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], + ['errorCode' => 'ApplyTokenOverFlow', 'errorMessage' => 'You have applied for tokens too many times. Please try again later.', 'description' => '申请Token频率过高,系统限流,请重试。'], + ['errorCode' => 'CheckAccountInfoFailed', 'errorMessage' => 'An error occurred while checking the account information by the STS token.', 'description' => '解析STS Token账号信息失败。'], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'ParameterCheckFailed', 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'DeviceCredentialNotFound', 'errorMessage' => 'Device Credential Not Found.Check if the device certificate is registered.', 'description' => '设备证书不存在'], + ['errorCode' => 'DeviceCredentialNumExceed', 'errorMessage' => 'The number of device credentia exceeds the limit. Please revoke unused device certificates.', 'description' => '设备证书数量超限'], ], - 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', - ], + 404 => [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], ], 500 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'MqttInstanceNotFound', - 'errorMessage' => 'Specified instance is not found', - ], + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => 'MQTT后端服务异常,请重试。'], + ['errorCode' => 'SystemOverFlow', 'errorMessage' => 'An error occurred while processing your request. Please try again.', 'description' => '系统限流,请重试。'], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Data\\": {\\n \\"Total\\": 1,\\n \\"PageNo\\": 2,\\n \\"PageSize\\": 10,\\n \\"CaCertificateVOS\\": [\\n {\\n \\"RegistrationCode\\": \\"13274673-8f90-4630-bea1-9cccb25756ad2089******\\",\\n \\"CaName\\": \\"mqtt_ca\\",\\n \\"Sn\\": \\"007269004887******\\",\\n \\"CaContent\\": \\"-----BEGIN CERTIFICATE-----\\\\\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\\\\\n-----END CERTIFICATE-----\\",\\n \\"VerificationContent\\": \\"-----BEGIN CERTIFICATE-----\\\\\\\\nMIID/DCCAu+Y5sRMpp9tnd+4s******\\\\\\\\n-----END CERTIFICATE-----\\",\\n \\"ValidBegin\\": \\"1654137303000\\",\\n \\"ValidEnd\\": \\"1969497303000\\",\\n \\"Status\\": \\"1\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n \\n 1\\n 2\\n 10\\n \\n 13274673-8f90-4630-bea1-9cccb25756ad2089******\\n mqtt_ca\\n 007269004887******\\n -----BEGIN CERTIFICATE-----\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\n-----END CERTIFICATE-----\\n -----BEGIN CERTIFICATE-----\\\\nMIID/DCCAu+Y5sRMpp9tnd+4s******\\\\n-----END CERTIFICATE-----\\n 1654137303000\\n 1969497303000\\n 1\\n \\n \\n","errorExample":""}]', - 'title' => '查询CA证书列表', - 'description' => '- 仅铂金版和专业版实例支持使用ListCaCertificate接口。'."\n" - .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系微消息队列MQTT版技术支持,钉钉群号:35228338。', - 'extraInfo' => '### 控制台操作'."\n" - .'除了调用ListCaCertificate接口,您还可以通过微消息队列MQTT版控制台查看指定实例下所有已注册的CA证书。具体操作,请参见[CA证书管理](~~436873~~)。', - ], - 'GetCaCertificate' => [ - 'summary' => '云消息队列 MQTT 版支持X.509证书认证,客户端可通过设备证书完成接入认证。CA证书用于为客户端签发设备证书,并验证设备证书的正确性。'."\n" - .'您可以调用本接口查询指定CA证书的证书内容以及激活状态等详细信息。', - 'methods' => [ - 'get', + 'staticInfo' => ['returnType' => 'synchronous'], + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], + ], + 'title' => '查询已注册访问凭证的设备列表', + 'summary' => '用于查询指定实例下有哪些设备申请了设备访问凭证(一机一密)。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListDeviceCredentialClientId'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'mq:MqttInstanceAccess', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"DeviceCredentialClientIdList\\": {\\n \\"Total\\": \\"10\\",\\n \\"ClientIdList\\": [\\n \\"GID_test@@@pub-1\\"\\n ],\\n \\"PageNo\\": \\"1\\",\\n \\"PageSize\\": \\"100\\",\\n \\"NextToken\\": \\"634dxxxxx75b5f\\"\\n }\\n}","type":"json"}]', + ], + 'ListGroupId' => [ + 'summary' => '调用ListGroupId查看某实例下的所有Group ID。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -3992,157 +2709,120 @@ 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', - 'riskType' => 'high', + 'riskType' => 'none', 'chargeType' => 'free', - 'abilityTreeCode' => '141174', - 'abilityTreeNodes' => [ - 'FEATUREonsQV6LXV', - ], + 'abilityTreeCode' => '84622', + 'abilityTreeNodes' => ['FEATUREons4L127M'], ], 'parameters' => [ [ - 'name' => 'MqttInstanceId', + 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => 'CA证书所绑定的实例ID,即云消息队列 MQTT 版的实例ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-7mz2d******', - ], + 'schema' => ['description' => '需查询的Group ID列表的实例的ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'mqtt-cn-0pp1ldu****'], ], [ - 'name' => 'Sn', + 'name' => 'Tag', 'in' => 'query', + 'style' => 'repeatList', 'schema' => [ - 'description' => '待查询CA证书的SN序列号,用于唯一标识一个CA证书。', - 'type' => 'string', - 'required' => true, - 'example' => '007269004887******', + 'description' => '标签列表。', + 'type' => 'array', + 'items' => [ + 'description' => '资源标签列表,一次最多添加20个标签,一个资源最多可以添加20个标签', + 'type' => 'object', + 'properties' => [ + 'Key' => ['description' => '标签键。', 'type' => 'string', 'required' => false, 'example' => 'test'], + 'Value' => ['description' => '标签值。', 'type' => 'string', 'required' => false, 'example' => 'test'], + ], + 'required' => false, + ], + 'required' => false, + 'maxItems' => 100, ], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的。', 'type' => 'string', 'example' => '95996EEB-D894-44FA-A87C-940F5CD9****'], 'Data' => [ - 'description' => '证书详细信息。', - 'type' => 'object', - 'properties' => [ - 'RegistrationCode' => [ - 'description' => 'CA证书的注册码。', - 'type' => 'string', - 'example' => '13274673-8f90-4630-bea1-9cccb25756ad2089******', - ], - 'CaName' => [ - 'description' => 'CA证书的名称。', - 'type' => 'string', - 'example' => 'mqtt_ca', - ], - 'Sn' => [ - 'description' => 'CA证书的SN序列号,用于唯一标识一个CA证书。'."\n" - ."\n" - .'取值范围:不超过128 Byte。', - 'type' => 'string', - 'example' => '00f26900ba87******', - ], - 'CaContent' => [ - 'description' => 'CA证书内容。'."\n" - ."\n" - .'> \\n表示换行。', - 'type' => 'string', - 'example' => '-----BEGIN CERTIFICATE-----\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\n-----END CERTIFICATE-----', - ], - 'VerificationContent' => [ - 'description' => '验证证书内容。'."\n" - .'> \\n表示换行。', - 'type' => 'string', - 'example' => '-----BEGIN CERTIFICATE-----\\nMIID/DCCAu+Y5sRMpp9tnd+4s******\\n-----END CERTIFICATE-----', - ], - 'ValidBegin' => [ - 'description' => 'CA证书生效的起始时间。格式为毫秒级别的Unix时间戳。', - 'type' => 'string', - 'example' => '1654137303000', - ], - 'ValidEnd' => [ - 'description' => 'CA证书生效的终止时间。格式为毫秒级别的Unix时间戳。', - 'type' => 'string', - 'example' => '1969497303000', - ], - 'Status' => [ - 'description' => 'CA证书的状态。取值如下:'."\n" - ."\n" - .'- **0**:表示证书为未激活状态。'."\n" + 'description' => '所查询的Group ID的详细信息。', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'UpdateTime' => ['description' => '该Group ID的最近一次更新时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1564577317000'], + 'InstanceId' => ['description' => '查询的Group ID所属实例的ID。', 'type' => 'string', 'example' => 'post-cn-45910tj****'], + 'IndependentNaming' => ['description' => '该实例是否有独立命名空间。取值如下:'."\n" ."\n" - .'- **1**:表示证书为激活状态。'."\n" + .'- **true**:有独立命名空间,该实例下的资源需保证命名唯一,跨实例可重名。'."\n" ."\n" - .'> CA证书注册后,默认为激活状态。', - 'type' => 'string', - 'example' => '1', + .'- **false**:无独立命名空间,该实例下的资源需保证全局命名唯一,跨实例不可重名。', 'type' => 'boolean', 'example' => 'true'], + 'GroupId' => ['description' => '查询到的属于该实例的Group ID。', 'type' => 'string', 'example' => 'GID_test1'], + 'CreateTime' => ['description' => '该Group ID的创建时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1564577317000'], + 'Tags' => [ + 'description' => '标签信息', + 'type' => 'array', + 'items' => [ + 'description' => 'Group ID所绑定的标签。', + 'type' => 'object', + 'properties' => [ + 'TagKey' => ['description' => '标签键。', 'type' => 'string', 'example' => 'key'], + 'TagValue' => ['description' => '标签值。', 'type' => 'string', 'example' => 'value'], + ], + ], + ], ], + 'description' => '', ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], - ], - 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', - ], + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'InstanceNotFound', 'errorMessage' => 'Failed to find the instance. The instanceId may be invalid.', 'description' => '无法找到实例。'], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], ], 500 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'FindCaBySnError', - 'errorMessage' => 'Failed to find the CA by the SN. Please check sn is valid.', - ], - [ - 'errorCode' => 'MqttInstanceNotFound', - 'errorMessage' => 'Specified instance is not found', - ], + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => 'MQTT后端服务异常,请重试。'], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Data\\": {\\n \\"RegistrationCode\\": \\"13274673-8f90-4630-bea1-9cccb25756ad2089******\\",\\n \\"CaName\\": \\"mqtt_ca\\",\\n \\"Sn\\": \\"00f26900ba87******\\",\\n \\"CaContent\\": \\"-----BEGIN CERTIFICATE-----\\\\\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\\\\\n-----END CERTIFICATE-----\\",\\n \\"VerificationContent\\": \\"-----BEGIN CERTIFICATE-----\\\\\\\\nMIID/DCCAu+Y5sRMpp9tnd+4s******\\\\\\\\n-----END CERTIFICATE-----\\",\\n \\"ValidBegin\\": \\"1654137303000\\",\\n \\"ValidEnd\\": \\"1969497303000\\",\\n \\"Status\\": \\"1\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n \\n 13274673-8f90-4630-bea1-9cccb25756ad2089******\\n mqtt_ca\\n 00f26900ba87******\\n -----BEGIN CERTIFICATE-----\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\n-----END CERTIFICATE-----\\n -----BEGIN CERTIFICATE-----\\\\nMIID/DCCAu+Y5sRMpp9tnd+4s******\\\\n-----END CERTIFICATE-----\\n 1654137303000\\n 1969497303000\\n 1\\n \\n","errorExample":""}]', - 'title' => '获取CA证书详情', - 'description' => '- 仅铂金版和专业版实例支持使用GetCaCertificate接口。'."\n" - .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。', - 'extraInfo' => '### 控制台操作'."\n" - .'除了调用GetCaCertificate接口,您还可以通过微消息队列MQTT版控制台查看指定的CA证书。具体操作,请参见[CA证书管理](~~436873~~)。', - ], - 'GetRegisterCode' => [ - 'summary' => '注册CA证书到云消息队列 MQTT 版服务端时,需要上传CA证书的验证证书,用于验证用户是否有该CA证书的私钥。CA证书的验证证书需要通过CA证书的注册码生成,本接口用于获取指定CA证书的注册码。', - 'methods' => [ - 'get', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"95996EEB-D894-44FA-A87C-940F5CD9****\\",\\n \\"Data\\": [\\n {\\n \\"UpdateTime\\": 1564577317000,\\n \\"InstanceId\\": \\"post-cn-45910tj****\\",\\n \\"IndependentNaming\\": true,\\n \\"GroupId\\": \\"GID_test1\\",\\n \\"CreateTime\\": 1564577317000,\\n \\"Tags\\": [\\n {\\n \\"TagKey\\": \\"key\\",\\n \\"TagValue\\": \\"value\\"\\n }\\n ]\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"\\n95996EEB-D894-44FA-A87C-940F5CD9****\\n\\n post-cn-45910tj****\\n 1564577317000\\n 1564577317000\\n true\\n GID_test2\\n\\n\\n post-cn-45910tj****\\n 1563200655000\\n 1563200655000\\n true\\n GID_test1\\n\\n","errorExample":""}]', + 'title' => '查看某实例下的所有 Group ID', + 'description' => '每成功调用一次**ListGroupId**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。', + 'requestParamsDescription' => '> 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListGroupId'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:ListMqttGroupId', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + ], + 'ListInstances' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -4151,44 +2831,74 @@ 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'get', + 'operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', - 'abilityTreeCode' => '140814', - 'abilityTreeNodes' => [ - 'FEATUREonsQV6LXV', - ], + 'abilityTreeCode' => '265380', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ [ - 'name' => 'MqttInstanceId', + 'name' => 'Tags', 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版的实例ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-7mz2d******', - ], + 'schema' => ['description' => 'json格式的资源标签列表。', 'type' => 'string', 'required' => false, 'example' => '[{"key":"test","value":"test"}]'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', + 'description' => '返回对象。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], - 'RegisterCode' => [ - 'title' => '注册码', - 'description' => '返回的CA证书的注册码。', - 'type' => 'string', - 'example' => '13274673-8f90-4630-bea1-9cccb25756ad2089******', + 'RequestId' => ['description' => 'Id of the request', 'type' => 'string', 'example' => '294F5B26-FADF-41D0-BE68-14ABE4EB****'], + 'Code' => ['description' => '响应code。', 'type' => 'string', 'example' => '200'], + 'Message' => ['description' => '信息。', 'type' => 'string', 'example' => 'operation success.'], + 'Success' => ['description' => '请求是否成功。', 'type' => 'string', 'example' => 'true'], + 'Instances' => [ + 'description' => '实例列表。', + 'type' => 'array', + 'items' => [ + 'description' => '实例对象。', + 'type' => 'object', + 'properties' => [ + 'InstanceId' => ['description' => '实例Id', 'type' => 'string', 'example' => 'mqtt-cn-xxxxxxx'], + 'InstanceName' => ['description' => '实例名称。', 'type' => 'string', 'example' => 'mqtt-cn-xxxxxxx'], + 'InstanceStatus' => ['description' => '实例状态。'."\n" + .'- 0:准备中。'."\n" + .'- 5:服务中。'."\n" + .'- 7:升级中。'."\n" + .'- 15:冻结中。'."\n" + .'- 10:已释放。'."\n" + .'- 1:未开通。'."\n" + .'- 2:欠费。'."\n" + .'- 3:欠费超期。', 'type' => 'integer', 'format' => 'int32', 'example' => '5'], + 'InstanceType' => ['description' => '实例类型:'."\n" + .'- 0:基础版。'."\n" + .'- 1:铂金版。'."\n" + .'- 2:按量付费。'."\n" + .'- 3:预付费轻量实例。'."\n" + .'- 4:专业版。'."\n" + .'- 5:Serverless 版。', 'type' => 'integer', 'format' => 'int32', 'example' => '4'], + 'Specific' => ['description' => '专业版实例规格。', 'type' => 'string', 'example' => 'mqtt.p2.1xlarge'], + 'RegionId' => ['description' => '地域ID。', 'type' => 'string', 'example' => 'cn-shenzhen'], + 'CreateTime' => ['description' => '实例的创建时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1739345768000'], + 'ExpireTime' => ['description' => '实例到期时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1741795200000'], + 'KernelVersion' => ['description' => '内核版本', 'type' => 'string', 'example' => 'V3.3.0'], + 'MqttTags' => [ + 'description' => '标签列表。', + 'type' => 'array', + 'items' => [ + 'description' => '标签对象。', + 'type' => 'object', + 'properties' => [ + 'TagKey' => ['description' => '标签键。', 'type' => 'string', 'example' => 'test'], + 'TagValue' => ['description' => '标签值。', 'type' => 'string', 'example' => 'test'], + ], + ], + ], + 'OrderId' => ['description' => '订单id。', 'type' => 'string', 'example' => '245949616640095'], + ], + ], ], ], ], @@ -4196,44 +2906,29 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => '实例权限校验失败'], + ['errorCode' => 'ServiceUnable', 'errorMessage' => 'The current user has not activated the ONS service. Please activate the service first.', 'description' => '当前用户未开通ONS服务,请先开通ONS服务,谢谢。'], ], 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', - ], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => 'ram权限检查失败'], ], - 500 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'MqttInstanceNotFound', - 'errorMessage' => 'Specified instance is not found', - ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '查询实例列表', + 'summary' => '查询实例列表。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListInstances'], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"RegisterCode\\": \\"13274673-8f90-4630-bea1-9cccb25756ad2089******\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 13274673-8f90-4630-bea1-9cccb25756ad2089******\\n","errorExample":""}]', - 'title' => '获取CA证书注册码', - 'description' => '- 仅铂金版和专业版实例支持使用GetRegisterCode接口。'."\n" - .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。', + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"294F5B26-FADF-41D0-BE68-14ABE4EB****\\",\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"operation success.\\",\\n \\"Success\\": \\"true\\",\\n \\"Instances\\": [\\n {\\n \\"InstanceId\\": \\"mqtt-cn-xxxxxxx\\",\\n \\"InstanceName\\": \\"mqtt-cn-xxxxxxx\\",\\n \\"InstanceStatus\\": 5,\\n \\"InstanceType\\": 4,\\n \\"Specific\\": \\"mqtt.p2.1xlarge\\",\\n \\"RegionId\\": \\"cn-shenzhen\\",\\n \\"CreateTime\\": 1739345768000,\\n \\"ExpireTime\\": 1741795200000,\\n \\"KernelVersion\\": \\"V3.3.0\\",\\n \\"MqttTags\\": [\\n {\\n \\"TagKey\\": \\"test\\",\\n \\"TagValue\\": \\"test\\"\\n }\\n ],\\n \\"OrderId\\": \\"245949616640095\\"\\n }\\n ]\\n}","type":"json"}]', ], - 'DeleteCaCertificate' => [ - 'summary' => '云消息队列 MQTT 版支持X.509证书认证,客户端可通过设备证书完成接入认证。CA证书用于为客户端签发设备证书,并验证设备证书的正确性。'."\n" - .'使用CA证书需要先将证书注册到云消息队列 MQTT 版服务端,若您不再需要使用某个CA证书,您可以调用DeleteCaCertificate接口将该证书从服务端记录中删除。', - 'methods' => [ - 'get', - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'ListTagResources' => [ + 'summary' => '查询标签。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -4242,55 +2937,81 @@ 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'delete', + 'operationType' => 'list', 'riskType' => 'high', 'chargeType' => 'free', - 'abilityTreeCode' => '142200', - 'abilityTreeNodes' => [ - 'FEATUREonsQV6LXV', - ], + 'abilityTreeCode' => '255352', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ [ - 'name' => 'MqttInstanceId', + 'name' => 'ResourceType', + 'in' => 'query', + 'schema' => ['description' => '资源类型。唯一取值为instance。', 'type' => 'string', 'required' => true, 'example' => 'instance'], + ], + [ + 'name' => 'ResourceId', 'in' => 'query', + 'style' => 'repeatList', 'schema' => [ - 'description' => 'CA证书所绑定的实例ID,即云消息队列 MQTT 版的实例ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-7mz2d******', + 'description' => '资源ID列表。', + 'type' => 'array', + 'items' => ['description' => '要查询资源ID,目前只支持实例,ResourceId和Tag不能同时为空。', 'type' => 'string', 'required' => false, 'example' => 'mqtt-cn-5yd3xxx'], + 'required' => false, + 'maxItems' => 100, ], ], [ - 'name' => 'Sn', + 'name' => 'Tag', 'in' => 'query', + 'style' => 'repeatList', 'schema' => [ - 'description' => '待删除CA证书的SN序列号,用于唯一标识一个CA证书。'."\n" - ."\n" - .'取值范围:不超过128 Byte。', - 'type' => 'string', - 'required' => true, - 'example' => '007269004887******', + 'description' => '资源标签列表,ResourceId和Tag不能同时为空。', + 'type' => 'array', + 'items' => [ + 'description' => '标签对象。', + 'type' => 'object', + 'properties' => [ + 'Key' => ['description' => '标签键。', 'type' => 'string', 'required' => false, 'example' => 'test'], + 'Value' => ['description' => '标签值。', 'type' => 'string', 'required' => false, 'example' => 'test'], + ], + 'required' => false, + ], + 'required' => false, + 'maxItems' => 100, ], ], + [ + 'name' => 'NextToken', + 'in' => 'query', + 'schema' => ['description' => '下一个查询开始Token。', 'type' => 'string', 'required' => false, 'example' => 'AAAAAaFXUH1VTHnBlds7StUakOQ='], + ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => 'Schema of Response', + 'description' => '返回对象。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], - 'Sn' => [ - 'description' => '已删除CA证书的SN序列号,用于唯一标识一个CA证书。', - 'type' => 'string', - 'example' => '007269004887******', + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '34063BCA-0946-49C1-B824-2ED2C905****'], + 'Code' => ['description' => '响应code。', 'type' => 'string', 'example' => '200'], + 'Message' => ['description' => '信息', 'type' => 'string', 'example' => 'operation success.'], + 'Success' => ['description' => '请求是否成功。', 'type' => 'string', 'example' => 'true'], + 'NextToken' => ['description' => '下一个查询开始Token。', 'type' => 'string', 'example' => 'AAAAAaFXUH1VTHnBlds7StUakOQ='], + 'TagResources' => [ + 'description' => '资源和标签的关系列表。', + 'type' => 'array', + 'items' => [ + 'description' => 'TagResource对象。', + 'type' => 'object', + 'properties' => [ + 'ResourceType' => ['description' => '资源类型。唯一取值为instance。', 'type' => 'string', 'example' => 'instance'], + 'TagValue' => ['description' => '标签值。', 'type' => 'string', 'example' => 'test'], + 'ResourceId' => ['description' => '资源ID。', 'type' => 'string', 'example' => 'mqtt-cn-5yd3xxx'."\n"], + 'TagKey' => ['description' => '标签键。', 'type' => 'string', 'example' => 'test'], + ], + ], ], ], ], @@ -4298,57 +3019,42 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => '实例权限校验失败'], + ['errorCode' => 'ResourceIdNotFound', 'errorMessage' => 'resourceId does not exist.', 'description' => '标签资源不存在'], ], 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', - ], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => 'ram权限检查失败'], ], - 500 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'FindCaBySnError', - 'errorMessage' => 'Failed to find the CA by the SN. Please check sn is valid.', + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"34063BCA-0946-49C1-B824-2ED2C905****\\",\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"operation success.\\",\\n \\"Success\\": \\"true\\",\\n \\"NextToken\\": \\"AAAAAaFXUH1VTHnBlds7StUakOQ=\\",\\n \\"TagResources\\": [\\n {\\n \\"ResourceType\\": \\"instance\\",\\n \\"TagValue\\": \\"test\\",\\n \\"ResourceId\\": \\"mqtt-cn-5yd3xxx\\\\n\\",\\n \\"TagKey\\": \\"test\\"\\n }\\n ]\\n}","type":"json"}]', + 'title' => '查询标签', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListTagResources'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'mq:ListTagResources', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], - [ - 'errorCode' => 'MqttInstanceNotFound', - 'errorMessage' => 'Specified instance is not found', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Sn\\": \\"007269004887******\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 007269004887******\\n","errorExample":""}]', - 'title' => '删除CA证书', - 'description' => '- 仅铂金版和专业版实例支持使用DeleteCaCertificate接口。'."\n" - .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。'."\n" - .'- DeleteCaCertificate接口仅支持对已在云消息队列 MQTT 版服务端注册的CA证书进行操作,您可以通过[ListCaCertificate](~~2604958~~)接口查询指定实例下已注册的CA证书。'."\n" - .'- 删除指定CA证书,由该CA证书签发的且已在云消息队列 MQTT 版服务端注册的所有设备证书也将被自动删除。', - 'extraInfo' => '### 控制台操作'."\n" - .'除了调用DeleteCaCertificate接口,您还可以通过微消息队列MQTT版控制台删除CA证书。具体操作,请参见[CA证书管理](~~436873~~)。', ], - 'ActiveDeviceCertificate' => [ - 'summary' => '设备证书是由CA根证书签发给客户端设备使用的数字证书,用于客户端和服务端连接时,服务端对客户端进行安全认证。'."\n" - .'客户端设备使用设备证书进行接入认证时,服务端会根据已注册的CA证书验证设备证书是否正确,若CA证书和设备证书匹配成功,则客户端认证通过,且系统会将该设备证书自动注册到服务端中。 '."\n" - .'设备证书在服务端注册后默认为激活状态,若您需要使用的设备证书被修改为未激活状态,您可以调用本接口将设备证书重新激活。', - 'methods' => [ - 'get', - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'QueryCustomAuthConnectBlack' => [ + 'summary' => '查询连接黑名单。', + 'methods' => ['get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -4356,46 +3062,27 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'high', - 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATUREons0PHGX2', - ], - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'high', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'MqttInstanceId', + 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '设备证书所绑定的实例ID,即微消息队列MQTT版的实例ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-7mz2d******', - ], + 'schema' => ['description' => '消息队列MQTT版实例的ID。', 'type' => 'string', 'required' => true, 'example' => 'post-111****'], ], [ - 'name' => 'DeviceSn', + 'name' => 'ClientId', 'in' => 'query', - 'schema' => [ - 'description' => '待激活设备证书的SN序列号,用于唯一标识一个设备证书。', - 'type' => 'string', - 'required' => true, - 'example' => '356217374433******', - ], + 'schema' => ['description' => '查询具体的设备Client ID。', 'type' => 'string', 'required' => false, 'example' => 'GID_test@@@test'], ], [ - 'name' => 'CaSn', + 'name' => 'NextToken', 'in' => 'query', - 'schema' => [ - 'description' => '待激活设备证书所属的CA证书的SN序列号,用于唯一标识一个CA证书。'."\n" - ."\n" - .'取值范围:不超过128 Byte。', - 'type' => 'string', - 'required' => true, - 'example' => '007269004887******', - ], + 'schema' => ['description' => '用来标记当前查询结束的位置,以便下一次调用时作为参数传入,继续翻页。首次调用或返回最后一页时,取值为空字符串。', 'type' => 'string', 'required' => false, 'example' => 'xOfRU60sGEwN1OlFBIL8Ew=='], + ], + [ + 'name' => 'Size', + 'in' => 'query', + 'schema' => ['description' => '查询数量,最大值:100。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'maximum' => '100', 'minimum' => '1', 'example' => '100'], ], ], 'responses' => [ @@ -4405,16 +3092,29 @@ 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], - 'DeviceSn' => [ - 'description' => '已激活设备证书的SN序列号,用于唯一标识一个设备证书。', - 'type' => 'string', - 'example' => '356217374433******', + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], + 'Code' => ['description' => '接口返回码:200:表示成功。 其它:表示错误码。错误码详情,请参见错误码。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Success' => ['description' => '是否调用成功:true:调用成功。 false:调用失败。', 'type' => 'boolean', 'example' => 'True'], + 'Message' => ['description' => '返回信息。', 'type' => 'string', 'example' => 'operation success.'], + 'Data' => [ + 'description' => '返回参数数据结构。', + 'type' => 'object', + 'properties' => [ + 'Results' => [ + 'description' => '返回数据。', + 'type' => 'array', + 'items' => [ + 'description' => '返回数据。', + 'type' => 'object', + 'properties' => [ + 'ClientId' => ['description' => '设备的Client ID。', 'type' => 'string', 'example' => 'GID_TEST@@@test'], + 'Effect' => ['description' => '允许或拒绝。', 'type' => 'string', 'example' => 'ALLOW'], + 'PermitAction' => ['description' => '授权操作。', 'type' => 'string', 'example' => 'CONNECT'], + ], + ], + ], + 'NextToken' => ['description' => '下一页的token。', 'type' => 'string', 'example' => 'AAAAAZ0cM0HTqLXvgm7oMHWXcvc='], + ], ], ], ], @@ -4422,58 +3122,43 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - ], - 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', - ], - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], ], - 500 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'FindDeviceBySnError', - 'errorMessage' => 'Failed to find the device certificate by the SN. Please check sn is valid', - ], - [ - 'errorCode' => 'MqttInstanceNotFound', - 'errorMessage' => 'Specified instance is not found', - ], + 404 => [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], ], ], + 'staticInfo' => ['returnType' => 'synchronous'], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"DeviceSn\\": \\"356217374433******\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 356217374433******\\n","errorExample":""}]', - 'title' => '激活设备证书', - 'description' => '- 仅铂金版和专业版实例支持使用ActiveDeviceCertificate接口。'."\n" - .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系微消息队列MQTT版技术支持,钉钉群号:35228338。', - 'extraInfo' => '### 控制台操作'."\n" - .'除了调用ActiveDeviceCertificate接口,您还可以通过微消息队列MQTT版控制台激活设备证书。具体操作,请参见[设备证书管理](~~449435~~) 。', - ], - 'InactivateDeviceCertificate' => [ - 'summary' => '设备证书是由CA根证书签发给客户端设备使用的数字证书,用于客户端和服务端连接时,服务端对客户端进行安全认证。认证通过后服务端和客户端可基于证书内的加密密钥进行安全通信,若认证不通过则服务端拒绝客户端接入。'."\n" - .'若您暂时不需要使用某个设备证书,可通过该接口注销设备证书,将设备证书状态变成未激活。', - 'methods' => [ - 'get', - 'post', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\",\\n \\"Data\\": {\\n \\"Results\\": [\\n {\\n \\"ClientId\\": \\"GID_TEST@@@test\\",\\n \\"Effect\\": \\"ALLOW\\",\\n \\"PermitAction\\": \\"CONNECT\\"\\n }\\n ],\\n \\"NextToken\\": \\"AAAAAZ0cM0HTqLXvgm7oMHWXcvc=\\"\\n }\\n}","type":"json"}]', + 'title' => '查询连接黑名单', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'QueryCustomAuthConnectBlack'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:QueryCustomAuthConnectBlack', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + ], + 'QueryCustomAuthIdentity' => [ + 'methods' => ['get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -4482,46 +3167,48 @@ 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', + 'operationType' => 'get', + 'riskType' => 'high', 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATUREons0PHGX2', - ], + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ [ - 'name' => 'MqttInstanceId', + 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '设备证书所绑定的实例ID,即云消息队列 MQTT 版的实例ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-7mz2d******', - ], + 'schema' => ['description' => '云消息队列MQTT版实例的ID。', 'type' => 'string', 'required' => true, 'example' => 'post-111****'], ], [ - 'name' => 'DeviceSn', + 'name' => 'Username', 'in' => 'query', - 'schema' => [ - 'description' => '待注销设备证书的SN序列号,用于唯一标识一个设备证书。', - 'type' => 'string', - 'required' => true, - 'example' => '356217374433******', - ], + 'schema' => ['description' => '用户名。', 'type' => 'string', 'required' => false, 'example' => 'test'], ], [ - 'name' => 'CaSn', + 'name' => 'IdentityType', 'in' => 'query', 'schema' => [ - 'description' => '待注销设备证书所属的CA证书的SN序列号,用于唯一标识一个CA证书。'."\n" - ."\n" - .'取值范围:不超过128 Byte。', + 'description' => '身份类型。', 'type' => 'string', - 'required' => true, - 'example' => '007269004887******', + 'required' => false, + 'example' => 'USER', + 'enum' => ['USER', 'CLIENT'], ], ], + [ + 'name' => 'ClientId', + 'in' => 'query', + 'schema' => ['description' => '当查询身份类型是CLIENT时,可以指定设备的ClientID。', 'type' => 'string', 'required' => false, 'example' => 'GID_test@@@test'], + ], + [ + 'name' => 'NextToken', + 'in' => 'query', + 'schema' => ['description' => '用来标记当前查询结束的位置,以便下一次调用时作为参数传入,继续翻页。首次调用或返回最后一页时,取值为空字符串。', 'type' => 'string', 'required' => false, 'example' => 'eyJhY2NvdW50IjoiMTM4MTcxODk3NDQzMjQ1OSIsImV2ZW50SWQiOiJGMkUxOUE3QS1FM0Q0LTVCOEYtQkU4OS1CNkMyM0RBM0UyRjIiLCJsb2dJZCI6IjY2LTEzODE3MTg5NzQ0MzI0NTkiLCJydyI6IlciLCJ0aW1lIjoxNjc4MzI2MTI1MDAwfQ'], + ], + [ + 'name' => 'Size', + 'in' => 'query', + 'schema' => ['description' => '查询数量,最大值:100。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'maximum' => '100', 'minimum' => '1', 'example' => '100'], + ], ], 'responses' => [ 200 => [ @@ -4530,16 +3217,35 @@ 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], - 'DeviceSn' => [ - 'description' => '已注销设备证书的SN序列号,用于唯一标识一个设备证书。', - 'type' => 'string', - 'example' => '356217374433******', + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '11568B5B-13A8-4E72-9DBA-3A14F7D3****'], + 'Code' => ['description' => '接口返回码:200:表示成功。 其它:表示错误码。错误码详情,请参见错误码。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Success' => ['description' => '是否调用成功:true:调用成功。 false:调用失败。', 'type' => 'boolean', 'example' => 'True'], + 'Message' => ['description' => '附加信息。', 'type' => 'string', 'example' => 'operation success.'], + 'Data' => [ + 'description' => '查询结果。', + 'type' => 'object', + 'properties' => [ + 'Results' => [ + 'description' => '返回数据。', + 'type' => 'array', + 'items' => [ + 'description' => '返回数据。', + 'type' => 'object', + 'properties' => [ + 'Username' => ['description' => '用户名。', 'type' => 'string', 'example' => 'test'], + 'Secret' => ['description' => '密钥。', 'type' => 'string', 'example' => '62a5916d71767185b48907d85c2efa****'], + 'IdentityType' => ['description' => '身份类型。'."\n" + ."\n" + .'- USER:仅用户名。'."\n" + ."\n" + .'- CLIENT:具体到客户端。', 'type' => 'string', 'example' => 'USER'], + 'ClientId' => ['description' => '当身份类型是CLIENT时,指定设备的ClientID。', 'type' => 'string', 'example' => 'GID_ICP@@@4d378084'], + 'SignMode' => ['description' => '签名校验方式,ORIGIN:原始值比较,即比较password与secret,SIGNED: 对clientId进行HmacSHA1加签(使用secret)验证,然后比较password。', 'type' => 'string', 'example' => 'SIGNED'], + ], + ], + ], + 'NextToken' => ['description' => '如果还有多余的返回值则会返回NextToken。', 'type' => 'string', 'example' => 'AAAAAXA+GzVqTutYpgkFjBrchKzuvSbpuTqtt6OF9tsC9QnJ'], + ], ], ], ], @@ -4547,57 +3253,45 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - ], - 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', - ], - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], ], - 500 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'FindDeviceBySnError', - 'errorMessage' => 'Failed to find the device certificate by the SN. Please check sn is valid', - ], - [ - 'errorCode' => 'MqttInstanceNotFound', - 'errorMessage' => 'Specified instance is not found', - ], + 404 => [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], ], ], + 'staticInfo' => ['returnType' => 'synchronous'], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"DeviceSn\\": \\"356217374433******\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 356217374433******\\n","errorExample":""}]', - 'title' => ' 注销设备证书', - 'description' => '- 仅铂金版和专业版实例支持使用 InactivateDeviceCertificate接口。'."\n" - .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。', - 'extraInfo' => '### 控制台操作'."\n" - .'除了调用InactivateDeviceCertificate接口,您还可以通过微消息队列MQTT版控制台注销设备证书。具体操作,请参见[设备证书管理](~~449435~~) 。', - ], - 'ListDeviceCertificate' => [ - 'summary' => '设备证书是由CA根证书签发给客户端设备使用的数字证书,用于客户端和服务端连接时,服务端对客户端进行安全认证。认证通过后服务端和客户端可基于证书内的加密密钥进行安全通信,若认证不通过则服务端拒绝客户端接入。'."\n" - .'本接口用于查询指定实例下所有注册的设备证书。', - 'methods' => [ - 'get', + 'title' => '查询身份认证', + 'summary' => '查询自定义身份认证。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'QueryCustomAuthIdentity'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:QueryCustomAuthIdentity', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"11568B5B-13A8-4E72-9DBA-3A14F7D3****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\",\\n \\"Data\\": {\\n \\"Results\\": [\\n {\\n \\"Username\\": \\"test\\",\\n \\"Secret\\": \\"62a5916d71767185b48907d85c2efa****\\",\\n \\"IdentityType\\": \\"USER\\",\\n \\"ClientId\\": \\"GID_ICP@@@4d378084\\",\\n \\"SignMode\\": \\"SIGNED\\"\\n }\\n ],\\n \\"NextToken\\": \\"AAAAAXA+GzVqTutYpgkFjBrchKzuvSbpuTqtt6OF9tsC9QnJ\\"\\n }\\n}","type":"json"}]', + ], + 'QueryCustomAuthPermission' => [ + 'summary' => '查询Topic授权信息。', + 'methods' => ['get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -4605,47 +3299,43 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'high', - 'chargeType' => 'free', - 'abilityTreeCode' => '145872', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', - ], - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'high', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'MqttInstanceId', + 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列 MQTT 版的实例ID,表示需要查看哪个实例下的所有设备证书。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-7mz2d******', - ], + 'schema' => ['description' => '云消息队列MQTT版实例的ID。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-0pp12gl****'], ], [ - 'name' => 'PageNo', + 'name' => 'IdentityType', 'in' => 'query', 'schema' => [ - 'description' => '查询第几页的返回结果。起始页从第1页开始计算。', + 'description' => '身份类型。', 'type' => 'string', - 'required' => true, - 'example' => '2', + 'required' => false, + 'example' => 'USER', + 'enum' => ['USER', 'CLIENT'], ], ], [ - 'name' => 'PageSize', + 'name' => 'Identity', 'in' => 'query', - 'schema' => [ - 'description' => '每页最多显示几条查询记录。'."\n" - ."\n" - .'取值范围:1~100。', - 'type' => 'string', - 'required' => true, - 'example' => '10', - ], + 'schema' => ['description' => '用户名或客户端ID。', 'type' => 'string', 'required' => false, 'example' => 'test'], + ], + [ + 'name' => 'Topic', + 'in' => 'query', + 'schema' => ['description' => '授权的Topic,支持mqtt多级topic与通配符。', 'type' => 'string', 'required' => false, 'example' => 'test'], + ], + [ + 'name' => 'NextToken', + 'in' => 'query', + 'schema' => ['description' => '用来标记当前查询结束的位置,以便下一次调用时作为参数传入,继续翻页。首次调用或返回最后一页时,取值为空字符串。', 'type' => 'string', 'required' => false, 'example' => 'AAAAAThmKW2HkRgzo4G7IRRTK2fC6zZmAk6y0bwoNPFOOcSP'], + ], + [ + 'name' => 'Size', + 'in' => 'query', + 'schema' => ['description' => '查询数量,最大值:100。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'maximum' => '100', 'minimum' => '1', 'example' => '100'], ], ], 'responses' => [ @@ -4655,86 +3345,34 @@ 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '63309FDB-ED6C-46AE-B31C-A172FBA0****'], + 'Code' => ['description' => '响应code。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Success' => ['description' => '表示是否调用成功。true:调用成功。 false:调用失败。', 'type' => 'boolean', 'example' => 'True'], + 'Message' => ['description' => '返回结果的提示信息。', 'type' => 'string', 'example' => 'operation success.'], 'Data' => [ 'description' => '查询结果。', 'type' => 'object', 'properties' => [ - 'Total' => [ - 'description' => '查询结果最大页数。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'PageNo' => [ - 'description' => '当前返回的查询记录是第几页。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '2', - ], - 'PageSize' => [ - 'description' => '每页显示的最大结果数。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '10', - ], - 'DeviceCertificateVOS' => [ - 'description' => '设备证书的详细信息。', + 'Results' => [ + 'description' => '返回数据。', 'type' => 'array', 'items' => [ + 'description' => '返回数据。', 'type' => 'object', 'properties' => [ - 'ValidBegin' => [ - 'description' => '设备证书生效的起始时间。格式为毫秒级别的Unix时间戳。', - 'type' => 'string', - 'example' => '1654137303000', - ], - 'ValidEnd' => [ - 'description' => '设备证书生效的终止时间。格式为毫秒级别的Unix时间戳。', - 'type' => 'string', - 'example' => '1969497303000', - ], - 'DeviceSn' => [ - 'description' => '设备证书的SN序列号,用于唯一标识一个设备证书。', - 'type' => 'string', - 'example' => '356217374433******', - ], - 'DeviceContent' => [ - 'description' => '设备证书的内容。'."\n" - ."\n" - .'\\n表示换行。', - 'type' => 'string', - 'example' => '-----BEGIN DEVICECERTIFICATE-----\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\n-----END DEVICECERTIFICATE-----', - ], - 'Status' => [ - 'description' => '设备证书的状态。取值如下:'."\n" - ."\n" - .'- 0:表示证书为未激活状态。'."\n" - ."\n" - .'- 1:表示证书为激活状态。'."\n" - ."\n" - .'设备证书注册后,默认为激活状态。', - 'type' => 'string', - 'example' => '1', - ], - 'CaSn' => [ - 'description' => '设备证书所属的CA证书的SN序列号,用于唯一标识一个CA证书。', - 'type' => 'string', - 'example' => '00f26900ba87******', - ], - 'DeviceName' => [ - 'description' => '设备证书的名称。', - 'type' => 'string', - 'example' => 'mqtt_device', - ], + 'Identity' => ['description' => '用户名或客户端ID。', 'type' => 'string', 'example' => 'test'], + 'PermitAction' => ['description' => '授权操作。', 'type' => 'string', 'example' => 'PUB_SUB'], + 'Effect' => ['description' => '允许或拒绝。', 'type' => 'string', 'example' => 'ALLOW'], + 'IdentityType' => ['description' => '身份类型。'."\n" + ."\n" + .'- USER:仅用户名。'."\n" + ."\n" + .'- CLIENT:具体到客户端。', 'type' => 'string', 'example' => 'USER'], + 'Topic' => ['description' => 'Topic资源信息,支持MQTT多级topic与通配符。', 'type' => 'string', 'example' => 'test'], ], ], ], + 'NextToken' => ['description' => '用来标记当前查询结束的位置,以便下一次调用时作为参数传入,继续翻页。首次调用或返回最后一页时,取值为空字符串。', 'type' => 'string', 'example' => 'AAAAAV/vsqTyeMlX1MIk7/b6NrZLIlsSVf49O04ac7HAmlBoaYspakK7ZZkR3vRDp5Y9Nz0EmuWYrtF+1qkUwuJzPk/qEto/FGxl5Kd+qdwNt3t8'], ], ], ], @@ -4743,53 +3381,38 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => ''], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => ''], ], - 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', - ], + 404 => [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => ''], ], - 500 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'FindDeviceBySnError', - 'errorMessage' => 'Failed to find the device certificate by the SN. Please check sn is valid', - ], - [ - 'errorCode' => 'MqttInstanceNotFound', - 'errorMessage' => 'Specified instance is not found', + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"63309FDB-ED6C-46AE-B31C-A172FBA0****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\",\\n \\"Data\\": {\\n \\"Results\\": [\\n {\\n \\"Identity\\": \\"test\\",\\n \\"PermitAction\\": \\"PUB_SUB\\",\\n \\"Effect\\": \\"ALLOW\\",\\n \\"IdentityType\\": \\"USER\\",\\n \\"Topic\\": \\"test\\"\\n }\\n ],\\n \\"NextToken\\": \\"AAAAAV/vsqTyeMlX1MIk7/b6NrZLIlsSVf49O04ac7HAmlBoaYspakK7ZZkR3vRDp5Y9Nz0EmuWYrtF+1qkUwuJzPk/qEto/FGxl5Kd+qdwNt3t8\\"\\n }\\n}","type":"json"}]', + 'title' => '查询Topic授权', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:QueryCustomAuthPermission', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Data\\": {\\n \\"Total\\": 1,\\n \\"PageNo\\": 2,\\n \\"PageSize\\": 10,\\n \\"DeviceCertificateVOS\\": [\\n {\\n \\"ValidBegin\\": \\"1654137303000\\",\\n \\"ValidEnd\\": \\"1969497303000\\",\\n \\"DeviceSn\\": \\"356217374433******\\",\\n \\"DeviceContent\\": \\"-----BEGIN DEVICECERTIFICATE-----\\\\\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\\\\\n-----END DEVICECERTIFICATE-----\\",\\n \\"Status\\": \\"1\\",\\n \\"CaSn\\": \\"00f26900ba87******\\",\\n \\"DeviceName\\": \\"mqtt_device\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n \\n 1\\n 2\\n 10\\n \\n 1654137303000\\n 1969497303000\\n 356217374433******\\n -----BEGIN DEVICECERTIFICATE-----\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\n-----END DEVICECERTIFICATE-----\\n 1\\n 00f26900ba87******\\n mqtt_device\\n \\n \\n","errorExample":""}]', - 'title' => '查询设备证书列表', - 'description' => '- 仅铂金版和专业版实例支持使用ListDeviceCertificate接口。'."\n" - .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。', - 'extraInfo' => '### 控制台操作'."\n" - .'除了调用ListDeviceCertificate接口,您还可以通过微消息队列MQTT版控制台查看指定实例下所有注册的设备证书。具体操作,请参见[设备证书管理](~~449435~~)。', ], - 'ListDeviceCertificateByCaSn' => [ - 'summary' => '设备证书是由CA根证书签发给客户端设备使用的数字证书,用于客户端和服务端连接时,服务端对客户端进行安全认证。认证通过后服务端和客户端可基于证书内的加密密钥进行安全通信,若认证不通过则服务端拒绝客户端接入。'."\n" - .'本接口用于查询由指定CA证书签发且已在微消息队列MQTT版服务端注册的所有设备证书。', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'QueryMqttTraceDevice' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -4798,144 +3421,108 @@ 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'high', - 'chargeType' => 'free', - 'abilityTreeCode' => '145874', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', - ], + 'operationType' => 'none', + 'abilityTreeCode' => '84626', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ [ - 'name' => 'MqttInstanceId', + 'name' => 'MqttRegionId', 'in' => 'query', - 'schema' => [ - 'description' => 'CA证书所绑定的实例ID,即云消息队列 MQTT 版的实例ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-7mz2d******', - ], + 'schema' => ['description' => '云消息队列 MQTT 版实例地域(Region)的ID。更多信息,请参见[服务接入点](~~181438~~)。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'cn-hangzhou'], ], [ - 'name' => 'PageNo', + 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '查询第几页的返回结果。起始页从第1页开始计算。', - 'type' => 'string', - 'required' => true, - 'example' => '2', - ], + 'schema' => ['description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面的**基础信息**区域查看。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'mqtt-cn-i7m26mf****'], ], [ - 'name' => 'PageSize', + 'name' => 'Reverse', 'in' => 'query', - 'schema' => [ - 'description' => '每页最多显示几条查询记录。'."\n" - ."\n" - .'取值范围:1~100。', - 'type' => 'string', - 'required' => true, - 'example' => '10', - ], + 'schema' => ['description' => '返回结果是否倒序显示。取值说明如下:'."\n" + ."\n" + .'- **true**:按照设备活动时间倒序显示,最后一次的设备活动信息显示在第一条,最早一次的设备活动信息显示在最后一条。'."\n" + ."\n" + .'- **false**:按照设备活动时间顺序显示,最早一次的设备活动信息显示在第一条,最后一次的设备活动信息显示在最后一条。'."\n" + ."\n" + .'若不输入,则返回结果默认按照设备活动时间顺序显示。', 'type' => 'boolean', 'required' => false, 'docRequired' => true, 'example' => 'false'], ], [ - 'name' => 'CaSn', + 'name' => 'ClientId', 'in' => 'query', - 'schema' => [ - 'description' => '待查询CA证书的SN序列码,表示查询哪一个CA证书下所有已注册的设备证书。', - 'type' => 'string', - 'required' => true, - 'example' => '007269004887******', - ], + 'schema' => ['description' => '需要查询轨迹信息的设备的Client ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test@@@producer'], ], - ], - 'responses' => [ + [ + 'name' => 'BeginTime', + 'in' => 'query', + 'schema' => ['description' => '查询范围的起始时间戳。单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'maximum' => '9223372036854774807', 'minimum' => '-9223372036854774808', 'example' => '1621580400000'], + ], + [ + 'name' => 'EndTime', + 'in' => 'query', + 'schema' => ['description' => '查询范围的终止时间戳。单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'maximum' => '9223372036854774807', 'minimum' => '-9223372036854774808', 'example' => '1621584000000'], + ], + [ + 'name' => 'CurrentPage', + 'in' => 'query', + 'schema' => ['description' => '当前取第几页消息,从1开始递增。若输入参数大于总页数,则返回结果为空。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'maximum' => '2147483647', 'minimum' => '-2147483648', 'example' => '1'], + ], + [ + 'name' => 'PageSize', + 'in' => 'query', + 'schema' => ['description' => '分页查询,每页最多显示的消息数量,最小1条,最多100条。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'maximum' => '2147483647', 'minimum' => '-2147483648', 'example' => '5'], + ], + ], + 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], - 'Data' => [ - 'description' => '查询结果。', - 'type' => 'object', - 'properties' => [ - 'Total' => [ - 'description' => '查询结果总数。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'PageNo' => [ - 'description' => '当前返回的查询记录是第几页。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '2', - ], - 'PageSize' => [ - 'description' => '每页显示的最大结果数。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '10', - ], - 'DeviceCertificateVOS' => [ - 'description' => '设备证书的详细信息。', - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'ValidBegin' => [ - 'description' => '设备证书生效的起始时间。格式为毫秒级别的Unix时间戳。', - 'type' => 'string', - 'example' => '1654137303000', - ], - 'ValidEnd' => [ - 'description' => '设备证书生效的终止时间。格式为毫秒级别的Unix时间戳。', - 'type' => 'string', - 'example' => '1969497303000', - ], - 'DeviceSn' => [ - 'description' => '设备证书的SN序列号,用于唯一标识一个设备证书。', - 'type' => 'string', - 'example' => '356217374433******', - ], - 'DeviceContent' => [ - 'description' => '设备证书的内容。'."\n" - ."\n" - .'\\n表示换行。', - 'type' => 'string', - 'example' => '-----BEGIN DEVICECERTIFICATE-----\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\n-----END DEVICECERTIFICATE-----', - ], - 'Status' => [ - 'description' => '设备证书的状态。取值如下:'."\n" - ."\n" - .'- 0:表示证书为未激活状态。'."\n" - ."\n" - .'- 1:表示证书为激活状态。'."\n" - ."\n" - .'设备证书注册后,默认为激活状态。', - 'type' => 'string', - 'example' => '1', - ], - 'CaSn' => [ - 'description' => '设备证书所属的CA证书的SN序列号,用于唯一标识一个CA证书。', - 'type' => 'string', - 'example' => '00f26900ba87******', - ], - 'DeviceName' => [ - 'description' => '设备证书的名称。', - 'type' => 'string', - 'example' => 'mqtt_device', - ], - ], - ], + 'CurrentPage' => ['description' => '当前位于第几页。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '317076B7-F946-46BC-A98F-4CF9777C****'], + 'PageSize' => ['description' => '每页最多显示的设备活动信息数量。', 'type' => 'integer', 'format' => 'int32', 'example' => '2'], + 'Total' => ['description' => '查询到的设备活动信息总数。', 'type' => 'integer', 'format' => 'int64', 'example' => '3'], + 'DeviceInfoList' => [ + 'description' => '查询的设备活动信息明细。', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'ChannelId' => ['description' => '设备连接标识。', 'type' => 'string', 'example' => 'c69fe839209547fa9d073781b9cd****'], + 'Time' => ['description' => '设备动作发生的时间。', 'type' => 'string', 'example' => '2021-05-21 15:51:54.867'], + 'ActionCode' => ['description' => '设备动作的返回码。取值说明如下:'."\n" + ."\n" + .'- **mqtt.trace.action.connect**:设备动作为**connect**时返回该参数值。'."\n" + ."\n" + .'- **mqtt.trace.action.close**:设备动作为**close**时返回该参数值。'."\n" + ."\n" + .'- **mqtt.trace.action.disconnect**:设备动作为**disconnect**时返回该参数值。', 'type' => 'string', 'example' => 'mqtt.trace.action.connect'], + 'Action' => ['description' => '设备动作。取值说明如下:'."\n" + ."\n" + .'- **connect**:客户端请求与服务端连接。'."\n" + ."\n" + .'- **close**:TCP连接断开。'."\n" + ."\n" + .'- **disconnect**:客户端请求与服务端断开连接。', 'type' => 'string', 'example' => 'connect'], + 'ActionInfo' => ['description' => '设备动作的描述信息。取值说明如下:'."\n" + ."\n" + .'- **accepted**:服务端接收客户端发起的连接请求。'."\n" + ."\n" + .'- **not authorized**:客户端访问的实例权限校验失败导致TCP连接断开。'."\n" + ."\n" + .'- **clientId conflict**:客户端标识冲突导致TCP连接断开。'."\n" + ."\n" + .'- **resource auth failed**:客户端访问的Topic或Group ID资源权限校验失败导致TCP连接断开。'."\n" + ."\n" + .'- **no heart**:客户端无心跳导致TCP连接断开。'."\n" + ."\n" + .'- **closed by client**:客户端异常导致TCP连接断开。'."\n" + ."\n" + .'- **disconnected by client**:客户端请求断开连接。'."\n" + ."\n" + .'- **invalid param**:请求参数不合法导致TCP连接断开。'."\n" + ."\n" + .'- **Socket IOException**:网络抖动或丢包导致TCP连接断开。', 'type' => 'string', 'example' => 'accept'], ], ], ], @@ -4945,164 +3532,146 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => ''], ], - 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', - ], + 404 => [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => ''], ], 500 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'FindDeviceBySnError', - 'errorMessage' => 'Failed to find the device certificate by the SN. Please check sn is valid', - ], - [ - 'errorCode' => 'MqttInstanceNotFound', - 'errorMessage' => 'Specified instance is not found', + ['errorCode' => 'SystemOverFlow', 'errorMessage' => 'An error occurred while processing your request. Please try again.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"CurrentPage\\": 1,\\n \\"RequestId\\": \\"317076B7-F946-46BC-A98F-4CF9777C****\\",\\n \\"PageSize\\": 2,\\n \\"Total\\": 3,\\n \\"DeviceInfoList\\": [\\n {\\n \\"ChannelId\\": \\"c69fe839209547fa9d073781b9cd****\\",\\n \\"Time\\": \\"2021-05-21 15:51:54.867\\",\\n \\"ActionCode\\": \\"mqtt.trace.action.connect\\",\\n \\"Action\\": \\"connect\\",\\n \\"ActionInfo\\": \\"accept\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"\\n\\n connect\\n mqtt.trace.action.connect\\n accepted\\n \\n 27e1c09a1d7d4944901500db7186****\\n \\n \\n close\\n mqtt.trace.action.close\\n no heart\\n \\n 27e1c09a1d7d4944901500db7186****\\n \\n \\n connect\\n mqtt.trace.action.connect\\n accepted\\n \\n 34022074d3c1403faba6e0334121****\\n \\n 5\\n 1\\n 3\\n 317076B7-F946-46BC-A98F-4CF9777C****\\n","errorExample":""}]', + 'title' => '查询设备轨迹', + 'summary' => '分页查询微消息队列MQTT版客户端的设备轨迹。当设备的状态出现异常时,您可以通过该接口查询指定设备的连接历史,帮助您快速定位异常原因。', + 'description' => '- 每成功调用一次**QueryMqttTraceDevice**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。'."\n" + .'- 本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见[QPS限制](~~163047~~)。', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', + 'extraInfo' => '## 控制台操作'."\n" + .'除了调用**QueryMqttTraceDevice**接口,您还可以通过微消息队列MQTT版控制台查看设备轨迹信息。具体操作,请参见[设备轨迹查询](~~140951~~)。', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:QueryMqttDeviceTrace', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Data\\": {\\n \\"Total\\": 1,\\n \\"PageNo\\": 2,\\n \\"PageSize\\": 10,\\n \\"DeviceCertificateVOS\\": [\\n {\\n \\"ValidBegin\\": \\"1654137303000\\",\\n \\"ValidEnd\\": \\"1969497303000\\",\\n \\"DeviceSn\\": \\"356217374433******\\",\\n \\"DeviceContent\\": \\"-----BEGIN DEVICECERTIFICATE-----\\\\\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\\\\\n-----END DEVICECERTIFICATE-----\\",\\n \\"Status\\": \\"1\\",\\n \\"CaSn\\": \\"00f26900ba87******\\",\\n \\"DeviceName\\": \\"mqtt_device\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n \\n 1\\n 2\\n 10\\n \\n 1654137303000\\n 1969497303000\\n 356217374433******\\n -----BEGIN DEVICECERTIFICATE-----\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\n-----END DEVICECERTIFICATE-----\\n 1\\n 00f26900ba87******\\n mqtt_device\\n \\n \\n","errorExample":""}]', - 'title' => '查询CA证书下设备证书', - 'description' => '- 仅铂金版和专业版实例支持使用ListDeviceCertificateByCaSn接口。'."\n" - .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。', - 'extraInfo' => '### 控制台操作'."\n" - .'除了调用ListDeviceCertificateByCaSn接口,您还可以通过微消息队列MQTT版控制台查看指定CA证书下所有已注册的设备证书。具体操作,请参见[设备证书管理](~~449435~~)。', ], - 'GetDeviceCertificate' => [ - 'summary' => '设备证书是由CA根证书签发给客户端设备使用的数字证书,用于客户端和服务端连接时,服务端对客户端进行安全认证。认证通过后服务端和客户端可基于证书内的加密密钥进行安全通信,若认证不通过则服务端拒绝客户端接入。'."\n" - .'您可以调用本接口获取设备证书的详细信息。', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'QueryMqttTraceMessageOfClient' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'read', - 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'high', - 'chargeType' => 'free', - 'abilityTreeCode' => '145870', - 'abilityTreeNodes' => [ - 'FEATUREons0PHGX2', - ], + 'operationType' => 'none', + 'abilityTreeCode' => '84627', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ [ - 'name' => 'MqttInstanceId', + 'name' => 'MqttRegionId', 'in' => 'query', - 'schema' => [ - 'description' => '设备证书所绑定的实例ID,即云消息队列 MQTT 版的实例ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-7mz2d******', - ], + 'schema' => ['description' => '云消息队列 MQTT 版实例地域(Region)的ID。请参见[服务接入点](~~181438~~)。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'cn-hangzhou'], ], [ - 'name' => 'DeviceSn', + 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '待查询设备证书的SN序列号,用于唯一标识一个设备证书。'."\n" - ."\n" - .'取值范围:不超过128 Byte。', - 'type' => 'string', - 'required' => true, - 'example' => '356217374433******', - ], + 'schema' => ['description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面的**基础信息**区域查看。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'mqtt-cn-i7m26mf****'], ], [ - 'name' => 'CaSn', + 'name' => 'ClientId', 'in' => 'query', - 'schema' => [ - 'description' => '待查询设备证书所属的CA证书的SN序列号,用于唯一标识一个CA证书。'."\n" - ."\n" - .'取值范围:不超过128 Byte。', - 'type' => 'string', - 'required' => true, - 'example' => '007269004887******', - ], + 'schema' => ['description' => '需要查询消息列表的设备的Client ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test@@@producer'], + ], + [ + 'name' => 'BeginTime', + 'in' => 'query', + 'schema' => ['description' => '查询范围的起始时间戳。单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'maximum' => '9223372036854774807', 'minimum' => '-9223372036854774808', 'example' => '1618646400000'], + ], + [ + 'name' => 'EndTime', + 'in' => 'query', + 'schema' => ['description' => '查询范围的终止时间戳。单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'maximum' => '9223372036854774807', 'minimum' => '-9223372036854774808', 'example' => '1621591200000'], + ], + [ + 'name' => 'CurrentPage', + 'in' => 'query', + 'schema' => ['description' => '当前取第几页消息,从1开始递增。若输入参数大于总页数,则返回结果为空。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'maximum' => '2147483647', 'minimum' => '-2147483648', 'example' => '1'], + ], + [ + 'name' => 'PageSize', + 'in' => 'query', + 'schema' => ['description' => '分页查询,每页最多显示的消息数量,最小1条,最多100条。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'maximum' => '2147483647', 'minimum' => '-2147483648', 'example' => '5'], + ], + [ + 'name' => 'Reverse', + 'in' => 'query', + 'schema' => ['description' => '返回结果是否倒序显示。取值说明如下:'."\n" + ."\n" + .'- **true**:按照消息发送或消费时间倒序显示,最后一条发送或消费的消息显示在第一条,最早一条发送或消费的消息显示在最后一条。'."\n" + ."\n" + .'- **false**:按照消息发送或消费时间顺序显示,最早一条发送或消费的消息显示在第一条,最后一条发送或消费的消息显示在最后一条。'."\n" + ."\n" + .'若不输入,则返回结果默认按照消息发送或消费的时间顺序显示。', 'type' => 'boolean', 'required' => false, 'example' => 'false'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], - 'Data' => [ - 'description' => '证书详细信息。', - 'type' => 'object', - 'properties' => [ - 'ValidBegin' => [ - 'description' => '设备证书生效的起始时间。格式为毫秒级别的Unix时间戳。', - 'type' => 'string', - 'example' => '1654137303000', - ], - 'ValidEnd' => [ - 'description' => '设备证书生效的终止时间。格式为毫秒级别的Unix时间戳。', - 'type' => 'string', - 'example' => '1969497303000', - ], - 'DeviceSn' => [ - 'description' => '设备证书的SN序列号,用于唯一标识一个设备证书。', - 'type' => 'string', - 'example' => '356217374433******', - ], - 'DeviceName' => [ - 'description' => '设备证书的名称。', - 'type' => 'string', - 'example' => 'mqtt_device', - ], - 'DeviceContent' => [ - 'description' => '设备证书的内容。'."\n" + 'CurrentPage' => ['description' => '当前位于第几页。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'B096B9D6-62F3-4567-BB59-58D1362E****'], + 'PageSize' => ['description' => '每页最多显示的消息数量。', 'type' => 'integer', 'format' => 'int32', 'example' => '10'], + 'Total' => ['description' => '查询到的消息总数。', 'type' => 'integer', 'format' => 'int64', 'example' => '5'], + 'MessageOfClientList' => [ + 'description' => '返回的消息列表。', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Time' => ['description' => '消息发送的时间或被消费的时间。', 'type' => 'string', 'example' => '2021-05-21 15:08:19.234'], + 'Action' => ['description' => '消息动作。取值说明如下:'."\n" ."\n" - .'\\n表示换行。', - 'type' => 'string', - 'example' => '-----BEGIN DEVICECERTIFICATE-----\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\n-----END DEVICECERTIFICATE-----', - ], - 'CaSn' => [ - 'description' => '设备证书所属的CA证书的SN序列号,用于唯一标识一个CA证书。', - 'type' => 'string', - 'example' => '00f26900ba87******', - ], - 'Status' => [ - 'description' => '设备证书的状态。取值如下:'."\n" + .'- **pub_mqtt**:微消息队列MQTT版客户端发送消息。'."\n" + ."\n" + .'- **sub**:微消息队列MQTT版客户端订阅消息。'."\n" + ."\n" + .'- **push_offline**:服务端推送离线消息到微消息队列MQTT版客户端。'."\n" + ."\n" + .'- **ServerPush**:推送至云端消费。', 'type' => 'string', 'example' => 'pub_mqtt'], + 'ActionCode' => ['description' => '消息动作的返回码。取值说明如下'."\n" + ."\n" + .'- **mqtt.trace.action.msg.pub.mqtt**:消息动作取值为**pub_mqtt**时返回该参数值。'."\n" + ."\n" + .'- **mqtt.trace.action.msg.sub**:消息动作取值为**sub**时返回该参数值。'."\n" + ."\n" + .'- **mqtt.trace.action.msg.push.offline**:消息动作取值为**push_offline**时返回该参数值。'."\n" ."\n" - .'- **0**:表示证书为未激活状态。'."\n" + .'- **mqtt.trace.action.server.push**:消息动作取值为**ServerPush**时返回该参数值。', 'type' => 'string', 'example' => 'mqtt.trace.action.msg.pub.mqtt'], + 'ActionInfo' => ['description' => '消息动作的返回信息。取值说明如下:'."\n" ."\n" - .'- **1**:表示证书为激活状态。'."\n" + .'- **Pub From Mqtt Client**:消息动作取值为**pub_mqtt**时返回该参数值。'."\n" ."\n" - .'> 设备证书注册后,默认为激活状态。', - 'type' => 'string', - 'example' => '1', + .'- **Push To Mqtt Client**:消息动作取值为**sub**时返回该参数值。'."\n" + ."\n" + .'- **Push Offline Msg To Mqtt Client**:消息动作取值为**push_offline**时返回该参数值。'."\n" + ."\n" + .'- **Server Push**:消息动作取值为**ServerPush**时返回该参数值。', 'type' => 'string', 'example' => 'Pub From Mqtt Client'], + 'MsgId' => ['description' => '消息ID,即Message ID。', 'type' => 'string', 'example' => 'AC1EC0030EAB78308DB16A3EC773****'], + 'ClientId' => ['description' => '设备的Client ID。', 'type' => 'string', 'example' => 'GID_test@@@producer'], ], ], ], @@ -5112,54 +3681,47 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => '实例权限校验失败'], ], - 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', - ], + 404 => [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], ], 500 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'FindDeviceBySnError', - 'errorMessage' => 'Failed to find the device certificate by the SN. Please check sn is valid', - ], - [ - 'errorCode' => 'MqttInstanceNotFound', - 'errorMessage' => 'Specified instance is not found', - ], + ['errorCode' => 'SystemOverFlow', 'errorMessage' => 'An error occurred while processing your request. Please try again.', 'description' => '系统限流,请重试。'], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Data\\": {\\n \\"ValidBegin\\": \\"1654137303000\\",\\n \\"ValidEnd\\": \\"1969497303000\\",\\n \\"DeviceSn\\": \\"356217374433******\\",\\n \\"DeviceName\\": \\"mqtt_device\\",\\n \\"DeviceContent\\": \\"-----BEGIN DEVICECERTIFICATE-----\\\\\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\\\\\n-----END DEVICECERTIFICATE-----\\",\\n \\"CaSn\\": \\"00f26900ba87******\\",\\n \\"Status\\": \\"1\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n \\n 1654137303000\\n 1969497303000\\n 356217374433******\\n mqtt_device\\n -----BEGIN DEVICECERTIFICATE-----\\\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\\\n-----END DEVICECERTIFICATE-----\\n 00f26900ba87******\\n 1\\n \\n","errorExample":""}]', - 'title' => '获取设备证书详情', - 'description' => '- 仅铂金版和专业版实例支持使用GetDeviceCertificate接口。'."\n" - .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。', - 'extraInfo' => '### 控制台操作'."\n" - .'除了调用GetDeviceCertificate接口,您还可以通过微消息队列MQTT版控制台查看指定设备证书的详细信息。具体操作,请参见[CA证书管理](~~436873~~)。', - ], - 'DeleteDeviceCertificate' => [ - 'summary' => '设备证书是由CA根证书签发给客户端设备使用的数字证书,用于客户端和服务端连接时,服务端对客户端进行安全认证。认证通过后服务端和客户端可基于证书内的加密密钥进行安全通信,若认证不通过则服务端拒绝客户端接入。'."\n" - .'若您不想需要使用某个设备证书,您可以调用本接口将指定设备证书的注册信息从服务端的存储记录中删除。', - 'methods' => [ - 'get', - 'post', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"CurrentPage\\": 1,\\n \\"RequestId\\": \\"B096B9D6-62F3-4567-BB59-58D1362E****\\",\\n \\"PageSize\\": 10,\\n \\"Total\\": 5,\\n \\"MessageOfClientList\\": [\\n {\\n \\"Time\\": \\"2021-05-21 15:08:19.234\\",\\n \\"Action\\": \\"pub_mqtt\\",\\n \\"ActionCode\\": \\"mqtt.trace.action.msg.pub.mqtt\\",\\n \\"ActionInfo\\": \\"Pub From Mqtt Client\\",\\n \\"MsgId\\": \\"AC1EC0030EAB78308DB16A3EC773****\\",\\n \\"ClientId\\": \\"GID_test@@@producer\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"\\n B096B9D6-62F3-4567-BB59-58D1362E****\\n 10\\n 1\\n 5\\n \\n pub_mqtt\\n mqtt.trace.action.msg.pub.mqtt\\n GID_test@@@producer\\n Pub From Mqtt Client\\n \\n AC1EC0030EAB78308DB16A3EC773****\\n \\n \\n pub_mqtt\\n mqtt.trace.action.msg.pub.mqtt\\n GID_test@@@producer\\n Pub From Mqtt Client\\n \\n AC1EC0030EAB78308DB16A3EC78F****\\n \\n \\n pub_mqtt\\n mqtt.trace.action.msg.pub.mqtt\\n GID_test@@@producer\\n Pub From Mqtt Client\\n \\n AC1EC0030EAB78308DB16A3EC78F****\\n \\n \\n pub_mqtt\\n mqtt.trace.action.msg.pub.mqtt\\n GID_test@@@producer\\n Pub From Mqtt Client\\n \\n AC1EC0030EAB78308DB16A3EC78F****\\n \\n \\n pub_mqtt\\n mqtt.trace.action.msg.pub.mqtt\\n GID_test@@@producer\\n Pub From Mqtt Client\\n \\n AC1EC0030EAB78308DB16A3EC78F****\\n \\n","errorExample":""}]', + 'title' => '查询消息轨迹', + 'summary' => '查询指定设备在一定时间段内的消息列表。当消息的收发不符合预期时,您可以通过该接口查看消息的收发状态等轨迹信息,帮助您快速定位异常原因。', + 'description' => '- 每成功调用一次**QueryMqttTraceMessageOfClient**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。'."\n" + .'- 本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见[QPS限制](~~163047~~)。', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', + 'extraInfo' => '## 控制台操作'."\n" + .'除了调用**QueryMqttTraceMessageOfClient**接口,您还可以通过微消息队列MQTT版控制台查看设备的消息列表。具体操作,请参见[消息轨迹查询](~~205708~~)。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'QueryMqttTraceMessageOfClient'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:QueryMqttDeviceTrace', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + ], + 'QueryMqttTraceMessagePublish' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -5168,433 +3730,363 @@ 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'delete', - 'riskType' => 'high', - 'chargeType' => 'free', - 'abilityTreeCode' => '145869', - 'abilityTreeNodes' => [ - 'FEATUREons0PHGX2', - ], + 'operationType' => 'none', + 'abilityTreeCode' => '84628', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ [ - 'name' => 'MqttInstanceId', + 'name' => 'MqttRegionId', 'in' => 'query', - 'schema' => [ - 'description' => '设备证书所绑定的实例ID,即云消息队列 MQTT 版的实例ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-7mz2d******', - ], + 'schema' => ['description' => '云消息队列 MQTT 版实例地域(Region)的ID。请参见[服务接入点](~~181438~~)。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'cn-hangzhou'], ], [ - 'name' => 'DeviceSn', + 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '待删除设备证书的SN序列号,用于唯一标识一个设备证书。'."\n" - ."\n" - .'取值范围:不超过128 Byte。', - 'type' => 'string', - 'required' => true, - 'example' => '356217374433****', - ], + 'schema' => ['description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面的**基础信息**区域查看。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'mqtt-cn-i7m26mf****'], ], [ - 'name' => 'CaSn', + 'name' => 'MsgId', 'in' => 'query', - 'schema' => [ - 'description' => '设备证书所属的CA证书的序列号,用于唯一标识一个CA证书。CA证书用于验证设备证书的正确性。'."\n" - ."\n" - .'取值范围:不超过128 Byte。'."\n", - 'type' => 'string', - 'required' => true, - 'example' => '007269004887******', - ], + 'schema' => ['description' => '消息ID,即Message ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'AC1EC0030EAB78308DB16A3EC773****'], + ], + [ + 'name' => 'BeginTime', + 'in' => 'query', + 'schema' => ['description' => '查询范围的起始时间戳。单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'maximum' => '9223372036854774807', 'minimum' => '-9223372036854774808', 'example' => '1618646400000'], + ], + [ + 'name' => 'EndTime', + 'in' => 'query', + 'schema' => ['description' => '查询范围的终止时间戳。单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'maximum' => '9223372036854774807', 'minimum' => '-9223372036854774808', 'example' => '1621591200000'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], - 'DeviceSn' => [ - 'description' => '已删除设备证书的SN序列号,用于唯一标识一个设备证书。', - 'type' => 'string', - 'example' => '356217374433******', - ], - ], - ], - ], - ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], - ], - 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', - ], - ], - 500 => [ - [ - 'errorCode' => 'ParameterFieldCheckFailed', - 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', - ], - [ - 'errorCode' => 'FindDeviceBySnError', - 'errorMessage' => 'Failed to find the device certificate by the SN. Please check sn is valid', - ], - [ - 'errorCode' => 'MqttInstanceNotFound', - 'errorMessage' => 'Specified instance is not found', + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '69AD5550-BF22-438A-9202-A6E89185****'], + 'MessageTraceLists' => [ + 'description' => '返回的消息发送轨迹列表。', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Time' => ['description' => '消息的发送时间。', 'type' => 'string', 'example' => '2021-05-21 15:08:19.210'], + 'Action' => ['description' => '消息动作。取值说明如下:'."\n" + ."\n" + .'- **pub_mqtt**:表示消息的发送者是云消息队列 MQTT 版客户端。'."\n" + ."\n" + .'- **pub_mq**:表示消息的发送者是云消息队列 RocketMQ 版客户端。'."\n" + ."\n" + .'- **ServerSend**:表示消息的发送者是云端SDK。', 'type' => 'string', 'example' => 'pub_mqtt'], + 'ActionCode' => ['description' => '消息动作的返回码。取值说明如下:'."\n" + ."\n" + .'- **mqtt.trace.action.msg.pub.mqtt**:消息动作取值为**pub_mqtt**时返回该参数值。'."\n" + ."\n" + .'- **mqtt.trace.action.msg.pub.mq**:消息动作取值为**pub_mq**时返回该参数值。'."\n" + ."\n" + .'- **mqtt.trace.action.msg.server.send**:消息动作取值为**ServerSend**时返回该参数值。', 'type' => 'string', 'example' => 'mqtt.trace.action.msg.pub.mqtt'], + 'ActionInfo' => ['description' => '消息动作的说明信息。取值说明如下:'."\n" + ."\n" + .'- **Pub From Mqtt Client**:消息动作取值为**pub_mqtt**时返回该参数值。'."\n" + ."\n" + .'- **Pub From MQ**:消息动作取值为**pub_mq**时返回该参数值。'."\n" + ."\n" + .'- **Server Send**:消息动作取值为**ServerSend**时返回该参数值。', 'type' => 'string', 'example' => 'Pub From Mqtt Client'], + 'MsgId' => ['description' => '消息ID,即Message ID。', 'type' => 'string', 'example' => 'AC1EC0030EAB78308DB16A3EC773BD95'], + 'ClientId' => ['description' => '发送消息的客户端ID。', 'type' => 'string', 'example' => 'GID_test@@@producer'], + ], + ], + ], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"DeviceSn\\": \\"356217374433******\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 356217374433******\\n","errorExample":""}]', - 'title' => '删除设备证书', - 'description' => '- 仅铂金版和专业版实例支持使用DeleteDeviceCertificate接口。'."\n" - .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。', - 'extraInfo' => '### 控制台操作'."\n" - .'除了调用DeleteDeviceCertificate接口,您还可以通过微消息队列MQTT版控制台删除设备证书。具体操作,请参见[设备证书管理](~~449435~~)。', - ], - 'AddCustomAuthIdentity' => [ - 'summary' => '添加账号身份认证信息,可以具体到客户端。', - 'methods' => [ - 'post', + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => ''], + ], + 404 => [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => ''], + ], + 500 => [ + ['errorCode' => 'SystemOverFlow', 'errorMessage' => 'An error occurred while processing your request. Please try again.', 'description' => ''], + ], ], - 'schemes' => [ - 'https', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"69AD5550-BF22-438A-9202-A6E89185****\\",\\n \\"MessageTraceLists\\": [\\n {\\n \\"Time\\": \\"2021-05-21 15:08:19.210\\",\\n \\"Action\\": \\"pub_mqtt\\",\\n \\"ActionCode\\": \\"mqtt.trace.action.msg.pub.mqtt\\",\\n \\"ActionInfo\\": \\"Pub From Mqtt Client\\",\\n \\"MsgId\\": \\"AC1EC0030EAB78308DB16A3EC773BD95\\",\\n \\"ClientId\\": \\"GID_test@@@producer\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"\\n \\n pub_mqtt\\n mqtt.trace.action.msg.pub.mqtt\\n GID_test@@@producer\\n \\n Pub From Mqtt Client\\n AC1EC0030EAB78308DB16A3EC773****\\n \\n 69AD5550-BF22-438A-9202-A6E89185****\\n","errorExample":""}]', + 'title' => '查询消息发送轨迹', + 'summary' => '查询指定消息的发送轨迹。当消息的收发不符合预期时,您可以通过该接口查看消息的发布时间、发布客户端等详细信息,帮助您快速定位异常原因。', + 'description' => '- 每成功调用一次**QueryMqttTraceMessagePublish**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。'."\n" + .'- 本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见[QPS限制](~~163047~~)。', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', + 'extraInfo' => '## 控制台操作'."\n" + .'除了调用**QueryMqttTraceMessagePublish**接口,您还可以通过微消息队列MQTT版控制台查看消息的发送轨迹。具体操作,请参见[消息轨迹查询](~~205708~~)。', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:QueryMqttPubTrace', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + ], + 'QueryMqttTraceMessageSubscribe' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, + 'operationType' => 'read', 'systemTags' => [ - 'operationType' => 'create', - 'riskType' => 'high', + 'operationType' => 'none', + 'riskType' => 'none', 'chargeType' => 'free', - 'abilityTreeCode' => '207003', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', - ], + 'abilityTreeCode' => '84629', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ + [ + 'name' => 'MqttRegionId', + 'in' => 'query', + 'schema' => ['description' => '云消息队列 MQTT 版实例地域(Region)的ID。请参见[服务接入点](~~181438~~)。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'cn-hangzhou'], + ], [ 'name' => 'InstanceId', - 'in' => 'formData', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的 ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'mqtt-cn-xxxx', - ], + 'in' => 'query', + 'schema' => ['description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面的**基础信息**区域查看。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'mqtt-cn-i7m26mf****'], ], [ - 'name' => 'Username', - 'in' => 'formData', - 'schema' => [ - 'description' => '用户名。', - 'type' => 'string', - 'required' => true, - 'example' => 'test', - ], + 'name' => 'Reverse', + 'in' => 'query', + 'schema' => ['description' => '返回结果是否倒序显示。取值说明如下:'."\n" + ."\n" + .'- **true**:按照消息的投递时间倒序显示,最后一条消费的消息显示在第一条,最早一条消费的消息显示在最后一条。'."\n" + ."\n" + .'- **false**:按照消息的投递时间顺序显示,最早一条消费的消息显示在第一条,最后一条消费的消息显示在最后一条。'."\n" + ."\n" + .'若不输入,则返回结果默认按照消息的投递时间顺序显示。', 'type' => 'boolean', 'required' => false, 'docRequired' => true, 'example' => 'false'], ], [ - 'name' => 'Secret', - 'in' => 'formData', - 'schema' => [ - 'description' => '密钥。', - 'type' => 'string', - 'required' => true, - 'example' => 'xxxxx', - ], + 'name' => 'ClientId', + 'in' => 'query', + 'schema' => ['description' => '指定订阅消息的客户端ID。若不输入,则返回所有订阅该消息的客户端信息。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'GID_test@@@consumer'], ], [ - 'name' => 'IdentityType', - 'in' => 'formData', - 'schema' => [ - 'description' => '身份类型。'."\n" - ."\n" - .'- USER:仅用户名。'."\n" - ."\n" - .'- CLIENT:具体到客户端。', - 'type' => 'string', - 'required' => true, - 'example' => 'USER', - 'enum' => [ - 'USER', - 'CLIENT', - ], - ], + 'name' => 'BeginTime', + 'in' => 'query', + 'schema' => ['description' => '查询范围的起始时间戳。单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'maximum' => '9223372036854774807', 'minimum' => '-9223372036854774808', 'example' => '1621936800000'], ], [ - 'name' => 'ClientId', - 'in' => 'formData', - 'schema' => [ - 'description' => '当身份类型是CLIENT时,指定设备的ClientID。', - 'type' => 'string', - 'required' => false, - 'example' => 'GID_test@@@test', - ], + 'name' => 'EndTime', + 'in' => 'query', + 'schema' => ['description' => '查询范围的终止时间戳。单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'maximum' => '9223372036854774807', 'minimum' => '-9223372036854774808', 'example' => '1618646400000'], ], [ - 'name' => 'SignMode', - 'in' => 'formData', - 'schema' => [ - 'description' => '签名校验方式,ORIGIN:原始值比较,即比较password与secret,SIGNED: 对clientId进行HmacSHA1加签(使用secret,参考签名模式)验证,然后比较password。', - 'type' => 'string', - 'required' => true, - 'example' => 'SIGNED', - 'enum' => [ - 'ORIGIN', - 'SIGNED', - ], - ], + 'name' => 'CurrentPage', + 'in' => 'query', + 'schema' => ['description' => '当前取第几页消息,从1开始递增。若输入参数大于总页数,则返回结果为空。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'maximum' => '2147483647', 'minimum' => '-2147483648', 'example' => '1'], + ], + [ + 'name' => 'PageSize', + 'in' => 'query', + 'schema' => ['description' => '分页查询,每页最多显示的消息数量,最小1条,最多100条。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'maximum' => '2147483647', 'minimum' => '-2147483648', 'example' => '5'], + ], + [ + 'name' => 'MsgId', + 'in' => 'query', + 'schema' => ['description' => '消息ID,即Message ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'AC1EC1B33D5978308DB17F3245E4****', 'maxLength' => 2147483647, 'minLength' => 0], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], - 'Code' => [ - 'description' => '状态码。说明 200表示成功。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'Message' => [ - 'description' => '返回信息。', - 'type' => 'string', - 'example' => 'operation success.', + 'CurrentPage' => ['description' => '当前位于第几页。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '4E685844-ADAF-4D85-9EAC-F9471E8C****'], + 'PageSize' => ['description' => '每页最多显示的消息数量。', 'type' => 'integer', 'format' => 'int32', 'example' => '5'], + 'Total' => ['description' => '查询到的消息轨迹总数。', 'type' => 'integer', 'format' => 'int64', 'example' => '2'], + 'MessageTraceLists' => [ + 'description' => '返回的消息投递轨迹列表。', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Time' => ['description' => '消息的投递时间。', 'type' => 'string', 'example' => '2021-05-25 16:46:41.274'], + 'Action' => ['description' => '消息动作。取值说明如下:'."\n" + ."\n" + .'- **sub**:微消息队列MQTT版客户端订阅消息。'."\n" + ."\n" + .'- **push_offline**:服务端推送离线消息到微消息队列MQTT版客户端。', 'type' => 'string', 'example' => 'sub'], + 'ActionCode' => ['description' => '消息动作的返回码。取值说明如下:'."\n" + ."\n" + .'- **mqtt.trace.action.msg.sub**:消息动作取值为**sub**时返回该参数值。'."\n" + ."\n" + .'- **mqtt.trace.action.msg.push.offline**:消息动作取值为**push_offline**时返回该参数值。', 'type' => 'string', 'example' => 'mqtt.trace.action.msg.sub'], + 'ActionInfo' => ['description' => '消息动作的说明信息。取值说明如下:'."\n" + ."\n" + .'- **Push To Mqtt Client**:消息动作取值为**sub**时返回该参数值。'."\n" + ."\n" + .'- **Push Offline Msg To Mqtt Client**:消息动作取值为**push_offline**时返回该参数值。', 'type' => 'string', 'example' => 'Push To Mqtt Client'], + 'MsgId' => ['description' => '消息ID,即Message ID。', 'type' => 'string', 'example' => 'AC1EC1B33D5978308DB17F3245E4****'], + 'ClientId' => ['description' => '订阅消息的客户端ID。', 'type' => 'string', 'example' => 'GID_test@@@consumer'], + ], + 'description' => '', + ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], - [ - 'errorCode' => 'Customauth.over.capacity', - 'errorMessage' => 'Over custom auth capacity.', - ], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => '实例权限校验失败'], + ['errorCode' => 'MqttInstanceNotFound', 'errorMessage' => 'Specified instance is not found', 'description' => '实例不存在'], ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + 403 => [ + ['errorCode' => 'SystemOverFlow', 'errorMessage' => 'An error occurred while processing your request. Please try again.', 'description' => ''], + ], + [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', - 'title' => '添加身份认证', - ], - 'UpdateCustomAuthIdentity' => [ - 'summary' => '更新自定义身份认证。', - 'methods' => [ - 'post', + 'title' => '查询消息消费轨迹', + 'summary' => '查询指定消息的投递轨迹。当消息的收发不符合预期时,您可以通过该接口查看订阅该消息的客户端、消息的投递时间等详细信息,帮助您快速定位异常原因。', + 'description' => '- 每成功调用一次**QueryMqttTraceMessageSubscribe**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。'."\n" + .'- 本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见[QPS限制](~~163047~~)。', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', + 'extraInfo' => '## 控制台操作'."\n" + .'除了调用**QueryMqttTraceMessageSubscribe**接口,您还可以通过微消息队列MQTT版控制台查看消息的投递轨迹。具体操作,请参见[消息轨迹查询](~~205708~~)。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'QueryMqttTraceMessageSubscribe'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:QueryMqttSubTrace', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"CurrentPage\\": 1,\\n \\"RequestId\\": \\"4E685844-ADAF-4D85-9EAC-F9471E8C****\\",\\n \\"PageSize\\": 5,\\n \\"Total\\": 2,\\n \\"MessageTraceLists\\": [\\n {\\n \\"Time\\": \\"2021-05-25 16:46:41.274\\",\\n \\"Action\\": \\"sub\\",\\n \\"ActionCode\\": \\"mqtt.trace.action.msg.sub\\",\\n \\"ActionInfo\\": \\"Push To Mqtt Client\\",\\n \\"MsgId\\": \\"AC1EC1B33D5978308DB17F3245E4****\\",\\n \\"ClientId\\": \\"GID_test@@@consumer\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"\\n \\n sub\\n mqtt.trace.action.msg.sub\\n GID_test@@@consumer\\n Push To Mqtt Client\\n \\n AC1EC1B33D5978308DB17F3245E4****\\n \\n \\n sub\\n mqtt.trace.action.msg.sub\\n GID_test@@@consumer2\\n Push To Mqtt Client\\n \\n AC1EC1B33D5978308DB17F3245E4****\\n \\n 4E685844-ADAF-4D85-9EAC-F9471E8C****\\n 5\\n 1\\n 2\\n","errorExample":""}]', + ], + 'QuerySessionByClientId' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'update', - 'riskType' => 'high', + 'operationType' => 'get', + 'riskType' => 'none', 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREonsICR0M4'], ], 'parameters' => [ - [ - 'name' => 'InstanceId', - 'in' => 'formData', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的 ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-111****', - ], - ], - [ - 'name' => 'Username', - 'in' => 'formData', - 'schema' => [ - 'description' => '用户名。', - 'type' => 'string', - 'required' => true, - 'example' => 'test', - ], - ], - [ - 'name' => 'Secret', - 'in' => 'formData', - 'schema' => [ - 'description' => '密钥。', - 'type' => 'string', - 'required' => true, - 'example' => 'xxxx', - ], - ], - [ - 'name' => 'IdentityType', - 'in' => 'formData', - 'schema' => [ - 'description' => '身份类型。'."\n" - ."\n" - .'- USER:仅用户名。'."\n" - ."\n" - .'- CLIENT:具体到客户端。', - 'type' => 'string', - 'required' => true, - 'example' => 'USER', - 'enum' => [ - 'USER', - 'CLIENT', - ], - ], - ], [ 'name' => 'ClientId', - 'in' => 'formData', - 'schema' => [ - 'description' => '当身份类型是CLIENT时,指定设备的ClientID。', - 'type' => 'string', - 'required' => false, - 'example' => 'GID_test@@@test', - ], + 'in' => 'query', + 'schema' => ['description' => '需要查询的目标Client ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test@@@test'], ], [ - 'name' => 'SignMode', - 'in' => 'formData', - 'schema' => [ - 'description' => '签名校验方式,ORIGIN:原始值比较,即比较password与secret,SIGNED: 对clientId进行HmacSHA1加签(使用secret,参考签名模式)验证,然后比较password。', - 'type' => 'string', - 'required' => true, - 'example' => 'SIGNED', - 'enum' => [ - 'ORIGIN', - 'SIGNED', - ], - ], + 'name' => 'InstanceId', + 'in' => 'query', + 'schema' => ['description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在[控制台](https://mqtt.console.aliyun.com)**实例详情**页面获取该ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'post-cn-0pp12gl****'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '3F00084A-7F07-4B15-BADA-8903A4FB****', - ], - 'Code' => [ - 'description' => '返回结果编码。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Success' => [ - 'description' => '操作是否成功。取值:true:成功。false:失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'Message' => [ - 'description' => '返回消息。', - 'type' => 'string', - 'example' => 'operation success.', - ], + 'OnlineStatus' => ['description' => '设备是否在线,取值说明如下:'."\n" + ."\n" + .'- **true**:在线'."\n" + .'- **false**:不在线', 'type' => 'boolean', 'example' => 'true'], + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的。', 'type' => 'string', 'example' => 'E4581CCF-62AF-44D9-B5B4-D1DBBC0E****'], ], + 'description' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], + ['errorCode' => 'CheckAccountInfoFailed', 'errorMessage' => 'An error occurred while checking the account information by the STS token.', 'description' => '解析STS Token账号信息失败。'], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'ParameterCheckFailed', 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + 403 => [ + ['errorCode' => 'SystemOverFlow', 'errorMessage' => 'An error occurred while processing your request. Please try again.', 'description' => ''], + ], + [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], + ], + 417 => [ + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => ''], ], - ], - 'staticInfo' => [ - 'returnType' => 'synchronous', ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"3F00084A-7F07-4B15-BADA-8903A4FB****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', - 'title' => '更新身份认证', - ], - 'QueryCustomAuthIdentity' => [ - 'summary' => '查询自定义身份认证。', - 'methods' => [ - 'get', + 'title' => '查询客户端在线状态', + 'summary' => '**QuerySessionByClientId**接口一般用于线上追踪单个设备的运行状态,再根据查询到的信息排查问题。输入Client ID即可查到对应设备是否在线、设备地址等信息。', + 'description' => '- **QuerySessionByClientId**接口的QPS限制为500。更多信息请参见[QPS限制](~~163047~~)。'."\n" + .'- 每成功调用一次**QuerySessionByClientId**接口,都会计算为一次消息TPS,从而影响您的计费。详情请参见[计费说明](~~52819~~)。', + 'requestParamsDescription' => '> 更多参数说明请参见[公共参数](~~178121~~)和[服务接入点](~~181438~~)。', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'QuerySessionByClientId'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:MqttInstanceAccess', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"OnlineStatus\\": true,\\n \\"RequestId\\": \\"E4581CCF-62AF-44D9-B5B4-D1DBBC0E****\\"\\n}","errorExample":""},{"type":"xml","example":"\\r\\n true\\r\\n E4581CCF-62AF-44D9-B5B4-D1DBBC0E****\\r\\n","errorExample":""}]', + ], + 'QueryToken' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -5602,199 +4094,188 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'high', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'get'], 'parameters' => [ [ - 'name' => 'InstanceId', + 'name' => 'Token', 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列MQTT版实例的ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-111****', - ], + 'schema' => ['description' => '您需查询的Token。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'LzMT+XLFl5s/YWJ/MlDz4t/Lq5HC1iGU1P28HAMaxYxn8aQbALNtml7QZKl9L9kPe6LqUb95tEVo+zUqOogs9+jZwDUSzsd4X4qaD3n2TrBEuMOqKkk1Xdrvu9VBQQvIYbz7MJWZDYC3DlW7gLEr33Cuj54iIhagtBi3epStJitsssWs7otY9zhKOSZxhr49G3d0bh35mwyP18EMvDas8UlzeSozsSrujNUqZXOGK0PEBSd+rWMGDJlCt6GFmJgm2JFY7PJwf/7OOSmUYIYFs5o/PuPpoTMF+hcVXMs+0yDukIMTOzG9m3t8k36PVrghFmnK6pC3Rt3mibjW****ng=='], ], [ - 'name' => 'Username', + 'name' => 'InstanceId', 'in' => 'query', + 'schema' => ['description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。该实例ID在[控制台](https://mqtt.console.aliyun.com/)**实例详情**页面获取。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'post-cn-0pp12gl****'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '用户名。', - 'type' => 'string', - 'required' => false, - 'example' => 'test', + 'type' => 'object', + 'properties' => [ + 'TokenStatus' => ['description' => '您所校验的Token的状态。取值说明如下:'."\n" + .'- **true**:该Token有效。'."\n" + .'- **false**:该Token无效。', 'type' => 'boolean', 'example' => 'true'], + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的。', 'type' => 'string', 'example' => '5C8AADD0-6A95-436D-AFA0-3405CCE3****'], + ], ], ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'CheckAccountInfoFailed', 'errorMessage' => 'An error occurred while checking the account information by the STS token.', 'description' => '解析STS Token账号信息失败。'], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'ParameterCheckFailed', 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], + ['errorCode' => 'QueryTokenOverFlow', 'errorMessage' => 'You have queried tokens too many times. Please try again later.', 'description' => '查询Token频率过高,系统限流,请稍后重试。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ], + 404 => [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], + ], + 500 => [ + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => 'MQTT后端服务异常,请重试。'], + ['errorCode' => 'SystemOverFlow', 'errorMessage' => 'An error occurred while processing your request. Please try again.', 'description' => '系统限流,请重试。'], + ], + ], + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"TokenStatus\\": true,\\n \\"RequestId\\": \\"5C8AADD0-6A95-436D-AFA0-3405CCE3****\\"\\n}","errorExample":""},{"type":"xml","example":"\\r\\n5C8AADD0-6A95-436D-AFA0-3405CCE3****\\r\\ntrue\\r\\n","errorExample":""}]', + 'title' => '校验Token的有效性', + 'summary' => 'Token鉴权方式下,云消息队列 MQTT 版服务端会颁发Token(临时凭证)给客户端,客户端访问云消息队列 MQTT 版服务端时需要携带Token用于权限验证。'."\n" + .'Token为临时访问凭证具有一定的时效性,您可以通过本接口查询Token是否失效。', + 'description' => '- 单用户请求频率限制为100次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。'."\n" + .'- 每成功调用一次**QueryToken**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。', + 'requestParamsDescription' => '> 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'QueryToken'], + ], + ], + 'ramActions' => [ [ - 'name' => 'IdentityType', - 'in' => 'query', - 'schema' => [ - 'description' => '身份类型。', - 'type' => 'string', - 'required' => false, - 'example' => 'USER', - 'enum' => [ - 'USER', - 'CLIENT', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:QueryToken', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], ], + ], + ], + 'RefreshDeviceCredential' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], + 'security' => [ [ - 'name' => 'ClientId', - 'in' => 'query', - 'schema' => [ - 'description' => '当查询身份类型是CLIENT时,可以指定设备的ClientID。', - 'type' => 'string', - 'required' => false, - 'example' => 'GID_test@@@test', - ], + 'AK' => [], ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'none', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], + ], + 'parameters' => [ [ - 'name' => 'NextToken', + 'name' => 'ClientId', 'in' => 'query', - 'schema' => [ - 'description' => '用来标记当前查询结束的位置,以便下一次调用时作为参数传入,继续翻页。首次调用或返回最后一页时,取值为空字符串。', - 'type' => 'string', - 'required' => false, - 'example' => 'eyJhY2NvdW50IjoiMTM4MTcxODk3NDQzMjQ1OSIsImV2ZW50SWQiOiJGMkUxOUE3QS1FM0Q0LTVCOEYtQkU4OS1CNkMyM0RBM0UyRjIiLCJsb2dJZCI6IjY2LTEzODE3MTg5NzQ0MzI0NTkiLCJydyI6IlciLCJ0aW1lIjoxNjc4MzI2MTI1MDAwfQ', - ], + 'schema' => ['description' => '需要更新访问凭证的设备的Client ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test@@@test'], ], [ - 'name' => 'Size', + 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '查询数量,最大值:100。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => true, - 'maximum' => '100', - 'minimum' => '1', - 'example' => '100', - ], + 'schema' => ['description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面获取该ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'post-cn-0pp12gl****'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '11568B5B-13A8-4E72-9DBA-3A14F7D3****', - ], - 'Code' => [ - 'description' => '接口返回码:200:表示成功。 其它:表示错误码。错误码详情,请参见错误码。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Success' => [ - 'description' => '是否调用成功:true:调用成功。 false:调用失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'Message' => [ - 'description' => '附加信息。', - 'type' => 'string', - 'example' => 'operation success.', - ], - 'Data' => [ - 'description' => '查询结果。', + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的。', 'type' => 'string', 'example' => 'E4581CCF-62AF-44D9-B5B4-D1DBDC0F****'], + 'DeviceCredential' => [ + 'description' => '设备的访问凭证信息。', 'type' => 'object', 'properties' => [ - 'Results' => [ - 'description' => '返回数据。', - 'type' => 'array', - 'items' => [ - 'description' => '返回数据。', - 'type' => 'object', - 'properties' => [ - 'Username' => [ - 'description' => '用户名。', - 'type' => 'string', - 'example' => 'test', - ], - 'Secret' => [ - 'description' => '密钥。', - 'type' => 'string', - 'example' => '62a5916d71767185b48907d85c2efa****', - ], - 'IdentityType' => [ - 'description' => '身份类型。'."\n" - ."\n" - .'- USER:仅用户名。'."\n" - ."\n" - .'- CLIENT:具体到客户端。', - 'type' => 'string', - 'example' => 'USER', - ], - 'ClientId' => [ - 'description' => '当身份类型是CLIENT时,指定设备的ClientID。', - 'type' => 'string', - 'example' => 'GID_ICP@@@4d378084', - ], - 'SignMode' => [ - 'description' => '签名校验方式,ORIGIN:原始值比较,即比较password与secret,SIGNED: 对clientId进行HmacSHA1加签(使用secret)验证,然后比较password。', - 'type' => 'string', - 'example' => 'SIGNED', - ], - ], - ], - ], - 'NextToken' => [ - 'description' => '如果还有多余的返回值则会返回NextToken。', - 'type' => 'string', - 'example' => 'AAAAAXA+GzVqTutYpgkFjBrchKzuvSbpuTqtt6OF9tsC9QnJ', - ], + 'UpdateTime' => ['description' => '设备访问凭证上一次更新的毫秒时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1605541382000'], + 'DeviceAccessKeyId' => ['description' => '设备的AccessKey ID。', 'type' => 'string', 'example' => 'DC.Z5fXh9sRRVufyLi6wo****'], + 'CreateTime' => ['description' => '设备访问凭证创建的毫秒时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1605541382000'], + 'InstanceId' => ['description' => '云消息队列 MQTT 版实例的ID。', 'type' => 'string', 'example' => 'post-cn-0pp12gl****'], + 'DeviceAccessKeySecret' => ['description' => '设备的AccessKey Secret。', 'type' => 'string', 'example' => 'DC.BJMkn4eMQJK2vaApTS****'], + 'ClientId' => ['description' => '设备的Client ID。', 'type' => 'string', 'example' => 'GID_test@@@test'], ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], + ['errorCode' => 'ApplyTokenOverFlow', 'errorMessage' => 'You have applied for tokens too many times. Please try again later.', 'description' => '申请Token频率过高,系统限流,请重试。'], + ['errorCode' => 'CheckAccountInfoFailed', 'errorMessage' => 'An error occurred while checking the account information by the STS token.', 'description' => '解析STS Token账号信息失败。'], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'ParameterCheckFailed', 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'DeviceCredentialNotFound', 'errorMessage' => 'Device Credential Not Found.Check if the device certificate is registered.', 'description' => '设备证书不存在'], + ['errorCode' => 'DeviceCredentialNumExceed', 'errorMessage' => 'The number of device credentia exceeds the limit. Please revoke unused device certificates.', 'description' => '设备证书数量超限'], + ['errorCode' => 'DeviceCredentialExsit', 'errorMessage' => 'Device Credential Exsit.', 'description' => '设备证书已经存在'], ], 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], + ], + 500 => [ + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => 'MQTT后端服务异常,请重试。'], + ['errorCode' => 'SystemOverFlow', 'errorMessage' => 'An error occurred while processing your request. Please try again.', 'description' => '系统限流,请重试。'], ], - ], - 'staticInfo' => [ - 'returnType' => 'synchronous', ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"11568B5B-13A8-4E72-9DBA-3A14F7D3****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\",\\n \\"Data\\": {\\n \\"Results\\": [\\n {\\n \\"Username\\": \\"test\\",\\n \\"Secret\\": \\"62a5916d71767185b48907d85c2efa****\\",\\n \\"IdentityType\\": \\"USER\\",\\n \\"ClientId\\": \\"GID_ICP@@@4d378084\\",\\n \\"SignMode\\": \\"SIGNED\\"\\n }\\n ],\\n \\"NextToken\\": \\"AAAAAXA+GzVqTutYpgkFjBrchKzuvSbpuTqtt6OF9tsC9QnJ\\"\\n }\\n}","type":"json"}]', - 'title' => '查询身份认证', - ], - 'DeleteCustomAuthIdentity' => [ - 'summary' => '删除自定义身份认证。', - 'methods' => [ - 'post', + 'title' => '更新设备的访问凭证', + 'summary' => '调用RefreshDeviceCredential更新设备的访问凭证。', + 'description' => '- 本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见[QPS限制](~~163047~~)。'."\n" + .'- 每成功调用一次**RefreshDeviceCredential**接口,都会计算为一次消息TPS,从而影响您的计费。详细信息,请参见[计费说明](~~52819~~)。', + 'requestParamsDescription' => ' > 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RefreshDeviceCredential'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:RefreshDeviceCredential', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"E4581CCF-62AF-44D9-B5B4-D1DBDC0F****\\",\\n \\"DeviceCredential\\": {\\n \\"UpdateTime\\": 1605541382000,\\n \\"DeviceAccessKeyId\\": \\"DC.Z5fXh9sRRVufyLi6wo****\\",\\n \\"CreateTime\\": 1605541382000,\\n \\"InstanceId\\": \\"post-cn-0pp12gl****\\",\\n \\"DeviceAccessKeySecret\\": \\"DC.BJMkn4eMQJK2vaApTS****\\",\\n \\"ClientId\\": \\"GID_test@@@test\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\nE4581CCF-62AF-44D9-B5B4-D1DBDC0F****\\n\\n post-cn-0pp12gl****\\n DC.BJMkn4eMQJK2vaApTS****\\n 1605541382000\\n 1605541382000\\n DC.Z5fXh9sRRVufyLi6wo****\\n GID_test@@@test\\n\\n","errorExample":""}]', + ], + 'RegisterCaCertificate' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -5803,58 +4284,35 @@ 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'delete', + 'operationType' => 'create', 'riskType' => 'high', 'chargeType' => 'free', + 'abilityTreeCode' => '141175', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ [ - 'name' => 'InstanceId', - 'in' => 'formData', - 'schema' => [ - 'description' => '微消息队列 MQTT 版实例的 ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-0pp12gl****', - ], + 'name' => 'MqttInstanceId', + 'in' => 'query', + 'schema' => ['description' => '云消息队列 MQTT 版的实例ID。注册CA证书时,需要指定一个实例进行绑定。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-7mz2d******'], ], [ - 'name' => 'Username', - 'in' => 'formData', - 'schema' => [ - 'description' => '用户名。', - 'type' => 'string', - 'required' => true, - 'example' => 'test', - ], + 'name' => 'CaName', + 'in' => 'query', + 'schema' => ['description' => '待注册CA证书的名称。', 'type' => 'string', 'required' => true, 'example' => 'mqtt_ca'], ], [ - 'name' => 'IdentityType', - 'in' => 'formData', - 'schema' => [ - 'description' => '身份类型。'."\n" - ."\n" - .'- USER:仅用户名。'."\n" - ."\n" - .'- CLIENT:具体到客户端。', - 'type' => 'string', - 'required' => true, - 'example' => 'USER', - 'enum' => [ - 'USER', - 'CLIENT', - ], - ], + 'name' => 'CaContent', + 'in' => 'query', + 'schema' => ['description' => '待注册CA证书的内容。'."\n" + ."\n" + .'> 示例中的\\n表示换行。', 'type' => 'string', 'required' => true, 'example' => '-----BEGIN CERTIFICATE-----\\nMIIDuzCCAqdGVzdC5jbi1xaW5n******\\n-----END CERTIFICATE-----'], ], [ - 'name' => 'ClientId', - 'in' => 'formData', - 'schema' => [ - 'description' => '当身份类型是CLIENT时,指定设备的ClientID。', - 'type' => 'string', - 'required' => false, - 'example' => 'GID_test@@@test', - ], + 'name' => 'VerificationContent', + 'in' => 'query', + 'schema' => ['description' => '待注册CA证书的验证证书的内容。和CA证书的注册码一起使用,用于验证用户拥有该CA证书的私钥。'."\n" + .'> 示例中的\\n表示换行。', 'type' => 'string', 'required' => true, 'example' => '-----BEGIN CERTIFICATE-----\\nMIID/DCCAu+Y5sRMpp9tnd+4s******\\n-----END CERTIFICATE-----'], ], ], 'responses' => [ @@ -5864,647 +4322,475 @@ 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '11568B5B-13A8-4E72-9DBA-3A14F7D3****', - ], - 'Code' => [ - 'description' => '状态码。200为成功,其他状态码为异常。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Success' => [ - 'description' => '操作是否成功。取值:true:成功。false:失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'Message' => [ - 'description' => '返回信息。', - 'type' => 'string', - 'example' => 'operation success.', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], + 'Sn' => ['description' => '已注册的CA证书的SN序列号,用于唯一标识一个CA证书。', 'type' => 'string', 'example' => '007269004887******'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => '实例权限校验失败'], + ['errorCode' => 'RegisterCodeError', 'errorMessage' => 'Register code error in verification certificate.', 'description' => '注册码错误'], + ['errorCode' => 'ParameterFieldCheckFailed', 'errorMessage' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'MqttApplyCluster4InstanceFailed', 'errorMessage' => 'the instance can not find cluster.', 'description' => '该实例获取集群信息失败'], + ['errorCode' => 'SystemError', 'errorMessage' => 'system error.', 'description' => '系统错误,请重试'], + ['errorCode' => 'MqttInstanceNotFound', 'errorMessage' => 'Specified instance is not found', 'description' => '实例不存在'], ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + [ + ['errorCode' => 'RegisterCodeUsed', 'errorMessage' => 'Register code has been used.', 'description' => ''], + ['errorCode' => 'GetCaNumError', 'errorMessage' => 'Failed to get ca num. Try again later.', 'description' => ''], + ['errorCode' => 'CaNumExceed', 'errorMessage' => 'CA certificate num exceed', 'description' => ''], + ['errorCode' => 'CertificateContentError', 'errorMessage' => 'Certificate content error, please check ca/verification certificate content. BasicConstraints extension should be set to true in CA certificate', 'description' => ''], + ['errorCode' => 'SnNotUnique', 'errorMessage' => 'Sn is not unique in gloabal', 'description' => 'SN 不是全局唯一的'], + ], + 403 => [ + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => 'ram权限检查失败'], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'title' => '注册CA证书', + 'summary' => '云消息队列 MQTT 版支持X.509证书认证,客户端可通过设备证书完成接入认证。CA证书用于为客户端签发设备证书,并验证设备证书的正确性,您需要先将申请的CA证书注册到云消息队列 MQTT 版的服务端上,才能用于认证设备证书。本接口用于将指定CA证书注册到云消息队列 MQTT 版服务端。', + 'description' => '- 仅铂金版和专业版实例支持使用RegisterCaCertificate接口。'."\n" + .'- 单用户请求频率限制为500次/秒。如有特殊需求,请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。', + 'extraInfo' => '### 控制台操作'."\n" + .'除了调用RegisterCaCertificate接口,您还可以通过微消息队列MQTT版控制台注册CA证书。具体操作,请参见[CA证书管理](~~436873~~)。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RegisterCaCertificate'], + ], ], - 'eventInfo' => [ - 'enable' => false, - 'eventNames' => [], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'mq:RegisterCa', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"11568B5B-13A8-4E72-9DBA-3A14F7D3****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', - 'title' => '删除身份认证', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Sn\\": \\"007269004887******\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 007269004887******\\n","errorExample":""}]', ], - 'AddCustomAuthPermission' => [ - 'summary' => '添加Topic资源授权信息,且需要在控制台提前创建一级Topic。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'RegisterDeviceCredential' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'create', - 'riskType' => 'high', + 'riskType' => 'none', 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ [ - 'name' => 'InstanceId', - 'in' => 'formData', - 'schema' => [ - 'description' => '消息队列MQTT版实例的ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'mqtt-cn-0pp12gl****', - ], + 'name' => 'ClientId', + 'in' => 'query', + 'schema' => ['description' => '需要注册访问凭证的设备的Client ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test@@@test'], ], [ - 'name' => 'IdentityType', - 'in' => 'formData', - 'schema' => [ - 'description' => '身份类型,USER: 仅用户名,CLIENT: 具体到客户端', - 'type' => 'string', - 'required' => true, - 'example' => 'USER', - 'enum' => [ - 'USER', - 'CLIENT', - ], - ], - ], - [ - 'name' => 'Identity', - 'in' => 'formData', - 'schema' => [ - 'description' => '用户名或客户端ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'test', - ], - ], - [ - 'name' => 'PermitAction', - 'in' => 'formData', - 'schema' => [ - 'description' => '授权操作。', - 'type' => 'string', - 'required' => true, - 'example' => 'PUB_SUB', - 'enum' => [ - 'PUB', - 'SUB', - 'PUB_SUB', - ], - ], - ], - [ - 'name' => 'Effect', - 'in' => 'formData', - 'schema' => [ - 'description' => '允许或拒绝。', - 'type' => 'string', - 'required' => true, - 'example' => 'ALLOW', - 'enum' => [ - 'ALLOW', - 'DENY', - ], - ], - ], - [ - 'name' => 'Topic', - 'in' => 'formData', - 'schema' => [ - 'description' => '授权的topic,支持mqtt多级topic与通配符。', - 'type' => 'string', - 'required' => true, - 'example' => 'test/t1', - ], + 'name' => 'InstanceId', + 'in' => 'query', + 'schema' => ['description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面获取该ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'post-cn-0pp12gl****'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '82B9E503-F4A1-4F30-976F-C6999FF9****', - ], - 'Code' => [ - 'description' => '状态码。说明 200表示成功。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Success' => [ - 'description' => '是否调用成功。返回值:true:调用成功。 false:调用失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'Message' => [ - 'description' => '返回信息。', - 'type' => 'string', - 'example' => 'operation success.', + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的。', 'type' => 'string', 'example' => 'E4581CCF-62AF-44D9-B5B4-D1DBDC0E****'], + 'DeviceCredential' => [ + 'description' => '设备的访问凭证信息。', + 'type' => 'object', + 'properties' => [ + 'UpdateTime' => ['description' => '设备访问凭证上一次更新的毫秒时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1605541382000'], + 'DeviceAccessKeyId' => ['description' => '设备的AccessKey ID。', 'type' => 'string', 'example' => 'DC.Z5fXh9sRRVufyLi6wo****'], + 'CreateTime' => ['description' => '设备访问凭证创建的毫秒时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1605541382000'], + 'InstanceId' => ['description' => '云消息队列 MQTT 版实例的ID。', 'type' => 'string', 'example' => 'post-cn-0pp12gl****'], + 'DeviceAccessKeySecret' => ['description' => '设备的AccessKey Secret。', 'type' => 'string', 'example' => 'DC.BJMkn4eMQJK2vaApTS****'], + 'ClientId' => ['description' => '设备的Client ID。', 'type' => 'string', 'example' => 'GID_test@@@test'], + ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], - [ - 'errorCode' => 'Customauth.over.capacity', - 'errorMessage' => 'Over custom auth capacity.', - ], + ['errorCode' => 'ApplyTokenOverFlow', 'errorMessage' => 'You have applied for tokens too many times. Please try again later.', 'description' => '申请Token频率过高,系统限流,请重试。'], + ['errorCode' => 'CheckAccountInfoFailed', 'errorMessage' => 'An error occurred while checking the account information by the STS token.', 'description' => '解析STS Token账号信息失败。'], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'ParameterCheckFailed', 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'DeviceCredentialNumExceed', 'errorMessage' => 'The number of device credentia exceeds the limit. Please revoke unused device certificates.', 'description' => '设备证书数量超限'], + ['errorCode' => 'DeviceCredentialNotFound', 'errorMessage' => 'Device Credential Not Found.Check if the device certificate is registered.', 'description' => '设备证书不存在'], + ['errorCode' => 'DeviceCredentialExsit', 'errorMessage' => 'Device Credential Exsit.', 'description' => '设备证书已经存在'], ], 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], + ], + 500 => [ + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => 'MQTT后端服务异常,请重试。'], + ['errorCode' => 'SystemOverFlow', 'errorMessage' => 'An error occurred while processing your request. Please try again.', 'description' => '系统限流,请重试。'], ], - ], - 'staticInfo' => [ - 'returnType' => 'synchronous', ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"82B9E503-F4A1-4F30-976F-C6999FF9****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', - 'title' => '添加Topic授权', - ], - 'UpdateCustomAuthPermission' => [ - 'summary' => '更新Topic资源授权信息。', - 'methods' => [ - 'post', + 'title' => '为某个设备注册访问凭证', + 'summary' => '一机一密认证方法,即预先为每个设备申请唯一的访问凭证(ClientId、DeviceAccessKeyId和DeviceAccessKeySecret)。当设备与云消息队列 MQTT 版建立连接时,需要将设备访问凭证中的信息按照约定的形式设置到Username和Password中,向云消息队列 MQTT 版发起认证请求,云消息队列 MQTT 版认证通过后激活设备,设备与云消息队列 MQTT 版间才可传输数据。'."\n" + .'本接口用于为指定设备申请访问凭证。', + 'description' => '- 一个设备只能申请一个访问凭证,若调用本接口申请多次,以最近一次返回的访问凭证为准。'."\n" + .'- 本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见[QPS限制](~~163047~~)。'."\n" + .'- 每成功调用一次**RegisterDeviceCredential**接口,都会计算为一次消息TPS,从而影响您的计费。详细信息,请参见[计费说明](~~52819~~)。', + 'requestParamsDescription' => ' > 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RegisterDeviceCredential'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'mq:RegisterDeviceCredential', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"E4581CCF-62AF-44D9-B5B4-D1DBDC0E****\\",\\n \\"DeviceCredential\\": {\\n \\"UpdateTime\\": 1605541382000,\\n \\"DeviceAccessKeyId\\": \\"DC.Z5fXh9sRRVufyLi6wo****\\",\\n \\"CreateTime\\": 1605541382000,\\n \\"InstanceId\\": \\"post-cn-0pp12gl****\\",\\n \\"DeviceAccessKeySecret\\": \\"DC.BJMkn4eMQJK2vaApTS****\\",\\n \\"ClientId\\": \\"GID_test@@@test\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\nE4581CCF-62AF-44D9-B5B4-D1DBDC0E****\\n\\n post-cn-0pp12gl****\\n DC.BJMkn4eMQJK2vaApTS****\\n 1605541382000\\n 1605541382000\\n DC.Z5fXh9sRRVufyLi6wo****\\n GID_test@@@test\\n\\n","errorExample":""}]', + ], + 'RevokeToken' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - 'riskType' => 'high', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'delete'], 'parameters' => [ + [ + 'name' => 'Token', + 'in' => 'query', + 'schema' => ['description' => '您需要吊销的Token。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'LzMT+XLFl5s/YWJ/MlDz4t/Lq5HC1iGU1P28HAMaxYxn8aQbALNtml7QZKl9L9kPe6LqUb95tEVo+zUqOogs9+jZwDUSzsd4X4qaD3n2TrBEuMOqKkk1Xdrvu9VBQQvIYbz7MJWZDYC3DlW7gLEr33Cuj54iIhagtBi3epStJitsssWs7otY9zhKOSZxhr49G3d0bh35mwyP18EMvDas8UlzeSozsSrujNUqZXOGK0PEBSd+rWMGDJlCt6GFmJgm2JFY7PJwf/7OOSmUYIYFs5o/PuPpoTMF+hcVXMs+0yDukIMTOzG9m3t8k36PVrghFmnK6pC3Rt3mibjW****ng=='], + ], [ 'name' => 'InstanceId', - 'in' => 'formData', + 'in' => 'query', + 'schema' => ['description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。该实例ID在[控制台](https://mqtt.console.aliyun.com/)**实例详情**页面获取。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'post-cn-0pp12gl****'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的 ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-0pp12gl****', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的。', 'type' => 'string', 'example' => '833EDFCB-C447-4CE3-B21F-3A4C2D1B****'], + ], ], ], - [ - 'name' => 'IdentityType', - 'in' => 'formData', - 'schema' => [ - 'description' => '身份类型。'."\n" - ."\n" - .'- USER:仅用户名。'."\n" - ."\n" - .'- CLIENT:具体到客户端。', - 'type' => 'string', - 'required' => true, - 'example' => 'USER', - 'enum' => [ - 'USER', - 'CLIENT', + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'CheckAccountInfoFailed', 'errorMessage' => 'An error occurred while checking the account information by the STS token.', 'description' => ''], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => ''], + ['errorCode' => 'ParameterCheckFailed', 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', 'description' => ''], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'description' => ''], + ['errorCode' => 'RevokeTokenOverFlow', 'errorMessage' => 'You have revoked tokens too many times. Please try again later.', 'description' => ''], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => ''], + ], + 404 => [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => ''], + ], + 500 => [ + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => ''], + ['errorCode' => 'SystemOverFlow', 'errorMessage' => 'An error occurred while processing your request. Please try again.', 'description' => ''], + ], + ], + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"833EDFCB-C447-4CE3-B21F-3A4C2D1B****\\"\\n}","errorExample":""},{"type":"xml","example":"\\r\\n833EDFCB-C447-4CE3-B21F-3A4C2D1B****\\r\\n","errorExample":""}]', + 'title' => '吊销 Token', + 'summary' => '调用RevokeToken接口吊销Token。', + 'description' => '- 单用户请求频率限制为5次/秒。请联系云消息队列 MQTT 版技术支持,钉钉群号:35228338。'."\n" + .'- 每成功调用一次**RevokeToken**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。', + 'requestParamsDescription' => '> 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'mq:RevokeToken', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], ], + ], + ], + 'SendMessage' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], + 'security' => [ [ - 'name' => 'Identity', - 'in' => 'formData', - 'schema' => [ - 'description' => '用户名或客户端ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'test', - ], + 'AK' => [], ], + ], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none'], + 'parameters' => [ [ - 'name' => 'PermitAction', - 'in' => 'formData', - 'schema' => [ - 'description' => '授权操作。', - 'type' => 'string', - 'required' => true, - 'example' => 'PUB_SUB', - 'enum' => [ - 'PUB', - 'SUB', - 'PUB_SUB', - ], - ], + 'name' => 'MqttTopic', + 'in' => 'query', + 'schema' => ['description' => '云消息队列 MQTT 版的Topic,即消息发送的目标Topic。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'TopicA'], ], [ - 'name' => 'Effect', - 'in' => 'formData', - 'schema' => [ - 'description' => '允许或拒绝。', - 'type' => 'string', - 'required' => true, - 'example' => 'ALLOW', - 'enum' => [ - 'ALLOW', - 'DENY', - ], - ], + 'name' => 'InstanceId', + 'in' => 'query', + 'schema' => ['description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在[控制台](https://mqtt.console.aliyun.com)**实例详情**页面的**基础信息**区域查看。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'post-cn-0pp12gl****'], ], [ - 'name' => 'Topic', - 'in' => 'formData', - 'schema' => [ - 'description' => '授权的Topic,支持mqtt多级topic与通配符。', - 'type' => 'string', - 'required' => true, - 'example' => 'test/t1', - ], + 'name' => 'Payload', + 'in' => 'query', + 'schema' => ['description' => '消息内容,即消息负载。建议自行做Base64编码,避免传输不可见字符。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '8CC04203-679B-4DED-89D9-E7C2E979****', - ], - 'Code' => [ - 'description' => '调用失败时,返回的错误码。更多信息,请参见错误码。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Success' => [ - 'description' => '是否调用成功。true:调用成功。 false:调用失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'Message' => [ - 'description' => '信息。', - 'type' => 'string', - 'example' => 'operation success.', - ], + 'MsgId' => ['description' => '消息的唯一标识,消息发送成功后服务端会返回消息ID。', 'type' => 'string', 'example' => '0B736D997B7F45FF54E61C1C1B58****'], + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的。', 'type' => 'string', 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], + ['errorCode' => 'CheckAccountInfoFailed', 'errorMessage' => 'An error occurred while checking the account information by the STS token.', 'description' => '解析STS Token账号信息失败。'], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'ParameterCheckFailed', 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], ], 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], + ], + 500 => [ + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => 'MQTT后端服务异常,请重试。'], + ['errorCode' => 'SendMessageFailed', 'errorMessage' => 'A storage exception occurred while sending the message. Please try again.', 'description' => '由于后端存储异常,消息发送失败,请重试。'], + ['errorCode' => 'SystemOverFlow', 'errorMessage' => 'An error occurred while processing your request. Please try again.', 'description' => '系统限流,请重试。'], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"MsgId\\": \\"0B736D997B7F45FF54E61C1C1B58****\\",\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 020F6A43-19E6-4B6E-B846-44EB31DF****\\n 0B736D997B7F45FF54E61C1C1B58****\\n","errorExample":""}]', + 'title' => '向云消息队列 MQTT 版发送单条消息', + 'summary' => '从服务端应用向云消息队列 MQTT 版发送单条消息。', + 'description' => '- **SendMessage**接口为服务端应用调用,与MQTT客户端发送消息互补。服务端和客户端的使用场景区别,请参见[开发指南使用指引](~~179160~~)。'."\n" + .'- 调用**SendMessage**接口发送的消息不支持流转至云消息队列 RocketMQ 版。若需要通过MQTT服务端将消息流转至云消息队列 RocketMQ 版,请使用[SDK发送消息](~~174527~~)。'."\n" + .'**SendMessage**接口的QPS限制为1000。更多信息,请参见[QPS限制](~~163047~~)。'."\n" + .'- 每成功调用一次**SendMessage**接口,都会计算为一次消息TPS,从而影响您的计费。计费详情,请参见[计费说明](~~52819~~)。', + 'requestParamsDescription' => ' > 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '1000', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SendMessage'], + ], ], - 'eventInfo' => [ - 'enable' => false, - 'eventNames' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:SendMessage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"8CC04203-679B-4DED-89D9-E7C2E979****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', - 'title' => '更新Topic授权', ], - 'QueryCustomAuthPermission' => [ - 'summary' => '查询Topic授权信息。', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'https', - ], + 'SetSniConfig' => [ + 'summary' => '配置多域名证书。', + 'methods' => ['get', 'post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'read', + 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'get', + 'operationType' => 'update', 'riskType' => 'high', 'chargeType' => 'free', + 'abilityTreeCode' => '258058', + 'abilityTreeNodes' => ['FEATUREonsFLJRJ5'], ], 'parameters' => [ [ - 'name' => 'InstanceId', + 'name' => 'MqttInstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '云消息队列MQTT版实例的ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-0pp12gl****', - ], + 'schema' => ['title' => '实例ID', 'description' => '实例ID', 'type' => 'string', 'required' => true, 'example' => 'mqtt-cn-5yd3xxx'], ], [ - 'name' => 'IdentityType', + 'name' => 'DefaultCertificate', 'in' => 'query', - 'schema' => [ - 'description' => '身份类型。', - 'type' => 'string', - 'required' => false, - 'example' => 'USER', - 'enum' => [ - 'USER', - 'CLIENT', - ], - ], + 'schema' => ['title' => '默认证书。当服务端证书列表中没有对应的域名能够匹配,则返回该证书。', 'description' => '默认证书。当服务端证书列表中没有对应的域名能够匹配,则返回该证书。', 'type' => 'string', 'required' => true, 'example' => '1533xxxx-cn-hangzhou'], ], [ - 'name' => 'Identity', + 'name' => 'SniConfig', 'in' => 'query', + 'schema' => ['title' => 'SNI配置,实现域名和证书映射。格式为:域名#证书ID#密码(如果有);域名#证书ID#密码(如果有);', 'description' => 'SNI配置,实现域名和证书映射。格式为:域名#证书ID#密码(如果有);域名#证书ID#密码(如果有);', 'type' => 'string', 'required' => false, 'example' => '*.mqtt.aliyuncs.com#15xxxxx-cn-hangzhou;mqtt-test.mqtt.aliyuncs.com#15xxxx9-cn-hangzhou'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '用户名或客户端ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'test', + 'description' => '返回对象', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => 'E4581CCF-62AF-44D9-B5B4-D1DQDC0E****'], + 'Success' => ['description' => '是否调用成功:true:调用成功。 false:调用失败。', 'type' => 'string', 'example' => 'True'], + 'AccessDeniedDetail' => [ + 'description' => '访问被拒绝详细信息。', + 'type' => 'object', + 'properties' => [ + 'AuthAction' => ['description' => '尝试执行的未授权操作。', 'type' => 'string', 'example' => 'SetSniConfig'], + 'AuthPrincipalDisplayName' => ['description' => '授权主体显示名称。', 'type' => 'string', 'example' => '2063xxxxxxxx533'], + 'AuthPrincipalOwnerId' => ['description' => '授权主体所有者ID。', 'type' => 'string', 'example' => '1245xxxxx34343'], + 'AuthPrincipalType' => ['description' => '授权主体类型。', 'type' => 'string', 'example' => 'SubUser'], + 'EncodedDiagnosticMessage' => ['description' => '编码诊断信息。', 'type' => 'string', 'example' => 'AQFma6gWZmuoFkMxQ0M3MUVCLTRFQzQtNTI1OS1BQ0Q0LTlBMTFGQkVDOTA3Qw=='], + 'NoPermissionType' => ['description' => '无权限类型。', 'type' => 'string', 'example' => 'ImplicitDeny'], + 'PolicyType' => ['description' => '策略类型。', 'type' => 'string', 'example' => 'AccountLevelIdentityBasedPolicy'], + ], + ], + ], ], ], - [ - 'name' => 'Topic', - 'in' => 'query', - 'schema' => [ - 'description' => '授权的Topic,支持mqtt多级topic与通配符。', - 'type' => 'string', - 'required' => false, - 'example' => 'test', - ], - ], - [ - 'name' => 'NextToken', - 'in' => 'query', - 'schema' => [ - 'description' => '用来标记当前查询结束的位置,以便下一次调用时作为参数传入,继续翻页。首次调用或返回最后一页时,取值为空字符串。', - 'type' => 'string', - 'required' => false, - 'example' => 'AAAAAThmKW2HkRgzo4G7IRRTK2fC6zZmAk6y0bwoNPFOOcSP', - ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'MqttInstanceNotFound', 'errorMessage' => 'Specified instance is not found', 'description' => ''], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => ''], ], - [ - 'name' => 'Size', - 'in' => 'query', - 'schema' => [ - 'description' => '查询数量,最大值:100。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => true, - 'maximum' => '100', - 'minimum' => '1', - 'example' => '100', - ], + 403 => [ + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => ''], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', - 'type' => 'object', - 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '63309FDB-ED6C-46AE-B31C-A172FBA0****', - ], - 'Code' => [ - 'description' => '响应code。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Success' => [ - 'description' => '表示是否调用成功。true:调用成功。 false:调用失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'Message' => [ - 'description' => '返回结果的提示信息。', - 'type' => 'string', - 'example' => 'operation success.', - ], - 'Data' => [ - 'description' => '查询结果。', - 'type' => 'object', - 'properties' => [ - 'Results' => [ - 'description' => '返回数据。', - 'type' => 'array', - 'items' => [ - 'description' => '返回数据。', - 'type' => 'object', - 'properties' => [ - 'Identity' => [ - 'description' => '用户名或客户端ID。', - 'type' => 'string', - 'example' => 'test', - ], - 'PermitAction' => [ - 'description' => '授权操作。', - 'type' => 'string', - 'example' => 'PUB_SUB', - ], - 'Effect' => [ - 'description' => '允许或拒绝。', - 'type' => 'string', - 'example' => 'ALLOW', - ], - 'IdentityType' => [ - 'description' => '身份类型。'."\n" - ."\n" - .'- USER:仅用户名。'."\n" - ."\n" - .'- CLIENT:具体到客户端。', - 'type' => 'string', - 'example' => 'USER', - ], - 'Topic' => [ - 'description' => 'Topic资源信息,支持MQTT多级topic与通配符。', - 'type' => 'string', - 'example' => 'test', - ], - ], - ], - ], - 'NextToken' => [ - 'description' => '用来标记当前查询结束的位置,以便下一次调用时作为参数传入,继续翻页。首次调用或返回最后一页时,取值为空字符串。', - 'type' => 'string', - 'example' => 'AAAAAV/vsqTyeMlX1MIk7/b6NrZLIlsSVf49O04ac7HAmlBoaYspakK7ZZkR3vRDp5Y9Nz0EmuWYrtF+1qkUwuJzPk/qEto/FGxl5Kd+qdwNt3t8', - ], - ], - ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E4581CCF-62AF-44D9-B5B4-D1DQDC0E****\\",\\n \\"Success\\": \\"True\\",\\n \\"AccessDeniedDetail\\": {\\n \\"AuthAction\\": \\"SetSniConfig\\",\\n \\"AuthPrincipalDisplayName\\": \\"2063xxxxxxxx533\\",\\n \\"AuthPrincipalOwnerId\\": \\"1245xxxxx34343\\",\\n \\"AuthPrincipalType\\": \\"SubUser\\",\\n \\"EncodedDiagnosticMessage\\": \\"AQFma6gWZmuoFkMxQ0M3MUVCLTRFQzQtNTI1OS1BQ0Q0LTlBMTFGQkVDOTA3Qw==\\",\\n \\"NoPermissionType\\": \\"ImplicitDeny\\",\\n \\"PolicyType\\": \\"AccountLevelIdentityBasedPolicy\\"\\n }\\n}","type":"json"}]', + 'title' => '配置多域名证书', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'mq:SetSniConfig', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - ], - ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], ], ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], - ], - ], - 'staticInfo' => [ - 'returnType' => 'synchronous', ], - 'eventInfo' => [ - 'enable' => false, - 'eventNames' => [], - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"63309FDB-ED6C-46AE-B31C-A172FBA0****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\",\\n \\"Data\\": {\\n \\"Results\\": [\\n {\\n \\"Identity\\": \\"test\\",\\n \\"PermitAction\\": \\"PUB_SUB\\",\\n \\"Effect\\": \\"ALLOW\\",\\n \\"IdentityType\\": \\"USER\\",\\n \\"Topic\\": \\"test\\"\\n }\\n ],\\n \\"NextToken\\": \\"AAAAAV/vsqTyeMlX1MIk7/b6NrZLIlsSVf49O04ac7HAmlBoaYspakK7ZZkR3vRDp5Y9Nz0EmuWYrtF+1qkUwuJzPk/qEto/FGxl5Kd+qdwNt3t8\\"\\n }\\n}","type":"json"}]', - 'title' => '查询Topic授权', ], - 'DeleteCustomAuthPermission' => [ - 'summary' => '删除Topic授权。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'TagResources' => [ + 'summary' => '为资源新增标签。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'delete', + 'operationType' => 'create', 'riskType' => 'high', 'chargeType' => 'free', + 'abilityTreeCode' => '255118', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ [ - 'name' => 'InstanceId', - 'in' => 'formData', - 'schema' => [ - 'description' => '微消息队列 MQTT 版实例的 ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'mqtt-cn-0pp1ldu****', - ], - ], - [ - 'name' => 'IdentityType', - 'in' => 'formData', - 'schema' => [ - 'description' => '身份类型。'."\n" - ."\n" - .'- USER:仅用户名。'."\n" - ."\n" - .'- CLIENT:具体到客户端。', - 'type' => 'string', - 'required' => true, - 'example' => 'USER', - 'enum' => [ - 'USER', - 'CLIENT', - ], - ], + 'name' => 'ResourceType', + 'in' => 'query', + 'schema' => ['description' => '资源类型。唯一取值为instance。', 'type' => 'string', 'required' => true, 'example' => 'instance'], ], [ - 'name' => 'Identity', - 'in' => 'formData', + 'name' => 'ResourceId', + 'in' => 'query', + 'style' => 'repeatList', 'schema' => [ - 'description' => '用户名或客户端ID。', - 'type' => 'string', + 'description' => '资源ID列表。', + 'type' => 'array', + 'items' => ['description' => '资源ID,目前只支持实例。', 'type' => 'string', 'required' => false, 'example' => 'mqtt-cn-5yd3xxx'."\n"], 'required' => true, - 'example' => 'test', + 'maxItems' => 100, ], ], [ - 'name' => 'Topic', - 'in' => 'formData', + 'name' => 'Tag', + 'in' => 'query', + 'style' => 'repeatList', 'schema' => [ - 'description' => '授权的Topic,支持mqtt多级topic与通配符。', - 'type' => 'string', + 'description' => '资源标签列表,一次最多添加20个标签,一个资源最多可以添加20个标签', + 'type' => 'array', + 'items' => [ + 'description' => '资源的标签对象。', + 'type' => 'object', + 'properties' => [ + 'Key' => ['description' => '标签键', 'type' => 'string', 'required' => false, 'example' => 'test'], + 'Value' => ['description' => '标签值。', 'type' => 'string', 'required' => false, 'example' => 'test'], + ], + 'required' => false, + ], 'required' => true, - 'example' => 'test/t1', + 'maxItems' => 100, ], ], ], @@ -6512,71 +4798,50 @@ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => 'Schema of Response', + 'description' => '返回对象', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '34063BCA-0946-49C1-B824-2ED2C905****', - ], - 'Code' => [ - 'description' => 'Code码。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Success' => [ - 'description' => '请求结果,取值如下:true:请求成功。 false:请求失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'Message' => [ - 'description' => '请求返回的信息。', - 'type' => 'string', - 'example' => 'operation success.', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '82B9E503-F4A1-4F30-976F-C6999FF9****'], + 'Code' => ['description' => '接口状态码。', 'type' => 'string', 'example' => '200'], + 'Data' => ['description' => '调用结果', 'type' => 'boolean', 'example' => 'true'], + 'Message' => ['description' => '信息', 'type' => 'string', 'example' => 'operation success.'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => ''], + ['errorCode' => 'ResourceIdNotFound', 'errorMessage' => 'resourceId does not exist.', 'description' => ''], ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + 403 => [ + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => ''], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'eventInfo' => [ - 'enable' => false, - 'eventNames' => [], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"82B9E503-F4A1-4F30-976F-C6999FF9****\\",\\n \\"Code\\": \\"200\\",\\n \\"Data\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', + 'title' => '新增标签', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'mq:TagResources', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"34063BCA-0946-49C1-B824-2ED2C905****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', - 'title' => '删除Topic授权', ], - 'AddCustomAuthConnectBlack' => [ - 'summary' => '添加连接黑名单,禁用某个设备连接。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'UnRegisterDeviceCredential' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -6585,262 +4850,255 @@ 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'create', + 'operationType' => 'delete', 'riskType' => 'high', 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ [ - 'name' => 'InstanceId', - 'in' => 'formData', - 'schema' => [ - 'description' => '云消息队列MQTT版实例的ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'mqtt-cn-i7m26mf****', - ], + 'name' => 'ClientId', + 'in' => 'query', + 'schema' => ['description' => '需要注销访问凭证的设备的Client ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test@@@test'], ], [ - 'name' => 'ClientId', - 'in' => 'formData', - 'schema' => [ - 'description' => '禁止连接的设备ClientID。', - 'type' => 'string', - 'required' => true, - 'example' => 'GID_test@@@test', - ], + 'name' => 'InstanceId', + 'in' => 'query', + 'schema' => ['description' => '云消息队列 MQTT 版实例的ID,一定要和客户端实际使用的实例ID匹配。您可以在控制台**实例详情**页面获取该ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'post-cn-0pp12gl****'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '82B9E503-F4A1-4F30-976F-C6999FF9****', - ], - 'Code' => [ - 'description' => '状态码。说明 200表示成功。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Success' => [ - 'description' => '操作是否成功。取值:true:成功。false:失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'Message' => [ - 'description' => '返回信息。', - 'type' => 'string', - 'example' => 'operation success.', - ], + 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的。', 'type' => 'string', 'example' => 'E4581CCD-62AF-44D9-B5B4-D1DBDC0E****'], ], + 'description' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], - [ - 'errorCode' => 'Customauth.over.capacity', - 'errorMessage' => 'Over custom auth capacity.', - ], + ['errorCode' => 'ApplyTokenOverFlow', 'errorMessage' => 'You have applied for tokens too many times. Please try again later.', 'description' => '申请Token频率过高,系统限流,请重试。'], + ['errorCode' => 'CheckAccountInfoFailed', 'errorMessage' => 'An error occurred while checking the account information by the STS token.', 'description' => '解析STS Token账号信息失败。'], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'ParameterCheckFailed', 'errorMessage' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['errorCode' => 'DeviceCredentialNotFound', 'errorMessage' => 'Device Credential Not Found. Check if the device certificate is registered.', 'description' => '设备证书不存在,请检查是否注册了该设备证书'], + ['errorCode' => 'DeviceCredentialExsit', 'errorMessage' => 'Device Credential Exsit.', 'description' => '设备证书已经存在'], + ['errorCode' => 'DeviceCredentialNumExceed', 'errorMessage' => 'The number of device credentia exceeds the limit. Please revoke unused device certificates.', 'description' => '设备证书数量超限'], ], 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], + ], + 500 => [ + ['errorCode' => 'InternalError', 'errorMessage' => 'An error occurred while processing your request. Try again later.', 'description' => 'MQTT后端服务异常,请重试。'], + ['errorCode' => 'SystemOverFlow', 'errorMessage' => 'An error occurred while processing your request. Please try again.', 'description' => '系统限流,请重试。'], ], - ], - 'staticInfo' => [ - 'returnType' => 'synchronous', ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"82B9E503-F4A1-4F30-976F-C6999FF9****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', - 'title' => '添加连接黑名单', - ], - 'DeleteCustomAuthConnectBlack' => [ - 'summary' => '删除连接黑名单。', - 'methods' => [ - 'post', + 'title' => '注销设备的访问凭证', + 'summary' => '一机一密认证方法,即预先为每个设备申请唯一的访问凭证(ClientId、DeviceAccessKeyId和DeviceAccessKeySecret)。当设备与云消息队列 MQTT 版建立连接时,需要将设备访问凭证中的信息按照约定的形式设置到Username和Password中,向云消息队列 MQTT 版发起认证请求,云消息队列 MQTT 版认证通过后激活设备,设备与云消息队列 MQTT 版间才可传输数据。'."\n" + .'若您不需要再使用某个设备访问凭证,您可以调用本接口注销指定的设备访问凭证。', + 'description' => '- 指定设备访问凭证被注销后,使用该访问凭证连接的客户端暂时不受影响,若客户端连接断开,则无法再次使用该访问凭证通过服务端认证。'."\n" + .'- 本接口的单用户QPS限制为500次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见[QPS限制](~~163047~~)。'."\n" + .'- 每成功调用一次**UnRegisterDeviceCredential**接口,都会计算为一次消息TPS,从而影响您的计费。详细信息,请参见[计费说明](~~52819~~)。', + 'requestParamsDescription' => ' > 更多参数说明请参见[公共参数](~~163046~~)和[服务接入点](~~181438~~)。', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UnRegisterDeviceCredential'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'mq:MqttInstanceAccess', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"E4581CCD-62AF-44D9-B5B4-D1DBDC0E****\\"\\n}","errorExample":""},{"type":"xml","example":"\\r\\nE4581CCD-62AF-44D9-B5B4-D1DBDC0E****\\r\\n","errorExample":""}]', + ], + 'UntagResources' => [ + 'summary' => '删除标签。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'delete', 'riskType' => 'high', 'chargeType' => 'free', + 'abilityTreeCode' => '257391', + 'abilityTreeNodes' => ['FEATUREons3CYUNP'], ], 'parameters' => [ [ - 'name' => 'InstanceId', - 'in' => 'formData', + 'name' => 'TagKey', + 'in' => 'query', + 'style' => 'repeatList', 'schema' => [ - 'description' => '消息队列 MQTT 版实例的 ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'post-cn-0pp12gl****', + 'description' => '要删除的资源的标签键列表。', + 'type' => 'array', + 'items' => ['description' => '标签键。', 'type' => 'string', 'required' => false, 'example' => 'tagkeyTest'], + 'required' => false, + 'maxItems' => 100, ], ], [ - 'name' => 'ClientId', - 'in' => 'formData', + 'name' => 'ResourceId', + 'in' => 'query', + 'style' => 'repeatList', 'schema' => [ - 'description' => '设备的Client ID。', - 'type' => 'string', + 'description' => '资源ID列表。', + 'type' => 'array', + 'items' => ['description' => '资源ID,目前只支持实例。', 'type' => 'string', 'required' => false, 'example' => 'mqtt-cn-5yd3xxx'."\n"], 'required' => true, - 'example' => 'GID_test@@@test', + 'maxItems' => 100, ], ], + [ + 'name' => 'ResourceType', + 'in' => 'query', + 'schema' => ['description' => '资源类型。唯一取值为instance。', 'type' => 'string', 'required' => true, 'example' => 'instance'], + ], + [ + 'name' => 'All', + 'in' => 'query', + 'schema' => ['description' => '是否全部删除资源的标签,只针对`TagKey.N`为空时有效。取值范围:'."\n" + ."\n" + .'- true'."\n" + .' '."\n" + .'- false'."\n" + .' '."\n" + .'默认:false', 'type' => 'boolean', 'required' => false, 'example' => 'False'], + ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => 'Schema of Response', + 'description' => '返回对象', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '317076B7-F946-46BC-A98F-4CF9777C****', - ], - 'Code' => [ - 'description' => '状态码。说明 200表示成功。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'Message' => [ - 'description' => '调用结果信息', - 'type' => 'string', - 'example' => 'operation success.', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => 'B3C2F69B-B543-49B0-8B21-C8843AE0****'], + 'Code' => ['description' => '接口状态码。', 'type' => 'string', 'example' => '200'], + 'Data' => ['description' => '调用结果', 'type' => 'boolean', 'example' => 'true'], + 'Message' => ['description' => '信息', 'type' => 'string', 'example' => 'operation success.'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], + ['errorCode' => 'ResourceIdNotFound', 'errorMessage' => 'resourceId does not exist.', 'description' => '标签资源不存在'], + ['errorCode' => 'MqttOwnerCheckError', 'errorMessage' => 'Failed to validate the instance permission', 'description' => '实例权限校验失败'], ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + 403 => [ + ['errorCode' => 'PermissionCheckFailed', 'errorMessage' => 'Failed to verify API permissions.', 'description' => 'ram权限检查失败'], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"B3C2F69B-B543-49B0-8B21-C8843AE0****\\",\\n \\"Code\\": \\"200\\",\\n \\"Data\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', + 'title' => '删除标签', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UntagResources'], + ], ], - 'eventInfo' => [ - 'enable' => false, - 'eventNames' => [], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'mq:UnTagResources', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"317076B7-F946-46BC-A98F-4CF9777C****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', - 'title' => '删除连接黑名单', ], - 'QueryCustomAuthConnectBlack' => [ - 'summary' => '查询连接黑名单。', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'https', - ], + 'UpdateCustomAuthIdentity' => [ + 'summary' => '更新自定义身份认证。', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'read', + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'high', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'update', 'riskType' => 'high', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'InstanceId', - 'in' => 'query', + 'in' => 'formData', + 'schema' => ['description' => '云消息队列 MQTT 版实例的 ID。', 'type' => 'string', 'required' => true, 'example' => 'post-111****'], + ], + [ + 'name' => 'Username', + 'in' => 'formData', + 'schema' => ['description' => '用户名。', 'type' => 'string', 'required' => true, 'example' => 'test'], + ], + [ + 'name' => 'Secret', + 'in' => 'formData', + 'schema' => ['description' => '密钥。', 'type' => 'string', 'required' => true, 'example' => 'xxxx'], + ], + [ + 'name' => 'IdentityType', + 'in' => 'formData', 'schema' => [ - 'description' => '消息队列MQTT版实例的ID。', + 'description' => '身份类型。'."\n" + ."\n" + .'- USER:仅用户名。'."\n" + ."\n" + .'- CLIENT:具体到客户端。', 'type' => 'string', 'required' => true, - 'example' => 'post-111****', + 'example' => 'USER', + 'enum' => ['USER', 'CLIENT'], ], ], [ 'name' => 'ClientId', - 'in' => 'query', - 'schema' => [ - 'description' => '查询具体的设备Client ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'GID_test@@@test', - ], + 'in' => 'formData', + 'schema' => ['description' => '当身份类型是CLIENT时,指定设备的ClientID。', 'type' => 'string', 'required' => false, 'example' => 'GID_test@@@test'], ], [ - 'name' => 'NextToken', - 'in' => 'query', + 'name' => 'SignMode', + 'in' => 'formData', 'schema' => [ - 'description' => '用来标记当前查询结束的位置,以便下一次调用时作为参数传入,继续翻页。首次调用或返回最后一页时,取值为空字符串。', + 'description' => '签名校验方式,ORIGIN:原始值比较,即比较password与secret,SIGNED: 对clientId进行HmacSHA1加签(使用secret,参考签名模式)验证,然后比较password。', 'type' => 'string', - 'required' => false, - 'example' => 'xOfRU60sGEwN1OlFBIL8Ew==', - ], - ], - [ - 'name' => 'Size', - 'in' => 'query', - 'schema' => [ - 'description' => '查询数量,最大值:100。', - 'type' => 'integer', - 'format' => 'int32', 'required' => true, - 'maximum' => '100', - 'minimum' => '1', - 'example' => '100', + 'example' => 'SIGNED', + 'enum' => ['ORIGIN', 'SIGNED'], ], ], ], @@ -6851,1032 +5109,1025 @@ 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '020F6A43-19E6-4B6E-B846-44EB31DF****', - ], - 'Code' => [ - 'description' => '接口返回码:200:表示成功。 其它:表示错误码。错误码详情,请参见错误码。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Success' => [ - 'description' => '是否调用成功:true:调用成功。 false:调用失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'Message' => [ - 'description' => '返回信息。', - 'type' => 'string', - 'example' => 'operation success.', - ], - 'Data' => [ - 'description' => '返回参数数据结构。', - 'type' => 'object', - 'properties' => [ - 'Results' => [ - 'description' => '返回数据。', - 'type' => 'array', - 'items' => [ - 'description' => '返回数据。', - 'type' => 'object', - 'properties' => [ - 'ClientId' => [ - 'description' => '设备的Client ID。', - 'type' => 'string', - 'example' => 'GID_TEST@@@test', - ], - 'Effect' => [ - 'description' => '允许或拒绝。', - 'type' => 'string', - 'example' => 'ALLOW', - ], - 'PermitAction' => [ - 'description' => '授权操作。', - 'type' => 'string', - 'example' => 'CONNECT', - ], - ], - ], - ], - 'NextToken' => [ - 'description' => '下一页的token。', - 'type' => 'string', - 'example' => 'AAAAAZ0cM0HTqLXvgm7oMHWXcvc=', - ], - ], - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '3F00084A-7F07-4B15-BADA-8903A4FB****'], + 'Code' => ['description' => '返回结果编码。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Success' => ['description' => '操作是否成功。取值:true:成功。false:失败。', 'type' => 'boolean', 'example' => 'True'], + 'Message' => ['description' => '返回消息。', 'type' => 'string', 'example' => 'operation success.'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', - ], + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], ], 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', - ], + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], + 'staticInfo' => ['returnType' => 'synchronous'], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"020F6A43-19E6-4B6E-B846-44EB31DF****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\",\\n \\"Data\\": {\\n \\"Results\\": [\\n {\\n \\"ClientId\\": \\"GID_TEST@@@test\\",\\n \\"Effect\\": \\"ALLOW\\",\\n \\"PermitAction\\": \\"CONNECT\\"\\n }\\n ],\\n \\"NextToken\\": \\"AAAAAZ0cM0HTqLXvgm7oMHWXcvc=\\"\\n }\\n}","type":"json"}]', - 'title' => '查询连接黑名单', - ], - 'TagResources' => [ - 'summary' => '为资源新增标签。', - 'methods' => [ - 'post', - 'get', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"3F00084A-7F07-4B15-BADA-8903A4FB****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', + 'title' => '更新身份认证', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdateCustomAuthIdentity'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'mq:UpdateCustomAuthIdentity', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], + ], ], + ], + 'UpdateCustomAuthPermission' => [ + 'summary' => '更新Topic资源授权信息。', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'write', + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'create', - 'riskType' => 'high', - 'chargeType' => 'free', - 'abilityTreeCode' => '255118', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', - ], - ], + 'systemTags' => ['operationType' => 'update', 'riskType' => 'high', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'ResourceType', - 'in' => 'query', + 'name' => 'InstanceId', + 'in' => 'formData', + 'schema' => ['description' => '云消息队列 MQTT 版实例的 ID。', 'type' => 'string', 'required' => true, 'example' => 'post-cn-0pp12gl****'], + ], + [ + 'name' => 'IdentityType', + 'in' => 'formData', 'schema' => [ - 'description' => '资源类型。唯一取值为instance。', + 'description' => '身份类型。'."\n" + ."\n" + .'- USER:仅用户名。'."\n" + ."\n" + .'- CLIENT:具体到客户端。', 'type' => 'string', 'required' => true, - 'example' => 'instance', + 'example' => 'USER', + 'enum' => ['USER', 'CLIENT'], ], ], [ - 'name' => 'ResourceId', - 'in' => 'query', - 'style' => 'repeatList', + 'name' => 'Identity', + 'in' => 'formData', + 'schema' => ['description' => '用户名或客户端ID。', 'type' => 'string', 'required' => true, 'example' => 'test'], + ], + [ + 'name' => 'PermitAction', + 'in' => 'formData', 'schema' => [ - 'description' => '资源ID列表。', - 'type' => 'array', - 'items' => [ - 'description' => '资源ID,目前只支持实例。', - 'type' => 'string', - 'required' => false, - 'example' => 'mqtt-cn-5yd3xxx'."\n", - ], + 'description' => '授权操作。', + 'type' => 'string', 'required' => true, - 'maxItems' => 100, + 'example' => 'PUB_SUB', + 'enum' => ['PUB', 'SUB', 'PUB_SUB'], ], ], [ - 'name' => 'Tag', - 'in' => 'query', - 'style' => 'repeatList', + 'name' => 'Effect', + 'in' => 'formData', 'schema' => [ - 'description' => '资源标签列表,一次最多添加20个标签,一个资源最多可以添加20个标签', - 'type' => 'array', - 'items' => [ - 'description' => '资源的标签对象。', - 'type' => 'object', - 'properties' => [ - 'Key' => [ - 'description' => '标签键', - 'type' => 'string', - 'required' => false, - 'example' => 'test', - ], - 'Value' => [ - 'description' => '标签值。', - 'type' => 'string', - 'required' => false, - 'example' => 'test', - ], - ], - 'required' => false, - ], + 'description' => '允许或拒绝。', + 'type' => 'string', 'required' => true, - 'maxItems' => 100, + 'example' => 'ALLOW', + 'enum' => ['ALLOW', 'DENY'], ], ], + [ + 'name' => 'Topic', + 'in' => 'formData', + 'schema' => ['description' => '授权的Topic,支持mqtt多级topic与通配符。', 'type' => 'string', 'required' => true, 'example' => 'test/t1'], + ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => '返回对象', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '82B9E503-F4A1-4F30-976F-C6999FF9****', - ], - 'Code' => [ - 'description' => '接口状态码。', - 'type' => 'string', - 'example' => '200', - ], - 'Data' => [ - 'description' => '调用结果', - 'type' => 'boolean', - 'example' => 'true', - ], - 'Message' => [ - 'description' => '信息', - 'type' => 'string', - 'example' => 'operation success.', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '8CC04203-679B-4DED-89D9-E7C2E979****'], + 'Code' => ['description' => '调用失败时,返回的错误码。更多信息,请参见错误码。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Success' => ['description' => '是否调用成功。true:调用成功。 false:调用失败。', 'type' => 'boolean', 'example' => 'True'], + 'Message' => ['description' => '信息。', 'type' => 'string', 'example' => 'operation success.'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', + ['errorCode' => 'InstancePermissionCheckFailed', 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['errorCode' => 'InvalidParameter.%s', 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ], + 404 => [ + ['errorCode' => 'ApiNotSupport', 'errorMessage' => 'The specified API is not supported.', 'description' => '当前接口不支持,请检查。'], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"8CC04203-679B-4DED-89D9-E7C2E979****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', + 'title' => '更新Topic授权', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdateCustomAuthPermission'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'mq:UpdateCustomAuthPermission', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], ], - [ - 'errorCode' => 'ResourceIdNotFound', - 'errorMessage' => 'resourceId does not exist.', + ], + ], + ], + ], + 'endpoints' => [ + ['regionId' => 'mq-internet-access', 'regionName' => '公网', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.mq-internet-access.aliyuncs.com', 'endpoint' => 'onsmqtt.mq-internet-access.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-wulanchabu', 'regionName' => '华北6(乌兰察布)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.cn-wulanchabu.aliyuncs.com', 'endpoint' => 'onsmqtt.cn-wulanchabu.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.cn-wulanchabu.aliyuncs.com'], + ['regionId' => 'cn-beijing', 'regionName' => '华北2(北京)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.cn-beijing.aliyuncs.com', 'endpoint' => 'onsmqtt.cn-beijing.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.cn-beijing.aliyuncs.com'], + ['regionId' => 'cn-qingdao', 'regionName' => '华北1(青岛)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.cn-qingdao.aliyuncs.com', 'endpoint' => 'onsmqtt.cn-qingdao.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.cn-qingdao.aliyuncs.com'], + ['regionId' => 'cn-shanghai', 'regionName' => '华东2(上海)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.cn-shanghai.aliyuncs.com', 'endpoint' => 'onsmqtt.cn-shanghai.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.cn-shanghai.aliyuncs.com'], + ['regionId' => 'cn-hongkong', 'regionName' => '中国香港', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.cn-hongkong.aliyuncs.com', 'endpoint' => 'onsmqtt.cn-hongkong.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.cn-hongkong.aliyuncs.com'], + ['regionId' => 'cn-zhangjiakou', 'regionName' => '华北3(张家口)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.cn-zhangjiakou.aliyuncs.com', 'endpoint' => 'onsmqtt.cn-zhangjiakou.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.cn-zhangjiakou.aliyuncs.com'], + ['regionId' => 'cn-shenzhen', 'regionName' => '华南1(深圳)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.cn-shenzhen.aliyuncs.com', 'endpoint' => 'onsmqtt.cn-shenzhen.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.cn-shenzhen.aliyuncs.com'], + ['regionId' => 'ap-northeast-1', 'regionName' => '日本(东京)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.ap-northeast-1.aliyuncs.com', 'endpoint' => 'onsmqtt.ap-northeast-1.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.ap-northeast-1.aliyuncs.com'], + ['regionId' => 'cn-chengdu', 'regionName' => '西南1(成都)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.cn-chengdu.aliyuncs.com', 'endpoint' => 'onsmqtt.cn-chengdu.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.cn-chengdu.aliyuncs.com'], + ['regionId' => 'cn-guangzhou', 'regionName' => '华南3(广州)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.cn-guangzhou.aliyuncs.com', 'endpoint' => 'onsmqtt.cn-guangzhou.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.cn-guangzhou.aliyuncs.com'], + ['regionId' => 'ap-southeast-1', 'regionName' => '新加坡', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.ap-southeast-1.aliyuncs.com', 'endpoint' => 'onsmqtt.ap-southeast-1.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.ap-southeast-1.aliyuncs.com'], + ['regionId' => 'ap-southeast-3', 'regionName' => '马来西亚(吉隆坡)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.ap-southeast-3.aliyuncs.com', 'endpoint' => 'onsmqtt.ap-southeast-3.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.ap-southeast-3.aliyuncs.com'], + ['regionId' => 'cn-huhehaote', 'regionName' => '华北5(呼和浩特)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.cn-huhehaote.aliyuncs.com', 'endpoint' => 'onsmqtt.cn-huhehaote.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.cn-huhehaote.aliyuncs.com'], + ['regionId' => 'ap-southeast-5', 'regionName' => '印度尼西亚(雅加达)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.ap-southeast-5.aliyuncs.com', 'endpoint' => 'onsmqtt.ap-southeast-5.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.ap-southeast-5.aliyuncs.com'], + ['regionId' => 'ap-southeast-6', 'regionName' => '菲律宾(马尼拉)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.ap-southeast-6.aliyuncs.com', 'endpoint' => 'onsmqtt.ap-southeast-6.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.ap-southeast-6.aliyuncs.com'], + ['regionId' => 'cn-hangzhou', 'regionName' => '华东1(杭州)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'onsmqtt.cn-hangzhou.aliyuncs.com', 'endpoint' => 'onsmqtt.cn-hangzhou.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.cn-hangzhou.aliyuncs.com'], + ['regionId' => 'us-east-1', 'regionName' => '美国(弗吉尼亚)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'onsmqtt.us-east-1.aliyuncs.com', 'endpoint' => 'onsmqtt.us-east-1.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.us-east-1.aliyuncs.com'], + ['regionId' => 'eu-west-1', 'regionName' => '英国(伦敦)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'onsmqtt.eu-west-1.aliyuncs.com', 'endpoint' => 'onsmqtt.eu-west-1.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.eu-west-1.aliyuncs.com'], + ['regionId' => 'us-west-1', 'regionName' => '美国(硅谷)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'onsmqtt.us-west-1.aliyuncs.com', 'endpoint' => 'onsmqtt.us-west-1.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.us-west-1.aliyuncs.com'], + ['regionId' => 'eu-central-1', 'regionName' => '德国(法兰克福)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'onsmqtt.eu-central-1.aliyuncs.com', 'endpoint' => 'onsmqtt.eu-central-1.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.eu-central-1.aliyuncs.com'], + ['regionId' => 'me-central-1', 'regionName' => '沙特(利雅得)', 'areaId' => 'middleEast', 'areaName' => '中东', 'public' => 'onsmqtt.me-central-1.aliyuncs.com', 'endpoint' => 'onsmqtt.me-central-1.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.me-central-1.aliyuncs.com'], + ['regionId' => 'cn-hangzhou-finance', 'regionName' => '华东1 金融云', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'onsmqtt.cn-hangzhou-finance.aliyuncs.com', 'endpoint' => 'onsmqtt.cn-hangzhou-finance.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.cn-hangzhou-finance.aliyuncs.com'], + ['regionId' => 'cn-heyuan-acdr-1', 'regionName' => '河源专属云汽车合规', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'onsmqtt.cn-heyuan-acdr-1.aliyuncs.com', 'endpoint' => 'onsmqtt.cn-heyuan-acdr-1.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.cn-heyuan-acdr-1.aliyuncs.com'], + ['regionId' => 'cn-shenzhen-finance-1', 'regionName' => '华南1 金融云', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'onsmqtt.cn-shenzhen-finance-1.aliyuncs.com', 'endpoint' => 'onsmqtt.cn-shenzhen-finance-1.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.cn-shenzhen-finance-1.aliyuncs.com'], + ['regionId' => 'cn-shanghai-finance-1', 'regionName' => '华东2 金融云', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'onsmqtt.cn-shanghai-finance-1.aliyuncs.com', 'endpoint' => 'onsmqtt.cn-shanghai-finance-1.aliyuncs.com', 'vpc' => 'onsmqtt-vpc.cn-shanghai-finance-1.aliyuncs.com'], + ], + 'errorCodes' => [ + ['code' => 'ApiNotSupport', 'message' => 'The specified API is not supported.', 'http_code' => 404, 'description' => '当前接口不支持,请检查。'], + ['code' => 'ApplyTokenOverFlow', 'message' => 'You have applied for tokens too many times. Please try again later.', 'http_code' => 400, 'description' => '申请Token频率过高,系统限流,请重试。'], + ['code' => 'CaNumExceed', 'message' => 'CA certificate num exceed', 'http_code' => 401, 'description' => 'CA数量超出限制'], + ['code' => 'CertificateContentError', 'message' => 'Certificate content error, please check ca/verification certificate content. BasicConstraints extension should be set to true in CA certificate', 'http_code' => 401, 'description' => '用户CA证书或者验证证书内容错误'], + ['code' => 'CheckAccountInfoFailed', 'message' => 'An error occurred while checking the account information by the STS token.', 'http_code' => 400, 'description' => '解析STS Token账号信息失败。'], + ['code' => 'CreateGroupIdError', 'message' => 'Failed to create GroupId. Try again later.', 'http_code' => 417, 'description' => '创建Group ID请求执行失败,请稍后重试。'], + ['code' => 'CreateMqttRuleFailed', 'message' => 'An error occurred while creating the MQTT rule. Please check the parameter and try again.', 'http_code' => 400, 'description' => '创建MQTT规则失败,请检查参数重试。'], + ['code' => 'CreateMqttTopicFailed', 'message' => 'An error occurred while creating the MQTT topic. Please check the parameter and try again.', 'http_code' => 400, 'description' => '创建MQTT Topic失败,请检查参数重试。'], + ['code' => 'Customauth.over.capacity', 'message' => 'Over custom auth capacity.', 'http_code' => 400, 'description' => '自定义权限数量容量超限'], + ['code' => 'DeleteGroupIdError', 'message' => 'Failed to delete GroupId. Try again later.', 'http_code' => 417, 'description' => '删除Group ID请求执行失败,请稍后重试。'], + ['code' => 'DeleteMqttRuleFailed', 'message' => 'An error occurred while deleting the MQTT rule. Please check the parameter and try again.', 'http_code' => 400, 'description' => '删除MQTT规则失败,请检查参数后再重试。'], + ['code' => 'DeleteMqttTopicFailed', 'message' => 'An error occurred while deleting the MQTT topic. Please check the parameter and try again.', 'http_code' => 400, 'description' => '删除MQTT Topic失败,请检查参数重试。'], + ['code' => 'DeviceCredentialExsit', 'message' => 'Device Credential Exsit.', 'http_code' => 400, 'description' => '设备证书已经存在'], + ['code' => 'DeviceCredentialNotFound', 'message' => 'Device Credential Not Found. Check if the device certificate is registered.', 'http_code' => 400, 'description' => '设备证书不存在,请检查是否注册了该设备证书'], + ['code' => 'DeviceCredentialNotFound', 'message' => 'Device Credential Not Found.Check if the device certificate is registered.', 'http_code' => 400, 'description' => '设备证书不存在'], + ['code' => 'DeviceCredentialNumExceed', 'message' => 'The number of device credentia exceeds the limit. Please revoke unused device certificates.', 'http_code' => 400, 'description' => '设备证书数量超限'], + ['code' => 'FindCaBySnError', 'message' => 'Failed to find the CA by the SN. Please check sn is valid.', 'http_code' => 400, 'description' => 'SN不存在'], + ['code' => 'FindDeviceBySnError', 'message' => 'Failed to find the device certificate by the SN. Please check sn is valid', 'http_code' => 400, 'description' => '获取设备证书失败'], + ['code' => 'GetCaNumError', 'message' => 'Failed to get ca num. Try again later.', 'http_code' => 401, 'description' => '获取CA数量错误'], + ['code' => 'GroupIdAlreadyExsited', 'message' => 'The specified GroupId already exists.', 'http_code' => 400, 'description' => ' 当前Group ID已经存在。'], + ['code' => 'GroupIdAlreadyUsedByOtherUsers', 'message' => 'The current GroupId is used by another user. Please change to a different GroupId.', 'http_code' => 400, 'description' => '当前Group ID已经被其他用户占用,请更换其他名称。'], + ['code' => 'InstanceNotFound', 'message' => 'Failed to find the instance. The instanceId may be invalid.', 'http_code' => 400, 'description' => '无法找到实例。'], + ['code' => 'InstancePermissionCheckFailed', 'message' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', 'http_code' => 400, 'description' => '实例权限校验失败,请确认MQTT实例的所属关系以及授权策略。'], + ['code' => 'InternalError', 'message' => 'An error occurred while processing your request. Try again later.', 'http_code' => 417, 'description' => 'MQTT后端服务异常,请重试。'], + ['code' => 'InvalidParameter.%s', 'message' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', 'http_code' => 400, 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['code' => 'MqttApplyCluster4InstanceFailed', 'message' => 'the instance can not find cluster.', 'http_code' => 400, 'description' => '该实例获取集群信息失败'], + ['code' => 'MqttInstanceNotFound', 'message' => 'Specified instance is not found', 'http_code' => 400, 'description' => '实例不存在'], + ['code' => 'MqttOwnerCheckError', 'message' => 'Failed to validate the instance permission', 'http_code' => 403, 'description' => '实例权限校验失败'], + ['code' => 'MqttRuleExist', 'message' => 'The specified MQTT rule already exists. Please check the parameter.', 'http_code' => 400, 'description' => '当前规则已存在,请修改参数重新配置。'], + ['code' => 'MqttRuleNotFound', 'message' => 'The specified rule does not exist.', 'http_code' => 400, 'description' => '当前查询条件无匹配规则。'], + ['code' => 'MqttRuleNumExceeded', 'message' => 'The maximum number of rules is exceeded.', 'http_code' => 400, 'description' => '当前实例规则数量超过系统限制。'], + ['code' => 'MqttRuleNumExceeded', 'message' => 'The number of rules has exceeded the system limit.', 'http_code' => 400, 'description' => '当前实例规则数量超过系统限制。'], + ['code' => 'MqttTopicExist', 'message' => 'The specified topic already exists. Please check the parameter.', 'http_code' => 400, 'description' => '当前Topic已存在,请修改参数重新配置。'], + ['code' => 'MqttTopicNotFound', 'message' => 'The specified topic does not exist.', 'http_code' => 400, 'description' => '当前查询条件无匹配Topic。'], + ['code' => 'MqttTopicNumExceeded', 'message' => 'The maximum number of topics is exceeded.', 'http_code' => 400, 'description' => '当前实例Topic数量超过系统限制。'], + ['code' => 'MQTT_INSTANCE_OWNER_CHECK_ERROR', 'message' => 'Mqtt Instance Owner Invalid.', 'http_code' => 400, 'description' => '实例所属者不匹配'], + ['code' => 'ParameterCheckFailed', 'message' => 'An error occurred while validating the parameters. The parameters may be missing or invalid.', 'http_code' => 400, 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['code' => 'ParameterFieldCheckFailed', 'message' => 'Failed to validate the parameters. The parameters may be missing or invalid.', 'http_code' => 400, 'description' => '参数校验失败,可能缺失或者传入值非法。'], + ['code' => 'PermissionCheckFailed', 'message' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'http_code' => 400, 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], + ['code' => 'PermissionCheckFailed', 'message' => 'Failed to verify API permissions.', 'http_code' => 403, 'description' => 'ram权限检查失败'], + ['code' => 'QueryMqttRuleFailed', 'message' => 'An error occurred while querying the MQTT rule. Please check the parameter and try again.', 'http_code' => 400, 'description' => '查询MQTT规则失败,请检查参数后再重试。'], + ['code' => 'QueryMqttTopicFailed', 'message' => 'An error occurred while querying the MQTT topic. Please check the parameter and try again.', 'http_code' => 400, 'description' => '查询MQTT Topic失败,请检查参数重试。'], + ['code' => 'QueryTokenOverFlow', 'message' => 'You have queried tokens too many times. Please try again later.', 'http_code' => 400, 'description' => '查询Token频率过高,系统限流,请稍后重试。'], + ['code' => 'RegisterCodeError', 'message' => 'Register code error in verification certificate.', 'http_code' => 400, 'description' => '注册码错误'], + ['code' => 'RegisterCodeUsed', 'message' => 'Register code has been used.', 'http_code' => 401, 'description' => '注册码已经被使用过'], + ['code' => 'ResourceIdNotFound', 'message' => 'resourceId does not exist.', 'http_code' => 400, 'description' => '标签资源不存在'], + ['code' => 'ResourcePermissionCheckFailed', 'message' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'http_code' => 400, 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], + ['code' => 'RespurcePermissionCheckFailed', 'message' => 'An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.', 'http_code' => 400, 'description' => '资源权限校验失败,请检查实例、Topic和Group ID的所属权限和授权策略。'], + ['code' => 'RevokeTokenOverFlow', 'message' => 'You have revoked tokens too many times. Please try again later.', 'http_code' => 400, 'description' => '禁用Token频率过高,系统限流,请稍后重试。'], + ['code' => 'SendMessageFailed', 'message' => 'A storage exception occurred while sending the message. Please try again.', 'http_code' => 417, 'description' => '由于后端存储异常,消息发送失败,请重试。'], + ['code' => 'ServiceUnable', 'message' => 'The current user has not activated the ONS service. Please activate the service first.', 'http_code' => 400, 'description' => '当前用户未开通ONS服务,请先开通ONS服务,谢谢。'], + ['code' => 'SnNotUnique', 'message' => 'Sn is not unique in gloabal', 'http_code' => 401, 'description' => 'SN 不是全局唯一的'], + ['code' => 'SystemError', 'message' => 'system error.', 'http_code' => 400, 'description' => '系统错误,请重试'], + ['code' => 'SystemOverFlow', 'message' => 'An error occurred while processing your request. Please try again.', 'http_code' => 403, 'description' => '系统限流,请重试。'], + ['code' => 'UpdateMqttRuleFailed', 'message' => 'An error occurred while updating the MQTT rule. Please check the parameter and try again.', 'http_code' => 400, 'description' => '更新MQTT规则失败,请检查参数后再重试。'], + ['code' => 'UpdateMqttTopicFailed', 'message' => 'An error occurred while updating the MQTT topic. Please check the parameter and try again.', 'http_code' => 400, 'description' => '更新MQTT Topic失败,请检查参数重试。'], + ], + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteCustomAuthConnectBlack'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'BatchQuerySessionByClientIds'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListTagResources'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddCustomAuthPermission'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UnRegisterDeviceCredential'], + ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'QueryMqttTraceMessageOfClient'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UntagResources'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'QueryCustomAuthConnectBlack'], + ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'QueryMqttTraceMessageSubscribe'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RegisterCaCertificate'], + ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'QueryMqttTraceDevice'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListCaCertificate'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'InactivateCaCertificate'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RefreshDeviceCredential'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListInstances'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteCaCertificate'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddCustomAuthConnectBlack'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'QueryToken'], + ['threshold' => '1000', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SendMessage'], + ['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RevokeToken'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DisasterRecovery'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'InactivateDeviceCertificate'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetCaCertificate'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'QuerySessionByClientId'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'QueryCustomAuthIdentity'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetDeviceCredential'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SetSniConfig'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RegisterDeviceCredential'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddCustomAuthIdentity'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteDeviceCertificate'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetRegisterCode'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DisasterDowngrade'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteCustomAuthPermission'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ActiveDeviceCertificate'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CloseConnection'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateGroupId'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteCustomAuthIdentity'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ApplyToken'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdateCustomAuthIdentity'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteGroupId'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetDeviceCertificate'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListDeviceCredentialClientId'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'QueryCustomAuthPermission'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ActiveCaCertificate'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListGroupId'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdateCustomAuthPermission'], + ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'QueryMqttTraceMessagePublish'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListDeviceCertificateByCaSn'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'TagResources'], + ['threshold' => '500', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListDeviceCertificate'], + ], + ], + 'ram' => [ + 'productCode' => 'OnsMqtt', + 'productName' => '云消息队列 MQ', + 'ramCodes' => ['mq'], + 'ramLevel' => '资源级', + 'ramConditions' => [], + 'ramActions' => [ + [ + 'apiName' => 'QueryMqttTraceMessagePublish', + 'description' => '查询消息发送轨迹', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:QueryMqttPubTrace', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], - 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', + ], + [ + 'apiName' => 'GetCaCertificate', + 'description' => '获取CA证书详情', + 'operationType' => 'get', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + 'ramAction' => [ + 'action' => 'mq:GetCaCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + [ + 'apiName' => 'QueryCustomAuthPermission', + 'description' => '查询Topic授权', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:QueryCustomAuthPermission', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"82B9E503-F4A1-4F30-976F-C6999FF9****\\",\\n \\"Code\\": \\"200\\",\\n \\"Data\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', - 'title' => '新增标签', - ], - 'ListTagResources' => [ - 'summary' => '查询标签。', - 'methods' => [ - 'post', - 'get', + [ + 'apiName' => 'QueryToken', + 'description' => '校验Token的有效性', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:QueryToken', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], ], - 'schemes' => [ - 'https', + [ + 'apiName' => 'AddCustomAuthConnectBlack', + 'description' => '添加连接黑名单', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'mq:AddCustomAuthConnectBlack', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'QuerySessionByClientId', + 'description' => '查询客户端在线状态', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:MqttInstanceAccess', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], ], ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ + [ + 'apiName' => 'ListDeviceCredentialClientId', + 'description' => '查询已注册访问凭证的设备列表', 'operationType' => 'list', - 'riskType' => 'high', - 'chargeType' => 'free', - 'abilityTreeCode' => '255352', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', + 'ramAction' => [ + 'action' => 'mq:MqttInstanceAccess', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], ], ], - 'parameters' => [ - [ - 'name' => 'ResourceType', - 'in' => 'query', - 'schema' => [ - 'description' => '资源类型。唯一取值为instance。', - 'type' => 'string', - 'required' => true, - 'example' => 'instance', + [ + 'apiName' => 'SendMessage', + 'description' => '向云消息队列 MQTT 版发送单条消息', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:SendMessage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'ResourceId', - 'in' => 'query', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '资源ID列表。', - 'type' => 'array', - 'items' => [ - 'description' => '要查询资源ID,目前只支持实例,ResourceId和Tag不能同时为空。', - 'type' => 'string', - 'required' => false, - 'example' => 'mqtt-cn-5yd3xxx', - ], - 'required' => false, - 'maxItems' => 100, + ], + [ + 'apiName' => 'GetDeviceCertificate', + 'description' => '获取设备证书详情', + 'operationType' => 'get', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + 'ramAction' => [ + 'action' => 'mq:GetDeviceCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], - [ - 'name' => 'Tag', - 'in' => 'query', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '资源标签列表,ResourceId和Tag不能同时为空。', - 'type' => 'array', - 'items' => [ - 'description' => '标签对象。', - 'type' => 'object', - 'properties' => [ - 'Key' => [ - 'description' => '标签键。', - 'type' => 'string', - 'required' => false, - 'example' => 'test', - ], - 'Value' => [ - 'description' => '标签值。', - 'type' => 'string', - 'required' => false, - 'example' => 'test', - ], - ], - 'required' => false, - ], - 'required' => false, - 'maxItems' => 100, - ], - ], - [ - 'name' => 'NextToken', - 'in' => 'query', - 'schema' => [ - 'description' => '下一个查询开始Token。', - 'type' => 'string', - 'required' => false, - 'example' => 'AAAAAaFXUH1VTHnBlds7StUakOQ=', + ], + [ + 'apiName' => 'ListInstances', + 'description' => '查询实例列表', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'mq:ListMqttInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '返回对象。', - 'type' => 'object', - 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '34063BCA-0946-49C1-B824-2ED2C905****', - ], - 'Code' => [ - 'description' => '响应code。', - 'type' => 'string', - 'example' => '200', - ], - 'Message' => [ - 'description' => '信息', - 'type' => 'string', - 'example' => 'operation success.', - ], - 'Success' => [ - 'description' => '请求是否成功。', - 'type' => 'string', - 'example' => 'true', - ], - 'NextToken' => [ - 'description' => '下一个查询开始Token。', - 'type' => 'string', - 'example' => 'AAAAAaFXUH1VTHnBlds7StUakOQ=', - ], - 'TagResources' => [ - 'description' => '资源和标签的关系列表。', - 'type' => 'array', - 'items' => [ - 'description' => 'TagResource对象。', - 'type' => 'object', - 'properties' => [ - 'ResourceType' => [ - 'description' => '资源类型。唯一取值为instance。', - 'type' => 'string', - 'example' => 'instance', - ], - 'TagValue' => [ - 'description' => '标签值。', - 'type' => 'string', - 'example' => 'test', - ], - 'ResourceId' => [ - 'description' => '资源ID。', - 'type' => 'string', - 'example' => 'mqtt-cn-5yd3xxx'."\n", - ], - 'TagKey' => [ - 'description' => '标签键。', - 'type' => 'string', - 'example' => 'test', - ], - ], - ], - ], - ], + [ + 'apiName' => 'DeleteCustomAuthIdentity', + 'description' => '删除身份认证', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'mq:DeleteCustomAuthIdentity', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], - [ - 'errorCode' => 'ResourceIdNotFound', - 'errorMessage' => 'resourceId does not exist.', - ], + [ + 'apiName' => 'CreateGroupId', + 'description' => '创建 Group ID', + 'operationType' => 'create', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], ], - 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', + 'ramAction' => [ + 'action' => 'mq:CreateMqttGroupId', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"34063BCA-0946-49C1-B824-2ED2C905****\\",\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"operation success.\\",\\n \\"Success\\": \\"true\\",\\n \\"NextToken\\": \\"AAAAAaFXUH1VTHnBlds7StUakOQ=\\",\\n \\"TagResources\\": [\\n {\\n \\"ResourceType\\": \\"instance\\",\\n \\"TagValue\\": \\"test\\",\\n \\"ResourceId\\": \\"mqtt-cn-5yd3xxx\\\\n\\",\\n \\"TagKey\\": \\"test\\"\\n }\\n ]\\n}","type":"json"}]', - 'title' => '查询标签', - ], - 'UntagResources' => [ - 'summary' => '删除标签。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'CloseConnection', + 'description' => '关闭在线连接', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:CloseConnection', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], ], ], - 'operationType' => 'write', - 'deprecated' => false, - 'systemTags' => [ + [ + 'apiName' => 'DeleteCaCertificate', + 'description' => '删除CA证书', 'operationType' => 'delete', - 'riskType' => 'high', - 'chargeType' => 'free', - 'abilityTreeCode' => '257391', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + 'ramAction' => [ + 'action' => 'mq:DeleteCaCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], ], ], - 'parameters' => [ - [ - 'name' => 'TagKey', - 'in' => 'query', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '要删除的资源的标签键列表。', - 'type' => 'array', - 'items' => [ - 'description' => '标签键。', - 'type' => 'string', - 'required' => false, - 'example' => 'tagkeyTest', - ], - 'required' => false, - 'maxItems' => 100, + [ + 'apiName' => 'RegisterDeviceCredential', + 'description' => '为某个设备注册访问凭证', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'mq:RegisterDeviceCredential', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], - [ - 'name' => 'ResourceId', - 'in' => 'query', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '资源ID列表。', - 'type' => 'array', - 'items' => [ - 'description' => '资源ID,目前只支持实例。', - 'type' => 'string', - 'required' => false, - 'example' => 'mqtt-cn-5yd3xxx'."\n", - ], - 'required' => true, - 'maxItems' => 100, + ], + [ + 'apiName' => 'UpdateCustomAuthIdentity', + 'description' => '更新身份认证', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'mq:UpdateCustomAuthIdentity', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], - [ - 'name' => 'ResourceType', - 'in' => 'query', - 'schema' => [ - 'description' => '资源类型。唯一取值为instance。', - 'type' => 'string', - 'required' => true, - 'example' => 'instance', + ], + [ + 'apiName' => 'ListDeviceCertificate', + 'description' => '查询设备证书列表', + 'operationType' => 'list', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + 'ramAction' => [ + 'action' => 'mq:ListDeviceCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], - [ - 'name' => 'All', - 'in' => 'query', - 'schema' => [ - 'description' => '是否全部删除资源的标签,只针对`TagKey.N`为空时有效。取值范围:'."\n" - ."\n" - .'- true'."\n" - .' '."\n" - .'- false'."\n" - .' '."\n" - .'默认:false', - 'type' => 'boolean', - 'required' => false, - 'example' => 'False', + ], + [ + 'apiName' => 'QueryMqttTraceDevice', + 'description' => '查询设备轨迹', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:QueryMqttDeviceTrace', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '返回对象', - 'type' => 'object', - 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => 'B3C2F69B-B543-49B0-8B21-C8843AE0****', - ], - 'Code' => [ - 'description' => '接口状态码。', - 'type' => 'string', - 'example' => '200', - ], - 'Data' => [ - 'description' => '调用结果', - 'type' => 'boolean', - 'example' => 'true', - ], - 'Message' => [ - 'description' => '信息', - 'type' => 'string', - 'example' => 'operation success.', - ], - ], + [ + 'apiName' => 'QueryMqttTraceMessageSubscribe', + 'description' => '查询消息消费轨迹', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:QueryMqttSubTrace', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'ResourceIdNotFound', - 'errorMessage' => 'resourceId does not exist.', + [ + 'apiName' => 'DisasterRecovery', + 'description' => '容灾恢复', + 'operationType' => 'update', + 'additionalActions' => [], + 'ramAction' => [ + 'action' => 'mq:DisasterRecovery', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => '全部资源', 'arn' => '*'], ], - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', + ], + ], + [ + 'apiName' => 'ListCaCertificate', + 'description' => '查询CA证书列表', + 'operationType' => 'list', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + 'ramAction' => [ + 'action' => 'mq:ListCaCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], - 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', + ], + [ + 'apiName' => 'DeleteCustomAuthPermission', + 'description' => '删除Topic授权', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'mq:DeleteCustomAuthPermission', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + [ + 'apiName' => 'DeleteCustomAuthConnectBlack', + 'description' => '删除连接黑名单', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'mq:DeleteCustomAuthConnectBlack', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"B3C2F69B-B543-49B0-8B21-C8843AE0****\\",\\n \\"Code\\": \\"200\\",\\n \\"Data\\": true,\\n \\"Message\\": \\"operation success.\\"\\n}","type":"json"}]', - 'title' => '删除标签', - ], - 'SetSniConfig' => [ - 'summary' => '配置多域名证书。', - 'methods' => [ - 'get', - 'post', + [ + 'apiName' => 'UntagResources', + 'description' => '删除标签', + 'operationType' => 'delete', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + 'ramAction' => [ + 'action' => 'mq:UnTagResources', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], - 'schemes' => [ - 'https', + [ + 'apiName' => 'AddCustomAuthIdentity', + 'description' => '添加身份认证', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'mq:AddCustomAuthIdentity', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'InactivateCaCertificate', + 'description' => '注销CA证书', + 'operationType' => 'none', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + 'ramAction' => [ + 'action' => 'mq:UnregisterCaCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], ], ], - 'operationType' => 'write', - 'deprecated' => false, - 'systemTags' => [ + [ + 'apiName' => 'SetSniConfig', + 'description' => '配置多域名证书', 'operationType' => 'update', - 'riskType' => 'high', - 'chargeType' => 'free', - 'abilityTreeCode' => '258058', - 'abilityTreeNodes' => [ - 'FEATUREonsFLJRJ5', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], ], - ], - 'parameters' => [ - [ - 'name' => 'MqttInstanceId', - 'in' => 'query', - 'schema' => [ - 'title' => '实例ID', - 'description' => '实例ID', - 'type' => 'string', - 'required' => true, - 'example' => 'mqtt-cn-5yd3xxx', + 'ramAction' => [ + 'action' => 'mq:SetSniConfig', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'DefaultCertificate', - 'in' => 'query', - 'schema' => [ - 'title' => '默认证书。当服务端证书列表中没有对应的域名能够匹配,则返回该证书。', - 'description' => '默认证书。当服务端证书列表中没有对应的域名能够匹配,则返回该证书。', - 'type' => 'string', - 'required' => true, - 'example' => '1533xxxx-cn-hangzhou', - ], + ], + [ + 'apiName' => 'ActiveCaCertificate', + 'description' => '激活CA证书', + 'operationType' => 'none', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], ], - [ - 'name' => 'SniConfig', - 'in' => 'query', - 'schema' => [ - 'title' => 'SNI配置,实现域名和证书映射。格式为:域名#证书ID#密码(如果有);域名#证书ID#密码(如果有);', - 'description' => 'SNI配置,实现域名和证书映射。格式为:域名#证书ID#密码(如果有);域名#证书ID#密码(如果有);', - 'type' => 'string', - 'required' => false, - 'example' => '*.mqtt.aliyuncs.com#15xxxxx-cn-hangzhou;mqtt-test.mqtt.aliyuncs.com#15xxxx9-cn-hangzhou', + 'ramAction' => [ + 'action' => 'mq:ActiveCaCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'description' => '返回对象', - 'type' => 'object', - 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => 'E4581CCF-62AF-44D9-B5B4-D1DQDC0E****', - ], - 'Success' => [ - 'description' => '是否调用成功:true:调用成功。 false:调用失败。', - 'type' => 'string', - 'example' => 'True', - ], - 'AccessDeniedDetail' => [ - 'description' => '访问被拒绝详细信息。', - 'type' => 'object', - 'properties' => [ - 'AuthAction' => [ - 'description' => '尝试执行的未授权操作。', - 'type' => 'string', - 'example' => 'SetSniConfig', - ], - 'AuthPrincipalDisplayName' => [ - 'description' => '授权主体显示名称。', - 'type' => 'string', - 'example' => '2063xxxxxxxx533', - ], - 'AuthPrincipalOwnerId' => [ - 'description' => '授权主体所有者ID。', - 'type' => 'string', - 'example' => '1245xxxxx34343', - ], - 'AuthPrincipalType' => [ - 'description' => '授权主体类型。', - 'type' => 'string', - 'example' => 'SubUser', - ], - 'EncodedDiagnosticMessage' => [ - 'description' => '编码诊断信息。', - 'type' => 'string', - 'example' => 'AQFma6gWZmuoFkMxQ0M3MUVCLTRFQzQtNTI1OS1BQ0Q0LTlBMTFGQkVDOTA3Qw==', - ], - 'NoPermissionType' => [ - 'description' => '无权限类型。', - 'type' => 'string', - 'example' => 'ImplicitDeny', - ], - 'PolicyType' => [ - 'description' => '策略类型。', - 'type' => 'string', - 'example' => 'AccountLevelIdentityBasedPolicy', - ], - ], - ], - ], + [ + 'apiName' => 'RegisterCaCertificate', + 'description' => '注册CA证书', + 'operationType' => 'create', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + 'ramAction' => [ + 'action' => 'mq:RegisterCa', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'MqttInstanceNotFound', - 'errorMessage' => 'Specified instance is not found', - ], - [ - 'errorCode' => 'MqttOwnerCheckError', - 'errorMessage' => 'Failed to validate the instance permission', - ], + [ + 'apiName' => 'DeleteDeviceCertificate', + 'description' => '删除设备证书', + 'operationType' => 'delete', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], ], - 403 => [ - [ - 'errorCode' => 'PermissionCheckFailed', - 'errorMessage' => 'Failed to verify API permissions.', + 'ramAction' => [ + 'action' => 'mq:DeleteDeviceCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + [ + 'apiName' => 'UnRegisterDeviceCredential', + 'description' => '注销设备的访问凭证', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'mq:MqttInstanceAccess', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E4581CCF-62AF-44D9-B5B4-D1DQDC0E****\\",\\n \\"Success\\": \\"True\\",\\n \\"AccessDeniedDetail\\": {\\n \\"AuthAction\\": \\"SetSniConfig\\",\\n \\"AuthPrincipalDisplayName\\": \\"2063xxxxxxxx533\\",\\n \\"AuthPrincipalOwnerId\\": \\"1245xxxxx34343\\",\\n \\"AuthPrincipalType\\": \\"SubUser\\",\\n \\"EncodedDiagnosticMessage\\": \\"AQFma6gWZmuoFkMxQ0M3MUVCLTRFQzQtNTI1OS1BQ0Q0LTlBMTFGQkVDOTA3Qw==\\",\\n \\"NoPermissionType\\": \\"ImplicitDeny\\",\\n \\"PolicyType\\": \\"AccountLevelIdentityBasedPolicy\\"\\n }\\n}","type":"json"}]', - 'title' => '配置多域名证书', - ], - 'DisasterDowngrade' => [ - 'summary' => '多实例容灾降级,该接口作用是降级其中某个实例的公网VIP接入,目前只支持铂金版实例,需要提交工单申请', - 'methods' => [ - 'post', + [ + 'apiName' => 'QueryMqttTraceMessageOfClient', + 'description' => '查询消息轨迹', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:QueryMqttDeviceTrace', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], ], - 'schemes' => [ - 'https', + [ + 'apiName' => 'RevokeToken', + 'description' => '吊销 Token', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'mq:RevokeToken', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], + ], ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'GetRegisterCode', + 'description' => '获取CA证书注册码', + 'operationType' => 'get', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + 'ramAction' => [ + 'action' => 'mq:GetRegisterCode', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], ], ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, - 'systemTags' => [ + [ + 'apiName' => 'UpdateCustomAuthPermission', + 'description' => '更新Topic授权', 'operationType' => 'update', - 'riskType' => 'high', - 'abilityTreeCode' => '263645', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', + 'ramAction' => [ + 'action' => 'mq:UpdateCustomAuthPermission', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], ], ], - 'parameters' => [ - [ - 'name' => 'InstanceId', - 'in' => 'formData', - 'schema' => [ - 'description' => '云消息队列 MQTT 版实例的 ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'mqtt-cn-xxx', + [ + 'apiName' => 'AddCustomAuthPermission', + 'description' => '添加Topic授权', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'mq:AddCustomAuthPermission', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], - [ - 'name' => 'DowngradeInstanceId', - 'in' => 'formData', - 'schema' => [ - 'description' => '降级的实例ID', - 'type' => 'string', - 'required' => true, - 'example' => 'mqtt-cn-xxxx', + ], + [ + 'apiName' => 'DeleteGroupId', + 'description' => '删除 Group ID', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'mq:DeleteMqttGroupId', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', - 'type' => 'object', - 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '82B9E503-F4A1-4F30-976F-C6999FF9****', - ], - 'Code' => [ - 'description' => '接口返回码:200:表示成功。 其它:表示错误码。错误码详情,请参见错误码。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Success' => [ - 'description' => '是否调用成功。true:调用成功。 false:调用失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'Message' => [ - 'description' => '调用结果信息', - 'type' => 'string', - 'example' => 'operation success.', - ], - 'AccessDeniedDetail' => [ - 'description' => '访问被拒绝详细信息;只有RAM校验失败才会返回此字段。', - 'type' => 'string', - 'example' => 'None', - ], - ], + [ + 'apiName' => 'ActiveDeviceCertificate', + 'description' => '激活设备证书', + 'operationType' => 'none', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + 'ramAction' => [ + 'action' => 'mq:ActiveDeviceCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', - ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', + [ + 'apiName' => 'DisasterDowngrade', + 'description' => '容灾降级', + 'operationType' => 'update', + 'additionalActions' => [], + 'ramAction' => [ + 'action' => 'mq:DisasterDowngrade', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', + ], + [ + 'apiName' => 'QueryCustomAuthConnectBlack', + 'description' => '查询连接黑名单', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:QueryCustomAuthConnectBlack', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], - 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', + ], + [ + 'apiName' => 'ListTagResources', + 'description' => '查询标签', + 'operationType' => 'list', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + 'ramAction' => [ + 'action' => 'mq:ListTagResources', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"82B9E503-F4A1-4F30-976F-C6999FF9****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\",\\n \\"AccessDeniedDetail\\": \\"None\\"\\n}","type":"json"}]', - 'title' => '容灾降级', - ], - 'DisasterRecovery' => [ - 'summary' => '多实例容灾降级恢复,该接口作用是恢复其中某个实例的公网VIP接入,目前只支持铂金版实例,需要提交工单申请', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'InactivateDeviceCertificate', + 'description' => ' 注销设备证书', + 'operationType' => 'none', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess'], + ], + 'ramAction' => [ + 'action' => 'mq:UnregisterDeviceCertificate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], ], ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - 'riskType' => 'high', - 'abilityTreeCode' => '263654', - 'abilityTreeNodes' => [ - 'FEATUREons3CYUNP', + [ + 'apiName' => 'ApplyToken', + 'description' => '创建临时访问 Token', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'mq:ApplyToken', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], + ], ], ], - 'parameters' => [ - [ - 'name' => 'InstanceId', - 'in' => 'formData', - 'schema' => [ - 'description' => '消息队列 MQTT 版实例的 ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'mqtt-cn-xxx', + [ + 'apiName' => 'GetDeviceCredential', + 'description' => '查询设备的访问凭证', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:GetDeviceCredential', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], - [ - 'name' => 'RecoveryInstanceId', - 'in' => 'formData', - 'schema' => [ - 'description' => '需要恢复的实例ID', - 'type' => 'string', - 'required' => true, - 'example' => 'mqtt-cn-xxx', + ], + [ + 'apiName' => 'RefreshDeviceCredential', + 'description' => '更新设备的访问凭证', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:RefreshDeviceCredential', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', - 'type' => 'object', - 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => '135F8639-F262-4417-98D1-4DE4595C****', - ], - 'Code' => [ - 'description' => '接口返回码:200:表示成功。 其它:表示错误码。错误码详情,请参见错误码。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Success' => [ - 'description' => '是否调用成功。true:调用成功。 false:调用失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'Message' => [ - 'description' => '调用结果信息', - 'type' => 'string', - 'example' => 'operation success.', - ], - 'AccessDeniedDetail' => [ - 'description' => '访问被拒绝详细信息;只有校验RAM失败后,字段才会返回。', - 'type' => 'string', - 'example' => '{}', - ], - ], + [ + 'apiName' => 'QueryCustomAuthIdentity', + 'description' => '查询身份认证', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:QueryCustomAuthIdentity', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'InstancePermissionCheckFailed', - 'errorMessage' => 'An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.', + [ + 'apiName' => 'ListDeviceCertificateByCaSn', + 'description' => '查询CA证书下设备证书', + 'operationType' => 'list', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + 'ramAction' => [ + 'action' => 'mq:ListDeviceCertificateByCaSn', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], - [ - 'errorCode' => 'InvalidParameter.%s', - 'errorMessage' => 'An error occurred while validating the parameter. The parameter may be missing or invalid.', + ], + ], + [ + 'apiName' => 'ListGroupId', + 'description' => '查看某实例下的所有 Group ID', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'mq:ListMqttGroupId', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], - 404 => [ - [ - 'errorCode' => 'ApiNotSupport', - 'errorMessage' => 'The specified API is not supported.', + ], + [ + 'apiName' => 'BatchQuerySessionByClientIds', + 'description' => '批量查询客户端在线状态', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'mq:BatchQuerySessionByClientIds', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], - 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'An error occurred while processing your request. Try again later.', + ], + [ + 'apiName' => 'TagResources', + 'description' => '新增标签', + 'operationType' => 'create', + 'additionalActions' => [ + ['action' => 'mq:MqttInstanceAccess', 'validationType' => 'always'], + ], + 'ramAction' => [ + 'action' => 'mq:TagResources', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'OnsMqtt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"135F8639-F262-4417-98D1-4DE4595C****\\",\\n \\"Code\\": 200,\\n \\"Success\\": true,\\n \\"Message\\": \\"operation success.\\",\\n \\"AccessDeniedDetail\\": \\"{}\\"\\n}","type":"json"}]', - 'title' => '容灾恢复', - ], - ], - 'endpoints' => [ - [ - 'regionId' => 'cn-shanghai-finance-1', - 'endpoint' => 'onsmqtt.cn-shanghai-finance-1.aliyuncs.com', - ], - [ - 'regionId' => 'cn-qingdao', - 'endpoint' => 'onsmqtt.cn-qingdao.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-5', - 'endpoint' => 'onsmqtt.ap-southeast-5.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen-finance-1', - 'endpoint' => 'onsmqtt.cn-shenzhen-finance-1.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-6', - 'endpoint' => 'onsmqtt.ap-southeast-6.aliyuncs.com', - ], - [ - 'regionId' => 'eu-central-1', - 'endpoint' => 'onsmqtt.eu-central-1.aliyuncs.com', - ], - [ - 'regionId' => 'cn-zhangjiakou', - 'endpoint' => 'onsmqtt.cn-zhangjiakou.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen', - 'endpoint' => 'onsmqtt.cn-shenzhen.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai', - 'endpoint' => 'onsmqtt.cn-shanghai.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou', - 'endpoint' => 'onsmqtt.cn-hangzhou.aliyuncs.com', - ], - [ - 'regionId' => 'ap-northeast-1', - 'endpoint' => 'onsmqtt.ap-northeast-1.aliyuncs.com', - ], - [ - 'regionId' => 'me-central-1', - 'endpoint' => 'onsmqtt.me-central-1.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-3', - 'endpoint' => 'onsmqtt.ap-southeast-3.aliyuncs.com', - ], - [ - 'regionId' => 'cn-heyuan-acdr-1', - 'endpoint' => 'onsmqtt.cn-heyuan-acdr-1.aliyuncs.com', - ], - [ - 'regionId' => 'mq-internet-access', - 'endpoint' => 'onsmqtt.mq-internet-access.aliyuncs.com', - ], - [ - 'regionId' => 'cn-beijing', - 'endpoint' => 'onsmqtt.cn-beijing.aliyuncs.com', - ], - [ - 'regionId' => 'cn-huhehaote', - 'endpoint' => 'onsmqtt.cn-huhehaote.aliyuncs.com', - ], - [ - 'regionId' => 'cn-chengdu', - 'endpoint' => 'onsmqtt.cn-chengdu.aliyuncs.com', - ], - [ - 'regionId' => 'us-east-1', - 'endpoint' => 'onsmqtt.us-east-1.aliyuncs.com', ], - [ - 'regionId' => 'cn-hongkong', - 'endpoint' => 'onsmqtt.cn-hongkong.aliyuncs.com', - ], - [ - 'regionId' => 'eu-west-1', - 'endpoint' => 'onsmqtt.eu-west-1.aliyuncs.com', - ], - [ - 'regionId' => 'cn-wulanchabu', - 'endpoint' => 'onsmqtt.cn-wulanchabu.aliyuncs.com', - ], - [ - 'regionId' => 'us-west-1', - 'endpoint' => 'onsmqtt.us-west-1.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-1', - 'endpoint' => 'onsmqtt.ap-southeast-1.aliyuncs.com', - ], - [ - 'regionId' => 'cn-guangzhou', - 'endpoint' => 'onsmqtt.cn-guangzhou.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-finance', - 'endpoint' => 'onsmqtt.cn-hangzhou-finance.aliyuncs.com', + 'resourceTypes' => [ + ['validationType' => 'always', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'], ], ], ]; -- cgit v1.2.3