Skip to content

Commit

Permalink
feat(client-iotsitewise): AWS IoT SiteWise now supports versioning fo…
Browse files Browse the repository at this point in the history
…r asset models. It enables users to retrieve active version of their asset model and perform asset model writes with optimistic lock.
  • Loading branch information
awstools committed Aug 26, 2024
1 parent 206a25b commit ebc9981
Show file tree
Hide file tree
Showing 17 changed files with 1,041 additions and 463 deletions.
22 changes: 11 additions & 11 deletions clients/client-iotsitewise/src/commands/CreateAssetModelCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,14 @@ export interface CreateAssetModelCommandOutput extends CreateAssetModelResponse,
* const client = new IoTSiteWiseClient(config);
* const input = { // CreateAssetModelRequest
* assetModelName: "STRING_VALUE", // required
* assetModelType: "ASSET_MODEL" || "COMPONENT_MODEL",
* assetModelId: "STRING_VALUE",
* assetModelExternalId: "STRING_VALUE",
* assetModelDescription: "STRING_VALUE",
* assetModelProperties: [ // AssetModelPropertyDefinitions
* { // AssetModelPropertyDefinition
* id: "STRING_VALUE",
* externalId: "STRING_VALUE",
* name: "STRING_VALUE", // required
* dataType: "STRING" || "INTEGER" || "DOUBLE" || "BOOLEAN" || "STRUCT", // required
* dataTypeSpec: "STRING_VALUE",
Expand Down Expand Up @@ -127,25 +132,27 @@ export interface CreateAssetModelCommandOutput extends CreateAssetModelResponse,
* },
* },
* },
* id: "STRING_VALUE",
* externalId: "STRING_VALUE",
* },
* ],
* assetModelHierarchies: [ // AssetModelHierarchyDefinitions
* { // AssetModelHierarchyDefinition
* name: "STRING_VALUE", // required
* childAssetModelId: "STRING_VALUE", // required
* id: "STRING_VALUE",
* externalId: "STRING_VALUE",
* name: "STRING_VALUE", // required
* childAssetModelId: "STRING_VALUE", // required
* },
* ],
* assetModelCompositeModels: [ // AssetModelCompositeModelDefinitions
* { // AssetModelCompositeModelDefinition
* id: "STRING_VALUE",
* externalId: "STRING_VALUE",
* 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",
Expand Down Expand Up @@ -213,21 +220,14 @@ export interface CreateAssetModelCommandOutput extends CreateAssetModelResponse,
* },
* },
* },
* id: "STRING_VALUE",
* externalId: "STRING_VALUE",
* },
* ],
* id: "STRING_VALUE",
* externalId: "STRING_VALUE",
* },
* ],
* clientToken: "STRING_VALUE",
* tags: { // TagMap
* "<keys>": "STRING_VALUE",
* },
* assetModelId: "STRING_VALUE",
* assetModelExternalId: "STRING_VALUE",
* assetModelType: "ASSET_MODEL" || "COMPONENT_MODEL",
* };
* const command = new CreateAssetModelCommand(input);
* const response = await client.send(command);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export interface CreateAssetModelCompositeModelCommandOutput
* const client = new IoTSiteWiseClient(config);
* const input = { // CreateAssetModelCompositeModelRequest
* assetModelId: "STRING_VALUE", // required
* parentAssetModelCompositeModelId: "STRING_VALUE",
* assetModelCompositeModelExternalId: "STRING_VALUE",
* parentAssetModelCompositeModelId: "STRING_VALUE",
* assetModelCompositeModelId: "STRING_VALUE",
* assetModelCompositeModelDescription: "STRING_VALUE",
* assetModelCompositeModelName: "STRING_VALUE", // required
Expand All @@ -68,6 +68,8 @@ export interface CreateAssetModelCompositeModelCommandOutput
* composedAssetModelId: "STRING_VALUE",
* assetModelCompositeModelProperties: [ // AssetModelPropertyDefinitions
* { // AssetModelPropertyDefinition
* id: "STRING_VALUE",
* externalId: "STRING_VALUE",
* name: "STRING_VALUE", // required
* dataType: "STRING" || "INTEGER" || "DOUBLE" || "BOOLEAN" || "STRUCT", // required
* dataTypeSpec: "STRING_VALUE",
Expand Down Expand Up @@ -135,10 +137,11 @@ export interface CreateAssetModelCompositeModelCommandOutput
* },
* },
* },
* id: "STRING_VALUE",
* externalId: "STRING_VALUE",
* },
* ],
* ifMatch: "STRING_VALUE",
* ifNoneMatch: "STRING_VALUE",
* matchForVersionType: "LATEST" || "ACTIVE",
* };
* const command = new CreateAssetModelCompositeModelCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -190,6 +193,9 @@ export interface CreateAssetModelCompositeModelCommandOutput
* allowed number of properties for an asset model.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html">Quotas</a> in the <i>IoT SiteWise User Guide</i>.</p>
*
* @throws {@link PreconditionFailedException} (client fault)
* <p>The precondition in one or more of the request-header fields evaluated to <code>FALSE</code>.</p>
*
* @throws {@link ResourceAlreadyExistsException} (client fault)
* <p>The resource already exists.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ export interface DeleteAssetModelCommandOutput extends DeleteAssetModelResponse,
* const input = { // DeleteAssetModelRequest
* assetModelId: "STRING_VALUE", // required
* clientToken: "STRING_VALUE",
* ifMatch: "STRING_VALUE",
* ifNoneMatch: "STRING_VALUE",
* matchForVersionType: "LATEST" || "ACTIVE",
* };
* const command = new DeleteAssetModelCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -80,6 +83,9 @@ export interface DeleteAssetModelCommandOutput extends DeleteAssetModelResponse,
* <p>The request isn't valid. This can occur if your request contains malformed JSON or
* unsupported characters. Check your request and try again.</p>
*
* @throws {@link PreconditionFailedException} (client fault)
* <p>The precondition in one or more of the request-header fields evaluated to <code>FALSE</code>.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The requested resource can't be found.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ export interface DeleteAssetModelCompositeModelCommandOutput
* assetModelId: "STRING_VALUE", // required
* assetModelCompositeModelId: "STRING_VALUE", // required
* clientToken: "STRING_VALUE",
* ifMatch: "STRING_VALUE",
* ifNoneMatch: "STRING_VALUE",
* matchForVersionType: "LATEST" || "ACTIVE",
* };
* const command = new DeleteAssetModelCompositeModelCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -86,6 +89,9 @@ export interface DeleteAssetModelCompositeModelCommandOutput
* <p>The request isn't valid. This can occur if your request contains malformed JSON or
* unsupported characters. Check your request and try again.</p>
*
* @throws {@link PreconditionFailedException} (client fault)
* <p>The precondition in one or more of the request-header fields evaluated to <code>FALSE</code>.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The requested resource can't be found.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,21 @@ export interface DescribeAssetModelCommandOutput extends DescribeAssetModelRespo
* 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",
Expand Down Expand Up @@ -122,15 +126,14 @@ export interface DescribeAssetModelCommandOutput extends DescribeAssetModelRespo
* // name: "STRING_VALUE",
* // },
* // ],
* // externalId: "STRING_VALUE",
* // },
* // ],
* // assetModelHierarchies: [ // AssetModelHierarchies // required
* // { // AssetModelHierarchy
* // id: "STRING_VALUE",
* // externalId: "STRING_VALUE",
* // name: "STRING_VALUE", // required
* // childAssetModelId: "STRING_VALUE", // required
* // externalId: "STRING_VALUE",
* // },
* // ],
* // assetModelCompositeModels: [ // AssetModelCompositeModels
Expand All @@ -141,6 +144,7 @@ export interface DescribeAssetModelCommandOutput extends DescribeAssetModelRespo
* // properties: [
* // {
* // id: "STRING_VALUE",
* // externalId: "STRING_VALUE",
* // name: "STRING_VALUE", // required
* // dataType: "STRING" || "INTEGER" || "DOUBLE" || "BOOLEAN" || "STRUCT", // required
* // dataTypeSpec: "STRING_VALUE",
Expand Down Expand Up @@ -199,29 +203,12 @@ export interface DescribeAssetModelCommandOutput extends DescribeAssetModelRespo
* // },
* // },
* // path: "<AssetModelPropertyPath>",
* // externalId: "STRING_VALUE",
* // },
* // ],
* // id: "STRING_VALUE",
* // externalId: "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
* // },
* // ],
* // },
* // },
* // assetModelType: "ASSET_MODEL" || "COMPONENT_MODEL",
* // assetModelCompositeModelSummaries: [ // AssetModelCompositeModelSummaries
* // { // AssetModelCompositeModelSummary
* // id: "STRING_VALUE", // required
Expand All @@ -237,7 +224,23 @@ export interface DescribeAssetModelCommandOutput extends DescribeAssetModelRespo
* // ],
* // },
* // ],
* // assetModelExternalId: "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",
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export interface DescribeAssetModelCompositeModelCommandOutput
* const input = { // DescribeAssetModelCompositeModelRequest
* assetModelId: "STRING_VALUE", // required
* assetModelCompositeModelId: "STRING_VALUE", // required
* assetModelVersion: "STRING_VALUE",
* };
* const command = new DescribeAssetModelCompositeModelCommand(input);
* const response = await client.send(command);
Expand All @@ -64,6 +65,7 @@ export interface DescribeAssetModelCompositeModelCommandOutput
* // assetModelCompositeModelProperties: [ // AssetModelProperties // required
* // { // AssetModelProperty
* // id: "STRING_VALUE",
* // externalId: "STRING_VALUE",
* // name: "STRING_VALUE", // required
* // dataType: "STRING" || "INTEGER" || "DOUBLE" || "BOOLEAN" || "STRUCT", // required
* // dataTypeSpec: "STRING_VALUE",
Expand Down Expand Up @@ -137,7 +139,6 @@ export interface DescribeAssetModelCompositeModelCommandOutput
* // name: "STRING_VALUE",
* // },
* // ],
* // externalId: "STRING_VALUE",
* // },
* // ],
* // compositionDetails: { // CompositionDetails
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export interface ListAssetModelCompositeModelsCommandOutput
* assetModelId: "STRING_VALUE", // required
* nextToken: "STRING_VALUE",
* maxResults: Number("int"),
* assetModelVersion: "STRING_VALUE",
* };
* const command = new ListAssetModelCompositeModelsCommand(input);
* const response = await client.send(command);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ export interface ListAssetModelPropertiesCommandOutput extends ListAssetModelPro
* nextToken: "STRING_VALUE",
* maxResults: Number("int"),
* filter: "ALL" || "BASE",
* assetModelVersion: "STRING_VALUE",
* };
* const command = new ListAssetModelPropertiesCommand(input);
* const response = await client.send(command);
* // { // ListAssetModelPropertiesResponse
* // assetModelPropertySummaries: [ // AssetModelPropertySummaries // required
* // { // AssetModelPropertySummary
* // id: "STRING_VALUE",
* // externalId: "STRING_VALUE",
* // name: "STRING_VALUE", // required
* // dataType: "STRING" || "INTEGER" || "DOUBLE" || "BOOLEAN" || "STRUCT", // required
* // dataTypeSpec: "STRING_VALUE",
Expand Down Expand Up @@ -123,7 +125,6 @@ export interface ListAssetModelPropertiesCommandOutput extends ListAssetModelPro
* // name: "STRING_VALUE",
* // },
* // ],
* // externalId: "STRING_VALUE",
* // },
* // ],
* // nextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,23 @@ export interface ListAssetModelsCommandOutput extends ListAssetModelsResponse, _
* // const { IoTSiteWiseClient, ListAssetModelsCommand } = require("@aws-sdk/client-iotsitewise"); // CommonJS import
* const client = new IoTSiteWiseClient(config);
* const input = { // ListAssetModelsRequest
* nextToken: "STRING_VALUE",
* maxResults: Number("int"),
* assetModelTypes: [ // ListAssetModelsTypeFilter
* "ASSET_MODEL" || "COMPONENT_MODEL",
* ],
* nextToken: "STRING_VALUE",
* maxResults: Number("int"),
* assetModelVersion: "STRING_VALUE",
* };
* const command = new ListAssetModelsCommand(input);
* const response = await client.send(command);
* // { // ListAssetModelsResponse
* // assetModelSummaries: [ // AssetModelSummaries // required
* // { // AssetModelSummary
* // id: "STRING_VALUE", // required
* // externalId: "STRING_VALUE",
* // arn: "STRING_VALUE", // required
* // name: "STRING_VALUE", // required
* // assetModelType: "ASSET_MODEL" || "COMPONENT_MODEL",
* // description: "STRING_VALUE", // required
* // creationDate: new Date("TIMESTAMP"), // required
* // lastUpdateDate: new Date("TIMESTAMP"), // required
Expand All @@ -66,8 +69,7 @@ export interface ListAssetModelsCommandOutput extends ListAssetModelsResponse, _
* // ],
* // },
* // },
* // assetModelType: "ASSET_MODEL" || "COMPONENT_MODEL",
* // externalId: "STRING_VALUE",
* // version: "STRING_VALUE",
* // },
* // ],
* // nextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ export interface ListAssociatedAssetsCommandOutput extends ListAssociatedAssetsR
* <p>You can use this operation to do the following:</p>
* <ul>
* <li>
* <p>List child assets associated to a parent asset by a hierarchy that you specify.</p>
* <p>
* <code>CHILD</code> - List all child assets associated to the asset.</p>
* </li>
* <li>
* <p>List an asset's parent asset.</p>
* <p>
* <code>PARENT</code> - List the asset's parent asset.</p>
* </li>
* </ul>
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { IoTSiteWiseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTSiteWiseClient";
import { ListTimeSeriesRequest } from "../models/models_0";
import { ListTimeSeriesResponse } from "../models/models_1";
import { ListTimeSeriesRequest, ListTimeSeriesResponse } from "../models/models_1";
import { de_ListTimeSeriesCommand, se_ListTimeSeriesCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
Loading

0 comments on commit ebc9981

Please sign in to comment.