[comment]: # translation:outdated

[comment]: # aside: 1

[comment]: # ({66e4c1be-c9539601})
# 维护期对象

如下对象与`维护期`API关联。

[comment]: # ({/66e4c1be-c9539601})

[comment]: # ({e31fd204-6c1a70bc})
### 维护

维护对象具有以下属性。

|属性|[类型](/manual/api/reference_commentary#data-types)|说明|
|--|--|------|
|maintenanceid|ID|维护的 ID。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- *只读*<br>- *更新操作*时必填|
|name|string|维护名称。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- *创建操作*时必填|
|active\_since|timestamp|维护开始生效的时间（含）。<br><br>给定的值将向下舍入到分钟。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- *创建操作*时必填|
|active\_till|timestamp|维护停止生效的时间（不含）。<br><br>给定的值将向下舍入到分钟。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- *创建操作*时必填|
|description|string|维护说明。|
|maintenance\_type|integer|维护类型。<br><br>可能的值：<br>0 - *(默认)* 收集数据；<br>1 - 不收集数据。|
|tags\_evaltype|integer|问题标签[计算方法](/manual/maintenance#configuration)。<br><br>可能的值：<br>0 - *(默认)* And/Or；<br>2 - Or。|

[comment]: # ({/e31fd204-6c1a70bc})

[comment]: # ({b0bb932e-506f52aa})
### 时间段

时间段对象用于定义维护生效的时间段。
它具有以下属性。

|属性|[类型](/manual/api/reference_commentary#data-types)|描述|
|--|--|------|
|period|integer|维护时间段的持续时间，单位为秒。<br><br>给定值将向下取整到分钟。<br><br>可能的取值范围：300 - 86399940。<br><br>默认值：3600。|
|timeperiod\_type|integer|时间段类型。<br><br>可能的值：<br>0 - *(默认)* 仅一次；<br>2 - 每日；<br>3 - 每周；<br>4 - 每月。|
|start\_date|timestamp|维护时间段生效的日期。<br>给定值将向下取整到分钟。<br><br>默认值：当前日期。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- 当 `timeperiod_type` 设置为“仅一次”时，*支持*|
|start\_time|integer|维护开始的每日时间，单位为秒。<br>给定值将向下取整到分钟。<br><br>默认值：0。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- 当 `timeperiod_type` 设置为“每日”、“每周”或“每月”时，*支持*|
|every|integer|对于每日和每周时间段，`every` 定义维护生效的天或周间隔。<br>当 `timeperiod_type` 设置为“每日”或“每周”时，默认值：1。<br><br>对于设置了 `day` 的每月时间段，`every` 属性定义维护生效的每月第几天。<br>当 `timeperiod_type` 设置为“每月”且设置了 `day` 时，默认值：1。<br><br>对于设置了 `dayofweek` 的每月时间段，`every` 属性定义维护生效的每月第几周。<br>当 `timeperiod_type` 设置为“每月”且设置了 `dayofweek` 时，可能的值：<br>1 - *(默认)* 第一周；<br>2 - 第二周；<br>3 - 第三周；<br>4 - 第四周；<br>5 - 最后一周。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- 当 `timeperiod_type` 设置为“每日”、“每周”或“每月”时，*支持*|
|dayofweek|integer|维护生效的星期几。<br><br>可能的位图值：<br>1 - 星期一；<br>2 - 星期二；<br>4 - 星期三；<br>8 - 星期四；<br>16 - 星期五；<br>32 - 星期六；<br>64 - 星期日。<br><br>这是一个位掩码字段；可接受任意可能位图值之和（例如，21 表示星期一、星期三和星期五）。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- 当 `timeperiod_type` 设置为“每周”时，或当 `timeperiod_type` 设置为“每月”且未设置 `day` 时，*必需*|
|day|integer|维护生效的每月日期。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- 当 `timeperiod_type` 设置为“每月”且未设置 `dayofweek` 时，*必需*|
|month|integer|维护生效的月份。<br><br>可能的位图值：<br>1 - 一月；<br>2 - 二月；<br>4 - 三月；<br>8 - 四月；<br>16 - 五月；<br>32 - 六月；<br>64 - 七月；<br>128 - 八月；<br>256 - 九月；<br>512 - 十月；<br>1024 - 十一月；<br>2048 - 十二月。<br><br>这是一个位掩码字段；可接受任意可能位图值之和（例如，585 表示一月、四月、七月和十月）。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- 当 `timeperiod_type` 设置为“每月”时，*必需*|

[comment]: # ({/b0bb932e-506f52aa})

[comment]: # ({da08e754-2913a3ae})
### 故障标签

故障标签对象用于定义当维护生效时，哪些故障必须被抑制。  
只有当 [维护对象](#maintenance) 的 `maintenance_type` 设置为“采集数据”时，才能指定标签。  
它具有以下属性。

|属性|[类型](/manual/api/reference_commentary#data-types)|描述|
|--|--|------|
|tag|string|故障标签名称。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior):<br>- *必填*|
|operator|integer|条件[运算符](/manual/maintenance#configuration)。<br><br>可能的值：<br>0 - 等于；<br>2 - *(默认)* 包含。|
|value|string|故障标签值。|

[comment]: # ({/da08e754-2913a3ae})
