{"base_path":null,"components":null,"consumes":"[\"application/json\"]","definitions":{"BaseResponse":{"description":"API响应基类","properties":{"error_code":{"description":"错误码。","maxLength":12,"minLength":0,"type":"string"},"error_msg":{"description":"错误描述。","maxLength":1000,"minLength":0,"type":"string"}}},"MetricNotifyRule":{"description":"指标通知规则","properties":{"comparison_operator":{"description":"统计指标对应的统计值和threshold进行比较的条件\n* `>=` - 统计指标大于等于threshold时触发\n* `>` - 统计指标大于threshold时触发\n* `=` - 统计指标等于threshold时触发\n* `<=` - 统计指标小于等于threshold时触发\n* `<` - 统计指标小于threshold时触发","example":"","readOnly":true,"type":"string"},"enable":{"default":false,"description":"启禁用规则 true:启用 false:禁用","example":true,"readOnly":true,"type":"boolean"},"interval":{"description":"触发通知后;下次通知的间隔时间;默认每天一次","example":1,"readOnly":true,"type":"integer"},"metric_name":{"description":"统计指标名称,目前仅支持固定值:desktop_idle_duration\n* `desktop_idle_duration` - 桌面空闲时长","example":"desktop_idle_duration","readOnly":true,"type":"string"},"notify_object":{"description":"通知对象;smn的主题urn","example":"urn:smn:REGION_ID:XXX-XXX-XXX:topicName","readOnly":true,"type":"string"},"rule_id":{"description":"规则ID","example":"xxxx-xxxx-xxxx","readOnly":true,"type":"string"},"threshold":{"description":"统计持续周期(天)","example":30,"readOnly":true,"type":"integer"}}},"UpdateMetricNotifyRuleReq":{"description":"设置通知规则","properties":{"comparison_operator":{"description":"统计指标对应的统计值和threshold进行比较的条件\n* `>=` - 统计指标大于等于threshold时触发\n* `>` - 统计指标大于threshold时触发\n* `=` - 统计指标等于threshold时触发\n* `<=` - 统计指标小于等于threshold时触发\n* `<` - 统计指标小于threshold时触发","example":"","pattern":"^(\\u003e\\u003d|\\u003e|\\u003d|\\u003c\\u003d|\\u003c)$","type":"string"},"enable":{"default":false,"description":"启禁用规则 true:启用 false:禁用","example":true,"type":"boolean"},"interval":{"description":"触发通知后;下次通知的间隔时间;默认每天一次","example":1,"maximum":30,"minimum":1,"type":"integer"},"metric_name":{"description":"统计指标名称,目前仅支持固定值:desktop_idle_duration\n同一指标的规则不允许重复\n* `desktop_idle_duration` - 桌面空闲时长","example":"desktop_idle_duration","maxLength":128,"minLength":1,"type":"string"},"notify_object":{"description":"通知对象;smn的主题urn","example":"urn:smn:REGION_ID:XXX-XXX-XXX:topicName","maxLength":1024,"minLength":1,"type":"string"},"threshold":{"description":"规则配置-阈值(天)","example":30,"maximum":30,"minimum":1,"type":"integer"}}}},"description":null,"group_id":"7383c32d5d5e4d0481c071faeb994404","host":"workspace.cn-north-4.myhuaweicloud.com","id":"4bdafa9392a640f9ba8858add90866c3","info_version":"v2","method":"put","name":"UpdateMetricNotifyRule","parameters":{},"paths":{"/v2/{project_id}/statistics/notify-rules/{rule_id}":{"put":{"description":"更新对应指标的通知规则;对应指标满足相应的规则条件时发送通知","operationId":"UpdateMetricNotifyRule","parameters":[{"description":"项目ID。","in":"path","maxLength":255,"minLength":1,"name":"project_id","required":true,"type":"string","x-example":"2b31ed520xxxxxxebedb6e57xxxxxxxx"},{"description":"用户Token。\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","maxLength":64000,"minLength":1,"name":"X-Auth-Token","required":true,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXXX..."},{"description":"通知规则ID","in":"path","maxLength":64,"minLength":1,"name":"rule_id","required":true,"type":"string"},{"description":"设置通知规则","in":"body","name":"UpdateMetricNotifyRuleRequestBody","required":true,"schema":{"$ref":"#/definitions/UpdateMetricNotifyRuleReq"}}],"produces":["application/json"],"responses":{"200":{"description":"响应成功","schema":{"$ref":"#/definitions/MetricNotifyRule"}},"400":{"description":"客户端请求有误","schema":{"$ref":"#/definitions/BaseResponse"}},"401":{"description":"鉴权失败","schema":{"$ref":"#/definitions/BaseResponse"}},"500":{"description":"内部错误","schema":{"$ref":"#/definitions/BaseResponse"}}},"summary":"更新通知规则","tags":["Statistics"],"x-api-type":"open-api","x-apiexplorer-hide":"N","x-apig-group":"internal_token,public","x-apigateway-request-type":"public","x-is-registered":"Y","x-support-sdk":"Y"}}},"product_short":"Workspace","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"更新通知规则","tags":"报表统计","uri":null,"version":"2.0"}