> 维护 object

以下objects与maintenance API直接相关。

维护

维护object具有以下属性。

属性 数据类型 描述
maintenanceid string (只读) 维护的ID。
name
(required)
string 维护的名称。
active_since
(required)
timestamp 维护生效的时间。

给定值将向下舍入到分钟。
active_till
(required)
timestamp 维护停止生效的时间。

给定值将向下舍入到分钟。
description string 维护的描述。
maintenance_type integer 维护类型。

可能的值:
0 - (默认) 带数据收集;
1 - 不带数据收集。
tags_evaltype integer 问题标签评估方法。

可能的值:
0 - (默认) 与/或;
2 - 或。

请注意,对于某些方法(更新、删除),必需/可选参数的组合是不同的。

时间段

时间段 object 用于定义维护生效的周期,具有以下属性。

属性 数据类型 描述
period integer 维护周期的持续时间(秒)。

给定值将向下取整至分钟。

默认值:3600。
timeperiod_type integer 时间段类型。

可选值:
0 - (默认) 仅一次;
2 - 每日;
3 - 每周;
4 - 每月。
start_date timestamp 维护周期生效的日期。

仅用于一次性周期。

给定值将向下取整至分钟。

默认值:当前日期。
start_time integer 维护开始的每日时间(秒)。

用于每日、每周和每月周期。

给定值将向下取整至分钟。

默认值:0。
every integer 用于每日、每周和每月周期。

对于每日和每周周期,every 定义维护生效的天或周间隔。

默认值:1。

对于每月周期,如果 dayofweek 属性包含至少一个选定的星期几,则 every 属性定义维护生效的月份周数。

可选值:
1 - (默认) 第一周;
2 - 第二周;
3 - 第三周;
4 - 第四周;
5 - 最后一周。
dayofweek integer 维护生效的星期几。

可选位图值:
1 - 周一;
2 - 周二;
4 - 周三;
8 - 周四;
16 - 周五;
32 - 周六;
64 - 周日。

此为位掩码字段;可接受任意可能位图值的组合(例如 21 表示周一、周三和周五)。

用于每周和每月周期。仅每周周期为必填项。

对于每月周期,必须至少指定 dayofweekday 之一。
day integer 维护生效的月份日期。

仅用于每月周期。

对于每月周期,必须至少指定 dayofweekday 之一。
month integer 维护生效的月份。

可选位图值:
1 - 一月;
2 - 二月;
4 - 三月;
8 - 四月;
16 - 五月;
32 - 六月;
64 - 七月;
128 - 八月;
256 - 九月;
512 - 十月;
1024 - 十一月;
2048 - 十二月。

此为位掩码字段;可接受任意可能位图值的组合(例如 585 表示一月、四月、七月和十月)。

仅每月周期为必填项。

问题标签

问题标签object用于定义当维护生效时需要抑制哪些问题。它具有以下属性。

属性 数据类型 描述
tag
(required)
string 问题标签名称。
operator integer 条件运算符。

可选值:
0 - 等于;
2 - (默认) 包含。
value string 问题标签值。

标签仅适用于启用了数据收集的维护周期("maintenance_type":0)。