[comment]: # aside: 1

[comment]: # ({3ba1b4af-4e570b8c})
# SLA 对象

以下对象与 `sla` （服务水平协议） API 直接相关。

[comment]: # ({/3ba1b4af-4e570b8c})

[comment]: # ({f86724cb-8451803c})
### SLA

SLA 对象具有以下属性。

|属性|[类型](/manual/api/reference_commentary#data-types)|描述|
|--|--|------|
|slaid|ID|SLA 的 ID。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- *只读*<br>- *更新操作*所必需|
|name|string|SLA 的名称。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- *创建操作*所必需|
|period|integer|SLA 的报告周期。<br><br>可能的值：<br>0 - 每日；<br>1 - 每周；<br>2 - 每月；<br>3 - 每季度；<br>4 - 每年。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- *创建操作*所必需|
|slo|float|以百分比表示的最低可接受服务级别目标（Service Level Objective）。如果服务级别指标（SLI）低于该值，则 SLA 被视为处于问题/未达成状态。<br><br>可能的值：0-100（最多 4 位小数）。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- *创建操作*所必需|
|effective_date|integer|SLA 的生效日期。<br><br>可能的值：UTC 中的日期时间戳。|
|timezone|string|报告时区，例如：`Europe/London`、`UTC`。<br><br>有关支持的时区完整列表，请参见 [PHP documentation](https://www.php.net/manual/en/timezones.php)。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- *创建操作*所必需|
|status|integer|SLA 的状态。<br><br>可能的值：<br>0 - *（默认）* 已禁用的 SLA；<br>1 - 已启用的 SLA。|
|description|string|SLA 的描述。|

[comment]: # ({/f86724cb-8451803c})

[comment]: # ({a1388fd1-632f7fa7})
### SLA 计划

SLA 计划对象定义了关联服务预定处于正常工作状态的时间段。
它具有以下属性。

[comment]: # ({/a1388fd1-632f7fa7})

[comment]: # ({4e05dd64-db954c0c})
|属性|[Type](/manual/api/reference_commentary#data-types)|描述|
|--|--|------|
|period\_from|integer|循环每周时间段的开始时间（包含）。<br><br>可能的值：秒数（从星期日开始计数）。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- *必填*|
|period\_to|integer|循环每周时间段的结束时间（不包含）。<br><br>可能的值：秒数（从星期日开始计数）。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- *必填*|

[comment]: # ({/4e05dd64-db954c0c})

[comment]: # ({79292401-5bbe7eb6})
### SLA 排除停机时间

排除的停机对象定义了计划内停机时间，这些时间不会影响 SLI 的计算，比如正在进行的计划内维护。
它具有如下属性。

[comment]: # ({/79292401-5bbe7eb6})

[comment]: # ({1545530a-fa71231c})
|属性|[Type](/manual/api/reference_commentary#data-types)|描述|
|--|--|------|
|name|string|排除停机时间的名称。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- *必填*|
|period\_from|integer|排除停机时间的开始时间（包含）。<br><br>可能的值：时间戳。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- *必填*|
|period\_to|integer|排除停机时间的结束时间（不包含）。<br><br>可能的值：时间戳。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- *必填*|

[comment]: # ({/1545530a-fa71231c})

[comment]: # ({23d825be-9f9ccbfd})
### SLA 服务标签

SLA 服务标签对象将服务与 SLA 计算关联起来。 它具有如下属性。

[comment]: # ({/23d825be-9f9ccbfd})

[comment]: # ({77e50fa6-e4881380})
|属性|[Type](/manual/api/reference_commentary#data-types)|描述|
|--|--|------|
|tag|string|SLA 服务标签名称。<br><br>[属性行为](/manual/api/reference_commentary#property-behavior)：<br>- *必填*|
|operator|integer|SLA 服务标签[运算符](/manual/it_services/sla#configuration)。<br><br>可能的值：<br>0 - *(默认)* 等于；<br>2 - 包含。|
|value|string|SLA 服务标签值。|

[comment]: # ({/77e50fa6-e4881380})
