擷取某個指定主題的詳細資料。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
rocketmq:GetTopic |
get |
*Topic
|
無 | 無 |
請求文法
GET /instances/{instanceId}/topics/{topicName} HTTP/1.1
路徑參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| instanceId |
string |
是 |
待查詢主題所屬的執行個體的 ID。 |
rmq-cn-7e22ody**** |
| topicName |
string |
是 |
待查詢主題的名稱。 |
topic_test |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
當前API無需請求參數
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Result |
||
| requestId |
string |
請求 ID,每個請求的 ID 都是唯一的,可用於排查和定位問題。 |
AF9A8B10-C426-530F-A0DD-96320B39**** |
| success |
boolean |
執行結果是否成功。 |
true |
| data |
object |
返回結果。 |
|
| regionId |
string |
執行個體所屬的地區 ID。 |
cn-hangzhou |
| instanceId |
string |
主題所屬執行個體的 ID。 |
rmq-cn-7e22ody**** |
| topicName |
string |
主題名稱。 |
topic_test |
| messageType |
string |
主題的訊息類型 枚舉值:
|
NORMAL |
| status |
string |
主題的狀態。 參數取值如下:
枚舉值:
|
RUNNING |
| remark |
string |
主題的備忘資訊。 |
This is the remark for test. |
| createTime |
string |
主題的建立時間。 |
2022-08-01 20:05:50 |
| updateTime |
string |
主題的最後修改時間。 |
2022-08-01 20:05:50 |
| maxSendTps |
integer |
發送訊息 tps 上限 |
1000 |
| liteTopicExpiration |
integer |
liteTopic 到期時間,單位:分鐘 |
60 |
| code |
string |
錯誤碼。 |
Topic.NotFound |
| message |
string |
錯誤資訊。 |
The topic cannot be found. |
| httpStatusCode |
integer |
HTTP 狀態代碼。 |
400 |
| dynamicCode |
string |
動態錯誤碼。 |
TopicName |
| dynamicMessage |
string |
動態錯誤資訊。 |
topicName |
樣本
正常返回樣本
JSON格式
{
"requestId": "AF9A8B10-C426-530F-A0DD-96320B39****",
"success": true,
"data": {
"regionId": "cn-hangzhou",
"instanceId": "rmq-cn-7e22ody****",
"topicName": "topic_test",
"messageType": "NORMAL",
"status": "RUNNING",
"remark": "This is the remark for test.\n",
"createTime": "2022-08-01 20:05:50",
"updateTime": "2022-08-01 20:05:50",
"maxSendTps": 1000,
"liteTopicExpiration": 60
},
"code": "Topic.NotFound",
"message": "The topic cannot be found.",
"httpStatusCode": 400,
"dynamicCode": "TopicName",
"dynamicMessage": "topicName"
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。