DescribeAssetModelCommand

Retrieves information about an asset model.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { IoTSiteWiseClient, DescribeAssetModelCommand } from "@aws-sdk/client-iotsitewise"; // ES Modules import
// const { IoTSiteWiseClient, DescribeAssetModelCommand } = require("@aws-sdk/client-iotsitewise"); // CommonJS import
const client = new IoTSiteWiseClient(config);
const input = { // DescribeAssetModelRequest
  assetModelId: "STRING_VALUE", // required
  excludeProperties: true || false,
  assetModelVersion: "STRING_VALUE",
};
const command = new DescribeAssetModelCommand(input);
const response = await client.send(command);
// { // DescribeAssetModelResponse
//   assetModelId: "STRING_VALUE", // required
//   assetModelExternalId: "STRING_VALUE",
//   assetModelArn: "STRING_VALUE", // required
//   assetModelName: "STRING_VALUE", // required
//   assetModelType: "ASSET_MODEL" || "COMPONENT_MODEL",
//   assetModelDescription: "STRING_VALUE", // required
//   assetModelProperties: [ // AssetModelProperties // required
//     { // AssetModelProperty
//       id: "STRING_VALUE",
//       externalId: "STRING_VALUE",
//       name: "STRING_VALUE", // required
//       dataType: "STRING" || "INTEGER" || "DOUBLE" || "BOOLEAN" || "STRUCT", // required
//       dataTypeSpec: "STRING_VALUE",
//       unit: "STRING_VALUE",
//       type: { // PropertyType
//         attribute: { // Attribute
//           defaultValue: "STRING_VALUE",
//         },
//         measurement: { // Measurement
//           processingConfig: { // MeasurementProcessingConfig
//             forwardingConfig: { // ForwardingConfig
//               state: "DISABLED" || "ENABLED", // required
//             },
//           },
//         },
//         transform: { // Transform
//           expression: "STRING_VALUE", // required
//           variables: [ // ExpressionVariables // required
//             { // ExpressionVariable
//               name: "STRING_VALUE", // required
//               value: { // VariableValue
//                 propertyId: "STRING_VALUE",
//                 hierarchyId: "STRING_VALUE",
//                 propertyPath: [ // AssetModelPropertyPath
//                   { // AssetModelPropertyPathSegment
//                     id: "STRING_VALUE",
//                     name: "STRING_VALUE",
//                   },
//                 ],
//               },
//             },
//           ],
//           processingConfig: { // TransformProcessingConfig
//             computeLocation: "EDGE" || "CLOUD", // required
//             forwardingConfig: {
//               state: "DISABLED" || "ENABLED", // required
//             },
//           },
//         },
//         metric: { // Metric
//           expression: "STRING_VALUE", // required
//           variables: [ // required
//             {
//               name: "STRING_VALUE", // required
//               value: {
//                 propertyId: "STRING_VALUE",
//                 hierarchyId: "STRING_VALUE",
//                 propertyPath: [
//                   {
//                     id: "STRING_VALUE",
//                     name: "STRING_VALUE",
//                   },
//                 ],
//               },
//             },
//           ],
//           window: { // MetricWindow
//             tumbling: { // TumblingWindow
//               interval: "STRING_VALUE", // required
//               offset: "STRING_VALUE",
//             },
//           },
//           processingConfig: { // MetricProcessingConfig
//             computeLocation: "EDGE" || "CLOUD", // required
//           },
//         },
//       },
//       path: [
//         {
//           id: "STRING_VALUE",
//           name: "STRING_VALUE",
//         },
//       ],
//     },
//   ],
//   assetModelHierarchies: [ // AssetModelHierarchies // required
//     { // AssetModelHierarchy
//       id: "STRING_VALUE",
//       externalId: "STRING_VALUE",
//       name: "STRING_VALUE", // required
//       childAssetModelId: "STRING_VALUE", // required
//     },
//   ],
//   assetModelCompositeModels: [ // AssetModelCompositeModels
//     { // AssetModelCompositeModel
//       name: "STRING_VALUE", // required
//       description: "STRING_VALUE",
//       type: "STRING_VALUE", // required
//       properties: [
//         {
//           id: "STRING_VALUE",
//           externalId: "STRING_VALUE",
//           name: "STRING_VALUE", // required
//           dataType: "STRING" || "INTEGER" || "DOUBLE" || "BOOLEAN" || "STRUCT", // required
//           dataTypeSpec: "STRING_VALUE",
//           unit: "STRING_VALUE",
//           type: {
//             attribute: {
//               defaultValue: "STRING_VALUE",
//             },
//             measurement: {
//               processingConfig: {
//                 forwardingConfig: {
//                   state: "DISABLED" || "ENABLED", // required
//                 },
//               },
//             },
//             transform: {
//               expression: "STRING_VALUE", // required
//               variables: [ // required
//                 {
//                   name: "STRING_VALUE", // required
//                   value: {
//                     propertyId: "STRING_VALUE",
//                     hierarchyId: "STRING_VALUE",
//                     propertyPath: "<AssetModelPropertyPath>",
//                   },
//                 },
//               ],
//               processingConfig: {
//                 computeLocation: "EDGE" || "CLOUD", // required
//                 forwardingConfig: {
//                   state: "DISABLED" || "ENABLED", // required
//                 },
//               },
//             },
//             metric: {
//               expression: "STRING_VALUE", // required
//               variables: [ // required
//                 {
//                   name: "STRING_VALUE", // required
//                   value: {
//                     propertyId: "STRING_VALUE",
//                     hierarchyId: "STRING_VALUE",
//                     propertyPath: "<AssetModelPropertyPath>",
//                   },
//                 },
//               ],
//               window: {
//                 tumbling: {
//                   interval: "STRING_VALUE", // required
//                   offset: "STRING_VALUE",
//                 },
//               },
//               processingConfig: {
//                 computeLocation: "EDGE" || "CLOUD", // required
//               },
//             },
//           },
//           path: "<AssetModelPropertyPath>",
//         },
//       ],
//       id: "STRING_VALUE",
//       externalId: "STRING_VALUE",
//     },
//   ],
//   assetModelCompositeModelSummaries: [ // AssetModelCompositeModelSummaries
//     { // AssetModelCompositeModelSummary
//       id: "STRING_VALUE", // required
//       externalId: "STRING_VALUE",
//       name: "STRING_VALUE", // required
//       type: "STRING_VALUE", // required
//       description: "STRING_VALUE",
//       path: [ // AssetModelCompositeModelPath
//         { // AssetModelCompositeModelPathSegment
//           id: "STRING_VALUE",
//           name: "STRING_VALUE",
//         },
//       ],
//     },
//   ],
//   assetModelCreationDate: new Date("TIMESTAMP"), // required
//   assetModelLastUpdateDate: new Date("TIMESTAMP"), // required
//   assetModelStatus: { // AssetModelStatus
//     state: "CREATING" || "ACTIVE" || "UPDATING" || "PROPAGATING" || "DELETING" || "FAILED", // required
//     error: { // ErrorDetails
//       code: "VALIDATION_ERROR" || "INTERNAL_FAILURE", // required
//       message: "STRING_VALUE", // required
//       details: [ // DetailedErrors
//         { // DetailedError
//           code: "INCOMPATIBLE_COMPUTE_LOCATION" || "INCOMPATIBLE_FORWARDING_CONFIGURATION", // required
//           message: "STRING_VALUE", // required
//         },
//       ],
//     },
//   },
//   assetModelVersion: "STRING_VALUE",
//   eTag: "STRING_VALUE",
// };

