导出元数据示例 - AWS IoT SiteWise

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

导出元数据示例

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

您可以在请求正iotSiteWiseConfiguration文部分的某个sources部分中指定过滤器。

注意

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

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

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

按资产模型筛选

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

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

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 }