Panggil operasi GetTopicAttributes untuk mengambil properti suatu Topik.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mns:GetTopicAttributes |
get |
*Topic
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| TopicName |
string |
Yes |
Nama topik. |
demo-topic |
| Tag |
array<object> |
No |
Daftar tag sumber daya. |
|
|
object |
No |
Daftar tag. |
||
| Key |
string |
No |
Kunci tag. |
tag1 |
| Value |
string |
No |
Nilai tag. |
test |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
06273500-249F-5863-121D-74D51123**** |
| Code |
integer |
Kode respons. |
200 |
| Status |
string |
Status respons. |
Success |
| Message |
string |
Pesan respons. |
operation success |
| Success |
boolean |
Menunjukkan apakah permintaan berhasil. |
true |
| Data |
object |
Data respons. |
|
| TopicName |
string |
Nama topik. |
demo-topic |
| MessageCount |
integer |
Jumlah pesan dalam topik. |
0 |
| MaxMessageSize |
integer |
Panjang maksimum isi pesan yang dapat dikirim ke topik, dalam byte. |
65536 |
| MessageRetentionPeriod |
integer |
Periode maksimum penyimpanan pesan dalam topik, dalam detik. Setelah periode ini berlalu sejak pesan dikirim, pesan akan dihapus terlepas dari apakah pesan tersebut telah berhasil didorong ke subscriber. |
86400 |
| CreateTime |
integer |
Waktu pembuatan topik. Nilainya merupakan stempel waktu UNIX yang merepresentasikan jumlah detik sejak 00:00:00 UTC pada 1 Januari 1970. |
1449554277 |
| LastModifyTime |
integer |
Waktu terakhir properti topik dimodifikasi. Nilainya merupakan stempel waktu UNIX yang merepresentasikan jumlah detik sejak 00:00:00 UTC pada 1 Januari 1970. |
1449554460 |
| LoggingEnabled |
boolean |
Menunjukkan apakah Log Management diaktifkan.
|
True |
| Tags |
array<object> |
Daftar tag sumber daya. |
|
|
object |
Nilai yang terkait dengan kunci tag. |
||
| TagKey |
string |
Kunci tag. |
tag1 |
| TagValue |
string |
Nilai tag. |
test |
| TopicType |
string |
Tipe topik. Nilai yang valid:
|
normal |
| TopicUrl |
string |
http:// 111111111****.mns.us-west-1.aliyuncs.com/topics/testTopic |
|
| TopicInnerUrl |
string |
http:// 111111111****.mns.us-west-1-internal.aliyuncs.com/topics/testTopic |
Contoh
Respons sukses
JSONformat
{
"RequestId": "06273500-249F-5863-121D-74D51123****",
"Code": 200,
"Status": "Success",
"Message": "operation success",
"Success": true,
"Data": {
"TopicName": "demo-topic",
"MessageCount": 0,
"MaxMessageSize": 65536,
"MessageRetentionPeriod": 86400,
"CreateTime": 1449554277,
"LastModifyTime": 1449554460,
"LoggingEnabled": true,
"Tags": [
{
"TagKey": "tag1",
"TagValue": "test"
}
],
"TopicType": "normal",
"TopicUrl": "http:// 111111111****.mns.us-west-1.aliyuncs.com/topics/testTopic",
"TopicInnerUrl": "http:// 111111111****.mns.us-west-1-internal.aliyuncs.com/topics/testTopic"
}
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.