修改基线配置。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String UpdateBaseline

系统规定参数。取值:UpdateBaseline

BaselineId Long 1000010800007

基线的ID, 可通过 ListBaselines 获取。

ProjectId Long 2043

项目ID, 可通过 ListBaselines 获取。

BaselineName String BaselineName

基线名。

Owner String 3726346****

基线责任人的阿里云uid。

Priority Integer 7

基线的优先级,取值范围为{1,3,5,7,8}。

NodeIds String 1,2,3

基线上游节点列表,使用逗号分割,节点较多的情况下,建议在其下游增加虚节点,便于管理。

OvertimeSettings Array of OvertimeSetting

基线承诺时间配置。

Cycle Integer 1

承诺时间对应的周期,天基线是1,小时基线可以配置最多24个周期。

Time String 00:00

承诺时间,hh:mm格式,hh的取值范围为0,47,mm的取值范围为0,59

AlertMarginThreshold Integer 30

基线预警余量,单位为分钟。

BaselineType String DAILY

基线类型,包括DAILY(天基线)和HOURLY(小时基线)。

Enabled Boolean true

基线是否开启,包括true(可用)和false(不可用)。

AlertEnabled Boolean true

是否开启告警,包括true(开启)和false(关闭)。

AlertSettings Array of AlertSetting

基线告警配置。

AlertType String BASELINE

告警类型,BASELINE

  • 基线 / TOPIC
  • 事件。
AlertMethods Array of String SMS

报警的方式

SilenceStartTime String 00:00:00

静默开始时间。

SilenceEndTime String 00:00:00

静默结束时间。

AlertInterval Integer 1800

事件告警间隔,单位为秒,最小为900。

AlertMaximum Integer 1

事件告警最大次数,最大为24。

DingRobots Array of DingRobot

钉钉机器人列表

WebUrl String https://oapi.dingtalk.com/robot/send?access_token=xxx

钉钉群机器人的webhook地址。

AtAll Boolean false

是否@所有人,包括true(是)和false(否)。

Webhooks Array of String https://open.feishu.cn/open-apis/bot/v2/hook/xxx

企业微信或飞书机器人的webhook地址,多个webhook地址之间使用英文逗号(,)分隔。alertMethods 中需要包含 WEBHOOKS 告警方式。当该参数配置为undefined时,系统会清空WebHook地址。

仅DataWorks企业版支持。

可用地域:华东2(上海)、西南1(成都)、华北3(张家口)、华北2(北京)、华东1(杭州)、华南1(深圳)、中国(香港)、欧洲中部 1(法兰克福)、亚太东南1(新加坡)。

TopicTypes Array of String SLOW

事件的类型,包括SLOW(变慢)和ERROR(出错)。多个事件类型之间使用英文逗号(,)分隔。

BaselineAlertEnabled Boolean true

基线告警开关,基线特有配置,包括true(是)和false(否)。

AlertRecipientType String OWNER

告警接收人类型,OWNER(任务责任人)/ OTHER(指定的人)/ SHIFT_SCHEDULE(值班表)。

AlertRecipient String 123123

告警接收人详情,指定人:工号列表,值班表:值班表名,责任人:空。

RemoveNodeIds String 123,456

需要从基线上提出的节点ID,多个ID间使用,分隔

返回数据

名称 类型 示例值 描述
Success Boolean true

请求是否成功。

ErrorCode String 401

错误码。

ErrorMessage String The specified parameters are invalid.

错误信息。

HttpStatusCode Integer 200

HTTP状态码。

Data Boolean true

基线是否更新成功。

RequestId String 6E07E90B-D9BC-5D6B-896A-82BA41A34AE1

本次调用请求的ID,是由阿里云为该请求生成的唯一标识符,可用于排查和定位问题。

示例

请求示例

http(s)://[Endpoint]/?Action=UpdateBaseline
&BaselineId=1000010800007
&ProjectId=2043
&BaselineName=BaselineName
&Owner=3726346****
&Priority=7
&NodeIds=1,2,3
&OvertimeSettings=[{"Cycle":1,"Time":"00:00"}]
&AlertMarginThreshold=30
&BaselineType=DAILY
&Enabled=true
&AlertEnabled=true
&AlertSettings=[{"AlertType":"BASELINE","AlertMethods":["SMS"],"SilenceStartTime":"00:00:00","SilenceEndTime":"00:00:00","AlertInterval":1800,"AlertMaximum":1,"DingRobots":[{"WebUrl":"https://oapi.dingtalk.com/robot/send?access_token=xxx\t","AtAll":false}],"Webhooks":["https://open.feishu.cn/open-apis/bot/v2/hook/xxx\t"],"TopicTypes":["SLOW"],"BaselineAlertEnabled":true,"AlertRecipientType":"OWNER","AlertRecipient":"123123"}]
&RemoveNodeIds=123,456
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<UpdateBaselineResponse>
    <Success>true</Success>
    <ErrorCode>401</ErrorCode>
    <ErrorMessage>The specified parameters are invalid.</ErrorMessage>
    <HttpStatusCode>200</HttpStatusCode>
    <Data>true</Data>
    <RequestId>6E07E90B-D9BC-5D6B-896A-82BA41A34AE1</RequestId>
</UpdateBaselineResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Success" : true,
  "ErrorCode" : "401",
  "ErrorMessage" : "The specified parameters are invalid.",
  "HttpStatusCode" : 200,
  "Data" : true,
  "RequestId" : "6E07E90B-D9BC-5D6B-896A-82BA41A34AE1"
}

错误码

访问错误中心查看更多错误码。