DescribeAssetModelCommand Input

See DescribeAssetModelCommandInput for more details

Parameter
Type
Description
assetModelId
Required
string | undefined

The ID of the asset model. This can be either the actual ID in UUID format, or else externalId: followed by the external ID, if it has one. For more information, see Referencing objects with external IDs  in the IoT SiteWise User Guide.

assetModelVersion
string | undefined

The version alias that specifies the latest or active version of the asset model. The details are returned in the response. The default value is LATEST. See Asset model versions  in the IoT SiteWise User Guide.

excludeProperties
boolean | undefined

Whether or not to exclude asset model properties from the response.

DescribeAssetModelCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
assetModelArn
Required
string | undefined

The ARN  of the asset model, which has the following format.

arn:${Partition}:iotsitewise:${Region}:${Account}:asset-model/${AssetModelId}

assetModelCreationDate
Required
Date | undefined

The date the asset model was created, in Unix epoch time.

assetModelDescription
Required
string | undefined

The asset model's description.

assetModelHierarchies
Required
AssetModelHierarchy[] | undefined

A list of asset model hierarchies that each contain a childAssetModelId and a hierarchyId (named id). A hierarchy specifies allowed parent/child asset relationships for an asset model.

assetModelId
Required
string | undefined

The ID of the asset model, in UUID format.

assetModelLastUpdateDate
Required
Date | undefined

The date the asset model was last updated, in Unix epoch time.

assetModelName
Required
string | undefined

The name of the asset model.

assetModelProperties
Required
AssetModelProperty[] | undefined

The list of asset properties for the asset model.

This object doesn't include properties that you define in composite models. You can find composite model properties in the assetModelCompositeModels object.

assetModelStatus
Required
AssetModelStatus | undefined

The current status of the asset model, which contains a state and any error message.

assetModelCompositeModelSummaries
AssetModelCompositeModelSummary[] | undefined

The list of the immediate child custom composite model summaries for the asset model.

assetModelCompositeModels
AssetModelCompositeModel[] | undefined

The list of built-in composite models for the asset model, such as those with those of type AWS/ALARMS.

assetModelExternalId
string | undefined

The external ID of the asset model, if any.

assetModelType
AssetModelType | undefined

The type of asset model.

  • ASSET_MODEL – (default) An asset model that you can use to create assets. Can't be included as a component in another asset model.

  • COMPONENT_MODEL – A reusable component that you can include in the composite models of other asset models. You can't create assets directly from this type of asset model.

assetModelVersion
string | undefined

The version of the asset model. See Asset model versions  in the IoT SiteWise User Guide.

eTag
string | undefined

The entity tag (ETag) is a hash of the retrieved version of the asset model. It's used to make concurrent updates safely to the resource. See Optimistic locking for asset model writes  in the IoT SiteWise User Guide.

See Optimistic locking for asset model writes  in the IoT SiteWise User Guide.

Throws

Name
Fault
Details
InternalFailureException
server

IoT SiteWise can't process your request right now. Try again later.

InvalidRequestException
client

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again.

ResourceNotFoundException
client

The requested resource can't be found.

ThrottlingException
client

Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on.

For more information, see Quotas  in the IoT SiteWise User Guide.

IoTSiteWiseServiceException
Base exception class for all service exceptions from IoTSiteWise service.