调用DescribeSiteMonitorAttribute接口查询站点监控任务的详细信息。
接口说明
本文将提供一个示例,查询站点监控任务cc641dff-c19d-45f3-ad0a-818a0c4f****
的详细信息,返回结果显示,站点监控任务的名称为test123
、探测地址为https://aliyun.com
、运营商为阿里巴巴
等信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
cms:DescribeSiteMonitorAttribute | get |
|
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
TaskId | string | 是 | 监控任务 ID。 | cc641dff-c19d-45f3-ad0a-818a0c4f**** |
IncludeAlert | boolean | 否 | 返回的任务详情是否包含报警规则。
| false |
关于公共请求参数的详情,请参见公共参数。
返回参数
示例
正常返回示例
JSON
格式
{
"Code": "200",
"Message": "successful",
"MetricRules": {
"MetricRule": [
{
"ActionEnable": "true",
"AlarmActions": "CloudMonitor",
"ComparisonOperator": "GreaterThanYesterday",
"Dimensions": "[{\"taskId\": \"cc641dff-c19d-45f3-ad0a-818a0c4f****\" }]",
"EvaluationCount": "3",
"Expression": "$Availability=30",
"Level": "2",
"MetricName": "Availability",
"Namespace": "acs_networkmonitor",
"OkActions": "[ \"CloudMonitor\"]",
"Period": "15s",
"RuleId": "bf071ae_7b7aec3817b0fdf****",
"RuleName": "rule1",
"StateValue": "OK",
"Statistics": "Availability",
"Threshold": "30"
}
]
},
"RequestId": "D17DF650-7EBD-54D0-903A-1D4E624D7402",
"SiteMonitors": {
"Address": "https://aliyun.com",
"AgentGroup": "PC",
"CustomSchedule": {
"days": {
"days": [
1
]
},
"end_hour": 18,
"start_hour": 8,
"time_zone": "local"
},
"Interval": "1",
"IspCities": {
"IspCity": [
{
"City": "738",
"CityName": "北京市",
"Isp": "465",
"IspName": "阿里巴巴",
"Type": "IDC"
}
]
},
"OptionJson": {
"assertions": {
"assertions": [
{
"operator": "lessThan",
"property": "json path",
"target": "0",
"type": "response_time"
}
]
},
"attempts": 3,
"authentication": 1,
"blocked_url_list": {
"blocked_url_list": [
"www.taobao.com/**"
]
},
"browser_headers": {
"browser_headers": [
{
"key": "value"
}
]
},
"browser_hosts": {
"browser_hosts": [
"{\"url\":\"www.taobao.com\",\"ip\":\"127.0.0.1\"}"
]
},
"browser_info": {
"browser_info": [
{
"browser": "Chrome",
"device": "laptop"
}
]
},
"browser_insecure": false,
"browser_task_version": "1",
"cookie": "lang=en",
"diagnosis_mtr": false,
"diagnosis_ping": false,
"dns_hijack_whitelist": "www.taobao.com:www.taobao.com.danuoyi.tbcache.com",
"dns_match_rule": "IN_DNS",
"dns_server": "192.168.XX.XX",
"dns_type": "A",
"empty_message": false,
"expect_exist_string": {
"expect_exist_string": [
"expected string"
]
},
"expect_non_exist_string": {
"expect_non_exist_string": [
"unexpected string"
]
},
"expect_value": "dns_server",
"failure_rate": 0.4,
"header": "testKey:testValue",
"http_method": "get",
"ip_network": "v4",
"isBase64Encode": "false",
"match_rule": 1,
"min_tls_version": "tlsv1.2",
"password": "123****",
"ping_num": 29,
"ping_port": 80,
"ping_type": "icmp",
"port": 110,
"protocol": "TCP",
"quic_enabled": true,
"quic_target": {
"quic_target": [
"www.taobao.com"
]
},
"request_content": "aa=bb",
"request_format": "txt",
"response_content": "txt",
"response_format": "txt",
"retry_delay": 0,
"screen_shot": false,
"strict_mode": false,
"time_out": 3,
"traffic_hijack_element_blacklist": {
"traffic_hijack_element_blacklist": [
"www.taobao.com"
]
},
"traffic_hijack_element_count": 0,
"traffic_hijack_element_whitelist": {
"traffic_hijack_element_whitelist": [
"www.taobao.com"
]
},
"username": "testUser",
"waitTime_after_completion": 3
},
"TaskId": "cc641dff-c19d-45f3-ad0a-818a0c4f****",
"TaskName": "test123",
"TaskState": "1",
"TaskType": "HTTP",
"VpcConfig": {
"Region": "cn-beijing",
"SecurityGroupId": "sg-xxxxxx",
"VpcId": "vpc-xxxxxx",
"VswitchId": "vsw-xxxxxx"
}
},
"Success": true
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | ParameterInvalid | The parameter is missing or invalid. %s | 参数缺失或者参数无效。 |
401 | AccessDeniedException | You donot have sufficient access to perform this action. | - |
402 | LimitExceeded | The quota for this customer had been reached. | - |
403 | Forbidden | You are not authorized to operate the specified resource. | 没有权限,请使用RAM进行授权 |
404 | Forbidden | Task Id does not exist | - |
406 | ExceedingQuota | Exceeding quota limits. | - |
429 | Throttli∂ngException | The request was denied due to request throttling. | - |
500 | InternalError | The request processing has failed due to some unknown error. | - |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|---|---|
2024-08-05 | OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |
2024-07-31 | OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |
2024-05-16 | OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |
2024-05-16 | OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-09-04 | OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-08-22 | OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-08-04 | OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-06-15 | OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-05-22 | OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-04-06 | OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |
2021-09-16 | OpenAPI 描述信息更新、OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |