

终止支持通知： Amazon 将于 2025 年 12 月 15 日终止对的支持 Amazon IoT Analytics。2025 年 12 月 15 日之后，您将无法再访问 Amazon IoT Analytics 控制台或 Amazon IoT Analytics 资源。有关更多信息，请参阅[Amazon IoT Analytics 终止支持](https://docs.amazonaws.cn/iotanalytics/latest/userguide/iotanalytics-end-of-support.html)。

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 保留多个版本的数据集
<a name="dataset-versions"></a>

您可以通过在调用和时为数据集`retentionPeriod and versioningConfiguration`字段指定值来选择要保留的数据集内容的数量[CreateDataset](https://docs.amazonaws.cn/iotanalytics/latest/APIReference/API_CreateDataset.html)以及[UpdateDataset](https://docs.amazonaws.cn/iotanalytics/latest/APIReference/API_UpdateDataset.html) APIs保留多长时间：

```
...
"retentionPeriod": {
  "unlimited": "boolean",
  "numberOfDays": "integer"
},
"versioningConfiguration": {
  "unlimited": "boolean",
  "maxVersions": "integer"
},
...
```

这两个参数的设置一起使用，以通过以下方式确定保留的数据集内容版本数和保留天数。


|  |  |  |  | 
| --- |--- |--- |--- |
|  |  [See the AWS documentation website for more details](http://docs.amazonaws.cn/iotanalytics/latest/userguide/dataset-versions.html)  |  [See the AWS documentation website for more details](http://docs.amazonaws.cn/iotanalytics/latest/userguide/dataset-versions.html)  |  [See the AWS documentation website for more details](http://docs.amazonaws.cn/iotanalytics/latest/userguide/dataset-versions.html)  | 
|  [See the AWS documentation website for more details](http://docs.amazonaws.cn/iotanalytics/latest/userguide/dataset-versions.html)  | 仅将最新版本以及最新的成功版本（如果不同）保留 90 天。 | 仅无限期保留最新版本以及最新的成功版本（如果不同）。 | 仅将最新版本以及最新的成功版本（如果不同）保留 X 天。 | 
|  [See the AWS documentation website for more details](http://docs.amazonaws.cn/iotanalytics/latest/userguide/dataset-versions.html)  | 将保留过去 90 天的所有版本，而无论具有多少个版本。 | 对保留的版本数没有任何限制。 | 将保留过去 X 天的所有版本，而无论具有多少个版本。 | 
|  [See the AWS documentation website for more details](http://docs.amazonaws.cn/iotanalytics/latest/userguide/dataset-versions.html)  | 将保留过去 90 天内不超过 Y 个版本。 | 将最多保留 Y 个版本，而无论它们存在多长时间。 | 将保留过去 X 天内不超过 Y 个版本。 | 