Queries the information about topics that belong to the current account.
Operation description
This operation returns the basic information about topics and does not return the details of topics.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
mq:QueryInstanceBaseInfo | List |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Topic | string | No | The name of the topic that you want to query. This parameter is required if you want to query a specific topic. If you do not include this parameter in a request, all topics that you can access are queried. | test |
InstanceId | string | Yes | The ID of the instance that contains the topics you want to query. | MQ_INST_188077086902****_BXSuW61e |
Tag | object [] | No | The list of tags that are attached to the topic. A maximum of 20 tags can be included in the list. | |
Key | string | Yes | The key of the tag that is attached to the topics you want to query. This parameter is not required. If you configure this parameter, you must also configure the Value parameter.**** If you include the Key and Value parameters in a request, this operation queries only the topics that use the specified tag. If you do not include these parameters in a request, this operation queries all topics that you can access.
| CartService |
Value | string | Yes | The value of the tag that is attached to the topics you want to query. This parameter is not required. If you configure this parameter, you must also configure the Key parameter.**** If you include the Key and Value parameters in a request, this operation queries only the topics that use the specified tag. If you do not include these parameters in a request, this operation queries all topics that you can access.
| ServiceA |
UserId | string | No | The user ID of the topic owner. Set this parameter to an Alibaba Cloud account ID. | 138015630679**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "4A978869-7681-4529-B470-107E1379****",
"Data": {
"PublishInfoDo": [
{
"MessageType": 0,
"RelationName": "Publish and subscribe\n",
"Owner": "138015630679****",
"IndependentNaming": true,
"Remark": "Test\n",
"Relation": 6,
"CreateTime": 1570700947000,
"Topic": "test",
"Tags": {
"Tag": [
{
"Key": "CartService",
"Value": "SrviceA"
}
]
},
"InstanceId": "MQ_INST_188077086902****_BXSuW61e",
"ServiceStatus": 0
}
]
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|