ListAssetPropertiesCommand

Retrieves a paginated list of properties associated with an asset. If you update properties associated with the model before you finish listing all the properties, you need to start all over again.

Example Syntax

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

import { IoTSiteWiseClient, ListAssetPropertiesCommand } from "@aws-sdk/client-iotsitewise"; // ES Modules import
// const { IoTSiteWiseClient, ListAssetPropertiesCommand } = require("@aws-sdk/client-iotsitewise"); // CommonJS import
const client = new IoTSiteWiseClient(config);
const input = { // ListAssetPropertiesRequest
  assetId: "STRING_VALUE", // required
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
  filter: "ALL" || "BASE",
};
const command = new ListAssetPropertiesCommand(input);
const response = await client.send(command);
// { // ListAssetPropertiesResponse
//   assetPropertySummaries: [ // AssetPropertySummaries // required
//     { // AssetPropertySummary
//       id: "STRING_VALUE", // required
//       alias: "STRING_VALUE",
//       unit: "STRING_VALUE",
//       notification: { // PropertyNotification
//         topic: "STRING_VALUE", // required
//         state: "ENABLED" || "DISABLED", // required
//       },
//       assetCompositeModelId: "STRING_VALUE",
//       path: [ // AssetPropertyPath
//         { // AssetPropertyPathSegment
//           id: "STRING_VALUE",
//           name: "STRING_VALUE",
//         },
//       ],
//       externalId: "STRING_VALUE",
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListAssetPropertiesCommand Input

See ListAssetPropertiesCommandInput for more details

Parameter
Type
Description
assetId
Required
string | undefined

The ID of the asset. 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.

filter
ListAssetPropertiesFilter | undefined

Filters the requested list of asset properties. You can choose one of the following options:

  • ALL – The list includes all asset properties for a given asset model ID.

  • BASE – The list includes only base asset properties for a given asset model ID.

Default: BASE

maxResults
number | undefined

The maximum number of results to return for each paginated request. If not specified, the default value is 50.

nextToken
string | undefined

The token to be used for the next set of paginated results.

ListAssetPropertiesCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
assetPropertySummaries
Required
AssetPropertySummary[] | undefined

A list that summarizes the properties associated with the specified asset.

nextToken
string | undefined

The token for the next set of results, or null if there are no additional results.

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.