サイトモニタリングタスクのリストを照会します。
操作説明
この Topic では、現在のアカウントのサイトモニタリングタスクのリストをクエリする方法の例を示します。応答は、現在のアカウントに HanZhou_ECS2 という名前のサイトモニタリング Record が 1 つあることを示しています。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
cms:DescribeSiteMonitorList |
get |
*すべてのリソース。
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| TaskId |
string |
任意 |
サイトモニタリングタスクの ID。 |
a1ecd34a-8157-44d9-b060-14950837**** |
| TaskType |
string |
任意 |
サイトモニタリングタスクのタイプ。CloudMonitor では、以下のタイプがサポートされています: HTTP、PING、TCP、UDP、DNS、SMTP、POP3、FTP。 |
HTTP |
| Keyword |
string |
任意 |
サイトモニタリングタスクの検索に使用されるキーワード。 説明
タスク名またはタスクアドレスに基づくあいまい一致がサポートされています。 |
サイト |
| Page |
integer |
任意 |
ページ番号。デフォルト値: 1。 |
1 |
| PageSize |
integer |
任意 |
ページサイズ。デフォルト値: 10。 |
10 |
| TaskState |
string |
任意 |
タスクのステータス。有効な値:
|
1 |
| AgentGroup |
string |
任意 |
タスクで使用されるモニタリングノードのタイプ。有効な値:
列挙値:
|
PC |
共通リクエストパラメーターの詳細については、共通パラメーター をご参照ください。
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
なし。 |
||
| RequestId |
string |
リクエスト ID。 |
A80DB41C-AF6C-50E1-ADB5-66DCBA3D266B |
| Success |
string |
操作が成功したかどうかを示します。有効な値:
|
true |
| Code |
string |
状態コード。 説明
200 は成功を示します。 |
200 |
| Message |
string |
返されるメッセージ。 |
successful |
| PageNumber |
integer |
ページ番号。 |
1 |
| PageSize |
integer |
1 ページあたりのエントリ数。 |
10 |
| TotalCount |
integer |
エントリの総数。 |
1 |
| SiteMonitors |
object |
||
| SiteMonitor |
array<object> |
サイトモニタリングタスクのリスト。 |
|
|
array<object> |
なし。 |
||
| TaskType |
string |
サイトモニタリングタスクのタイプ。CloudMonitor では、以下のタイプがサポートされています: HTTP、PING、TCP、UDP、DNS、SMTP、POP3、FTP。 |
TCP |
| UpdateTime |
string |
サイトモニタリングタスクが最後に更新された時間。フォーマットは YYYY-MM-DD HH:mm:ss です。 |
2022-03-08 17:14:31 |
| Interval |
string |
モニタリング間隔。単位: 分。 |
1 |
| TaskState |
string |
タスクのステータス。有効な値:
|
1 |
| CreateTime |
string |
タスクが作成された時間。フォーマットは YYYY-MM-DD HH:mm:ss です。 |
2021-11-01 11:05:18 |
| TaskName |
string |
サイトモニタリングタスクの名前。 |
新規モニタリングタスク |
| Address |
string |
タスクによってモニタリングされる URL または IP アドレス。 |
https://aliyun.com |
| TaskId |
string |
サイトモニタリングタスクの ID。 |
f5783760-1b39-4b6b-80e8-453d962a**** |
| OptionsJson |
object |
拡張オプション。モニタリングタイプごとに異なる拡張オプションがあります。詳細については、 CreateSiteMonitor をご参照ください。 |
|
| password |
string |
SMTP、POP3、または FTP モニタリングタイプのパスワード。 |
123**** |
| request_format |
string |
HTTP リクエストコンテンツのフォーマット。有効な値:
|
hex |
| response_content |
string |
一致したレスポンスコンテンツ。
|
cf0f85 |
| failure_rate |
number |
パケット損失レート。 説明
このパラメーターは、PING モニタリングタイプにのみ適用されます。 |
0.5 |
| time_out |
integer |
タイムアウト期間。単位: ミリ秒。 |
3000 |
| header |
string |
HTTP リクエストヘッダー。フォーマットは |
testKey:testValue |
| cookie |
string |
HTTP リクエストの Cookie テキスト。 |
lang=en |
| port |
integer |
TCP、UDP、SMTP、または POP3 モニタリングタイプのポート。 |
80 |
| ping_num |
integer |
PING 試行回数。 |
20 |
| authentication |
integer |
セキュリティ認証を有効にするかどうかを指定します。有効な値:
|
1 |
| http_method |
string |
HTTP リクエストメソッド。有効な値:
|
get |
| match_rule |
integer |
アラートルールが含まれているかどうかを指定します。有効な値:
|
0 |
| dns_match_rule |
string |
DNS 一致ルール。有効な値:
|
IN_DNS |
| request_content |
string |
HTTP リクエストコンテンツ。 |
cf0f85 |
| username |
string |
FTP、SMTP、または POP3 のユーザー名。 |
testUser |
| response_format |
string |
HTTP 応答コンテンツのフォーマット。有効な値:
|
hex |
| dns_type |
string |
DNS 解決タイプ。このパラメーターは、DNS モニタリングタイプにのみ適用されます。有効な値:
|
A |
| dns_server |
string |
指定された DNS サーバーのドメイン名または IP アドレス。 |
192.168.XX.XX |
| enable_operator_dns |
boolean |
キャリア DNS を使用するかどうかを指定します。有効な値:
|
true |
| attempts |
integer |
DNS 失敗後の再試行回数。 |
3 |
| protocol |
string |
DNS プロトコルの種類。有効な値:
|
udp |
| proxy_protocol |
boolean |
ProxyProtocol を有効にするかどうかを指定します。有効な値:
|
false |
| acceptable_response_code |
string |
許容される状態コード。 説明
代わりにアサーション構成を使用します。 |
400 |
| isBase64Encode |
string |
Base64 を使用してパスワードをデコードして保存するかどうかを指定します。有効な値:
|
false |
| cert_verify |
boolean |
証明書を検証するかどうかを指定します。有効な値:
|
false |
| unfollow_redirect |
boolean |
301 または 302 状態コードが返されたときにリダイレクトをフォローするかどうかを指定します。有効な値:
|
false |
| diagnosis_mtr |
boolean |
タスク失敗後に自動 MTR ネットワーク診断を有効にするかどうかを指定します。有効な値:
|
false |
| diagnosis_ping |
boolean |
モニタリングタスク失敗後に自動 Ping ネットワーク遅延検出を有効にするかどうかを指定します。有効な値:
|
false |
| retry_delay |
integer |
モニタリング失敗後の再試行遅延。 |
1 |
| assertions |
object |
||
| assertions |
array<object> |
アサーション構成グループ。 |
|
|
object |
アサーション構成グループ。 |
||
| property |
string |
アサーション本文の解析パス。
|
JSON パス |
| type |
string |
アサーションタイプ。有効な値:
|
応答時間 |
| operator |
string |
アサーション比較演算子。有効な値:
|
lessThan |
| target |
string |
アサーション比較のターゲット値または文字列。 |
1000 |
| AgentGroup |
string |
プローブタイプ。有効な値:
|
PC |
例
成功レスポンス
JSONJSON
{
"RequestId": "A80DB41C-AF6C-50E1-ADB5-66DCBA3D266B",
"Success": "true",
"Code": "200",
"Message": "successful",
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 1,
"SiteMonitors": {
"SiteMonitor": [
{
"TaskType": "TCP",
"UpdateTime": "2022-03-08 17:14:31",
"Interval": "1",
"TaskState": "1",
"CreateTime": "2021-11-01 11:05:18",
"TaskName": "新的探测任务",
"Address": "https://aliyun.com",
"TaskId": "f5783760-1b39-4b6b-80e8-453d962a****",
"OptionsJson": {
"password": "123****",
"request_format": "hex",
"response_content": "cf0f85",
"failure_rate": 0.5,
"time_out": 3000,
"header": "testKey:testValue",
"cookie": "lang=en",
"port": 80,
"ping_num": 20,
"authentication": 1,
"http_method": "get",
"match_rule": 0,
"dns_match_rule": "IN_DNS",
"request_content": "cf0f85",
"username": "testUser",
"response_format": "hex",
"dns_type": "A",
"dns_server": "192.168.XX.XX",
"enable_operator_dns": true,
"attempts": 3,
"protocol": "udp",
"proxy_protocol": false,
"acceptable_response_code": "400",
"isBase64Encode": "false",
"cert_verify": false,
"unfollow_redirect": false,
"diagnosis_mtr": false,
"diagnosis_ping": false,
"retry_delay": 1,
"assertions": {
"assertions": [
{
"property": "json path",
"type": "response_time",
"operator": "lessThan",
"target": "1000"
}
]
}
},
"AgentGroup": "PC"
}
]
}
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InvalidQueryParameter | %s | |
| 401 | AccessDeniedException | You donot have sufficient access to perform this action. | |
| 500 | %s | %s | |
| 500 | InternalError | %s | |
| 402 | LimitExceeded | The quota for this customer had been reached. | |
| 403 | Forbidden | You are not authorized to operate the specified resource. | 必須の権限がありません。RAM を使用して権限を付与してください。 |
| 503 | %s | %s | |
| 406 | ExceedingQuota | Exceeding quota limits. | タスクのクォータを超えました。 |
| 429 | ThrottlingException | The request was denied due to request throttling. | |
| 409 | %s | %s |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。