summaryrefslogtreecommitdiff
path: root/data/zh_cn/ons/2019-02-14
diff options
context:
space:
mode:
authorZhineng Li <im@zhineng.li>2026-07-12 17:11:17 +0800
committerZhineng Li <im@zhineng.li>2026-07-12 17:11:17 +0800
commit1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634 (patch)
tree5f0857666365b7e40cdaa3733ebe1f3ba9e13c67 /data/zh_cn/ons/2019-02-14
parent7347bac4ab7e136157fc94777e6cf87ef9e08599 (diff)
downloadafterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.tar.gz
afterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.zip
update APIs 20260712
Diffstat (limited to 'data/zh_cn/ons/2019-02-14')
-rw-r--r--data/zh_cn/ons/2019-02-14/api-docs.php8516
1 files changed, 3988 insertions, 4528 deletions
diff --git a/data/zh_cn/ons/2019-02-14/api-docs.php b/data/zh_cn/ons/2019-02-14/api-docs.php
index dfaff94..88214ca 100644
--- a/data/zh_cn/ons/2019-02-14/api-docs.php
+++ b/data/zh_cn/ons/2019-02-14/api-docs.php
@@ -1,224 +1,232 @@
<?php return [
'version' => '1.0',
- 'info' => [
- 'style' => 'RPC',
- 'product' => 'Ons',
- 'version' => '2019-02-14',
- ],
+ 'info' => ['style' => 'RPC', 'product' => 'Ons', 'version' => '2019-02-14'],
'directories' => [
[
- 'id' => 121335,
- 'title' => '服务',
+ 'children' => ['OpenOnsService'],
'type' => 'directory',
- 'children' => [
- 'OpenOnsService',
- ],
+ 'title' => '服务',
+ 'id' => 98489,
],
[
- 'id' => 121341,
- 'title' => '消息',
+ 'children' => ['OnsMessageTrace', 'OnsMessageGetByMsgId', 'OnsMessageGetByKey', 'OnsMessagePageQueryByTopic', 'OnsMessageDetail'],
'type' => 'directory',
- 'children' => [
- 'OnsMessageTrace',
- 'OnsMessageGetByMsgId',
- 'OnsMessageGetByKey',
- 'OnsMessagePageQueryByTopic',
- 'OnsMessageDetail',
- ],
+ 'title' => '消息',
+ 'id' => 98491,
],
[
- 'id' => 121347,
- 'title' => '地域',
+ 'children' => ['OnsRegionList'],
'type' => 'directory',
- 'children' => [
- 'OnsRegionList',
- ],
+ 'title' => '地域',
+ 'id' => 98497,
],
[
- 'id' => 121349,
- 'title' => '实例',
+ 'children' => ['OnsInstanceCreate', 'OnsInstanceBaseInfo', 'OnsInstanceUpdate', 'OnsInstanceInServiceList', 'OnsInstanceDelete'],
'type' => 'directory',
- 'children' => [
- 'OnsInstanceCreate',
- 'OnsInstanceBaseInfo',
- 'OnsInstanceUpdate',
- 'OnsInstanceInServiceList',
- 'OnsInstanceDelete',
- ],
+ 'title' => '实例',
+ 'id' => 98499,
],
[
- 'id' => 121355,
- 'title' => 'Topic',
+ 'children' => ['OnsTopicCreate', 'OnsTopicStatus', 'OnsTopicList', 'OnsTopicSubDetail', 'OnsTopicDelete'],
'type' => 'directory',
- 'children' => [
- 'OnsTopicCreate',
- 'OnsTopicStatus',
- 'OnsTopicList',
- 'OnsTopicSubDetail',
- 'OnsTopicDelete',
- ],
+ 'title' => 'Topic',
+ 'id' => 98505,
],
[
- 'id' => 121362,
- 'title' => 'Group',
+ 'children' => ['OnsGroupCreate', 'OnsGroupConsumerUpdate', 'OnsGroupList', 'OnsGroupSubDetail', 'OnsGroupDelete'],
'type' => 'directory',
- 'children' => [
- 'OnsGroupCreate',
- 'OnsGroupConsumerUpdate',
- 'OnsGroupList',
- 'OnsGroupSubDetail',
- 'OnsGroupDelete',
- ],
+ 'title' => 'Group',
+ 'id' => 98511,
],
[
- 'id' => 121371,
- 'title' => '标签',
+ 'children' => ['ListTagResources', 'TagResources', 'UntagResources'],
'type' => 'directory',
- 'children' => [
- 'ListTagResources',
- 'TagResources',
- 'UntagResources',
- ],
+ 'title' => '标签',
+ 'id' => 98517,
],
[
- 'id' => 121375,
- 'title' => '消费',
+ 'children' => ['OnsConsumerStatus', 'OnsConsumerAccumulate', 'OnsConsumerGetConnection', 'OnsConsumerResetOffset', 'OnsConsumerTimeSpan', 'OnsMessagePush'],
'type' => 'directory',
- 'children' => [
- 'OnsConsumerStatus',
- 'OnsConsumerAccumulate',
- 'OnsConsumerGetConnection',
- 'OnsConsumerResetOffset',
- 'OnsConsumerTimeSpan',
- 'OnsMessagePush',
- ],
+ 'title' => '消费',
+ 'id' => 98521,
],
[
- 'id' => 121382,
- 'title' => '消息收发数据统计',
+ 'children' => ['OnsTrendTopicInputTps', 'OnsTrendGroupOutputTps'],
'type' => 'directory',
- 'children' => [
- 'OnsTrendTopicInputTps',
- 'OnsTrendGroupOutputTps',
- ],
+ 'title' => '消息收发数据统计',
+ 'id' => 98528,
],
[
- 'id' => 121389,
- 'title' => '轨迹',
+ 'children' => ['OnsTraceQueryByMsgId', 'OnsTraceQueryByMsgKey', 'OnsTraceGetResult'],
'type' => 'directory',
- 'children' => [
- 'OnsTraceQueryByMsgId',
- 'OnsTraceQueryByMsgKey',
- 'OnsTraceGetResult',
- ],
+ 'title' => '轨迹',
+ 'id' => 98531,
],
[
- 'id' => 121393,
- 'title' => '死信',
+ 'children' => ['OnsDLQMessagePageQueryByGroupId', 'OnsDLQMessageGetById', 'OnsDLQMessageResendById'],
'type' => 'directory',
- 'children' => [
- 'OnsDLQMessagePageQueryByGroupId',
- 'OnsDLQMessageGetById',
- 'OnsDLQMessageResendById',
- ],
+ 'title' => '死信',
+ 'id' => 98535,
],
[
- 'id' => 187862,
- 'title' => '其他',
+ 'children' => ['OnsTopicUpdate'],
'type' => 'directory',
- 'children' => [
- 'OnsTopicUpdate',
- ],
+ 'title' => '其他',
+ 'id' => 98539,
],
],
'components' => [
'schemas' => [],
],
'apis' => [
- 'OpenOnsService' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'ListTagResources' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => ['operationType' => 'get'],
+ 'parameters' => [
+ [
+ 'name' => 'InstanceId',
+ 'in' => 'query',
+ 'schema' => ['description' => '需查询的标签所绑定资源所在的实例ID。'."\n"
+ .'> 如果您需查询的是Topic、Group的标签,则必须填写该参数。', 'type' => 'string', 'required' => false, 'docRequired' => false, 'example' => 'MQ_INST_188077086902****_BXSuW61e'],
+ ],
[
- 'APP' => [],
+ 'name' => 'ResourceType',
+ 'in' => 'query',
+ 'schema' => ['description' => '资源类型。枚举类型。取值如下:'."\n"
+ ."\n"
+ .'- **INSTANCE**'."\n"
+ .'- **TOPIC**'."\n"
+ .'- **GROUP**', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'TOPIC'],
],
[
- 'PrivateKey' => [],
+ 'name' => 'NextToken',
+ 'in' => 'query',
+ 'schema' => ['description' => '下一页查询开始的Token。', 'type' => 'string', 'required' => false, 'example' => 'caeba0****be03f84eb48b699f0a4883'],
],
[
- 'BearerToken' => [],
+ 'name' => 'Tag',
+ 'in' => 'query',
+ 'style' => 'repeatList',
+ 'schema' => [
+ 'description' => '标签列表。列表元素个数不得超过 20。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Key' => ['description' => '资源的标签键。'."\n"
+ ."\n"
+ .'- 若输入该参数,则参数取值不允许为空字符串。'."\n"
+ .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => false, 'example' => 'CartService'],
+ 'Value' => ['description' => '资源的标签值。'."\n"
+ ."\n"
+ .'- 若输入该参数,参数取值允许为空字符串。'."\n"
+ .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => false, 'example' => 'ServiceA'],
+ ],
+ 'required' => false,
+ 'description' => '',
+ ],
+ 'required' => false,
+ 'maxItems' => 21,
+ ],
+ ],
+ [
+ 'name' => 'ResourceId',
+ 'in' => 'query',
+ 'style' => 'repeatList',
+ 'schema' => [
+ 'description' => '资源ID列表。',
+ 'type' => 'array',
+ 'items' => ['description' => '需要查询的资源ID。'."\n"
+ ."\n"
+ .'- 当需要查询的标签绑定的资源类型为实例时,该参数输入实例ID。'."\n"
+ ."\n"
+ .'- 当需要查询的标签绑定的资源类型为Topic时,该参数输入Topic名称。'."\n"
+ ."\n"
+ .'- 当需要查询的标签绑定的资源类型为Group时,该参数输入Group ID。', 'type' => 'string', 'required' => false, 'example' => 'test'],
+ 'required' => false,
+ 'example' => 'TopicA',
+ 'maxItems' => 51,
+ ],
],
],
- 'operationType' => 'readAndWrite',
- 'deprecated' => false,
- 'systemTags' => [],
- 'parameters' => [],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '8C5B4603-8977-4513-AB60-9C3E2F88****',
- ],
- 'OrderId' => [
- 'description' => '订单ID。',
- 'type' => 'string',
- 'example' => '2068689****0272',
+ 'NextToken' => ['description' => '下一页查询开始的Token。', 'type' => 'string', 'example' => 'caeba0****be03f84eb48b699f0a4883'],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '301D2CBE-66F8-403D-AEC0-82582478****'],
+ 'TagResources' => [
+ 'description' => '由资源及其标签组成的集合,包含了资源ID、资源类型和标签键值等信息。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'ResourceType' => ['description' => '资源类型。'."\n"
+ ."\n"
+ .'- ALIYUN::MQ::INSTANCE:表示资源类型为实例。'."\n"
+ .'- ALIYUN::MQ::TOPIC:表示资源类型为Topic。'."\n"
+ .'- ALIYUN::MQ::GROUP:表示资源类型为Group。', 'type' => 'string', 'example' => 'ALIYUN::MQ::TOPIC'],
+ 'InstanceId' => ['description' => '实例ID。', 'type' => 'string', 'example' => 'MQ_INST_188077086902****_BXSuW61e'],
+ 'TagValue' => ['description' => '标签值。', 'type' => 'string', 'example' => 'ServiceA'],
+ 'ResourceId' => ['description' => '资源ID。', 'type' => 'string', 'example' => 'TopicA'],
+ 'TagKey' => ['description' => '标签键。', 'type' => 'string', 'example' => 'CartService'],
+ ],
+ 'description' => '',
+ ],
],
],
+ 'description' => '',
],
],
],
- 'errorCodes' => [
- 400 => [
- [
- 'errorCode' => 'OrderOpend',
- 'errorMessage' => '您已开通,请前往控制台使用。',
- ],
- [
- 'errorCode' => 'PermissionDenied',
- 'errorMessage' => '当前子账号无权限,请为子账号授权。',
- ],
- [
- 'errorCode' => 'PriceWanHuaTongSys',
- 'errorMessage' => '询价调用万花筒错误。',
- ],
- ],
- ],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"8C5B4603-8977-4513-AB60-9C3E2F88****\\",\\n \\"OrderId\\": \\"2068689****0272\\"\\n}","errorExample":""},{"type":"xml","example":"<OpenOnsServiceResponse>\\n<RequestId>8C5B4603-8977-4513-AB60-9C3E2F88****</RequestId>\\n<OrderId>2068689****0272</OrderId>\\n</OpenOnsServiceResponse>","errorExample":""}]',
- 'title' => '开通服务',
- 'summary' => '调用OpenOnsService开通云消息队列 RocketMQ 版服务。',
+ 'title' => '查询资源绑定的标签列表',
+ 'summary' => '调用ListTagResources查询资源绑定的标签列表。',
'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
."\n"
- .'本接口用于第一次使用云消息队列 RocketMQ 版的场景。开通服务后,您才能使用云消息队列 RocketMQ 版。'."\n"
- ."\n"
- .'目前,仅可通过华东1(杭州)地域开通云消息队列 RocketMQ 版服务。开通服务不被计费。',
+ .'调用**ListTagResources**接口时,标签键**Tag.N.Key**和资源ID **ResourceId.N**至少需要输入一个。您可以查询某资源下的所有标签,也可以根据指定标签键查询标签值及标签所绑定的资源。'."\n"
+ .'- 若输入标签键**Tag.N.Key**,则可以查询标签值**Tag.N.Value**和标签所绑定的资源ID **ResourceId.N**。'."\n"
+ .'- 若输入资源ID **ResourceId.N**,则可以查询指定资源下所有的标签信息,包括标签键**Tag.N.Key**及标签值**Tag.N.Value**。'."\n",
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OpenOnsService**接口,您还可以通过云消息队列 RocketMQ 版控制台开通服务,具体操作,请参见[开通消息队列服务](~~169006~~)。',
- ],
- 'OnsMessageTrace' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ .'除了调用**ListTagResources**接口,您还可以通过云消息队列 RocketMQ 版控制台查看资源的标签信息。具体操作,请参见[标签管理](~~172713~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'ListTagResources'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:ListTagResources',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"caeba0****be03f84eb48b699f0a4883\\",\\n \\"RequestId\\": \\"301D2CBE-66F8-403D-AEC0-82582478****\\",\\n \\"TagResources\\": [\\n {\\n \\"ResourceType\\": \\"ALIYUN::MQ::TOPIC\\",\\n \\"InstanceId\\": \\"MQ_INST_188077086902****_BXSuW61e\\",\\n \\"TagValue\\": \\"ServiceA\\",\\n \\"ResourceId\\": \\"TopicA\\",\\n \\"TagKey\\": \\"CartService\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<ListTagResourcesResponse>\\n<RequestId>301D2CBE-66F8-403D-AEC0-82582478****</RequestId>\\n<NextToken>caeba0****be03f84eb48b699f0a4883</NextToken>\\n<TagResources>\\n <ResourceId>TopicA</ResourceId>\\n <InstanceId>MQ_INST_188077086902****_BXSuW61e</InstanceId>\\n <TagKey>CartService</TagKey>\\n <ResourceType>ALIYUN::MQ::TOPIC</ResourceType>\\n <TagValue>ServiceA</TagValue>\\n</TagResources>\\n</ListTagResourcesResponse>","errorExample":""}]',
+ ],
+ 'OnsConsumerAccumulate' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -226,42 +234,26 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
- 'name' => 'Topic',
+ 'name' => 'GroupId',
'in' => 'query',
- 'schema' => [
- 'description' => '消息的Topic。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'test-mq_topic',
- ],
+ 'schema' => ['description' => '需查询的消费端Group ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test_consumer_id'],
],
[
- 'name' => 'MsgId',
+ 'name' => 'Detail',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询消息轨迹的消息ID,即Message ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '1E05791C117818B4AAC23B1BB0CE****',
- ],
+ 'schema' => ['description' => '是否查询各个Topic的详细信息。取值说明如下:'."\n"
+ ."\n"
+ .'- **true**:要查询详细信息,返回**DetailInTopicList**参数的详细信息。'."\n"
+ ."\n"
+ .'- **false**:不查询详细信息(默认值),**DetailInTopicList**参数返回值为空。'."\n", 'type' => 'boolean', 'required' => false, 'example' => 'true'],
],
[
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
],
'responses' => [
@@ -269,73 +261,96 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'EAE5BE23-37A1-4354-94D6-E44AE17E****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'CE817BFF-B389-43CD-9419-95011AC9****'],
'Data' => [
+ 'description' => '指定Consumer的消费堆积情况。',
'type' => 'object',
- 'itemNode' => true,
'properties' => [
- 'MessageTrack' => [
- 'description' => '查询结果。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'TrackType' => [
- 'description' => '当前状态。取值说明如下:'."\n"
- ."\n"
- .'- **CONSUMED**:已消费。'."\n"
- .'- **CONSUMED_BUT_FILTERED**:不符合Group ID的订阅条件,消息已被过滤,未消费。'."\n"
- .'- **NOT_CONSUME_YET**:暂未消费。'."\n"
- .'- **NOT_ONLINE**:客户端不在线。'."\n"
- .'- **UNKNOWN**:其他问题。',
- 'type' => 'string',
- 'example' => 'CONSUMED',
- ],
- 'ConsumerGroup' => [
- 'description' => '订阅该Topic的消费者所对应的Group ID。',
- 'type' => 'string',
- 'example' => 'GID_test_group_id',
- ],
- 'InstanceId' => [
- 'description' => '需查询的消息所对应的实例ID。',
- 'type' => 'string',
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
+ 'ConsumeTps' => ['description' => '该Group ID下消费者实例群组接收消息的总TPS。', 'type' => 'number', 'format' => 'float', 'example' => '10'],
+ 'DelayTime' => ['description' => 'Group ID消费消息的最大延迟时间。取值为该Group ID订阅的所有Topic中,消费延迟时间最长的Topic的值。'."\n"
+ ."\n"
+ .'单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '10000'],
+ 'LastTimestamp' => ['description' => '该Group ID下消费者实例群组中最近消费的某条消息的生产时间。'."\n"
+ ."\n"
+ .'单位:毫秒级的Unix时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1566231000000'],
+ 'TotalDiff' => ['description' => '该Group ID订阅的所有Topic的消费堆积数量。', 'type' => 'integer', 'format' => 'int64', 'example' => '100'],
+ 'Online' => ['description' => '该Group ID下是否有消费者实例在线;只要有一个消费者实例在线,该Group ID状态即为在线。取值说明如下:'."\n"
+ ."\n"
+ .'- **true**:状态为在线'."\n"
+ ."\n"
+ .'- **false**:状态为不在线', 'type' => 'boolean', 'example' => 'true'],
+ 'DetailInTopicList' => [
+ 'type' => 'object',
+ 'itemNode' => true,
+ 'properties' => [
+ 'DetailInTopicDo' => [
+ 'description' => '各个Topic具体情况。如果请求参数**Detail**取值为**fasle**,则该返回参数的返回值为空。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'DelayTime' => ['description' => '该Topic中消息消费的最大延迟时间。即Topic中最早一条未消费消息的就绪时间和当前的时间差。'."\n"
+ ."\n"
+ .'单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '10000'],
+ 'TotalDiff' => ['description' => '该Topic的消费堆积数量。', 'type' => 'integer', 'format' => 'int64', 'example' => '100'],
+ 'LastTimestamp' => ['description' => '该Topic中最近消费的某条消息的生产时间。'."\n"
+ ."\n"
+ .'单位:毫秒级的Unix时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1566231000000'],
+ 'Topic' => ['description' => 'Topic名称。', 'type' => 'string', 'example' => 'test-mq-topic'],
+ ],
+ 'description' => '',
],
],
],
+ 'description' => '',
],
],
],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"EAE5BE23-37A1-4354-94D6-E44AE17E****\\",\\n \\"Data\\": {\\n \\"MessageTrack\\": [\\n {\\n \\"TrackType\\": \\"CONSUMED\\",\\n \\"ConsumerGroup\\": \\"GID_test_group_id\\",\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsMessageTraceResponse>\\n<Data>\\n <MessageTrack>\\n <InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>\\n <ConsumerGroup>GID_test_group_id</ConsumerGroup>\\n <TrackType>CONSUMED</TrackType>\\n </MessageTrack>\\n</Data>\\n<RequestId>EAE5BE23-37A1-4354-94D6-E44AE17****</RequestId>\\n</OnsMessageTraceResponse>","errorExample":""}]',
- 'title' => '查看消息消费结果',
- 'summary' => '调用OnsMessageTrace根据Message ID来判断目标消息是否曾被消费过。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
- ."\n"
- .'- 本接口一般在消费异常,需要判断消息消费状态,初步排查原因时使用。'."\n"
- ."\n"
- .'- 本接口的实现基于云消息队列 RocketMQ 版的内部位点机制,在大部分场景下判断结果可信,但如果应用方进行过重置位点已经清除消息等操作,则判断结果可能有误。',
+ 'eventInfo' => [
+ 'enable' => false,
+ 'eventNames' => [],
+ ],
+ 'title' => '查询消息消费堆积情况',
+ 'summary' => '查询指定Group ID的消息消费堆积情况,包括当前消息堆积数量和消费延迟时间等。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>消费堆积查询一般在生产环境中需要关注Group ID消费进度时使用,用于粗略判断消息消费情况和延迟情况。您不仅可以查到该Group ID订阅的所有Topic的消息堆积情况,还可以查到每个Topic各自的消息堆积情况。',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsMessageTrace**接口,您还可以通过云消息队列 RocketMQ 版控制台查看消息的消费状态。具体操作,请参见[查询消息轨迹](~~43357~~)。',
- ],
- 'OnsMessageGetByMsgId' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ .'除了调用**OnsConsumerAccumulate**接口,您还可以通过云消息队列 RocketMQ 版控制台查看Group ID的消息消费堆积情况。具体操作,请参见[查看消费者状态](~~94312~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsConsumerAccumulate'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryConsumerAccumulate',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"CE817BFF-B389-43CD-9419-95011AC9****\\",\\n \\"Data\\": {\\n \\"ConsumeTps\\": 10,\\n \\"DelayTime\\": 10000,\\n \\"LastTimestamp\\": 1566231000000,\\n \\"TotalDiff\\": 100,\\n \\"Online\\": true,\\n \\"DetailInTopicList\\": {\\n \\"DetailInTopicDo\\": [\\n {\\n \\"DelayTime\\": 10000,\\n \\"TotalDiff\\": 100,\\n \\"LastTimestamp\\": 1566231000000,\\n \\"Topic\\": \\"test-mq-topic\\"\\n }\\n ]\\n }\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsConsumerAccumulateResponse>\\n<Data>\\n <DetailInTopicList>\\n <DetailInTopicDo>\\n <TotalDiff>100</TotalDiff>\\n <LastTimestamp>1566231000000</LastTimestamp>\\n <DelayTime>10000</DelayTime>\\n <Topic>test-mq-topic</Topic>\\n </DetailInTopicDo>\\n </DetailInTopicList>\\n <TotalDiff>100</TotalDiff>\\n <LastTimestamp>1566231000000</LastTimestamp>\\n <DelayTime>10000</DelayTime>\\n <Online>true</Online>\\n <ConsumeTps>10</ConsumeTps>\\n</Data>\\n<RequestId>0CCF6437-CBB0-4378-BFEC-E08AC258****</RequestId>\\n</OnsConsumerAccumulateResponse>","errorExample":""}]',
+ ],
+ 'OnsConsumerGetConnection' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -345,40 +360,19 @@
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
+ 'abilityTreeCode' => '14917',
+ 'abilityTreeNodes' => ['FEATUREons0MOUAZ'],
],
'parameters' => [
[
- 'name' => 'MsgId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息的ID,即Message ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '1E0578FE110F18B4AAC235C05F2*****',
- ],
- ],
- [
- 'name' => 'Topic',
+ 'name' => 'GroupId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息的Topic。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'test-mq_topic',
- ],
+ 'schema' => ['description' => '需查询的Group ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test_consumer_id'],
],
[
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询消息所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '需查询的Group ID所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
],
'responses' => [
@@ -386,317 +380,174 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'DE4140C7-F42D-473D-A5FF-B1E31692****'],
'Data' => [
- 'description' => '查询结果。',
+ 'description' => '返回参数数据结构。',
'type' => 'object',
'properties' => [
- 'StoreSize' => [
- 'description' => '消息大小。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '407',
- ],
- 'ReconsumeTimes' => [
- 'description' => '消息重试消费的次数。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1',
- ],
- 'StoreTimestamp' => [
- 'description' => '被服务端存储的时间戳。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570761026708',
- ],
- 'InstanceId' => [
- 'description' => '实例ID。',
- 'type' => 'string',
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
- 'MsgId' => [
- 'description' => '消息ID,即Message ID。',
- 'type' => 'string',
- 'example' => '1E0578FE110F18B4AAC235C0C8460BA2',
- ],
- 'StoreHost' => [
- 'description' => '存储该消息的服务器实例。',
- 'type' => 'string',
- 'example' => '11.220.***.***:10911',
- ],
- 'Topic' => [
- 'description' => '消息的Topic。',
- 'type' => 'string',
- 'example' => 'test-mq_topic',
- ],
- 'PropertyList' => [
+ 'ConnectionList' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
- 'MessageProperty' => [
- 'description' => '消息属性列表。',
+ 'ConnectionDo' => [
+ 'description' => '指定Group ID的连接信息。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
- 'Value' => [
- 'description' => '消息属性的值。',
- 'type' => 'string',
- 'example' => 'TagA',
- ],
- 'Name' => [
- 'description' => '消息属性。取值说明如下:'."\n"
- ."\n"
- .'- **TRACE_ON**:是否有消息轨迹'."\n"
- .'- **KEYS**:消息的Key属性'."\n"
- .'- **TAGS**:消息的Tag属性'."\n"
- .'- **INSTANCE_ID**:消息所在的实例的ID'."\n"
- ."\n"
- .'更多概念信息,请参见[名词解释](~~29533~~)。',
- 'type' => 'string',
- 'example' => 'TAGS',
- ],
+ 'Version' => ['description' => '消费端版本。'."\n", 'type' => 'string', 'example' => 'V4_3_6'],
+ 'ClientAddr' => ['description' => '该消费者实例的地址和端口。', 'type' => 'string', 'example' => '30.5.121.**'],
+ 'Language' => ['description' => '消费者应用的开发语言。', 'type' => 'string', 'example' => 'JAVA'],
+ 'ClientId' => ['description' => '消费者实例的ID。', 'type' => 'string', 'example' => '30.5.121.**@24813#-1999745829#-1737591554#453111174894656'],
],
+ 'description' => '',
],
],
],
+ 'description' => '',
],
- 'BornTimestamp' => [
- 'description' => '生成时间戳。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570761026630',
- ],
- 'BodyCRC' => [
- 'description' => '消息体CRC校验值。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '914112295',
- ],
- 'BornHost' => [
- 'description' => '生成该消息的客户端实例。',
- 'type' => 'string',
- 'example' => '42.120.**.**:64646',
- ],
+ 'MessageModel' => ['type' => 'string', 'description' => ''],
],
],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\",\\n \\"Data\\": {\\n \\"StoreSize\\": 407,\\n \\"ReconsumeTimes\\": 1,\\n \\"StoreTimestamp\\": 1570761026708,\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\",\\n \\"MsgId\\": \\"1E0578FE110F18B4AAC235C0C8460BA2\\",\\n \\"StoreHost\\": \\"11.220.***.***:10911\\",\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"PropertyList\\": {\\n \\"MessageProperty\\": [\\n {\\n \\"Value\\": \\"TagA\\",\\n \\"Name\\": \\"TAGS\\"\\n }\\n ]\\n },\\n \\"BornTimestamp\\": 1570761026630,\\n \\"BodyCRC\\": 914112295,\\n \\"BornHost\\": \\"42.120.**.**:64646\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsMessageGetByMsgIdResponse>\\n<Data>\\n <MsgId>1E0578FE110F18B4AAC235C0C8460BA2</MsgId>\\n <InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>\\n <ReconsumeTimes>1</ReconsumeTimes>\\n <BornHost>42.120.**.**:64646</BornHost>\\n <BodyCRC>914112295</BodyCRC>\\n <StoreHost>11.220.***.***:10911</StoreHost>\\n <StoreTimestamp>1570761026708</StoreTimestamp>\\n <BornTimestamp>1570761026630</BornTimestamp>\\n <Topic>test-mq_topic</Topic>\\n <StoreSize>407</StoreSize>\\n <PropertyList>\\n <MessageProperty>\\n <Name>TAGS</Name>\\n <Value>TagA</Value>\\n </MessageProperty>\\n </PropertyList>\\n</Data>\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\n</OnsMessageGetByMsgIdResponse>","errorExample":""}]',
- 'title' => '通过MsgId查询消息',
- 'summary' => '通过传入 Message ID 查询指定消息的信息以及判断该指定的消息是否曾被消费过。',
+ 'title' => '查询Group ID客户端连接情况',
+ 'summary' => '查询指定 Group ID 下当前客户端的连接情况。',
'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
."\n"
- .'- 如遇消息消费有问题,则可通过该接口查询具体发送的消息内容来排查问题。'."\n"
- ."\n"
- .'- 根据Message ID查询消息的方式属于精确查询,查询条件需要的Message ID从每次消息发送成功的SendResult中获取,因此业务方必须存储每次发送消息的结果。查询到的信息包括发送时间、存储服务器和消息的Key和Tag等属性。',
+ .'本接口一般用于在消费异常情况下,获取指定Group ID下客户端的连接信息,通过查看消费者状态初步诊断原因。',
+ 'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsMessageGetByMsgId**接口,您还可以通过消息队列RocketMQ版控制台查看消息的详细信息。具体操作,请参见[消息查询](~~29540~~)。',
- ],
- 'OnsMessageGetByKey' => [
- 'methods' => [
- 'post',
- 'get',
+ .'除了调用**OnsConsumerGetConnection**接口,您还可以通过云消息队列 RocketMQ 版控制台查看指定Group ID下客户端的连接情况。具体操作,请参见[查看消费者状态](~~94312~~)。',
+ 'changeSet' => [
+ ['createdAt' => '2024-12-03T03:34:09.000Z', 'description' => '响应参数发生变更'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsConsumerGetConnection'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryConsumerConnection',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"DE4140C7-F42D-473D-A5FF-B1E31692****\\",\\n \\"Data\\": {\\n \\"ConnectionList\\": {\\n \\"ConnectionDo\\": [\\n {\\n \\"Version\\": \\"V4_3_6\\",\\n \\"ClientAddr\\": \\"30.5.121.**\\",\\n \\"Language\\": \\"JAVA\\",\\n \\"ClientId\\": \\"30.5.121.**@24813#-1999745829#-1737591554#453111174894656\\"\\n }\\n ]\\n },\\n \\"MessageModel\\": \\"\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsConsumerGetConnectionResponse>\\r\\n <Data>\\r\\n <ConnectionList>\\r\\n <ConnectionDo>\\r\\n <ClientAddr>30.5.121.**</ClientAddr>\\r\\n <Language>JAVA</Language>\\r\\n <Version>V4_3_6</Version>\\r\\n <ClientId>30.5.121.**@24813#-1999745829#-1737591554#453111174894656</ClientId>\\r\\n </ConnectionDo>\\r\\n </ConnectionList>\\r\\n </Data>\\r\\n <RequestId>DE4140C7-F42D-473D-A5FF-B1E31692****</RequestId>\\r\\n</OnsConsumerGetConnectionResponse>","errorExample":""}]',
+ ],
+ 'OnsConsumerResetOffset' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'read',
+ 'operationType' => 'readAndWrite',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
+ 'name' => 'GroupId',
+ 'in' => 'query',
+ 'schema' => ['description' => '需查询的消费端Group ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test_consumer_id'],
+ ],
+ [
'name' => 'Topic',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息的Topic。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'test-mq_topic',
- ],
+ 'schema' => ['description' => '需重置位点的Topic。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test-mq-topic'],
],
[
- 'name' => 'Key',
+ 'name' => 'Type',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息的Message Key。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'messageKey1',
- ],
+ 'schema' => ['description' => '消息清理类型。取值说明如下:'."\n"
+ ."\n"
+ .'- **0**:清除所有消息。该Group ID在消费该Topic下的消息时会跳过当前堆积(未被消费)的所有消息,从这之后发送的最新消息开始消费。'."\n"
+ .' '."\n"
+ .' 对于程序返回"reconsumeLater",即走重试流程的这部分消息来说,清除无效。'."\n"
+ .'- **1**:清理到指定时间。请指定一个时间点,这个时间点之后发送的消息才会被消费。'."\n"
+ .' '."\n"
+ .' 可选时间范围中的起始和终止时间分别是该Topic中储存的最早的和最晚的一条消息的生产时间。不能选择超过可选时间范围的时间点。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'example' => '1'],
+ ],
+ [
+ 'name' => 'ResetTimestamp',
+ 'in' => 'query',
+ 'schema' => ['description' => '重置位点到指定的时间戳,仅在**Type**为**1**时生效。单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1591153871000'],
],
[
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '需查询的Group ID所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => '返回结果。',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****',
- ],
- 'Data' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'OnsRestMessageDo' => [
- 'description' => '查询结果列表。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'StoreSize' => [
- 'description' => '消息大小。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '406',
- ],
- 'ReconsumeTimes' => [
- 'description' => '消息重试消费的次数。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1',
- ],
- 'StoreTimestamp' => [
- 'description' => '被Broker存储的时间戳。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570760999811',
- ],
- 'InstanceId' => [
- 'description' => '实例ID。',
- 'type' => 'string',
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
- 'MsgId' => [
- 'description' => '消息ID,即Message ID。',
- 'type' => 'string',
- 'example' => '1E0578FE110F18B4AAC235C05F2*****',
- ],
- 'StoreHost' => [
- 'description' => '存储该消息的服务器实例。',
- 'type' => 'string',
- 'example' => '11.193.***.***:10911',
- ],
- 'Topic' => [
- 'description' => '消息的Topic。',
- 'type' => 'string',
- 'example' => 'test-mq_topic',
- ],
- 'PropertyList' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'MessageProperty' => [
- 'description' => '消息属性列表。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Value' => [
- 'description' => '消息属性的取值。',
- 'type' => 'string',
- 'example' => 'TagA',
- ],
- 'Name' => [
- 'description' => '消息属性。取值说明如下:'."\n"
- ."\n"
- .'- **TRACE_ON**:是否有消息轨迹'."\n"
- .'- **KEYS**:消息的Key属性'."\n"
- .'- **TAGS**:消息的Tag属性'."\n"
- .'- **INSTANCE_ID**:消息所在的实例的ID'."\n"
- ."\n"
- .'更多概念信息请参见[名词解释](~~29533~~)。',
- 'type' => 'string',
- 'example' => 'TAGS',
- ],
- ],
- ],
- ],
- ],
- ],
- 'BornTimestamp' => [
- 'description' => '生成时间戳。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570760999721',
- ],
- 'BodyCRC' => [
- 'description' => '消息体CRC校验值。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '914112295',
- ],
- 'BornHost' => [
- 'description' => '生成该消息的客户端实例。',
- 'type' => 'string',
- 'example' => '42.120.***.***:59270',
- ],
- ],
- ],
- ],
- ],
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'D52C68F8-EC5D-4294-BFFF-1A6A25AF****'],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\",\\n \\"Data\\": {\\n \\"OnsRestMessageDo\\": [\\n {\\n \\"StoreSize\\": 406,\\n \\"ReconsumeTimes\\": 1,\\n \\"StoreTimestamp\\": 1570760999811,\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\",\\n \\"MsgId\\": \\"1E0578FE110F18B4AAC235C05F2*****\\",\\n \\"StoreHost\\": \\"11.193.***.***:10911\\",\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"PropertyList\\": {\\n \\"MessageProperty\\": [\\n {\\n \\"Value\\": \\"TagA\\",\\n \\"Name\\": \\"TAGS\\"\\n }\\n ]\\n },\\n \\"BornTimestamp\\": 1570760999721,\\n \\"BodyCRC\\": 914112295,\\n \\"BornHost\\": \\"42.120.***.***:59270\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsMessageGetByKeyResponse>\\n<Data>\\n <MsgId>1E0578FE110F18B4AAC235C05F2*****</MsgId>\\n <InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>\\n <ReconsumeTimes>1</ReconsumeTimes>\\n <BornHost>42.120.**.**:64646</BornHost>\\n <BodyCRC>914112295</BodyCRC>\\n <StoreHost>11.220.***.***:10911</StoreHost>\\n <StoreTimestamp>1570761026708</StoreTimestamp>\\n <BornTimestamp>1570761026630</BornTimestamp>\\n <Topic>test-mq_topic</Topic>\\n <StoreSize>407</StoreSize>\\n <PropertyList>\\n <MessageProperty>\\n <Name>TAGS</Name>\\n <Value>TagA</Value>\\n </MessageProperty>\\n </PropertyList>\\n</Data>\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\n</OnsMessageGetByKeyResponse>","errorExample":""}]',
- 'title' => '根据Message Key查询消息',
- 'summary' => '根据 Topic 和 Message Key 模糊查询消息信息列表。',
+ 'title' => '重置Group ID消费位点',
+ 'summary' => '重置指定的Group ID的消费位点到指定时间戳。',
'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
+ .'本接口一般用于清理堆积消息,或者回溯消费。有以下两种清理方式:'."\n"
."\n"
- .'- 使用本接口根据Message Key查询消息的方式属于模糊查询。由于业务方的Key可能不唯一,所以查询结果可能为多条。'."\n"
- ."\n"
- .'- 本接口用在业务方无法获取Message ID的场景,在该场景下的调用步骤如下所示:'."\n"
- ."\n"
- .' 1. 调用本接口模糊查询得到Message ID列表。'."\n"
+ .'- 清理所有消息'."\n"
."\n"
- .' 2. 调用**OnsMessageGetByMsgId**接口精确查询。**OnsMessageGetByMsgId**接口的详细信息,请参见[OnsMessageGetByMsgId](~~29607~~)。',
+ .'- 清理消费进度到指定的时间',
+ 'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsMessageGetByKey**接口,您还可以通过云消息队列 RocketMQ 版控制台查看消息的详细信息。具体操作,请参见[消息查询](~~29540~~)。',
- ],
- 'OnsMessagePageQueryByTopic' => [
- 'summary' => '分页查询指定时间段内指定Topic内存在的所有消息。',
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ .'除了调用**OnsConsumerResetOffset**接口,您还可以通过云消息队列 RocketMQ 版控制台重置指定Group ID的消费位点。具体操作,请参见[重置消费位点](~~63390~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsConsumerResetOffset'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:ResetConsumerOffset',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"D52C68F8-EC5D-4294-BFFF-1A6A25AF****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsConsumerResetOffsetResponse>\\r\\n <RequestId>D52C68F8-EC5D-4294-BFFF-1A6A25AF****</RequestId>\\r\\n</OnsConsumerResetOffsetResponse>","errorExample":""}]',
+ ],
+ 'OnsConsumerStatus' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -706,251 +557,287 @@
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ 'abilityTreeNodes' => ['FEATUREons0MOUAZ'],
],
'parameters' => [
[
- 'name' => 'Topic',
- 'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息的Topic名称。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'test-mq_topic',
- ],
- ],
- [
- 'name' => 'BeginTime',
- 'in' => 'query',
- 'schema' => [
- 'description' => '查询范围的起始时间戳,单位:毫秒。'."\n"
- .'通过**TaskId**进行后续取消息时,该参数设置的值不生效,默认以第一次查询时输入的起始时间为准。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '1570723200000',
- ],
- ],
- [
- 'name' => 'EndTime',
- 'in' => 'query',
- 'schema' => [
- 'description' => '查询范围的终止时间戳,单位:毫秒。'."\n"
- .'通过**TaskId**进行后续取消息时,该参数设置的值不生效,默认以第一次查询时输入的终止时间为准。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '1570809600000',
- ],
- ],
- [
- 'name' => 'TaskId',
+ 'name' => 'GroupId',
'in' => 'query',
- 'schema' => [
- 'description' => '查询任务的ID,首次查询不需要输入,后续取消息必须传入,根据前一次的返回结果取出该字段。',
- 'type' => 'string',
- 'required' => false,
- 'example' => '0BC1310300002A9F000021E4D7A48346',
- ],
+ 'schema' => ['description' => '需要查询的消费端Group ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test_group_id'],
],
[
- 'name' => 'CurrentPage',
+ 'name' => 'Detail',
'in' => 'query',
- 'schema' => [
- 'description' => '当前取第几页消息,从1开始递增,最大值为50,取消息时不可超过最大页数。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '2',
- ],
+ 'schema' => ['description' => '是否查询详细信息。取值说明如下:'."\n"
+ ."\n"
+ .'- **true**:要查询详细信息,即可获取返回参数**ConsumerConnectionInfoList**和**DetailInTopicList**信息。'."\n"
+ ."\n"
+ .'- **false**:默认值,不查询详细信息,即返回参数**ConsumerConnectionInfoList**和**DetailInTopicList**为空。', 'type' => 'boolean', 'required' => false, 'example' => 'true'],
],
[
- 'name' => 'PageSize',
+ 'name' => 'NeedJstack',
'in' => 'query',
- 'schema' => [
- 'description' => '分页查询,每页最多显示的消息数量,默认是20,最小5条,最多50条。'."\n"
- .'通过**TaskId**进行后续取消息时,该参数设置的值不生效,默认以第一次查询时输入的每页消息数量为准。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'required' => false,
- 'example' => '5',
- ],
+ 'schema' => ['description' => '是否打印Jstack信息。取值说明如下:'."\n"
+ .'- **true**:要打印Jstack信息,可在**Jstack**返回参数中获取堆栈信息。'."\n"
+ .' >如需打印Jstack信息,请确保您的入参**Detail**设置为**true**。'."\n"
+ ."\n"
+ .'- **false**:默认值,不打印Jstack信息,**Jstack**返回参数为空。'."\n", 'type' => 'boolean', 'required' => false, 'example' => 'true'],
],
[
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '需查询的Group ID所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => '查询结果。',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '5DC2A47E-2B31-4722-96C8-FA59C9*****',
- ],
- 'MsgFoundDo' => [
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '10EDC518-10E7-4B34-92FB-171235FA****'],
+ 'Data' => [
'description' => '查询结果。',
'type' => 'object',
'properties' => [
- 'CurrentPage' => [
- 'description' => '当前位于第几页。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1',
+ 'ConsumeTps' => ['description' => '总消费TPS。', 'type' => 'number', 'format' => 'float', 'example' => '0'],
+ 'ConsumeModel' => ['description' => '消费模型。取值说明如下:'."\n"
+ ."\n"
+ .'- **CLUSTERING**:集群消费模式'."\n"
+ ."\n"
+ .'- **BROADCASTING**:广播消费模式'."\n"
+ ."\n"
+ .'两种订阅模式的详细信息,请参见[集群消费和广播消费](~~43163~~)。', 'type' => 'string', 'example' => 'CLUSTERING'],
+ 'ConnectionSet' => [
+ 'type' => 'object',
+ 'itemNode' => true,
+ 'properties' => [
+ 'ConnectionDo' => [
+ 'description' => '该集群当前在线客户端信息。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'RemoteIP' => ['description' => '宿主机IP地址或公网IP地址。', 'type' => 'string', 'example' => '42.120.74.**'],
+ 'Version' => ['description' => '消费端版本。', 'type' => 'string', 'example' => 'V4_3_6_SNAPSHOT'],
+ 'ClientAddr' => ['description' => '该消费实例的地址和端口。', 'type' => 'string', 'example' => '30.5.121.**'],
+ 'Language' => ['description' => '消费端语言。', 'type' => 'string', 'example' => 'JAVA'],
+ 'ClientId' => ['description' => '消费实例的ID。', 'type' => 'string', 'example' => '30.5.121.**@25560#-1999745829#-1737591554#458773089270275'],
+ 'Diff' => ['type' => 'integer', 'format' => 'int64', 'example' => '100'],
+ ],
+ 'description' => '',
+ ],
+ ],
+ ],
+ 'description' => '',
],
- 'MsgFoundList' => [
+ 'TotalDiff' => ['description' => '集群总的消费堆积。', 'type' => 'integer', 'format' => 'int64', 'example' => '197'],
+ 'ConsumerConnectionInfoList' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
- 'OnsRestMessageDo' => [
- 'description' => '当前页的消息集合,该类型与[OnsMessageGetByMsgId](~~29607~~)的返回结果一致。',
+ 'ConsumerConnectionInfoDo' => [
+ 'description' => '该集群在线客户端详细信息,包含Jstack、消费RT时间等信息。如需获取详细信息,请确保将**Detail**请求参数设置为**true**。否则返回值为空。',
'type' => 'array',
'items' => [
+ 'description' => 'test,此内容不推送到icms',
'type' => 'object',
'properties' => [
- 'StoreSize' => [
- 'description' => '消息大小。单位:KB。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '406',
- ],
- 'ReconsumeTimes' => [
- 'description' => '消息重试消费的次数。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1',
- ],
- 'StoreTimestamp' => [
- 'description' => '消息被服务端存储的时间戳,单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570760999811',
- ],
- 'InstanceId' => [
- 'description' => '实例ID。',
- 'type' => 'string',
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
- 'MsgId' => [
- 'description' => '消息ID,即Message ID。',
- 'type' => 'string',
- 'example' => '1E0578FE110F18B4AAC235C05F2*****',
- ],
- 'StoreHost' => [
- 'description' => '存储该消息的服务器实例。',
- 'type' => 'string',
- 'example' => '11.193.***.***:10911',
- ],
- 'Topic' => [
- 'description' => '消息的Topic。',
- 'type' => 'string',
- 'example' => 'test-mq_topic',
+ 'ConsumeModel' => ['description' => '消费模型。取值说明如下:'."\n"
+ ."\n"
+ .'- **CLUSTERING**:集群消费模式'."\n"
+ ."\n"
+ .'- **BROADCASTING**:广播消费模式'."\n"
+ ."\n"
+ .'两种订阅模式的详细信息,请参见[集群消费和广播消费](~~43163~~)。', 'type' => 'string', 'example' => 'CLUSTERING'],
+ 'RunningDataList' => [
+ 'type' => 'object',
+ 'itemNode' => true,
+ 'properties' => [
+ 'ConsumerRunningDataDo' => [
+ 'description' => '实时状态统计。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Rt' => ['description' => '消费RT时间,单位:毫秒。', 'type' => 'number', 'format' => 'float', 'example' => '0'],
+ 'Topic' => ['description' => '订阅的Topic名称。', 'type' => 'string', 'example' => 'test-mq_topic'],
+ 'FailedCountPerHour' => ['description' => '每小时内消费失败的消息数统计。', 'type' => 'integer', 'format' => 'int64', 'example' => '0'],
+ 'OkTps' => ['description' => '消费消息成功的TPS统计。', 'type' => 'number', 'format' => 'float', 'example' => '0'],
+ 'FailedTps' => ['description' => '消费消息失败的TPS统计。', 'type' => 'number', 'format' => 'float', 'example' => '0'],
+ ],
+ 'description' => '',
+ ],
+ ],
+ ],
+ 'description' => '',
],
- 'PropertyList' => [
+ 'SubscriptionSet' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
- 'MessageProperty' => [
- 'description' => '消息属性列表。',
+ 'SubscriptionData' => [
+ 'description' => '订阅关系集合。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
- 'Value' => [
- 'description' => '消息属性的取值。',
- 'type' => 'string',
- 'example' => 'TagA',
- ],
- 'Name' => [
- 'description' => '消息属性。取值说明如下:'."\n"
- ."\n"
- .'- **TRACE_ON**:是否有消息轨迹。'."\n"
- .'- **KEYS**:消息的Key属性。'."\n"
- .'- **TAGS**:消息的Tag属性。'."\n"
- .'- **INSTANCE_ID**:消息所在的实例的ID。'."\n"
- ."\n"
- .'更多概念信息,请参见[名词解释](~~29533~~)。',
- 'type' => 'string',
- 'example' => 'TAGS',
+ 'SubString' => ['description' => '订阅该Topic的子类别Tag表达式。', 'type' => 'string', 'example' => '*'],
+ 'SubVersion' => ['description' => '订阅关系版本号,为自增Long型。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570701364301'],
+ 'Topic' => ['description' => '订阅的Topic名称。', 'type' => 'string', 'example' => 'test-mq_topic'],
+ 'TagsSet' => [
+ 'type' => 'object',
+ 'itemNode' => true,
+ 'properties' => [
+ 'Tag' => [
+ 'description' => '订阅的Tag集合。',
+ 'type' => 'array',
+ 'items' => ['description' => '订阅的Tag集合。', 'type' => 'string', 'example' => 'ff'],
+ ],
+ ],
+ 'description' => '',
],
],
+ 'description' => '',
],
],
],
+ 'description' => '',
],
- 'BornTimestamp' => [
- 'description' => '消息生成的时间戳,单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570760999721',
- ],
- 'BodyCRC' => [
- 'description' => '消息体CRC校验值。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '914112295',
- ],
- 'BornHost' => [
- 'description' => '生成该消息的客户端实例。',
- 'type' => 'string',
- 'example' => '42.120.***.***:59270',
+ 'Jstack' => [
+ 'type' => 'object',
+ 'itemNode' => true,
+ 'properties' => [
+ 'ThreadTrackDo' => [
+ 'description' => 'Jstack堆栈信息。如需获取Jstack信息,请确保将**NeedJstack**入参设置为**true**。否则返回值为空。',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => 'test——此内容不发布icms',
+ 'type' => 'object',
+ 'properties' => [
+ 'TrackList' => [
+ 'type' => 'object',
+ 'itemNode' => true,
+ 'properties' => [
+ 'Track' => [
+ 'description' => 'Jstack堆栈信息字符串。',
+ 'type' => 'array',
+ 'items' => ['description' => 'Jstack堆栈信息字符串。', 'type' => 'string', 'example' => 'TID: 52 STATE: WAITING'],
+ ],
+ ],
+ 'description' => '',
+ ],
+ 'Thread' => ['description' => '线程名称。', 'type' => 'string', 'example' => 'ConsumeMessageThread_0'],
+ ],
+ ],
+ ],
+ ],
+ 'description' => '',
],
+ 'LastTimeStamp' => ['description' => '最后消费时间。'."\n"
+ ."\n"
+ .'该参数值的格式为毫秒级Unix时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570701368114'],
+ 'StartTimeStamp' => ['description' => '消费开始时间。'."\n"
+ ."\n"
+ .'该参数值的格式为毫秒级Unix时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570701361528'],
+ 'Language' => ['description' => '客户端语言。', 'type' => 'string', 'example' => 'JAVA'],
+ 'ClientId' => ['description' => '消费实例的ID。', 'type' => 'string', 'example' => '30.5.**.**@25560#-1999745829#-1737591554#458773089270275'],
+ 'Connection' => ['description' => '连接信息。', 'type' => 'string', 'example' => '**'],
+ 'Version' => ['description' => '客户端版本号。', 'type' => 'string', 'example' => 'V4_3_6'],
+ 'ConsumeType' => ['description' => '消费者消费消息的模式。取值说明如下:'."\n"
+ .'- **PUSH**:云消息队列 RocketMQ 版服务端主动向消费者推送消息。'."\n"
+ .'- **PULL**:消费者主动向云消息队列 RocketMQ 版服务端拉取消息。', 'type' => 'string', 'example' => 'PUSH'],
+ 'ThreadCount' => ['description' => '消费线程数。', 'type' => 'integer', 'format' => 'int32', 'example' => '20'],
],
],
],
],
+ 'description' => '',
],
- 'MaxPageCount' => [
- 'description' => '查询结果最大页数。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '400',
- ],
- 'TaskId' => [
- 'description' => '第一次新建查询时,返回的查询任务ID,用于后续取消息。',
- 'type' => 'string',
- 'example' => '0BC1310300002A9F000021E4D7A48346',
+ 'InstanceId' => ['description' => '实例ID。', 'type' => 'string', 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
+ 'DetailInTopicList' => [
+ 'type' => 'object',
+ 'itemNode' => true,
+ 'properties' => [
+ 'DetailInTopicDo' => [
+ 'description' => '各个Topic的消费情况。如需获取详细信息,请确保将**Detail**请求参数设置为**true**。否则返回值为空。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'DelayTime' => ['description' => '指定Topic的消费延迟时间。单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '0'],
+ 'TotalDiff' => ['description' => '该Topic消费总堆积数。', 'type' => 'integer', 'format' => 'int64', 'example' => '0'],
+ 'LastTimestamp' => ['description' => '最后消费时间。'."\n"
+ ."\n"
+ .'该参数值的格式为毫秒级Unix时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570701259403'],
+ 'Topic' => ['description' => 'Topic名称。', 'type' => 'string', 'example' => 'test-mq_topic'],
+ ],
+ 'description' => '',
+ ],
+ ],
+ ],
+ 'description' => '',
],
+ 'SubscriptionSame' => ['description' => '订阅关系是否一致。', 'type' => 'boolean', 'example' => 'true'],
+ 'DelayTime' => ['description' => '指定Group ID所订阅的所有Topic中的最大消费延时时间。单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '100857'],
+ 'LastTimestamp' => ['description' => '最后消费时间。'."\n"
+ ."\n"
+ .'该参数值的格式为毫秒级Unix时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1566883844954'],
+ 'Online' => ['description' => '是否在线。', 'type' => 'boolean', 'example' => 'true'],
+ 'RebalanceOK' => ['description' => '客户端Rebalance是否正常。取值说明如下:'."\n"
+ ."\n"
+ .'- **true**:正常'."\n"
+ ."\n"
+ .'- **false**:不正常', 'type' => 'boolean', 'example' => 'true'],
],
],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"5DC2A47E-2B31-4722-96C8-FA59C9*****\\",\\n \\"MsgFoundDo\\": {\\n \\"CurrentPage\\": 1,\\n \\"MsgFoundList\\": {\\n \\"OnsRestMessageDo\\": [\\n {\\n \\"StoreSize\\": 406,\\n \\"ReconsumeTimes\\": 1,\\n \\"StoreTimestamp\\": 1570760999811,\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\",\\n \\"MsgId\\": \\"1E0578FE110F18B4AAC235C05F2*****\\",\\n \\"StoreHost\\": \\"11.193.***.***:10911\\",\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"PropertyList\\": {\\n \\"MessageProperty\\": [\\n {\\n \\"Value\\": \\"TagA\\",\\n \\"Name\\": \\"TAGS\\"\\n }\\n ]\\n },\\n \\"BornTimestamp\\": 1570760999721,\\n \\"BodyCRC\\": 914112295,\\n \\"BornHost\\": \\"42.120.***.***:59270\\"\\n }\\n ]\\n },\\n \\"MaxPageCount\\": 400,\\n \\"TaskId\\": \\"0BC1310300002A9F000021E4D7A48346\\"\\n }\\n}","type":"json"}]',
- 'title' => '查询Topic内所有消息',
+ 'title' => '查询Group ID消费状态',
+ 'summary' => '查询指定Group ID详细状态数据:订阅关系检查、消费TPS统计、负载均衡状态、消费端连接。',
'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
."\n"
- .'- 按Topic查询消息的方式属于范围查询,查询结果会通过分页的方式展示给调用方,仅适用于没有任何搜索条件(Message ID和Message Key)的查询场景。'."\n"
- .'- 根据Topic查询消息应尽可能缩短查询的时间区间,否则匹配的消息过多,将无法定位问题。调用流程如下所示:'."\n"
- .' '."\n"
- .' 1. 传入Topic、起止时间以及每页的消息数量,进行分页查询。如果有消息,默认返回第一页的消息、总页数和查询任务ID。 '."\n"
- .' 2. 根据返回的结果中的查询任务ID,进行后续取消息,取消息时传入查询任务ID以及当前页数。此时输入的起止时间和每页消息数量不生效,默认以第一次查询时输入的参数值为准。',
+ .'- 本接口一般用于在粗略判断消费堆积以及客户端在线状态后,需要排查消费异常原因的场景。可以根据返回结果判断出指定Group ID的订阅关系是否一致、负载均衡是否正常以及获取在线客户端的Jstack信息等。'."\n"
+ .'- 使用本接口需要调用大量后端接口以完成数据聚合,因此查询速度慢,不建议频繁调用。'."\n",
+ 'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
- ],
- 'OnsMessageDetail' => [
- 'summary' => '调用OnsMessageDetail查询某条消息的具体信息。',
- 'methods' => [
- 'get',
+ 'extraInfo' => '## 控制台操作'."\n"
+ .'除了调用**OnsConsumerStatus**接口,您还可以通过云消息队列 RocketMQ 版控制台查看Group ID的详细数据。具体操作,请参见[查看消费者状态](~~94312~~)。',
+ 'changeSet' => [
+ ['createdAt' => '2023-12-08T03:11:50.000Z', 'description' => '响应参数发生变更'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsConsumerStatus'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryConsumerStatus',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"10EDC518-10E7-4B34-92FB-171235FA****\\",\\n \\"Data\\": {\\n \\"ConsumeTps\\": 0,\\n \\"ConsumeModel\\": \\"CLUSTERING\\",\\n \\"ConnectionSet\\": {\\n \\"ConnectionDo\\": [\\n {\\n \\"RemoteIP\\": \\"42.120.74.**\\",\\n \\"Version\\": \\"V4_3_6_SNAPSHOT\\",\\n \\"ClientAddr\\": \\"30.5.121.**\\",\\n \\"Language\\": \\"JAVA\\",\\n \\"ClientId\\": \\"30.5.121.**@25560#-1999745829#-1737591554#458773089270275\\",\\n \\"Diff\\": 100\\n }\\n ]\\n },\\n \\"TotalDiff\\": 197,\\n \\"ConsumerConnectionInfoList\\": {\\n \\"ConsumerConnectionInfoDo\\": [\\n {\\n \\"ConsumeModel\\": \\"CLUSTERING\\",\\n \\"RunningDataList\\": {\\n \\"ConsumerRunningDataDo\\": [\\n {\\n \\"Rt\\": 0,\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"FailedCountPerHour\\": 0,\\n \\"OkTps\\": 0,\\n \\"FailedTps\\": 0\\n }\\n ]\\n },\\n \\"SubscriptionSet\\": {\\n \\"SubscriptionData\\": [\\n {\\n \\"SubString\\": \\"*\\",\\n \\"SubVersion\\": 1570701364301,\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"TagsSet\\": {\\n \\"Tag\\": [\\n \\"ff\\"\\n ]\\n }\\n }\\n ]\\n },\\n \\"Jstack\\": {\\n \\"ThreadTrackDo\\": [\\n {\\n \\"TrackList\\": {\\n \\"Track\\": [\\n \\"TID: 52 STATE: WAITING\\"\\n ]\\n },\\n \\"Thread\\": \\"ConsumeMessageThread_0\\"\\n }\\n ]\\n },\\n \\"LastTimeStamp\\": 1570701368114,\\n \\"StartTimeStamp\\": 1570701361528,\\n \\"Language\\": \\"JAVA\\",\\n \\"ClientId\\": \\"30.5.**.**@25560#-1999745829#-1737591554#458773089270275\\",\\n \\"Connection\\": \\"**\\",\\n \\"Version\\": \\"V4_3_6\\",\\n \\"ConsumeType\\": \\"PUSH\\",\\n \\"ThreadCount\\": 20\\n }\\n ]\\n },\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\",\\n \\"DetailInTopicList\\": {\\n \\"DetailInTopicDo\\": [\\n {\\n \\"DelayTime\\": 0,\\n \\"TotalDiff\\": 0,\\n \\"LastTimestamp\\": 1570701259403,\\n \\"Topic\\": \\"test-mq_topic\\"\\n }\\n ]\\n },\\n \\"SubscriptionSame\\": true,\\n \\"DelayTime\\": 100857,\\n \\"LastTimestamp\\": 1566883844954,\\n \\"Online\\": true,\\n \\"RebalanceOK\\": true\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsConsumerStatusResponse>\\n<data>\\n <connectionSet>\\n <bizVersion>V4_3_6</bizVersion>\\n <clientAddr>30.5.***.*</clientAddr>\\n <clientId>30.5.***.*@97730#-1999745829#-1737591554#729272961762836</clientId>\\n <language>JAVA</language>\\n <version>V4_3_6</version>\\n </connectionSet>\\n <consumeModel>CLUSTERING</consumeModel>\\n <consumeTps>0</consumeTps>\\n <consumerConnectionInfoList>\\n <bizVersion>V4_3_6</bizVersion>\\n <clientId>30.5.***.*@97730#-1999745829#-1737591554#729272961762836</clientId>\\n <consumeType>PUSH</consumeType>\\n <jstack>\\n <thread>ConsumeMessageThread_4</thread>\\n <trackList>TID: 44 STATE: WAITING</trackList>\\n <trackList>sun.misc.Unsafe.park(Native Method)</trackList>\\n <trackList>java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)</trackList>\\n <trackList>java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)</trackList>\\n <trackList>java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)</trackList>\\n <trackList>java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)</trackList>\\n <trackList>java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)</trackList>\\n <trackList>java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)</trackList>\\n <trackList>java.lang.Thread.run(Thread.java:748)</trackList>\\n </jstack>\\n <language>JAVA</language>\\n <lastTimeStamp>1570701368114</lastTimeStamp>\\n <runningDataList>\\n <failedCountPerHour>0</failedCountPerHour>\\n <failedTps>0</failedTps>\\n <okTps>0</okTps>\\n <rt>0</rt>\\n <topic>test-mq_topic</topic>\\n </runningDataList>\\n <startTimeStamp>1570701361528</startTimeStamp>\\n <subscriptionSet>\\n <subString>*</subString>\\n <subVersion>1570701364301</subVersion>\\n <topic>test-mq_topic</topic>\\n </subscriptionSet>\\n <threadCount>20</threadCount>\\n <version>V4_3_6</version>\\n </consumerConnectionInfoList>\\n <delayTime>0</delayTime>\\n <detailInTopicList>\\n <delayTime>0</delayTime>\\n <lastTimestamp>1570701259403</lastTimestamp>\\n <topic>test-mq_topic</topic>\\n <totalDiff>0</totalDiff>\\n </detailInTopicList>\\n <instanceId>MQ_INST_111111111111_DOxxxxxx</instanceId>\\n <lastTimestamp>1570701368114</lastTimestamp>\\n <online>true</online>\\n <rebalanceOK>true</rebalanceOK>\\n <subscriptionSame>true</subscriptionSame>\\n <totalDiff>0</totalDiff>\\n</data>\\n<requestId>10EDC518-10E7-4B34-92FB-171235FA****</requestId>\\n</OnsConsumerStatusResponse>","errorExample":""}]',
+ ],
+ 'OnsConsumerTimeSpan' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -958,174 +845,82 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
- 'name' => 'InstanceId',
+ 'name' => 'GroupId',
'in' => 'query',
- 'schema' => [
- 'description' => '云消息队列 RocketMQ 版实例ID。',
- 'type' => 'string',
- 'required' => true,
- 'enumValueTitles' => [],
- 'example' => 'MQ_INST_184681981******_BXig0x6A',
- ],
+ 'schema' => ['description' => '需查询的消费端Group ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test_group_id'],
],
[
'name' => 'Topic',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息的Topic名称。',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'test-mq_topic',
- ],
+ 'schema' => ['description' => '需查询的消费端Group ID订阅的Topic。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test-mq_topic'],
],
[
- 'name' => 'MsgId',
+ 'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息的ID,即Message ID。',
- 'type' => 'string',
- 'required' => true,
- 'example' => '1E0578FE110F18B4AAC235C0******',
- ],
+ 'schema' => ['description' => '需查询的消费端Group ID所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
],
'responses' => [
200 => [
- 'headers' => [],
'schema' => [
- 'title' => 'Schema of Response',
- 'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'title' => 'Id of the request',
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'EAE5BE23-37A1-4354-94D6-E44AE17E****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****'],
'Data' => [
'description' => '查询结果。',
'type' => 'object',
'properties' => [
- 'StoreSize' => [
- 'description' => '消息大小。单位:KB。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '2',
- ],
- 'ReconsumeTimes' => [
- 'description' => '消息重试消费的次数。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '0',
- ],
- 'StoreTimestamp' => [
- 'description' => '消息被服务端存储的时间戳。单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570761026708',
- ],
- 'Body' => [
- 'description' => '消息体内容经过Base 64算法加密后的字符串。',
- 'type' => 'string',
- 'example' => 'aGVsbG8=',
- ],
- 'InstanceId' => [
- 'description' => '云消息队列 RocketMQ 版实例ID。',
- 'type' => 'string',
- 'example' => 'MQ_INST_184681981******_BXig0x6A',
- ],
- 'MsgId' => [
- 'description' => '消息ID,即Message ID。',
- 'type' => 'string',
- 'example' => '1E0578FE110F18B4AAC235C05F2*****',
- ],
- 'StoreHost' => [
- 'description' => '存储该消息的服务器实例。',
- 'type' => 'string',
- 'example' => '11.220.***.***:10911',
- ],
- 'Topic' => [
- 'description' => '消息所属的Topic。',
- 'type' => 'string',
- 'example' => 'test-mq_topic',
- ],
- 'PropertyList' => [
- 'description' => '消息属性列表。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Value' => [
- 'description' => '消息属性的取值。',
- 'type' => 'string',
- 'example' => 'MSG_REGION',
- ],
- 'Name' => [
- 'description' => '消息属性。取值说明如下:'."\n"
- ."\n"
- .'- **TRACE_ON**:是否有消息轨迹。'."\n"
- .'- **MSG_REGION**:消息的Topic所属实例的地域ID。'."\n"
- .'- **\\_\\_MESSAGE\\_DECODED\\_TIME**:消息被解码的时间。'."\n"
- .'- **\\_\\_BORNHOST**:消息生产者客户端的IP地址。'."\n"
- .'- **UNIQ_KEY**:消息的唯一标识,即Message ID。'."\n"
- ."\n"
- .'更多概念信息请参见[名词解释](~~29533~~)。',
- 'type' => 'string',
- 'example' => 'cn-hangzhou',
- ],
- ],
- ],
- ],
- 'BornTimestamp' => [
- 'description' => '消息生成的时间戳。单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570761026630',
- ],
- 'BodyCRC' => [
- 'description' => '消息体CRC校验值。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '907060870',
- ],
- 'BornHost' => [
- 'description' => '生成该消息的客户端实例。',
- 'type' => 'string',
- 'example' => '42.120.**.**:64646',
- ],
- 'BodyStr' => [
- 'description' => '消息体内容。',
- 'type' => 'string',
- 'example' => 'hello',
- ],
+ 'MaxTimeStamp' => ['description' => '整个Topic目前最新存储的消息的生产时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570761026804'],
+ 'ConsumeTimeStamp' => ['description' => '当前Group消费该Topic的最新时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570761026400'],
+ 'Topic' => ['description' => '需查询的Topic。', 'type' => 'string', 'example' => 'test-mq_topic'],
+ 'MinTimeStamp' => ['description' => '整个Topic目前最早存储的消息的生产时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570701231122'],
+ 'InstanceId' => ['description' => '需查询的消费端Group ID所对应的实例ID。', 'type' => 'string', 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
],
],
+ 'description' => '',
],
],
],
- 'staticInfo' => [
- 'returnType' => 'synchronous',
+ 'title' => '查询Topic可重置时间范围',
+ 'summary' => '查询Topic可重置的时间范围,即该Topic中储存的最早的和最晚的消息的生产时间。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
+ .'使用本接口可以查询某个Topic在当前服务器上存储的最早和最晚的一条消息的时间,以及查询消费端最近消费的时间。本接口一般用于展示消费进度的概况,和**OnsConsumerAccumulate**接口配合使用。',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => ' ',
+ 'extraInfo' => ' ',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsConsumerTimeSpan'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryConsumerTimeSpan',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
- 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"EAE5BE23-37A1-4354-94D6-E44AE17E****\\",\\n \\"Data\\": {\\n \\"StoreSize\\": 2,\\n \\"ReconsumeTimes\\": 0,\\n \\"StoreTimestamp\\": 1570761026708,\\n \\"Body\\": \\"aGVsbG8=\\",\\n \\"InstanceId\\": \\"MQ_INST_184681981******_BXig0x6A\\",\\n \\"MsgId\\": \\"1E0578FE110F18B4AAC235C05F2*****\\",\\n \\"StoreHost\\": \\"11.220.***.***:10911\\",\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"PropertyList\\": [\\n {\\n \\"Value\\": \\"MSG_REGION\\",\\n \\"Name\\": \\"cn-hangzhou\\"\\n }\\n ],\\n \\"BornTimestamp\\": 1570761026630,\\n \\"BodyCRC\\": 907060870,\\n \\"BornHost\\": \\"42.120.**.**:64646\\",\\n \\"BodyStr\\": \\"hello\\"\\n }\\n}","type":"json"}]',
- 'title' => '查询消息详细信息',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>',
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\",\\n \\"Data\\": {\\n \\"MaxTimeStamp\\": 1570761026804,\\n \\"ConsumeTimeStamp\\": 1570761026400,\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"MinTimeStamp\\": 1570701231122,\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsConsumerTimeSpanResponse>\\n<Data>\\n <MinTimeStamp>1570701231122</MinTimeStamp>\\n <ConsumeTimeStamp>1570761026400</ConsumeTimeStamp>\\n <InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>\\n <Topic>test-mq_topic</Topic>\\n <MaxTimeStamp>1570761026804</MaxTimeStamp>\\n</Data>\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\n</OnsConsumerTimeSpanResponse>","errorExample":""}]',
],
- 'OnsRegionList' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'OnsDLQMessageGetById' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -1133,216 +928,158 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'list',
+ 'systemTags' => ['operationType' => 'get'],
+ 'parameters' => [
+ [
+ 'name' => 'MsgId',
+ 'in' => 'query',
+ 'schema' => ['description' => '需查询的消息的ID,即Message ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '0BC16699165C03B925DB8A404E2D****'],
+ ],
+ [
+ 'name' => 'GroupId',
+ 'in' => 'query',
+ 'schema' => ['description' => '需查询的消费端Group ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test_group_id'],
+ ],
+ [
+ 'name' => 'InstanceId',
+ 'in' => 'query',
+ 'schema' => ['description' => '需查询消息所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
+ ],
],
- 'parameters' => [],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '72D14A84-45E5-4E01-A6DB-F63C4721****',
- ],
+ 'RequestId' => ['description' => '为公共参数,每个请求的ID都是唯一的。', 'type' => 'string', 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****'],
'Data' => [
+ 'description' => '查询结果。',
'type' => 'object',
- 'itemNode' => true,
'properties' => [
- 'RegionDo' => [
- 'description' => '查询结果。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'UpdateTime' => [
- 'description' => '更新时间。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1411623866000',
- ],
- 'RegionName' => [
- 'description' => '地域名称。',
- 'type' => 'string',
- 'example' => '华东1(杭州)',
- ],
- 'ChannelName' => [
- 'description' => '渠道名称。',
- 'type' => 'string',
- 'example' => 'ALIYUN',
- ],
- 'CreateTime' => [
- 'description' => '创建时间。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1411623866000',
- ],
- 'Id' => [
- 'description' => 'ID。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1',
- ],
- 'OnsRegionId' => [
- 'description' => '地域的ID。',
- 'type' => 'string',
- 'example' => 'cn-hangzhou',
+ 'StoreSize' => ['description' => '消息大小。单位:KB。', 'type' => 'integer', 'format' => 'int32', 'example' => '407'],
+ 'ReconsumeTimes' => ['description' => '消息重试消费的次数。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'],
+ 'StoreTimestamp' => ['description' => '消息被服务端存储的时间戳。单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570761026708'],
+ 'InstanceId' => ['description' => '实例ID。', 'type' => 'string', 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
+ 'MsgId' => ['description' => '消息ID。', 'type' => 'string', 'example' => '0BC16699165C03B925DB8A404E2D****'],
+ 'StoreHost' => ['description' => '存储该消息的服务器实例。', 'type' => 'string', 'example' => '11.220.***.***:10911'],
+ 'Topic' => ['description' => '消息的Topic。', 'type' => 'string', 'example' => 'test-mq_topic'],
+ 'PropertyList' => [
+ 'type' => 'object',
+ 'itemNode' => true,
+ 'properties' => [
+ 'MessageProperty' => [
+ 'description' => '消息属性列表。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Value' => ['description' => '消息属性的取值。', 'type' => 'string', 'example' => 'TagA'],
+ 'Name' => ['description' => '消息属性。取值说明如下:'."\n"
+ .'- **TRACE_ON**:是否有消息轨迹'."\n"
+ .'- **KEYS**:消息的Key属性'."\n"
+ .'- **TAGS**:消息的Tag属性'."\n"
+ .'- **INSTANCE_ID**:消息所在的实例的ID'."\n"
+ ."\n"
+ .'更多概念信息请参见[名词解释](~~29533~~)。', 'type' => 'string', 'example' => 'TAGS'],
+ ],
+ 'description' => '',
],
],
],
+ 'description' => '',
],
+ 'BornTimestamp' => ['description' => '消息生成的时间戳。单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570761026630'],
+ 'BodyCRC' => ['description' => '消息体CRC校验值。', 'type' => 'integer', 'format' => 'int32', 'example' => '914112295'],
+ 'BornHost' => ['description' => '生成该消息的生产者实例。', 'type' => 'string', 'example' => '42.120.**.**:64646'],
],
],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"72D14A84-45E5-4E01-A6DB-F63C4721****\\",\\n \\"Data\\": {\\n \\"RegionDo\\": [\\n {\\n \\"UpdateTime\\": 1411623866000,\\n \\"RegionName\\": \\"华东1(杭州)\\",\\n \\"ChannelName\\": \\"ALIYUN\\",\\n \\"CreateTime\\": 1411623866000,\\n \\"Id\\": 1,\\n \\"OnsRegionId\\": \\"cn-hangzhou\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsRegionListResponse>\\n<Data>\\n <RegionDo>\\n <RegionName>公网</RegionName>\\n <OnsRegionId>mq-internet-access</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>华北1(青岛)</RegionName>\\n <OnsRegionId>cn-qingdao</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>华南1(深圳)</RegionName>\\n <OnsRegionId>cn-shenzhen</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>华东1(杭州)</RegionName>\\n <OnsRegionId>cn-hangzhou</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>华北2(北京)</RegionName>\\n <OnsRegionId>cn-beijing</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>华东2(上海)</RegionName>\\n <OnsRegionId>cn-shanghai</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>西南1(成都)</RegionName>\\n <OnsRegionId>cn-chengdu</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>华北3(张家口)</RegionName>\\n <OnsRegionId>cn-zhangjiakou</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>华北5(呼和浩特)</RegionName>\\n <OnsRegionId>cn-huhehaote</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>中国(香港)</RegionName>\\n <OnsRegionId>cn-hongkong</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>新加坡</RegionName>\\n <OnsRegionId>ap-southeast-1</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>日本(东京)</RegionName>\\n <OnsRegionId>ap-northeast-1</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>马来西亚(吉隆坡)</RegionName>\\n <OnsRegionId>ap-southeast-3</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>印度(孟买)</RegionName>\\n <OnsRegionId>ap-south-1</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>阿联酋(迪拜)</RegionName>\\n <OnsRegionId>me-east-1</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>德国(法兰克福)</RegionName>\\n <OnsRegionId>eu-central-1</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>美国(硅谷)</RegionName>\\n <OnsRegionId>us-west-1</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>美国(弗吉尼亚)</RegionName>\\n <OnsRegionId>us-east-1</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>澳大利亚(悉尼)</RegionName>\\n <OnsRegionId>ap-southeast-2</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>英国(伦敦)</RegionName>\\n <OnsRegionId>eu-west-1</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>印度尼西亚(雅加达)</RegionName>\\n <OnsRegionId>ap-southeast-5</OnsRegionId>\\n </RegionDo>\\n</Data>\\n<RequestId>72D14A84-45E5-4E01-A6DB-F63C4721****</RequestId>\\n</OnsRegionListResponse>","errorExample":""}]',
- 'title' => '获取地域信息列表',
- 'summary' => '调用OnsRegionList获取云消息队列 RocketMQ 版目前开放服务的地域(Region)信息列表。',
+ 'title' => '根据Message ID查询死信消息',
+ 'summary' => '通过传入Message ID查询指定的死信消息。包括存储时间、消息体、Key和Tag。',
'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
- .'在您使用SDK接入云消息队列 RocketMQ 版服务并进行管控操作时,需要依次指定两个地域的信息,第二个地域的信息才是通过OnsRegionList接口获取。具体场景如下:'."\n"
- ."\n"
- .'- 将您的应用接入云消息队列 RocketMQ 版服务:根据您的应用的部署地域选择就近的API网关接入点,填写相应的**regionId**。该**regionId**实际上只用于接入阿里云OpenAPI网关,因为云消息队列 RocketMQ 版通过阿里云OpenAPI平台(即POP)来提供API服务。'."\n"
- ."\n"
- .'- 连接要进行管控操作的地域:指定您要对哪个地域的云消息队列 RocketMQ 版资源进行操作,填写该地域相应的ID。此时要填写的地域ID,可通过**OnsRegionList**接口获取。',
- 'requestParamsDescription' => ' ',
+ .'根据Message ID查询死信消息的方式属于精确查询。查询条件需要的Message ID从消息发送成功的SendResult中获取,或者从批量查询的接口中获取。查询到的信息包括死信消息的存储时间、消息体、Key和Tag等属性。',
'responseParamsDescription' => ' ',
- 'extraInfo' => ' ',
- ],
- 'OnsInstanceCreate' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ 'extraInfo' => '## 控制台操作'."\n"
+ .'除了调用**OnsDLQMessageGetById**接口,您还可以通过云消息队列 RocketMQ 版控制台查看死信消息。具体操作,请参见[死信队列](~~87277~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsDLQMessageGetById'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryDLQMessage',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\",\\n \\"Data\\": {\\n \\"StoreSize\\": 407,\\n \\"ReconsumeTimes\\": 1,\\n \\"StoreTimestamp\\": 1570761026708,\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\",\\n \\"MsgId\\": \\"0BC16699165C03B925DB8A404E2D****\\",\\n \\"StoreHost\\": \\"11.220.***.***:10911\\",\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"PropertyList\\": {\\n \\"MessageProperty\\": [\\n {\\n \\"Value\\": \\"TagA\\",\\n \\"Name\\": \\"TAGS\\"\\n }\\n ]\\n },\\n \\"BornTimestamp\\": 1570761026630,\\n \\"BodyCRC\\": 914112295,\\n \\"BornHost\\": \\"42.120.**.**:64646\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsDLQMessageGetByIdResponse>\\n<Data>\\n <MsgId>1E0578FE110F18B4AAC235C0C8460BA2</MsgId>\\n <InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>\\n <ReconsumeTimes>1</ReconsumeTimes>\\n <BornHost>42.120.**.**:64646</BornHost>\\n <BodyCRC>914112295</BodyCRC>\\n <StoreHost>11.220.***.***:10911</StoreHost>\\n <StoreTimestamp>1570761026708</StoreTimestamp>\\n <BornTimestamp>1570761026630</BornTimestamp>\\n <Topic>test-mq_topic</Topic>\\n <StoreSize>407</StoreSize>\\n <PropertyList>\\n <MessageProperty>\\n <Name>TRACE_ON</Name>\\n <Value>true</Value>\\n </MessageProperty>\\n <MessageProperty>\\n <Name>RETRY_TOPIC</Name>\\n <Value>MQ_INST_111111111111_DOxxxxxx%test-mq_topic</Value>\\n </MessageProperty>\\n <MessageProperty>\\n <Name>KEYS</Name>\\n <Value>ORDERID_993</Value>\\n </MessageProperty>\\n <MessageProperty>\\n <Name>UNIQ_KEY</Name>\\n <Value>1E0578FE110F18B4AAC235C0C84*****</Value>\\n </MessageProperty>\\n <MessageProperty>\\n <Name>WAIT</Name>\\n <Value>false</Value>\\n </MessageProperty>\\n <MessageProperty>\\n <Name>TAGS</Name>\\n <Value>TagA</Value>\\n </MessageProperty>\\n <MessageProperty>\\n <Name>INSTANCE_ID</Name>\\n <Value>MQ_INST_111111111111_DOxxxxxx</Value>\\n </MessageProperty>\\n </PropertyList>\\n</Data>\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\n</OnsDLQMessageGetByIdResponse>","errorExample":""}]',
+ ],
+ 'OnsDLQMessagePageQueryByGroupId' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'readAndWrite',
+ 'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'create',
- 'abilityTreeCode' => '14930',
- 'abilityTreeNodes' => [
- 'FEATUREonsWNMPZ3',
- ],
- 'tenantRelevance' => 'publicInformation',
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
- 'name' => 'Remark',
+ 'name' => 'GroupId',
'in' => 'query',
- 'schema' => [
- 'description' => '实例的描述信息。',
- 'type' => 'string',
- 'required' => false,
- 'example' => '备注说明',
- ],
+ 'schema' => ['description' => '需查询的消费端Group ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test_group_id'],
],
[
- 'name' => 'InstanceName',
+ 'name' => 'BeginTime',
'in' => 'query',
- 'schema' => [
- 'description' => '实例名称。取值说明如下:'."\n"
- .'- 实例名称在该实例所部署的地域下要唯一,不可重名。'."\n"
- ."\n"
- .'- 长度限制为3~64个字符,可以是中文、英文、数字、短划线(-)以及下划线(_)。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '测试实例',
- ],
+ 'schema' => ['description' => '查询范围的起始时间戳,单位:毫秒。'."\n"
+ .'通过**TaskId**进行后续取消息时,该参数设置的值不生效,默认以第一次查询时输入的起始时间为准。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'example' => '1570723200000'],
],
- ],
- 'responses' => [
- 200 => [
- 'schema' => [
- 'type' => 'object',
- 'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****',
- ],
- 'Data' => [
- 'description' => '返回结果。',
- 'type' => 'object',
- 'properties' => [
- 'InstanceId' => [
- 'description' => '创建的实例ID。',
- 'type' => 'string',
- 'example' => 'MQ_INST_188077086902****_BXSuW61e',
- ],
- 'InstanceType' => [
- 'description' => '创建的实例类型,取值说明如下:'."\n"
- ."\n"
- .'- **1**:标准版实例'."\n",
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1',
- ],
- ],
- ],
- ],
- ],
+ [
+ 'name' => 'EndTime',
+ 'in' => 'query',
+ 'schema' => ['description' => '查询范围的终止时间戳,单位:毫秒。'."\n"
+ .'通过**TaskId**进行后续取消息时,该参数设置的值不生效,默认以第一次查询时输入的终止时间为准。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'example' => '1570809600000'],
],
- ],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\",\\n \\"Data\\": {\\n \\"InstanceId\\": \\"MQ_INST_188077086902****_BXSuW61e\\",\\n \\"InstanceType\\": 1\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsInstanceCreateResponse>\\n<Data>\\n <InstanceId>MQ_INST_188077086902****_BXSuW61e</InstanceId>\\n <InstanceType>1</InstanceType>\\n</Data>\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\n</OnsInstanceCreateResponse>","errorExample":""}]',
- 'title' => '创建实例',
- 'summary' => '调用OnsInstanceCreate接口创建实例。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
- .'实例是用于云消息队列 RocketMQ 版服务的虚拟机资源,用来存储Topic和Group信息。该接口一般在新业务发布需要创建新的服务资源的情况下使用。'."\n"
- .' '."\n"
- .'该接口只支持创建标准版实例,不支持创建铂金版实例。云消息队列 RocketMQ 版控制台同时支持创建标准版实例和铂金版实例,具体操作,请参见[实例管理](~~200153~~)。',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
- 'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsInstanceCreate**接口,您还可以通过云消息队列 RocketMQ 版控制台创建实例。具体操作,请参见[实例管理](~~200153~~)。',
- ],
- 'OnsInstanceBaseInfo' => [
- 'summary' => '调用OnsInstanceBaseInfo接口查询实例基本信息和收发消息的接入点。',
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
- 'security' => [
[
- 'AK' => [],
+ 'name' => 'TaskId',
+ 'in' => 'query',
+ 'schema' => ['description' => '查询任务的ID,首次查询不需要输入,后续取消息必须传入,根据前一次的返回结果取出该字段。', 'type' => 'string', 'required' => false, 'example' => '0BC1310300002A9F000021E4D7A48346'],
],
- ],
- 'operationType' => 'read',
- 'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- 'riskType' => 'none',
- 'chargeType' => 'free',
- 'abilityTreeNodes' => [
- 'FEATUREonsHF2FLP',
+ [
+ 'name' => 'CurrentPage',
+ 'in' => 'query',
+ 'schema' => ['description' => '当前取第几页消息,从1开始递增,最大值为50,取消息时不可超过最大页数。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'example' => '2'],
+ ],
+ [
+ 'name' => 'PageSize',
+ 'in' => 'query',
+ 'schema' => ['description' => '分页查询,每页最多显示的消息数量,默认显示20条,最小5条,最多50条。'."\n"
+ .'通过**TaskId**进行后续取消息时,该参数设置的值不生效,默认以第一次查询时输入的每页消息数量为准。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '5'],
],
- ],
- 'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询实例的ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'MQ_INST_138015630679****_BAAy1Hac',
- ],
+ 'schema' => ['description' => '需查询的消息所对应的实例ID。'."\n", 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
],
'responses' => [
@@ -1350,325 +1087,136 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'InstanceBaseInfo' => [
- 'description' => '实例信息对象。',
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'B00CD3C8-D81E-4A41-85E2-38F19252****'],
+ 'MsgFoundDo' => [
+ 'description' => '查询结果。',
'type' => 'object',
'properties' => [
- 'Endpoints' => [
- 'description' => '各个协议的接入点。',
+ 'CurrentPage' => ['description' => '当前位于第几页。', 'type' => 'integer', 'format' => 'int64', 'example' => '1'],
+ 'MsgFoundList' => [
'type' => 'object',
+ 'itemNode' => true,
'properties' => [
- 'TcpEndpoint' => [
- 'description' => 'TCP协议内网接入点。',
- 'type' => 'string',
- 'example' => 'http://MQ_INST_138015630679****_BAAy1Hac.cn-chengdu.mq-internal.aliyuncs.com:8080',
- ],
- 'TcpInternetEndpoint' => [
- 'description' => 'TCP协议公网接入点。'."\n"
- .'- 仅西南1(成都)、华北1(青岛)或华南1(深圳)地域的实例支持TCP协议公网接入点。'."\n"
- .'- 若您需要使用TCP协议公网接入点,您需要将客户端SDK升级至对应版本:'."\n"
- .' - TCP协议Java SDK:2.0.0.Final及以上版本。更多信息,请参见[Java SDK版本说明](~~325569~~)。'."\n"
- .' - TCP协议C\\+\\+ SDK:3.0.0及以上版本。更多信息,请参见[C++ SDK版本说明](~~325570~~)。'."\n"
- .'- 使用TCP协议公网接入点需要收取公网流量费用。具体计费信息,请参见[公网流量费用](~~325571~~)。'."\n"
- .' '."\n"
- ."\n",
- 'type' => 'string',
- 'example' => 'http://MQ_INST_138015630679****_BAAy1Hac.mq.cn-chengdu.aliyuncs.com:80',
- ],
- 'HttpInternetEndpoint' => [
- 'description' => 'HTTP协议公网接入点。',
- 'type' => 'string',
- 'example' => 'http://138015630679****.mqrest.cn-chengdu.aliyuncs.com',
- ],
- 'HttpInternalEndpoint' => [
- 'description' => 'HTTP协议内网接入点。',
- 'type' => 'string',
- 'example' => 'http://138015630679****.mqrest.cn-chengdu-internal.aliyuncs.com',
- ],
- 'HttpInternetSecureEndpoint' => [
- 'description' => 'HTTPS协议公网接入点。',
- 'type' => 'string',
- 'example' => 'https://138015630679****.mqrest.cn-chengdu.aliyuncs.com',
+ 'OnsRestMessageDo' => [
+ 'description' => '当前页的消息集合,该类型与[OnsDLQMessageGetById](~~112667~~)的返回结果一致。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'StoreSize' => ['description' => '消息大小。单位:KB。', 'type' => 'integer', 'format' => 'int32', 'example' => '406'],
+ 'ReconsumeTimes' => ['description' => '消息重试消费的次数。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'],
+ 'StoreTimestamp' => ['description' => '消息被服务端存储的时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570760999811'],
+ 'InstanceId' => ['description' => '实例ID。', 'type' => 'string', 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
+ 'MsgId' => ['description' => '消息ID,即Message ID。', 'type' => 'string', 'example' => '1E0578FE110F18B4AAC235C05F2*****'],
+ 'StoreHost' => ['description' => '存储该消息的服务器实例。', 'type' => 'string', 'example' => '11.193.***.***:10911'],
+ 'Topic' => ['description' => '消息的Topic。', 'type' => 'string', 'example' => 'test-mq_topic'],
+ 'PropertyList' => [
+ 'type' => 'object',
+ 'itemNode' => true,
+ 'properties' => [
+ 'MessageProperty' => [
+ 'description' => '消息属性列表。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Value' => ['description' => '消息属性的取值。', 'type' => 'string', 'example' => 'TagA'],
+ 'Name' => ['description' => '消息属性。取值说明如下:'."\n"
+ .'- **TRACE_ON**:是否有消息轨迹。'."\n"
+ .'- **KEYS**:消息的Key属性。'."\n"
+ .'- **TAGS**:消息的Tag属性。'."\n"
+ .'- **INSTANCE_ID**:消息所在的实例的ID。'."\n"
+ ."\n"
+ .'更多概念信息,请参见[名词解释](~~29533~~)。', 'type' => 'string', 'example' => 'TAGS'],
+ ],
+ 'description' => '',
+ ],
+ ],
+ ],
+ 'description' => '',
+ ],
+ 'BornTimestamp' => ['description' => '消息生产的时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570760999721'],
+ 'BodyCRC' => ['description' => '消息体CRC校验值。', 'type' => 'integer', 'format' => 'int32', 'example' => '914112295'],
+ 'BornHost' => ['description' => '生成该消息的生产者实例。', 'type' => 'string', 'example' => '42.120.***.***:59270'],
+ ],
+ 'description' => '',
+ ],
],
],
+ 'description' => '',
],
- 'IndependentNaming' => [
- 'description' => '实例是否有命名空间。取值说明如下:'."\n"
- ."\n"
- .'- **true**:拥有独立命名空间,资源命名确保实例内唯一,跨实例之间可重名。'."\n"
- ."\n"
- .'- **false**:无独立命名空间,实例内或者跨实例之间,资源命名必须全局唯一。',
- 'type' => 'boolean',
- 'example' => 'true',
- ],
- 'MaxTps' => [
- 'description' => '消息收发TPS上限。取值如下:'."\n"
- .'5000、10000、20000、50000、100000、200000、300000、500000、800000、1000000。'."\n"
- ."\n"
- .'详细的解释以购买页的说明为准。'."\n"
- .'> 该参数仅适用于云消息队列 RocketMQ 版铂金版实例。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '10000',
- ],
- 'Remark' => [
- 'description' => '备注。',
- 'type' => 'string',
- 'example' => 'ons-cn-m7r1r5f****',
- ],
- 'InstanceName' => [
- 'description' => '实例名称。'."\n"
- ."\n"
- .'长度限制为3~64 个字符,可以是中文、英文、数字、短划线(-)以及下划线(_)。',
- 'type' => 'string',
- 'example' => 'test',
- ],
- 'ReleaseTime' => [
- 'description' => '铂金版实例过期时间。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1603555200000',
- ],
- 'TopicCapacity' => [
- 'description' => '该实例下允许创建的Topic数量上限。取值如下:'."\n"
- .'25、50、100、300、500。'."\n"
- .'> 该参数仅适用于云消息队列 RocketMQ 版铂金版实例。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '50',
- ],
- 'InstanceStatus' => [
- 'description' => '实例状态。取值说明如下:'."\n"
- ."\n"
- .'- **0**:铂金版实例部署中'."\n"
- ."\n"
- .'- **2**:标准版实例已欠费'."\n"
- ."\n"
- .'- **5**:标准版实例或铂金版实例服务中'."\n"
- ."\n"
- .'- **7**:铂金版实例升级中且服务可用',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '5',
- ],
- 'InstanceId' => [
- 'description' => '实例ID。',
- 'type' => 'string',
- 'example' => 'MQ_INST_138015630679****_BAAy1Hac',
- ],
- 'InstanceType' => [
- 'description' => '实例类型。取值说明如下:'."\n"
- ."\n"
- .'- **1**:标准版(后付费)实例'."\n"
- ."\n"
- .'- **2**:铂金版(包年包月)实例'."\n"
- ."\n"
- .'云消息队列 RocketMQ 版的实例类型和规格信息,请参见[实例规格](~~185261~~)。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '2',
- ],
- 'CreateTime' => [
- 'description' => '实例的创建时间。'."\n"
- .'该参数值的格式为毫秒级Unix时间戳。',
- 'type' => 'string',
- 'example' => '1570701259403',
- ],
- 'spInstanceId' => [
- 'description' => '实例的商品售卖ID。',
- 'type' => 'string',
- 'example' => 'ons-cn-m7r1r5f****',
- ],
- 'spInstanceType' => [
- 'description' => '实例的售卖类型。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'enumValueTitles' => [
- 1 => '标准版(后付费)实例',
- '铂金版(包年包月)实例',
- ],
- 'example' => '1',
- ],
- 'SupportClassic' => [
- 'title' => '是否支持经典网络'."\n"
- .'0:未知'."\n"
- .'1:支持'."\n"
- .'2:不支持',
- 'description' => '是否支持经典网络'."\n"
- .'0:未知'."\n"
- .'1:支持'."\n"
- .'2:不支持',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '2',
- ],
+ 'MaxPageCount' => ['description' => '查询结果最大页数。', 'type' => 'integer', 'format' => 'int64', 'example' => '400'],
+ 'TaskId' => ['description' => '第一次新建查询时,返回的查询任务ID,用于后续取消息。', 'type' => 'string', 'example' => '0BC1310300002A9F000021E4D7A48346'],
],
],
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '6CC46974-65E8-4C20-AB07-D20D102E****',
- ],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"InstanceBaseInfo\\": {\\n \\"Endpoints\\": {\\n \\"TcpEndpoint\\": \\"http://MQ_INST_138015630679****_BAAy1Hac.cn-chengdu.mq-internal.aliyuncs.com:8080\\",\\n \\"TcpInternetEndpoint\\": \\"http://MQ_INST_138015630679****_BAAy1Hac.mq.cn-chengdu.aliyuncs.com:80\\",\\n \\"HttpInternetEndpoint\\": \\"http://138015630679****.mqrest.cn-chengdu.aliyuncs.com\\",\\n \\"HttpInternalEndpoint\\": \\"http://138015630679****.mqrest.cn-chengdu-internal.aliyuncs.com\\",\\n \\"HttpInternetSecureEndpoint\\": \\"https://138015630679****.mqrest.cn-chengdu.aliyuncs.com\\"\\n },\\n \\"IndependentNaming\\": true,\\n \\"MaxTps\\": 10000,\\n \\"Remark\\": \\"ons-cn-m7r1r5f****\\",\\n \\"InstanceName\\": \\"test\\",\\n \\"ReleaseTime\\": 1603555200000,\\n \\"TopicCapacity\\": 50,\\n \\"InstanceStatus\\": 5,\\n \\"InstanceId\\": \\"MQ_INST_138015630679****_BAAy1Hac\\",\\n \\"InstanceType\\": 2,\\n \\"CreateTime\\": \\"1570701259403\\",\\n \\"spInstanceId\\": \\"ons-cn-m7r1r5f****\\",\\n \\"spInstanceType\\": 1,\\n \\"SupportClassic\\": 2\\n },\\n \\"RequestId\\": \\"6CC46974-65E8-4C20-AB07-D20D102E****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsInstanceBaseInfoResponse>\\n <InstanceBaseInfo>\\n <Endpoints>\\n <TcpEndpoint>http://MQ_INST_138015630679****_BAAy1Hac.cn-chengdu.mq-internal.aliyuncs.com:8080</TcpEndpoint>\\n <HttpInternetEndpoint>http://138015630679****.mqrest.cn-chengdu.aliyuncs.com</HttpInternetEndpoint>\\n <HttpInternalEndpoint>http://138015630679****.mqrest.cn-chengdu-internal.aliyuncs.com</HttpInternalEndpoint>\\n <HttpInternetSecureEndpoint>https://138015630679****.mqrest.cn-chengdu.aliyuncs.com</HttpInternetSecureEndpoint>\\n <TcpInternetEndpoint>http://MQ_INST_138015630679****_BAAy1Hac.mq.cn-chengdu.aliyuncs.com:80</TcpInternetEndpoint>\\n </Endpoints>\\n <IndependentNaming>true</IndependentNaming>\\n <MaxTps>10000</MaxTps>\\n <Remark>onspre-cn-m7r1r5f****</Remark>\\n <InstanceName>test</InstanceName>\\n <ReleaseTime>1603555200000</ReleaseTime>\\n <TopicCapacity>50</TopicCapacity>\\n <InstanceStatus>5</InstanceStatus>\\n <InstanceId>MQ_INST_138015630679****_BAAy1Hac</InstanceId>\\n <InstanceType>2</InstanceType>\\n </InstanceBaseInfo>\\n <RequestId>6CC46974-65E8-4C20-AB07-D20D102E****</RequestId>\\n</OnsInstanceBaseInfoResponse>","errorExample":""}]',
- 'title' => '查询实例基本信息和收发消息的接入点',
+ 'title' => '查询Group ID内所有死信消息',
+ 'summary' => '通过传入Group ID和时间段,分页查询指定时间段内该Group ID内存在的所有死信消息。',
'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
- .'客户端需要通过接入点接入云消息队列 RocketMQ 版完成消息的收发,可通过调用本接口查询实例接入点。',
- 'requestParamsDescription' => ' ',
+ ."\n"
+ .'- 按Group ID查询死信消息的方式属于范围查询,查询结果会通过分页的方式展示给调用方,仅适用于没有任何搜索条件Message ID查询场景。'."\n"
+ .'- 根据Group ID查询死信消息应尽可能缩短查询的时间区间,否则匹配的消息过多,不利于定位问题。调用流程如下:'."\n"
+ .' 1. 传入Group ID、起止时间以及每页的消息数量,进行分页查询。如果有消息,默认返回第一页的消息、总页数和查询任务 ID。'."\n"
+ .' 2. 根据返回的结果中的查询任务ID,进行后续取消息,取消息时传入查询任务ID以及当前页数。此时输入的起止时间和每页消息数量不生效,默认以第一次查询时输入的参数值为准。',
'responseParamsDescription' => ' ',
- 'extraInfo' => ' ',
- ],
- 'OnsInstanceUpdate' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
- 'security' => [
- [
- 'AK' => [],
- ],
- ],
- 'operationType' => 'readAndWrite',
- 'deprecated' => false,
- 'systemTags' => [],
- 'parameters' => [
- [
- 'name' => 'Remark',
- 'in' => 'query',
- 'schema' => [
- 'description' => '更新后的实例描述,传空值则不更新。',
- 'type' => 'string',
- 'required' => false,
- 'example' => '备注更新',
- ],
- ],
- [
- 'name' => 'InstanceName',
- 'in' => 'query',
- 'schema' => [
- 'description' => '更新后的实例名称。取值说明如下:'."\n"
- .'- 实例名称在该实例所部署的地域下要唯一,不可重名。'."\n"
- ."\n"
- .'- 长度限制为3~64个字符,可以是中文、英文、数字、短划线(-)以及下划线(_)。'."\n"
- ."\n"
- .'- 传空值则不更新。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => '名字更新',
- ],
- ],
- [
- 'name' => 'InstanceId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '待更新名称或描述的实例ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'MQ_INST_188077086902****_BXSuW61e',
- ],
- ],
- ],
- 'responses' => [
- 200 => [
- 'schema' => [
- 'type' => 'object',
- 'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****',
- ],
+ 'extraInfo' => '## 控制台操作'."\n"
+ .'除了调用**OnsDLQMessagePageQueryByGroupId**接口,您还可以通过云消息队列 RocketMQ 版控制台查看死信消息。具体操作,请参见[死信队列](~~87277~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsDLQMessagePageQueryByGroupId'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryDLQMessage',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
],
],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsInstanceUpdateResponse>\\r\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\r\\n</OnsInstanceUpdateResponse>","errorExample":""}]',
- 'title' => '更新实例名称和描述',
- 'summary' => '调用OnsInstanceUpdate接口更新实例名称和描述。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
- 'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsInstanceUpdate**接口,您还可以通过云消息队列 RocketMQ 版控制台更新实例名称和描述。具体操作,请参见[实例管理](~~200153~~)。',
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"B00CD3C8-D81E-4A41-85E2-38F19252****\\",\\n \\"MsgFoundDo\\": {\\n \\"CurrentPage\\": 1,\\n \\"MsgFoundList\\": {\\n \\"OnsRestMessageDo\\": [\\n {\\n \\"StoreSize\\": 406,\\n \\"ReconsumeTimes\\": 1,\\n \\"StoreTimestamp\\": 1570760999811,\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\",\\n \\"MsgId\\": \\"1E0578FE110F18B4AAC235C05F2*****\\",\\n \\"StoreHost\\": \\"11.193.***.***:10911\\",\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"PropertyList\\": {\\n \\"MessageProperty\\": [\\n {\\n \\"Value\\": \\"TagA\\",\\n \\"Name\\": \\"TAGS\\"\\n }\\n ]\\n },\\n \\"BornTimestamp\\": 1570760999721,\\n \\"BodyCRC\\": 914112295,\\n \\"BornHost\\": \\"42.120.***.***:59270\\"\\n }\\n ]\\n },\\n \\"MaxPageCount\\": 400,\\n \\"TaskId\\": \\"0BC1310300002A9F000021E4D7A48346\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsDLQMessagePageQueryByGroupIdResponse>\\n <MsgFoundDo>\\n <MaxPageCount>400</MaxPageCount>\\n <MsgFoundList>\\n <OnsRestMessageDo>\\n <MsgId>1E0578FE110F18B4AAC235C05F2*****</MsgId>\\n <InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>\\n <ReconsumeTimes>1</ReconsumeTimes>\\n <BornHost>42.120.***.***:59270</BornHost>\\n <StoreTimestamp>1570760999811</StoreTimestamp>\\n <StoreHost>11.193.***.***:10911</StoreHost>\\n <BodyCRC>914112295</BodyCRC>\\n <Topic>test-mq_topic</Topic>\\n <BornTimestamp>1570760999721</BornTimestamp>\\n <StoreSize>406</StoreSize>\\n <PropertyList>\\n <MessageProperty>\\n <Name>TAGS</Name>\\n <Value>TagA</Value>\\n </MessageProperty>\\n </PropertyList>\\n </OnsRestMessageDo>\\n </MsgFoundList>\\n <TaskId>0BC1310300002A9F000021E4D7A48346</TaskId>\\n <CurrentPage>1</CurrentPage>\\n </MsgFoundDo>\\n <RequestId>5DC2A47E-2B31-4722-96C8-FA59C9*****</RequestId>\\n</OnsDLQMessagePageQueryByGroupIdResponse>","errorExample":""}]',
],
- 'OnsInstanceInServiceList' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'OnsDLQMessageResendById' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'read',
+ 'operationType' => 'write',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'list',
- 'abilityTreeCode' => '14932',
- 'abilityTreeNodes' => [
- 'FEATUREonsICR0M4',
- ],
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
- 'name' => 'Tag',
+ 'name' => 'MsgId',
'in' => 'query',
- 'style' => 'repeatList',
- 'schema' => [
- 'description' => '实例所绑定的标签列表。列表元素个数不得超过 20。',
- 'type' => 'array',
- 'items' => [
- 'description' => '实例所绑定的标签。',
- 'type' => 'object',
- 'properties' => [
- 'Key' => [
- 'description' => '实例的标签键。**Key**和**Value**值必须同时输入或同时不输入。若同时输入表示根据Tag过滤符合条件的实例,若不输入表示查询所有实例。'."\n"
- ."\n"
- .'- 如果输入该值,则取值不允许为空字符串。'."\n"
- .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'CartService',
- ],
- 'Value' => [
- 'description' => '资源的标签值。**Key**和**Value**值必须同时输入或同时不输入。若同时输入表示根据Tag过滤符合条件的实例,若不输入表示查询所有实例。'."\n"
- ."\n"
- .'- 如果输入该值,取值允许为空字符串。'."\n"
- .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'SericeA',
- ],
- ],
- 'required' => false,
- ],
- 'required' => false,
- 'maxItems' => 21,
- ],
+ 'schema' => ['description' => '需查询的消息的ID,即Message ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '0BC16699343051CD9F1D798E7734****'],
],
[
- 'name' => 'NeedResourceInfo',
+ 'name' => 'GroupId',
'in' => 'query',
- 'schema' => [
- 'description' => '是否需要资源统计信息。即实例下Topic的数量和Group的数量。',
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'true',
- ],
+ 'schema' => ['description' => '需查询的消费端Group ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test_group_id'],
+ ],
+ [
+ 'name' => 'InstanceId',
+ 'in' => 'query',
+ 'schema' => ['description' => '需查询消息所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_188077086902****_BXSuW61e'],
],
],
'responses' => [
@@ -1676,144 +1224,64 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '0598E46F-DB06-40E2-AD7B-C45923EE****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'D94CC769-4DC3-4690-A868-9D0631B1****'],
'Data' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
- 'InstanceVO' => [
- 'description' => '返回所有已发布的实例信息列表。',
+ 'MsgId' => [
+ 'description' => '返回的消息列表。',
'type' => 'array',
- 'items' => [
- 'description' => '返回所有已发布的实例信息列表。',
- 'type' => 'object',
- 'properties' => [
- 'IndependentNaming' => [
- 'description' => '实例是否有命名空间。取值说明如下:'."\n"
- ."\n"
- .'- **true**:拥有独立命名空间,资源命名确保实例内唯一,跨实例之间可重名。'."\n"
- ."\n"
- .'- **false**:无独立命名空间,实例内或者跨实例之间,资源命名必须全局唯一。',
- 'type' => 'boolean',
- 'example' => 'true',
- ],
- 'InstanceName' => [
- 'description' => '实例名称。',
- 'type' => 'string',
- 'example' => 'test1',
- ],
- 'ReleaseTime' => [
- 'description' => '铂金版实例的过期时间。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1551024000000',
- ],
- 'InstanceStatus' => [
- 'description' => '实例状态。取值说明如下:'."\n"
- ."\n"
- .'- **0**:铂金版实例部署中'."\n"
- ."\n"
- .'- **2**:标准版实例已欠费'."\n"
- ."\n"
- .'- **5**:标准版实例或铂金版实例服务中'."\n"
- ."\n"
- .'- **7**:铂金版实例升级中且服务可用',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '5',
- ],
- 'Tags' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'Tag' => [
- 'description' => '实例所绑定的标签。',
- 'type' => 'array',
- 'items' => [
- 'description' => '实例所绑定的标签。',
- 'type' => 'object',
- 'properties' => [
- 'Key' => [
- 'description' => '标签键。',
- 'type' => 'string',
- 'example' => 'CartService',
- ],
- 'Value' => [
- 'description' => '标签值。',
- 'type' => 'string',
- 'example' => 'ServiceA',
- ],
- ],
- ],
- ],
- ],
- ],
- 'InstanceId' => [
- 'description' => '实例ID。',
- 'type' => 'string',
- 'example' => 'MQ_INST_188077086902****_BXSuW61e',
- ],
- 'InstanceType' => [
- 'description' => '实例类型。取值说明如下:'."\n"
- ."\n"
- .'- **1**:标准版实例'."\n"
- ."\n"
- .'- **2**:铂金版实例'."\n"
- ."\n"
- .'各类型实例的规格和差异说明,请参见[实例规格](~~185261~~)。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '2',
- ],
- 'CreateTime' => [
- 'description' => '实例的创建时间。'."\n"
- .'该参数值的格式为毫秒级Unix时间戳。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1640847284000',
- ],
- 'TopicCount' => [
- 'description' => '主题数量。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1',
- ],
- 'GroupCount' => [
- 'description' => '消费者分组数量。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '3',
- ],
- ],
- ],
+ 'items' => ['description' => '消息ID,即Message ID。', 'type' => 'string', 'example' => '0BC16699343051CD9F1D798E7734****'],
],
],
+ 'description' => '',
],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"0598E46F-DB06-40E2-AD7B-C45923EE****\\",\\n \\"Data\\": {\\n \\"InstanceVO\\": [\\n {\\n \\"IndependentNaming\\": true,\\n \\"InstanceName\\": \\"test1\\",\\n \\"ReleaseTime\\": 1551024000000,\\n \\"InstanceStatus\\": 5,\\n \\"Tags\\": {\\n \\"Tag\\": [\\n {\\n \\"Key\\": \\"CartService\\",\\n \\"Value\\": \\"ServiceA\\"\\n }\\n ]\\n },\\n \\"InstanceId\\": \\"MQ_INST_188077086902****_BXSuW61e\\",\\n \\"InstanceType\\": 2,\\n \\"CreateTime\\": 1640847284000,\\n \\"TopicCount\\": 1,\\n \\"GroupCount\\": 3\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsInstanceInServiceListResponse>\\n<RequestId>0598E46F-DB06-40E2-AD7B-C45923EE****</RequestId>\\n<Data>\\n <InstanceVO>\\n <InstanceName>test1</InstanceName>\\n <InstanceId>MQ_INST_188077086902****_BXSuW61e</InstanceId>\\n <ReleaseTime>1551024000000</ReleaseTime>\\n <InstanceStatus>5</InstanceStatus>\\n <IndependentNaming>true</IndependentNaming>\\n <InstanceType>2</InstanceType>\\n <Tags>\\n <Tag>\\n <Value>ServiceA</Value>\\n <Key>CartService</Key>\\n </Tag>\\n </Tags>\\n </InstanceVO>\\n</Data>\\n</OnsInstanceInServiceListResponse>","errorExample":""}]',
- 'title' => '查询指定地域下实例列表',
- 'summary' => '查询当前账号在指定地域(Region)下所有的云消息队列 RocketMQ 版4.x实例信息。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>',
+ 'title' => '重发指定的死信消息',
+ 'summary' => '重发指定Message ID的死信消息,使该消息能够被Consumer再次消费。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
+ ."\n"
+ .'- 死信消息已达最大重试次数,若重发后再次消费失败,则死信队列中将增加一条Message ID相同的消息,可通过控制台死信队列的查询页面或者管控API查看该结果。您可通过同一Message ID的消息出现次数判断重发后依然消费失败的次数。'."\n"
+ .'- 由于死信消息是经过重试逻辑依然消费失败的消息,通常意味着消费逻辑可能存在问题,故请先查明多次消费失败的原因,再调用本接口重新发送。'."\n"
+ .'- 当前消息队列RocketMQ版不管理死信重发的状态,重发后消费成功的消息不会从死信队列中移除。需自行管理、判断消息是否需要重发。避免多次无意义地重发,从而造成重复消费。',
'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
- 'extraInfo' => ' ',
- ],
- 'OnsInstanceDelete' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ 'responseParamsDescription' => '> 如果重新投递失败,会返回投递失败的Message ID。',
+ 'extraInfo' => '## 控制台操作'."\n"
+ .'除了调用**OnsDLQMessageResendById**接口,您还可以通过云消息队列 RocketMQ 版控制台重新投递指定的死信消息。具体操作,请参见[死信队列](~~87277~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsDLQMessageResendById'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:ResendDLQMessage',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"D94CC769-4DC3-4690-A868-9D0631B1****\\",\\n \\"Data\\": {\\n \\"MsgId\\": [\\n \\"0BC16699343051CD9F1D798E7734****\\"\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsDLQMessageResendByIdResponse>\\r\\n<RequestId>D94CC769-4DC3-4690-A868-9D0631B1****</RequestId>\\r\\n</OnsDLQMessageResendByIdResponse>","errorExample":""}]',
+ ],
+ 'OnsGroupConsumerUpdate' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -1824,15 +1292,25 @@
'systemTags' => [],
'parameters' => [
[
+ 'name' => 'GroupId',
+ 'in' => 'query',
+ 'schema' => ['description' => '需配置的Group ID。 ', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test_groupId'],
+ ],
+ [
+ 'name' => 'ReadEnable',
+ 'in' => 'query',
+ 'schema' => ['description' => '设置Group ID对应的消费者集群是否有读取消息权限。取值说明如下:'."\n"
+ ."\n"
+ .'- **true**:指定Group ID对应的消费者集群有读消息权限。'."\n"
+ ."\n"
+ .'- **false**:指定Group ID对应的消费者集群没有读消息权限。'."\n"
+ ."\n"
+ .'默认值为**true**。', 'type' => 'boolean', 'required' => true, 'docRequired' => true, 'example' => 'true'],
+ ],
+ [
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '实例ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'MQ_INST_188077086902****_BXSuW61e',
- ],
+ 'schema' => ['description' => '需配置的Group ID所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
],
'responses' => [
@@ -1840,37 +1318,47 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****'],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsInstanceDeleteResponse>\\r\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\r\\n</OnsInstanceDeleteResponse>","errorExample":""}]',
- 'title' => '删除实例',
- 'summary' => '调用OnsInstanceDelete接口删除云消息队列 RocketMQ 版实例。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
- ."\n"
- .'- 该接口一般是在应用下线等资源回收场景下使用。待删除实例下的Topic和Group为空时才可删除。'."\n"
- .'- 实例删除后将无法恢复,请慎重调用。'."\n",
+ 'title' => '配置消费集群的消息读取权限',
+ 'summary' => '配置指定Group ID对应的消费集群的消息读取权限。本接口一般用于禁止特定Group ID读取消息的场景。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
- 'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsInstanceDelete**接口,您还可以通过云消息队列 RocketMQ 版控制台删除指定实例。具体操作,请参见[实例管理](~~200153~~)。',
- ],
- 'OnsTopicCreate' => [
- 'summary' => '调用OnsTopicCreate接口创建Topic。',
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ 'extraInfo' => ' ',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsGroupConsumerUpdate'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'mq:UpdateGroupConsumer',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsGroupConsumerUpdateResponse>\\r\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\r\\n</OnsGroupConsumerUpdateResponse>","errorExample":""}]',
+ ],
+ 'OnsGroupCreate' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -1878,213 +1366,170 @@
],
'operationType' => 'readAndWrite',
'deprecated' => false,
- 'systemTags' => [],
+ 'systemTags' => ['operationType' => 'create'],
'parameters' => [
[
- 'name' => 'Topic',
+ 'name' => 'GroupId',
'in' => 'query',
- 'schema' => [
- 'description' => '需创建的Topic的名称,取值说明如下:'."\n"
- ."\n"
- .'- 长度限制为3~64个字符,只能包含字母、数字、短划线(-)和下划线(_)。'."\n"
- .'- “CID”和“GID”是Group ID的保留字段,Topic名称不能以“CID”和“GID”开头。'."\n"
- .'- 如果创建的Topic所在的实例有命名空间,则Topic的名称需要保证实例内唯一,不能和本实例下已有的Topic名称或Group ID重复;跨实例之间可以重名,例如实例A的Topic名称可以和实例B的Topic名称重复,也可以和实例B的Group ID重复。'."\n"
- .'- 如果新建的Topic所在的实例无命名空间,则Topic的名称需要保证跨实例和跨地域全局唯一,全局范围内不能和已有的Topic名称或Group ID重复。'."\n"
- ."\n"
- .'> 实例是否有命名空间,可以在云消息队列 RocketMQ 版控制台**实例详情**页面的**基础信息区域**查看。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'test',
- ],
+ 'schema' => ['description' => '创建的消息消费集群的Group ID。取值说明如下:'."\n"
+ ."\n"
+ .'- 长度限制为2~64个字符,只能包含字母、数字、短划线(-)和下划线(_)。'."\n"
+ ."\n"
+ .'- 若创建的Group所在实例有命名空间,则Group ID需要保证实例内唯一,不能和本实例下已有的Group ID或Topic名称重复;跨实例之间可以重名,例如实例A的Group ID可以和实例B的Group ID重复,也可以和实例B的Topic名称重复。'."\n"
+ ."\n"
+ .'- 若创建的Group所在实例无命名空间,则Group ID需要保证跨实例和跨地域全局唯一,全局范围内不能和已有的Group ID或Topic名称重复。'."\n"
+ ."\n\n"
+ .'> - Group ID创建后,将无法再修改。'."\n"
+ .'- 实例是否有命名空间,可以在消息队列RocketMQ版控制台**实例详情**页面的**基础信息区域**查看。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test_groupId'],
],
[
- 'name' => 'MessageType',
+ 'name' => 'Remark',
'in' => 'query',
- 'schema' => [
- 'description' => '消息类型。取值说明如下:'."\n"
- ."\n"
- .'- **0**:普通消息'."\n"
- .'- **1**:分区顺序消息'."\n"
- .'- **4**:事务消息'."\n"
- .'- **5**:定时/延时消息'."\n"
- ."\n"
- .'各类型消息的详细说明,请参见[消息类型列表](~~155952~~)。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '0',
- ],
+ 'schema' => ['description' => '备注。', 'type' => 'string', 'required' => false, 'example' => 'test'],
],
[
- 'name' => 'Remark',
+ 'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需创建的Topic的描述信息。',
- 'type' => 'string',
- 'required' => false,
- 'example' => '测试',
- ],
+ 'schema' => ['description' => '需创建的Group ID所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
[
- 'name' => 'InstanceId',
+ 'name' => 'GroupType',
'in' => 'query',
- 'schema' => [
- 'description' => '需创建的Topic所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_188077086902****_BXSuW61e',
- ],
+ 'schema' => ['description' => '指定创建的Group ID适用的协议。TCP协议和HTTP协议的Group ID不可以共用,需要分别创建。取值说明如下:'."\n"
+ ."\n"
+ .'- **tcp**:默认值,表示创建的Group ID仅适用于TCP协议的消息收发。'."\n"
+ .'- **http**:表示创建的Group ID仅适用于HTTP协议的消息收发。', 'type' => 'string', 'required' => false, 'example' => 'tcp', 'default' => 'tcp'],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => '返回的数据结构。',
+ 'description' => '返回信息。',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'B6949B58-223E-4B75-B4FE-7797C15E****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****'],
],
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => '%s',
- 'errorMessage' => '%s, please check and retry later',
- ],
+ ['errorCode' => '%s', 'errorMessage' => '%s, please check and retry later', 'description' => ''],
+ ['errorCode' => 'Group.NumLimited', 'errorMessage' => 'group count exceed limit.', 'description' => 'Gid数量超出限制'],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"B6949B58-223E-4B75-B4FE-7797C15E****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsTopicCreateResponse>\\r\\n<RequestId>B6949B58-223E-4B75-B4FE-7797C15E****</RequestId>\\r\\n</OnsTopicCreateResponse>","errorExample":""}]',
- 'title' => '创建Topic',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
- .'本接口一般是在发布新应用或业务扩展等需要创建新的Topic资源时使用。'."\n"
- ."\n",
+ 'title' => '创建客户端Group ID',
+ 'summary' => '调用OnsGroupCreate创建客户端Group ID。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>本接口一般是在发布新应用、业务逻辑实现等需要新的Group的情况下使用。'."\n",
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsTopicCreate**接口,您还可以通过消息队列RocketMQ版控制台,创建Topic。具体操作,请参见[Topic管理](~~199535~~)。',
- ],
- 'OnsTopicStatus' => [
- 'summary' => '查询当前Topic下的消息总量以及Topic的状态。',
- 'methods' => [
- 'post',
- 'get',
+ .'除了调用**OnsGroupCreate**接口,您还可以通过消息队列RocketMQ版控制台创建Group ID。具体操作,请参见[Group管理](~~200386~~)。',
+ 'changeSet' => [
+ ['createdAt' => '2023-10-07T03:50:23.000Z', 'description' => '错误码发生变更'],
+ ['createdAt' => '2021-08-16T02:20:32.000Z', 'description' => '错误码发生变更'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsGroupCreate'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'ramActions' => [
+ [
+ 'operationType' => 'create',
+ 'ramAction' => [
+ 'action' => 'mq:CreateGroup',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsGroupCreateResponse>\\r\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\r\\n</OnsGroupCreateResponse>","errorExample":""}]',
+ ],
+ 'OnsGroupDelete' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'read',
+ 'operationType' => 'readAndWrite',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- 'riskType' => 'none',
- 'chargeType' => 'free',
- 'abilityTreeNodes' => [
- 'FEATUREons8BETJT',
- ],
- ],
+ 'systemTags' => ['operationType' => 'delete'],
'parameters' => [
[
- 'name' => 'Topic',
+ 'name' => 'GroupId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的Topic名称。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'test',
- ],
+ 'schema' => ['description' => '待删除的消息消费集群的Group ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test_groupId'],
],
[
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的Topic所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_188077086902****_BXSuW61e',
- ],
+ 'schema' => ['description' => '待删除的Group所属的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => '返回信息。',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '427EE49D-D762-41FB-8F3D-9BAC96C3****',
- ],
- 'Data' => [
- 'description' => '查询到的Topic的信息存储数据结构。',
- 'type' => 'object',
- 'properties' => [
- 'Perm' => [
- 'description' => '所有关系编号。取值说明如下:'."\n"
- ."\n"
- .'- **2**:可以发布'."\n"
- .'- **4**:可以订阅'."\n"
- .'- **6**:可以发布和订阅',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '6',
- ],
- 'LastTimeStamp' => [
- 'description' => '当前Topic内最新一条消息的就绪时间,如果Topic内没有消息,则该参数返回值为0。'."\n"
- ."\n"
- .'该参数值的格式为毫秒级Unix时间戳。'."\n"
- ."\n"
- .'就绪消息及就绪时间具体含义,请参见[名词解释](~~29533~~)。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570864984364',
- ],
- 'TotalCount' => [
- 'description' => '当前Topic的所有分区存在的消息数总和。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '2310',
- ],
- ],
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****'],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"427EE49D-D762-41FB-8F3D-9BAC96C3****\\",\\n \\"Data\\": {\\n \\"Perm\\": 6,\\n \\"LastTimeStamp\\": 1570864984364,\\n \\"TotalCount\\": 2310\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsTopicStatusResponse>\\n<Data>\\n <Perm>6</Perm>\\n <TotalCount>2310</TotalCount>\\n <LastTimeStamp>1570864984364</LastTimeStamp>\\n</Data>\\n<RequestId>427EE49D-D762-41FB-8F3D-9BAC96C3****</RequestId>\\n</OnsTopicStatusResponse>","errorExample":""}]',
- 'title' => '查询Topic状态',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>本接口一般用于判断Topic资源的使用率。调用本接口后返回的信息包含当前服务器上该Topic所有的消息数,以及最后消息写入时间。',
+ 'title' => '删除Group',
+ 'summary' => '调用OnsGroupDelete删除Group。',
+ 'description' => '><notice>'."\n"
+ ."\n"
+ .'- 阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。'."\n"
+ ."\n"
+ .'- 删除Group后,由Group ID标识的消费者实例将立即停止接收消息,请慎重调用。'."\n"
+ .'></notice>'."\n"
+ .'本接口一般是在应用下线等资源回收场景下使用。Group删除时后台需要做资源回收,速度较慢,因此不建议删除后立即又重新创建。如果删除失败,请根据错误码进行处理。'."\n"
+ ."\n",
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
- 'extraInfo' => ' ',
- ],
- 'OnsTopicList' => [
- 'summary' => '查询账号下所有Topic的信息列表。',
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ 'extraInfo' => '## 控制台操作'."\n"
+ .'除了调用**OnsGroupDelete**接口,您还可以通过云消息队列 RocketMQ 版控制台删除Group ID。具体操作,请参见[Group管理](~~200386~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsGroupDelete'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'delete',
+ 'ramAction' => [
+ 'action' => 'mq:DeleteGroup',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsGroupDeleteResponse>\\r\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\r\\n</OnsGroupDeleteResponse>","errorExample":""}]',
+ ],
+ 'OnsGroupList' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -2092,68 +1537,49 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'list',
- 'riskType' => 'none',
- 'chargeType' => 'free',
- 'abilityTreeNodes' => [
- 'FEATUREonsXSOU1Y',
- ],
- ],
+ 'systemTags' => ['operationType' => 'list'],
'parameters' => [
[
- 'name' => 'Topic',
+ 'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '查询指定Topic时设置,若不输入,则查询所有Topic。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'test',
- ],
+ 'schema' => ['description' => '需获取资源列表的Group ID所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
[
- 'name' => 'InstanceId',
+ 'name' => 'GroupId',
'in' => 'query',
- 'schema' => [
- 'description' => '需获取的Topic信息列表所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_188077086902****_BXSuW61e',
- ],
+ 'schema' => ['description' => '模糊查询指定Group ID时设置,否则查询所有Group ID。'."\n"
+ ."\n"
+ .'如果输入GID\\_ABC查询,那么会以前后缀匹配的方式进行模糊查询,返回所有包含\\*GID\\_ABC\\*的Group ID,例如GID\\_test\\_GID\\_ABC\\_123、GID\\_ABC\\_356。', 'type' => 'string', 'required' => false, 'example' => 'GID_test_group_id'],
+ ],
+ [
+ 'name' => 'GroupType',
+ 'in' => 'query',
+ 'schema' => ['description' => '查询的Group ID适用的协议。TCP协议和HTTP协议的Group ID不可以共用,需要分别创建。取值说明如下:'."\n"
+ ."\n"
+ .'- **tcp**:默认值,表示该Group ID仅适用于TCP协议的消息收发。'."\n"
+ .'- **http**:表示该Group ID仅适用于HTTP协议的消息收发。', 'type' => 'string', 'required' => false, 'example' => 'tcp', 'default' => 'tcp'],
],
[
'name' => 'Tag',
'in' => 'query',
- 'allowEmptyValue' => false,
'style' => 'repeatList',
'schema' => [
- 'description' => 'Topic所绑定的标签列表。列表元素个数不得超过 20。',
+ 'description' => 'Group ID所绑定的标签列表。列表元素个数不得超过 20。',
'type' => 'array',
'items' => [
- 'description' => '返回的标签结构。',
'type' => 'object',
'properties' => [
- 'Key' => [
- 'description' => 'Topic的标签键。**Key**和**Value**值必须同时输入或同时不输入。若同时输入表示根据Tag过滤符合条件的Topic,若不输入表示查询所有Topic。'."\n"
- ."\n"
- .'- 如果输入该值,则取值不允许为空字符串。'."\n"
- .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'CartService',
- ],
- 'Value' => [
- 'description' => 'Topic的标签值。**Key**和**Value**值必须同时输入或同时不输入。若同时输入表示根据Tag过滤符合条件的Topic,若不输入表示查询所有Topic。'."\n"
- ."\n"
- .'- 如果输入该值,取值允许为空字符串。'."\n"
- .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'ServiceA',
- ],
+ 'Key' => ['description' => 'Group ID的标签键。**Key**和**Value**值必须同时输入或同时不输入。若同时输入表示根据Tag过滤符合条件的Group ID,若不输入表示查询所有Group ID。'."\n"
+ ."\n"
+ .'- 如果输入该值,则取值不允许为空字符串。'."\n"
+ .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => true, 'example' => 'CartService'],
+ 'Value' => ['description' => 'Group ID的标签值。**Key**和**Value**值必须同时输入或同时不输入。若同时输入表示根据Tag过滤符合条件的Group ID,若不输入表示查询所有Group ID。'."\n"
+ ."\n"
+ .'- 如果输入该值,取值允许为空字符串。'."\n"
+ .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => true, 'example' => 'ServiceA'],
],
'required' => false,
+ 'description' => '',
],
'required' => false,
'maxItems' => 21,
@@ -2163,147 +1589,99 @@
'responses' => [
200 => [
'schema' => [
- 'description' => '返回的数据结构。',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '4A978869-7681-4529-B470-107E1379****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '16996623-AC4A-43AF-9248-FD9D2D75****'],
'Data' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
- 'PublishInfoDo' => [
- 'description' => '返回指定实例的Topic信息列表。',
+ 'SubscribeInfoDo' => [
+ 'description' => '查询到的订阅关系集合。',
'type' => 'array',
'items' => [
- 'description' => '返回的Topic的数据结构。',
'type' => 'object',
'properties' => [
- 'MessageType' => [
- 'description' => '消息类型。取值说明如下:'."\n"
- ."\n"
- .'- **0**:普通消息'."\n"
- .'- **1**:分区顺序消息'."\n"
- .'- **2**:全局顺序消息'."\n"
- .'- **4**:事务消息'."\n"
- .'- **5**:定时/延时消息',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '0',
- ],
- 'RelationName' => [
- 'description' => '所有关系名称,例如持有者、可订阅、可发布和可发布订阅。',
- 'type' => 'string',
- 'example' => '授权发布/订阅',
- ],
- 'Owner' => [
- 'description' => 'Topic所有者编号,为阿里云的账号ID。',
- 'type' => 'string',
- 'example' => '138015630679****',
- ],
- 'IndependentNaming' => [
- 'description' => 'Topic所在实例是否有命名空间。取值说明如下:'."\n"
- ."\n"
- .'- **true**:拥有独立命名空间,资源命名确保实例内唯一,跨实例之间可重名。'."\n"
- .'- **false**:无独立命名空间,实例内或者跨实例之间,资源命名必须全局唯一。',
- 'type' => 'boolean',
- 'example' => 'true',
- ],
- 'Remark' => [
- 'description' => '备注信息。',
- 'type' => 'string',
- 'example' => '测试',
- ],
- 'Relation' => [
- 'description' => '所有关系编号。取值说明如下:'."\n"
- ."\n"
- .'- **1**:持有者'."\n"
- .'- **2**:可以发布'."\n"
- .'- **4**:可以订阅'."\n"
- .'- **6**:可以发布和订阅',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '6',
- ],
- 'CreateTime' => [
- 'description' => '创建时间。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570700947000',
- ],
- 'Topic' => [
- 'description' => 'Topic名称。',
- 'type' => 'string',
- 'example' => 'test',
- ],
+ 'Owner' => ['description' => '该发布信息的拥有者。', 'type' => 'string', 'example' => '138015630679****'],
+ 'UpdateTime' => ['description' => '该Group ID的更新时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570700979000'],
+ 'IndependentNaming' => ['description' => '实例是否有命名空间。取值说明如下:'."\n"
+ ."\n"
+ .'- **true**:拥有独立命名空间,资源命名确保实例内唯一,跨实例之间可重名。'."\n"
+ ."\n"
+ .'- **false**:无独立命名空间,实例内或者跨实例之间,资源命名必须全局唯一。', 'type' => 'boolean', 'example' => 'true'],
+ 'GroupId' => ['description' => 'Group ID即消费集群组ID。', 'type' => 'string', 'example' => 'GID_test_group_id'],
+ 'Remark' => ['description' => '备注。', 'type' => 'string', 'example' => 'test'],
+ 'CreateTime' => ['description' => 'Group ID的创建时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1568896605000'],
'Tags' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'Tag' => [
- 'description' => 'Topic所绑定的标签。',
+ 'description' => 'Group ID所绑定的标签。',
'type' => 'array',
'items' => [
- 'description' => '标签结构定义。',
'type' => 'object',
'properties' => [
- 'Key' => [
- 'description' => '标签键。',
- 'type' => 'string',
- 'example' => 'CartService',
- ],
- 'Value' => [
- 'description' => '标签值。',
- 'type' => 'string',
- 'example' => 'SrviceA',
- ],
+ 'Key' => ['description' => '标签键。', 'type' => 'string', 'example' => 'CartService'],
+ 'Value' => ['description' => '标签值。', 'type' => 'string', 'example' => 'ServiceA'],
],
+ 'description' => '',
],
],
],
+ 'description' => '',
],
- 'InstanceId' => [
- 'description' => 'Topic所在的实例ID。',
- 'type' => 'string',
- 'example' => 'MQ_INST_188077086902****_BXSuW61e',
- ],
- 'ServiceStatus' => [
- 'description' => 'Topic异步创建的状态。取值说明如下:'."\n"
- .'- **0**:创建中。'."\n"
- .'- **1**:服务中。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '0',
- ],
+ 'InstanceId' => ['description' => '实例ID。', 'type' => 'string', 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
+ 'GroupType' => ['description' => '查询的Group ID适用的协议。TCP协议和HTTP协议的Group ID不可以共用,需要分别创建。取值说明如下:'."\n"
+ ."\n"
+ .'- **tcp**:表示该Group ID仅适用于TCP协议的消息收发。'."\n"
+ .'- **http**:表示该Group ID仅适用于HTTP协议的消息收发。', 'type' => 'string', 'example' => 'tcp'],
],
+ 'description' => '',
],
],
],
+ 'description' => '',
],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4A978869-7681-4529-B470-107E1379****\\",\\n \\"Data\\": {\\n \\"PublishInfoDo\\": [\\n {\\n \\"MessageType\\": 0,\\n \\"RelationName\\": \\"授权发布/订阅\\",\\n \\"Owner\\": \\"138015630679****\\",\\n \\"IndependentNaming\\": true,\\n \\"Remark\\": \\"测试\\",\\n \\"Relation\\": 6,\\n \\"CreateTime\\": 1570700947000,\\n \\"Topic\\": \\"test\\",\\n \\"Tags\\": {\\n \\"Tag\\": [\\n {\\n \\"Key\\": \\"CartService\\",\\n \\"Value\\": \\"SrviceA\\"\\n }\\n ]\\n },\\n \\"InstanceId\\": \\"MQ_INST_188077086902****_BXSuW61e\\",\\n \\"ServiceStatus\\": 0\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsTopicListResponse>\\n <RequestId>4A978869-7681-4529-B470-107E1379****</RequestId>\\n <Data>\\n <MessageType>0</MessageType>\\n <RelationName>授权发布/订阅</RelationName>\\n <Owner>138015630679****</Owner>\\n <IndependentNaming>true</IndependentNaming>\\n <Remark>测试</Remark>\\n <Relation>6</Relation>\\n <CreateTime>1570700947000</CreateTime>\\n <Topic>test</Topic>\\n <Tags>\\n <Key>CartService</Key>\\n <Value>SrviceA</Value>\\n </Tags>\\n <InstanceId>MQ_INST_188077086902****_BXSuW61e</InstanceId>\\n <ServiceStatus>0</ServiceStatus>\\n </Data>\\n</OnsTopicListResponse>","errorExample":""}]',
- 'title' => '获取Topic列表信息',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>本接口一般用于生成资源列表的场景,并不查看具体信息。',
+ 'title' => '获取Group ID列表信息',
+ 'summary' => '查询指定实例下所有的Group ID信息。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => ' ',
- ],
- 'OnsTopicSubDetail' => [
- 'summary' => '查看有哪些在线订阅组订阅了这个Topic。',
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsGroupList'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'list',
+ 'ramAction' => [
+ 'action' => 'mq:ListGroup',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"16996623-AC4A-43AF-9248-FD9D2D75****\\",\\n \\"Data\\": {\\n \\"SubscribeInfoDo\\": [\\n {\\n \\"Owner\\": \\"138015630679****\\",\\n \\"UpdateTime\\": 1570700979000,\\n \\"IndependentNaming\\": true,\\n \\"GroupId\\": \\"GID_test_group_id\\",\\n \\"Remark\\": \\"test\\",\\n \\"CreateTime\\": 1568896605000,\\n \\"Tags\\": {\\n \\"Tag\\": [\\n {\\n \\"Key\\": \\"CartService\\",\\n \\"Value\\": \\"ServiceA\\"\\n }\\n ]\\n },\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\",\\n \\"GroupType\\": \\"tcp\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsGroupListResponse>\\n<RequestId>16996623-AC4A-43AF-9248-FD9D2D75****</RequestId>\\n<Data>\\n <SubscribeInfoDo>\\n <Owner>138015630679****</Owner>\\n <GroupType>tcp</GroupType>\\n <InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>\\n <CreateTime>1568896605000</CreateTime>\\n <UpdateTime>1570700979000</UpdateTime>\\n <IndependentNaming>true</IndependentNaming>\\n <GroupId>GID_test_group_id</GroupId>\\n <Remark>test</Remark>\\n <Tags>\\n <Tag>\\n <Value>ServiceA</Value>\\n <Key>CartService</Key>\\n </Tag>\\n </Tags>\\n </SubscribeInfoDo>\\n</Data>\\n</OnsGroupListResponse>","errorExample":""}]',
+ ],
+ 'OnsGroupSubDetail' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -2311,37 +1689,17 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- 'riskType' => 'none',
- 'chargeType' => 'free',
- 'abilityTreeCode' => '14953',
- 'abilityTreeNodes' => [
- 'FEATUREons8BETJT',
- ],
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的Topic所对应的实例ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '需查询的Group ID所属的实例ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
[
- 'name' => 'Topic',
+ 'name' => 'GroupId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的Topic。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'test',
- ],
+ 'schema' => ['description' => '需查询的Group ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test_group_id'],
],
],
'responses' => [
@@ -2349,11 +1707,7 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '87B6207F-2908-42B5-A134-84956DCA****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '3364E875-013B-442A-BC3C-C1A84DC6****'],
'Data' => [
'description' => '返回Data对象。',
'type' => 'object',
@@ -2363,98 +1717,91 @@
'itemNode' => true,
'properties' => [
'SubscriptionDataList' => [
- 'description' => '所有在线订阅组。',
+ 'description' => '如果Group ID所对应的消费者不在线则查不到数据。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
- 'GroupId' => [
- 'description' => '订阅该 Topic 的 Group ID。',
- 'type' => 'string',
- 'example' => 'GID_test',
- ],
- 'MessageModel' => [
- 'description' => '消费模式。取值说明如下:'."\n"
- ."\n"
- .'- CLUSTERING:集群订阅'."\n"
- .'- BROADCASTING:广播订阅'."\n"
- ."\n"
- .'消费模式的更多信息,请参见[集群消费和广播消费](~~43163~~)。',
- 'type' => 'string',
- 'example' => 'CLUSTERING',
- ],
- 'SubString' => [
- 'description' => '订阅表达式。',
- 'type' => 'string',
- 'example' => '*',
- ],
- 'Online' => [
- 'title' => '是否在线',
- 'description' => '是否在线',
- 'type' => 'string',
- 'example' => 'true',
- ],
+ 'SubString' => ['description' => '订阅表达式。', 'type' => 'string', 'example' => '*'],
+ 'Topic' => ['description' => '订阅的Topic。', 'type' => 'string', 'example' => 'test-mq_topic'],
],
+ 'description' => '',
],
],
],
+ 'description' => '',
],
- 'Topic' => [
- 'description' => 'Topic名称。',
- 'type' => 'string',
- 'example' => 'test',
- ],
+ 'GroupId' => ['description' => '需查询的Group ID。', 'type' => 'string', 'example' => 'GID_test_group_id'],
+ 'MessageModel' => ['description' => '消费模式。取值说明如下:'."\n"
+ ."\n"
+ .'- **CLUSTERING**:集群订阅'."\n"
+ ."\n"
+ .'- **BROADCASTING**:广播订阅'."\n"
+ ."\n"
+ .'消费模式的更多信息,请参见[集群消费和广播消费](~~43163~~)。', 'type' => 'string', 'example' => 'CLUSTERING'],
+ 'Online' => ['description' => '消费者是否在线。', 'type' => 'boolean', 'example' => 'true'],
],
],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"87B6207F-2908-42B5-A134-84956DCA****\\",\\n \\"Data\\": {\\n \\"SubscriptionDataList\\": {\\n \\"SubscriptionDataList\\": [\\n {\\n \\"GroupId\\": \\"GID_test\\",\\n \\"MessageModel\\": \\"CLUSTERING\\",\\n \\"SubString\\": \\"*\\",\\n \\"Online\\": \\"true\\"\\n }\\n ]\\n },\\n \\"Topic\\": \\"test\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsTopicSubDetailResponse>\\n<Data>\\n <Topic>test</Topic>\\n <SubscriptionDataList>\\n <SubscriptionDataList>\\n <SubString>*</SubString>\\n <MessageModel>CLUSTERING</MessageModel>\\n <GroupId>GID_test</GroupId>\\n </SubscriptionDataList>\\n </SubscriptionDataList>\\n</Data>\\n<RequestId>87B6207F-2908-42B5-A134-84956DCA****</RequestId>\\n</OnsTopicSubDetailResponse>","errorExample":""}]',
- 'title' => '查看Topic的订阅信息',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>该接口用于查询Group和Topic之间的订阅关系。如果Group ID对应的消费者实例不在线则查不到数据。',
+ 'title' => '查看Group ID的订阅信息',
+ 'summary' => '查看Group订阅了哪些Topic,如果Group ID对应的消费者实例不在线则查不到数据。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsTopicSubDetail**接口,您还可以通过云消息队列 RocketMQ 版控制台查看Topic和Group的订阅关系。具体操作,请参见[查看订阅关系](~~90592~~)。',
- ],
- 'OnsTopicDelete' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ .'除了调用**OnsGroupSubDetail**接口,您还可以通过云消息队列 RocketMQ 版控制台查看Topic和Group的订阅关系。具体操作,请参见[查看订阅关系](~~90592~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsGroupSubDetail'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryGroupSubDetail',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"3364E875-013B-442A-BC3C-C1A84DC6****\\",\\n \\"Data\\": {\\n \\"SubscriptionDataList\\": {\\n \\"SubscriptionDataList\\": [\\n {\\n \\"SubString\\": \\"*\\",\\n \\"Topic\\": \\"test-mq_topic\\"\\n }\\n ]\\n },\\n \\"GroupId\\": \\"GID_test_group_id\\",\\n \\"MessageModel\\": \\"CLUSTERING\\",\\n \\"Online\\": true\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsGroupSubDetailResponse>\\n<Data>\\n <MessageModel>CLUSTERING</MessageModel>\\n <Online>true</Online>\\n <SubscriptionDataList>\\n <SubscriptionDataList>\\n <SubString>*</SubString>\\n <Topic>test-mq_topic</Topic>\\n </SubscriptionDataList>\\n </SubscriptionDataList>\\n <GroupId>GID_test_group_id</GroupId>\\n</Data>\\n<RequestId>3364E875-013B-442A-BC3C-C1A84DC6****</RequestId>\\n</OnsGroupSubDetailResponse>","errorExample":""}]',
+ ],
+ 'OnsInstanceBaseInfo' => [
+ 'summary' => '调用OnsInstanceBaseInfo接口查询实例基本信息和收发消息的接入点。',
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'readAndWrite',
+ 'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [],
+ 'systemTags' => [
+ 'operationType' => 'get',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ 'abilityTreeNodes' => ['FEATUREonsHF2FLP'],
+ ],
'parameters' => [
[
- 'name' => 'Topic',
- 'in' => 'query',
- 'schema' => [
- 'description' => '指定删除的Topic。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'test',
- ],
- ],
- [
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需删除的Topic所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_188077086902****_BXSuW61e',
- ],
+ 'schema' => ['description' => '需查询实例的ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'MQ_INST_138015630679****_BAAy1Hac'],
],
],
'responses' => [
@@ -2462,38 +1809,121 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '4189D4A6-231A-4028-8D89-F66A76C1****',
+ 'InstanceBaseInfo' => [
+ 'description' => '实例信息对象。',
+ 'type' => 'object',
+ 'properties' => [
+ 'Endpoints' => [
+ 'description' => '各个协议的接入点。',
+ 'type' => 'object',
+ 'properties' => [
+ 'TcpEndpoint' => ['description' => 'TCP协议内网接入点。', 'type' => 'string', 'example' => 'http://MQ_INST_138015630679****_BAAy1Hac.cn-chengdu.mq-internal.aliyuncs.com:8080'],
+ 'TcpInternetEndpoint' => ['description' => 'TCP协议公网接入点。'."\n"
+ .'- 仅西南1(成都)、华北1(青岛)或华南1(深圳)地域的实例支持TCP协议公网接入点。'."\n"
+ .'- 若您需要使用TCP协议公网接入点,您需要将客户端SDK升级至对应版本:'."\n"
+ .' - TCP协议Java SDK:2.0.0.Final及以上版本。更多信息,请参见[Java SDK版本说明](~~325569~~)。'."\n"
+ .' - TCP协议C\\+\\+ SDK:3.0.0及以上版本。更多信息,请参见[C++ SDK版本说明](~~325570~~)。'."\n"
+ .'- 使用TCP协议公网接入点需要收取公网流量费用。具体计费信息,请参见[公网流量费用](~~325571~~)。'."\n"
+ .' '."\n"
+ ."\n", 'type' => 'string', 'example' => 'http://MQ_INST_138015630679****_BAAy1Hac.mq.cn-chengdu.aliyuncs.com:80'],
+ 'HttpInternetEndpoint' => ['description' => 'HTTP协议公网接入点。', 'type' => 'string', 'example' => 'http://138015630679****.mqrest.cn-chengdu.aliyuncs.com'],
+ 'HttpInternalEndpoint' => ['description' => 'HTTP协议内网接入点。', 'type' => 'string', 'example' => 'http://138015630679****.mqrest.cn-chengdu-internal.aliyuncs.com'],
+ 'HttpInternetSecureEndpoint' => ['description' => 'HTTPS协议公网接入点。', 'type' => 'string', 'example' => 'https://138015630679****.mqrest.cn-chengdu.aliyuncs.com'],
+ ],
+ ],
+ 'IndependentNaming' => ['description' => '实例是否有命名空间。取值说明如下:'."\n"
+ ."\n"
+ .'- **true**:拥有独立命名空间,资源命名确保实例内唯一,跨实例之间可重名。'."\n"
+ ."\n"
+ .'- **false**:无独立命名空间,实例内或者跨实例之间,资源命名必须全局唯一。', 'type' => 'boolean', 'example' => 'true'],
+ 'MaxTps' => ['description' => '消息收发TPS上限。取值如下:'."\n"
+ .'5000、10000、20000、50000、100000、200000、300000、500000、800000、1000000。'."\n"
+ ."\n"
+ .'详细的解释以购买页的说明为准。'."\n"
+ .'> 该参数仅适用于云消息队列 RocketMQ 版铂金版实例。', 'type' => 'integer', 'format' => 'int64', 'example' => '10000'],
+ 'Remark' => ['description' => '备注。', 'type' => 'string', 'example' => 'ons-cn-m7r1r5f****'],
+ 'InstanceName' => ['description' => '实例名称。'."\n"
+ ."\n"
+ .'长度限制为3~64 个字符,可以是中文、英文、数字、短划线(-)以及下划线(_)。', 'type' => 'string', 'example' => 'test'],
+ 'ReleaseTime' => ['description' => '铂金版实例过期时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1603555200000'],
+ 'TopicCapacity' => ['description' => '该实例下允许创建的Topic数量上限。取值如下:'."\n"
+ .'25、50、100、300、500。'."\n"
+ .'> 该参数仅适用于云消息队列 RocketMQ 版铂金版实例。', 'type' => 'integer', 'format' => 'int32', 'example' => '50'],
+ 'InstanceStatus' => ['description' => '实例状态。取值说明如下:'."\n"
+ ."\n"
+ .'- **0**:铂金版实例部署中'."\n"
+ ."\n"
+ .'- **2**:标准版实例已欠费'."\n"
+ ."\n"
+ .'- **5**:标准版实例或铂金版实例服务中'."\n"
+ ."\n"
+ .'- **7**:铂金版实例升级中且服务可用', 'type' => 'integer', 'format' => 'int32', 'example' => '5'],
+ 'InstanceId' => ['description' => '实例ID。', 'type' => 'string', 'example' => 'MQ_INST_138015630679****_BAAy1Hac'],
+ 'InstanceType' => ['description' => '实例类型。取值说明如下:'."\n"
+ ."\n"
+ .'- **1**:标准版(后付费)实例'."\n"
+ ."\n"
+ .'- **2**:铂金版(包年包月)实例'."\n"
+ ."\n"
+ .'云消息队列 RocketMQ 版的实例类型和规格信息,请参见[实例规格](~~185261~~)。', 'type' => 'integer', 'format' => 'int32', 'example' => '2'],
+ 'CreateTime' => ['description' => '实例的创建时间。'."\n"
+ .'该参数值的格式为毫秒级Unix时间戳。', 'type' => 'string', 'example' => '1570701259403'],
+ 'spInstanceId' => ['description' => '实例的商品售卖ID。', 'type' => 'string', 'example' => 'ons-cn-m7r1r5f****'],
+ 'spInstanceType' => [
+ 'description' => '实例的售卖类型。',
+ 'type' => 'integer',
+ 'format' => 'int32',
+ 'enumValueTitles' => [1 => '标准版(后付费)实例', '铂金版(包年包月)实例'],
+ 'example' => '1',
+ ],
+ 'SupportClassic' => ['title' => '是否支持经典网络'."\n"
+ .'0:未知'."\n"
+ .'1:支持'."\n"
+ .'2:不支持', 'type' => 'integer', 'format' => 'int32', 'example' => '2'],
+ ],
],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '6CC46974-65E8-4C20-AB07-D20D102E****'],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4189D4A6-231A-4028-8D89-F66A76C1****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsTopicDeleteResponse>\\r\\n<RequestId>4189D4A6-231A-4028-8D89-F66A76C1****</RequestId>\\r\\n</OnsTopicDeleteResponse>","errorExample":""}]',
- 'title' => '删除Topic',
- 'summary' => '调用OnsTopicDelete接口删除指定的Topic。',
- 'description' => '><notice>'."\n"
- .'- 阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。'."\n"
- .'- 删除Topic将导致该Topic下所有的发布订阅关系同时被清理,请慎重调用。></notice>'."\n"
- .'本接口一般是在应用下线等资源回收场景下使用。'."\n"
- .'Topic删除时后台需要做资源回收,速度较慢,因此不建议删除后立即又重新创建。如果删除失败,请根据错误码进行处理。'."\n",
+ 'title' => '查询实例基本信息和收发消息的接入点',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
+ .'客户端需要通过接入点接入云消息队列 RocketMQ 版完成消息的收发,可通过调用本接口查询实例接入点。',
'requestParamsDescription' => ' ',
- 'extraInfo' => '## 控制台操作'."\n"
- ."\n"
- .'除了调用**OnsTopicDelete**接口,您还可以通过云消息队列 RocketMQ 版控制台删除Topic。具体操作,请参见[Topic管理](~~199535~~)。',
- ],
- 'OnsGroupCreate' => [
- 'summary' => '调用OnsGroupCreate创建客户端Group ID。',
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ 'responseParamsDescription' => ' ',
+ 'extraInfo' => ' ',
+ 'changeSet' => [
+ ['createdAt' => '2022-09-14T08:42:40.000Z', 'description' => '响应参数发生变更'],
+ ['createdAt' => '2022-09-14T08:42:40.000Z', 'description' => '响应参数发生变更'],
+ ['createdAt' => '2021-09-14T06:04:43.000Z', 'description' => '响应参数发生变更'],
+ ['createdAt' => '2021-09-14T06:04:43.000Z', 'description' => '响应参数发生变更'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '3000', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsInstanceBaseInfo'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryInstanceBaseInfo',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"InstanceBaseInfo\\": {\\n \\"Endpoints\\": {\\n \\"TcpEndpoint\\": \\"http://MQ_INST_138015630679****_BAAy1Hac.cn-chengdu.mq-internal.aliyuncs.com:8080\\",\\n \\"TcpInternetEndpoint\\": \\"http://MQ_INST_138015630679****_BAAy1Hac.mq.cn-chengdu.aliyuncs.com:80\\",\\n \\"HttpInternetEndpoint\\": \\"http://138015630679****.mqrest.cn-chengdu.aliyuncs.com\\",\\n \\"HttpInternalEndpoint\\": \\"http://138015630679****.mqrest.cn-chengdu-internal.aliyuncs.com\\",\\n \\"HttpInternetSecureEndpoint\\": \\"https://138015630679****.mqrest.cn-chengdu.aliyuncs.com\\"\\n },\\n \\"IndependentNaming\\": true,\\n \\"MaxTps\\": 10000,\\n \\"Remark\\": \\"ons-cn-m7r1r5f****\\",\\n \\"InstanceName\\": \\"test\\",\\n \\"ReleaseTime\\": 1603555200000,\\n \\"TopicCapacity\\": 50,\\n \\"InstanceStatus\\": 5,\\n \\"InstanceId\\": \\"MQ_INST_138015630679****_BAAy1Hac\\",\\n \\"InstanceType\\": 2,\\n \\"CreateTime\\": \\"1570701259403\\",\\n \\"spInstanceId\\": \\"ons-cn-m7r1r5f****\\",\\n \\"spInstanceType\\": 1,\\n \\"SupportClassic\\": 2\\n },\\n \\"RequestId\\": \\"6CC46974-65E8-4C20-AB07-D20D102E****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsInstanceBaseInfoResponse>\\n <InstanceBaseInfo>\\n <Endpoints>\\n <TcpEndpoint>http://MQ_INST_138015630679****_BAAy1Hac.cn-chengdu.mq-internal.aliyuncs.com:8080</TcpEndpoint>\\n <HttpInternetEndpoint>http://138015630679****.mqrest.cn-chengdu.aliyuncs.com</HttpInternetEndpoint>\\n <HttpInternalEndpoint>http://138015630679****.mqrest.cn-chengdu-internal.aliyuncs.com</HttpInternalEndpoint>\\n <HttpInternetSecureEndpoint>https://138015630679****.mqrest.cn-chengdu.aliyuncs.com</HttpInternetSecureEndpoint>\\n <TcpInternetEndpoint>http://MQ_INST_138015630679****_BAAy1Hac.mq.cn-chengdu.aliyuncs.com:80</TcpInternetEndpoint>\\n </Endpoints>\\n <IndependentNaming>true</IndependentNaming>\\n <MaxTps>10000</MaxTps>\\n <Remark>onspre-cn-m7r1r5f****</Remark>\\n <InstanceName>test</InstanceName>\\n <ReleaseTime>1603555200000</ReleaseTime>\\n <TopicCapacity>50</TopicCapacity>\\n <InstanceStatus>5</InstanceStatus>\\n <InstanceId>MQ_INST_138015630679****_BAAy1Hac</InstanceId>\\n <InstanceType>2</InstanceType>\\n </InstanceBaseInfo>\\n <RequestId>6CC46974-65E8-4C20-AB07-D20D102E****</RequestId>\\n</OnsInstanceBaseInfoResponse>","errorExample":""}]',
+ ],
+ 'OnsInstanceCreate' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -2503,108 +1933,81 @@
'deprecated' => false,
'systemTags' => [
'operationType' => 'create',
+ 'abilityTreeCode' => '14930',
+ 'abilityTreeNodes' => ['FEATUREonsWNMPZ3'],
+ 'tenantRelevance' => 'publicInformation',
],
'parameters' => [
[
- 'name' => 'GroupId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '创建的消息消费集群的Group ID。取值说明如下:'."\n"
- ."\n"
- .'- 长度限制为2~64个字符,只能包含字母、数字、短划线(-)和下划线(_)。'."\n"
- ."\n"
- .'- 若创建的Group所在实例有命名空间,则Group ID需要保证实例内唯一,不能和本实例下已有的Group ID或Topic名称重复;跨实例之间可以重名,例如实例A的Group ID可以和实例B的Group ID重复,也可以和实例B的Topic名称重复。'."\n"
- ."\n"
- .'- 若创建的Group所在实例无命名空间,则Group ID需要保证跨实例和跨地域全局唯一,全局范围内不能和已有的Group ID或Topic名称重复。'."\n"
- ."\n\n"
- .'> - Group ID创建后,将无法再修改。'."\n"
- .'- 实例是否有命名空间,可以在消息队列RocketMQ版控制台**实例详情**页面的**基础信息区域**查看。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'GID_test_groupId',
- ],
- ],
- [
'name' => 'Remark',
'in' => 'query',
- 'schema' => [
- 'description' => '备注。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'test',
- ],
- ],
- [
- 'name' => 'InstanceId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '需创建的Group ID所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '实例的描述信息。', 'type' => 'string', 'required' => false, 'example' => '备注说明'],
],
[
- 'name' => 'GroupType',
+ 'name' => 'InstanceName',
'in' => 'query',
- 'schema' => [
- 'description' => '指定创建的Group ID适用的协议。TCP协议和HTTP协议的Group ID不可以共用,需要分别创建。取值说明如下:'."\n"
- ."\n"
- .'- **tcp**:默认值,表示创建的Group ID仅适用于TCP协议的消息收发。'."\n"
- .'- **http**:表示创建的Group ID仅适用于HTTP协议的消息收发。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'tcp',
- 'default' => 'tcp',
- ],
+ 'schema' => ['description' => '实例名称。取值说明如下:'."\n"
+ .'- 实例名称在该实例所部署的地域下要唯一,不可重名。'."\n"
+ ."\n"
+ .'- 长度限制为3~64个字符,可以是中文、英文、数字、短划线(-)以及下划线(_)。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '测试实例'],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => '返回信息。',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****',
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****'],
+ 'Data' => [
+ 'description' => '返回结果。',
+ 'type' => 'object',
+ 'properties' => [
+ 'InstanceId' => ['description' => '创建的实例ID。', 'type' => 'string', 'example' => 'MQ_INST_188077086902****_BXSuW61e'],
+ 'InstanceType' => ['description' => '创建的实例类型,取值说明如下:'."\n"
+ ."\n"
+ .'- **1**:标准版实例'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '1'],
+ ],
],
],
+ 'description' => '',
],
],
],
- 'errorCodes' => [
- 400 => [
- [
- 'errorCode' => '%s',
- 'errorMessage' => '%s, please check and retry later',
- ],
- [
- 'errorCode' => 'Group.NumLimited',
- 'errorMessage' => 'group count exceed limit.',
- ],
- ],
- ],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsGroupCreateResponse>\\r\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\r\\n</OnsGroupCreateResponse>","errorExample":""}]',
- 'title' => '创建客户端Group ID',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>本接口一般是在发布新应用、业务逻辑实现等需要新的Group的情况下使用。'."\n",
+ 'title' => '创建实例',
+ 'summary' => '调用OnsInstanceCreate接口创建实例。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
+ .'实例是用于云消息队列 RocketMQ 版服务的虚拟机资源,用来存储Topic和Group信息。该接口一般在新业务发布需要创建新的服务资源的情况下使用。'."\n"
+ .' '."\n"
+ .'该接口只支持创建标准版实例,不支持创建铂金版实例。云消息队列 RocketMQ 版控制台同时支持创建标准版实例和铂金版实例,具体操作,请参见[实例管理](~~200153~~)。',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsGroupCreate**接口,您还可以通过消息队列RocketMQ版控制台创建Group ID。具体操作,请参见[Group管理](~~200386~~)。',
- ],
- 'OnsGroupConsumerUpdate' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ .'除了调用**OnsInstanceCreate**接口,您还可以通过云消息队列 RocketMQ 版控制台创建实例。具体操作,请参见[实例管理](~~200153~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsInstanceCreate'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'create',
+ 'ramAction' => [
+ 'action' => 'mq:CreateInstance',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\",\\n \\"Data\\": {\\n \\"InstanceId\\": \\"MQ_INST_188077086902****_BXSuW61e\\",\\n \\"InstanceType\\": 1\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsInstanceCreateResponse>\\n<Data>\\n <InstanceId>MQ_INST_188077086902****_BXSuW61e</InstanceId>\\n <InstanceType>1</InstanceType>\\n</Data>\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\n</OnsInstanceCreateResponse>","errorExample":""}]',
+ ],
+ 'OnsInstanceDelete' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -2615,43 +2018,9 @@
'systemTags' => [],
'parameters' => [
[
- 'name' => 'GroupId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '需配置的Group ID。 ',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'GID_test_groupId',
- ],
- ],
- [
- 'name' => 'ReadEnable',
- 'in' => 'query',
- 'schema' => [
- 'description' => '设置Group ID对应的消费者集群是否有读取消息权限。取值说明如下:'."\n"
- ."\n"
- .'- **true**:指定Group ID对应的消费者集群有读消息权限。'."\n"
- ."\n"
- .'- **false**:指定Group ID对应的消费者集群没有读消息权限。'."\n"
- ."\n"
- .'默认值为**true**。',
- 'type' => 'boolean',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'true',
- ],
- ],
- [
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需配置的Group ID所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '实例ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'MQ_INST_188077086902****_BXSuW61e'],
],
],
'responses' => [
@@ -2659,32 +2028,50 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****'],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsGroupConsumerUpdateResponse>\\r\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\r\\n</OnsGroupConsumerUpdateResponse>","errorExample":""}]',
- 'title' => '配置消费集群的消息读取权限',
- 'summary' => '配置指定Group ID对应的消费集群的消息读取权限。本接口一般用于禁止特定Group ID读取消息的场景。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>',
+ 'title' => '删除实例',
+ 'summary' => '调用OnsInstanceDelete接口删除云消息队列 RocketMQ 版实例。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
+ ."\n"
+ .'- 该接口一般是在应用下线等资源回收场景下使用。待删除实例下的Topic和Group为空时才可删除。'."\n"
+ .'- 实例删除后将无法恢复,请慎重调用。'."\n",
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
- 'extraInfo' => ' ',
- ],
- 'OnsGroupList' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ 'extraInfo' => '## 控制台操作'."\n"
+ .'除了调用**OnsInstanceDelete**接口,您还可以通过云消息队列 RocketMQ 版控制台删除指定实例。具体操作,请参见[实例管理](~~200153~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsInstanceDelete'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'mq:DeleteInstance',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsInstanceDeleteResponse>\\r\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\r\\n</OnsInstanceDeleteResponse>","errorExample":""}]',
+ ],
+ 'OnsInstanceInServiceList' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -2694,73 +2081,29 @@
'deprecated' => false,
'systemTags' => [
'operationType' => 'list',
+ 'abilityTreeCode' => '14932',
+ 'abilityTreeNodes' => ['FEATUREonsICR0M4'],
],
'parameters' => [
[
- 'name' => 'InstanceId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '需获取资源列表的Group ID所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
- ],
- [
- 'name' => 'GroupId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '模糊查询指定Group ID时设置,否则查询所有Group ID。'."\n"
- ."\n"
- .'如果输入GID\\_ABC查询,那么会以前后缀匹配的方式进行模糊查询,返回所有包含\\*GID\\_ABC\\*的Group ID,例如GID\\_test\\_GID\\_ABC\\_123、GID\\_ABC\\_356。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'GID_test_group_id',
- ],
- ],
- [
- 'name' => 'GroupType',
- 'in' => 'query',
- 'schema' => [
- 'description' => '查询的Group ID适用的协议。TCP协议和HTTP协议的Group ID不可以共用,需要分别创建。取值说明如下:'."\n"
- ."\n"
- .'- **tcp**:默认值,表示该Group ID仅适用于TCP协议的消息收发。'."\n"
- .'- **http**:表示该Group ID仅适用于HTTP协议的消息收发。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'tcp',
- 'default' => 'tcp',
- ],
- ],
- [
'name' => 'Tag',
'in' => 'query',
'style' => 'repeatList',
'schema' => [
- 'description' => 'Group ID所绑定的标签列表。列表元素个数不得超过 20。',
+ 'description' => '实例所绑定的标签列表。列表元素个数不得超过 20。',
'type' => 'array',
'items' => [
+ 'description' => '实例所绑定的标签。',
'type' => 'object',
'properties' => [
- 'Key' => [
- 'description' => 'Group ID的标签键。**Key**和**Value**值必须同时输入或同时不输入。若同时输入表示根据Tag过滤符合条件的Group ID,若不输入表示查询所有Group ID。'."\n"
- ."\n"
- .'- 如果输入该值,则取值不允许为空字符串。'."\n"
- .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'CartService',
- ],
- 'Value' => [
- 'description' => 'Group ID的标签值。**Key**和**Value**值必须同时输入或同时不输入。若同时输入表示根据Tag过滤符合条件的Group ID,若不输入表示查询所有Group ID。'."\n"
- ."\n"
- .'- 如果输入该值,取值允许为空字符串。'."\n"
- .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'ServiceA',
- ],
+ 'Key' => ['description' => '实例的标签键。**Key**和**Value**值必须同时输入或同时不输入。若同时输入表示根据Tag过滤符合条件的实例,若不输入表示查询所有实例。'."\n"
+ ."\n"
+ .'- 如果输入该值,则取值不允许为空字符串。'."\n"
+ .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => false, 'example' => 'CartService'],
+ 'Value' => ['description' => '资源的标签值。**Key**和**Value**值必须同时输入或同时不输入。若同时输入表示根据Tag过滤符合条件的实例,若不输入表示查询所有实例。'."\n"
+ ."\n"
+ .'- 如果输入该值,取值允许为空字符串。'."\n"
+ .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => false, 'example' => 'SericeA'],
],
'required' => false,
],
@@ -2768,245 +2111,122 @@
'maxItems' => 21,
],
],
+ [
+ 'name' => 'NeedResourceInfo',
+ 'in' => 'query',
+ 'schema' => ['description' => '是否需要资源统计信息。即实例下Topic的数量和Group的数量。', 'type' => 'boolean', 'required' => false, 'example' => 'true'],
+ ],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '16996623-AC4A-43AF-9248-FD9D2D75****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '0598E46F-DB06-40E2-AD7B-C45923EE****'],
'Data' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
- 'SubscribeInfoDo' => [
- 'description' => '查询到的订阅关系集合。',
+ 'InstanceVO' => [
+ 'description' => '返回所有已发布的实例信息列表。',
'type' => 'array',
'items' => [
+ 'description' => '返回所有已发布的实例信息列表。',
'type' => 'object',
'properties' => [
- 'Owner' => [
- 'description' => '该发布信息的拥有者。',
- 'type' => 'string',
- 'example' => '138015630679****',
- ],
- 'UpdateTime' => [
- 'description' => '该Group ID的更新时间。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570700979000',
- ],
- 'IndependentNaming' => [
- 'description' => '实例是否有命名空间。取值说明如下:'."\n"
- ."\n"
- .'- **true**:拥有独立命名空间,资源命名确保实例内唯一,跨实例之间可重名。'."\n"
- ."\n"
- .'- **false**:无独立命名空间,实例内或者跨实例之间,资源命名必须全局唯一。',
- 'type' => 'boolean',
- 'example' => 'true',
- ],
- 'GroupId' => [
- 'description' => 'Group ID即消费集群组ID。',
- 'type' => 'string',
- 'example' => 'GID_test_group_id',
- ],
- 'Remark' => [
- 'description' => '备注。',
- 'type' => 'string',
- 'example' => 'test',
- ],
- 'CreateTime' => [
- 'description' => 'Group ID的创建时间。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1568896605000',
- ],
+ 'IndependentNaming' => ['description' => '实例是否有命名空间。取值说明如下:'."\n"
+ ."\n"
+ .'- **true**:拥有独立命名空间,资源命名确保实例内唯一,跨实例之间可重名。'."\n"
+ ."\n"
+ .'- **false**:无独立命名空间,实例内或者跨实例之间,资源命名必须全局唯一。', 'type' => 'boolean', 'example' => 'true'],
+ 'InstanceName' => ['description' => '实例名称。', 'type' => 'string', 'example' => 'test1'],
+ 'ReleaseTime' => ['description' => '铂金版实例的过期时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1551024000000'],
+ 'InstanceStatus' => ['description' => '实例状态。取值说明如下:'."\n"
+ ."\n"
+ .'- **0**:铂金版实例部署中'."\n"
+ ."\n"
+ .'- **2**:标准版实例已欠费'."\n"
+ ."\n"
+ .'- **5**:标准版实例或铂金版实例服务中'."\n"
+ ."\n"
+ .'- **7**:铂金版实例升级中且服务可用', 'type' => 'integer', 'format' => 'int32', 'example' => '5'],
'Tags' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'Tag' => [
- 'description' => 'Group ID所绑定的标签。',
+ 'description' => '实例所绑定的标签。',
'type' => 'array',
'items' => [
+ 'description' => '实例所绑定的标签。',
'type' => 'object',
'properties' => [
- 'Key' => [
- 'description' => '标签键。',
- 'type' => 'string',
- 'example' => 'CartService',
- ],
- 'Value' => [
- 'description' => '标签值。',
- 'type' => 'string',
- 'example' => 'ServiceA',
- ],
+ 'Key' => ['description' => '标签键。', 'type' => 'string', 'example' => 'CartService'],
+ 'Value' => ['description' => '标签值。', 'type' => 'string', 'example' => 'ServiceA'],
],
],
],
],
+ 'description' => '',
],
- 'InstanceId' => [
- 'description' => '实例ID。',
- 'type' => 'string',
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
- 'GroupType' => [
- 'description' => '查询的Group ID适用的协议。TCP协议和HTTP协议的Group ID不可以共用,需要分别创建。取值说明如下:'."\n"
- ."\n"
- .'- **tcp**:表示该Group ID仅适用于TCP协议的消息收发。'."\n"
- .'- **http**:表示该Group ID仅适用于HTTP协议的消息收发。',
- 'type' => 'string',
- 'example' => 'tcp',
- ],
+ 'InstanceId' => ['description' => '实例ID。', 'type' => 'string', 'example' => 'MQ_INST_188077086902****_BXSuW61e'],
+ 'InstanceType' => ['description' => '实例类型。取值说明如下:'."\n"
+ ."\n"
+ .'- **1**:标准版实例'."\n"
+ ."\n"
+ .'- **2**:铂金版实例'."\n"
+ ."\n"
+ .'各类型实例的规格和差异说明,请参见[实例规格](~~185261~~)。', 'type' => 'integer', 'format' => 'int32', 'example' => '2'],
+ 'CreateTime' => ['description' => '实例的创建时间。'."\n"
+ .'该参数值的格式为毫秒级Unix时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1640847284000'],
+ 'TopicCount' => ['description' => '主题数量。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'],
+ 'GroupCount' => ['description' => '消费者分组数量。', 'type' => 'integer', 'format' => 'int32', 'example' => '3'],
],
],
],
],
+ 'description' => '',
],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"16996623-AC4A-43AF-9248-FD9D2D75****\\",\\n \\"Data\\": {\\n \\"SubscribeInfoDo\\": [\\n {\\n \\"Owner\\": \\"138015630679****\\",\\n \\"UpdateTime\\": 1570700979000,\\n \\"IndependentNaming\\": true,\\n \\"GroupId\\": \\"GID_test_group_id\\",\\n \\"Remark\\": \\"test\\",\\n \\"CreateTime\\": 1568896605000,\\n \\"Tags\\": {\\n \\"Tag\\": [\\n {\\n \\"Key\\": \\"CartService\\",\\n \\"Value\\": \\"ServiceA\\"\\n }\\n ]\\n },\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\",\\n \\"GroupType\\": \\"tcp\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsGroupListResponse>\\n<RequestId>16996623-AC4A-43AF-9248-FD9D2D75****</RequestId>\\n<Data>\\n <SubscribeInfoDo>\\n <Owner>138015630679****</Owner>\\n <GroupType>tcp</GroupType>\\n <InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>\\n <CreateTime>1568896605000</CreateTime>\\n <UpdateTime>1570700979000</UpdateTime>\\n <IndependentNaming>true</IndependentNaming>\\n <GroupId>GID_test_group_id</GroupId>\\n <Remark>test</Remark>\\n <Tags>\\n <Tag>\\n <Value>ServiceA</Value>\\n <Key>CartService</Key>\\n </Tag>\\n </Tags>\\n </SubscribeInfoDo>\\n</Data>\\n</OnsGroupListResponse>","errorExample":""}]',
- 'title' => '获取Group ID列表信息',
- 'summary' => '查询指定实例下所有的Group ID信息。',
+ 'title' => '查询指定地域下实例列表',
+ 'summary' => '查询当前账号在指定地域(Region)下所有的云消息队列 RocketMQ 版4.x实例信息。',
'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => ' ',
- ],
- 'OnsGroupSubDetail' => [
- 'methods' => [
- 'post',
- 'get',
+ 'changeSet' => [
+ ['createdAt' => '2023-08-22T02:49:03.000Z', 'description' => '请求参数发生变更、响应参数发生变更'],
+ ['createdAt' => '2022-09-19T08:37:30.000Z', 'description' => '响应参数发生变更'],
],
- 'schemes' => [
- 'http',
- 'https',
- ],
- 'security' => [
- [
- 'AK' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '3000', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsInstanceInServiceList'],
],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
],
- 'operationType' => 'read',
- 'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
- 'parameters' => [
- [
- 'name' => 'InstanceId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '需查询的Group ID所属的实例ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
- ],
+ 'ramActions' => [
[
- 'name' => 'GroupId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '需查询的Group ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'GID_test_group_id',
- ],
- ],
- ],
- 'responses' => [
- 200 => [
- 'schema' => [
- 'type' => 'object',
- 'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '3364E875-013B-442A-BC3C-C1A84DC6****',
- ],
- 'Data' => [
- 'description' => '返回Data对象。',
- 'type' => 'object',
- 'properties' => [
- 'SubscriptionDataList' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'SubscriptionDataList' => [
- 'description' => '如果Group ID所对应的消费者不在线则查不到数据。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'SubString' => [
- 'description' => '订阅表达式。',
- 'type' => 'string',
- 'example' => '*',
- ],
- 'Topic' => [
- 'description' => '订阅的Topic。',
- 'type' => 'string',
- 'example' => 'test-mq_topic',
- ],
- ],
- ],
- ],
- ],
- ],
- 'GroupId' => [
- 'description' => '需查询的Group ID。',
- 'type' => 'string',
- 'example' => 'GID_test_group_id',
- ],
- 'MessageModel' => [
- 'description' => '消费模式。取值说明如下:'."\n"
- ."\n"
- .'- **CLUSTERING**:集群订阅'."\n"
- ."\n"
- .'- **BROADCASTING**:广播订阅'."\n"
- ."\n"
- .'消费模式的更多信息,请参见[集群消费和广播消费](~~43163~~)。',
- 'type' => 'string',
- 'example' => 'CLUSTERING',
- ],
- 'Online' => [
- 'description' => '消费者是否在线。',
- 'type' => 'boolean',
- 'example' => 'true',
- ],
- ],
- ],
+ 'operationType' => 'list',
+ 'ramAction' => [
+ 'action' => 'mq:QueryInstanceBaseInfo',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
],
],
+ 'additionalActions' => [],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"3364E875-013B-442A-BC3C-C1A84DC6****\\",\\n \\"Data\\": {\\n \\"SubscriptionDataList\\": {\\n \\"SubscriptionDataList\\": [\\n {\\n \\"SubString\\": \\"*\\",\\n \\"Topic\\": \\"test-mq_topic\\"\\n }\\n ]\\n },\\n \\"GroupId\\": \\"GID_test_group_id\\",\\n \\"MessageModel\\": \\"CLUSTERING\\",\\n \\"Online\\": true\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsGroupSubDetailResponse>\\n<Data>\\n <MessageModel>CLUSTERING</MessageModel>\\n <Online>true</Online>\\n <SubscriptionDataList>\\n <SubscriptionDataList>\\n <SubString>*</SubString>\\n <Topic>test-mq_topic</Topic>\\n </SubscriptionDataList>\\n </SubscriptionDataList>\\n <GroupId>GID_test_group_id</GroupId>\\n</Data>\\n<RequestId>3364E875-013B-442A-BC3C-C1A84DC6****</RequestId>\\n</OnsGroupSubDetailResponse>","errorExample":""}]',
- 'title' => '查看Group ID的订阅信息',
- 'summary' => '查看Group订阅了哪些Topic,如果Group ID对应的消费者实例不在线则查不到数据。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
- 'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsGroupSubDetail**接口,您还可以通过云消息队列 RocketMQ 版控制台查看Topic和Group的订阅关系。具体操作,请参见[查看订阅关系](~~90592~~)。',
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"0598E46F-DB06-40E2-AD7B-C45923EE****\\",\\n \\"Data\\": {\\n \\"InstanceVO\\": [\\n {\\n \\"IndependentNaming\\": true,\\n \\"InstanceName\\": \\"test1\\",\\n \\"ReleaseTime\\": 1551024000000,\\n \\"InstanceStatus\\": 5,\\n \\"Tags\\": {\\n \\"Tag\\": [\\n {\\n \\"Key\\": \\"CartService\\",\\n \\"Value\\": \\"ServiceA\\"\\n }\\n ]\\n },\\n \\"InstanceId\\": \\"MQ_INST_188077086902****_BXSuW61e\\",\\n \\"InstanceType\\": 2,\\n \\"CreateTime\\": 1640847284000,\\n \\"TopicCount\\": 1,\\n \\"GroupCount\\": 3\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsInstanceInServiceListResponse>\\n<RequestId>0598E46F-DB06-40E2-AD7B-C45923EE****</RequestId>\\n<Data>\\n <InstanceVO>\\n <InstanceName>test1</InstanceName>\\n <InstanceId>MQ_INST_188077086902****_BXSuW61e</InstanceId>\\n <ReleaseTime>1551024000000</ReleaseTime>\\n <InstanceStatus>5</InstanceStatus>\\n <IndependentNaming>true</IndependentNaming>\\n <InstanceType>2</InstanceType>\\n <Tags>\\n <Tag>\\n <Value>ServiceA</Value>\\n <Key>CartService</Key>\\n </Tag>\\n </Tags>\\n </InstanceVO>\\n</Data>\\n</OnsInstanceInServiceListResponse>","errorExample":""}]',
],
- 'OnsGroupDelete' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'OnsInstanceUpdate' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -3014,31 +2234,27 @@
],
'operationType' => 'readAndWrite',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'delete',
- ],
+ 'systemTags' => [],
'parameters' => [
[
- 'name' => 'GroupId',
+ 'name' => 'Remark',
'in' => 'query',
- 'schema' => [
- 'description' => '待删除的消息消费集群的Group ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'GID_test_groupId',
- ],
+ 'schema' => ['description' => '更新后的实例描述,传空值则不更新。', 'type' => 'string', 'required' => false, 'example' => '备注更新'],
+ ],
+ [
+ 'name' => 'InstanceName',
+ 'in' => 'query',
+ 'schema' => ['description' => '更新后的实例名称。取值说明如下:'."\n"
+ .'- 实例名称在该实例所部署的地域下要唯一,不可重名。'."\n"
+ ."\n"
+ .'- 长度限制为3~64个字符,可以是中文、英文、数字、短划线(-)以及下划线(_)。'."\n"
+ ."\n"
+ .'- 传空值则不更新。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => '名字更新'],
],
[
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '待删除的Group所属的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '待更新名称或描述的实例ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'MQ_INST_188077086902****_BXSuW61e'],
],
],
'responses' => [
@@ -3046,40 +2262,47 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****'],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsGroupDeleteResponse>\\r\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\r\\n</OnsGroupDeleteResponse>","errorExample":""}]',
- 'title' => '删除Group',
- 'summary' => '调用OnsGroupDelete删除Group。',
- 'description' => '><notice>'."\n"
- ."\n"
- .'- 阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。'."\n"
- ."\n"
- .'- 删除Group后,由Group ID标识的消费者实例将立即停止接收消息,请慎重调用。'."\n"
- .'></notice>'."\n"
- .'本接口一般是在应用下线等资源回收场景下使用。Group删除时后台需要做资源回收,速度较慢,因此不建议删除后立即又重新创建。如果删除失败,请根据错误码进行处理。'."\n"
- ."\n",
+ 'title' => '更新实例名称和描述',
+ 'summary' => '调用OnsInstanceUpdate接口更新实例名称和描述。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsGroupDelete**接口,您还可以通过云消息队列 RocketMQ 版控制台删除Group ID。具体操作,请参见[Group管理](~~200386~~)。',
- ],
- 'ListTagResources' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ .'除了调用**OnsInstanceUpdate**接口,您还可以通过云消息队列 RocketMQ 版控制台更新实例名称和描述。具体操作,请参见[实例管理](~~200153~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsInstanceUpdate'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'mq:UpdateInstance',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsInstanceUpdateResponse>\\r\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\r\\n</OnsInstanceUpdateResponse>","errorExample":""}]',
+ ],
+ 'OnsMessageDetail' => [
+ 'methods' => ['get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -3087,400 +2310,269 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
- 'description' => '需查询的标签所绑定资源所在的实例ID。'."\n"
- .'> 如果您需查询的是Topic、Group的标签,则必须填写该参数。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => false,
- 'example' => 'MQ_INST_188077086902****_BXSuW61e',
- ],
- ],
- [
- 'name' => 'ResourceType',
- 'in' => 'query',
- 'schema' => [
- 'description' => '资源类型。枚举类型。取值如下:'."\n"
- ."\n"
- .'- **INSTANCE**'."\n"
- .'- **TOPIC**'."\n"
- .'- **GROUP**',
+ 'description' => '云消息队列 RocketMQ 版实例ID。',
'type' => 'string',
'required' => true,
- 'docRequired' => true,
- 'example' => 'TOPIC',
+ 'enumValueTitles' => [],
+ 'example' => 'MQ_INST_184681981******_BXig0x6A',
],
],
[
- 'name' => 'NextToken',
+ 'name' => 'Topic',
'in' => 'query',
- 'schema' => [
- 'description' => '下一页查询开始的Token。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'caeba0****be03f84eb48b699f0a4883',
- ],
+ 'schema' => ['description' => '需查询的消息的Topic名称。', 'type' => 'string', 'required' => true, 'example' => 'test-mq_topic'],
],
[
- 'name' => 'Tag',
- 'in' => 'query',
- 'style' => 'repeatList',
- 'schema' => [
- 'description' => '标签列表。列表元素个数不得超过 20。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Key' => [
- 'description' => '资源的标签键。'."\n"
- ."\n"
- .'- 若输入该参数,则参数取值不允许为空字符串。'."\n"
- .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'CartService',
- ],
- 'Value' => [
- 'description' => '资源的标签值。'."\n"
- ."\n"
- .'- 若输入该参数,参数取值允许为空字符串。'."\n"
- .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'ServiceA',
- ],
- ],
- 'required' => false,
- ],
- 'required' => false,
- 'maxItems' => 21,
- ],
- ],
- [
- 'name' => 'ResourceId',
+ 'name' => 'MsgId',
'in' => 'query',
- 'style' => 'repeatList',
- 'schema' => [
- 'description' => '资源ID列表。',
- 'type' => 'array',
- 'items' => [
- 'description' => '需要查询的资源ID。'."\n"
- ."\n"
- .'- 当需要查询的标签绑定的资源类型为实例时,该参数输入实例ID。'."\n"
- ."\n"
- .'- 当需要查询的标签绑定的资源类型为Topic时,该参数输入Topic名称。'."\n"
- ."\n"
- .'- 当需要查询的标签绑定的资源类型为Group时,该参数输入Group ID。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'test',
- ],
- 'required' => false,
- 'example' => 'TopicA',
- 'maxItems' => 51,
- ],
+ 'schema' => ['description' => '需查询的消息的ID,即Message ID。', 'type' => 'string', 'required' => true, 'example' => '1E0578FE110F18B4AAC235C0******'],
],
],
'responses' => [
200 => [
+ 'headers' => [],
'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'NextToken' => [
- 'description' => '下一页查询开始的Token。',
- 'type' => 'string',
- 'example' => 'caeba0****be03f84eb48b699f0a4883',
- ],
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '301D2CBE-66F8-403D-AEC0-82582478****',
- ],
- 'TagResources' => [
- 'description' => '由资源及其标签组成的集合,包含了资源ID、资源类型和标签键值等信息。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'ResourceType' => [
- 'description' => '资源类型。'."\n"
- ."\n"
- .'- ALIYUN::MQ::INSTANCE:表示资源类型为实例。'."\n"
- .'- ALIYUN::MQ::TOPIC:表示资源类型为Topic。'."\n"
- .'- ALIYUN::MQ::GROUP:表示资源类型为Group。',
- 'type' => 'string',
- 'example' => 'ALIYUN::MQ::TOPIC',
- ],
- 'InstanceId' => [
- 'description' => '实例ID。',
- 'type' => 'string',
- 'example' => 'MQ_INST_188077086902****_BXSuW61e',
- ],
- 'TagValue' => [
- 'description' => '标签值。',
- 'type' => 'string',
- 'example' => 'ServiceA',
- ],
- 'ResourceId' => [
- 'description' => '资源ID。',
- 'type' => 'string',
- 'example' => 'TopicA',
- ],
- 'TagKey' => [
- 'description' => '标签键。',
- 'type' => 'string',
- 'example' => 'CartService',
+ 'RequestId' => ['title' => 'Id of the request', 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'EAE5BE23-37A1-4354-94D6-E44AE17E****'],
+ 'Data' => [
+ 'description' => '查询结果。',
+ 'type' => 'object',
+ 'properties' => [
+ 'StoreSize' => ['description' => '消息大小。单位:KB。', 'type' => 'integer', 'format' => 'int32', 'example' => '2'],
+ 'ReconsumeTimes' => ['description' => '消息重试消费的次数。', 'type' => 'integer', 'format' => 'int32', 'example' => '0'],
+ 'StoreTimestamp' => ['description' => '消息被服务端存储的时间戳。单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570761026708'],
+ 'Body' => ['description' => '消息体内容经过Base 64算法加密后的字符串。', 'type' => 'string', 'example' => 'aGVsbG8='],
+ 'InstanceId' => ['description' => '云消息队列 RocketMQ 版实例ID。', 'type' => 'string', 'example' => 'MQ_INST_184681981******_BXig0x6A'],
+ 'MsgId' => ['description' => '消息ID,即Message ID。', 'type' => 'string', 'example' => '1E0578FE110F18B4AAC235C05F2*****'],
+ 'StoreHost' => ['description' => '存储该消息的服务器实例。', 'type' => 'string', 'example' => '11.220.***.***:10911'],
+ 'Topic' => ['description' => '消息所属的Topic。', 'type' => 'string', 'example' => 'test-mq_topic'],
+ 'PropertyList' => [
+ 'description' => '消息属性列表。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Value' => ['description' => '消息属性的取值。', 'type' => 'string', 'example' => 'MSG_REGION'],
+ 'Name' => ['description' => '消息属性。取值说明如下:'."\n"
+ ."\n"
+ .'- **TRACE_ON**:是否有消息轨迹。'."\n"
+ .'- **MSG_REGION**:消息的Topic所属实例的地域ID。'."\n"
+ .'- **\\_\\_MESSAGE\\_DECODED\\_TIME**:消息被解码的时间。'."\n"
+ .'- **\\_\\_BORNHOST**:消息生产者客户端的IP地址。'."\n"
+ .'- **UNIQ_KEY**:消息的唯一标识,即Message ID。'."\n"
+ ."\n"
+ .'更多概念信息请参见[名词解释](~~29533~~)。', 'type' => 'string', 'example' => 'cn-hangzhou'],
+ ],
+ 'description' => '',
],
],
+ 'BornTimestamp' => ['description' => '消息生成的时间戳。单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570761026630'],
+ 'BodyCRC' => ['description' => '消息体CRC校验值。', 'type' => 'integer', 'format' => 'int32', 'example' => '907060870'],
+ 'BornHost' => ['description' => '生成该消息的客户端实例。', 'type' => 'string', 'example' => '42.120.**.**:64646'],
+ 'BodyStr' => ['description' => '消息体内容。', 'type' => 'string', 'example' => 'hello'],
],
],
],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"caeba0****be03f84eb48b699f0a4883\\",\\n \\"RequestId\\": \\"301D2CBE-66F8-403D-AEC0-82582478****\\",\\n \\"TagResources\\": [\\n {\\n \\"ResourceType\\": \\"ALIYUN::MQ::TOPIC\\",\\n \\"InstanceId\\": \\"MQ_INST_188077086902****_BXSuW61e\\",\\n \\"TagValue\\": \\"ServiceA\\",\\n \\"ResourceId\\": \\"TopicA\\",\\n \\"TagKey\\": \\"CartService\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<ListTagResourcesResponse>\\n<RequestId>301D2CBE-66F8-403D-AEC0-82582478****</RequestId>\\n<NextToken>caeba0****be03f84eb48b699f0a4883</NextToken>\\n<TagResources>\\n <ResourceId>TopicA</ResourceId>\\n <InstanceId>MQ_INST_188077086902****_BXSuW61e</InstanceId>\\n <TagKey>CartService</TagKey>\\n <ResourceType>ALIYUN::MQ::TOPIC</ResourceType>\\n <TagValue>ServiceA</TagValue>\\n</TagResources>\\n</ListTagResourcesResponse>","errorExample":""}]',
- 'title' => '查询资源绑定的标签列表',
- 'summary' => '调用ListTagResources查询资源绑定的标签列表。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
- ."\n"
- .'调用**ListTagResources**接口时,标签键**Tag.N.Key**和资源ID **ResourceId.N**至少需要输入一个。您可以查询某资源下的所有标签,也可以根据指定标签键查询标签值及标签所绑定的资源。'."\n"
- .'- 若输入标签键**Tag.N.Key**,则可以查询标签值**Tag.N.Value**和标签所绑定的资源ID **ResourceId.N**。'."\n"
- .'- 若输入资源ID **ResourceId.N**,则可以查询指定资源下所有的标签信息,包括标签键**Tag.N.Key**及标签值**Tag.N.Value**。'."\n",
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
- 'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**ListTagResources**接口,您还可以通过云消息队列 RocketMQ 版控制台查看资源的标签信息。具体操作,请参见[标签管理](~~172713~~)。',
- ],
- 'TagResources' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ 'staticInfo' => ['returnType' => 'synchronous'],
+ 'title' => '查询消息详细信息',
+ 'summary' => '调用OnsMessageDetail查询某条消息的具体信息。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsMessageDetail'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryMessageDetail',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"EAE5BE23-37A1-4354-94D6-E44AE17E****\\",\\n \\"Data\\": {\\n \\"StoreSize\\": 2,\\n \\"ReconsumeTimes\\": 0,\\n \\"StoreTimestamp\\": 1570761026708,\\n \\"Body\\": \\"aGVsbG8=\\",\\n \\"InstanceId\\": \\"MQ_INST_184681981******_BXig0x6A\\",\\n \\"MsgId\\": \\"1E0578FE110F18B4AAC235C05F2*****\\",\\n \\"StoreHost\\": \\"11.220.***.***:10911\\",\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"PropertyList\\": [\\n {\\n \\"Value\\": \\"MSG_REGION\\",\\n \\"Name\\": \\"cn-hangzhou\\"\\n }\\n ],\\n \\"BornTimestamp\\": 1570761026630,\\n \\"BodyCRC\\": 907060870,\\n \\"BornHost\\": \\"42.120.**.**:64646\\",\\n \\"BodyStr\\": \\"hello\\"\\n }\\n}","type":"json"}]',
+ ],
+ 'OnsMessageGetByKey' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'readAndWrite',
+ 'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'update',
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
- 'name' => 'InstanceId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '所需绑定标签的资源所在的实例的ID。'."\n"
- .'> 如需为Topic或Group ID绑定标签,则必须填写该参数。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => false,
- 'example' => 'MQ_INST_188077086902****_BXSuW61e',
- ],
- ],
- [
- 'name' => 'ResourceType',
+ 'name' => 'Topic',
'in' => 'query',
- 'schema' => [
- 'description' => '资源类型。枚举类型。取值:'."\n"
- ."\n"
- .'- **INSTANCE**'."\n"
- .'- **TOPIC**'."\n"
- .'- **GROUP**',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'TOPIC',
- ],
+ 'schema' => ['description' => '需查询的消息的Topic。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test-mq_topic'],
],
[
- 'name' => 'Tag',
+ 'name' => 'Key',
'in' => 'query',
- 'style' => 'repeatList',
- 'schema' => [
- 'description' => '标签列表。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Key' => [
- 'description' => '资源的标签键。**Key**和**Value**值必须同时输入。'."\n"
- ."\n"
- .'- 该值不允许为空字符串。'."\n"
- .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'FinanceDept',
- ],
- 'Value' => [
- 'description' => '资源的标签值。**Key**和**Value**值必须同时输入。'."\n"
- ."\n"
- .'- 该值可以为空字符串。'."\n"
- .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'FinanceJoshua',
- ],
- ],
- 'required' => false,
- ],
- 'required' => true,
- 'maxItems' => 21,
- ],
+ 'schema' => ['description' => '需查询的消息的Message Key。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'messageKey1'],
],
[
- 'name' => 'ResourceId',
+ 'name' => 'InstanceId',
'in' => 'query',
- 'style' => 'repeatList',
- 'schema' => [
- 'description' => '资源ID列表',
- 'type' => 'array',
- 'items' => [
- 'description' => '需要绑定标签的资源ID。'."\n"
- .' '."\n"
- .'- 当需要绑定标签的资源类型为实例时,该参数输入实例ID。'."\n"
- .'- 当需要绑定标签的资源类型为Topic时,该参数输入Topic名称。'."\n"
- .'- 当需要绑定标签的资源类型为Group时,该参数输入Group ID。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'TopicA',
- ],
- 'required' => true,
- 'example' => 'TopicA',
- 'maxItems' => 51,
- ],
+ 'schema' => ['description' => '需查询的消息所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
],
'responses' => [
200 => [
'schema' => [
+ 'description' => '返回结果。',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '301D2CBE-66F8-403D-AEC0-82582478****',
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****'],
+ 'Data' => [
+ 'type' => 'object',
+ 'itemNode' => true,
+ 'properties' => [
+ 'OnsRestMessageDo' => [
+ 'description' => '查询结果列表。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'StoreSize' => ['description' => '消息大小。', 'type' => 'integer', 'format' => 'int32', 'example' => '406'],
+ 'ReconsumeTimes' => ['description' => '消息重试消费的次数。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'],
+ 'StoreTimestamp' => ['description' => '被Broker存储的时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570760999811'],
+ 'InstanceId' => ['description' => '实例ID。', 'type' => 'string', 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
+ 'MsgId' => ['description' => '消息ID,即Message ID。', 'type' => 'string', 'example' => '1E0578FE110F18B4AAC235C05F2*****'],
+ 'StoreHost' => ['description' => '存储该消息的服务器实例。', 'type' => 'string', 'example' => '11.193.***.***:10911'],
+ 'Topic' => ['description' => '消息的Topic。', 'type' => 'string', 'example' => 'test-mq_topic'],
+ 'PropertyList' => [
+ 'type' => 'object',
+ 'itemNode' => true,
+ 'properties' => [
+ 'MessageProperty' => [
+ 'description' => '消息属性列表。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Value' => ['description' => '消息属性的取值。', 'type' => 'string', 'example' => 'TagA'],
+ 'Name' => ['description' => '消息属性。取值说明如下:'."\n"
+ ."\n"
+ .'- **TRACE_ON**:是否有消息轨迹'."\n"
+ .'- **KEYS**:消息的Key属性'."\n"
+ .'- **TAGS**:消息的Tag属性'."\n"
+ .'- **INSTANCE_ID**:消息所在的实例的ID'."\n"
+ ."\n"
+ .'更多概念信息请参见[名词解释](~~29533~~)。', 'type' => 'string', 'example' => 'TAGS'],
+ ],
+ 'description' => '',
+ ],
+ ],
+ ],
+ 'description' => '',
+ ],
+ 'BornTimestamp' => ['description' => '生成时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570760999721'],
+ 'BodyCRC' => ['description' => '消息体CRC校验值。', 'type' => 'integer', 'format' => 'int32', 'example' => '914112295'],
+ 'BornHost' => ['description' => '生成该消息的客户端实例。', 'type' => 'string', 'example' => '42.120.***.***:59270'],
+ ],
+ 'description' => '',
+ ],
+ ],
+ ],
+ 'description' => '',
],
],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"301D2CBE-66F8-403D-AEC0-82582478****\\"\\n}","errorExample":""},{"type":"xml","example":"<TagResourcesResponse>\\r\\n<RequestId>301D2CBE-66F8-403D-AEC0-82582478****</RequestId>\\r\\n</TagResourcesResponse>","errorExample":""}]',
- 'title' => '为资源绑定标签',
- 'summary' => '调用TagResources为资源绑定标签。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>本接口一般在需要对云消息队列 RocketMQ 版的资源进行归类时使用,便于搜索和资源聚合。',
- 'requestParamsDescription' => ' ',
+ 'title' => '根据Message Key查询消息',
+ 'summary' => '根据 Topic 和 Message Key 模糊查询消息信息列表。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
+ ."\n"
+ .'- 使用本接口根据Message Key查询消息的方式属于模糊查询。由于业务方的Key可能不唯一,所以查询结果可能为多条。'."\n"
+ ."\n"
+ .'- 本接口用在业务方无法获取Message ID的场景,在该场景下的调用步骤如下所示:'."\n"
+ ."\n"
+ .' 1. 调用本接口模糊查询得到Message ID列表。'."\n"
+ ."\n"
+ .' 2. 调用**OnsMessageGetByMsgId**接口精确查询。**OnsMessageGetByMsgId**接口的详细信息,请参见[OnsMessageGetByMsgId](~~29607~~)。',
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**TagResources**接口,您还可以通过云消息队列 RocketMQ 版控制台为相关资源绑定标签。具体操作,请参见[标签管理](~~172713~~)。',
- ],
- 'UntagResources' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ .'除了调用**OnsMessageGetByKey**接口,您还可以通过云消息队列 RocketMQ 版控制台查看消息的详细信息。具体操作,请参见[消息查询](~~29540~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsMessageGetByKey'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryMessage',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\",\\n \\"Data\\": {\\n \\"OnsRestMessageDo\\": [\\n {\\n \\"StoreSize\\": 406,\\n \\"ReconsumeTimes\\": 1,\\n \\"StoreTimestamp\\": 1570760999811,\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\",\\n \\"MsgId\\": \\"1E0578FE110F18B4AAC235C05F2*****\\",\\n \\"StoreHost\\": \\"11.193.***.***:10911\\",\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"PropertyList\\": {\\n \\"MessageProperty\\": [\\n {\\n \\"Value\\": \\"TagA\\",\\n \\"Name\\": \\"TAGS\\"\\n }\\n ]\\n },\\n \\"BornTimestamp\\": 1570760999721,\\n \\"BodyCRC\\": 914112295,\\n \\"BornHost\\": \\"42.120.***.***:59270\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsMessageGetByKeyResponse>\\n<Data>\\n <MsgId>1E0578FE110F18B4AAC235C05F2*****</MsgId>\\n <InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>\\n <ReconsumeTimes>1</ReconsumeTimes>\\n <BornHost>42.120.**.**:64646</BornHost>\\n <BodyCRC>914112295</BodyCRC>\\n <StoreHost>11.220.***.***:10911</StoreHost>\\n <StoreTimestamp>1570761026708</StoreTimestamp>\\n <BornTimestamp>1570761026630</BornTimestamp>\\n <Topic>test-mq_topic</Topic>\\n <StoreSize>407</StoreSize>\\n <PropertyList>\\n <MessageProperty>\\n <Name>TAGS</Name>\\n <Value>TagA</Value>\\n </MessageProperty>\\n </PropertyList>\\n</Data>\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\n</OnsMessageGetByKeyResponse>","errorExample":""}]',
+ ],
+ 'OnsMessageGetByMsgId' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'readAndWrite',
+ 'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
- 'name' => 'InstanceId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '如需解除Topic和Group ID与标签的绑定关系,该参数为必填。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => false,
- 'example' => 'MQ_INST_188077086902****_BX4jvZZG',
- ],
- ],
- [
- 'name' => 'ResourceType',
- 'in' => 'query',
- 'schema' => [
- 'description' => '资源类型。枚举类型,目前支持的资源类型:'."\n"
- ."\n"
- .'- **INSTANCE**'."\n"
- .'- **TOPIC**'."\n"
- .'- **GROUP**',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'TOPIC',
- ],
- ],
- [
- 'name' => 'All',
+ 'name' => 'MsgId',
'in' => 'query',
- 'schema' => [
- 'description' => '是否删除资源绑定的全部标签。当请求中未设置**TagKey**时该参数有效。默认值**false**。',
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'false',
- 'default' => 'false',
- ],
+ 'schema' => ['description' => '需查询的消息的ID,即Message ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '1E0578FE110F18B4AAC235C05F2*****'],
],
[
- 'name' => 'ResourceId',
+ 'name' => 'Topic',
'in' => 'query',
- 'style' => 'repeatList',
- 'schema' => [
- 'description' => '资源ID列表。',
- 'type' => 'array',
- 'items' => [
- 'description' => '需要解绑标签的资源ID。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'TopicA',
- ],
- 'required' => true,
- 'example' => 'TopicA',
- 'maxItems' => 51,
- ],
+ 'schema' => ['description' => '需查询的消息的Topic。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test-mq_topic'],
],
[
- 'name' => 'TagKey',
+ 'name' => 'InstanceId',
'in' => 'query',
- 'style' => 'repeatList',
- 'schema' => [
- 'description' => '资源的标签键列表。',
- 'type' => 'array',
- 'items' => [
- 'description' => '资源的标签键。'."\n"
- ."\n"
- .'- 如果传入该值,则不允许为空字符串。'."\n"
- .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'CartService',
- ],
- 'required' => false,
- 'example' => 'CartService',
- 'maxItems' => 21,
- ],
+ 'schema' => ['description' => '需查询消息所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
],
'responses' => [
@@ -3488,34 +2580,94 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '19780F2E-7841-4E0F-A5D9-C64A0530****',
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****'],
+ 'Data' => [
+ 'description' => '查询结果。',
+ 'type' => 'object',
+ 'properties' => [
+ 'StoreSize' => ['description' => '消息大小。', 'type' => 'integer', 'format' => 'int32', 'example' => '407'],
+ 'ReconsumeTimes' => ['description' => '消息重试消费的次数。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'],
+ 'StoreTimestamp' => ['description' => '被服务端存储的时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570761026708'],
+ 'InstanceId' => ['description' => '实例ID。', 'type' => 'string', 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
+ 'MsgId' => ['description' => '消息ID,即Message ID。', 'type' => 'string', 'example' => '1E0578FE110F18B4AAC235C0C8460BA2'],
+ 'StoreHost' => ['description' => '存储该消息的服务器实例。', 'type' => 'string', 'example' => '11.220.***.***:10911'],
+ 'Topic' => ['description' => '消息的Topic。', 'type' => 'string', 'example' => 'test-mq_topic'],
+ 'PropertyList' => [
+ 'type' => 'object',
+ 'itemNode' => true,
+ 'properties' => [
+ 'MessageProperty' => [
+ 'description' => '消息属性列表。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Value' => ['description' => '消息属性的值。', 'type' => 'string', 'example' => 'TagA'],
+ 'Name' => ['description' => '消息属性。取值说明如下:'."\n"
+ ."\n"
+ .'- **TRACE_ON**:是否有消息轨迹'."\n"
+ .'- **KEYS**:消息的Key属性'."\n"
+ .'- **TAGS**:消息的Tag属性'."\n"
+ .'- **INSTANCE_ID**:消息所在的实例的ID'."\n"
+ ."\n"
+ .'更多概念信息,请参见[名词解释](~~29533~~)。', 'type' => 'string', 'example' => 'TAGS'],
+ ],
+ 'description' => '',
+ ],
+ ],
+ ],
+ 'description' => '',
+ ],
+ 'BornTimestamp' => ['description' => '生成时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570761026630'],
+ 'BodyCRC' => ['description' => '消息体CRC校验值。', 'type' => 'integer', 'format' => 'int32', 'example' => '914112295'],
+ 'BornHost' => ['description' => '生成该消息的客户端实例。', 'type' => 'string', 'example' => '42.120.**.**:64646'],
+ ],
],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"19780F2E-7841-4E0F-A5D9-C64A0530****\\"\\n}","errorExample":""},{"type":"xml","example":"<UntagResourcesResponse>\\r\\n<RequestId>19780F2E-7841-4E0F-A5D9-C64A0530****</RequestId>\\r\\n</UntagResourcesResponse>","errorExample":""}]',
- 'title' => '为资源解绑并删除标签',
- 'summary' => '调用UntagResources为资源解绑并删除标签。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>',
- 'requestParamsDescription' => ' ',
+ 'title' => '通过MsgId查询消息',
+ 'summary' => '通过传入 Message ID 查询指定消息的信息以及判断该指定的消息是否曾被消费过。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
+ ."\n"
+ .'- 如遇消息消费有问题,则可通过该接口查询具体发送的消息内容来排查问题。'."\n"
+ ."\n"
+ .'- 根据Message ID查询消息的方式属于精确查询,查询条件需要的Message ID从每次消息发送成功的SendResult中获取,因此业务方必须存储每次发送消息的结果。查询到的信息包括发送时间、存储服务器和消息的Key和Tag等属性。',
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**UntagResources**接口,您还可以通过云消息队列 RocketMQ 版控制台为资源解绑和删除标签。具体操作,请参见[标签管理](~~172713~~)。',
- ],
- 'OnsConsumerStatus' => [
- 'summary' => '查询指定Group ID详细状态数据:订阅关系检查、消费TPS统计、负载均衡状态、消费端连接。',
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ .'除了调用**OnsMessageGetByMsgId**接口,您还可以通过消息队列RocketMQ版控制台查看消息的详细信息。具体操作,请参见[消息查询](~~29540~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsMessageGetByMsgId'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryMessage',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\",\\n \\"Data\\": {\\n \\"StoreSize\\": 407,\\n \\"ReconsumeTimes\\": 1,\\n \\"StoreTimestamp\\": 1570761026708,\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\",\\n \\"MsgId\\": \\"1E0578FE110F18B4AAC235C0C8460BA2\\",\\n \\"StoreHost\\": \\"11.220.***.***:10911\\",\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"PropertyList\\": {\\n \\"MessageProperty\\": [\\n {\\n \\"Value\\": \\"TagA\\",\\n \\"Name\\": \\"TAGS\\"\\n }\\n ]\\n },\\n \\"BornTimestamp\\": 1570761026630,\\n \\"BodyCRC\\": 914112295,\\n \\"BornHost\\": \\"42.120.**.**:64646\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsMessageGetByMsgIdResponse>\\n<Data>\\n <MsgId>1E0578FE110F18B4AAC235C0C8460BA2</MsgId>\\n <InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>\\n <ReconsumeTimes>1</ReconsumeTimes>\\n <BornHost>42.120.**.**:64646</BornHost>\\n <BodyCRC>914112295</BodyCRC>\\n <StoreHost>11.220.***.***:10911</StoreHost>\\n <StoreTimestamp>1570761026708</StoreTimestamp>\\n <BornTimestamp>1570761026630</BornTimestamp>\\n <Topic>test-mq_topic</Topic>\\n <StoreSize>407</StoreSize>\\n <PropertyList>\\n <MessageProperty>\\n <Name>TAGS</Name>\\n <Value>TagA</Value>\\n </MessageProperty>\\n </PropertyList>\\n</Data>\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\n</OnsMessageGetByMsgIdResponse>","errorExample":""}]',
+ ],
+ 'OnsMessagePageQueryByTopic' => [
+ 'summary' => '分页查询指定时间段内指定Topic内存在的所有消息。',
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -3523,625 +2675,339 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- 'riskType' => 'none',
- 'chargeType' => 'free',
- 'abilityTreeNodes' => [
- 'FEATUREons0MOUAZ',
- ],
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
- 'name' => 'GroupId',
+ 'name' => 'Topic',
'in' => 'query',
- 'schema' => [
- 'description' => '需要查询的消费端Group ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'GID_test_group_id',
- ],
+ 'schema' => ['description' => '需查询的消息的Topic名称。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test-mq_topic'],
],
[
- 'name' => 'Detail',
+ 'name' => 'BeginTime',
'in' => 'query',
- 'schema' => [
- 'description' => '是否查询详细信息。取值说明如下:'."\n"
- ."\n"
- .'- **true**:要查询详细信息,即可获取返回参数**ConsumerConnectionInfoList**和**DetailInTopicList**信息。'."\n"
- ."\n"
- .'- **false**:默认值,不查询详细信息,即返回参数**ConsumerConnectionInfoList**和**DetailInTopicList**为空。',
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'true',
- ],
+ 'schema' => ['description' => '查询范围的起始时间戳,单位:毫秒。'."\n"
+ .'通过**TaskId**进行后续取消息时,该参数设置的值不生效,默认以第一次查询时输入的起始时间为准。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'example' => '1570723200000'],
],
[
- 'name' => 'NeedJstack',
+ 'name' => 'EndTime',
'in' => 'query',
- 'schema' => [
- 'description' => '是否打印Jstack信息。取值说明如下:'."\n"
- .'- **true**:要打印Jstack信息,可在**Jstack**返回参数中获取堆栈信息。'."\n"
- .' >如需打印Jstack信息,请确保您的入参**Detail**设置为**true**。'."\n"
- ."\n"
- .'- **false**:默认值,不打印Jstack信息,**Jstack**返回参数为空。'."\n",
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'true',
- ],
+ 'schema' => ['description' => '查询范围的终止时间戳,单位:毫秒。'."\n"
+ .'通过**TaskId**进行后续取消息时,该参数设置的值不生效,默认以第一次查询时输入的终止时间为准。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'example' => '1570809600000'],
+ ],
+ [
+ 'name' => 'TaskId',
+ 'in' => 'query',
+ 'schema' => ['description' => '查询任务的ID,首次查询不需要输入,后续取消息必须传入,根据前一次的返回结果取出该字段。', 'type' => 'string', 'required' => false, 'example' => '0BC1310300002A9F000021E4D7A48346'],
+ ],
+ [
+ 'name' => 'CurrentPage',
+ 'in' => 'query',
+ 'schema' => ['description' => '当前取第几页消息,从1开始递增,最大值为50,取消息时不可超过最大页数。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'example' => '2'],
+ ],
+ [
+ 'name' => 'PageSize',
+ 'in' => 'query',
+ 'schema' => ['description' => '分页查询,每页最多显示的消息数量,默认是20,最小5条,最多50条。'."\n"
+ .'通过**TaskId**进行后续取消息时,该参数设置的值不生效,默认以第一次查询时输入的每页消息数量为准。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '5'],
],
[
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的Group ID所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '需查询的消息所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
],
'responses' => [
200 => [
'schema' => [
+ 'description' => '查询结果。',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '10EDC518-10E7-4B34-92FB-171235FA****',
- ],
- 'Data' => [
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '5DC2A47E-2B31-4722-96C8-FA59C9*****'],
+ 'MsgFoundDo' => [
'description' => '查询结果。',
'type' => 'object',
'properties' => [
- 'ConsumeTps' => [
- 'description' => '总消费TPS。',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0',
- ],
- 'ConsumeModel' => [
- 'description' => '消费模型。取值说明如下:'."\n"
- ."\n"
- .'- **CLUSTERING**:集群消费模式'."\n"
- ."\n"
- .'- **BROADCASTING**:广播消费模式'."\n"
- ."\n"
- .'两种订阅模式的详细信息,请参见[集群消费和广播消费](~~43163~~)。',
- 'type' => 'string',
- 'example' => 'CLUSTERING',
- ],
- 'ConnectionSet' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'ConnectionDo' => [
- 'description' => '该集群当前在线客户端信息。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'RemoteIP' => [
- 'description' => '宿主机IP地址或公网IP地址。',
- 'type' => 'string',
- 'example' => '42.120.74.**',
- ],
- 'Version' => [
- 'description' => '消费端版本。',
- 'type' => 'string',
- 'example' => 'V4_3_6_SNAPSHOT',
- ],
- 'ClientAddr' => [
- 'description' => '该消费实例的地址和端口。',
- 'type' => 'string',
- 'example' => '30.5.121.**',
- ],
- 'Language' => [
- 'description' => '消费端语言。',
- 'type' => 'string',
- 'example' => 'JAVA',
- ],
- 'ClientId' => [
- 'description' => '消费实例的ID。',
- 'type' => 'string',
- 'example' => '30.5.121.**@25560#-1999745829#-1737591554#458773089270275',
- ],
- 'Diff' => [
- 'title' => '每个客户端的堆积数',
- 'description' => '每个客户端的堆积数',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '100',
- ],
- ],
- ],
- ],
- ],
- ],
- 'TotalDiff' => [
- 'description' => '集群总的消费堆积。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '197',
- ],
- 'ConsumerConnectionInfoList' => [
+ 'CurrentPage' => ['description' => '当前位于第几页。', 'type' => 'integer', 'format' => 'int64', 'example' => '1'],
+ 'MsgFoundList' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
- 'ConsumerConnectionInfoDo' => [
- 'description' => '该集群在线客户端详细信息,包含Jstack、消费RT时间等信息。如需获取详细信息,请确保将**Detail**请求参数设置为**true**。否则返回值为空。',
+ 'OnsRestMessageDo' => [
+ 'description' => '当前页的消息集合,该类型与[OnsMessageGetByMsgId](~~29607~~)的返回结果一致。',
'type' => 'array',
'items' => [
- 'description' => 'test,此内容不推送到icms',
'type' => 'object',
'properties' => [
- 'ConsumeModel' => [
- 'description' => '消费模型。取值说明如下:'."\n"
- ."\n"
- .'- **CLUSTERING**:集群消费模式'."\n"
- ."\n"
- .'- **BROADCASTING**:广播消费模式'."\n"
- ."\n"
- .'两种订阅模式的详细信息,请参见[集群消费和广播消费](~~43163~~)。',
- 'type' => 'string',
- 'example' => 'CLUSTERING',
- ],
- 'RunningDataList' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'ConsumerRunningDataDo' => [
- 'description' => '实时状态统计。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Rt' => [
- 'description' => '消费RT时间,单位:毫秒。',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0',
- ],
- 'Topic' => [
- 'description' => '订阅的Topic名称。',
- 'type' => 'string',
- 'example' => 'test-mq_topic',
- ],
- 'FailedCountPerHour' => [
- 'description' => '每小时内消费失败的消息数统计。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '0',
- ],
- 'OkTps' => [
- 'description' => '消费消息成功的TPS统计。',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0',
- ],
- 'FailedTps' => [
- 'description' => '消费消息失败的TPS统计。',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0',
- ],
- ],
- ],
- ],
- ],
- ],
- 'SubscriptionSet' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'SubscriptionData' => [
- 'description' => '订阅关系集合。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'SubString' => [
- 'description' => '订阅该Topic的子类别Tag表达式。',
- 'type' => 'string',
- 'example' => '*',
- ],
- 'SubVersion' => [
- 'description' => '订阅关系版本号,为自增Long型。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570701364301',
- ],
- 'Topic' => [
- 'description' => '订阅的Topic名称。',
- 'type' => 'string',
- 'example' => 'test-mq_topic',
- ],
- 'TagsSet' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'Tag' => [
- 'description' => '订阅的Tag集合。',
- 'type' => 'array',
- 'items' => [
- 'description' => '订阅的Tag集合。',
- 'type' => 'string',
- 'example' => 'ff',
- ],
- ],
- ],
- ],
- ],
- ],
- ],
- ],
- ],
- 'Jstack' => [
+ 'StoreSize' => ['description' => '消息大小。单位:KB。', 'type' => 'integer', 'format' => 'int32', 'example' => '406'],
+ 'ReconsumeTimes' => ['description' => '消息重试消费的次数。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'],
+ 'StoreTimestamp' => ['description' => '消息被服务端存储的时间戳,单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570760999811'],
+ 'InstanceId' => ['description' => '实例ID。', 'type' => 'string', 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
+ 'MsgId' => ['description' => '消息ID,即Message ID。', 'type' => 'string', 'example' => '1E0578FE110F18B4AAC235C05F2*****'],
+ 'StoreHost' => ['description' => '存储该消息的服务器实例。', 'type' => 'string', 'example' => '11.193.***.***:10911'],
+ 'Topic' => ['description' => '消息的Topic。', 'type' => 'string', 'example' => 'test-mq_topic'],
+ 'PropertyList' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
- 'ThreadTrackDo' => [
- 'description' => 'Jstack堆栈信息。如需获取Jstack信息,请确保将**NeedJstack**入参设置为**true**。否则返回值为空。',
+ 'MessageProperty' => [
+ 'description' => '消息属性列表。',
'type' => 'array',
'items' => [
- 'description' => 'test——此内容不发布icms',
'type' => 'object',
'properties' => [
- 'TrackList' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'Track' => [
- 'description' => 'Jstack堆栈信息字符串。',
- 'type' => 'array',
- 'items' => [
- 'description' => 'Jstack堆栈信息字符串。',
- 'type' => 'string',
- 'example' => 'TID: 52 STATE: WAITING',
- ],
- ],
- ],
- ],
- 'Thread' => [
- 'description' => '线程名称。',
- 'type' => 'string',
- 'example' => 'ConsumeMessageThread_0',
- ],
+ 'Value' => ['description' => '消息属性的取值。', 'type' => 'string', 'example' => 'TagA'],
+ 'Name' => ['description' => '消息属性。取值说明如下:'."\n"
+ ."\n"
+ .'- **TRACE_ON**:是否有消息轨迹。'."\n"
+ .'- **KEYS**:消息的Key属性。'."\n"
+ .'- **TAGS**:消息的Tag属性。'."\n"
+ .'- **INSTANCE_ID**:消息所在的实例的ID。'."\n"
+ ."\n"
+ .'更多概念信息,请参见[名词解释](~~29533~~)。', 'type' => 'string', 'example' => 'TAGS'],
],
+ 'description' => '',
],
],
],
+ 'description' => '',
],
- 'LastTimeStamp' => [
- 'description' => '最后消费时间。'."\n"
- ."\n"
- .'该参数值的格式为毫秒级Unix时间戳。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570701368114',
- ],
- 'StartTimeStamp' => [
- 'description' => '消费开始时间。'."\n"
- ."\n"
- .'该参数值的格式为毫秒级Unix时间戳。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570701361528',
- ],
- 'Language' => [
- 'description' => '客户端语言。',
- 'type' => 'string',
- 'example' => 'JAVA',
- ],
- 'ClientId' => [
- 'description' => '消费实例的ID。',
- 'type' => 'string',
- 'example' => '30.5.**.**@25560#-1999745829#-1737591554#458773089270275',
- ],
- 'Connection' => [
- 'description' => '连接信息。',
- 'type' => 'string',
- 'example' => '**',
- ],
- 'Version' => [
- 'description' => '客户端版本号。',
- 'type' => 'string',
- 'example' => 'V4_3_6',
- ],
- 'ConsumeType' => [
- 'description' => '消费者消费消息的模式。取值说明如下:'."\n"
- .'- **PUSH**:云消息队列 RocketMQ 版服务端主动向消费者推送消息。'."\n"
- .'- **PULL**:消费者主动向云消息队列 RocketMQ 版服务端拉取消息。',
- 'type' => 'string',
- 'example' => 'PUSH',
- ],
- 'ThreadCount' => [
- 'description' => '消费线程数。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '20',
- ],
- ],
- ],
- ],
- ],
- ],
- 'InstanceId' => [
- 'description' => '实例ID。',
- 'type' => 'string',
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
- 'DetailInTopicList' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'DetailInTopicDo' => [
- 'description' => '各个Topic的消费情况。如需获取详细信息,请确保将**Detail**请求参数设置为**true**。否则返回值为空。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'DelayTime' => [
- 'description' => '指定Topic的消费延迟时间。单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '0',
- ],
- 'TotalDiff' => [
- 'description' => '该Topic消费总堆积数。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '0',
- ],
- 'LastTimestamp' => [
- 'description' => '最后消费时间。'."\n"
- ."\n"
- .'该参数值的格式为毫秒级Unix时间戳。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570701259403',
- ],
- 'Topic' => [
- 'description' => 'Topic名称。',
- 'type' => 'string',
- 'example' => 'test-mq_topic',
- ],
+ 'BornTimestamp' => ['description' => '消息生成的时间戳,单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570760999721'],
+ 'BodyCRC' => ['description' => '消息体CRC校验值。', 'type' => 'integer', 'format' => 'int32', 'example' => '914112295'],
+ 'BornHost' => ['description' => '生成该消息的客户端实例。', 'type' => 'string', 'example' => '42.120.***.***:59270'],
],
+ 'description' => '',
],
],
],
+ 'description' => '',
],
- 'SubscriptionSame' => [
- 'description' => '订阅关系是否一致。',
- 'type' => 'boolean',
- 'example' => 'true',
- ],
- 'DelayTime' => [
- 'description' => '指定Group ID所订阅的所有Topic中的最大消费延时时间。单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '100857',
- ],
- 'LastTimestamp' => [
- 'description' => '最后消费时间。'."\n"
- ."\n"
- .'该参数值的格式为毫秒级Unix时间戳。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1566883844954',
- ],
- 'Online' => [
- 'description' => '是否在线。',
- 'type' => 'boolean',
- 'example' => 'true',
- ],
- 'RebalanceOK' => [
- 'description' => '客户端Rebalance是否正常。取值说明如下:'."\n"
- ."\n"
- .'- **true**:正常'."\n"
- ."\n"
- .'- **false**:不正常',
- 'type' => 'boolean',
- 'example' => 'true',
- ],
+ 'MaxPageCount' => ['description' => '查询结果最大页数。', 'type' => 'integer', 'format' => 'int64', 'example' => '400'],
+ 'TaskId' => ['description' => '第一次新建查询时,返回的查询任务ID,用于后续取消息。', 'type' => 'string', 'example' => '0BC1310300002A9F000021E4D7A48346'],
],
],
],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"10EDC518-10E7-4B34-92FB-171235FA****\\",\\n \\"Data\\": {\\n \\"ConsumeTps\\": 0,\\n \\"ConsumeModel\\": \\"CLUSTERING\\",\\n \\"ConnectionSet\\": {\\n \\"ConnectionDo\\": [\\n {\\n \\"RemoteIP\\": \\"42.120.74.**\\",\\n \\"Version\\": \\"V4_3_6_SNAPSHOT\\",\\n \\"ClientAddr\\": \\"30.5.121.**\\",\\n \\"Language\\": \\"JAVA\\",\\n \\"ClientId\\": \\"30.5.121.**@25560#-1999745829#-1737591554#458773089270275\\",\\n \\"Diff\\": 100\\n }\\n ]\\n },\\n \\"TotalDiff\\": 197,\\n \\"ConsumerConnectionInfoList\\": {\\n \\"ConsumerConnectionInfoDo\\": [\\n {\\n \\"ConsumeModel\\": \\"CLUSTERING\\",\\n \\"RunningDataList\\": {\\n \\"ConsumerRunningDataDo\\": [\\n {\\n \\"Rt\\": 0,\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"FailedCountPerHour\\": 0,\\n \\"OkTps\\": 0,\\n \\"FailedTps\\": 0\\n }\\n ]\\n },\\n \\"SubscriptionSet\\": {\\n \\"SubscriptionData\\": [\\n {\\n \\"SubString\\": \\"*\\",\\n \\"SubVersion\\": 1570701364301,\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"TagsSet\\": {\\n \\"Tag\\": [\\n \\"ff\\"\\n ]\\n }\\n }\\n ]\\n },\\n \\"Jstack\\": {\\n \\"ThreadTrackDo\\": [\\n {\\n \\"TrackList\\": {\\n \\"Track\\": [\\n \\"TID: 52 STATE: WAITING\\"\\n ]\\n },\\n \\"Thread\\": \\"ConsumeMessageThread_0\\"\\n }\\n ]\\n },\\n \\"LastTimeStamp\\": 1570701368114,\\n \\"StartTimeStamp\\": 1570701361528,\\n \\"Language\\": \\"JAVA\\",\\n \\"ClientId\\": \\"30.5.**.**@25560#-1999745829#-1737591554#458773089270275\\",\\n \\"Connection\\": \\"**\\",\\n \\"Version\\": \\"V4_3_6\\",\\n \\"ConsumeType\\": \\"PUSH\\",\\n \\"ThreadCount\\": 20\\n }\\n ]\\n },\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\",\\n \\"DetailInTopicList\\": {\\n \\"DetailInTopicDo\\": [\\n {\\n \\"DelayTime\\": 0,\\n \\"TotalDiff\\": 0,\\n \\"LastTimestamp\\": 1570701259403,\\n \\"Topic\\": \\"test-mq_topic\\"\\n }\\n ]\\n },\\n \\"SubscriptionSame\\": true,\\n \\"DelayTime\\": 100857,\\n \\"LastTimestamp\\": 1566883844954,\\n \\"Online\\": true,\\n \\"RebalanceOK\\": true\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsConsumerStatusResponse>\\n<data>\\n <connectionSet>\\n <bizVersion>V4_3_6</bizVersion>\\n <clientAddr>30.5.***.*</clientAddr>\\n <clientId>30.5.***.*@97730#-1999745829#-1737591554#729272961762836</clientId>\\n <language>JAVA</language>\\n <version>V4_3_6</version>\\n </connectionSet>\\n <consumeModel>CLUSTERING</consumeModel>\\n <consumeTps>0</consumeTps>\\n <consumerConnectionInfoList>\\n <bizVersion>V4_3_6</bizVersion>\\n <clientId>30.5.***.*@97730#-1999745829#-1737591554#729272961762836</clientId>\\n <consumeType>PUSH</consumeType>\\n <jstack>\\n <thread>ConsumeMessageThread_4</thread>\\n <trackList>TID: 44 STATE: WAITING</trackList>\\n <trackList>sun.misc.Unsafe.park(Native Method)</trackList>\\n <trackList>java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)</trackList>\\n <trackList>java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)</trackList>\\n <trackList>java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)</trackList>\\n <trackList>java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)</trackList>\\n <trackList>java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)</trackList>\\n <trackList>java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)</trackList>\\n <trackList>java.lang.Thread.run(Thread.java:748)</trackList>\\n </jstack>\\n <language>JAVA</language>\\n <lastTimeStamp>1570701368114</lastTimeStamp>\\n <runningDataList>\\n <failedCountPerHour>0</failedCountPerHour>\\n <failedTps>0</failedTps>\\n <okTps>0</okTps>\\n <rt>0</rt>\\n <topic>test-mq_topic</topic>\\n </runningDataList>\\n <startTimeStamp>1570701361528</startTimeStamp>\\n <subscriptionSet>\\n <subString>*</subString>\\n <subVersion>1570701364301</subVersion>\\n <topic>test-mq_topic</topic>\\n </subscriptionSet>\\n <threadCount>20</threadCount>\\n <version>V4_3_6</version>\\n </consumerConnectionInfoList>\\n <delayTime>0</delayTime>\\n <detailInTopicList>\\n <delayTime>0</delayTime>\\n <lastTimestamp>1570701259403</lastTimestamp>\\n <topic>test-mq_topic</topic>\\n <totalDiff>0</totalDiff>\\n </detailInTopicList>\\n <instanceId>MQ_INST_111111111111_DOxxxxxx</instanceId>\\n <lastTimestamp>1570701368114</lastTimestamp>\\n <online>true</online>\\n <rebalanceOK>true</rebalanceOK>\\n <subscriptionSame>true</subscriptionSame>\\n <totalDiff>0</totalDiff>\\n</data>\\n<requestId>10EDC518-10E7-4B34-92FB-171235FA****</requestId>\\n</OnsConsumerStatusResponse>","errorExample":""}]',
- 'title' => '查询Group ID消费状态',
+ 'title' => '查询Topic内所有消息',
'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
."\n"
- .'- 本接口一般用于在粗略判断消费堆积以及客户端在线状态后,需要排查消费异常原因的场景。可以根据返回结果判断出指定Group ID的订阅关系是否一致、负载均衡是否正常以及获取在线客户端的Jstack信息等。'."\n"
- .'- 使用本接口需要调用大量后端接口以完成数据聚合,因此查询速度慢,不建议频繁调用。'."\n",
- 'requestParamsDescription' => ' ',
+ .'- 按Topic查询消息的方式属于范围查询,查询结果会通过分页的方式展示给调用方,仅适用于没有任何搜索条件(Message ID和Message Key)的查询场景。'."\n"
+ .'- 根据Topic查询消息应尽可能缩短查询的时间区间,否则匹配的消息过多,将无法定位问题。调用流程如下所示:'."\n"
+ .' '."\n"
+ .' 1. 传入Topic、起止时间以及每页的消息数量,进行分页查询。如果有消息,默认返回第一页的消息、总页数和查询任务ID。 '."\n"
+ .' 2. 根据返回的结果中的查询任务ID,进行后续取消息,取消息时传入查询任务ID以及当前页数。此时输入的起止时间和每页消息数量不生效,默认以第一次查询时输入的参数值为准。',
'responseParamsDescription' => ' ',
- 'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsConsumerStatus**接口,您还可以通过云消息队列 RocketMQ 版控制台查看Group ID的详细数据。具体操作,请参见[查看消费者状态](~~94312~~)。',
- ],
- 'OnsConsumerAccumulate' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '10', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsMessagePageQueryByTopic'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryMessage',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"5DC2A47E-2B31-4722-96C8-FA59C9*****\\",\\n \\"MsgFoundDo\\": {\\n \\"CurrentPage\\": 1,\\n \\"MsgFoundList\\": {\\n \\"OnsRestMessageDo\\": [\\n {\\n \\"StoreSize\\": 406,\\n \\"ReconsumeTimes\\": 1,\\n \\"StoreTimestamp\\": 1570760999811,\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\",\\n \\"MsgId\\": \\"1E0578FE110F18B4AAC235C05F2*****\\",\\n \\"StoreHost\\": \\"11.193.***.***:10911\\",\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"PropertyList\\": {\\n \\"MessageProperty\\": [\\n {\\n \\"Value\\": \\"TagA\\",\\n \\"Name\\": \\"TAGS\\"\\n }\\n ]\\n },\\n \\"BornTimestamp\\": 1570760999721,\\n \\"BodyCRC\\": 914112295,\\n \\"BornHost\\": \\"42.120.***.***:59270\\"\\n }\\n ]\\n },\\n \\"MaxPageCount\\": 400,\\n \\"TaskId\\": \\"0BC1310300002A9F000021E4D7A48346\\"\\n }\\n}","type":"json"}]',
+ ],
+ 'OnsMessagePush' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'read',
+ 'operationType' => 'readAndWrite',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
'name' => 'GroupId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消费端Group ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'GID_test_consumer_id',
- ],
+ 'schema' => ['description' => 'Group ID。详细信息,请参见[名词解释](~~29533~~)。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test_group_id'],
],
[
- 'name' => 'Detail',
+ 'name' => 'ClientId',
'in' => 'query',
- 'schema' => [
- 'description' => '是否查询各个Topic的详细信息。取值说明如下:'."\n"
- ."\n"
- .'- **true**:要查询详细信息,返回**DetailInTopicList**参数的详细信息。'."\n"
- ."\n"
- .'- **false**:不查询详细信息(默认值),**DetailInTopicList**参数返回值为空。'."\n",
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'true',
- ],
+ 'schema' => ['description' => '消费者实例的ID。您可调用[OnsConsumerGetConnection](~~29598~~)接口获取该ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '30.5.121.**@24813#-1999745829#-1737591554#453111174894656'],
+ ],
+ [
+ 'name' => 'MsgId',
+ 'in' => 'query',
+ 'schema' => ['description' => '消息的标识,即Message ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '0BC1669963053CF68F733BB70396****'],
+ ],
+ [
+ 'name' => 'Topic',
+ 'in' => 'query',
+ 'schema' => ['description' => '消息推送至的目标Topic。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test-mq_topic'],
],
[
'name' => 'InstanceId',
'in' => 'query',
+ 'schema' => ['description' => '所需推送的消息所在的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
'schema' => [
- 'description' => '实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
+ 'type' => 'object',
+ 'properties' => [
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'B8EDC90D-F726-4B9E-8BEF-F0DD25EC****'],
+ ],
+ 'description' => '',
+ ],
+ ],
+ ],
+ 'title' => '向指定的消费者推送消息',
+ 'summary' => '调用OnsMessagePush向指定的消费者推送消息。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
+ .'本接口主要用于消费验证的场景。通过传入的MsgId获取指定消息的消息体,再将消息体重新进行封装推送给消费者。此时重新发送的这条消息和原消息的消息内容相同,但并不是同一条消息且MsgId不同。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsMessagePush'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:SUB',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
],
],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"B8EDC90D-F726-4B9E-8BEF-F0DD25EC****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsMessagePushResponse>\\n <RequestId>B8EDC90D-F726-4B9E-8BEF-F0DD25EC****</RequestId>\\n</OnsMessagePushResponse>","errorExample":""}]',
+ ],
+ 'OnsMessageTrace' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => ['operationType' => 'get'],
+ 'parameters' => [
+ [
+ 'name' => 'Topic',
+ 'in' => 'query',
+ 'schema' => ['description' => '消息的Topic。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test-mq_topic'],
+ ],
+ [
+ 'name' => 'MsgId',
+ 'in' => 'query',
+ 'schema' => ['description' => '需查询消息轨迹的消息ID,即Message ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '1E05791C117818B4AAC23B1BB0CE****'],
+ ],
+ [
+ 'name' => 'InstanceId',
+ 'in' => 'query',
+ 'schema' => ['description' => '需查询的消息所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
+ ],
+ ],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'CE817BFF-B389-43CD-9419-95011AC9****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'EAE5BE23-37A1-4354-94D6-E44AE17E****'],
'Data' => [
- 'description' => '指定Consumer的消费堆积情况。',
'type' => 'object',
+ 'itemNode' => true,
'properties' => [
- 'ConsumeTps' => [
- 'description' => '该Group ID下消费者实例群组接收消息的总TPS。',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '10',
- ],
- 'DelayTime' => [
- 'description' => 'Group ID消费消息的最大延迟时间。取值为该Group ID订阅的所有Topic中,消费延迟时间最长的Topic的值。'."\n"
- ."\n"
- .'单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '10000',
- ],
- 'LastTimestamp' => [
- 'description' => '该Group ID下消费者实例群组中最近消费的某条消息的生产时间。'."\n"
- ."\n"
- .'单位:毫秒级的Unix时间戳。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1566231000000',
- ],
- 'TotalDiff' => [
- 'description' => '该Group ID订阅的所有Topic的消费堆积数量。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '100',
- ],
- 'Online' => [
- 'description' => '该Group ID下是否有消费者实例在线;只要有一个消费者实例在线,该Group ID状态即为在线。取值说明如下:'."\n"
- ."\n"
- .'- **true**:状态为在线'."\n"
- ."\n"
- .'- **false**:状态为不在线',
- 'type' => 'boolean',
- 'example' => 'true',
- ],
- 'DetailInTopicList' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'DetailInTopicDo' => [
- 'description' => '各个Topic具体情况。如果请求参数**Detail**取值为**fasle**,则该返回参数的返回值为空。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'DelayTime' => [
- 'description' => '该Topic中消息消费的最大延迟时间。即Topic中最早一条未消费消息的就绪时间和当前的时间差。'."\n"
- ."\n"
- .'单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '10000',
- ],
- 'TotalDiff' => [
- 'description' => '该Topic的消费堆积数量。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '100',
- ],
- 'LastTimestamp' => [
- 'description' => '该Topic中最近消费的某条消息的生产时间。'."\n"
- ."\n"
- .'单位:毫秒级的Unix时间戳。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1566231000000',
- ],
- 'Topic' => [
- 'description' => 'Topic名称。',
- 'type' => 'string',
- 'example' => 'test-mq-topic',
- ],
- ],
- ],
+ 'MessageTrack' => [
+ 'description' => '查询结果。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'TrackType' => ['description' => '当前状态。取值说明如下:'."\n"
+ ."\n"
+ .'- **CONSUMED**:已消费。'."\n"
+ .'- **CONSUMED_BUT_FILTERED**:不符合Group ID的订阅条件,消息已被过滤,未消费。'."\n"
+ .'- **NOT_CONSUME_YET**:暂未消费。'."\n"
+ .'- **NOT_ONLINE**:客户端不在线。'."\n"
+ .'- **UNKNOWN**:其他问题。', 'type' => 'string', 'example' => 'CONSUMED'],
+ 'ConsumerGroup' => ['description' => '订阅该Topic的消费者所对应的Group ID。', 'type' => 'string', 'example' => 'GID_test_group_id'],
+ 'InstanceId' => ['description' => '需查询的消息所对应的实例ID。', 'type' => 'string', 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
+ 'description' => '',
],
],
],
+ 'description' => '',
],
],
+ 'description' => '',
],
],
],
- 'eventInfo' => [
- 'enable' => false,
- 'eventNames' => [],
- ],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"CE817BFF-B389-43CD-9419-95011AC9****\\",\\n \\"Data\\": {\\n \\"ConsumeTps\\": 10,\\n \\"DelayTime\\": 10000,\\n \\"LastTimestamp\\": 1566231000000,\\n \\"TotalDiff\\": 100,\\n \\"Online\\": true,\\n \\"DetailInTopicList\\": {\\n \\"DetailInTopicDo\\": [\\n {\\n \\"DelayTime\\": 10000,\\n \\"TotalDiff\\": 100,\\n \\"LastTimestamp\\": 1566231000000,\\n \\"Topic\\": \\"test-mq-topic\\"\\n }\\n ]\\n }\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsConsumerAccumulateResponse>\\n<Data>\\n <DetailInTopicList>\\n <DetailInTopicDo>\\n <TotalDiff>100</TotalDiff>\\n <LastTimestamp>1566231000000</LastTimestamp>\\n <DelayTime>10000</DelayTime>\\n <Topic>test-mq-topic</Topic>\\n </DetailInTopicDo>\\n </DetailInTopicList>\\n <TotalDiff>100</TotalDiff>\\n <LastTimestamp>1566231000000</LastTimestamp>\\n <DelayTime>10000</DelayTime>\\n <Online>true</Online>\\n <ConsumeTps>10</ConsumeTps>\\n</Data>\\n<RequestId>0CCF6437-CBB0-4378-BFEC-E08AC258****</RequestId>\\n</OnsConsumerAccumulateResponse>","errorExample":""}]',
- 'title' => '查询消息消费堆积情况',
- 'summary' => '查询指定Group ID的消息消费堆积情况,包括当前消息堆积数量和消费延迟时间等。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>消费堆积查询一般在生产环境中需要关注Group ID消费进度时使用,用于粗略判断消息消费情况和延迟情况。您不仅可以查到该Group ID订阅的所有Topic的消息堆积情况,还可以查到每个Topic各自的消息堆积情况。',
+ 'title' => '查看消息消费结果',
+ 'summary' => '调用OnsMessageTrace根据Message ID来判断目标消息是否曾被消费过。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
+ ."\n"
+ .'- 本接口一般在消费异常,需要判断消息消费状态,初步排查原因时使用。'."\n"
+ ."\n"
+ .'- 本接口的实现基于云消息队列 RocketMQ 版的内部位点机制,在大部分场景下判断结果可信,但如果应用方进行过重置位点已经清除消息等操作,则判断结果可能有误。',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsConsumerAccumulate**接口,您还可以通过云消息队列 RocketMQ 版控制台查看Group ID的消息消费堆积情况。具体操作,请参见[查看消费者状态](~~94312~~)。',
- ],
- 'OnsConsumerGetConnection' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ .'除了调用**OnsMessageTrace**接口,您还可以通过云消息队列 RocketMQ 版控制台查看消息的消费状态。具体操作,请参见[查询消息轨迹](~~43357~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsMessageTrace'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryMessageTrace',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"EAE5BE23-37A1-4354-94D6-E44AE17E****\\",\\n \\"Data\\": {\\n \\"MessageTrack\\": [\\n {\\n \\"TrackType\\": \\"CONSUMED\\",\\n \\"ConsumerGroup\\": \\"GID_test_group_id\\",\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsMessageTraceResponse>\\n<Data>\\n <MessageTrack>\\n <InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>\\n <ConsumerGroup>GID_test_group_id</ConsumerGroup>\\n <TrackType>CONSUMED</TrackType>\\n </MessageTrack>\\n</Data>\\n<RequestId>EAE5BE23-37A1-4354-94D6-E44AE17****</RequestId>\\n</OnsMessageTraceResponse>","errorExample":""}]',
+ ],
+ 'OnsRegionList' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -4149,115 +3015,69 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- 'abilityTreeCode' => '14917',
- 'abilityTreeNodes' => [
- 'FEATUREons0MOUAZ',
- ],
- ],
- 'parameters' => [
- [
- 'name' => 'GroupId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '需查询的Group ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'GID_test_consumer_id',
- ],
- ],
- [
- 'name' => 'InstanceId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '需查询的Group ID所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
- ],
- ],
+ 'systemTags' => ['operationType' => 'list'],
+ 'parameters' => [],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'DE4140C7-F42D-473D-A5FF-B1E31692****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '72D14A84-45E5-4E01-A6DB-F63C4721****'],
'Data' => [
- 'description' => '返回参数数据结构。',
'type' => 'object',
+ 'itemNode' => true,
'properties' => [
- 'ConnectionList' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'ConnectionDo' => [
- 'description' => '指定Group ID的连接信息。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Version' => [
- 'description' => '消费端版本。'."\n",
- 'type' => 'string',
- 'example' => 'V4_3_6',
- ],
- 'ClientAddr' => [
- 'description' => '该消费者实例的地址和端口。',
- 'type' => 'string',
- 'example' => '30.5.121.**',
- ],
- 'Language' => [
- 'description' => '消费者应用的开发语言。',
- 'type' => 'string',
- 'example' => 'JAVA',
- ],
- 'ClientId' => [
- 'description' => '消费者实例的ID。',
- 'type' => 'string',
- 'example' => '30.5.121.**@24813#-1999745829#-1737591554#453111174894656',
- ],
- ],
- ],
+ 'RegionDo' => [
+ 'description' => '查询结果。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'UpdateTime' => ['description' => '更新时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1411623866000'],
+ 'RegionName' => ['description' => '地域名称。', 'type' => 'string', 'example' => '华东1(杭州)'],
+ 'ChannelName' => ['description' => '渠道名称。', 'type' => 'string', 'example' => 'ALIYUN'],
+ 'CreateTime' => ['description' => '创建时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1411623866000'],
+ 'Id' => ['description' => 'ID。', 'type' => 'integer', 'format' => 'int64', 'example' => '1'],
+ 'OnsRegionId' => ['description' => '地域的ID。', 'type' => 'string', 'example' => 'cn-hangzhou'],
],
+ 'description' => '',
],
],
- 'MessageModel' => [
- 'type' => 'string',
- ],
],
+ 'description' => '',
],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"DE4140C7-F42D-473D-A5FF-B1E31692****\\",\\n \\"Data\\": {\\n \\"ConnectionList\\": {\\n \\"ConnectionDo\\": [\\n {\\n \\"Version\\": \\"V4_3_6\\",\\n \\"ClientAddr\\": \\"30.5.121.**\\",\\n \\"Language\\": \\"JAVA\\",\\n \\"ClientId\\": \\"30.5.121.**@24813#-1999745829#-1737591554#453111174894656\\"\\n }\\n ]\\n },\\n \\"MessageModel\\": \\"\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsConsumerGetConnectionResponse>\\r\\n <Data>\\r\\n <ConnectionList>\\r\\n <ConnectionDo>\\r\\n <ClientAddr>30.5.121.**</ClientAddr>\\r\\n <Language>JAVA</Language>\\r\\n <Version>V4_3_6</Version>\\r\\n <ClientId>30.5.121.**@24813#-1999745829#-1737591554#453111174894656</ClientId>\\r\\n </ConnectionDo>\\r\\n </ConnectionList>\\r\\n </Data>\\r\\n <RequestId>DE4140C7-F42D-473D-A5FF-B1E31692****</RequestId>\\r\\n</OnsConsumerGetConnectionResponse>","errorExample":""}]',
- 'title' => '查询Group ID客户端连接情况',
- 'summary' => '查询指定 Group ID 下当前客户端的连接情况。',
+ 'title' => '获取地域信息列表',
+ 'summary' => '调用OnsRegionList获取云消息队列 RocketMQ 版目前开放服务的地域(Region)信息列表。',
'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
+ .'在您使用SDK接入云消息队列 RocketMQ 版服务并进行管控操作时,需要依次指定两个地域的信息,第二个地域的信息才是通过OnsRegionList接口获取。具体场景如下:'."\n"
."\n"
- .'本接口一般用于在消费异常情况下,获取指定Group ID下客户端的连接信息,通过查看消费者状态初步诊断原因。',
+ .'- 将您的应用接入云消息队列 RocketMQ 版服务:根据您的应用的部署地域选择就近的API网关接入点,填写相应的**regionId**。该**regionId**实际上只用于接入阿里云OpenAPI网关,因为云消息队列 RocketMQ 版通过阿里云OpenAPI平台(即POP)来提供API服务。'."\n"
+ ."\n"
+ .'- 连接要进行管控操作的地域:指定您要对哪个地域的云消息队列 RocketMQ 版资源进行操作,填写该地域相应的ID。此时要填写的地域ID,可通过**OnsRegionList**接口获取。',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
- 'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsConsumerGetConnection**接口,您还可以通过云消息队列 RocketMQ 版控制台查看指定Group ID下客户端的连接情况。具体操作,请参见[查看消费者状态](~~94312~~)。',
- ],
- 'OnsConsumerResetOffset' => [
- 'methods' => [
- 'post',
- 'get',
+ 'extraInfo' => ' ',
+ 'changeSet' => [
+ ['createdAt' => '2023-12-08T02:51:44.000Z', 'description' => '响应参数发生变更、错误码发生变更'],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '3000', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsRegionList'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
],
+ 'ramActions' => [],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"72D14A84-45E5-4E01-A6DB-F63C4721****\\",\\n \\"Data\\": {\\n \\"RegionDo\\": [\\n {\\n \\"UpdateTime\\": 1411623866000,\\n \\"RegionName\\": \\"华东1(杭州)\\",\\n \\"ChannelName\\": \\"ALIYUN\\",\\n \\"CreateTime\\": 1411623866000,\\n \\"Id\\": 1,\\n \\"OnsRegionId\\": \\"cn-hangzhou\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsRegionListResponse>\\n<Data>\\n <RegionDo>\\n <RegionName>公网</RegionName>\\n <OnsRegionId>mq-internet-access</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>华北1(青岛)</RegionName>\\n <OnsRegionId>cn-qingdao</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>华南1(深圳)</RegionName>\\n <OnsRegionId>cn-shenzhen</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>华东1(杭州)</RegionName>\\n <OnsRegionId>cn-hangzhou</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>华北2(北京)</RegionName>\\n <OnsRegionId>cn-beijing</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>华东2(上海)</RegionName>\\n <OnsRegionId>cn-shanghai</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>西南1(成都)</RegionName>\\n <OnsRegionId>cn-chengdu</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>华北3(张家口)</RegionName>\\n <OnsRegionId>cn-zhangjiakou</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>华北5(呼和浩特)</RegionName>\\n <OnsRegionId>cn-huhehaote</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>中国(香港)</RegionName>\\n <OnsRegionId>cn-hongkong</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>新加坡</RegionName>\\n <OnsRegionId>ap-southeast-1</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>日本(东京)</RegionName>\\n <OnsRegionId>ap-northeast-1</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>马来西亚(吉隆坡)</RegionName>\\n <OnsRegionId>ap-southeast-3</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>印度(孟买)</RegionName>\\n <OnsRegionId>ap-south-1</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>阿联酋(迪拜)</RegionName>\\n <OnsRegionId>me-east-1</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>德国(法兰克福)</RegionName>\\n <OnsRegionId>eu-central-1</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>美国(硅谷)</RegionName>\\n <OnsRegionId>us-west-1</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>美国(弗吉尼亚)</RegionName>\\n <OnsRegionId>us-east-1</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>澳大利亚(悉尼)</RegionName>\\n <OnsRegionId>ap-southeast-2</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>英国(伦敦)</RegionName>\\n <OnsRegionId>eu-west-1</OnsRegionId>\\n </RegionDo>\\n <RegionDo>\\n <RegionName>印度尼西亚(雅加达)</RegionName>\\n <OnsRegionId>ap-southeast-5</OnsRegionId>\\n </RegionDo>\\n</Data>\\n<RequestId>72D14A84-45E5-4E01-A6DB-F63C4721****</RequestId>\\n</OnsRegionListResponse>","errorExample":""}]',
+ ],
+ 'OnsTopicCreate' => [
+ 'summary' => '调用OnsTopicCreate接口创建Topic。',
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -4265,154 +3085,116 @@
],
'operationType' => 'readAndWrite',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => [],
'parameters' => [
[
- 'name' => 'GroupId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消费端Group ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'GID_test_consumer_id',
- ],
- ],
- [
'name' => 'Topic',
'in' => 'query',
- 'schema' => [
- 'description' => '需重置位点的Topic。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'test-mq-topic',
- ],
+ 'schema' => ['description' => '需创建的Topic的名称,取值说明如下:'."\n"
+ ."\n"
+ .'- 长度限制为3~64个字符,只能包含字母、数字、短划线(-)和下划线(_)。'."\n"
+ .'- “CID”和“GID”是Group ID的保留字段,Topic名称不能以“CID”和“GID”开头。'."\n"
+ .'- 如果创建的Topic所在的实例有命名空间,则Topic的名称需要保证实例内唯一,不能和本实例下已有的Topic名称或Group ID重复;跨实例之间可以重名,例如实例A的Topic名称可以和实例B的Topic名称重复,也可以和实例B的Group ID重复。'."\n"
+ .'- 如果新建的Topic所在的实例无命名空间,则Topic的名称需要保证跨实例和跨地域全局唯一,全局范围内不能和已有的Topic名称或Group ID重复。'."\n"
+ ."\n"
+ .'> 实例是否有命名空间,可以在云消息队列 RocketMQ 版控制台**实例详情**页面的**基础信息区域**查看。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test'],
],
[
- 'name' => 'Type',
+ 'name' => 'MessageType',
'in' => 'query',
- 'schema' => [
- 'description' => '消息清理类型。取值说明如下:'."\n"
- ."\n"
- .'- **0**:清除所有消息。该Group ID在消费该Topic下的消息时会跳过当前堆积(未被消费)的所有消息,从这之后发送的最新消息开始消费。'."\n"
- .' '."\n"
- .' 对于程序返回"reconsumeLater",即走重试流程的这部分消息来说,清除无效。'."\n"
- .'- **1**:清理到指定时间。请指定一个时间点,这个时间点之后发送的消息才会被消费。'."\n"
- .' '."\n"
- .' 可选时间范围中的起始和终止时间分别是该Topic中储存的最早的和最晚的一条消息的生产时间。不能选择超过可选时间范围的时间点。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '1',
- ],
+ 'schema' => ['description' => '消息类型。取值说明如下:'."\n"
+ ."\n"
+ .'- **0**:普通消息'."\n"
+ .'- **1**:分区顺序消息'."\n"
+ .'- **4**:事务消息'."\n"
+ .'- **5**:定时/延时消息'."\n"
+ ."\n"
+ .'各类型消息的详细说明,请参见[消息类型列表](~~155952~~)。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'example' => '0'],
],
[
- 'name' => 'ResetTimestamp',
+ 'name' => 'Remark',
'in' => 'query',
- 'schema' => [
- 'description' => '重置位点到指定的时间戳,仅在**Type**为**1**时生效。单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => false,
- 'example' => '1591153871000',
- ],
+ 'schema' => ['description' => '需创建的Topic的描述信息。', 'type' => 'string', 'required' => false, 'example' => '测试'],
],
[
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的Group ID所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '需创建的Topic所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_188077086902****_BXSuW61e'],
],
],
'responses' => [
200 => [
'schema' => [
+ 'description' => '返回的数据结构。',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'D52C68F8-EC5D-4294-BFFF-1A6A25AF****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'B6949B58-223E-4B75-B4FE-7797C15E****'],
],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"D52C68F8-EC5D-4294-BFFF-1A6A25AF****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsConsumerResetOffsetResponse>\\r\\n <RequestId>D52C68F8-EC5D-4294-BFFF-1A6A25AF****</RequestId>\\r\\n</OnsConsumerResetOffsetResponse>","errorExample":""}]',
- 'title' => '重置Group ID消费位点',
- 'summary' => '重置指定的Group ID的消费位点到指定时间戳。',
+ 'errorCodes' => [
+ 400 => [
+ ['errorCode' => '%s', 'errorMessage' => '%s, please check and retry later', 'description' => ''],
+ ],
+ ],
+ 'title' => '创建Topic',
'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
- .'本接口一般用于清理堆积消息,或者回溯消费。有以下两种清理方式:'."\n"
- ."\n"
- .'- 清理所有消息'."\n"
- ."\n"
- .'- 清理消费进度到指定的时间',
+ .'本接口一般是在发布新应用或业务扩展等需要创建新的Topic资源时使用。'."\n"
+ ."\n",
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsConsumerResetOffset**接口,您还可以通过云消息队列 RocketMQ 版控制台重置指定Group ID的消费位点。具体操作,请参见[重置消费位点](~~63390~~)。',
- ],
- 'OnsConsumerTimeSpan' => [
- 'methods' => [
- 'post',
- 'get',
+ .'除了调用**OnsTopicCreate**接口,您还可以通过消息队列RocketMQ版控制台,创建Topic。具体操作,请参见[Topic管理](~~199535~~)。',
+ 'changeSet' => [
+ ['createdAt' => '2021-08-16T02:20:32.000Z', 'description' => '错误码发生变更'],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsTopicCreate'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'mq:CreateTopic',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
+ ],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"B6949B58-223E-4B75-B4FE-7797C15E****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsTopicCreateResponse>\\r\\n<RequestId>B6949B58-223E-4B75-B4FE-7797C15E****</RequestId>\\r\\n</OnsTopicCreateResponse>","errorExample":""}]',
+ ],
+ 'OnsTopicDelete' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'read',
+ 'operationType' => 'readAndWrite',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => [],
'parameters' => [
[
- 'name' => 'GroupId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消费端Group ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'GID_test_group_id',
- ],
- ],
- [
'name' => 'Topic',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消费端Group ID订阅的Topic。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'test-mq_topic',
- ],
+ 'schema' => ['description' => '指定删除的Topic。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test'],
],
[
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消费端Group ID所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '需删除的Topic所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_188077086902****_BXSuW61e'],
],
],
'responses' => [
@@ -4420,163 +3202,214 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****',
- ],
- 'Data' => [
- 'description' => '查询结果。',
- 'type' => 'object',
- 'properties' => [
- 'MaxTimeStamp' => [
- 'description' => '整个Topic目前最新存储的消息的生产时间。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570761026804',
- ],
- 'ConsumeTimeStamp' => [
- 'description' => '当前Group消费该Topic的最新时间。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570761026400',
- ],
- 'Topic' => [
- 'description' => '需查询的Topic。',
- 'type' => 'string',
- 'example' => 'test-mq_topic',
- ],
- 'MinTimeStamp' => [
- 'description' => '整个Topic目前最早存储的消息的生产时间。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570701231122',
- ],
- 'InstanceId' => [
- 'description' => '需查询的消费端Group ID所对应的实例ID。',
- 'type' => 'string',
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
- ],
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '4189D4A6-231A-4028-8D89-F66A76C1****'],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\",\\n \\"Data\\": {\\n \\"MaxTimeStamp\\": 1570761026804,\\n \\"ConsumeTimeStamp\\": 1570761026400,\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"MinTimeStamp\\": 1570701231122,\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsConsumerTimeSpanResponse>\\n<Data>\\n <MinTimeStamp>1570701231122</MinTimeStamp>\\n <ConsumeTimeStamp>1570761026400</ConsumeTimeStamp>\\n <InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>\\n <Topic>test-mq_topic</Topic>\\n <MaxTimeStamp>1570761026804</MaxTimeStamp>\\n</Data>\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\n</OnsConsumerTimeSpanResponse>","errorExample":""}]',
- 'title' => '查询Topic可重置时间范围',
- 'summary' => '查询Topic可重置的时间范围,即该Topic中储存的最早的和最晚的消息的生产时间。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
- .'使用本接口可以查询某个Topic在当前服务器上存储的最早和最晚的一条消息的时间,以及查询消费端最近消费的时间。本接口一般用于展示消费进度的概况,和**OnsConsumerAccumulate**接口配合使用。',
+ 'title' => '删除Topic',
+ 'summary' => '调用OnsTopicDelete接口删除指定的Topic。',
+ 'description' => '><notice>'."\n"
+ .'- 阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。'."\n"
+ .'- 删除Topic将导致该Topic下所有的发布订阅关系同时被清理,请慎重调用。></notice>'."\n"
+ .'本接口一般是在应用下线等资源回收场景下使用。'."\n"
+ .'Topic删除时后台需要做资源回收,速度较慢,因此不建议删除后立即又重新创建。如果删除失败,请根据错误码进行处理。'."\n",
'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
- 'extraInfo' => ' ',
- ],
- 'OnsMessagePush' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ 'extraInfo' => '## 控制台操作'."\n"
+ ."\n"
+ .'除了调用**OnsTopicDelete**接口,您还可以通过云消息队列 RocketMQ 版控制台删除Topic。具体操作,请参见[Topic管理](~~199535~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsTopicDelete'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'mq:DeleteTopic',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4189D4A6-231A-4028-8D89-F66A76C1****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsTopicDeleteResponse>\\r\\n<RequestId>4189D4A6-231A-4028-8D89-F66A76C1****</RequestId>\\r\\n</OnsTopicDeleteResponse>","errorExample":""}]',
+ ],
+ 'OnsTopicList' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'readAndWrite',
+ 'operationType' => 'read',
'deprecated' => false,
'systemTags' => [
- 'operationType' => 'get',
+ 'operationType' => 'list',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ 'abilityTreeNodes' => ['FEATUREonsXSOU1Y'],
],
'parameters' => [
[
- 'name' => 'GroupId',
- 'in' => 'query',
- 'schema' => [
- 'description' => 'Group ID。详细信息,请参见[名词解释](~~29533~~)。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'GID_test_group_id',
- ],
- ],
- [
- 'name' => 'ClientId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '消费者实例的ID。您可调用[OnsConsumerGetConnection](~~29598~~)接口获取该ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '30.5.121.**@24813#-1999745829#-1737591554#453111174894656',
- ],
- ],
- [
- 'name' => 'MsgId',
+ 'name' => 'Topic',
'in' => 'query',
- 'schema' => [
- 'description' => '消息的标识,即Message ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '0BC1669963053CF68F733BB70396****',
- ],
+ 'schema' => ['description' => '查询指定Topic时设置,若不输入,则查询所有Topic。', 'type' => 'string', 'required' => false, 'example' => 'test'],
],
[
- 'name' => 'Topic',
+ 'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '消息推送至的目标Topic。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'test-mq_topic',
- ],
+ 'schema' => ['description' => '需获取的Topic信息列表所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_188077086902****_BXSuW61e'],
],
[
- 'name' => 'InstanceId',
+ 'name' => 'Tag',
'in' => 'query',
+ 'allowEmptyValue' => false,
+ 'style' => 'repeatList',
'schema' => [
- 'description' => '所需推送的消息所在的实例ID。',
- 'type' => 'string',
+ 'description' => 'Topic所绑定的标签列表。列表元素个数不得超过 20。',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '返回的标签结构。',
+ 'type' => 'object',
+ 'properties' => [
+ 'Key' => ['description' => 'Topic的标签键。**Key**和**Value**值必须同时输入或同时不输入。若同时输入表示根据Tag过滤符合条件的Topic,若不输入表示查询所有Topic。'."\n"
+ ."\n"
+ .'- 如果输入该值,则取值不允许为空字符串。'."\n"
+ .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => true, 'example' => 'CartService'],
+ 'Value' => ['description' => 'Topic的标签值。**Key**和**Value**值必须同时输入或同时不输入。若同时输入表示根据Tag过滤符合条件的Topic,若不输入表示查询所有Topic。'."\n"
+ ."\n"
+ .'- 如果输入该值,取值允许为空字符串。'."\n"
+ .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => true, 'example' => 'ServiceA'],
+ ],
+ 'required' => false,
+ ],
'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
+ 'maxItems' => 21,
],
],
],
'responses' => [
200 => [
'schema' => [
+ 'description' => '返回的数据结构。',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'B8EDC90D-F726-4B9E-8BEF-F0DD25EC****',
+ 'RequestId' => ['description' => '公共参数,每个请求ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '4A978869-7681-4529-B470-107E1379****'],
+ 'Data' => [
+ 'type' => 'object',
+ 'itemNode' => true,
+ 'properties' => [
+ 'PublishInfoDo' => [
+ 'description' => '返回指定实例的Topic信息列表。',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '返回的Topic的数据结构。',
+ 'type' => 'object',
+ 'properties' => [
+ 'MessageType' => ['description' => '消息类型。取值说明如下:'."\n"
+ ."\n"
+ .'- **0**:普通消息'."\n"
+ .'- **1**:分区顺序消息'."\n"
+ .'- **2**:全局顺序消息'."\n"
+ .'- **4**:事务消息'."\n"
+ .'- **5**:定时/延时消息', 'type' => 'integer', 'format' => 'int32', 'example' => '0'],
+ 'RelationName' => ['description' => '所有关系名称,例如持有者、可订阅、可发布和可发布订阅。', 'type' => 'string', 'example' => '授权发布/订阅'],
+ 'Owner' => ['description' => 'Topic所有者编号,为阿里云的账号ID。', 'type' => 'string', 'example' => '138015630679****'],
+ 'IndependentNaming' => ['description' => 'Topic所在实例是否有命名空间。取值说明如下:'."\n"
+ ."\n"
+ .'- **true**:拥有独立命名空间,资源命名确保实例内唯一,跨实例之间可重名。'."\n"
+ .'- **false**:无独立命名空间,实例内或者跨实例之间,资源命名必须全局唯一。', 'type' => 'boolean', 'example' => 'true'],
+ 'Remark' => ['description' => '备注信息。', 'type' => 'string', 'example' => '测试'],
+ 'Relation' => ['description' => '所有关系编号。取值说明如下:'."\n"
+ ."\n"
+ .'- **1**:持有者'."\n"
+ .'- **2**:可以发布'."\n"
+ .'- **4**:可以订阅'."\n"
+ .'- **6**:可以发布和订阅', 'type' => 'integer', 'format' => 'int32', 'example' => '6'],
+ 'CreateTime' => ['description' => '创建时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570700947000'],
+ 'Topic' => ['description' => 'Topic名称。', 'type' => 'string', 'example' => 'test'],
+ 'Tags' => [
+ 'type' => 'object',
+ 'itemNode' => true,
+ 'properties' => [
+ 'Tag' => [
+ 'description' => 'Topic所绑定的标签。',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '标签结构定义。',
+ 'type' => 'object',
+ 'properties' => [
+ 'Key' => ['description' => '标签键。', 'type' => 'string', 'example' => 'CartService'],
+ 'Value' => ['description' => '标签值。', 'type' => 'string', 'example' => 'SrviceA'],
+ ],
+ ],
+ ],
+ ],
+ 'description' => '',
+ ],
+ 'InstanceId' => ['description' => 'Topic所在的实例ID。', 'type' => 'string', 'example' => 'MQ_INST_188077086902****_BXSuW61e'],
+ 'ServiceStatus' => ['description' => 'Topic异步创建的状态。取值说明如下:'."\n"
+ .'- **0**:创建中。'."\n"
+ .'- **1**:服务中。', 'type' => 'integer', 'format' => 'int32', 'example' => '0'],
+ ],
+ ],
+ ],
+ ],
+ 'description' => '',
],
],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"B8EDC90D-F726-4B9E-8BEF-F0DD25EC****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsMessagePushResponse>\\n <RequestId>B8EDC90D-F726-4B9E-8BEF-F0DD25EC****</RequestId>\\n</OnsMessagePushResponse>","errorExample":""}]',
- 'title' => '向指定的消费者推送消息',
- 'summary' => '调用OnsMessagePush向指定的消费者推送消息。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
- .'本接口主要用于消费验证的场景。通过传入的MsgId获取指定消息的消息体,再将消息体重新进行封装推送给消费者。此时重新发送的这条消息和原消息的消息内容相同,但并不是同一条消息且MsgId不同。',
- ],
- 'OnsTrendTopicInputTps' => [
- 'methods' => [
- 'post',
- 'get',
+ 'title' => '获取Topic列表信息',
+ 'summary' => '查询账号下所有Topic的信息列表。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>本接口一般用于生成资源列表的场景,并不查看具体信息。',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => ' ',
+ 'extraInfo' => ' ',
+ 'changeSet' => [
+ ['createdAt' => '2022-08-01T15:54:54.000Z', 'description' => '请求参数发生变更'],
+ ['createdAt' => '2021-09-13T08:42:21.000Z', 'description' => '响应参数发生变更'],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsTopicList'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'list',
+ 'ramAction' => [
+ 'action' => 'mq:ListTopic',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4A978869-7681-4529-B470-107E1379****\\",\\n \\"Data\\": {\\n \\"PublishInfoDo\\": [\\n {\\n \\"MessageType\\": 0,\\n \\"RelationName\\": \\"授权发布/订阅\\",\\n \\"Owner\\": \\"138015630679****\\",\\n \\"IndependentNaming\\": true,\\n \\"Remark\\": \\"测试\\",\\n \\"Relation\\": 6,\\n \\"CreateTime\\": 1570700947000,\\n \\"Topic\\": \\"test\\",\\n \\"Tags\\": {\\n \\"Tag\\": [\\n {\\n \\"Key\\": \\"CartService\\",\\n \\"Value\\": \\"SrviceA\\"\\n }\\n ]\\n },\\n \\"InstanceId\\": \\"MQ_INST_188077086902****_BXSuW61e\\",\\n \\"ServiceStatus\\": 0\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsTopicListResponse>\\n <RequestId>4A978869-7681-4529-B470-107E1379****</RequestId>\\n <Data>\\n <MessageType>0</MessageType>\\n <RelationName>授权发布/订阅</RelationName>\\n <Owner>138015630679****</Owner>\\n <IndependentNaming>true</IndependentNaming>\\n <Remark>测试</Remark>\\n <Relation>6</Relation>\\n <CreateTime>1570700947000</CreateTime>\\n <Topic>test</Topic>\\n <Tags>\\n <Key>CartService</Key>\\n <Value>SrviceA</Value>\\n </Tags>\\n <InstanceId>MQ_INST_188077086902****_BXSuW61e</InstanceId>\\n <ServiceStatus>0</ServiceStatus>\\n </Data>\\n</OnsTopicListResponse>","errorExample":""}]',
+ ],
+ 'OnsTopicStatus' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -4586,79 +3419,109 @@
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ 'abilityTreeNodes' => ['FEATUREons8BETJT'],
],
'parameters' => [
[
'name' => 'Topic',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的Topic名称。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'test',
- ],
+ 'schema' => ['description' => '需查询的Topic名称。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test'],
],
[
- 'name' => 'BeginTime',
+ 'name' => 'InstanceId',
'in' => 'query',
+ 'schema' => ['description' => '需查询的Topic所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_188077086902****_BXSuW61e'],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
'schema' => [
- 'description' => '查询区间的起始时间戳,单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '1570852800000',
+ 'description' => '返回信息。',
+ 'type' => 'object',
+ 'properties' => [
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '427EE49D-D762-41FB-8F3D-9BAC96C3****'],
+ 'Data' => [
+ 'description' => '查询到的Topic的信息存储数据结构。',
+ 'type' => 'object',
+ 'properties' => [
+ 'Perm' => ['description' => '所有关系编号。取值说明如下:'."\n"
+ ."\n"
+ .'- **2**:可以发布'."\n"
+ .'- **4**:可以订阅'."\n"
+ .'- **6**:可以发布和订阅', 'type' => 'integer', 'format' => 'int32', 'example' => '6'],
+ 'LastTimeStamp' => ['description' => '当前Topic内最新一条消息的就绪时间,如果Topic内没有消息,则该参数返回值为0。'."\n"
+ ."\n"
+ .'该参数值的格式为毫秒级Unix时间戳。'."\n"
+ ."\n"
+ .'就绪消息及就绪时间具体含义,请参见[名词解释](~~29533~~)。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570864984364'],
+ 'TotalCount' => ['description' => '当前Topic的所有分区存在的消息数总和。', 'type' => 'integer', 'format' => 'int64', 'example' => '2310'],
+ ],
+ ],
+ ],
],
],
- [
- 'name' => 'EndTime',
- 'in' => 'query',
- 'schema' => [
- 'description' => '查询区间的终止时间戳,单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '1570868400000',
+ ],
+ 'title' => '查询Topic状态',
+ 'summary' => '查询当前Topic下的消息总量以及Topic的状态。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>本接口一般用于判断Topic资源的使用率。调用本接口后返回的信息包含当前服务器上该Topic所有的消息数,以及最后消息写入时间。',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => ' ',
+ 'extraInfo' => ' ',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '1', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsTopicStatus'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryTopicStatus',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
],
],
+ ],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"427EE49D-D762-41FB-8F3D-9BAC96C3****\\",\\n \\"Data\\": {\\n \\"Perm\\": 6,\\n \\"LastTimeStamp\\": 1570864984364,\\n \\"TotalCount\\": 2310\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsTopicStatusResponse>\\n<Data>\\n <Perm>6</Perm>\\n <TotalCount>2310</TotalCount>\\n <LastTimeStamp>1570864984364</LastTimeStamp>\\n</Data>\\n<RequestId>427EE49D-D762-41FB-8F3D-9BAC96C3****</RequestId>\\n</OnsTopicStatusResponse>","errorExample":""}]',
+ ],
+ 'OnsTopicSubDetail' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
+ 'security' => [
[
- 'name' => 'Type',
- 'in' => 'query',
- 'schema' => [
- 'description' => '查询的类型。取值说明如下:'."\n"
- ."\n"
- .'- **0**:查询指定时间段内Topic的写入量。'."\n"
- .'- **1**:查询指定时间段内Topic的TPS曲线数据。'."\n",
- 'type' => 'integer',
- 'format' => 'int32',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '0',
- ],
+ 'AK' => [],
],
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'get',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ 'abilityTreeCode' => '14953',
+ 'abilityTreeNodes' => ['FEATUREons8BETJT'],
+ ],
+ 'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '指定的Topic所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '需查询的Topic所对应的实例ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
[
- 'name' => 'Period',
+ 'name' => 'Topic',
'in' => 'query',
- 'schema' => [
- 'description' => '采样周期,单位:分钟,取值可为1、5、10。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => false,
- 'example' => '10',
- ],
+ 'schema' => ['description' => '需查询的Topic。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test'],
],
],
'responses' => [
@@ -4666,177 +3529,181 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'E213AD8A-0730-4B3D-A35A-340DA47D****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '87B6207F-2908-42B5-A134-84956DCA****'],
'Data' => [
- 'description' => '数据集合。',
+ 'description' => '返回Data对象。',
'type' => 'object',
'properties' => [
- 'Records' => [
+ 'SubscriptionDataList' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
- 'StatsDataDo' => [
- 'description' => '采集点信息。',
+ 'SubscriptionDataList' => [
+ 'description' => '所有在线订阅组。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
- 'Y' => [
- 'description' => '纵轴,数据(TPS或者总量)。',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0',
- ],
- 'X' => [
- 'description' => '横轴,时间戳,单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570852800000',
- ],
+ 'GroupId' => ['description' => '订阅该 Topic 的 Group ID。', 'type' => 'string', 'example' => 'GID_test'],
+ 'MessageModel' => ['description' => '消费模式。取值说明如下:'."\n"
+ ."\n"
+ .'- CLUSTERING:集群订阅'."\n"
+ .'- BROADCASTING:广播订阅'."\n"
+ ."\n"
+ .'消费模式的更多信息,请参见[集群消费和广播消费](~~43163~~)。', 'type' => 'string', 'example' => 'CLUSTERING'],
+ 'SubString' => ['description' => '订阅表达式。', 'type' => 'string', 'example' => '*'],
+ 'Online' => ['title' => '是否在线', 'description' => '是否在线', 'type' => 'string', 'example' => 'true'],
],
+ 'description' => '',
],
],
],
+ 'description' => '',
],
- 'XUnit' => [
- 'description' => '横轴单位。统计时间:ms。',
- 'type' => 'string',
- 'example' => 'ms',
- ],
- 'YUnit' => [
- 'description' => '纵轴单位。统计的消息生产数量msg,或者统计的消息生产TPS msg/min。',
- 'type' => 'string',
- 'example' => 'msg',
- ],
- 'Title' => [
- 'description' => 'Table的名称。',
- 'type' => 'string',
- 'example' => 'TopicXXX Send Trend Chart',
- ],
+ 'Topic' => ['description' => 'Topic名称。', 'type' => 'string', 'example' => 'test'],
],
],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"E213AD8A-0730-4B3D-A35A-340DA47D****\\",\\n \\"Data\\": {\\n \\"Records\\": {\\n \\"StatsDataDo\\": [\\n {\\n \\"Y\\": 0,\\n \\"X\\": 1570852800000\\n }\\n ]\\n },\\n \\"XUnit\\": \\"ms\\",\\n \\"YUnit\\": \\"msg\\",\\n \\"Title\\": \\"TopicXXX Send Trend Chart\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsTrendTopicInputTpsResponse>\\n<Data>\\n <Records>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570852800000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570853400000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570854000000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570854600000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570860600000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570861200000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570861800000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570862400000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570863000000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570863600000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570864200000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>1</Y>\\n <X>1570864800000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570865400000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570866000000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570866600000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570867200000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570867800000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570868400000</X>\\n </StatsDataDo>\\n </Records>\\n <XUnit>time</XUnit>\\n <YUnit>msg</YUnit>\\n <Title>MQ_INST_111111111111_DOxxxxxx%test-mq_topic接收总量趋势图</Title>\\n</Data>\\n<RequestId>E213AD8A-0730-4B3D-A35A-340DA47D****</RequestId>\\n</OnsTrendTopicInputTpsResponse>","errorExample":""}]',
- 'title' => '统计消息生产数据',
- 'summary' => '查询一段时间内指定的Topic的消息写入报表数据。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
- .'您可以使用本接口获取在线上环境统计的Topic的消息数据信息,可以根据需要选择查询指定时间段内Topic的写入量或者TPS曲线数据。'."\n"
- ."\n"
- .'如果应用方消息量比较小,间隔不均匀,此时采用TPS查询可能会导致数据不明显,建议使用总量查询。',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
+ 'title' => '查看Topic的订阅信息',
+ 'summary' => '查看有哪些在线订阅组订阅了这个Topic。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>该接口用于查询Group和Topic之间的订阅关系。如果Group ID对应的消费者实例不在线则查不到数据。',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsTrendTopicInputTps**接口,您还可以通过云消息队列 RocketMQ 版控制台查看指定Topic中生产消息的统计数据。具体操作,请参见[仪表盘](~~288246~~)。',
- ],
- 'OnsTrendGroupOutputTps' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ .'除了调用**OnsTopicSubDetail**接口,您还可以通过云消息队列 RocketMQ 版控制台查看Topic和Group的订阅关系。具体操作,请参见[查看订阅关系](~~90592~~)。',
+ 'changeSet' => [
+ ['createdAt' => '2025-03-21T09:33:23.000Z', 'description' => '响应参数发生变更'],
+ ['createdAt' => '2021-09-08T02:46:09.000Z', 'description' => '错误码发生变更'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsTopicSubDetail'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryTopicSubDetail',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"87B6207F-2908-42B5-A134-84956DCA****\\",\\n \\"Data\\": {\\n \\"SubscriptionDataList\\": {\\n \\"SubscriptionDataList\\": [\\n {\\n \\"GroupId\\": \\"GID_test\\",\\n \\"MessageModel\\": \\"CLUSTERING\\",\\n \\"SubString\\": \\"*\\",\\n \\"Online\\": \\"true\\"\\n }\\n ]\\n },\\n \\"Topic\\": \\"test\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsTopicSubDetailResponse>\\n<Data>\\n <Topic>test</Topic>\\n <SubscriptionDataList>\\n <SubscriptionDataList>\\n <SubString>*</SubString>\\n <MessageModel>CLUSTERING</MessageModel>\\n <GroupId>GID_test</GroupId>\\n </SubscriptionDataList>\\n </SubscriptionDataList>\\n</Data>\\n<RequestId>87B6207F-2908-42B5-A134-84956DCA****</RequestId>\\n</OnsTopicSubDetailResponse>","errorExample":""}]',
+ ],
+ 'OnsTopicUpdate' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'read',
- 'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => true,
+ 'systemTags' => [],
'parameters' => [
[
- 'name' => 'GroupId',
+ 'name' => 'Topic',
'in' => 'query',
- 'schema' => [
- 'description' => '需要查询的Group ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'GID_test',
- ],
+ 'schema' => ['description' => '需配置的Topic名称。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test'],
],
[
- 'name' => 'Topic',
+ 'name' => 'Perm',
'in' => 'query',
- 'schema' => [
- 'description' => '需要查询的Topic名称。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'test',
- ],
+ 'schema' => ['description' => '设置该Topic的读写模式。取值说明如下:'."\n"
+ ."\n"
+ .'- **6**:同时支持读写'."\n"
+ .'- **4**:禁写'."\n"
+ .'- **2**:禁读', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'example' => '6'],
],
[
- 'name' => 'BeginTime',
+ 'name' => 'InstanceId',
'in' => 'query',
+ 'schema' => ['description' => '需配置的Topic所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
'schema' => [
- 'description' => '查询区间的起始时间戳,单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '1570852800000',
+ 'type' => 'object',
+ 'properties' => [
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '81979ADA-4A78-4F64-9DEC-5700446D****'],
+ ],
+ 'description' => '',
],
],
- [
- 'name' => 'EndTime',
- 'in' => 'query',
- 'schema' => [
- 'description' => '查询区间的终止时间戳,单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '1570868400000',
+ ],
+ 'staticInfo' => ['noSubstitutionReason' => '无替代API,历史原因导致该API被标记为弃用。'],
+ 'title' => '配置Topic的读写模式',
+ 'summary' => '调用OnsTopicUpdate配置Topic的读写模式。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>本接口一般用于禁读或禁写的场景。',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => ' ',
+ 'extraInfo' => ' ',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsTopicUpdate'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'mq:UpdateTopic',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
],
],
+ ],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"81979ADA-4A78-4F64-9DEC-5700446D****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsTopicUpdateResponse>\\r\\n<RequestId>81979ADA-4A78-4F64-9DEC-5700446D****</RequestId>\\r\\n</OnsTopicUpdateResponse>","errorExample":""}]',
+ ],
+ 'OnsTraceGetResult' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
+ 'security' => [
[
- 'name' => 'Type',
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => ['operationType' => 'get'],
+ 'parameters' => [
+ [
+ 'name' => 'QueryId',
'in' => 'query',
- 'schema' => [
- 'description' => '查询的类型。取值说明如下:'."\n"
- ."\n"
- .'- **0**:查询消费消息总量的统计曲线。'."\n"
- .'- **1**:查询消费消息TPS的统计曲线。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '0',
- ],
+ 'schema' => ['description' => '需要提取轨迹查询结果的任务ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '272967562652883649157096685****'],
],
[
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需统计数据的Group ID所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '需查询的消息所对应的实例ID。', 'type' => 'string', 'required' => false, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
[
- 'name' => 'Period',
+ 'name' => 'Topic',
'in' => 'query',
- 'schema' => [
- 'description' => '采样周期,单位:分钟,取值可为 1、5、10。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => false,
- 'example' => '10',
- ],
+ 'schema' => ['description' => '需查询的消息的Topic。', 'type' => 'string', 'required' => false, 'example' => 'test'],
],
],
'responses' => [
@@ -4844,87 +3711,153 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'CE57AEDC-8FD2-43ED-8E3B-1F878077****',
- ],
- 'Data' => [
- 'description' => '数据集合。',
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '84EE24D2-851F-40D6-B99E-4D6AB909****'],
+ 'TraceData' => [
+ 'description' => '该查询任务的结果明细。',
'type' => 'object',
'properties' => [
- 'Records' => [
+ 'Status' => ['description' => '该查询任务的结果。取值说明如下:'."\n"
+ ."\n"
+ .'- **finish**:查询完成'."\n"
+ .'- **working**:查询中'."\n"
+ .'- **removed**:任务已删除', 'type' => 'string', 'example' => 'finish'],
+ 'MsgKey' => ['description' => '该查询任务对应的Message Key。', 'type' => 'string', 'example' => 'ORDERID_100'],
+ 'UpdateTime' => ['description' => '该查询任务的最后更新时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570966877000'],
+ 'CreateTime' => ['description' => '该查询任务的创建时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570966857000'],
+ 'Topic' => ['description' => '该查询任务的Topic。', 'type' => 'string', 'example' => 'test'],
+ 'UserId' => ['description' => '查询用户ID。', 'type' => 'string', 'example' => '27296756265288****'],
+ 'InstanceId' => ['description' => '实例ID。', 'type' => 'string', 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
+ 'MsgId' => ['description' => '该查询任务对应的Message ID。', 'type' => 'string', 'example' => '1E05791C117818B4AAC23B1BB0CE****'],
+ 'TraceList' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
- 'StatsDataDo' => [
- 'description' => '采集点信息。',
+ 'TraceMapDo' => [
+ 'description' => '该查询任务的匹配轨迹列表。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
- 'Y' => [
- 'description' => '纵轴,数据(TPS或者总量)。',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0',
- ],
- 'X' => [
- 'description' => '横轴,时间戳,单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570867800000',
+ 'Status' => ['description' => '发送状态。取值说明如下:'."\n"
+ ."\n"
+ .'- **SEND_SUCCESS**:发送成功'."\n"
+ .'- **SEND_FAILED**:发送失败'."\n"
+ .'- **SEND_ROLLBACK**:事务消息回滚'."\n"
+ .'- **SEND_UNKNOWN**:事务消息未提交'."\n"
+ .'- **SEND_DELAY**:定时(延时)消息定时中', 'type' => 'string', 'example' => 'SEND_SUCCESS'],
+ 'MsgKey' => ['description' => '消息的Key ,即Message Key。', 'type' => 'string', 'example' => 'ORDERID_100'],
+ 'PubTime' => ['description' => '消息发送时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570850870478'],
+ 'SubList' => [
+ 'type' => 'object',
+ 'itemNode' => true,
+ 'properties' => [
+ 'SubMapDo' => [
+ 'description' => '消息的消费轨迹列表。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'ClientList' => [
+ 'type' => 'object',
+ 'itemNode' => true,
+ 'properties' => [
+ 'SubClientInfoDo' => [
+ 'description' => '该Group ID客户端消费记录的明细列表。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Status' => ['description' => '消费状态。取值说明如下:'."\n"
+ ."\n"
+ .'- **CONSUME_FAILED**:消费失败'."\n"
+ .'- **CONSUME_SUCCESS**:消费成功'."\n"
+ .'- **CONSUME_NOT_RETURN**:消费未返回结果'."\n"
+ .'- **SEND_UNKNOWN**:事务消息未提交'."\n"
+ .'- **SEND_DELAY**:定时(延时)消息定时中', 'type' => 'string', 'example' => 'CONSUME_SUCCESS'],
+ 'SubTime' => ['description' => '消费开始时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570851590511'],
+ 'ReconsumeTimes' => ['description' => '本次消费的投递轮次。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'],
+ 'SubGroupName' => ['description' => '该客户端所属的Group ID。', 'type' => 'string', 'example' => 'GID_test'],
+ 'ClientHost' => ['description' => '消费客户端的客户端地址。', 'type' => 'string', 'example' => '30.5.**.**'],
+ 'CostTime' => ['description' => '本次消费耗时,单位毫秒。', 'type' => 'integer', 'format' => 'int32', 'example' => '43'],
+ ],
+ 'description' => '',
+ ],
+ ],
+ ],
+ 'description' => '',
+ ],
+ 'FailCount' => ['description' => '该Group ID消费失败次数统计。', 'type' => 'integer', 'format' => 'int32', 'example' => '0'],
+ 'SubGroupName' => ['description' => '消费方Group ID。', 'type' => 'string', 'example' => 'GID_test'],
+ 'SuccessCount' => ['description' => '该Group ID消费成功次数统计。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'],
+ ],
+ 'description' => '',
+ ],
+ ],
+ ],
+ 'description' => '',
],
+ 'Topic' => ['description' => '消息的Topic。', 'type' => 'string', 'example' => 'test'],
+ 'CostTime' => ['description' => '发送耗时,单位毫秒。', 'type' => 'integer', 'format' => 'int32', 'example' => '24'],
+ 'Tag' => ['description' => '消息的Tag,即Message Tag。', 'type' => 'string', 'example' => 'TagA'],
+ 'MsgId' => ['description' => '消息的ID,即Message ID。', 'type' => 'string', 'example' => '0BC1F01800002A9F000000531246****'],
+ 'PubGroupName' => ['description' => '发送方客户端配置的Group ID。', 'type' => 'string', 'example' => 'GID_test'],
+ 'BornHost' => ['description' => '消息发送方的客户端地址。', 'type' => 'string', 'example' => '30.5.**.**'],
],
+ 'description' => '',
],
],
],
+ 'description' => '',
],
- 'XUnit' => [
- 'description' => '横轴单位。统计时间:ms。',
- 'type' => 'string',
- 'example' => 'ms',
- ],
- 'YUnit' => [
- 'description' => '纵轴单位。统计的消息消费数量msg,或者统计的消息消费TPS msg/min。',
- 'type' => 'string',
- 'example' => 'msg',
- ],
- 'Title' => [
- 'description' => 'Table的名称。',
- 'type' => 'string',
- 'example' => 'TopicXXX@GID_XXXReceive Trend Chart',
- ],
+ 'QueryId' => ['description' => '查询任务ID。', 'type' => 'string', 'example' => '272967562652883649157096685****'],
],
],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"CE57AEDC-8FD2-43ED-8E3B-1F878077****\\",\\n \\"Data\\": {\\n \\"Records\\": {\\n \\"StatsDataDo\\": [\\n {\\n \\"Y\\": 0,\\n \\"X\\": 1570867800000\\n }\\n ]\\n },\\n \\"XUnit\\": \\"ms\\",\\n \\"YUnit\\": \\"msg\\",\\n \\"Title\\": \\"TopicXXX@GID_XXXReceive Trend Chart\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsTrendGroupOutputTpsResponse>\\n<Data>\\n <Records>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570852800000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570853400000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570854000000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570854600000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570855200000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570860600000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570861200000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570861800000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570862400000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570863000000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570863600000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570864200000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>1</Y>\\n <X>1570864800000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570865400000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570866000000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570866600000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570867200000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570867800000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570868400000</X>\\n </StatsDataDo>\\n </Records>\\n <XUnit>time</XUnit>\\n <YUnit>数量</YUnit>\\n <Title>MQ_INST_111111111111_DOxxxxxx%test@MQ_INST_111111111111_DOxxxxxx%GID_test投递总量趋势图</Title>\\n</Data>\\n<RequestId>CE57AEDC-8FD2-43ED-8E3B-1F878077****</RequestId>\\n</OnsTrendGroupOutputTpsResponse>","errorExample":""}]',
- 'title' => '统计消息消费数据',
- 'summary' => '查询指定的Group ID在一段时间内消费消息的统计信息。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>线上环境生成消费数据报表时,可以使用本接口查询指定的Group ID在一段时间内的以下统计信息:'."\n"
- ."\n"
- .'- 消费消息总量的统计曲线'."\n"
- ."\n"
- .'- 消费消息TPS的统计曲线'."\n"
+ 'title' => '获取轨迹查询结果',
+ 'summary' => '通过传入轨迹查询任务的ID获取之前的轨迹查询结果。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
."\n"
- .'如果应用方消息量比较小,间隔不均匀,此时采用TPS查询可能会导致数据不明显,建议查询消费消息总量。',
+ .'- 若您已根据Message ID或者Message Key创建了轨迹查询任务,并得到了查询任务的ID。您可调用本接口根据查询任务ID获取对应的轨迹结果的明细。轨迹查询任务通过[OnsTraceQueryByMsgId](~~445322~~)或[OnsTraceQueryByMsgKey](~~445324~~)接口创建,返回数据中的**QueryId**即为本接口中需要传入的查询任务ID。'."\n"
+ .'- 因为消息轨迹查询任务耗时较多,创建任务后立即根据该接口获取结果可能为空,若遇到此情况,建议等待一段时间再重试。',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsTrendGroupOutputTps**接口,您还可以通过云消息队列 RocketMQ 版控制台查看指定Group ID下的消费消息的统计数据。具体操作,请参见[仪表盘](~~288246~~)。',
- ],
- 'OnsTraceQueryByMsgId' => [
- 'methods' => [
- 'post',
- 'get',
+ .'除了调用**OnsTraceGetResult**接口,您还可以通过云消息队列 RocketMQ 版控制台查看消息轨迹的查询结果。具体操作,请参见[查询消息轨迹](~~43357~~)。',
+ 'changeSet' => [
+ ['createdAt' => '2024-03-19T15:02:41.000Z', 'description' => '请求参数发生变更'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsTraceGetResult'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:GetTraceResult',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"84EE24D2-851F-40D6-B99E-4D6AB909****\\",\\n \\"TraceData\\": {\\n \\"Status\\": \\"finish\\",\\n \\"MsgKey\\": \\"ORDERID_100\\",\\n \\"UpdateTime\\": 1570966877000,\\n \\"CreateTime\\": 1570966857000,\\n \\"Topic\\": \\"test\\",\\n \\"UserId\\": \\"27296756265288****\\",\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\",\\n \\"MsgId\\": \\"1E05791C117818B4AAC23B1BB0CE****\\",\\n \\"TraceList\\": {\\n \\"TraceMapDo\\": [\\n {\\n \\"Status\\": \\"SEND_SUCCESS\\",\\n \\"MsgKey\\": \\"ORDERID_100\\",\\n \\"PubTime\\": 1570850870478,\\n \\"SubList\\": {\\n \\"SubMapDo\\": [\\n {\\n \\"ClientList\\": {\\n \\"SubClientInfoDo\\": [\\n {\\n \\"Status\\": \\"CONSUME_SUCCESS\\",\\n \\"SubTime\\": 1570851590511,\\n \\"ReconsumeTimes\\": 1,\\n \\"SubGroupName\\": \\"GID_test\\",\\n \\"ClientHost\\": \\"30.5.**.**\\",\\n \\"CostTime\\": 43\\n }\\n ]\\n },\\n \\"FailCount\\": 0,\\n \\"SubGroupName\\": \\"GID_test\\",\\n \\"SuccessCount\\": 1\\n }\\n ]\\n },\\n \\"Topic\\": \\"test\\",\\n \\"CostTime\\": 24,\\n \\"Tag\\": \\"TagA\\",\\n \\"MsgId\\": \\"0BC1F01800002A9F000000531246****\\",\\n \\"PubGroupName\\": \\"GID_test\\",\\n \\"BornHost\\": \\"30.5.**.**\\"\\n }\\n ]\\n },\\n \\"QueryId\\": \\"272967562652883649157096685****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsTraceGetResultResponse>\\n<TraceData>\\n <MsgId>1E05791C117818B4AAC23B1BB0CE****</MsgId>\\n <Status>finish</Status>\\n <TraceList>\\n <TraceMapDo>\\n <BornHost>30.5.**.**</BornHost>\\n <MsgId>0BC1F01800002A9F000000531246****</MsgId>\\n <Status>SEND_SUCCESS</Status>\\n <CostTime>24</CostTime>\\n <PubTime>1570850870478</PubTime>\\n <Tag>TagA</Tag>\\n <Topic>test</Topic>\\n <MsgKey>ORDERID_100</MsgKey>\\n <PubGroupName>GID_test</PubGroupName>\\n <SubList>\\n <SubMapDo>\\n <ClientList>\\n <SubClientInfoDo>\\n <Status>CONSUME_SUCCESS</Status>\\n <CostTime>43</CostTime>\\n <ClientHost>30.5.**.**</ClientHost>\\n <ReconsumeTimes>1</ReconsumeTimes>\\n <SubTime>1570851590511</SubTime>\\n <SubGroupName>GID_test</SubGroupName>\\n </SubClientInfoDo>\\n </ClientList>\\n <SuccessCount>1</SuccessCount>\\n <FailCount>0</FailCount>\\n <SubGroupName>GID_test</SubGroupName>\\n </SubMapDo>\\n </SubList>\\n </TraceMapDo>\\n </TraceList>\\n <CreateTime>1570966857000</CreateTime>\\n <InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>\\n <Topic>test</Topic>\\n <UpdateTime>1570966877000</UpdateTime>\\n <QueryId>272967562652883649157096685****</QueryId>\\n <UserId>27296756265288****</UserId>\\n</TraceData>\\n<RequestId>84EE24D2-851F-40D6-B99E-4D6AB909****</RequestId>\\n</OnsTraceGetResultResponse>","errorExample":""}]',
+ ],
+ 'OnsTraceQueryByMsgId' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -4932,66 +3865,32 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
'name' => 'Topic',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息的Topic。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'test',
- ],
+ 'schema' => ['description' => '需查询的消息的Topic。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test'],
],
[
'name' => 'MsgId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息的ID,即Message ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '1E05791C117818B4AAC23B1BB0CE****',
- ],
+ 'schema' => ['description' => '需查询的消息的ID,即Message ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '1E05791C117818B4AAC23B1BB0CE****'],
],
[
'name' => 'BeginTime',
'in' => 'query',
- 'schema' => [
- 'description' => '查询的时间范围的起始时间戳,单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '1570852800000',
- ],
+ 'schema' => ['description' => '查询的时间范围的起始时间戳,单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'example' => '1570852800000'],
],
[
'name' => 'EndTime',
'in' => 'query',
- 'schema' => [
- 'description' => '查询的时间范围的结束时间戳,单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '1570968000000',
- ],
+ 'schema' => ['description' => '查询的时间范围的结束时间戳,单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'example' => '1570968000000'],
],
[
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息的Topic所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '需查询的消息的Topic所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
],
'responses' => [
@@ -4999,21 +3898,13 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'B93332A3-160D-404F-880F-1F8736D1****',
- ],
- 'QueryId' => [
- 'description' => '该查询任务的ID,您需要根据该任务ID再调用[OnsTraceGetResult](~~59832~~)接口获取详细结果。',
- 'type' => 'string',
- 'example' => '272967562652883649157096685****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'B93332A3-160D-404F-880F-1F8736D1****'],
+ 'QueryId' => ['description' => '该查询任务的ID,您需要根据该任务ID再调用[OnsTraceGetResult](~~59832~~)接口获取详细结果。', 'type' => 'string', 'example' => '272967562652883649157096685****'],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"B93332A3-160D-404F-880F-1F8736D1****\\",\\n \\"QueryId\\": \\"272967562652883649157096685****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsTraceQueryByMsgIdResponse>\\n<RequestId>B93332A3-160D-404F-880F-1F8736D1039F</RequestId>\\n<QueryId>272967562652883649157096685****</QueryId>\\n</OnsTraceQueryByMsgIdResponse>","errorExample":""}]',
'title' => '根据MsgId创建轨迹查询任务',
'summary' => '通过传入Topic名称和Message ID创建轨迹查询任务,得到该查询任务的ID。您需要再调用OnsTraceGetResult接口,传入返回的查询任务ID,获取消息轨迹的详细结果。',
'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>',
@@ -5021,16 +3912,35 @@
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
.'除了调用**OnsTraceQueryByMsgId**接口,您还可以通过云消息队列 RocketMQ 版控制台创建消息轨迹查询任务。具体操作,请参见[消息查询](~~29540~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '30', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsTraceQueryByMsgId'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryTrace',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
+ ],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"B93332A3-160D-404F-880F-1F8736D1****\\",\\n \\"QueryId\\": \\"272967562652883649157096685****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsTraceQueryByMsgIdResponse>\\n<RequestId>B93332A3-160D-404F-880F-1F8736D1039F</RequestId>\\n<QueryId>272967562652883649157096685****</QueryId>\\n</OnsTraceQueryByMsgIdResponse>","errorExample":""}]',
],
'OnsTraceQueryByMsgKey' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -5038,66 +3948,32 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
'name' => 'Topic',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息的Topic。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'test',
- ],
+ 'schema' => ['description' => '需查询的消息的Topic。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test'],
],
[
'name' => 'MsgKey',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息的Message Key。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'ORDERID_100',
- ],
+ 'schema' => ['description' => '需查询的消息的Message Key。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'ORDERID_100'],
],
[
'name' => 'BeginTime',
'in' => 'query',
- 'schema' => [
- 'description' => '查询的时间范围的起始时间戳,单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '1570852800000',
- ],
+ 'schema' => ['description' => '查询的时间范围的起始时间戳,单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'example' => '1570852800000'],
],
[
'name' => 'EndTime',
'in' => 'query',
- 'schema' => [
- 'description' => '查询的时间范围的结束时间戳,单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '1570968000000',
- ],
+ 'schema' => ['description' => '查询的时间范围的结束时间戳,单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'example' => '1570968000000'],
],
[
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息的Topic所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '需查询的消息的Topic所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
],
'responses' => [
@@ -5105,21 +3981,13 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'F8654231-122A-4DBD-801F-38E35538****',
- ],
- 'QueryId' => [
- 'description' => '该查询任务的ID。您需要根据该任务ID再调用[OnsTraceGetResult](~~59832~~)接口获取详细结果。',
- 'type' => 'string',
- 'example' => '272967562652883649157096685****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'F8654231-122A-4DBD-801F-38E35538****'],
+ 'QueryId' => ['description' => '该查询任务的ID。您需要根据该任务ID再调用[OnsTraceGetResult](~~59832~~)接口获取详细结果。', 'type' => 'string', 'example' => '272967562652883649157096685****'],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"F8654231-122A-4DBD-801F-38E35538****\\",\\n \\"QueryId\\": \\"272967562652883649157096685****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsTraceQueryByMsgKeyResponse>\\n<RequestId>F8654231-122A-4DBD-801F-38E35538****</RequestId>\\n<QueryId>272967562652883649157096685****</QueryId>\\n</OnsTraceQueryByMsgKeyResponse>","errorExample":""}]',
'title' => '根据Message Key创建轨迹查询任务',
'summary' => '通过传入Topic名称和Message Key创建轨迹查询任务,得到该查询任务的ID。您需要再调用OnsTraceGetResult接口,传入返回的查询任务ID,获取消息轨迹的详细结果。',
'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>',
@@ -5127,16 +3995,35 @@
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
.'除了调用**OnsTraceQueryByMsgKey**接口,您还可以通过云消息队列 RocketMQ 版控制台创建消息轨迹查询任务。具体操作,请参见[消息查询](~~29540~~)。',
- ],
- 'OnsTraceGetResult' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '30', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsTraceQueryByMsgKey'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryTrace',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"F8654231-122A-4DBD-801F-38E35538****\\",\\n \\"QueryId\\": \\"272967562652883649157096685****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsTraceQueryByMsgKeyResponse>\\n<RequestId>F8654231-122A-4DBD-801F-38E35538****</RequestId>\\n<QueryId>272967562652883649157096685****</QueryId>\\n</OnsTraceQueryByMsgKeyResponse>","errorExample":""}]',
+ ],
+ 'OnsTrendGroupOutputTps' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -5144,40 +4031,45 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
- 'name' => 'QueryId',
+ 'name' => 'GroupId',
'in' => 'query',
- 'schema' => [
- 'description' => '需要提取轨迹查询结果的任务ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '272967562652883649157096685****',
- ],
+ 'schema' => ['description' => '需要查询的Group ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'GID_test'],
+ ],
+ [
+ 'name' => 'Topic',
+ 'in' => 'query',
+ 'schema' => ['description' => '需要查询的Topic名称。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test'],
+ ],
+ [
+ 'name' => 'BeginTime',
+ 'in' => 'query',
+ 'schema' => ['description' => '查询区间的起始时间戳,单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'example' => '1570852800000'],
+ ],
+ [
+ 'name' => 'EndTime',
+ 'in' => 'query',
+ 'schema' => ['description' => '查询区间的终止时间戳,单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'example' => '1570868400000'],
+ ],
+ [
+ 'name' => 'Type',
+ 'in' => 'query',
+ 'schema' => ['description' => '查询的类型。取值说明如下:'."\n"
+ ."\n"
+ .'- **0**:查询消费消息总量的统计曲线。'."\n"
+ .'- **1**:查询消费消息TPS的统计曲线。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'example' => '0'],
],
[
'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '需统计数据的Group ID所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
[
- 'name' => 'Topic',
+ 'name' => 'Period',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息的Topic。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'test',
- ],
+ 'schema' => ['description' => '采样周期,单位:分钟,取值可为 1、5、10。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '10'],
],
],
'responses' => [
@@ -5185,247 +4077,82 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '84EE24D2-851F-40D6-B99E-4D6AB909****',
- ],
- 'TraceData' => [
- 'description' => '该查询任务的结果明细。',
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'CE57AEDC-8FD2-43ED-8E3B-1F878077****'],
+ 'Data' => [
+ 'description' => '数据集合。',
'type' => 'object',
'properties' => [
- 'Status' => [
- 'description' => '该查询任务的结果。取值说明如下:'."\n"
- ."\n"
- .'- **finish**:查询完成'."\n"
- .'- **working**:查询中'."\n"
- .'- **removed**:任务已删除',
- 'type' => 'string',
- 'example' => 'finish',
- ],
- 'MsgKey' => [
- 'description' => '该查询任务对应的Message Key。',
- 'type' => 'string',
- 'example' => 'ORDERID_100',
- ],
- 'UpdateTime' => [
- 'description' => '该查询任务的最后更新时间。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570966877000',
- ],
- 'CreateTime' => [
- 'description' => '该查询任务的创建时间。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570966857000',
- ],
- 'Topic' => [
- 'description' => '该查询任务的Topic。',
- 'type' => 'string',
- 'example' => 'test',
- ],
- 'UserId' => [
- 'description' => '查询用户ID。',
- 'type' => 'string',
- 'example' => '27296756265288****',
- ],
- 'InstanceId' => [
- 'description' => '实例ID。',
- 'type' => 'string',
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
- 'MsgId' => [
- 'description' => '该查询任务对应的Message ID。',
- 'type' => 'string',
- 'example' => '1E05791C117818B4AAC23B1BB0CE****',
- ],
- 'TraceList' => [
+ 'Records' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
- 'TraceMapDo' => [
- 'description' => '该查询任务的匹配轨迹列表。',
+ 'StatsDataDo' => [
+ 'description' => '采集点信息。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
- 'Status' => [
- 'description' => '发送状态。取值说明如下:'."\n"
- ."\n"
- .'- **SEND_SUCCESS**:发送成功'."\n"
- .'- **SEND_FAILED**:发送失败'."\n"
- .'- **SEND_ROLLBACK**:事务消息回滚'."\n"
- .'- **SEND_UNKNOWN**:事务消息未提交'."\n"
- .'- **SEND_DELAY**:定时(延时)消息定时中',
- 'type' => 'string',
- 'example' => 'SEND_SUCCESS',
- ],
- 'MsgKey' => [
- 'description' => '消息的Key ,即Message Key。',
- 'type' => 'string',
- 'example' => 'ORDERID_100',
- ],
- 'PubTime' => [
- 'description' => '消息发送时间。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570850870478',
- ],
- 'SubList' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'SubMapDo' => [
- 'description' => '消息的消费轨迹列表。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'ClientList' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'SubClientInfoDo' => [
- 'description' => '该Group ID客户端消费记录的明细列表。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Status' => [
- 'description' => '消费状态。取值说明如下:'."\n"
- ."\n"
- .'- **CONSUME_FAILED**:消费失败'."\n"
- .'- **CONSUME_SUCCESS**:消费成功'."\n"
- .'- **CONSUME_NOT_RETURN**:消费未返回结果'."\n"
- .'- **SEND_UNKNOWN**:事务消息未提交'."\n"
- .'- **SEND_DELAY**:定时(延时)消息定时中',
- 'type' => 'string',
- 'example' => 'CONSUME_SUCCESS',
- ],
- 'SubTime' => [
- 'description' => '消费开始时间戳。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570851590511',
- ],
- 'ReconsumeTimes' => [
- 'description' => '本次消费的投递轮次。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1',
- ],
- 'SubGroupName' => [
- 'description' => '该客户端所属的Group ID。',
- 'type' => 'string',
- 'example' => 'GID_test',
- ],
- 'ClientHost' => [
- 'description' => '消费客户端的客户端地址。',
- 'type' => 'string',
- 'example' => '30.5.**.**',
- ],
- 'CostTime' => [
- 'description' => '本次消费耗时,单位毫秒。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '43',
- ],
- ],
- ],
- ],
- ],
- ],
- 'FailCount' => [
- 'description' => '该Group ID消费失败次数统计。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '0',
- ],
- 'SubGroupName' => [
- 'description' => '消费方Group ID。',
- 'type' => 'string',
- 'example' => 'GID_test',
- ],
- 'SuccessCount' => [
- 'description' => '该Group ID消费成功次数统计。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1',
- ],
- ],
- ],
- ],
- ],
- ],
- 'Topic' => [
- 'description' => '消息的Topic。',
- 'type' => 'string',
- 'example' => 'test',
- ],
- 'CostTime' => [
- 'description' => '发送耗时,单位毫秒。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '24',
- ],
- 'Tag' => [
- 'description' => '消息的Tag,即Message Tag。',
- 'type' => 'string',
- 'example' => 'TagA',
- ],
- 'MsgId' => [
- 'description' => '消息的ID,即Message ID。',
- 'type' => 'string',
- 'example' => '0BC1F01800002A9F000000531246****',
- ],
- 'PubGroupName' => [
- 'description' => '发送方客户端配置的Group ID。',
- 'type' => 'string',
- 'example' => 'GID_test',
- ],
- 'BornHost' => [
- 'description' => '消息发送方的客户端地址。',
- 'type' => 'string',
- 'example' => '30.5.**.**',
- ],
+ 'Y' => ['description' => '纵轴,数据(TPS或者总量)。', 'type' => 'number', 'format' => 'float', 'example' => '0'],
+ 'X' => ['description' => '横轴,时间戳,单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570867800000'],
],
+ 'description' => '',
],
],
],
+ 'description' => '',
],
- 'QueryId' => [
- 'description' => '查询任务ID。',
- 'type' => 'string',
- 'example' => '272967562652883649157096685****',
- ],
+ 'XUnit' => ['description' => '横轴单位。统计时间:ms。', 'type' => 'string', 'example' => 'ms'],
+ 'YUnit' => ['description' => '纵轴单位。统计的消息消费数量msg,或者统计的消息消费TPS msg/min。', 'type' => 'string', 'example' => 'msg'],
+ 'Title' => ['description' => 'Table的名称。', 'type' => 'string', 'example' => 'TopicXXX@GID_XXXReceive Trend Chart'],
],
],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"84EE24D2-851F-40D6-B99E-4D6AB909****\\",\\n \\"TraceData\\": {\\n \\"Status\\": \\"finish\\",\\n \\"MsgKey\\": \\"ORDERID_100\\",\\n \\"UpdateTime\\": 1570966877000,\\n \\"CreateTime\\": 1570966857000,\\n \\"Topic\\": \\"test\\",\\n \\"UserId\\": \\"27296756265288****\\",\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\",\\n \\"MsgId\\": \\"1E05791C117818B4AAC23B1BB0CE****\\",\\n \\"TraceList\\": {\\n \\"TraceMapDo\\": [\\n {\\n \\"Status\\": \\"SEND_SUCCESS\\",\\n \\"MsgKey\\": \\"ORDERID_100\\",\\n \\"PubTime\\": 1570850870478,\\n \\"SubList\\": {\\n \\"SubMapDo\\": [\\n {\\n \\"ClientList\\": {\\n \\"SubClientInfoDo\\": [\\n {\\n \\"Status\\": \\"CONSUME_SUCCESS\\",\\n \\"SubTime\\": 1570851590511,\\n \\"ReconsumeTimes\\": 1,\\n \\"SubGroupName\\": \\"GID_test\\",\\n \\"ClientHost\\": \\"30.5.**.**\\",\\n \\"CostTime\\": 43\\n }\\n ]\\n },\\n \\"FailCount\\": 0,\\n \\"SubGroupName\\": \\"GID_test\\",\\n \\"SuccessCount\\": 1\\n }\\n ]\\n },\\n \\"Topic\\": \\"test\\",\\n \\"CostTime\\": 24,\\n \\"Tag\\": \\"TagA\\",\\n \\"MsgId\\": \\"0BC1F01800002A9F000000531246****\\",\\n \\"PubGroupName\\": \\"GID_test\\",\\n \\"BornHost\\": \\"30.5.**.**\\"\\n }\\n ]\\n },\\n \\"QueryId\\": \\"272967562652883649157096685****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsTraceGetResultResponse>\\n<TraceData>\\n <MsgId>1E05791C117818B4AAC23B1BB0CE****</MsgId>\\n <Status>finish</Status>\\n <TraceList>\\n <TraceMapDo>\\n <BornHost>30.5.**.**</BornHost>\\n <MsgId>0BC1F01800002A9F000000531246****</MsgId>\\n <Status>SEND_SUCCESS</Status>\\n <CostTime>24</CostTime>\\n <PubTime>1570850870478</PubTime>\\n <Tag>TagA</Tag>\\n <Topic>test</Topic>\\n <MsgKey>ORDERID_100</MsgKey>\\n <PubGroupName>GID_test</PubGroupName>\\n <SubList>\\n <SubMapDo>\\n <ClientList>\\n <SubClientInfoDo>\\n <Status>CONSUME_SUCCESS</Status>\\n <CostTime>43</CostTime>\\n <ClientHost>30.5.**.**</ClientHost>\\n <ReconsumeTimes>1</ReconsumeTimes>\\n <SubTime>1570851590511</SubTime>\\n <SubGroupName>GID_test</SubGroupName>\\n </SubClientInfoDo>\\n </ClientList>\\n <SuccessCount>1</SuccessCount>\\n <FailCount>0</FailCount>\\n <SubGroupName>GID_test</SubGroupName>\\n </SubMapDo>\\n </SubList>\\n </TraceMapDo>\\n </TraceList>\\n <CreateTime>1570966857000</CreateTime>\\n <InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>\\n <Topic>test</Topic>\\n <UpdateTime>1570966877000</UpdateTime>\\n <QueryId>272967562652883649157096685****</QueryId>\\n <UserId>27296756265288****</UserId>\\n</TraceData>\\n<RequestId>84EE24D2-851F-40D6-B99E-4D6AB909****</RequestId>\\n</OnsTraceGetResultResponse>","errorExample":""}]',
- 'title' => '获取轨迹查询结果',
- 'summary' => '通过传入轨迹查询任务的ID获取之前的轨迹查询结果。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
+ 'title' => '统计消息消费数据',
+ 'summary' => '查询指定的Group ID在一段时间内消费消息的统计信息。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>线上环境生成消费数据报表时,可以使用本接口查询指定的Group ID在一段时间内的以下统计信息:'."\n"
."\n"
- .'- 若您已根据Message ID或者Message Key创建了轨迹查询任务,并得到了查询任务的ID。您可调用本接口根据查询任务ID获取对应的轨迹结果的明细。轨迹查询任务通过[OnsTraceQueryByMsgId](~~445322~~)或[OnsTraceQueryByMsgKey](~~445324~~)接口创建,返回数据中的**QueryId**即为本接口中需要传入的查询任务ID。'."\n"
- .'- 因为消息轨迹查询任务耗时较多,创建任务后立即根据该接口获取结果可能为空,若遇到此情况,建议等待一段时间再重试。',
+ .'- 消费消息总量的统计曲线'."\n"
+ ."\n"
+ .'- 消费消息TPS的统计曲线'."\n"
+ ."\n"
+ .'如果应用方消息量比较小,间隔不均匀,此时采用TPS查询可能会导致数据不明显,建议查询消费消息总量。',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsTraceGetResult**接口,您还可以通过云消息队列 RocketMQ 版控制台查看消息轨迹的查询结果。具体操作,请参见[查询消息轨迹](~~43357~~)。',
- ],
- 'OnsDLQMessagePageQueryByGroupId' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ .'除了调用**OnsTrendGroupOutputTps**接口,您还可以通过云消息队列 RocketMQ 版控制台查看指定Group ID下的消费消息的统计数据。具体操作,请参见[仪表盘](~~288246~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '15', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsTrendGroupOutputTps'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryTrendGroupOutputTps',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'conditional'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"CE57AEDC-8FD2-43ED-8E3B-1F878077****\\",\\n \\"Data\\": {\\n \\"Records\\": {\\n \\"StatsDataDo\\": [\\n {\\n \\"Y\\": 0,\\n \\"X\\": 1570867800000\\n }\\n ]\\n },\\n \\"XUnit\\": \\"ms\\",\\n \\"YUnit\\": \\"msg\\",\\n \\"Title\\": \\"TopicXXX@GID_XXXReceive Trend Chart\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsTrendGroupOutputTpsResponse>\\n<Data>\\n <Records>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570852800000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570853400000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570854000000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570854600000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570855200000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570860600000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570861200000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570861800000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570862400000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570863000000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570863600000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570864200000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>1</Y>\\n <X>1570864800000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570865400000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570866000000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570866600000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570867200000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570867800000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570868400000</X>\\n </StatsDataDo>\\n </Records>\\n <XUnit>time</XUnit>\\n <YUnit>数量</YUnit>\\n <Title>MQ_INST_111111111111_DOxxxxxx%test@MQ_INST_111111111111_DOxxxxxx%GID_test投递总量趋势图</Title>\\n</Data>\\n<RequestId>CE57AEDC-8FD2-43ED-8E3B-1F878077****</RequestId>\\n</OnsTrendGroupOutputTpsResponse>","errorExample":""}]',
+ ],
+ 'OnsTrendTopicInputTps' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -5433,91 +4160,40 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
- 'name' => 'GroupId',
+ 'name' => 'Topic',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消费端Group ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'GID_test_group_id',
- ],
+ 'schema' => ['description' => '需查询的Topic名称。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test'],
],
[
'name' => 'BeginTime',
'in' => 'query',
- 'schema' => [
- 'description' => '查询范围的起始时间戳,单位:毫秒。'."\n"
- .'通过**TaskId**进行后续取消息时,该参数设置的值不生效,默认以第一次查询时输入的起始时间为准。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '1570723200000',
- ],
+ 'schema' => ['description' => '查询区间的起始时间戳,单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'example' => '1570852800000'],
],
[
'name' => 'EndTime',
'in' => 'query',
- 'schema' => [
- 'description' => '查询范围的终止时间戳,单位:毫秒。'."\n"
- .'通过**TaskId**进行后续取消息时,该参数设置的值不生效,默认以第一次查询时输入的终止时间为准。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '1570809600000',
- ],
+ 'schema' => ['description' => '查询区间的终止时间戳,单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'example' => '1570868400000'],
],
[
- 'name' => 'TaskId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '查询任务的ID,首次查询不需要输入,后续取消息必须传入,根据前一次的返回结果取出该字段。',
- 'type' => 'string',
- 'required' => false,
- 'example' => '0BC1310300002A9F000021E4D7A48346',
- ],
- ],
- [
- 'name' => 'CurrentPage',
+ 'name' => 'Type',
'in' => 'query',
- 'schema' => [
- 'description' => '当前取第几页消息,从1开始递增,最大值为50,取消息时不可超过最大页数。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '2',
- ],
+ 'schema' => ['description' => '查询的类型。取值说明如下:'."\n"
+ ."\n"
+ .'- **0**:查询指定时间段内Topic的写入量。'."\n"
+ .'- **1**:查询指定时间段内Topic的TPS曲线数据。'."\n", 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'example' => '0'],
],
[
- 'name' => 'PageSize',
+ 'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '分页查询,每页最多显示的消息数量,默认显示20条,最小5条,最多50条。'."\n"
- .'通过**TaskId**进行后续取消息时,该参数设置的值不生效,默认以第一次查询时输入的每页消息数量为准。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'required' => false,
- 'example' => '5',
- ],
+ 'schema' => ['description' => '指定的Topic所对应的实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'MQ_INST_111111111111_DOxxxxxx'],
],
[
- 'name' => 'InstanceId',
+ 'name' => 'Period',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息所对应的实例ID。'."\n",
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'schema' => ['description' => '采样周期,单位:分钟,取值可为1、5、10。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '10'],
],
],
'responses' => [
@@ -5525,372 +4201,213 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'B00CD3C8-D81E-4A41-85E2-38F19252****',
- ],
- 'MsgFoundDo' => [
- 'description' => '查询结果。',
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => 'E213AD8A-0730-4B3D-A35A-340DA47D****'],
+ 'Data' => [
+ 'description' => '数据集合。',
'type' => 'object',
'properties' => [
- 'CurrentPage' => [
- 'description' => '当前位于第几页。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1',
- ],
- 'MsgFoundList' => [
+ 'Records' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
- 'OnsRestMessageDo' => [
- 'description' => '当前页的消息集合,该类型与[OnsDLQMessageGetById](~~112667~~)的返回结果一致。',
+ 'StatsDataDo' => [
+ 'description' => '采集点信息。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
- 'StoreSize' => [
- 'description' => '消息大小。单位:KB。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '406',
- ],
- 'ReconsumeTimes' => [
- 'description' => '消息重试消费的次数。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1',
- ],
- 'StoreTimestamp' => [
- 'description' => '消息被服务端存储的时间戳。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570760999811',
- ],
- 'InstanceId' => [
- 'description' => '实例ID。',
- 'type' => 'string',
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
- 'MsgId' => [
- 'description' => '消息ID,即Message ID。',
- 'type' => 'string',
- 'example' => '1E0578FE110F18B4AAC235C05F2*****',
- ],
- 'StoreHost' => [
- 'description' => '存储该消息的服务器实例。',
- 'type' => 'string',
- 'example' => '11.193.***.***:10911',
- ],
- 'Topic' => [
- 'description' => '消息的Topic。',
- 'type' => 'string',
- 'example' => 'test-mq_topic',
- ],
- 'PropertyList' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'MessageProperty' => [
- 'description' => '消息属性列表。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Value' => [
- 'description' => '消息属性的取值。',
- 'type' => 'string',
- 'example' => 'TagA',
- ],
- 'Name' => [
- 'description' => '消息属性。取值说明如下:'."\n"
- .'- **TRACE_ON**:是否有消息轨迹。'."\n"
- .'- **KEYS**:消息的Key属性。'."\n"
- .'- **TAGS**:消息的Tag属性。'."\n"
- .'- **INSTANCE_ID**:消息所在的实例的ID。'."\n"
- ."\n"
- .'更多概念信息,请参见[名词解释](~~29533~~)。',
- 'type' => 'string',
- 'example' => 'TAGS',
- ],
- ],
- ],
- ],
- ],
- ],
- 'BornTimestamp' => [
- 'description' => '消息生产的时间戳。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570760999721',
- ],
- 'BodyCRC' => [
- 'description' => '消息体CRC校验值。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '914112295',
- ],
- 'BornHost' => [
- 'description' => '生成该消息的生产者实例。',
- 'type' => 'string',
- 'example' => '42.120.***.***:59270',
- ],
+ 'Y' => ['description' => '纵轴,数据(TPS或者总量)。', 'type' => 'number', 'format' => 'float', 'example' => '0'],
+ 'X' => ['description' => '横轴,时间戳,单位:毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '1570852800000'],
],
+ 'description' => '',
],
],
],
+ 'description' => '',
],
- 'MaxPageCount' => [
- 'description' => '查询结果最大页数。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '400',
- ],
- 'TaskId' => [
- 'description' => '第一次新建查询时,返回的查询任务ID,用于后续取消息。',
- 'type' => 'string',
- 'example' => '0BC1310300002A9F000021E4D7A48346',
- ],
+ 'XUnit' => ['description' => '横轴单位。统计时间:ms。', 'type' => 'string', 'example' => 'ms'],
+ 'YUnit' => ['description' => '纵轴单位。统计的消息生产数量msg,或者统计的消息生产TPS msg/min。', 'type' => 'string', 'example' => 'msg'],
+ 'Title' => ['description' => 'Table的名称。', 'type' => 'string', 'example' => 'TopicXXX Send Trend Chart'],
],
],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"B00CD3C8-D81E-4A41-85E2-38F19252****\\",\\n \\"MsgFoundDo\\": {\\n \\"CurrentPage\\": 1,\\n \\"MsgFoundList\\": {\\n \\"OnsRestMessageDo\\": [\\n {\\n \\"StoreSize\\": 406,\\n \\"ReconsumeTimes\\": 1,\\n \\"StoreTimestamp\\": 1570760999811,\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\",\\n \\"MsgId\\": \\"1E0578FE110F18B4AAC235C05F2*****\\",\\n \\"StoreHost\\": \\"11.193.***.***:10911\\",\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"PropertyList\\": {\\n \\"MessageProperty\\": [\\n {\\n \\"Value\\": \\"TagA\\",\\n \\"Name\\": \\"TAGS\\"\\n }\\n ]\\n },\\n \\"BornTimestamp\\": 1570760999721,\\n \\"BodyCRC\\": 914112295,\\n \\"BornHost\\": \\"42.120.***.***:59270\\"\\n }\\n ]\\n },\\n \\"MaxPageCount\\": 400,\\n \\"TaskId\\": \\"0BC1310300002A9F000021E4D7A48346\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsDLQMessagePageQueryByGroupIdResponse>\\n <MsgFoundDo>\\n <MaxPageCount>400</MaxPageCount>\\n <MsgFoundList>\\n <OnsRestMessageDo>\\n <MsgId>1E0578FE110F18B4AAC235C05F2*****</MsgId>\\n <InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>\\n <ReconsumeTimes>1</ReconsumeTimes>\\n <BornHost>42.120.***.***:59270</BornHost>\\n <StoreTimestamp>1570760999811</StoreTimestamp>\\n <StoreHost>11.193.***.***:10911</StoreHost>\\n <BodyCRC>914112295</BodyCRC>\\n <Topic>test-mq_topic</Topic>\\n <BornTimestamp>1570760999721</BornTimestamp>\\n <StoreSize>406</StoreSize>\\n <PropertyList>\\n <MessageProperty>\\n <Name>TAGS</Name>\\n <Value>TagA</Value>\\n </MessageProperty>\\n </PropertyList>\\n </OnsRestMessageDo>\\n </MsgFoundList>\\n <TaskId>0BC1310300002A9F000021E4D7A48346</TaskId>\\n <CurrentPage>1</CurrentPage>\\n </MsgFoundDo>\\n <RequestId>5DC2A47E-2B31-4722-96C8-FA59C9*****</RequestId>\\n</OnsDLQMessagePageQueryByGroupIdResponse>","errorExample":""}]',
- 'title' => '查询Group ID内所有死信消息',
- 'summary' => '通过传入Group ID和时间段,分页查询指定时间段内该Group ID内存在的所有死信消息。',
+ 'title' => '统计消息生产数据',
+ 'summary' => '查询一段时间内指定的Topic的消息写入报表数据。',
'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
+ .'您可以使用本接口获取在线上环境统计的Topic的消息数据信息,可以根据需要选择查询指定时间段内Topic的写入量或者TPS曲线数据。'."\n"
."\n"
- .'- 按Group ID查询死信消息的方式属于范围查询,查询结果会通过分页的方式展示给调用方,仅适用于没有任何搜索条件Message ID查询场景。'."\n"
- .'- 根据Group ID查询死信消息应尽可能缩短查询的时间区间,否则匹配的消息过多,不利于定位问题。调用流程如下:'."\n"
- .' 1. 传入Group ID、起止时间以及每页的消息数量,进行分页查询。如果有消息,默认返回第一页的消息、总页数和查询任务 ID。'."\n"
- .' 2. 根据返回的结果中的查询任务ID,进行后续取消息,取消息时传入查询任务ID以及当前页数。此时输入的起止时间和每页消息数量不生效,默认以第一次查询时输入的参数值为准。',
+ .'如果应用方消息量比较小,间隔不均匀,此时采用TPS查询可能会导致数据不明显,建议使用总量查询。',
+ 'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsDLQMessagePageQueryByGroupId**接口,您还可以通过云消息队列 RocketMQ 版控制台查看死信消息。具体操作,请参见[死信队列](~~87277~~)。',
- ],
- 'OnsDLQMessageGetById' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ .'除了调用**OnsTrendTopicInputTps**接口,您还可以通过云消息队列 RocketMQ 版控制台查看指定Topic中生产消息的统计数据。具体操作,请参见[仪表盘](~~288246~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '15', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsTrendTopicInputTps'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryTrendTopicInputTps',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'conditional'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"E213AD8A-0730-4B3D-A35A-340DA47D****\\",\\n \\"Data\\": {\\n \\"Records\\": {\\n \\"StatsDataDo\\": [\\n {\\n \\"Y\\": 0,\\n \\"X\\": 1570852800000\\n }\\n ]\\n },\\n \\"XUnit\\": \\"ms\\",\\n \\"YUnit\\": \\"msg\\",\\n \\"Title\\": \\"TopicXXX Send Trend Chart\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsTrendTopicInputTpsResponse>\\n<Data>\\n <Records>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570852800000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570853400000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570854000000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570854600000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570860600000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570861200000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570861800000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570862400000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570863000000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570863600000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570864200000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>1</Y>\\n <X>1570864800000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570865400000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570866000000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570866600000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570867200000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570867800000</X>\\n </StatsDataDo>\\n <StatsDataDo>\\n <Y>0</Y>\\n <X>1570868400000</X>\\n </StatsDataDo>\\n </Records>\\n <XUnit>time</XUnit>\\n <YUnit>msg</YUnit>\\n <Title>MQ_INST_111111111111_DOxxxxxx%test-mq_topic接收总量趋势图</Title>\\n</Data>\\n<RequestId>E213AD8A-0730-4B3D-A35A-340DA47D****</RequestId>\\n</OnsTrendTopicInputTpsResponse>","errorExample":""}]',
+ ],
+ 'OpenOnsService' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
- ],
- 'operationType' => 'read',
- 'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
- 'parameters' => [
[
- 'name' => 'MsgId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息的ID,即Message ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '0BC16699165C03B925DB8A404E2D****',
- ],
+ 'APP' => [],
],
[
- 'name' => 'GroupId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消费端Group ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'GID_test_group_id',
- ],
+ 'PrivateKey' => [],
],
[
- 'name' => 'InstanceId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '需查询消息所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
+ 'BearerToken' => [],
],
],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => [
+ 'operationType' => 'create',
+ 'riskType' => 'none',
+ 'chargeType' => 'free',
+ 'abilityTreeNodes' => ['FEATUREonsWNMPZ3'],
+ ],
+ 'parameters' => [],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '为公共参数,每个请求的ID都是唯一的。',
- 'type' => 'string',
- 'example' => 'A07E3902-B92E-44A6-B6C5-6AA111111****',
- ],
- 'Data' => [
- 'description' => '查询结果。',
- 'type' => 'object',
- 'properties' => [
- 'StoreSize' => [
- 'description' => '消息大小。单位:KB。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '407',
- ],
- 'ReconsumeTimes' => [
- 'description' => '消息重试消费的次数。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1',
- ],
- 'StoreTimestamp' => [
- 'description' => '消息被服务端存储的时间戳。单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570761026708',
- ],
- 'InstanceId' => [
- 'description' => '实例ID。',
- 'type' => 'string',
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
- ],
- 'MsgId' => [
- 'description' => '消息ID。',
- 'type' => 'string',
- 'example' => '0BC16699165C03B925DB8A404E2D****',
- ],
- 'StoreHost' => [
- 'description' => '存储该消息的服务器实例。',
- 'type' => 'string',
- 'example' => '11.220.***.***:10911',
- ],
- 'Topic' => [
- 'description' => '消息的Topic。',
- 'type' => 'string',
- 'example' => 'test-mq_topic',
- ],
- 'PropertyList' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'MessageProperty' => [
- 'description' => '消息属性列表。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Value' => [
- 'description' => '消息属性的取值。',
- 'type' => 'string',
- 'example' => 'TagA',
- ],
- 'Name' => [
- 'description' => '消息属性。取值说明如下:'."\n"
- .'- **TRACE_ON**:是否有消息轨迹'."\n"
- .'- **KEYS**:消息的Key属性'."\n"
- .'- **TAGS**:消息的Tag属性'."\n"
- .'- **INSTANCE_ID**:消息所在的实例的ID'."\n"
- ."\n"
- .'更多概念信息请参见[名词解释](~~29533~~)。',
- 'type' => 'string',
- 'example' => 'TAGS',
- ],
- ],
- ],
- ],
- ],
- ],
- 'BornTimestamp' => [
- 'description' => '消息生成的时间戳。单位:毫秒。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1570761026630',
- ],
- 'BodyCRC' => [
- 'description' => '消息体CRC校验值。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '914112295',
- ],
- 'BornHost' => [
- 'description' => '生成该消息的生产者实例。',
- 'type' => 'string',
- 'example' => '42.120.**.**:64646',
- ],
- ],
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '8C5B4603-8977-4513-AB60-9C3E2F88****'],
+ 'OrderId' => ['description' => '订单ID。', 'type' => 'string', 'example' => '2068689****0272'],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A07E3902-B92E-44A6-B6C5-6AA111111****\\",\\n \\"Data\\": {\\n \\"StoreSize\\": 407,\\n \\"ReconsumeTimes\\": 1,\\n \\"StoreTimestamp\\": 1570761026708,\\n \\"InstanceId\\": \\"MQ_INST_111111111111_DOxxxxxx\\",\\n \\"MsgId\\": \\"0BC16699165C03B925DB8A404E2D****\\",\\n \\"StoreHost\\": \\"11.220.***.***:10911\\",\\n \\"Topic\\": \\"test-mq_topic\\",\\n \\"PropertyList\\": {\\n \\"MessageProperty\\": [\\n {\\n \\"Value\\": \\"TagA\\",\\n \\"Name\\": \\"TAGS\\"\\n }\\n ]\\n },\\n \\"BornTimestamp\\": 1570761026630,\\n \\"BodyCRC\\": 914112295,\\n \\"BornHost\\": \\"42.120.**.**:64646\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsDLQMessageGetByIdResponse>\\n<Data>\\n <MsgId>1E0578FE110F18B4AAC235C0C8460BA2</MsgId>\\n <InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>\\n <ReconsumeTimes>1</ReconsumeTimes>\\n <BornHost>42.120.**.**:64646</BornHost>\\n <BodyCRC>914112295</BodyCRC>\\n <StoreHost>11.220.***.***:10911</StoreHost>\\n <StoreTimestamp>1570761026708</StoreTimestamp>\\n <BornTimestamp>1570761026630</BornTimestamp>\\n <Topic>test-mq_topic</Topic>\\n <StoreSize>407</StoreSize>\\n <PropertyList>\\n <MessageProperty>\\n <Name>TRACE_ON</Name>\\n <Value>true</Value>\\n </MessageProperty>\\n <MessageProperty>\\n <Name>RETRY_TOPIC</Name>\\n <Value>MQ_INST_111111111111_DOxxxxxx%test-mq_topic</Value>\\n </MessageProperty>\\n <MessageProperty>\\n <Name>KEYS</Name>\\n <Value>ORDERID_993</Value>\\n </MessageProperty>\\n <MessageProperty>\\n <Name>UNIQ_KEY</Name>\\n <Value>1E0578FE110F18B4AAC235C0C84*****</Value>\\n </MessageProperty>\\n <MessageProperty>\\n <Name>WAIT</Name>\\n <Value>false</Value>\\n </MessageProperty>\\n <MessageProperty>\\n <Name>TAGS</Name>\\n <Value>TagA</Value>\\n </MessageProperty>\\n <MessageProperty>\\n <Name>INSTANCE_ID</Name>\\n <Value>MQ_INST_111111111111_DOxxxxxx</Value>\\n </MessageProperty>\\n </PropertyList>\\n</Data>\\n<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>\\n</OnsDLQMessageGetByIdResponse>","errorExample":""}]',
- 'title' => '根据Message ID查询死信消息',
- 'summary' => '通过传入Message ID查询指定的死信消息。包括存储时间、消息体、Key和Tag。',
+ 'errorCodes' => [
+ 400 => [
+ ['errorCode' => 'OrderOpend', 'errorMessage' => '您已开通,请前往控制台使用。', 'description' => ''],
+ ['errorCode' => 'PermissionDenied', 'errorMessage' => '当前子账号无权限,请为子账号授权。', 'description' => ''],
+ ['errorCode' => 'PriceWanHuaTongSys', 'errorMessage' => '询价调用万花筒错误。', 'description' => ''],
+ ],
+ ],
+ 'title' => '开通服务',
+ 'summary' => '调用OpenOnsService开通云消息队列 RocketMQ 版服务。',
'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
- .'根据Message ID查询死信消息的方式属于精确查询。查询条件需要的Message ID从消息发送成功的SendResult中获取,或者从批量查询的接口中获取。查询到的信息包括死信消息的存储时间、消息体、Key和Tag等属性。',
+ ."\n"
+ .'本接口用于第一次使用云消息队列 RocketMQ 版的场景。开通服务后,您才能使用云消息队列 RocketMQ 版。'."\n"
+ ."\n"
+ .'目前,仅可通过华东1(杭州)地域开通云消息队列 RocketMQ 版服务。开通服务不被计费。',
+ 'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsDLQMessageGetById**接口,您还可以通过云消息队列 RocketMQ 版控制台查看死信消息。具体操作,请参见[死信队列](~~87277~~)。',
- ],
- 'OnsDLQMessageResendById' => [
- 'methods' => [
- 'post',
- 'get',
+ .'除了调用**OpenOnsService**接口,您还可以通过云消息队列 RocketMQ 版控制台开通服务,具体操作,请参见[开通消息队列服务](~~169006~~)。',
+ 'changeSet' => [
+ ['createdAt' => '2023-06-08T07:46:37.000Z', 'description' => '错误码发生变更'],
+ ['createdAt' => '2023-06-08T06:16:34.000Z', 'description' => '错误码发生变更'],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OpenOnsService'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
],
+ 'ramActions' => [],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"8C5B4603-8977-4513-AB60-9C3E2F88****\\",\\n \\"OrderId\\": \\"2068689****0272\\"\\n}","errorExample":""},{"type":"xml","example":"<OpenOnsServiceResponse>\\n<RequestId>8C5B4603-8977-4513-AB60-9C3E2F88****</RequestId>\\n<OrderId>2068689****0272</OrderId>\\n</OpenOnsServiceResponse>","errorExample":""}]',
+ ],
+ 'TagResources' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'write',
+ 'operationType' => 'readAndWrite',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'update'],
'parameters' => [
[
- 'name' => 'MsgId',
+ 'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需查询的消息的ID,即Message ID。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => '0BC16699343051CD9F1D798E7734****',
- ],
+ 'schema' => ['description' => '所需绑定标签的资源所在的实例的ID。'."\n"
+ .'> 如需为Topic或Group ID绑定标签,则必须填写该参数。', 'type' => 'string', 'required' => false, 'docRequired' => false, 'example' => 'MQ_INST_188077086902****_BXSuW61e'],
],
[
- 'name' => 'GroupId',
+ 'name' => 'ResourceType',
'in' => 'query',
+ 'schema' => ['description' => '资源类型。枚举类型。取值:'."\n"
+ ."\n"
+ .'- **INSTANCE**'."\n"
+ .'- **TOPIC**'."\n"
+ .'- **GROUP**', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'TOPIC'],
+ ],
+ [
+ 'name' => 'Tag',
+ 'in' => 'query',
+ 'style' => 'repeatList',
'schema' => [
- 'description' => '需查询的消费端Group ID。',
- 'type' => 'string',
+ 'description' => '标签列表。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Key' => ['description' => '资源的标签键。**Key**和**Value**值必须同时输入。'."\n"
+ ."\n"
+ .'- 该值不允许为空字符串。'."\n"
+ .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => true, 'example' => 'FinanceDept'],
+ 'Value' => ['description' => '资源的标签值。**Key**和**Value**值必须同时输入。'."\n"
+ ."\n"
+ .'- 该值可以为空字符串。'."\n"
+ .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => true, 'example' => 'FinanceJoshua'],
+ ],
+ 'required' => false,
+ 'description' => '',
+ ],
'required' => true,
- 'docRequired' => true,
- 'example' => 'GID_test_group_id',
+ 'maxItems' => 21,
],
],
[
- 'name' => 'InstanceId',
+ 'name' => 'ResourceId',
'in' => 'query',
+ 'style' => 'repeatList',
'schema' => [
- 'description' => '需查询消息所对应的实例ID。',
- 'type' => 'string',
- 'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_188077086902****_BXSuW61e',
+ 'description' => '资源ID列表',
+ 'type' => 'array',
+ 'items' => ['description' => '需要绑定标签的资源ID。'."\n"
+ .' '."\n"
+ .'- 当需要绑定标签的资源类型为实例时,该参数输入实例ID。'."\n"
+ .'- 当需要绑定标签的资源类型为Topic时,该参数输入Topic名称。'."\n"
+ .'- 当需要绑定标签的资源类型为Group时,该参数输入Group ID。', 'type' => 'string', 'required' => false, 'example' => 'TopicA'],
+ 'required' => true,
+ 'example' => 'TopicA',
+ 'maxItems' => 51,
],
],
],
@@ -5899,97 +4416,102 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => 'D94CC769-4DC3-4690-A868-9D0631B1****',
- ],
- 'Data' => [
- 'type' => 'object',
- 'itemNode' => true,
- 'properties' => [
- 'MsgId' => [
- 'description' => '返回的消息列表。',
- 'type' => 'array',
- 'items' => [
- 'description' => '消息ID,即Message ID。',
- 'type' => 'string',
- 'example' => '0BC16699343051CD9F1D798E7734****',
- ],
- ],
- ],
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '301D2CBE-66F8-403D-AEC0-82582478****'],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"D94CC769-4DC3-4690-A868-9D0631B1****\\",\\n \\"Data\\": {\\n \\"MsgId\\": [\\n \\"0BC16699343051CD9F1D798E7734****\\"\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<OnsDLQMessageResendByIdResponse>\\r\\n<RequestId>D94CC769-4DC3-4690-A868-9D0631B1****</RequestId>\\r\\n</OnsDLQMessageResendByIdResponse>","errorExample":""}]',
- 'title' => '重发指定的死信消息',
- 'summary' => '重发指定Message ID的死信消息,使该消息能够被Consumer再次消费。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>'."\n"
- ."\n"
- .'- 死信消息已达最大重试次数,若重发后再次消费失败,则死信队列中将增加一条Message ID相同的消息,可通过控制台死信队列的查询页面或者管控API查看该结果。您可通过同一Message ID的消息出现次数判断重发后依然消费失败的次数。'."\n"
- .'- 由于死信消息是经过重试逻辑依然消费失败的消息,通常意味着消费逻辑可能存在问题,故请先查明多次消费失败的原因,再调用本接口重新发送。'."\n"
- .'- 当前消息队列RocketMQ版不管理死信重发的状态,重发后消费成功的消息不会从死信队列中移除。需自行管理、判断消息是否需要重发。避免多次无意义地重发,从而造成重复消费。',
+ 'title' => '为资源绑定标签',
+ 'summary' => '调用TagResources为资源绑定标签。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>本接口一般在需要对云消息队列 RocketMQ 版的资源进行归类时使用,便于搜索和资源聚合。',
'requestParamsDescription' => ' ',
- 'responseParamsDescription' => '> 如果重新投递失败,会返回投递失败的Message ID。',
+ 'responseParamsDescription' => ' ',
'extraInfo' => '## 控制台操作'."\n"
- .'除了调用**OnsDLQMessageResendById**接口,您还可以通过云消息队列 RocketMQ 版控制台重新投递指定的死信消息。具体操作,请参见[死信队列](~~87277~~)。',
- ],
- 'OnsTopicUpdate' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ .'除了调用**TagResources**接口,您还可以通过云消息队列 RocketMQ 版控制台为相关资源绑定标签。具体操作,请参见[标签管理](~~172713~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '300', 'countWindow' => 60, 'regionId' => '*', 'api' => 'TagResources'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'update',
+ 'ramAction' => [
+ 'action' => 'mq:TagResources',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"301D2CBE-66F8-403D-AEC0-82582478****\\"\\n}","errorExample":""},{"type":"xml","example":"<TagResourcesResponse>\\r\\n<RequestId>301D2CBE-66F8-403D-AEC0-82582478****</RequestId>\\r\\n</TagResourcesResponse>","errorExample":""}]',
+ ],
+ 'UntagResources' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
- 'deprecated' => true,
- 'systemTags' => [],
+ 'deprecated' => false,
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
- 'name' => 'Topic',
+ 'name' => 'InstanceId',
'in' => 'query',
- 'schema' => [
- 'description' => '需配置的Topic名称。',
- 'type' => 'string',
- 'required' => true,
- 'docRequired' => true,
- 'example' => 'test',
- ],
+ 'schema' => ['description' => '如需解除Topic和Group ID与标签的绑定关系,该参数为必填。', 'type' => 'string', 'required' => false, 'docRequired' => false, 'example' => 'MQ_INST_188077086902****_BX4jvZZG'],
],
[
- 'name' => 'Perm',
+ 'name' => 'ResourceType',
'in' => 'query',
+ 'schema' => ['description' => '资源类型。枚举类型,目前支持的资源类型:'."\n"
+ ."\n"
+ .'- **INSTANCE**'."\n"
+ .'- **TOPIC**'."\n"
+ .'- **GROUP**', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'TOPIC'],
+ ],
+ [
+ 'name' => 'All',
+ 'in' => 'query',
+ 'schema' => ['description' => '是否删除资源绑定的全部标签。当请求中未设置**TagKey**时该参数有效。默认值**false**。', 'type' => 'boolean', 'required' => false, 'example' => 'false', 'default' => 'false'],
+ ],
+ [
+ 'name' => 'ResourceId',
+ 'in' => 'query',
+ 'style' => 'repeatList',
'schema' => [
- 'description' => '设置该Topic的读写模式。取值说明如下:'."\n"
- ."\n"
- .'- **6**:同时支持读写'."\n"
- .'- **4**:禁写'."\n"
- .'- **2**:禁读',
- 'type' => 'integer',
- 'format' => 'int32',
+ 'description' => '资源ID列表。',
+ 'type' => 'array',
+ 'items' => ['description' => '需要解绑标签的资源ID。', 'type' => 'string', 'required' => false, 'example' => 'TopicA'],
'required' => true,
- 'docRequired' => true,
- 'example' => '6',
+ 'example' => 'TopicA',
+ 'maxItems' => 51,
],
],
[
- 'name' => 'InstanceId',
+ 'name' => 'TagKey',
'in' => 'query',
+ 'style' => 'repeatList',
'schema' => [
- 'description' => '需配置的Topic所对应的实例ID。',
- 'type' => 'string',
+ 'description' => '资源的标签键列表。',
+ 'type' => 'array',
+ 'items' => ['description' => '资源的标签键。'."\n"
+ ."\n"
+ .'- 如果传入该值,则不允许为空字符串。'."\n"
+ .'- 最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => false, 'example' => 'CartService'],
'required' => false,
- 'docRequired' => true,
- 'example' => 'MQ_INST_111111111111_DOxxxxxx',
+ 'example' => 'CartService',
+ 'maxItems' => 21,
],
],
],
@@ -5998,135 +4520,1073 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。',
- 'type' => 'string',
- 'example' => '81979ADA-4A78-4F64-9DEC-5700446D****',
- ],
+ 'RequestId' => ['description' => '公共参数,每个请求的ID都是唯一的,可用于排查和定位问题。', 'type' => 'string', 'example' => '19780F2E-7841-4E0F-A5D9-C64A0530****'],
],
+ 'description' => '',
],
],
],
- 'staticInfo' => [
- 'noSubstitutionReason' => '无替代API,历史原因导致该API被标记为弃用。',
- ],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"81979ADA-4A78-4F64-9DEC-5700446D****\\"\\n}","errorExample":""},{"type":"xml","example":"<OnsTopicUpdateResponse>\\r\\n<RequestId>81979ADA-4A78-4F64-9DEC-5700446D****</RequestId>\\r\\n</OnsTopicUpdateResponse>","errorExample":""}]',
- 'title' => '配置Topic的读写模式',
- 'summary' => '调用OnsTopicUpdate配置Topic的读写模式。',
- 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>本接口一般用于禁读或禁写的场景。',
+ 'title' => '为资源解绑并删除标签',
+ 'summary' => '调用UntagResources为资源解绑并删除标签。',
+ 'description' => '><notice>阿里云提供的OpenAPI属于管控类API,用于管理和查询阿里云服务的相关资源。仅推荐在管控链路集成,消息收发的核心数据链路中严禁依赖OpenAPI实现,否则可能会导致链路产生风险。></notice>',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
- 'extraInfo' => ' ',
+ 'extraInfo' => '## 控制台操作'."\n"
+ .'除了调用**UntagResources**接口,您还可以通过云消息队列 RocketMQ 版控制台为资源解绑和删除标签。具体操作,请参见[标签管理](~~172713~~)。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'UntagResources'],
+ ],
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:UntagResources',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ ],
+ ],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"19780F2E-7841-4E0F-A5D9-C64A0530****\\"\\n}","errorExample":""},{"type":"xml","example":"<UntagResourcesResponse>\\r\\n<RequestId>19780F2E-7841-4E0F-A5D9-C64A0530****</RequestId>\\r\\n</UntagResourcesResponse>","errorExample":""}]',
],
],
'endpoints' => [
+ ['regionId' => 'ap-northeast-1', 'regionName' => '日本(东京)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.ap-northeast-1.aliyuncs.com', 'endpoint' => 'ons.ap-northeast-1.aliyuncs.com', 'vpc' => 'ons-vpc.ap-northeast-1.aliyuncs.com'],
+ ['regionId' => 'ap-southeast-1', 'regionName' => '新加坡', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.ap-southeast-1.aliyuncs.com', 'endpoint' => 'ons.ap-southeast-1.aliyuncs.com', 'vpc' => 'ons-vpc.ap-southeast-1.aliyuncs.com'],
+ ['regionId' => 'ap-southeast-2', 'regionName' => '澳大利亚(悉尼)已关停', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.ap-southeast-2.aliyuncs.com', 'endpoint' => 'ons.ap-southeast-2.aliyuncs.com', 'vpc' => 'ons-vpc.ap-southeast-2.aliyuncs.com'],
+ ['regionId' => 'ap-southeast-3', 'regionName' => '马来西亚(吉隆坡)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.ap-southeast-3.aliyuncs.com', 'endpoint' => 'ons.ap-southeast-3.aliyuncs.com', 'vpc' => 'ons-vpc.ap-southeast-3.aliyuncs.com'],
+ ['regionId' => 'ap-southeast-5', 'regionName' => '印度尼西亚(雅加达)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.ap-southeast-5.aliyuncs.com', 'endpoint' => 'ons.ap-southeast-5.aliyuncs.com', 'vpc' => 'ons-vpc.ap-southeast-5.aliyuncs.com'],
+ ['regionId' => 'ap-southeast-6', 'regionName' => '菲律宾(马尼拉)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.ap-southeast-6.aliyuncs.com', 'endpoint' => 'ons.ap-southeast-6.aliyuncs.com', 'vpc' => 'ons-vpc.ap-southeast-6.aliyuncs.com'],
+ ['regionId' => 'cn-beijing', 'regionName' => '华北2(北京)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.cn-beijing.aliyuncs.com', 'endpoint' => 'ons.cn-beijing.aliyuncs.com', 'vpc' => 'ons-vpc.cn-beijing.aliyuncs.com'],
+ ['regionId' => 'cn-chengdu', 'regionName' => '西南1(成都)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.cn-chengdu.aliyuncs.com', 'endpoint' => 'ons.cn-chengdu.aliyuncs.com', 'vpc' => 'ons-vpc.cn-chengdu.aliyuncs.com'],
+ ['regionId' => 'cn-hangzhou', 'regionName' => '华东1(杭州)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.cn-hangzhou.aliyuncs.com', 'endpoint' => 'ons.cn-hangzhou.aliyuncs.com', 'vpc' => 'ons-vpc.cn-hangzhou.aliyuncs.com'],
+ ['regionId' => 'cn-hongkong', 'regionName' => '中国香港', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.cn-hongkong.aliyuncs.com', 'endpoint' => 'ons.cn-hongkong.aliyuncs.com', 'vpc' => 'ons-vpc.cn-hongkong.aliyuncs.com'],
+ ['regionId' => 'cn-huhehaote', 'regionName' => '华北5(呼和浩特)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.cn-huhehaote.aliyuncs.com', 'endpoint' => 'ons.cn-huhehaote.aliyuncs.com', 'vpc' => 'ons-vpc.cn-huhehaote.aliyuncs.com'],
+ ['regionId' => 'cn-qingdao', 'regionName' => '华北1(青岛)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.cn-qingdao.aliyuncs.com', 'endpoint' => 'ons.cn-qingdao.aliyuncs.com', 'vpc' => 'ons-vpc.cn-qingdao.aliyuncs.com'],
+ ['regionId' => 'cn-shanghai', 'regionName' => '华东2(上海)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.cn-shanghai.aliyuncs.com', 'endpoint' => 'ons.cn-shanghai.aliyuncs.com', 'vpc' => 'ons-vpc.cn-shanghai.aliyuncs.com'],
+ ['regionId' => 'cn-shenzhen', 'regionName' => '华南1(深圳)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.cn-shenzhen.aliyuncs.com', 'endpoint' => 'ons.cn-shenzhen.aliyuncs.com', 'vpc' => 'ons-vpc.cn-shenzhen.aliyuncs.com'],
+ ['regionId' => 'cn-wulanchabu', 'regionName' => '华北6(乌兰察布)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.cn-wulanchabu.aliyuncs.com', 'endpoint' => 'ons.cn-wulanchabu.aliyuncs.com', 'vpc' => ''],
+ ['regionId' => 'cn-zhangjiakou', 'regionName' => '华北3(张家口)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.cn-zhangjiakou.aliyuncs.com', 'endpoint' => 'ons.cn-zhangjiakou.aliyuncs.com', 'vpc' => 'ons-vpc.cn-zhangjiakou.aliyuncs.com'],
+ ['regionId' => 'mq-internet-access', 'regionName' => '公网', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'ons.mq-internet-access.aliyuncs.com', 'endpoint' => 'ons.mq-internet-access.aliyuncs.com', 'vpc' => ''],
+ ['regionId' => 'us-west-1', 'regionName' => '美国(硅谷)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'ons.us-west-1.aliyuncs.com', 'endpoint' => 'ons.us-west-1.aliyuncs.com', 'vpc' => 'ons-vpc.us-west-1.aliyuncs.com'],
+ ['regionId' => 'us-east-1', 'regionName' => '美国(弗吉尼亚)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'ons.us-east-1.aliyuncs.com', 'endpoint' => 'ons.us-east-1.aliyuncs.com', 'vpc' => 'ons-vpc.us-east-1.aliyuncs.com'],
+ ['regionId' => 'eu-west-1', 'regionName' => '英国(伦敦)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'ons.eu-west-1.aliyuncs.com', 'endpoint' => 'ons.eu-west-1.aliyuncs.com', 'vpc' => 'ons-vpc.eu-west-1.aliyuncs.com'],
+ ['regionId' => 'eu-central-1', 'regionName' => '德国(法兰克福)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'ons.eu-central-1.aliyuncs.com', 'endpoint' => 'ons.eu-central-1.aliyuncs.com', 'vpc' => 'ons-vpc.eu-central-1.aliyuncs.com'],
+ ['regionId' => 'me-east-1', 'regionName' => '阿联酋(迪拜)', 'areaId' => 'middleEast', 'areaName' => '中东', 'public' => 'ons.me-east-1.aliyuncs.com', 'endpoint' => 'ons.me-east-1.aliyuncs.com', 'vpc' => 'ons-vpc.me-east-1.aliyuncs.com'],
+ ['regionId' => 'me-central-1', 'regionName' => '沙特(利雅得)', 'areaId' => 'middleEast', 'areaName' => '中东', 'public' => 'ons.me-central-1.aliyuncs.com', 'endpoint' => 'ons.me-central-1.aliyuncs.com', 'vpc' => 'ons-vpc.me-central-1.aliyuncs.com'],
+ ['regionId' => 'cn-shenzhen-finance-1', 'regionName' => '华南1 金融云', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'ons.cn-shenzhen-finance-1.aliyuncs.com', 'endpoint' => 'ons.cn-shenzhen-finance-1.aliyuncs.com', 'vpc' => 'ons-vpc.cn-shenzhen-finance-1.aliyuncs.com'],
+ ['regionId' => 'cn-shanghai-finance-1', 'regionName' => '华东2 金融云', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'ons.cn-shanghai-finance-1.aliyuncs.com', 'endpoint' => 'ons.cn-shanghai-finance-1.aliyuncs.com', 'vpc' => 'ons-vpc.cn-shanghai-finance-1.aliyuncs.com'],
+ ['regionId' => 'cn-hangzhou-finance', 'regionName' => '华东1 金融云', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'ons.cn-hangzhou-finance.aliyuncs.com', 'endpoint' => 'ons.cn-hangzhou-finance.aliyuncs.com', 'vpc' => 'ons-vpc.cn-hangzhou-finance.aliyuncs.com'],
+ ['regionId' => 'cn-beijing-finance-1', 'regionName' => '华北2 金融云(邀测)', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'ons.cn-beijing-finance-1.aliyuncs.com', 'endpoint' => 'ons.cn-beijing-finance-1.aliyuncs.com', 'vpc' => 'ons-vpc.cn-beijing-finance-1.aliyuncs.com'],
+ ],
+ 'errorCodes' => [
+ ['code' => 'AccessDenied', 'message' => 'Access is denied for the current request. Please do not try again.', 'http_code' => 400, 'description' => '当前请求不允许访问,请勿再试。'],
+ ['code' => 'Accumulation.QueryError', 'message' => 'Failed to query message accumulation. Please try again later.', 'http_code' => 400, 'description' => '查询消息堆积失败。请稍后再试。'],
+ ['code' => 'Alarm.CreateError', 'message' => 'Failed to create the alarm. Please try again later.', 'http_code' => 400, 'description' => '创建告警信息失败。请稍后再试。'],
+ ['code' => 'Alarm.DeleteError', 'message' => 'Failed to delete the alarm. Please try again later.', 'http_code' => 400, 'description' => '删除告警信息失败。请稍后再试。'],
+ ['code' => 'Alarm.DisableError', 'message' => 'Failed to prohibit the alarm. Please try again later.', 'http_code' => 400, 'description' => '禁止告警设置失败。请稍后再试。'],
+ ['code' => 'Alarm.EditeError', 'message' => 'Failed to edit the alarm information. Please try again later.', 'http_code' => 400, 'description' => '编辑告警信息失败。请稍后再试。'],
+ ['code' => 'Alarm.Exsited', 'message' => 'Alarms already created for the specified Group ID. Please search for it first and edit it.', 'http_code' => 400, 'description' => '指定的 Group ID 已创建监控告警项,您搜索后进行编辑。'],
+ ['code' => 'Alarm.StartError', 'message' => 'Failed to set the start alarm. Please try again later.', 'http_code' => 400, 'description' => '启动告警设置失败。请稍后再试。'],
+ ['code' => 'ApiCallFailed', 'message' => 'API call failed. Please contact the system administrator.', 'http_code' => 400, 'description' => 'API调用失败。请联系系统管理员。'],
+ ['code' => 'ArmsDashboard.FailedToCheckServiceStatus', 'message' => 'Failed to check ARMS Prometheus service status.', 'http_code' => 400, 'description' => '检查 ARMS Prometheus 开通状态失败。'],
+ ['code' => 'ArmsDashboard.FailedToFound', 'message' => 'Failed to find the ARMS Grafana dashboard.', 'http_code' => 400, 'description' => '寻找 ARMS Grafana dashboard 失败'],
+ ['code' => 'ArmsDashboard.NotFound', 'message' => 'The specified ARMS Grafana dashboard is not found.', 'http_code' => 404, 'description' => '指定的 ARMS Grafana dashboard 找不到'],
+ ['code' => 'Auth.AssumeRoleError', 'message' => 'Failed to fetch sts token, maybe slr does not exist.', 'http_code' => 400, 'description' => '获取角色失败'],
+ ['code' => 'Auth.CheckError', 'message' => 'Failed to validate the resource permission. Please veify the resource permission informaiton and try again.', 'http_code' => 400, 'description' => '资源权限验证失败。请确认资源权限信息后再试。'],
+ ['code' => 'Auth.CreateError', 'message' => 'Failed to create the resource ownership information. Please try again later.', 'http_code' => 400, 'description' => '创建资源所属信息失败。请稍后再试。'],
+ ['code' => 'Auth.DeleteError', 'message' => 'Failed to delete the resource ownership information. Please try again later.', 'http_code' => 400, 'description' => '删除资源所属信息失败。请稍后再试。'],
+ ['code' => 'Auth.GrantCheckError', 'message' => 'Verification of the authorized resource failed. Please confirm the resource ownership and retry.', 'http_code' => 400, 'description' => '授权资源检验失败。请确认资源所属信息后再试。'],
+ ['code' => 'Auth.GrantCreateError', 'message' => 'Failed to create the resource permission information. Please try again later.', 'http_code' => 400, 'description' => '创建资源权限信息失败。请稍后再试。'],
+ ['code' => 'Auth.GrantDeleteError', 'message' => 'Failed to delete the resource permission information. Please try again later.', 'http_code' => 400, 'description' => '删除资源权限信息失败。请稍后再试。'],
+ ['code' => 'Auth.GrantError', 'message' => 'Failed to process your authorization request. Please try again later.', 'http_code' => 400, 'description' => '您的授权请求处理失败。请稍后再试。'],
+ ['code' => 'Auth.InRiskControl', 'message' => 'The current account is blocked by the risk control system. Submit a ticket to the risk control system.', 'http_code' => 400, 'description' => '当前账号被风控禁止。请提工单到风控系统处理。'],
+ ['code' => 'Auth.NeedLogin', 'message' => 'Failed to verify the user or application information.', 'http_code' => 400, 'description' => '用户或者应用信息认证失败。'],
+ ['code' => 'Auth.NoSLRPermission', 'message' => 'You are not authorized to create an SLR.', 'http_code' => 400, 'description' => '您没有创建 SLR 的权限。'],
+ ['code' => 'Auth.NotCustomer', 'message' => 'Another user is specified and you are not authorized to perform the operation.', 'http_code' => 400, 'description' => '当前设置为其他目标用户,无法操作。'],
+ ['code' => 'Auth.OwnerCheckError', 'message' => 'You are not resource owner, please check the resource ownership information and try again.', 'http_code' => 400, 'description' => '您不是资源的所有者,请确认资源所属信息后再试。'],
+ ['code' => 'Auth.OwnerCheckError', 'message' => 'valid resource auth failed.', 'http_code' => 403, 'description' => '资源权限检查失败'],
+ ['code' => 'Auth.RAMGrantError', 'message' => 'valid resource auth failed.', 'http_code' => 403, 'description' => '检查资源权限失败'],
+ ['code' => 'Broker.NotFound', 'message' => 'The server node information does not exist.', 'http_code' => 404, 'description' => '服务器节点信息不存在。'],
+ ['code' => 'Channel.Invalid', 'message' => 'The ONS channel is invalid. Please check and try again.', 'http_code' => 400, 'description' => 'ONS Channel非法。请确认后再试。'],
+ ['code' => 'ClientExisted', 'message' => 'The client statistics already exists.', 'http_code' => 400, 'description' => '该客户端统计数据已存在。'],
+ ['code' => 'Cluster.NotFound', 'message' => 'The specified cluster information does not exist. Please check or contact the administrator.', 'http_code' => 404, 'description' => '集群信息不存在。请稍后重试或联系管理员。'],
+ ['code' => 'Cluster.QueryError', 'message' => 'Failed to query the cluster information. Please try again later.', 'http_code' => 400, 'description' => '查询集群信息失败。请稍后再试。'],
+ ['code' => 'Connection.QueryErro', 'message' => 'Failed to query the consumer connection. Please try again later.', 'http_code' => 400, 'description' => '查询消费者连接失败。请稍后再试。'],
+ ['code' => 'Consumer.Existed', 'message' => 'The consumer information you are going to create already exists. Please verify.', 'http_code' => 400, 'description' => '您请求创建的消费者信息已存在,请确认。'],
+ ['code' => 'ConsumerNeverOnline', 'message' => 'Failed to check the status of the specified subscription group as it does not exist or has never subscribed any message.', 'http_code' => 400, 'description' => '您指定的消费者 ID 不存在或从未订阅过消息,无法查看消费者的状态。'],
+ ['code' => 'ConsumerProgress.NotSupport', 'message' => 'PullConsumer or broadcast message subscription does not support the query of consumer progress.', 'http_code' => 400, 'description' => 'PullConsumer或者广播消息订阅不支持消费进度查询。'],
+ ['code' => 'ConsumerStatus.QueryError', 'message' => 'Failed to query the consumer status. Please try again later.', 'http_code' => 400, 'description' => '查询消费者状态失败。请稍后再试。'],
+ ['code' => 'ConsumerTimeRang.QueryError', 'message' => 'Failed to query the consumer\'s time range. Please try again later.', 'http_code' => 400, 'description' => '查询消费者时间范围失败。请稍后再试。'],
+ ['code' => 'Data.NotExisted', 'message' => 'The data you are looking for does not exist.', 'http_code' => 400, 'description' => '您所查找的数据不存在。'],
+ ['code' => 'DeadLetterQueue.NotFound', 'message' => 'Dead-letter queue not found', 'http_code' => 400, 'description' => '死信队列不存在'],
+ ['code' => 'Empower.DeleteFailed', 'message' => 'Permission deletion failed.', 'http_code' => 400, 'description' => '删除授权失败'],
+ ['code' => 'Empower.Existed', 'message' => 'The permission to the specified Topic is already granted the user.', 'http_code' => 400, 'description' => '您指定的Topic已授权给该用户,请勿重复授权。'],
+ ['code' => 'Empower.ForOwnerFailed', 'message' => 'You are the owner of the resource, and do need to be granted the permission.', 'http_code' => 400, 'description' => '您已经是该资源的所有者,不需要给所有者授权。'],
+ ['code' => 'Empower.NotExisted', 'message' => 'Permission is already deleted; Or the permission is granted from RAM, go to the RAM console to delete it.', 'http_code' => 400, 'description' => '授权已被删除,无需重复操作;或该授权来自RAM,请去RAM控制台删除授权。'],
+ ['code' => 'Empower.OwnerCheckError', 'message' => 'The resource of which you are going to grant permission is not owned by you. Please verify.', 'http_code' => 400, 'description' => '您的授权资源非您所有,请确认。'],
+ ['code' => 'Empower.PrimaryUserCheckError', 'message' => 'The account you want to grant the permission to is not a primary account. Please verify and try again.', 'http_code' => 400, 'description' => '您要授权的账号不是主账号。请确认后重试。'],
+ ['code' => 'Empower.UserCheckError', 'message' => 'The user you want to grant the permission to does not exist. Please verify and try again.', 'http_code' => 400, 'description' => '您所指定授权的用户不存在。请确认后重试。'],
+ ['code' => 'EnvironmentError', 'message' => 'Failed to initialize the environment information. Please contact the system administrator.', 'http_code' => 400, 'description' => '环境信息初始化错误。请联系系统管理员。'],
+ ['code' => 'Group.BelongsToOtherInstance', 'message' => 'The specified Group ID belongs to another instance.', 'http_code' => 400, 'description' => '您指定的 Group ID 属于其他实例。'],
+ ['code' => 'Group.BelongsToOtherRegion', 'message' => 'The specified Group ID belongs to another region.', 'http_code' => 400, 'description' => '您指定的 Group ID 属于其他区域。'],
+ ['code' => 'Group.BelongsToOthers', 'message' => 'Current GroupId have been other users or other region occupied', 'http_code' => 400, 'description' => '当前 GroupId 已经被其他用户或者其他 region 占用'],
+ ['code' => 'Group.BelongsToOthers', 'message' => 'The specified Group ID belongs to another user.', 'http_code' => 400, 'description' => '您指定的 Group ID 属于其他用户。'],
+ ['code' => 'Group.CreateError', 'message' => 'Create a GroupId failure', 'http_code' => 400, 'description' => '创建 GroupId 失败'],
+ ['code' => 'Group.CreateError', 'message' => 'Failed to create the Group ID. Please try again later.', 'http_code' => 400, 'description' => '创建 Group ID 失败。请稍后再试。'],
+ ['code' => 'Group.DeleteError', 'message' => 'Failed to delete the Group ID. Please try again later.', 'http_code' => 400, 'description' => '删除 Group ID 失败。请稍后再试。'],
+ ['code' => 'Group.Existed', 'message' => 'Current GroupId already exists', 'http_code' => 400, 'description' => '当前 GroupId 已经存在'],
+ ['code' => 'Group.Existed', 'message' => 'The specified Group ID is already in use. Please change to another one.', 'http_code' => 400, 'description' => '您指定的 Group ID 已存在。'],
+ ['code' => 'Group.NeverOnline', 'message' => 'The Group ID has never been online.', 'http_code' => 400, 'description' => 'Group ID 从未上线'],
+ ['code' => 'Group.NotExisted', 'message' => 'The specified subscription group does not exist.', 'http_code' => 400, 'description' => '您指定的消费者 ID 不存在。'],
+ ['code' => 'Group.NotOnline', 'message' => 'The current Group ID is disconnected.', 'http_code' => 400, 'description' => '当前 Group ID 未在线。'],
+ ['code' => 'Group.NumLimited', 'message' => 'group count exceed limit.', 'http_code' => 400, 'description' => 'Gid数量超出限制'],
+ ['code' => 'Group.UpdateError', 'message' => 'Failed to update the Group ID. Please try again later.', 'http_code' => 400, 'description' => '更新 GroupID 失败。请稍后再试。'],
+ ['code' => 'GroupName.SameToTopic', 'message' => 'The topic name cannot be the same as a group name.', 'http_code' => 400, 'description' => 'TOPIC不能和GROUP重名'],
+ ['code' => 'Instance.CreateError', 'message' => 'Create instance error.', 'http_code' => 400, 'description' => '创建实例异常。'],
+ ['code' => 'Instance.CreateNotAllowed', 'message' => 'Failed to create a standard instance because the standard edition is not supported in the international site.', 'http_code' => 400, 'description' => '创建标准版实例失败,因国际站不支持该版本。'],
+ ['code' => 'Instance.DeleteError', 'message' => 'There is data in the instance. Delete all the Topics and Group ID in the instance first.', 'http_code' => 400, 'description' => '删除实例失败。该实例未清空资源,请先删除该实例所有的 Topic 和 Group,删除后数据不可恢复。'],
+ ['code' => 'Instance.Empty', 'message' => 'You don\'t have an instance, please create one first.', 'http_code' => 400, 'description' => '您当前没有任何实例,请先创建实例。'],
+ ['code' => 'Instance.HasReleased', 'message' => 'The instance has been released', 'http_code' => 400, 'description' => '该实例已释放'],
+ ['code' => 'Instance.NameExisted', 'message' => 'The specified instance name already exists.', 'http_code' => 400, 'description' => '实例名已存在。'],
+ ['code' => 'Instance.NoPermission', 'message' => 'The instance does not have required permissions.', 'http_code' => 400, 'description' => '实例没有相关权限'],
+ ['code' => 'Instance.NoPermissionToCreate', 'message' => 'Current Account No permissions to create an instance', 'http_code' => 400, 'description' => '当前账号无权限创建实例'],
+ ['code' => 'Instance.NormalNumberLimit', 'message' => 'Cannot create the instance. The number of default instances has reached the upper limit.', 'http_code' => 400, 'description' => '创建失败,每个region只能有一个无命名空间的实例。'],
+ ['code' => 'Instance.NotFound', 'message' => 'Specified instance not found', 'http_code' => 400, 'description' => '指定的实例不存在'],
+ ['code' => 'Instance.NotInService', 'message' => 'Specified instance is not in service.', 'http_code' => 400, 'description' => '指定的实例不在服务中'],
+ ['code' => 'Instance.NumberLimit', 'message' => 'Cannot create the instance. The number of instances has reached the upper limit.', 'http_code' => 400, 'description' => '创建失败,实例数量已达到上限,请前往工单系统咨询。'],
+ ['code' => 'Instance.PemissionError', 'message' => 'Failed to validate the instance permission.', 'http_code' => 400, 'description' => '实例权限验证失败。请确认实例权限信息后再试。'],
+ ['code' => 'Instance.UnsupportInternetEndpoint', 'message' => 'The current instance does not support public endpoint.', 'http_code' => 400, 'description' => '当前实例不支持公网接入点'],
+ ['code' => 'InstancePermission.CheckError', 'message' => 'Failed to validate the instance permission.', 'http_code' => 403, 'description' => '实例权限校验失败'],
+ ['code' => 'InstancePreType.DeleteError', 'message' => 'The Enterprise Platinum Edition instance has not expired and cannot be deleted.', 'http_code' => 400, 'description' => '铂金版实未到期,不能删除。'],
+ ['code' => 'InstanceRefuseType.NotSupport', 'message' => 'This instance is not support the refuse type.', 'http_code' => 400, 'description' => '该实例不支持当前退款方式'],
+ ['code' => 'InstanceReleaseType.Invalid', 'message' => 'The release type of instance is invalid.', 'http_code' => 400, 'description' => '订单中实例释放类型错误'],
+ ['code' => 'InstanceTag.NumLimited', 'message' => 'The tag is only supported for instance that have namespace.', 'http_code' => 400, 'description' => '有命名空间的实例才支持标签'],
+ ['code' => 'InstanceUpgradeOnsPre.NotSupportClassic', 'message' => 'Instances with classic network access do not support upgrading to Platinum Edition.', 'http_code' => 400, 'description' => '有经典网络访问的实例不支持升级到铂金版'],
+ ['code' => 'LogonExpired', 'message' => 'Your logon has expired. Please log on again.', 'http_code' => 400, 'description' => '您的登录已过期。请重新登录。'],
+ ['code' => 'Message.DownloadError', 'message' => 'Failed to download the message. Please try again later.', 'http_code' => 400, 'description' => '下载消息失败。请稍后再试。'],
+ ['code' => 'Message.NotExisted', 'message' => 'The message does not exist.', 'http_code' => 400, 'description' => '消息不存在'],
+ ['code' => 'Message.QueryError', 'message' => 'Message query failed. Please try again later.', 'http_code' => 400, 'description' => '消息查询失败。请稍后再试。'],
+ ['code' => 'Message.SendError', 'message' => 'Failed to send the message. Please try again later.', 'http_code' => 400, 'description' => '发送消息失败。请稍后再试。'],
+ ['code' => 'MessageTraceError', 'message' => 'Failed to query the message trace. Please try again later.', 'http_code' => 400, 'description' => '查询消息轨迹失败。请稍后再试。'],
+ ['code' => 'NetworkError', 'message' => 'Network connection failed. Please contact the system administrator.', 'http_code' => 400, 'description' => '网络连接失败。请联系系统管理员。'],
+ ['code' => 'NonDesignatedAccount', 'message' => 'This account has no permission', 'http_code' => 400, 'description' => '非指定账号,不能调用'],
+ ['code' => 'NotResourceOwner', 'message' => 'No permission on the resource. Check whether the resource exists and the resource name is correct.', 'http_code' => 400, 'description' => '授权方没有该资源的权限,请确认资源是否存在或资源名称是否输入正确。'],
+ ['code' => 'NotSupport', 'message' => 'The request is not supported. Please contact the system administrator.', 'http_code' => 400, 'description' => '该请求暂不支持。请联系系统管理员。'],
+ ['code' => 'Offset.ResetError', 'message' => 'Failed to reset the consumer offset. Please make sure the Group is online or has been online.', 'http_code' => 400, 'description' => '消费进度重置失败。请确保Group在线或曾经在线。'],
+ ['code' => 'Order.NotFound', 'message' => 'The order is not found.', 'http_code' => 400, 'description' => '订单未找到'],
+ ['code' => 'OrderMessage.CreateError', 'message' => 'Failed to create configuration for ordered message. Please try again later.', 'http_code' => 400, 'description' => '创建顺序消息配置失败。请稍后再试。'],
+ ['code' => 'OrderMessage.DeleteError', 'message' => 'Failed to create configuration for ordered message. Please try again later.', 'http_code' => 400, 'description' => '删除顺序消息配置失败。请稍后再试。'],
+ ['code' => 'OverdueAccount', 'message' => 'The current account has overdue payments. Go to Billing Management and recharge.', 'http_code' => 400, 'description' => '当前账号已欠费。请到费用中心进行充值。'],
+ ['code' => 'PageExpired', 'message' => 'The page has expired. Please refresh the page.', 'http_code' => 400, 'description' => '该页面已过期。请刷新页面。'],
+ ['code' => 'Parameter.Invalid', 'message' => 'Parameter validation failed.', 'http_code' => 400, 'description' => '参数验证失败'],
+ ['code' => 'ParameterError', 'message' => 'Task parameter error', 'http_code' => 400, 'description' => '任务参数出错'],
+ ['code' => 'Pricing.NotSupport', 'message' => 'The pricing is not support for this commodity.', 'http_code' => 400, 'description' => '当前商品不支持询价'],
+ ['code' => 'PricingConfig.NotFound', 'message' => 'The pricing config is not found for this commodity.', 'http_code' => 400, 'description' => '当前商品询价配置找不到'],
+ ['code' => 'PricingConfig.ParseError', 'message' => 'The pricing config is invalid for this commodity.', 'http_code' => 400, 'description' => '当前商品询价配置错误'],
+ ['code' => 'Producer.CreateError', 'message' => 'Failed to create the producer. Please try again later.', 'http_code' => 400, 'description' => '创建生产者失败。请稍后再试。'],
+ ['code' => 'Producer.NotExisted', 'message' => 'The producer information does not exist. Please verify and try again.', 'http_code' => 400, 'description' => '生产者信息不存在。请确认后再重试。'],
+ ['code' => 'Publisher.Existed', 'message' => 'The Topic you are going to create is aleady published by someone else. Please verify.', 'http_code' => 400, 'description' => '您请求创建的Topic已有生产者,请确认。'],
+ ['code' => 'QPS.Limit', 'message' => 'Maximum number of concurrent requests beyond', 'http_code' => 400, 'description' => '并发请求数超出上限'],
+ ['code' => 'RAMGrantError', 'message' => 'No permission. Contact the resource owner to check in the RAM system whether you have the “{data}” permission on the resource.', 'http_code' => 400, 'description' => '没有权限,请找授权方在RAM系统上确认你是否有该资源的“{data}”操作权限。'],
+ ['code' => 'Region.InputError', 'message' => 'The region where the specified Topic is located is inconsistent with the region you are currently logged on to.', 'http_code' => 400, 'description' => '输入的Topic所在的地域和当前系统登录的地域不一致。'],
+ ['code' => 'RegionInfoError', 'message' => 'Region information does not exist.', 'http_code' => 400, 'description' => 'Region信息不存在'],
+ ['code' => 'RequestRejected', 'message' => 'Your request has been rejected. Please do not try again.', 'http_code' => 400, 'description' => '您的请求已被拒绝,请勿再试。'],
+ ['code' => 'ResetOffset.NoNeed', 'message' => 'Reset is not needed as there are not any topics written into the topic subscribed by the current Group ID.', 'http_code' => 400, 'description' => '该 Group ID 订阅的 Topic 未有消息写入,无需重置。'],
+ ['code' => 'ResetOffsetRrror', 'message' => 'Failed to reset consumer progress. Please try again later.', 'http_code' => 400, 'description' => '消费进度重置失败。请稍后再试。'],
+ ['code' => 'Resource.isSystem', 'message' => 'The topic name or group ID that you want to create is the same as an existing system resource name. Use another topic name or group ID.', 'http_code' => 400, 'description' => '创建的Topic或Group ID与系统资源名重合,请重新命名。'],
+ ['code' => 'Resource.NotFound', 'message' => 'The resource is not exist.', 'http_code' => 404, 'description' => '资源不存在,请确认后再操作。'],
+ ['code' => 'Risk.DoubleCheck', 'message' => 'Double verification of the risk control information is required.', 'http_code' => 400, 'description' => '风控信息需要双重验证。'],
+ ['code' => 'Risk.DoubleCheck.Error', 'message' => 'Failed to detect CAPTCHA', 'http_code' => 400, 'description' => '验证码检测失败。'],
+ ['code' => 'Risk.SendVerificationCode', 'message' => 'Failed to send the verification code', 'http_code' => 400, 'description' => '发送验证码失败'],
+ ['code' => 'Router.AddTopicError', 'message' => 'Failed to add topic routing. Please make sure that the topic has been applied for on the console and approved.', 'http_code' => 400, 'description' => 'Topic路由添加失败。请确认Topic是否在控制台上申请并审批通过。'],
+ ['code' => 'Router.BackTaskDeleted', 'message' => 'The task is deleted.', 'http_code' => 400, 'description' => '任务已被删除'],
+ ['code' => 'Router.BackTaskNotExisted', 'message' => 'Task not found', 'http_code' => 400, 'description' => '任务不存在'],
+ ['code' => 'Router.BatchStartError', 'message' => 'Failed to batch start the global message router.', 'http_code' => 400, 'description' => '全球消息路由任务批量执行失败'],
+ ['code' => 'Router.BatchStopError', 'message' => 'Failed to batch stop the global message router.', 'http_code' => 400, 'description' => '全球消息路由任务批量停止失败'],
+ ['code' => 'Router.CloneOrderConfigError', 'message' => 'Routing instance configuration does not exist. Please contact the administrator.', 'http_code' => 400, 'description' => '路由实例配置不存在。请联系管理员。'],
+ ['code' => 'Router.ConfigIsEmpty', 'message' => 'Failed to publish the configuration information of the routing instance. Please verify whether the configuration information is incorrect.', 'http_code' => 400, 'description' => '发布路由实例的配置信息失败。请确认配置信息是否有误。'],
+ ['code' => 'Router.ConsumerInvalid', 'message' => 'The Group ID is empty, or the specified Topic is not subscribed by the Group ID.', 'http_code' => 400, 'description' => 'Group ID 为空,或指定的源 Topic 没有被该 Group ID 订阅。'],
+ ['code' => 'Router.CreateInstanceError', 'message' => 'Failed to create the routing instance. Please contact your administrator.', 'http_code' => 400, 'description' => '创建路由实例失败。请联系管理员。'],
+ ['code' => 'Router.DeleteTopicError', 'message' => 'Failed to delete the Topic routing. Please verify whether the Topic exists.', 'http_code' => 400, 'description' => '删除Topic路由失败。请确认Topic是否存在。'],
+ ['code' => 'Router.DesTopicNotExisted', 'message' => 'Target Topic not found', 'http_code' => 400, 'description' => '目标Topic不存在'],
+ ['code' => 'Router.InvalidAuth', 'message' => 'You do not have the permission to the Topic.', 'http_code' => 400, 'description' => '您没有相应Topic的权限'],
+ ['code' => 'Router.InvokeError', 'message' => 'Service call exception', 'http_code' => 400, 'description' => '服务调用异常'],
+ ['code' => 'Router.NoPublicTestRegion', 'message' => 'The region is for test,Router is not supported', 'http_code' => 400, 'description' => '公网是测试Region,不支持同步'],
+ ['code' => 'Router.ParameterInvalid', 'message' => 'The parameter is invalid.', 'http_code' => 400, 'description' => '参数不合法'],
+ ['code' => 'Router.SrcTopicNotExisted', 'message' => 'The source Topic was not found.', 'http_code' => 400, 'description' => '源Topic不存在'],
+ ['code' => 'Router.StopFirst', 'message' => 'You cannot edit the filtering rule. Stop the task first.', 'http_code' => 400, 'description' => '编辑过滤规则前,请先停止任务。'],
+ ['code' => 'Router.TaskExisted', 'message' => 'Cannot create the task. The same task already exists.', 'http_code' => 400, 'description' => '不能创建相同的任务'],
+ ['code' => 'Router.TaskLimit', 'message' => 'You cannot create the task. A single account can only create a maximum of 500 tasks.', 'http_code' => 400, 'description' => '您最多只能创建500个任务。'],
+ ['code' => 'Router.TaskSeadCycle', 'message' => 'You cannot create the task as it will cause an endless loop (i.e: a -> b -> c -> a ) .', 'http_code' => 400, 'description' => '不能创建该任务,否则会导致死循环(如:a -> b -> c -> a)。'],
+ ['code' => 'Router.TopicNotInSource', 'message' => 'The Topic does not exist in the source region. Please create the Topic in the source region first.', 'http_code' => 400, 'description' => '源Region中没有该Topic。请先在源Region中创建Topic。'],
+ ['code' => 'Router.TopicNotInTarget', 'message' => 'The Topic does not exist in the target region. Please create the Topic in the target region first.', 'http_code' => 400, 'description' => '目标Region中没有该Topic。请先在目标Region中创建Topic。'],
+ ['code' => 'Router.TopicSrcSameToDes', 'message' => 'The source Topic cannot be the same as the target Topic.', 'http_code' => 400, 'description' => '源Topic不能与目标Topic相同。'],
+ ['code' => 'RouterCrossBorder.NotSupport', 'message' => 'Cross-border message routing is not supported.', 'http_code' => 400, 'description' => '不支持跨境消息路由'],
+ ['code' => 'RouterGroup.DeleteError', 'message' => 'Failed to delete the group of routing instance.', 'http_code' => 400, 'description' => '删除订阅关系失败,请稍后再试。'],
+ ['code' => 'RouterInstance.NotSupport', 'message' => 'Current instance is not support the global message router.', 'http_code' => 400, 'description' => '当前实例不支持全球消息路由'],
+ ['code' => 'RouterTopic.NotSupportOrderV2', 'message' => 'The global message router feature does not support ordered messages 2.0.', 'http_code' => 400, 'description' => '全球消息路由暂不支持顺序消息2.0'],
+ ['code' => 'RunningStatus.QueryError', 'message' => 'Failed to get the running status of the Group ID. Please check whether the Group ID is online.', 'http_code' => 400, 'description' => '获取 Group ID 运行状态信息失败。请确认订阅组是否在线。'],
+ ['code' => 'ServiceUnable', 'message' => 'The current user has not activated the ONS service. <a href="{data}" target="_blank">Please activate the service first &gt;&gt;</a>.', 'http_code' => 400, 'description' => '当前用户未开通MQ服务。请先<a href="{data}" target="_blank">开通MQ服务 &gt;&gt;</a>'."\n"],
+ ['code' => 'SignatureError', 'message' => 'Signature calculation failed.', 'http_code' => 400, 'description' => '计算签名失败'],
+ ['code' => 'SpInstance.CreateError', 'message' => 'Instance production failure', 'http_code' => 400, 'description' => '实例生产失败'],
+ ['code' => 'SpInstance.Existed', 'message' => 'The current instance Id already exists', 'http_code' => 400, 'description' => '当前实例 Id 已存在'],
+ ['code' => 'SpInstance.NotFound', 'message' => 'can not found this instance', 'http_code' => 400, 'description' => '该账号下无匹配实例'],
+ ['code' => 'SystemError', 'message' => 'System processing error. Please contact the system administrator.', 'http_code' => 400, 'description' => '系统处理错误,请联系系统管理员。'],
+ ['code' => 'Tag.BindError', 'message' => 'Failed to bind the tag to the resource.', 'http_code' => 400, 'description' => '绑定标签到资源失败,请稍后再试。'],
+ ['code' => 'Tag.NotFound', 'message' => 'The tag is not exist.', 'http_code' => 404, 'description' => '标签不存在'],
+ ['code' => 'Tag.NumLimited', 'message' => 'The maximum number of tag is reached.', 'http_code' => 400, 'description' => '当前资源的标签数超过了最大个数限制,无法新增。'],
+ ['code' => 'Tag.UnBindError', 'message' => 'Failed to unbind the tag from the resource.', 'http_code' => 400, 'description' => '解绑资源上的标签失败,请稍后再试。'],
+ ['code' => 'TagResourceType.Invalid', 'message' => 'The type of resource is invalid.', 'http_code' => 400, 'description' => '资源类型错误,请确认后再试。'],
+ ['code' => 'Task.HasCreated', 'message' => 'The task has been created before.', 'http_code' => 400, 'description' => '任务曾经被创建过'],
+ ['code' => 'Task.NotFound', 'message' => 'Task not found', 'http_code' => 400, 'description' => '任务不存在'],
+ ['code' => 'Topic.CreateError', 'message' => 'Failed to create the Topic', 'http_code' => 400, 'description' => '创建Topic失败。'],
+ ['code' => 'Topic.DeleteError', 'message' => 'Failed to delete the Topic', 'http_code' => 400, 'description' => '删除Topic失败。'],
+ ['code' => 'Topic.Existed', 'message' => 'The specified Topic already exists.', 'http_code' => 400, 'description' => '您指定的Topic已存在。'],
+ ['code' => 'Topic.NotExisted', 'message' => 'The specified Topic does not exist.', 'http_code' => 400, 'description' => '您指定的Topic不存在。'],
+ ['code' => 'Topic.NotFoundInInstance', 'message' => 'The Topic is not found in the default instance.', 'http_code' => 400, 'description' => '未在默认实例上找到该 Topic。'],
+ ['code' => 'Topic.NumberLimit', 'message' => 'Cannot create the Topic. The maximum number of Topics allowed for the instance is reached.', 'http_code' => 400, 'description' => '无法创建 Topic,该实例的 Topic 数量已达容量上限,请前往铂金版实例管理页面进行规格升级。'],
+ ['code' => 'Topic.UpdateError', 'message' => 'Failed to update the Topic. Please try again later.', 'http_code' => 400, 'description' => '更新Topic失败。请稍后再试。'],
+ ['code' => 'TopicName.SameToGroup', 'message' => 'The group name cannot be the same as a topic name.', 'http_code' => 400, 'description' => 'GROUP不能和TOPIC重名'],
+ ['code' => 'TopicPerm.UpdateError', 'message' => 'update topic perm failed.', 'http_code' => 400, 'description' => '更新Topic的权限失败'],
+ ['code' => 'TopicRoute.QueryError', 'message' => 'Failed to get the Topic routing information. Please try again later.', 'http_code' => 400, 'description' => '获取Topic路由信息失败。请稍后再试。'],
+ ['code' => 'TopicServiceStatus.isCreating', 'message' => 'Topic is being created to Broker, please wait a moment.', 'http_code' => 404, 'description' => 'Topic正在创建到Broker,请稍等片刻'],
+ ['code' => 'TopicServiceStatus.isCreating', 'message' => 'Topic is creating to broker.', 'http_code' => 400, 'description' => 'Topic正在创建中。'],
+ ['code' => 'TopicStatus.QeuryError', 'message' => 'Failed to query the Topic status. Please try again later.', 'http_code' => 400, 'description' => '查询Topic状态失败。请稍后再试。'],
+ ['code' => 'Trace.CreateError', 'message' => 'Failed to create the task of message trace query.', 'http_code' => 400, 'description' => '创建消息轨迹查询任务失败。'],
+ ['code' => 'Trace.DeleteError', 'message' => 'Failed to delete the message trace.', 'http_code' => 400, 'description' => '删除消息轨迹失败'],
+ ['code' => 'Trace.QueryResultError', 'message' => 'Failed to query the result of message trace.', 'http_code' => 400, 'description' => '查询消息轨迹失败'],
+ ['code' => 'Ubsms.Indebt', 'message' => 'The current service is stopped due to overdue payment. The service will be resumed after the payment is settled.', 'http_code' => 400, 'description' => '您已欠费,当前服务已被停止。请结清欠费,服务即可恢复正常使用。'],
+ ['code' => 'Ubsms.IndebtOverdue', 'message' => 'Your payment is long overdue and the current service has been released. Please settle the payment, and then activate the service again.', 'http_code' => 400, 'description' => '您已欠费超期,当前服务已被释放。请结清欠费并开通服务即可使用。'],
+ ['code' => 'Ubsms.ServiceUnable', 'message' => 'MQ service has not been activated for your account. Please activate it.', 'http_code' => 400, 'description' => '您的账户未开通消息队列(MQ)服务,请开通。'],
+ ['code' => 'UpdateGroupPermError', 'message' => 'Failed to update the subscription permission. Please contact the administrator.', 'http_code' => 400, 'description' => '更新订阅权限失败。请联系管理员。'],
+ ['code' => 'UpdateTopicPermError', 'message' => 'Failed to update the read and write permission. Please contact the administrator.', 'http_code' => 400, 'description' => '更新读写权限失败。请联系管理员。'],
+ ['code' => 'User.NotExisted', 'message' => 'The user information does not exist. Please check the AccessKey.', 'http_code' => 400, 'description' => '用户信息不存在。请确认AccessKey。'],
+ ['code' => 'VerifyConsuptionError', 'message' => 'Failed to verify the consumption. Please try again later.', 'http_code' => 400, 'description' => '验证消费失败。请稍后再试。'],
+ ['code' => 'VpcVSwitch.NotFound', 'message' => 'The VPC and vSwitch are not found.', 'http_code' => 404, 'description' => '专有网络实例和交换机没有找到'],
+ ['code' => 'Resource.NotFound', 'message' => 'The resource you accessed does not exist, please check whether the configuration is correct.', 'http_code' => 400, 'description' => '你访问的资源不存在,请检查配置是否正确。'],
+ ['code' => 'System.ReadOnly', 'message' => 'The system is currently read-only and does not allow write operations. Processing is underway, please retry later.', 'http_code' => 400, 'description' => '当前系统处于只读状态,不支持写操作。正在处理中,请稍后重试。'],
+ ],
+ 'changeSet' => [
[
- 'regionId' => 'cn-qingdao',
- 'endpoint' => 'ons.cn-qingdao.aliyuncs.com',
- ],
- [
- 'regionId' => 'cn-beijing',
- 'endpoint' => 'ons.cn-beijing.aliyuncs.com',
- ],
- [
- 'regionId' => 'cn-zhangjiakou',
- 'endpoint' => 'ons.cn-zhangjiakou.aliyuncs.com',
- ],
- [
- 'regionId' => 'cn-huhehaote',
- 'endpoint' => 'ons.cn-huhehaote.aliyuncs.com',
- ],
- [
- 'regionId' => 'cn-wulanchabu',
- 'endpoint' => 'ons.cn-wulanchabu.aliyuncs.com',
- ],
- [
- 'regionId' => 'mq-internet-access',
- 'endpoint' => 'ons.mq-internet-access.aliyuncs.com',
- ],
- [
- 'regionId' => 'cn-hangzhou',
- 'endpoint' => 'ons.cn-hangzhou.aliyuncs.com',
- ],
- [
- 'regionId' => 'cn-shanghai',
- 'endpoint' => 'ons.cn-shanghai.aliyuncs.com',
+ 'apis' => [
+ ['description' => '响应参数发生变更', 'api' => 'OnsTopicSubDetail'],
+ ],
+ 'createdAt' => '2025-03-21T09:33:20.000Z',
+ 'description' => '',
],
[
- 'regionId' => 'cn-shenzhen',
- 'endpoint' => 'ons.cn-shenzhen.aliyuncs.com',
+ 'apis' => [
+ ['description' => '响应参数发生变更', 'api' => 'OnsConsumerGetConnection'],
+ ],
+ 'createdAt' => '2024-12-03T03:34:03.000Z',
+ 'description' => '',
],
[
- 'regionId' => 'cn-chengdu',
- 'endpoint' => 'ons.cn-chengdu.aliyuncs.com',
+ 'apis' => [
+ ['description' => '请求参数发生变更', 'api' => 'OnsTraceGetResult'],
+ ],
+ 'createdAt' => '2024-03-19T15:02:38.000Z',
+ 'description' => '',
],
[
- 'regionId' => 'cn-hongkong',
- 'endpoint' => 'ons.cn-hongkong.aliyuncs.com',
+ 'apis' => [
+ ['description' => '响应参数发生变更', 'api' => 'OnsConsumerStatus'],
+ ],
+ 'createdAt' => '2023-12-08T03:11:42.000Z',
+ 'description' => '',
],
[
- 'regionId' => 'ap-northeast-1',
- 'endpoint' => 'ons.ap-northeast-1.aliyuncs.com',
+ 'apis' => [
+ ['description' => '响应参数发生变更、错误码发生变更', 'api' => 'OnsRegionList'],
+ ],
+ 'createdAt' => '2023-12-08T02:51:35.000Z',
+ 'description' => '',
],
[
- 'regionId' => 'ap-southeast-1',
- 'endpoint' => 'ons.ap-southeast-1.aliyuncs.com',
+ 'apis' => [
+ ['description' => '错误码发生变更', 'api' => 'OnsGroupCreate'],
+ ],
+ 'createdAt' => '2023-10-07T03:50:19.000Z',
+ 'description' => '',
],
[
- 'regionId' => 'ap-southeast-2',
- 'endpoint' => 'ons.ap-southeast-2.aliyuncs.com',
+ 'apis' => [
+ ['description' => '请求参数发生变更、响应参数发生变更', 'api' => 'OnsInstanceInServiceList'],
+ ],
+ 'createdAt' => '2023-08-22T02:48:56.000Z',
+ 'description' => '',
],
[
- 'regionId' => 'ap-southeast-3',
- 'endpoint' => 'ons.ap-southeast-3.aliyuncs.com',
+ 'apis' => [
+ ['description' => '错误码发生变更', 'api' => 'OpenOnsService'],
+ ],
+ 'createdAt' => '2023-06-08T07:46:32.000Z',
+ 'description' => '',
],
[
- 'regionId' => 'ap-southeast-5',
- 'endpoint' => 'ons.ap-southeast-5.aliyuncs.com',
+ 'apis' => [
+ ['description' => '错误码发生变更', 'api' => 'OpenOnsService'],
+ ],
+ 'createdAt' => '2023-06-08T06:16:32.000Z',
+ 'description' => '',
],
[
- 'regionId' => 'ap-southeast-6',
- 'endpoint' => 'ons.ap-southeast-6.aliyuncs.com',
+ 'apis' => [
+ ['description' => '响应参数发生变更', 'api' => 'OnsInstanceInServiceList'],
+ ],
+ 'createdAt' => '2022-09-19T08:38:33.000Z',
+ 'description' => 'api spec以及ram-meta的上线',
],
[
- 'regionId' => 'us-east-1',
- 'endpoint' => 'ons.us-east-1.aliyuncs.com',
+ 'apis' => [
+ ['description' => '响应参数发生变更', 'api' => 'OnsInstanceBaseInfo'],
+ ['description' => '响应参数发生变更', 'api' => 'OnsInstanceBaseInfo'],
+ ],
+ 'createdAt' => '2022-09-14T08:43:05.000Z',
+ 'description' => '实例基本信息接口新增SP实例ID和实例类型',
],
[
- 'regionId' => 'us-west-1',
- 'endpoint' => 'ons.us-west-1.aliyuncs.com',
+ 'apis' => [
+ ['description' => '请求参数发生变更', 'api' => 'OnsTopicList'],
+ ],
+ 'createdAt' => '2022-08-01T15:55:34.000Z',
+ 'description' => '新增字段',
],
[
- 'regionId' => 'eu-west-1',
- 'endpoint' => 'ons.eu-west-1.aliyuncs.com',
+ 'apis' => [
+ ['description' => '响应参数发生变更', 'api' => 'OnsInstanceBaseInfo'],
+ ],
+ 'createdAt' => '2022-03-15T12:26:13.000Z',
+ 'description' => '修复实例基本信息接口,返回公网接入点',
],
[
- 'regionId' => 'eu-central-1',
- 'endpoint' => 'ons.eu-central-1.aliyuncs.com',
+ 'apis' => [
+ ['description' => '响应参数发生变更', 'api' => 'OnsInstanceBaseInfo'],
+ ],
+ 'createdAt' => '2022-03-14T07:37:00.000Z',
+ 'description' => '实例基本信息接口,新增TCP接入点的返回',
],
[
- 'regionId' => 'me-east-1',
- 'endpoint' => 'ons.me-east-1.aliyuncs.com',
+ 'apis' => [
+ ['description' => '响应参数发生变更', 'api' => 'OnsTopicList'],
+ ],
+ 'createdAt' => '2022-01-18T02:37:56.000Z',
+ 'description' => 'Topic已开启异步创建到Broker的流程,变更一下接口:1. OnsTopicCreate接口变更了限流规则,将限流值提升至单用户每秒10次请求 2. OnsTopicList接口新增了服务状态serviceStatus字段,表示异步创建到Breoker的状态,0表示创建中,1表示已创建。',
],
[
- 'regionId' => 'cn-hangzhou-finance',
- 'endpoint' => 'ons.cn-hangzhou-finance.aliyuncs.com',
+ 'apis' => [
+ ['description' => '错误码发生变更', 'api' => 'OnsTopicSubDetail'],
+ ],
+ 'createdAt' => '2021-09-08T02:47:23.000Z',
+ 'description' => '添加API流控白名单',
],
[
- 'regionId' => 'cn-shanghai-finance-1',
- 'endpoint' => 'ons.cn-shanghai-finance-1.aliyuncs.com',
+ 'apis' => [
+ ['description' => '错误码发生变更', 'api' => 'OnsGroupCreate'],
+ ['description' => '错误码发生变更', 'api' => 'OnsTopicCreate'],
+ ],
+ 'createdAt' => '2021-08-16T07:09:22.000Z',
+ 'description' => '新增错误码,提示用户创建了同一实例下与现有topic同名的groupId或者与现有groupId同名的topic',
],
- [
- 'regionId' => 'cn-shenzhen-finance-1',
- 'endpoint' => 'ons.cn-shenzhen-finance-1.aliyuncs.com',
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsTopicSubDetail'],
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'ListTagResources'],
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'UntagResources'],
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsInstanceDelete'],
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsTopicDelete'],
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsTopicUpdate'],
+ ['threshold' => '30', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsTraceQueryByMsgKey'],
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsConsumerGetConnection'],
+ ['threshold' => '30', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsTraceQueryByMsgId'],
+ ['threshold' => '3000', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsRegionList'],
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsTopicList'],
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsConsumerAccumulate'],
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsMessageDetail'],
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsGroupConsumerUpdate'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsConsumerTimeSpan'],
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsGroupList'],
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsMessageTrace'],
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsGroupSubDetail'],
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsTraceGetResult'],
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsTopicCreate'],
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsDLQMessagePageQueryByGroupId'],
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsGroupDelete'],
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsInstanceUpdate'],
+ ['threshold' => '10', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsMessagePageQueryByTopic'],
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsGroupCreate'],
+ ['threshold' => '15', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsTrendTopicInputTps'],
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsDLQMessageResendById'],
+ ['threshold' => '15', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsTrendGroupOutputTps'],
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsMessagePush'],
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsConsumerStatus'],
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsConsumerResetOffset'],
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsMessageGetByMsgId'],
+ ['threshold' => '3000', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsInstanceBaseInfo'],
+ ['threshold' => '3000', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsInstanceInServiceList'],
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsDLQMessageGetById'],
+ ['threshold' => '300', 'countWindow' => 60, 'regionId' => '*', 'api' => 'TagResources'],
+ ['threshold' => '600', 'countWindow' => 60, 'regionId' => '*', 'api' => 'OnsInstanceCreate'],
+ ['threshold' => '1', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsTopicStatus'],
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OnsMessageGetByKey'],
+ ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'OpenOnsService'],
],
- [
- 'regionId' => 'cn-beijing-finance-1',
- 'endpoint' => 'ons.cn-beijing-finance-1.aliyuncs.com',
+ 'product' => ['code' => 'ons', 'title' => '消息队列 MQ'],
+ ],
+ 'ram' => [
+ 'productCode' => 'Ons',
+ 'productName' => '云消息队列 MQ',
+ 'ramCodes' => ['mq'],
+ 'ramLevel' => '资源级',
+ 'ramConditions' => [],
+ 'ramActions' => [
+ [
+ 'apiName' => 'OnsDLQMessagePageQueryByGroupId',
+ 'description' => '查询Group ID内所有死信消息',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryDLQMessage',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'ListTagResources',
+ 'description' => '查询资源绑定的标签列表',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:ListTagResources',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsTrendGroupOutputTps',
+ 'description' => '统计消息消费数据',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'conditional'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryTrendGroupOutputTps',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsDLQMessageGetById',
+ 'description' => '根据Message ID查询死信消息',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryDLQMessage',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsConsumerStatus',
+ 'description' => '查询Group ID消费状态',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryConsumerStatus',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsMessagePageQueryByTopic',
+ 'description' => '查询Topic内所有消息',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryMessage',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsTopicDelete',
+ 'description' => '删除Topic',
+ 'operationType' => '',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:DeleteTopic',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsGroupDelete',
+ 'description' => '删除Group',
+ 'operationType' => 'delete',
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:DeleteGroup',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsTopicUpdate',
+ 'description' => '配置Topic的读写模式',
+ 'operationType' => '',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:UpdateTopic',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsGroupConsumerUpdate',
+ 'description' => '配置消费集群的消息读取权限',
+ 'operationType' => '',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:UpdateGroupConsumer',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsConsumerTimeSpan',
+ 'description' => '查询Topic可重置时间范围',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryConsumerTimeSpan',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsGroupSubDetail',
+ 'description' => '查看Group ID的订阅信息',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryGroupSubDetail',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsDLQMessageResendById',
+ 'description' => '重发指定的死信消息',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:ResendDLQMessage',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'UntagResources',
+ 'description' => '为资源解绑并删除标签',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:UntagResources',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsConsumerGetConnection',
+ 'description' => '查询Group ID客户端连接情况',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryConsumerConnection',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsGroupList',
+ 'description' => '获取Group ID列表信息',
+ 'operationType' => 'list',
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:ListGroup',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsMessageDetail',
+ 'description' => '查询消息详细信息',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryMessageDetail',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsTopicList',
+ 'description' => '获取Topic列表信息',
+ 'operationType' => 'list',
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:ListTopic',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsTopicStatus',
+ 'description' => '查询Topic状态',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryTopicStatus',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsTraceQueryByMsgId',
+ 'description' => '根据MsgId创建轨迹查询任务',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryTrace',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsMessagePush',
+ 'description' => '向指定的消费者推送消息',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:SUB',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsConsumerResetOffset',
+ 'description' => '重置Group ID消费位点',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:ResetConsumerOffset',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsMessageTrace',
+ 'description' => '查看消息消费结果',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryMessageTrace',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsTopicSubDetail',
+ 'description' => '查看Topic的订阅信息',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryTopicSubDetail',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsGroupCreate',
+ 'description' => '创建客户端Group ID',
+ 'operationType' => 'create',
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:CreateGroup',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsMessageGetByMsgId',
+ 'description' => '通过MsgId查询消息',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryMessage',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsInstanceUpdate',
+ 'description' => '更新实例名称和描述',
+ 'operationType' => '',
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:UpdateInstance',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsTopicCreate',
+ 'description' => '创建Topic',
+ 'operationType' => '',
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:CreateTopic',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsInstanceDelete',
+ 'description' => '删除实例',
+ 'operationType' => '',
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:DeleteInstance',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'TagResources',
+ 'description' => '为资源绑定标签',
+ 'operationType' => 'update',
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:TagResources',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsInstanceInServiceList',
+ 'description' => '查询指定地域下实例列表',
+ 'operationType' => 'list',
+ 'additionalActions' => [],
+ 'ramAction' => [
+ 'action' => 'mq:QueryInstanceBaseInfo',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsTraceQueryByMsgKey',
+ 'description' => '根据Message Key创建轨迹查询任务',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryTrace',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsConsumerAccumulate',
+ 'description' => '查询消息消费堆积情况',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryConsumerAccumulate',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsTrendTopicInputTps',
+ 'description' => '统计消息生产数据',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'conditional'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryTrendTopicInputTps',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsMessageGetByKey',
+ 'description' => '根据Message Key查询消息',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:OnsInstanceBaseInfo', 'validationType' => 'always'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:QueryMessage',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsInstanceBaseInfo',
+ 'description' => '查询实例基本信息和收发消息的接入点',
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'mq:QueryInstanceBaseInfo',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsInstanceCreate',
+ 'description' => '创建实例',
+ 'operationType' => 'create',
+ 'ramAction' => [
+ 'action' => 'mq:CreateInstance',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'OnsTraceGetResult',
+ 'description' => '获取轨迹查询结果',
+ 'operationType' => 'get',
+ 'additionalActions' => [
+ ['action' => 'mq:QueryInstanceBaseInfo'],
+ ],
+ 'ramAction' => [
+ 'action' => 'mq:GetTraceResult',
+ 'authLevel' => 'resource',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ['validationType' => 'always', 'product' => 'Ons', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ],
+ ],
+ ],
],
- [
- 'regionId' => 'me-central-1',
- 'endpoint' => 'ons.me-central-1.aliyuncs.com',
+ 'resourceTypes' => [
+ ['validationType' => 'conditional', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#GroupName}'],
+ ['validationType' => 'conditional', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#GroupName}'],
+ ['validationType' => 'conditional', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#TopicName}'],
+ ['validationType' => 'conditional', 'resourceType' => 'Topic', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}'],
+ ['validationType' => 'always', 'resourceType' => 'Group', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ['validationType' => 'conditional', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:{#InstanceId}'],
+ ['validationType' => 'always', 'resourceType' => 'Instance', 'arn' => 'acs:mq:{#regionId}:{#accountId}:*'],
],
],
];