Queries information about all topics in your account.
Operation description
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mq:ListTopic |
list |
Instance
|
None |
|
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Topic |
string |
No |
Specify the topic to query. If you leave this parameter empty, all topics are queried. |
test |
| InstanceId |
string |
No |
The ID of the instance that contains the topics you want to query. |
MQ_INST_188077086902****_BXSuW61e |
| Tag |
array<object> |
No |
The list of tags that are attached to the topic. The list can contain a maximum of 20 elements. |
|
|
object |
No |
The structure of the returned tag. |
||
| Key |
string |
Yes |
The tag key of the topic. You must specify the Key and Value parameters at the same time, or leave them both empty. If you specify both parameters, this operation queries topics that have the specified tag. If you leave both parameters empty, this operation queries all topics.
|
CartService |
| Value |
string |
Yes |
The tag value of the topic. You must specify the Key and Value parameters at the same time, or leave them both empty. If you specify both parameters, this operation queries topics that have the specified tag. If you leave both parameters empty, this operation queries all topics.
|
ServiceA |
| UserId |
string |
No |
The ID of the user who created the topic. This is the ID of an Alibaba Cloud account. |
138015630679**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned data structure. |
||
| RequestId |
string |
This is a common parameter. Each request has a unique ID. You can use this ID to troubleshoot issues. |
4A978869-7681-4529-B470-107E1379**** |
| Data |
object |
||
| PublishInfoDo |
array<object> |
The list of topics in the specified instance. |
|
|
array<object> |
The data structure of the returned topic. |
||
| MessageType |
integer |
The message type. Valid values:
|
0 |
| RelationName |
string |
The relation name. Valid values are Owner, Subscribable, Publishable, and Publishable and Subscribable. |
授权发布/订阅 |
| Owner |
string |
The ID of the topic owner. This is the ID of an Alibaba Cloud account. |
138015630679**** |
| IndependentNaming |
boolean |
Indicates whether the instance that contains the topic has a namespace. Valid values:
|
true |
| Remark |
string |
The remarks. |
测试 |
| Relation |
integer |
The relation ID. Valid values:
|
6 |
| CreateTime |
integer |
The time when the topic was created. |
1570700947000 |
| Topic |
string |
The topic name. |
test |
| Tags |
object |
||
| Tag |
array<object> |
The tags that are attached to the topic. |
|
|
object |
The definition of the tag structure. |
||
| Key |
string |
The tag key. |
CartService |
| Value |
string |
The tag value. |
SrviceA |
| InstanceId |
string |
The ID of the instance that contains the topic. |
MQ_INST_188077086902****_BXSuW61e |
| ServiceStatus |
integer |
The status of the asynchronous topic creation. Valid values:
|
0 |
Examples
Success response
JSON format
{
"RequestId": "4A978869-7681-4529-B470-107E1379****",
"Data": {
"PublishInfoDo": [
{
"MessageType": 0,
"RelationName": "授权发布/订阅",
"Owner": "138015630679****",
"IndependentNaming": true,
"Remark": "测试",
"Relation": 6,
"CreateTime": 1570700947000,
"Topic": "test",
"Tags": {
"Tag": [
{
"Key": "CartService",
"Value": "SrviceA"
}
]
},
"InstanceId": "MQ_INST_188077086902****_BXSuW61e",
"ServiceStatus": 0
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.