Bulk operations with assets and models - Amazon IoT SiteWise
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Bulk operations with assets and models

To work with a large number of assets or asset models, use bulk operations to bulk import and export resources to a different location. For example, you can create a data file that defines assets or asset models in an Amazon S3 bucket, and use bulk import to create or update them in Amazon IoT SiteWise. Alternatively, if you have a large number of assets or asset models in Amazon IoT SiteWise, you can export them to Amazon S3.

Note

You perform bulk operations in Amazon IoT SiteWise by calling operations in the Amazon IoT TwinMaker API. You can do this without setting up Amazon IoT TwinMaker or creating an Amazon IoT TwinMaker workspace. All you need is an Amazon S3 bucket where you can place your Amazon IoT SiteWise content.

Key concepts and terminology

Amazon IoT SiteWise bulk import and export features rely on the following concepts and terminology:

  • Import: The action of moving assets or asset models from a file in an Amazon S3 bucket to Amazon IoT SiteWise.

  • Export: The action of moving assets or asset models from Amazon IoT SiteWise to an Amazon S3 bucket.

  • Source: The starting location of where you want to move content from.

    For example, an Amazon S3 bucket is an import source, and Amazon IoT SiteWise is an export source.

  • Destination: The desired location of where you want to move your content to.

    For example, an Amazon S3 bucket is an export destination, and Amazon IoT SiteWise is an import destination.

  • Amazon IoT SiteWise Schema: This schema is used to import and export metadata from Amazon IoT SiteWise.

  • Top-level resource: An Amazon IoT SiteWise resource that you can individually create or update, such as an asset or asset model.

  • Sub-resource: A nested Amazon IoT SiteWise resource within a top-level resource. Examples include properties, hierarchies, and composite models.

  • Metadata: Key information required to import or export resources successfully. Examples of metadata are definitions of assets and asset models.

  • metadataTransferJob: The object created when you run CreateMetadataTransferJob.

Supported functionality

This topic explains what you can do when you run a bulk operation. Bulk operations support the following functionality:

  • Top-level resource creation: When you import an asset or asset model that doesn't define an ID, or whose ID doesn't match that of an existing one, then it will be created as a new resource.

  • Top-level resource replacement: When you import an asset or asset model whose ID matches one that already exists, then it will replace the existing resource.

  • Subresource creation, replacement, or deletion: When your import replaces a top-level resource such as an asset or asset model, then the new definition replaces all sub-resources, such as properties, hierarchies, or composite models.

    For example, if you update an asset model during a bulk import, and the updated version defines a property that wasn't present on the original, then a new property is created. If it defines a property that already exists, then the existing property will be updated. If the updated asset model omits a property that was present on the original, then the property is deleted.

  • No top-level resource deletion: Bulk operations don't delete an asset or asset model. Bulk operations only create or update them.