Skip to main content

asset_models

Creates, updates, deletes or gets an asset_model resource or lists asset_models in a region

Overview

Nameasset_models
TypeResource
DescriptionResource schema for AWS::IoTSiteWise::AssetModel
Idaws.iotsitewise.asset_models

Fields

NameDatatypeDescription
asset_model_idstringThe ID of the asset model.
asset_model_typestringThe type of the asset model (ASSET_MODEL OR COMPONENT_MODEL)
asset_model_external_idstringThe external ID of the asset model.
asset_model_arnstringThe ARN of the asset model, which has the following format.
asset_model_namestringA unique, friendly name for the asset model.
asset_model_descriptionstringA description for the asset model.
asset_model_propertiesarrayThe property definitions of the asset model. You can specify up to 200 properties per asset model.
asset_model_composite_modelsarrayThe composite asset models that are part of this asset model. Composite asset models are asset models that contain specific properties.
asset_model_hierarchiesarrayThe hierarchy definitions of the asset model. Each hierarchy specifies an asset model whose assets can be children of any other assets created from this asset model. You can specify up to 10 hierarchies per asset model.
tagsarrayA list of key-value pairs that contain metadata for the asset model.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTAssetModelName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all asset_models in a region.

SELECT
region,
asset_model_id,
asset_model_type,
asset_model_external_id,
asset_model_arn,
asset_model_name,
asset_model_description,
asset_model_properties,
asset_model_composite_models,
asset_model_hierarchies,
tags
FROM aws.iotsitewise.asset_models
WHERE region = 'us-east-1';

Gets all properties from an individual asset_model.

SELECT
region,
asset_model_id,
asset_model_type,
asset_model_external_id,
asset_model_arn,
asset_model_name,
asset_model_description,
asset_model_properties,
asset_model_composite_models,
asset_model_hierarchies,
tags
FROM aws.iotsitewise.asset_models
WHERE region = 'us-east-1' AND data__Identifier = '<AssetModelId>';

INSERT example

Use the following StackQL query and manifest file to create a new asset_model resource, using stack-deploy.

/*+ create */
INSERT INTO aws.iotsitewise.asset_models (
AssetModelName,
region
)
SELECT
'{{ AssetModelName }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.iotsitewise.asset_models
WHERE data__Identifier = '<AssetModelId>'
AND region = 'us-east-1';

Permissions

To operate on the asset_models resource, the following permissions are required:

Create

iotsitewise:CreateAssetModel,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource,
iotsitewise:DescribeAssetModel,
iotsitewise:UpdateAssetModel,
iotsitewise:ListAssetModelProperties,
iotsitewise:ListAssetModelCompositeModels,
iotsitewise:UpdateAssetModelCompositeModel,
iotsitewise:DescribeAssetModelCompositeModel,
iotsitewise:CreateAssetModelCompositeModel

Read

iotsitewise:DescribeAssetModel,
iotsitewise:ListAssetModelProperties,
iotsitewise:DescribeAssetModelCompositeModel,
iotsitewise:ListAssetModelCompositeModels,
iotsitewise:ListTagsForResource

Update

iotsitewise:DescribeAssetModel,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource,
iotsitewise:UntagResource,
iotsitewise:ListAssetModelProperties,
iotsitewise:ListAssetModelCompositeModels,
iotsitewise:CreateAssetModelCompositeModel,
iotsitewise:UpdateAssetModelCompositeModel,
iotsitewise:DeleteAssetModelCompositeModel,
iotsitewise:DescribeAssetModelCompositeModel,
iotsitewise:UpdateAssetModel

Delete

iotsitewise:DescribeAssetModel,
iotsitewise:DeleteAssetModel,
iotsitewise:ListAssetModelProperties,
iotsitewise:ListAssetModelCompositeModels

List

iotsitewise:DescribeAssetModel,
iotsitewise:ListAssetModels,
iotsitewise:ListTagsForResource,
iotsitewise:ListAssetModelProperties,
iotsitewise:ListAssetModelCompositeModels