Mengkueri statistik rata-rata dari metrik tertentu dalam tugas pemantauan situs tertentu dengan memanggil operasi DescribeSiteMonitorStatistics.
Deskripsi operasi
Topik ini memberikan contoh tentang cara mengkueri statistik rata-rata dari metrik Availability dalam tugas pemantauan situs yang ID-nya adalah ef4cdc8b-9dc7-43e7-810e-f950e56c****. Hasil yang dikembalikan menunjukkan bahwa ketersediaannya adalah 100.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:DescribeSiteMonitorStatistics |
get |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| TaskId |
string |
Yes |
ID tugas pemantauan situs. Untuk informasi tentang cara memperoleh ID tugas pemantauan situs, lihat DescribeSiteMonitorList. |
ef4cdc8b-9dc7-43e7-810e-f950e56c**** |
| TimeRange |
string |
No |
Periode statistik. Satuan: menit. Nilai default: 1440 (1 hari). Nilai maksimum: 43200 (30 hari). |
1440 |
| StartTime |
string |
No |
Awal rentang waktu yang akan dikueri. Satuan: milidetik. Nilai default: 1 jam sebelum waktu saat ini. |
1576142850527 |
| MetricName |
string |
Yes |
Nama metrik. Nilai yang valid:
|
Availability |
Untuk informasi selengkapnya tentang parameter permintaan umum, lihat Common parameters.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
Kode status HTTP. Catatan
Nilai 200 menunjukkan bahwa panggilan berhasil. |
200 |
| Message |
string |
Pesan yang dikembalikan. |
Successful |
| Data |
string |
Hasil statistik. |
100 |
| RequestId |
string |
ID permintaan. |
3AD2724D-E317-4BFB-B422-D6691D071BE1 |
| Success |
string |
Menunjukkan apakah panggilan berhasil. Nilai yang valid:
|
true |
Contoh
Respons sukses
JSONformat
{
"Code": "200",
"Message": "Successful",
"Data": "100",
"RequestId": "3AD2724D-E317-4BFB-B422-D6691D071BE1",
"Success": "true"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameterValue | The specified parameter is not valid. | |
| 401 | AccessDeniedException | You donot have sufficient access to perform this action. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | Forbidden | You are not authorized to operate the specified resource. | No permission, please use RAM to authorize |
| 403 | InvalidClientTokenId | The X.509 certificate or cms access key ID provided does not exist in our records. | |
| 206 | %s | %s | |
| 503 | %s | %s | |
| 406 | %s | %s | |
| 429 | Throttli∂ngException | The request was denied due to request throttling. | |
| 409 | %s | %s |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.