

# Resources synced from Amazon IoT SiteWise
<a name="tm-sw-asset-sync-map"></a>

This topic lists which assets you can sync from Amazon IoT SiteWise to your Amazon IoT TwinMaker workspace.

**Important**  
See [Differences between custom and default workspaces](tm-sw-default-ws-diffs.md) for information about the differences between the custom and default workspaces.

## Custom and default workspaces
<a name="tm-sw-asset-sync-both"></a>

The following resources are synced and available in **both** custom and default workspaces:

**Asset Models**  
Amazon IoT TwinMaker creates a new component type for each asset model in Amazon IoT SiteWise.  
+ The component `TypeId` for the asset model will use one of the following patterns: 
  + **Custom workspace - ** `iotsitewise.assetmodel:{{assetModelId}}` 
  + **Default workspace -** `{{assetModelId}}`
+ Each property in the asset model is a new property in the component type, with one of the following naming patterns:
  + **Custom workspace - ** `Property_{{propertyId}}`
  + **Default workspace - ** `{{propertyId}}`

  The property name in Amazon IoT SiteWise is stored as the `displayName` in the property definition.
+ Each hierarchy in the asset model is a new property of type `LIST` and the `nestedType` is `RELATIONSHIP` in the component type. The hierarchy is mapped to the property with a name prefixed by one of the following: 
  + **Custom workspace - ** `{{Hierarchy_hierarchyId}}`
  + **Default workspace - ** `{{hierarchyId}}`

**Asset**  
Amazon IoT TwinMaker creates a new entity for each asset in Amazon IoT SiteWise.  
+ The `entityId` is the same as the `assetId` in Amazon IoT SiteWise.
+ These entities have a single component called `sitewiseBase`, which has the component type corresponding to the asset model for this asset.
+ Any asset level overrides, such as setting property alias or unit of measure, are reflected in the entity in Amazon IoT TwinMaker.

## Default workspace only
<a name="tm-sw-asset-sync-default"></a>

The following assets are synced and **available in the default workspace only**, `IoTSiteWiseDefaultWorkspace`.

**AssetModelComponents**  
Amazon IoT TwinMaker creates a new component type for each `AssetModelComponents` in Amazon IoT SiteWise.  
+ The component `TypeId` for the asset model uses the following pattern: `assetModelId`.
+ Each property in the asset model is a new property in the component type, with the property name as `propertyId`. The property name in Amazon IoT SiteWise is stored as the `displayName` in the property definition.
+ Each hierarchy in the asset model is a new property of type `LIST` and the `nestedType` is `RELATIONSHIP` in the component type. The hierarchy is mapped to the property with a name prefixed by `hierarchyId`.

**AssetModelCompositeModel**  
Amazon IoT TwinMaker creates a new component type for each `AssetModelCompositeModel` in Amazon IoT SiteWise.  
+ The component `TypeId` for the asset model uses the following pattern: `assetModelId_assetModelCompositeModelId`.
+ Each property in the asset model is a new property in the component type, with the property name as `propertyId`. The property name in Amazon IoT SiteWise is stored as the `displayName` in the property definition.

**AssetCompositeModels**  
Amazon IoT TwinMaker creates a new composite component for each `AssetCompositeModel` in Amazon IoT SiteWise.  
+ The `componentName` is the same as the `assetModelCompositeModelId` in Amazon IoT SiteWise.

## Resources not synced
<a name="tm-sw-asset-no-sync"></a>

The following resources are not synced:

**Non-synced assets and asset models**  
+ Alarm models will be synced as compositeModels, but corresponding data in the asset related to alarms are not synced.
+ [Amazon IoT SiteWise data streams](https://docs.amazonaws.cn//iot-sitewise/latest/userguide/manage-data-streams.html) are not synced. Only properties modeled in the asset model are synced.
+ Property values for attributes, measurements, transforms, aggregates, and metadata calculation such as formula and window are not synced. Only the metadata about the properties, such as alias, unit of measure, and data type are synced. The values can be queried using the regular Amazon IoT TwinMaker data connector API, [ GetPropertyValueHistory](https://docs.amazonaws.cn//iot-twinmaker/latest/apireference/API_GetPropertyValueHistory.html).

## Use synced entities and component types in Amazon IoT TwinMaker
<a name="tm-sw-asset-sync-component-types"></a>

Once assets are synced from Amazon IoT SiteWise, the synced component types are read only in Amazon IoT TwinMaker. Any update or delete action must be done in Amazon IoT SiteWise, and those changes are synced to Amazon IoT TwinMaker if the syncJob is still active.

The synced entities and the Amazon IoT SiteWise base component are also read only in Amazon IoT TwinMaker. You can add additional non-synced components to the synced entity, as long as no entity-level attributes such as the description or `entityName` are updated.

Some restrictions apply to how you can interact with synced entities. You can't create child entities under a synced entity in the synced entity's hierarchy. Additionally, you can't create non-synced component types that extend from a synced component type.

**Note**  
Additional components are deleted along with the entity if the asset is deleted in Amazon IoT SiteWise or if you delete the sync job.

You can use these synced entities in Grafana dashboards and add them as tags in the scene composer like regular entities. You can also issue knowledge graph queries for these synced entities.

**Note**  
Synced entities without modification are not charged, but you are charged for those entities if changes have been made in Amazon IoT TwinMaker. For example, if you add a non-synced component to a synced entity, that entity is now charged in Amazon IoT TwinMaker. For more information, see [Amazon IoT TwinMaker Pricing](https://www.amazonaws.cn//iot-twinmaker/pricing/).