View a markdown version of this page

导出元数据示例 - Amazon IoT SiteWise
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

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

导出元数据示例

将Amazon IoT SiteWise内容批量导出到 Amazon S3 时,您可以指定筛选条件来限制要导出的特定资产模型和资产。

您在请求正文 sources 部分内的 iotSiteWiseConfiguration 部分中指定筛选条件。

注意

您可以包含多个筛选条件。批量操作将导出与任何筛选条件匹配的任何资产模型或资产。

如果您未提供任何筛选条件,则该操作将导出所有资产模型和资产。

{ "metadataTransferJobId": "your-transfer-job-id", "sources": [{ "type": "iotsitewise", "iotSiteWiseConfiguration": { "filters": [{ list of filters }] } }], "destination": { "type": "s3", "s3Configuration": { "location": "arn:aws:s3:::amzn-s3-demo-bucket" } } }

按资产模型筛选

您可以筛选特定的资产模型。您还可以使用该模型的所有资产或其层次结构中的所有资产模型。不能同时包含资产和层次结构。

有关层次结构的更多信息,请参阅定义资产模型层次结构

Asset model

此筛选条件包括指定的资产模型:

"filterByAssetModel": { "assetModelId": "asset model ID" }
Asset model and its assets

此筛选条件包括指定的资产模型,以及使用该资产模型的所有资产:

"filterByAssetModel": { "assetModelId": "asset model ID", "includeAssets": true }
Asset model and its hierarchy

此筛选条件包括指定的资产模型,以及其层次结构中的所有关联资产模型:

"filterByAssetModel": { "assetModelId": "asset model ID", "includeOffspring": true }

按资产筛选

您可以筛选特定的资产。您还可以包含其资产模型或其层次结构中的所有关联资产。不能同时包含资产模型和层次结构。

有关层次结构的更多信息,请参阅定义资产模型层次结构

Asset

此筛选条件包括指定的资产:

"filterByAsset": { "assetId": "asset ID" }
Asset and its asset model

此筛选条件包括指定的资产,以及其使用的资产模型:

"filterByAsset": { "assetId": "asset ID", "includeAssetModel": true }
Asset and its hierarchy

此筛选条件包括指定的资产,以及其层次结构中的所有关联资产:

"filterByAsset": { "assetId": "asset ID", "includeOffspring": true }