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
Idawscc.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 or INTERFACE)
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.
enforced_asset_model_interface_relationshipsarraya list of asset model and interface relationships
tagsarrayA list of key-value pairs that contain metadata for the asset model.
regionstringAWS region.

For more information, see AWS::IoTSiteWise::AssetModel.

Methods

NameResourceAccessible byRequired Params
create_resourceasset_modelsINSERTAssetModelName, region
delete_resourceasset_modelsDELETEIdentifier, region
update_resourceasset_modelsUPDATEIdentifier, PatchDocument, region
list_resourcesasset_models_list_onlySELECTregion
get_resourceasset_modelsSELECTIdentifier, region

SELECT examples

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,
enforced_asset_model_interface_relationships,
tags
FROM awscc.iotsitewise.asset_models
WHERE
region = 'us-east-1' AND
Identifier = '{{ asset_model_id }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.iotsitewise.asset_models
SET PatchDocument = string('{{ {
"AssetModelExternalId": asset_model_external_id,
"AssetModelName": asset_model_name,
"AssetModelDescription": asset_model_description,
"EnforcedAssetModelInterfaceRelationships": enforced_asset_model_interface_relationships,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ asset_model_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.iotsitewise.asset_models
WHERE
Identifier = '{{ asset_model_id }}' AND
region = 'us-east-1';

Permissions

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

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