From ebc9981fc23253adbd350039f8e0d5012fa73732 Mon Sep 17 00:00:00 2001 From: awstools Date: Mon, 26 Aug 2024 18:17:07 +0000 Subject: [PATCH] feat(client-iotsitewise): AWS IoT SiteWise now supports versioning for asset models. It enables users to retrieve active version of their asset model and perform asset model writes with optimistic lock. --- .../src/commands/CreateAssetModelCommand.ts | 22 +- .../CreateAssetModelCompositeModelCommand.ts | 12 +- .../src/commands/DeleteAssetModelCommand.ts | 6 + .../DeleteAssetModelCompositeModelCommand.ts | 6 + .../src/commands/DescribeAssetModelCommand.ts | 43 +- ...DescribeAssetModelCompositeModelCommand.ts | 3 +- .../ListAssetModelCompositeModelsCommand.ts | 1 + .../ListAssetModelPropertiesCommand.ts | 3 +- .../src/commands/ListAssetModelsCommand.ts | 10 +- .../commands/ListAssociatedAssetsCommand.ts | 6 +- .../src/commands/ListTimeSeriesCommand.ts | 3 +- .../src/commands/UpdateAssetModelCommand.ts | 14 +- .../UpdateAssetModelCompositeModelCommand.ts | 8 +- .../client-iotsitewise/src/models/models_0.ts | 642 ++++++++++-------- .../client-iotsitewise/src/models/models_1.ts | 173 ++++- .../src/protocols/Aws_restJson1.ts | 85 ++- .../sdk-codegen/aws-models/iotsitewise.json | 467 ++++++++++--- 17 files changed, 1041 insertions(+), 463 deletions(-) diff --git a/clients/client-iotsitewise/src/commands/CreateAssetModelCommand.ts b/clients/client-iotsitewise/src/commands/CreateAssetModelCommand.ts index 59eaf3f923f1..bb0ff407e527 100644 --- a/clients/client-iotsitewise/src/commands/CreateAssetModelCommand.ts +++ b/clients/client-iotsitewise/src/commands/CreateAssetModelCommand.ts @@ -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", @@ -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", @@ -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 * "": "STRING_VALUE", * }, - * assetModelId: "STRING_VALUE", - * assetModelExternalId: "STRING_VALUE", - * assetModelType: "ASSET_MODEL" || "COMPONENT_MODEL", * }; * const command = new CreateAssetModelCommand(input); * const response = await client.send(command); diff --git a/clients/client-iotsitewise/src/commands/CreateAssetModelCompositeModelCommand.ts b/clients/client-iotsitewise/src/commands/CreateAssetModelCompositeModelCommand.ts index 472992fcd1b3..a47faad4a3cb 100644 --- a/clients/client-iotsitewise/src/commands/CreateAssetModelCompositeModelCommand.ts +++ b/clients/client-iotsitewise/src/commands/CreateAssetModelCompositeModelCommand.ts @@ -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 @@ -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", @@ -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); @@ -190,6 +193,9 @@ export interface CreateAssetModelCompositeModelCommandOutput * allowed number of properties for an asset model.

*

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

* + * @throws {@link PreconditionFailedException} (client fault) + *

The precondition in one or more of the request-header fields evaluated to FALSE.

+ * * @throws {@link ResourceAlreadyExistsException} (client fault) *

The resource already exists.

* diff --git a/clients/client-iotsitewise/src/commands/DeleteAssetModelCommand.ts b/clients/client-iotsitewise/src/commands/DeleteAssetModelCommand.ts index b28b54b23be1..e3638789dd58 100644 --- a/clients/client-iotsitewise/src/commands/DeleteAssetModelCommand.ts +++ b/clients/client-iotsitewise/src/commands/DeleteAssetModelCommand.ts @@ -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); @@ -80,6 +83,9 @@ export interface DeleteAssetModelCommandOutput extends DeleteAssetModelResponse, *

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

* + * @throws {@link PreconditionFailedException} (client fault) + *

The precondition in one or more of the request-header fields evaluated to FALSE.

+ * * @throws {@link ResourceNotFoundException} (client fault) *

The requested resource can't be found.

* diff --git a/clients/client-iotsitewise/src/commands/DeleteAssetModelCompositeModelCommand.ts b/clients/client-iotsitewise/src/commands/DeleteAssetModelCompositeModelCommand.ts index b56b23532018..823dd3662722 100644 --- a/clients/client-iotsitewise/src/commands/DeleteAssetModelCompositeModelCommand.ts +++ b/clients/client-iotsitewise/src/commands/DeleteAssetModelCompositeModelCommand.ts @@ -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); @@ -86,6 +89,9 @@ export interface DeleteAssetModelCompositeModelCommandOutput *

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

* + * @throws {@link PreconditionFailedException} (client fault) + *

The precondition in one or more of the request-header fields evaluated to FALSE.

+ * * @throws {@link ResourceNotFoundException} (client fault) *

The requested resource can't be found.

* diff --git a/clients/client-iotsitewise/src/commands/DescribeAssetModelCommand.ts b/clients/client-iotsitewise/src/commands/DescribeAssetModelCommand.ts index 75135f041e85..8edb7e6c2608 100644 --- a/clients/client-iotsitewise/src/commands/DescribeAssetModelCommand.ts +++ b/clients/client-iotsitewise/src/commands/DescribeAssetModelCommand.ts @@ -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", @@ -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 @@ -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", @@ -199,29 +203,12 @@ export interface DescribeAssetModelCommandOutput extends DescribeAssetModelRespo * // }, * // }, * // path: "", - * // 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 @@ -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", * // }; * * ``` diff --git a/clients/client-iotsitewise/src/commands/DescribeAssetModelCompositeModelCommand.ts b/clients/client-iotsitewise/src/commands/DescribeAssetModelCompositeModelCommand.ts index b3cf25b9d820..f0fd8ecfe1ef 100644 --- a/clients/client-iotsitewise/src/commands/DescribeAssetModelCompositeModelCommand.ts +++ b/clients/client-iotsitewise/src/commands/DescribeAssetModelCompositeModelCommand.ts @@ -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); @@ -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", @@ -137,7 +139,6 @@ export interface DescribeAssetModelCompositeModelCommandOutput * // name: "STRING_VALUE", * // }, * // ], - * // externalId: "STRING_VALUE", * // }, * // ], * // compositionDetails: { // CompositionDetails diff --git a/clients/client-iotsitewise/src/commands/ListAssetModelCompositeModelsCommand.ts b/clients/client-iotsitewise/src/commands/ListAssetModelCompositeModelsCommand.ts index 28072d6f400e..8fbc2eb8f95a 100644 --- a/clients/client-iotsitewise/src/commands/ListAssetModelCompositeModelsCommand.ts +++ b/clients/client-iotsitewise/src/commands/ListAssetModelCompositeModelsCommand.ts @@ -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); diff --git a/clients/client-iotsitewise/src/commands/ListAssetModelPropertiesCommand.ts b/clients/client-iotsitewise/src/commands/ListAssetModelPropertiesCommand.ts index b3b84cd226b0..37a63c605b55 100644 --- a/clients/client-iotsitewise/src/commands/ListAssetModelPropertiesCommand.ts +++ b/clients/client-iotsitewise/src/commands/ListAssetModelPropertiesCommand.ts @@ -42,6 +42,7 @@ 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); @@ -49,6 +50,7 @@ export interface ListAssetModelPropertiesCommandOutput extends ListAssetModelPro * // assetModelPropertySummaries: [ // AssetModelPropertySummaries // required * // { // AssetModelPropertySummary * // id: "STRING_VALUE", + * // externalId: "STRING_VALUE", * // name: "STRING_VALUE", // required * // dataType: "STRING" || "INTEGER" || "DOUBLE" || "BOOLEAN" || "STRUCT", // required * // dataTypeSpec: "STRING_VALUE", @@ -123,7 +125,6 @@ export interface ListAssetModelPropertiesCommandOutput extends ListAssetModelPro * // name: "STRING_VALUE", * // }, * // ], - * // externalId: "STRING_VALUE", * // }, * // ], * // nextToken: "STRING_VALUE", diff --git a/clients/client-iotsitewise/src/commands/ListAssetModelsCommand.ts b/clients/client-iotsitewise/src/commands/ListAssetModelsCommand.ts index 3db07d3d6f82..5a83bca65e1e 100644 --- a/clients/client-iotsitewise/src/commands/ListAssetModelsCommand.ts +++ b/clients/client-iotsitewise/src/commands/ListAssetModelsCommand.ts @@ -36,11 +36,12 @@ 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); @@ -48,8 +49,10 @@ export interface ListAssetModelsCommandOutput extends 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 @@ -66,8 +69,7 @@ export interface ListAssetModelsCommandOutput extends ListAssetModelsResponse, _ * // ], * // }, * // }, - * // assetModelType: "ASSET_MODEL" || "COMPONENT_MODEL", - * // externalId: "STRING_VALUE", + * // version: "STRING_VALUE", * // }, * // ], * // nextToken: "STRING_VALUE", diff --git a/clients/client-iotsitewise/src/commands/ListAssociatedAssetsCommand.ts b/clients/client-iotsitewise/src/commands/ListAssociatedAssetsCommand.ts index b501f353756a..3eaf00f7ac21 100644 --- a/clients/client-iotsitewise/src/commands/ListAssociatedAssetsCommand.ts +++ b/clients/client-iotsitewise/src/commands/ListAssociatedAssetsCommand.ts @@ -32,10 +32,12 @@ export interface ListAssociatedAssetsCommandOutput extends ListAssociatedAssetsR *

You can use this operation to do the following:

*
    *
  • - *

    List child assets associated to a parent asset by a hierarchy that you specify.

    + *

    + * CHILD - List all child assets associated to the asset.

    *
  • *
  • - *

    List an asset's parent asset.

    + *

    + * PARENT - List the asset's parent asset.

    *
  • *
* @example diff --git a/clients/client-iotsitewise/src/commands/ListTimeSeriesCommand.ts b/clients/client-iotsitewise/src/commands/ListTimeSeriesCommand.ts index 1570fce34d62..f26cc3043b58 100644 --- a/clients/client-iotsitewise/src/commands/ListTimeSeriesCommand.ts +++ b/clients/client-iotsitewise/src/commands/ListTimeSeriesCommand.ts @@ -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"; /** diff --git a/clients/client-iotsitewise/src/commands/UpdateAssetModelCommand.ts b/clients/client-iotsitewise/src/commands/UpdateAssetModelCommand.ts index 71de83256888..0409b1361a9b 100644 --- a/clients/client-iotsitewise/src/commands/UpdateAssetModelCommand.ts +++ b/clients/client-iotsitewise/src/commands/UpdateAssetModelCommand.ts @@ -57,11 +57,13 @@ export interface UpdateAssetModelCommandOutput extends UpdateAssetModelResponse, * const client = new IoTSiteWiseClient(config); * const input = { // UpdateAssetModelRequest * assetModelId: "STRING_VALUE", // required + * assetModelExternalId: "STRING_VALUE", * assetModelName: "STRING_VALUE", // required * assetModelDescription: "STRING_VALUE", * assetModelProperties: [ // AssetModelProperties * { // AssetModelProperty * id: "STRING_VALUE", + * externalId: "STRING_VALUE", * name: "STRING_VALUE", // required * dataType: "STRING" || "INTEGER" || "DOUBLE" || "BOOLEAN" || "STRUCT", // required * dataTypeSpec: "STRING_VALUE", @@ -135,15 +137,14 @@ export interface UpdateAssetModelCommandOutput extends UpdateAssetModelResponse, * name: "STRING_VALUE", * }, * ], - * externalId: "STRING_VALUE", * }, * ], * assetModelHierarchies: [ // AssetModelHierarchies * { // AssetModelHierarchy * id: "STRING_VALUE", + * externalId: "STRING_VALUE", * name: "STRING_VALUE", // required * childAssetModelId: "STRING_VALUE", // required - * externalId: "STRING_VALUE", * }, * ], * assetModelCompositeModels: [ // AssetModelCompositeModels @@ -154,6 +155,7 @@ export interface UpdateAssetModelCommandOutput extends UpdateAssetModelResponse, * properties: [ * { * id: "STRING_VALUE", + * externalId: "STRING_VALUE", * name: "STRING_VALUE", // required * dataType: "STRING" || "INTEGER" || "DOUBLE" || "BOOLEAN" || "STRUCT", // required * dataTypeSpec: "STRING_VALUE", @@ -212,7 +214,6 @@ export interface UpdateAssetModelCommandOutput extends UpdateAssetModelResponse, * }, * }, * path: "", - * externalId: "STRING_VALUE", * }, * ], * id: "STRING_VALUE", @@ -220,7 +221,9 @@ export interface UpdateAssetModelCommandOutput extends UpdateAssetModelResponse, * }, * ], * clientToken: "STRING_VALUE", - * assetModelExternalId: "STRING_VALUE", + * ifMatch: "STRING_VALUE", + * ifNoneMatch: "STRING_VALUE", + * matchForVersionType: "LATEST" || "ACTIVE", * }; * const command = new UpdateAssetModelCommand(input); * const response = await client.send(command); @@ -265,6 +268,9 @@ export interface UpdateAssetModelCommandOutput extends UpdateAssetModelResponse, * allowed number of properties for an asset model.

*

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

* + * @throws {@link PreconditionFailedException} (client fault) + *

The precondition in one or more of the request-header fields evaluated to FALSE.

+ * * @throws {@link ResourceAlreadyExistsException} (client fault) *

The resource already exists.

* diff --git a/clients/client-iotsitewise/src/commands/UpdateAssetModelCompositeModelCommand.ts b/clients/client-iotsitewise/src/commands/UpdateAssetModelCompositeModelCommand.ts index cc3fbf1c2558..ac2230dcf705 100644 --- a/clients/client-iotsitewise/src/commands/UpdateAssetModelCompositeModelCommand.ts +++ b/clients/client-iotsitewise/src/commands/UpdateAssetModelCompositeModelCommand.ts @@ -70,6 +70,7 @@ export interface UpdateAssetModelCompositeModelCommandOutput * assetModelCompositeModelProperties: [ // AssetModelProperties * { // AssetModelProperty * id: "STRING_VALUE", + * externalId: "STRING_VALUE", * name: "STRING_VALUE", // required * dataType: "STRING" || "INTEGER" || "DOUBLE" || "BOOLEAN" || "STRUCT", // required * dataTypeSpec: "STRING_VALUE", @@ -143,9 +144,11 @@ export interface UpdateAssetModelCompositeModelCommandOutput * name: "STRING_VALUE", * }, * ], - * externalId: "STRING_VALUE", * }, * ], + * ifMatch: "STRING_VALUE", + * ifNoneMatch: "STRING_VALUE", + * matchForVersionType: "LATEST" || "ACTIVE", * }; * const command = new UpdateAssetModelCompositeModelCommand(input); * const response = await client.send(command); @@ -196,6 +199,9 @@ export interface UpdateAssetModelCompositeModelCommandOutput * allowed number of properties for an asset model.

*

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

* + * @throws {@link PreconditionFailedException} (client fault) + *

The precondition in one or more of the request-header fields evaluated to FALSE.

+ * * @throws {@link ResourceAlreadyExistsException} (client fault) *

The resource already exists.

* diff --git a/clients/client-iotsitewise/src/models/models_0.ts b/clients/client-iotsitewise/src/models/models_0.ts index 842f1b380e31..0d01eea7a7dd 100644 --- a/clients/client-iotsitewise/src/models/models_0.ts +++ b/clients/client-iotsitewise/src/models/models_0.ts @@ -1175,6 +1175,14 @@ export interface AssetModelProperty { */ id?: string; + /** + *

The external ID (if any) provided in the CreateAssetModel or UpdateAssetModel + * operation. You can assign an external ID by specifying + * this value as part of a call to UpdateAssetModel. However, you can't change the external ID if one is already assigned. For more information, see Using external IDs in the IoT SiteWise User Guide.

+ * @public + */ + externalId?: string; + /** *

The name of the asset model property.

* @public @@ -1212,14 +1220,6 @@ export interface AssetModelProperty { * @public */ path?: AssetModelPropertyPathSegment[]; - - /** - *

The external ID (if any) provided in the CreateAssetModel or UpdateAssetModel - * operation. You can assign an external ID by specifying - * this value as part of a call to UpdateAssetModel. However, you can't change the external ID if one is already assigned. For more information, see Using external IDs in the IoT SiteWise User Guide.

- * @public - */ - externalId?: string; } /** @@ -1272,6 +1272,21 @@ export interface AssetModelCompositeModel { * @public */ export interface AssetModelPropertyDefinition { + /** + *

The ID to assign to the asset model property, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required. + * However, if you prefer to supply your own ID instead, you can specify it here in UUID format. + * If you specify your own ID, it must be globally unique.

+ * @public + */ + id?: string; + + /** + *

An external ID to assign to the property definition. The external ID must be unique among + * property definitions within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.

+ * @public + */ + externalId?: string; + /** *

The name of the property definition.

* @public @@ -1309,9 +1324,16 @@ export interface AssetModelPropertyDefinition { * @public */ type: PropertyType | undefined; +} +/** + *

Contains a composite model definition in an asset model. This composite model definition + * is applied to all assets created from the asset model.

+ * @public + */ +export interface AssetModelCompositeModelDefinition { /** - *

The ID to assign to the asset model property, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required. + *

The ID to assign to the composite model, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required. * However, if you prefer to supply your own ID instead, you can specify it here in UUID format. * If you specify your own ID, it must be globally unique.

* @public @@ -1319,19 +1341,12 @@ export interface AssetModelPropertyDefinition { id?: string; /** - *

An external ID to assign to the property definition. The external ID must be unique among - * property definitions within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.

+ *

An external ID to assign to the composite model. The external ID must be unique among + * composite models within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.

* @public */ externalId?: string; -} -/** - *

Contains a composite model definition in an asset model. This composite model definition - * is applied to all assets created from the asset model.

- * @public - */ -export interface AssetModelCompositeModelDefinition { /** *

The name of the composite model.

* @public @@ -1356,21 +1371,6 @@ export interface AssetModelCompositeModelDefinition { * @public */ properties?: AssetModelPropertyDefinition[]; - - /** - *

The ID to assign to the composite model, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required. - * However, if you prefer to supply your own ID instead, you can specify it here in UUID format. - * If you specify your own ID, it must be globally unique.

- * @public - */ - id?: string; - - /** - *

An external ID to assign to the composite model. The external ID must be unique among - * composite models within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.

- * @public - */ - externalId?: string; } /** @@ -1459,6 +1459,14 @@ export interface AssetModelHierarchy { */ id?: string; + /** + *

The external ID (if any) provided in the CreateAssetModel or UpdateAssetModel + * operation. You can assign an external ID by specifying + * this value as part of a call to UpdateAssetModel. However, you can't change the external ID if one is already assigned. For more information, see Using external IDs in the IoT SiteWise User Guide.

+ * @public + */ + externalId?: string; + /** *

The name of the asset model hierarchy that you specify by using the CreateAssetModel or * UpdateAssetModel API operation.

@@ -1476,14 +1484,6 @@ export interface AssetModelHierarchy { * @public */ childAssetModelId: string | undefined; - - /** - *

The external ID (if any) provided in the CreateAssetModel or UpdateAssetModel - * operation. You can assign an external ID by specifying - * this value as part of a call to UpdateAssetModel. However, you can't change the external ID if one is already assigned. For more information, see Using external IDs in the IoT SiteWise User Guide.

- * @public - */ - externalId?: string; } /** @@ -1493,33 +1493,33 @@ export interface AssetModelHierarchy { */ export interface AssetModelHierarchyDefinition { /** - *

The name of the asset model hierarchy definition (as specified in the CreateAssetModel or - * UpdateAssetModel API operation).

+ *

The ID to assign to the asset model hierarchy, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required. + * However, if you prefer to supply your own ID instead, you can specify it here in UUID format. + * If you specify your own ID, it must be globally unique.

* @public */ - name: string | undefined; + id?: string; /** - *

The ID of an asset model for this hierarchy. 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.

+ *

An external ID to assign to the asset model hierarchy. The external ID must be unique + * among asset model hierarchies within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.

* @public */ - childAssetModelId: string | undefined; + externalId?: string; /** - *

The ID to assign to the asset model hierarchy, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required. - * However, if you prefer to supply your own ID instead, you can specify it here in UUID format. - * If you specify your own ID, it must be globally unique.

+ *

The name of the asset model hierarchy definition (as specified in the CreateAssetModel or + * UpdateAssetModel API operation).

* @public */ - id?: string; + name: string | undefined; /** - *

An external ID to assign to the asset model hierarchy. The external ID must be unique - * among asset model hierarchies within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.

+ *

The ID of an asset model for this hierarchy. 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.

* @public */ - externalId?: string; + childAssetModelId: string | undefined; } /** @@ -1533,6 +1533,12 @@ export interface AssetModelPropertySummary { */ id?: string; + /** + *

The external ID of the property. For more information, see Using external IDs in the IoT SiteWise User Guide.

+ * @public + */ + externalId?: string; + /** *

The name of the property.

* @public @@ -1576,12 +1582,6 @@ export interface AssetModelPropertySummary { * @public */ path?: AssetModelPropertyPathSegment[]; - - /** - *

The external ID of the property. For more information, see Using external IDs in the IoT SiteWise User Guide.

- * @public - */ - externalId?: string; } /** @@ -1716,6 +1716,12 @@ export interface AssetModelSummary { */ id: string | undefined; + /** + *

The external ID of the asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.

+ * @public + */ + externalId?: string; + /** *

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

*

@@ -1731,6 +1737,24 @@ export interface AssetModelSummary { */ name: string | 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.

    + *
  • + *
+ * @public + */ + assetModelType?: AssetModelType; + /** *

The asset model description.

* @public @@ -1756,30 +1780,26 @@ export interface AssetModelSummary { status: AssetModelStatus | 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.

    - *
  • - *
- * @public - */ - assetModelType?: AssetModelType; - - /** - *

The external ID of the asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.

+ *

The version number of the asset model.

* @public */ - externalId?: string; + version?: string; } +/** + * @public + * @enum + */ +export const AssetModelVersionType = { + ACTIVE: "ACTIVE", + LATEST: "LATEST", +} as const; + +/** + * @public + */ +export type AssetModelVersionType = (typeof AssetModelVersionType)[keyof typeof AssetModelVersionType]; + /** *

Contains a summary of a property associated with an asset.

* @public @@ -3457,6 +3477,38 @@ export interface CreateAssetModelRequest { */ assetModelName: string | 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.

    + *
  • + *
+ * @public + */ + assetModelType?: AssetModelType; + + /** + *

The ID to assign to the asset model, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required. + * However, if you prefer to supply your own ID instead, you can specify it here in UUID format. + * If you specify your own ID, it must be globally unique.

+ * @public + */ + assetModelId?: string; + + /** + *

An external ID to assign to the asset model. The external ID must be unique within your Amazon Web Services account. For more information, see Using external IDs in the IoT SiteWise User Guide.

+ * @public + */ + assetModelExternalId?: string; + /** *

A description for the asset model.

* @public @@ -3509,38 +3561,6 @@ export interface CreateAssetModelRequest { * @public */ tags?: Record; - - /** - *

The ID to assign to the asset model, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required. - * However, if you prefer to supply your own ID instead, you can specify it here in UUID format. - * If you specify your own ID, it must be globally unique.

- * @public - */ - assetModelId?: string; - - /** - *

An external ID to assign to the asset model. The external ID must be unique within your Amazon Web Services account. For more information, see Using external IDs in the IoT SiteWise User Guide.

- * @public - */ - assetModelExternalId?: string; - - /** - *

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.

    - *
  • - *
- * @public - */ - assetModelType?: AssetModelType; } /** @@ -3580,12 +3600,6 @@ export interface CreateAssetModelCompositeModelRequest { */ assetModelId: string | undefined; - /** - *

The ID of the parent composite model in this asset model relationship.

- * @public - */ - parentAssetModelCompositeModelId?: string; - /** *

An external ID to assign to the composite model.

*

If the composite model is a derived composite model, or one nested inside a component @@ -3596,6 +3610,12 @@ export interface CreateAssetModelCompositeModelRequest { */ assetModelCompositeModelExternalId?: string; + /** + *

The ID of the parent composite model in this asset model relationship.

+ * @public + */ + parentAssetModelCompositeModelId?: string; + /** *

The ID of the composite model. IoT SiteWise automatically generates a unique ID for you, so this * parameter is never required. However, if you prefer to supply your own ID instead, you can @@ -3641,32 +3661,89 @@ export interface CreateAssetModelCompositeModelRequest { * information, see Quotas in the IoT SiteWise User Guide.

* @public */ - assetModelCompositeModelProperties?: AssetModelPropertyDefinition[]; + assetModelCompositeModelProperties?: AssetModelPropertyDefinition[]; + + /** + *

The expected current entity tag (ETag) for the asset model’s latest or active version (specified using matchForVersionType). + * The create request is rejected if the tag does not match the latest or active version's current entity tag. + * See Optimistic locking for asset model writes + * in the IoT SiteWise User Guide.

+ * @public + */ + ifMatch?: string; + + /** + *

Accepts * to reject the create request if an active version + * (specified using matchForVersionType as ACTIVE) already exists for the asset model.

+ * @public + */ + ifNoneMatch?: string; + + /** + *

Specifies the asset model version type (LATEST or ACTIVE) used in + * conjunction with If-Match or If-None-Match headers to determine the target ETag for the create operation.

+ * @public + */ + matchForVersionType?: AssetModelVersionType; +} + +/** + * @public + */ +export interface CreateAssetModelCompositeModelResponse { + /** + *

The ID of the composed asset model. You can use this ID when you call other IoT SiteWise + * APIs.

+ * @public + */ + assetModelCompositeModelId: string | undefined; + + /** + *

The path to the composite model listing the parent composite models.

+ * @public + */ + assetModelCompositeModelPath: AssetModelCompositeModelPathSegment[] | undefined; + + /** + *

Contains current status information for an asset model. For more information, see Asset and model + * states in the IoT SiteWise User Guide.

+ * @public + */ + assetModelStatus: AssetModelStatus | undefined; } /** + *

The precondition in one or more of the request-header fields evaluated to FALSE.

* @public */ -export interface CreateAssetModelCompositeModelResponse { +export class PreconditionFailedException extends __BaseException { + readonly name: "PreconditionFailedException" = "PreconditionFailedException"; + readonly $fault: "client" = "client"; /** - *

The ID of the composed asset model. You can use this ID when you call other IoT SiteWise - * APIs.

+ *

The ID of the resource on which precondition failed with this operation.

* @public */ - assetModelCompositeModelId: string | undefined; + resourceId: string | undefined; /** - *

The path to the composite model listing the parent composite models.

+ *

The ARN of the resource on which precondition failed with this operation.

* @public */ - assetModelCompositeModelPath: AssetModelCompositeModelPathSegment[] | undefined; + resourceArn: string | undefined; /** - *

Contains current status information for an asset model. For more information, see Asset and model - * states in the IoT SiteWise User Guide.

- * @public + * @internal */ - assetModelStatus: AssetModelStatus | undefined; + constructor(opts: __ExceptionOptionType) { + super({ + name: "PreconditionFailedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, PreconditionFailedException.prototype); + this.resourceId = opts.resourceId; + this.resourceArn = opts.resourceArn; + } } /** @@ -4442,6 +4519,29 @@ export interface DeleteAssetModelRequest { * @public */ clientToken?: string; + + /** + *

The expected current entity tag (ETag) for the asset model’s latest or active version (specified using matchForVersionType). + * The delete request is rejected if the tag does not match the latest or active version's current entity tag. + * See Optimistic locking for asset model writes + * in the IoT SiteWise User Guide.

+ * @public + */ + ifMatch?: string; + + /** + *

Accepts * to reject the delete request if an active version + * (specified using matchForVersionType as ACTIVE) already exists for the asset model.

+ * @public + */ + ifNoneMatch?: string; + + /** + *

Specifies the asset model version type (LATEST or ACTIVE) used in + * conjunction with If-Match or If-None-Match headers to determine the target ETag for the delete operation.

+ * @public + */ + matchForVersionType?: AssetModelVersionType; } /** @@ -4477,6 +4577,29 @@ export interface DeleteAssetModelCompositeModelRequest { * @public */ clientToken?: string; + + /** + *

The expected current entity tag (ETag) for the asset model’s latest or active version (specified using matchForVersionType). + * The delete request is rejected if the tag does not match the latest or active version's current entity tag. + * See Optimistic locking for asset model writes + * in the IoT SiteWise User Guide.

+ * @public + */ + ifMatch?: string; + + /** + *

Accepts * to reject the delete request if an active version + * (specified using matchForVersionType as ACTIVE) already exists for the asset model.

+ * @public + */ + ifNoneMatch?: string; + + /** + *

Specifies the asset model version type (LATEST or ACTIVE) used in + * conjunction with If-Match or If-None-Match headers to determine the target ETag for the delete operation.

+ * @public + */ + matchForVersionType?: AssetModelVersionType; } /** @@ -4928,6 +5051,14 @@ export interface DescribeAssetModelRequest { * @public */ excludeProperties?: boolean; + + /** + *

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.

+ * @public + */ + assetModelVersion?: string; } /** @@ -4940,6 +5071,12 @@ export interface DescribeAssetModelResponse { */ assetModelId: string | undefined; + /** + *

The external ID of the asset model, if any.

+ * @public + */ + assetModelExternalId?: string; + /** *

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

*

@@ -4955,6 +5092,24 @@ export interface DescribeAssetModelResponse { */ assetModelName: string | 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.

    + *
  • + *
+ * @public + */ + assetModelType?: AssetModelType; + /** *

The asset model's description.

* @public @@ -4984,6 +5139,13 @@ export interface DescribeAssetModelResponse { */ assetModelCompositeModels?: AssetModelCompositeModel[]; + /** + *

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

+ * @public + */ + assetModelCompositeModelSummaries?: AssetModelCompositeModelSummary[]; + /** *

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

* @public @@ -5004,35 +5166,23 @@ export interface DescribeAssetModelResponse { assetModelStatus: AssetModelStatus | 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.

    - *
  • - *
- * @public - */ - assetModelType?: AssetModelType; - - /** - *

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

+ *

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

* @public */ - assetModelCompositeModelSummaries?: AssetModelCompositeModelSummary[]; + assetModelVersion?: string; /** - *

The external ID of the asset model, if any.

+ *

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.

* @public */ - assetModelExternalId?: string; + eTag?: string; } /** @@ -5052,6 +5202,14 @@ export interface DescribeAssetModelCompositeModelRequest { * @public */ assetModelCompositeModelId: 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.

+ * @public + */ + assetModelVersion?: string; } /** @@ -7116,6 +7274,14 @@ export interface ListAssetModelCompositeModelsRequest { * @public */ maxResults?: number; + + /** + *

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.

+ * @public + */ + assetModelVersion?: string; } /** @@ -7193,6 +7359,14 @@ export interface ListAssetModelPropertiesRequest { * @public */ filter?: ListAssetModelPropertiesFilter; + + /** + *

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.

+ * @public + */ + assetModelVersion?: string; } /** @@ -7216,6 +7390,24 @@ export interface ListAssetModelPropertiesResponse { * @public */ export interface ListAssetModelsRequest { + /** + *

The type of asset model. If you don't provide an assetModelTypes, all types of asset models are returned.

+ *
    + *
  • + *

    + * ASSET_MODEL – 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.

    + *
  • + *
+ * @public + */ + assetModelTypes?: AssetModelType[]; + /** *

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

* @public @@ -7230,22 +7422,12 @@ export interface ListAssetModelsRequest { maxResults?: number; /** - *

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.

    - *
  • - *
+ *

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.

* @public */ - assetModelTypes?: AssetModelType[]; + assetModelVersion?: string; } /** @@ -7514,10 +7696,10 @@ export interface ListAssociatedAssetsRequest { assetId: string | undefined; /** - *

The ID of the hierarchy by which child assets are associated to 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.) To find a hierarchy ID, use the DescribeAsset or DescribeAssetModel operations. This parameter is required if you choose - * CHILD for traversalDirection.

+ *

(Optional) If you don't provide a hierarchyId, all the immediate assets in the traversalDirection will be returned.

+ *

+ * The ID of the hierarchy by which child assets are associated to 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.)

*

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

* @public */ @@ -7529,8 +7711,7 @@ export interface ListAssociatedAssetsRequest { *
  • *

    * CHILD – The list includes all child assets associated to the - * asset. The hierarchyId parameter is required if you choose - * CHILD.

    + * asset.

    *
  • *
  • *

    @@ -8176,120 +8357,3 @@ export const ListTimeSeriesType = { * @public */ export type ListTimeSeriesType = (typeof ListTimeSeriesType)[keyof typeof ListTimeSeriesType]; - -/** - * @public - */ -export interface ListTimeSeriesRequest { - /** - *

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

    - * @public - */ - nextToken?: string; - - /** - *

    The maximum number of results to return for each paginated request.

    - * @public - */ - maxResults?: number; - - /** - *

    The ID of the asset in which the asset property was created. 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.

    - * @public - */ - assetId?: string; - - /** - *

    The alias prefix of the time series.

    - * @public - */ - aliasPrefix?: string; - - /** - *

    The type of the time series. The time series type can be one of the following - * values:

    - *
      - *
    • - *

      - * ASSOCIATED – The time series is associated with an asset - * property.

      - *
    • - *
    • - *

      - * DISASSOCIATED – The time series isn't associated with any asset - * property.

      - *
    • - *
    - * @public - */ - timeSeriesType?: ListTimeSeriesType; -} - -/** - *

    Contains a summary of a time series (data stream).

    - * @public - */ -export interface TimeSeriesSummary { - /** - *

    The ID of the asset in which the asset property was created.

    - * @public - */ - assetId?: string; - - /** - *

    The ID of the asset property, in UUID format.

    - * @public - */ - propertyId?: string; - - /** - *

    The alias that identifies the time series.

    - * @public - */ - alias?: string; - - /** - *

    The ID of the time series.

    - * @public - */ - timeSeriesId: string | undefined; - - /** - *

    The data type of the time series.

    - *

    If you specify STRUCT, you must also specify dataTypeSpec to identify the type of the structure for this time series.

    - * @public - */ - dataType: PropertyDataType | undefined; - - /** - *

    The data type of the structure for this time series. This parameter is required for time series - * that have the STRUCT data type.

    - *

    The options for this parameter depend on the type of the composite model - * in which you created the asset property that is associated with your time series. - * Use AWS/ALARM_STATE for alarm state in alarm composite models.

    - * @public - */ - dataTypeSpec?: string; - - /** - *

    The date that the time series was created, in Unix epoch time.

    - * @public - */ - timeSeriesCreationDate: Date | undefined; - - /** - *

    The date that the time series was last updated, in Unix epoch time.

    - * @public - */ - timeSeriesLastUpdateDate: Date | undefined; - - /** - *

    The ARN of the time series, which has the following format.

    - *

    - * arn:$\{Partition\}:iotsitewise:$\{Region\}:$\{Account\}:time-series/$\{TimeSeriesId\} - *

    - * @public - */ - timeSeriesArn: string | undefined; -} diff --git a/clients/client-iotsitewise/src/models/models_1.ts b/clients/client-iotsitewise/src/models/models_1.ts index e662235936e0..b31238c8f6fa 100644 --- a/clients/client-iotsitewise/src/models/models_1.ts +++ b/clients/client-iotsitewise/src/models/models_1.ts @@ -10,6 +10,7 @@ import { AssetModelHierarchy, AssetModelProperty, AssetModelStatus, + AssetModelVersionType, AssetStatus, CapabilitySyncStatus, ColumnInfo, @@ -18,19 +19,137 @@ import { EncryptionType, Identity, ImageFile, + ListTimeSeriesType, LoggingOptions, MultiLayerStorage, Permission, PortalStatus, + PropertyDataType, PropertyNotificationState, Resource, RetentionPeriod, StorageType, - TimeSeriesSummary, WarmTierRetentionPeriod, WarmTierState, } from "./models_0"; +/** + * @public + */ +export interface ListTimeSeriesRequest { + /** + *

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

    + * @public + */ + nextToken?: string; + + /** + *

    The maximum number of results to return for each paginated request.

    + * @public + */ + maxResults?: number; + + /** + *

    The ID of the asset in which the asset property was created. 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.

    + * @public + */ + assetId?: string; + + /** + *

    The alias prefix of the time series.

    + * @public + */ + aliasPrefix?: string; + + /** + *

    The type of the time series. The time series type can be one of the following + * values:

    + *
      + *
    • + *

      + * ASSOCIATED – The time series is associated with an asset + * property.

      + *
    • + *
    • + *

      + * DISASSOCIATED – The time series isn't associated with any asset + * property.

      + *
    • + *
    + * @public + */ + timeSeriesType?: ListTimeSeriesType; +} + +/** + *

    Contains a summary of a time series (data stream).

    + * @public + */ +export interface TimeSeriesSummary { + /** + *

    The ID of the asset in which the asset property was created.

    + * @public + */ + assetId?: string; + + /** + *

    The ID of the asset property, in UUID format.

    + * @public + */ + propertyId?: string; + + /** + *

    The alias that identifies the time series.

    + * @public + */ + alias?: string; + + /** + *

    The ID of the time series.

    + * @public + */ + timeSeriesId: string | undefined; + + /** + *

    The data type of the time series.

    + *

    If you specify STRUCT, you must also specify dataTypeSpec to identify the type of the structure for this time series.

    + * @public + */ + dataType: PropertyDataType | undefined; + + /** + *

    The data type of the structure for this time series. This parameter is required for time series + * that have the STRUCT data type.

    + *

    The options for this parameter depend on the type of the composite model + * in which you created the asset property that is associated with your time series. + * Use AWS/ALARM_STATE for alarm state in alarm composite models.

    + * @public + */ + dataTypeSpec?: string; + + /** + *

    The date that the time series was created, in Unix epoch time.

    + * @public + */ + timeSeriesCreationDate: Date | undefined; + + /** + *

    The date that the time series was last updated, in Unix epoch time.

    + * @public + */ + timeSeriesLastUpdateDate: Date | undefined; + + /** + *

    The ARN of the time series, which has the following format.

    + *

    + * arn:$\{Partition\}:iotsitewise:$\{Region\}:$\{Account\}:time-series/$\{TimeSeriesId\} + *

    + * @public + */ + timeSeriesArn: string | undefined; +} + /** * @public */ @@ -430,6 +549,13 @@ export interface UpdateAssetModelRequest { */ assetModelId: string | undefined; + /** + *

    An external ID to assign to the asset model. The asset model must not already have an + * external ID. The external ID must be unique within your Amazon Web Services account. For more information, see Using external IDs in the IoT SiteWise User Guide.

    + * @public + */ + assetModelExternalId?: string; + /** *

    A unique name for the asset model.

    * @public @@ -482,11 +608,27 @@ export interface UpdateAssetModelRequest { clientToken?: string; /** - *

    An external ID to assign to the asset model. The asset model must not already have an - * external ID. The external ID must be unique within your Amazon Web Services account. For more information, see Using external IDs in the IoT SiteWise User Guide.

    + *

    The expected current entity tag (ETag) for the asset model’s latest or active version (specified using matchForVersionType). + * The update request is rejected if the tag does not match the latest or active version's current entity tag. + * See Optimistic locking for asset model writes + * in the IoT SiteWise User Guide.

    * @public */ - assetModelExternalId?: string; + ifMatch?: string; + + /** + *

    Accepts * to reject the update request if an active version + * (specified using matchForVersionType as ACTIVE) already exists for the asset model.

    + * @public + */ + ifNoneMatch?: string; + + /** + *

    Specifies the asset model version type (LATEST or ACTIVE) used in + * conjunction with If-Match or If-None-Match headers to determine the target ETag for the update operation.

    + * @public + */ + matchForVersionType?: AssetModelVersionType; } /** @@ -551,6 +693,29 @@ export interface UpdateAssetModelCompositeModelRequest { * @public */ assetModelCompositeModelProperties?: AssetModelProperty[]; + + /** + *

    The expected current entity tag (ETag) for the asset model’s latest or active version (specified using matchForVersionType). + * The update request is rejected if the tag does not match the latest or active version's current entity tag. + * See Optimistic locking for asset model writes + * in the IoT SiteWise User Guide.

    + * @public + */ + ifMatch?: string; + + /** + *

    Accepts * to reject the update request if an active version + * (specified using matchForVersionType as ACTIVE) already exists for the asset model.

    + * @public + */ + ifNoneMatch?: string; + + /** + *

    Specifies the asset model version type (LATEST or ACTIVE) used in + * conjunction with If-Match or If-None-Match headers to determine the target ETag for the update operation.

    + * @public + */ + matchForVersionType?: AssetModelVersionType; } /** diff --git a/clients/client-iotsitewise/src/protocols/Aws_restJson1.ts b/clients/client-iotsitewise/src/protocols/Aws_restJson1.ts index f93d5bf17690..096dc3bde140 100644 --- a/clients/client-iotsitewise/src/protocols/Aws_restJson1.ts +++ b/clients/client-iotsitewise/src/protocols/Aws_restJson1.ts @@ -292,6 +292,7 @@ import { Parquet, PortalResource, PortalSummary, + PreconditionFailedException, ProjectResource, ProjectSummary, PropertyType, @@ -307,7 +308,6 @@ import { TargetResource, ThrottlingException, TimeInNanos, - TimeSeriesSummary, Transform, TransformProcessingConfig, TumblingWindow, @@ -318,7 +318,7 @@ import { Variant, WarmTierRetentionPeriod, } from "../models/models_0"; -import { Datum, Image, Row, TooManyTagsException } from "../models/models_1"; +import { Datum, Image, Row, TimeSeriesSummary, TooManyTagsException } from "../models/models_1"; /** * serializeAws_restJson1AssociateAssetsCommand @@ -694,9 +694,12 @@ export const se_CreateAssetModelCompositeModelCommand = async ( context: __SerdeContext ): Promise<__HttpRequest> => { const b = rb(input, context); - const headers: any = { + const headers: any = map({}, isSerializableHeaderValue, { "content-type": "application/json", - }; + [_im]: input[_iM]!, + [_inm]: input[_iNM]!, + [_mfvt]: input[_mFVT]!, + }); b.bp("/asset-models/{assetModelId}/composite-models"); b.p("assetModelId", () => input.assetModelId!, "{assetModelId}", false); let body: any; @@ -963,7 +966,11 @@ export const se_DeleteAssetModelCommand = async ( context: __SerdeContext ): Promise<__HttpRequest> => { const b = rb(input, context); - const headers: any = {}; + const headers: any = map({}, isSerializableHeaderValue, { + [_im]: input[_iM]!, + [_inm]: input[_iNM]!, + [_mfvt]: input[_mFVT]!, + }); b.bp("/asset-models/{assetModelId}"); b.p("assetModelId", () => input.assetModelId!, "{assetModelId}", false); const query: any = map({ @@ -990,7 +997,11 @@ export const se_DeleteAssetModelCompositeModelCommand = async ( context: __SerdeContext ): Promise<__HttpRequest> => { const b = rb(input, context); - const headers: any = {}; + const headers: any = map({}, isSerializableHeaderValue, { + [_im]: input[_iM]!, + [_inm]: input[_iNM]!, + [_mfvt]: input[_mFVT]!, + }); b.bp("/asset-models/{assetModelId}/composite-models/{assetModelCompositeModelId}"); b.p("assetModelId", () => input.assetModelId!, "{assetModelId}", false); b.p("assetModelCompositeModelId", () => input.assetModelCompositeModelId!, "{assetModelCompositeModelId}", false); @@ -1263,6 +1274,7 @@ export const se_DescribeAssetModelCommand = async ( b.p("assetModelId", () => input.assetModelId!, "{assetModelId}", false); const query: any = map({ [_eP]: [() => input.excludeProperties !== void 0, () => input[_eP]!.toString()], + [_aMV]: [, input[_aMV]!], }); let body: any; let { hostname: resolvedHostname } = await context.endpoint(); @@ -1289,6 +1301,9 @@ export const se_DescribeAssetModelCompositeModelCommand = async ( b.bp("/asset-models/{assetModelId}/composite-models/{assetModelCompositeModelId}"); b.p("assetModelId", () => input.assetModelId!, "{assetModelId}", false); b.p("assetModelCompositeModelId", () => input.assetModelCompositeModelId!, "{assetModelCompositeModelId}", false); + const query: any = map({ + [_aMV]: [, input[_aMV]!], + }); let body: any; let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { @@ -1298,7 +1313,7 @@ export const se_DescribeAssetModelCompositeModelCommand = async ( } } b.hn(resolvedHostname); - b.m("GET").h(headers).b(body); + b.m("GET").h(headers).q(query).b(body); return b.build(); }; @@ -1916,6 +1931,7 @@ export const se_ListAssetModelCompositeModelsCommand = async ( const query: any = map({ [_nT]: [, input[_nT]!], [_mR]: [() => input.maxResults !== void 0, () => input[_mR]!.toString()], + [_aMV]: [, input[_aMV]!], }); let body: any; let { hostname: resolvedHostname } = await context.endpoint(); @@ -1945,6 +1961,7 @@ export const se_ListAssetModelPropertiesCommand = async ( [_nT]: [, input[_nT]!], [_mR]: [() => input.maxResults !== void 0, () => input[_mR]!.toString()], [_f]: [, input[_f]!], + [_aMV]: [, input[_aMV]!], }); let body: any; let { hostname: resolvedHostname } = await context.endpoint(); @@ -1970,9 +1987,10 @@ export const se_ListAssetModelsCommand = async ( const headers: any = {}; b.bp("/asset-models"); const query: any = map({ + [_aMT]: [() => input.assetModelTypes !== void 0, () => (input[_aMT]! || []).map((_entry) => _entry as any)], [_nT]: [, input[_nT]!], [_mR]: [() => input.maxResults !== void 0, () => input[_mR]!.toString()], - [_aMT]: [() => input.assetModelTypes !== void 0, () => (input[_aMT]! || []).map((_entry) => _entry as any)], + [_aMV]: [, input[_aMV]!], }); let body: any; let { hostname: resolvedHostname } = await context.endpoint(); @@ -2589,9 +2607,12 @@ export const se_UpdateAssetModelCommand = async ( context: __SerdeContext ): Promise<__HttpRequest> => { const b = rb(input, context); - const headers: any = { + const headers: any = map({}, isSerializableHeaderValue, { "content-type": "application/json", - }; + [_im]: input[_iM]!, + [_inm]: input[_iNM]!, + [_mfvt]: input[_mFVT]!, + }); b.bp("/asset-models/{assetModelId}"); b.p("assetModelId", () => input.assetModelId!, "{assetModelId}", false); let body: any; @@ -2626,9 +2647,12 @@ export const se_UpdateAssetModelCompositeModelCommand = async ( context: __SerdeContext ): Promise<__HttpRequest> => { const b = rb(input, context); - const headers: any = { + const headers: any = map({}, isSerializableHeaderValue, { "content-type": "application/json", - }; + [_im]: input[_iM]!, + [_inm]: input[_iNM]!, + [_mfvt]: input[_mFVT]!, + }); b.bp("/asset-models/{assetModelId}/composite-models/{assetModelCompositeModelId}"); b.p("assetModelId", () => input.assetModelId!, "{assetModelId}", false); b.p("assetModelCompositeModelId", () => input.assetModelCompositeModelId!, "{assetModelCompositeModelId}", false); @@ -3527,6 +3551,7 @@ export const de_DescribeAssetModelCommand = async ( } const contents: any = map({ $metadata: deserializeMetadata(output), + [_eT]: [, output.headers[_e]], }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { @@ -3543,6 +3568,7 @@ export const de_DescribeAssetModelCommand = async ( assetModelProperties: _json, assetModelStatus: _json, assetModelType: __expectString, + assetModelVersion: __expectString, }); Object.assign(contents, doc); return contents; @@ -4765,6 +4791,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): case "ServiceUnavailableException": case "com.amazonaws.iotsitewise#ServiceUnavailableException": throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); + case "PreconditionFailedException": + case "com.amazonaws.iotsitewise#PreconditionFailedException": + throw await de_PreconditionFailedExceptionRes(parsedOutput, context); case "AccessDeniedException": case "com.amazonaws.iotsitewise#AccessDeniedException": throw await de_AccessDeniedExceptionRes(parsedOutput, context); @@ -4893,6 +4922,28 @@ const de_LimitExceededExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; +/** + * deserializeAws_restJson1PreconditionFailedExceptionRes + */ +const de_PreconditionFailedExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + resourceArn: __expectString, + resourceId: __expectString, + }); + Object.assign(contents, doc); + const exception = new PreconditionFailedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + /** * deserializeAws_restJson1QueryTimeoutExceptionRes */ @@ -5506,6 +5557,7 @@ const de_AssetModelSummary = (output: any, context: __SerdeContext): AssetModelS lastUpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), name: __expectString, status: _json, + version: __expectString, }) as any; }; @@ -6211,11 +6263,14 @@ const _a = "alias"; const _aI = "assetId"; const _aMI = "assetModelId"; const _aMT = "assetModelTypes"; +const _aMV = "assetModelVersion"; const _aP = "aliasPrefix"; const _aT = "aggregateTypes"; const _cT = "clientToken"; +const _e = "etag"; const _eD = "endDate"; const _eP = "excludeProperties"; +const _eT = "eTag"; const _eTIS = "endTimeInSeconds"; const _eTOIN = "endTimeOffsetInNanos"; const _f = "filter"; @@ -6223,9 +6278,15 @@ const _hI = "hierarchyId"; const _iA = "iamArn"; const _iI = "identityId"; const _iIS = "intervalInSeconds"; +const _iM = "ifMatch"; +const _iNM = "ifNoneMatch"; const _iT = "identityType"; const _iWIS = "intervalWindowInSeconds"; +const _im = "if-match"; +const _inm = "if-none-match"; +const _mFVT = "matchForVersionType"; const _mR = "maxResults"; +const _mfvt = "match-for-version-type"; const _nT = "nextToken"; const _pA = "propertyAlias"; const _pI = "propertyId"; diff --git a/codegen/sdk-codegen/aws-models/iotsitewise.json b/codegen/sdk-codegen/aws-models/iotsitewise.json index 326b4d6e3e8e..8bfd1fc8e4d0 100644 --- a/codegen/sdk-codegen/aws-models/iotsitewise.json +++ b/codegen/sdk-codegen/aws-models/iotsitewise.json @@ -1741,6 +1741,18 @@ "com.amazonaws.iotsitewise#AssetModelCompositeModelDefinition": { "type": "structure", "members": { + "id": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "

    The ID to assign to the composite model, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required.\n However, if you prefer to supply your own ID instead, you can specify it here in UUID format.\n If you specify your own ID, it must be globally unique.

    " + } + }, + "externalId": { + "target": "com.amazonaws.iotsitewise#ExternalId", + "traits": { + "smithy.api#documentation": "

    An external ID to assign to the composite model. The external ID must be unique among\n composite models within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " + } + }, "name": { "target": "com.amazonaws.iotsitewise#Name", "traits": { @@ -1766,18 +1778,6 @@ "traits": { "smithy.api#documentation": "

    The asset property definitions for this composite model.

    " } - }, - "id": { - "target": "com.amazonaws.iotsitewise#ID", - "traits": { - "smithy.api#documentation": "

    The ID to assign to the composite model, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required.\n However, if you prefer to supply your own ID instead, you can specify it here in UUID format.\n If you specify your own ID, it must be globally unique.

    " - } - }, - "externalId": { - "target": "com.amazonaws.iotsitewise#ExternalId", - "traits": { - "smithy.api#documentation": "

    An external ID to assign to the composite model. The external ID must be unique among\n composite models within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " - } } }, "traits": { @@ -1890,6 +1890,12 @@ "smithy.api#documentation": "

    The ID of the asset model hierarchy. This ID is a hierarchyId.

    \n
      \n
    • \n

      If you are callling UpdateAssetModel to create a\n new hierarchy: You can specify its ID here, if desired.\n IoT SiteWise automatically generates a unique ID for you, so this parameter is never required.\n However, if you prefer to supply your own ID instead, you can specify it here in UUID format.\n If you specify your own ID, it must be globally unique.

      \n
    • \n
    • \n

      If you are calling UpdateAssetModel to modify an existing\n hierarchy: This can be either the actual ID in UUID format, or else externalId: followed by the external ID, if it has one.\n For more information, see Referencing objects with external IDs in the IoT SiteWise User Guide.

      \n
    • \n
    " } }, + "externalId": { + "target": "com.amazonaws.iotsitewise#ExternalId", + "traits": { + "smithy.api#documentation": "

    The external ID (if any) provided in the CreateAssetModel or UpdateAssetModel\n operation. You can assign an external ID by specifying\n this value as part of a call to UpdateAssetModel. However, you can't change the external ID if one is already assigned. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " + } + }, "name": { "target": "com.amazonaws.iotsitewise#Name", "traits": { @@ -1903,12 +1909,6 @@ "smithy.api#documentation": "

    The ID of the asset model, in UUID format. All assets in this hierarchy must be instances of the\n childAssetModelId asset model. IoT SiteWise will always return the actual\n asset model ID for this value. However, when you are specifying this value as part of a call to\n UpdateAssetModel, you may provide either the asset model ID or else externalId:\n followed by the asset model's external ID. For more information, see Using external IDs in the IoT SiteWise User Guide.\n

    ", "smithy.api#required": {} } - }, - "externalId": { - "target": "com.amazonaws.iotsitewise#ExternalId", - "traits": { - "smithy.api#documentation": "

    The external ID (if any) provided in the CreateAssetModel or UpdateAssetModel\n operation. You can assign an external ID by specifying\n this value as part of a call to UpdateAssetModel. However, you can't change the external ID if one is already assigned. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " - } } }, "traits": { @@ -1918,6 +1918,18 @@ "com.amazonaws.iotsitewise#AssetModelHierarchyDefinition": { "type": "structure", "members": { + "id": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "

    The ID to assign to the asset model hierarchy, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required.\n However, if you prefer to supply your own ID instead, you can specify it here in UUID format.\n If you specify your own ID, it must be globally unique.

    " + } + }, + "externalId": { + "target": "com.amazonaws.iotsitewise#ExternalId", + "traits": { + "smithy.api#documentation": "

    An external ID to assign to the asset model hierarchy. The external ID must be unique\n among asset model hierarchies within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " + } + }, "name": { "target": "com.amazonaws.iotsitewise#Name", "traits": { @@ -1931,18 +1943,6 @@ "smithy.api#documentation": "

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

    ", "smithy.api#required": {} } - }, - "id": { - "target": "com.amazonaws.iotsitewise#ID", - "traits": { - "smithy.api#documentation": "

    The ID to assign to the asset model hierarchy, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required.\n However, if you prefer to supply your own ID instead, you can specify it here in UUID format.\n If you specify your own ID, it must be globally unique.

    " - } - }, - "externalId": { - "target": "com.amazonaws.iotsitewise#ExternalId", - "traits": { - "smithy.api#documentation": "

    An external ID to assign to the asset model hierarchy. The external ID must be unique\n among asset model hierarchies within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " - } } }, "traits": { @@ -1970,6 +1970,12 @@ "smithy.api#documentation": "

    The ID of the asset model property.

    \n
      \n
    • \n

      If you are callling UpdateAssetModel to create a\n new property: You can specify its ID here, if desired.\n IoT SiteWise automatically generates a unique ID for you, so this parameter is never required.\n However, if you prefer to supply your own ID instead, you can specify it here in UUID format.\n If you specify your own ID, it must be globally unique.

      \n
    • \n
    • \n

      If you are calling UpdateAssetModel to modify an existing\n property: This can be either the actual ID in UUID format, or else externalId: followed by the external ID, if it has one.\n For more information, see Referencing objects with external IDs in the IoT SiteWise User Guide.

      \n
    • \n
    " } }, + "externalId": { + "target": "com.amazonaws.iotsitewise#ExternalId", + "traits": { + "smithy.api#documentation": "

    The external ID (if any) provided in the CreateAssetModel or UpdateAssetModel\n operation. You can assign an external ID by specifying\n this value as part of a call to UpdateAssetModel. However, you can't change the external ID if one is already assigned. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " + } + }, "name": { "target": "com.amazonaws.iotsitewise#Name", "traits": { @@ -2008,12 +2014,6 @@ "traits": { "smithy.api#documentation": "

    The structured path to the property from the root of the asset model.

    " } - }, - "externalId": { - "target": "com.amazonaws.iotsitewise#ExternalId", - "traits": { - "smithy.api#documentation": "

    The external ID (if any) provided in the CreateAssetModel or UpdateAssetModel\n operation. You can assign an external ID by specifying\n this value as part of a call to UpdateAssetModel. However, you can't change the external ID if one is already assigned. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " - } } }, "traits": { @@ -2023,6 +2023,18 @@ "com.amazonaws.iotsitewise#AssetModelPropertyDefinition": { "type": "structure", "members": { + "id": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "

    The ID to assign to the asset model property, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required.\n However, if you prefer to supply your own ID instead, you can specify it here in UUID format.\n If you specify your own ID, it must be globally unique.

    " + } + }, + "externalId": { + "target": "com.amazonaws.iotsitewise#ExternalId", + "traits": { + "smithy.api#documentation": "

    An external ID to assign to the property definition. The external ID must be unique among\n property definitions within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " + } + }, "name": { "target": "com.amazonaws.iotsitewise#Name", "traits": { @@ -2055,18 +2067,6 @@ "smithy.api#documentation": "

    The property definition type (see PropertyType). You can only specify one\n type in a property definition.

    ", "smithy.api#required": {} } - }, - "id": { - "target": "com.amazonaws.iotsitewise#ID", - "traits": { - "smithy.api#documentation": "

    The ID to assign to the asset model property, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required.\n However, if you prefer to supply your own ID instead, you can specify it here in UUID format.\n If you specify your own ID, it must be globally unique.

    " - } - }, - "externalId": { - "target": "com.amazonaws.iotsitewise#ExternalId", - "traits": { - "smithy.api#documentation": "

    An external ID to assign to the property definition. The external ID must be unique among\n property definitions within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " - } } }, "traits": { @@ -2120,6 +2120,12 @@ "smithy.api#documentation": "

    The ID of the property.

    " } }, + "externalId": { + "target": "com.amazonaws.iotsitewise#ExternalId", + "traits": { + "smithy.api#documentation": "

    The external ID of the property. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " + } + }, "name": { "target": "com.amazonaws.iotsitewise#Name", "traits": { @@ -2163,12 +2169,6 @@ "traits": { "smithy.api#documentation": "

    The structured path to the property from the root of the asset model.

    " } - }, - "externalId": { - "target": "com.amazonaws.iotsitewise#ExternalId", - "traits": { - "smithy.api#documentation": "

    The external ID of the property. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " - } } }, "traits": { @@ -2253,6 +2253,12 @@ "smithy.api#required": {} } }, + "externalId": { + "target": "com.amazonaws.iotsitewise#ExternalId", + "traits": { + "smithy.api#documentation": "

    The external ID of the asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " + } + }, "arn": { "target": "com.amazonaws.iotsitewise#ARN", "traits": { @@ -2267,6 +2273,12 @@ "smithy.api#required": {} } }, + "assetModelType": { + "target": "com.amazonaws.iotsitewise#AssetModelType", + "traits": { + "smithy.api#documentation": "

    The type of asset model.

    \n
      \n
    • \n

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

      \n
    • \n
    • \n

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

      \n
    • \n
    " + } + }, "description": { "target": "com.amazonaws.iotsitewise#Description", "traits": { @@ -2295,16 +2307,10 @@ "smithy.api#required": {} } }, - "assetModelType": { - "target": "com.amazonaws.iotsitewise#AssetModelType", + "version": { + "target": "com.amazonaws.iotsitewise#Version", "traits": { - "smithy.api#documentation": "

    The type of asset model.

    \n
      \n
    • \n

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

      \n
    • \n
    • \n

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

      \n
    • \n
    " - } - }, - "externalId": { - "target": "com.amazonaws.iotsitewise#ExternalId", - "traits": { - "smithy.api#documentation": "

    The external ID of the asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " + "smithy.api#documentation": "

    The version number of the asset model.

    " } } }, @@ -2329,6 +2335,29 @@ } } }, + "com.amazonaws.iotsitewise#AssetModelVersionFilter": { + "type": "string", + "traits": { + "smithy.api#pattern": "^(LATEST|ACTIVE)$" + } + }, + "com.amazonaws.iotsitewise#AssetModelVersionType": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LATEST" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + } + } + }, "com.amazonaws.iotsitewise#AssetProperties": { "type": "list", "member": { @@ -4885,6 +4914,9 @@ { "target": "com.amazonaws.iotsitewise#LimitExceededException" }, + { + "target": "com.amazonaws.iotsitewise#PreconditionFailedException" + }, { "target": "com.amazonaws.iotsitewise#ResourceAlreadyExistsException" }, @@ -4918,18 +4950,18 @@ "smithy.api#required": {} } }, - "parentAssetModelCompositeModelId": { - "target": "com.amazonaws.iotsitewise#CustomID", - "traits": { - "smithy.api#documentation": "

    The ID of the parent composite model in this asset model relationship.

    " - } - }, "assetModelCompositeModelExternalId": { "target": "com.amazonaws.iotsitewise#ExternalId", "traits": { "smithy.api#documentation": "

    An external ID to assign to the composite model.

    \n

    If the composite model is a derived composite model, or one nested inside a component\n model, you can only set the external ID using UpdateAssetModelCompositeModel and\n specifying the derived ID of the model or property from the created model it's a part\n of.

    " } }, + "parentAssetModelCompositeModelId": { + "target": "com.amazonaws.iotsitewise#CustomID", + "traits": { + "smithy.api#documentation": "

    The ID of the parent composite model in this asset model relationship.

    " + } + }, "assetModelCompositeModelId": { "target": "com.amazonaws.iotsitewise#ID", "traits": { @@ -4974,6 +5006,27 @@ "traits": { "smithy.api#documentation": "

    The property definitions of the composite model. For more information, see \n Inline custom composite models in the IoT SiteWise User Guide.

    \n

    You can specify up to 200 properties per composite model. For more\n information, see Quotas in the IoT SiteWise User Guide.

    " } + }, + "ifMatch": { + "target": "com.amazonaws.iotsitewise#ETag", + "traits": { + "smithy.api#documentation": "

    The expected current entity tag (ETag) for the asset model’s latest or active version (specified using matchForVersionType). \n The create request is rejected if the tag does not match the latest or active version's current entity tag.\n See Optimistic locking for asset model writes\n in the IoT SiteWise User Guide.

    ", + "smithy.api#httpHeader": "If-Match" + } + }, + "ifNoneMatch": { + "target": "com.amazonaws.iotsitewise#SelectAll", + "traits": { + "smithy.api#documentation": "

    Accepts * to reject the create request if an active version \n (specified using matchForVersionType as ACTIVE) already exists for the asset model.

    ", + "smithy.api#httpHeader": "If-None-Match" + } + }, + "matchForVersionType": { + "target": "com.amazonaws.iotsitewise#AssetModelVersionType", + "traits": { + "smithy.api#documentation": "

    Specifies the asset model version type (LATEST or ACTIVE) used in \n conjunction with If-Match or If-None-Match headers to determine the target ETag for the create operation.

    ", + "smithy.api#httpHeader": "Match-For-Version-Type" + } } }, "traits": { @@ -5018,6 +5071,24 @@ "smithy.api#required": {} } }, + "assetModelType": { + "target": "com.amazonaws.iotsitewise#AssetModelType", + "traits": { + "smithy.api#documentation": "

    The type of asset model.

    \n
      \n
    • \n

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

      \n
    • \n
    • \n

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

      \n
    • \n
    " + } + }, + "assetModelId": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "

    The ID to assign to the asset model, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required.\n However, if you prefer to supply your own ID instead, you can specify it here in UUID format.\n If you specify your own ID, it must be globally unique.

    " + } + }, + "assetModelExternalId": { + "target": "com.amazonaws.iotsitewise#ExternalId", + "traits": { + "smithy.api#documentation": "

    An external ID to assign to the asset model. The external ID must be unique within your Amazon Web Services account. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " + } + }, "assetModelDescription": { "target": "com.amazonaws.iotsitewise#Description", "traits": { @@ -5054,24 +5125,6 @@ "traits": { "smithy.api#documentation": "

    A list of key-value pairs that contain metadata for the asset model. For more information,\n see Tagging your IoT SiteWise\n resources in the IoT SiteWise User Guide.

    " } - }, - "assetModelId": { - "target": "com.amazonaws.iotsitewise#ID", - "traits": { - "smithy.api#documentation": "

    The ID to assign to the asset model, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required.\n However, if you prefer to supply your own ID instead, you can specify it here in UUID format.\n If you specify your own ID, it must be globally unique.

    " - } - }, - "assetModelExternalId": { - "target": "com.amazonaws.iotsitewise#ExternalId", - "traits": { - "smithy.api#documentation": "

    An external ID to assign to the asset model. The external ID must be unique within your Amazon Web Services account. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " - } - }, - "assetModelType": { - "target": "com.amazonaws.iotsitewise#AssetModelType", - "traits": { - "smithy.api#documentation": "

    The type of asset model.

    \n
      \n
    • \n

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

      \n
    • \n
    • \n

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

      \n
    • \n
    " - } } }, "traits": { @@ -6029,6 +6082,9 @@ { "target": "com.amazonaws.iotsitewise#InvalidRequestException" }, + { + "target": "com.amazonaws.iotsitewise#PreconditionFailedException" + }, { "target": "com.amazonaws.iotsitewise#ResourceNotFoundException" }, @@ -6066,6 +6122,9 @@ { "target": "com.amazonaws.iotsitewise#InvalidRequestException" }, + { + "target": "com.amazonaws.iotsitewise#PreconditionFailedException" + }, { "target": "com.amazonaws.iotsitewise#ResourceNotFoundException" }, @@ -6111,6 +6170,27 @@ "smithy.api#httpQuery": "clientToken", "smithy.api#idempotencyToken": {} } + }, + "ifMatch": { + "target": "com.amazonaws.iotsitewise#ETag", + "traits": { + "smithy.api#documentation": "

    The expected current entity tag (ETag) for the asset model’s latest or active version (specified using matchForVersionType). \n The delete request is rejected if the tag does not match the latest or active version's current entity tag.\n See Optimistic locking for asset model writes\n in the IoT SiteWise User Guide.

    ", + "smithy.api#httpHeader": "If-Match" + } + }, + "ifNoneMatch": { + "target": "com.amazonaws.iotsitewise#SelectAll", + "traits": { + "smithy.api#documentation": "

    Accepts * to reject the delete request if an active version \n (specified using matchForVersionType as ACTIVE) already exists for the asset model.

    ", + "smithy.api#httpHeader": "If-None-Match" + } + }, + "matchForVersionType": { + "target": "com.amazonaws.iotsitewise#AssetModelVersionType", + "traits": { + "smithy.api#documentation": "

    Specifies the asset model version type (LATEST or ACTIVE) used in \n conjunction with If-Match or If-None-Match headers to determine the target ETag for the delete operation.

    ", + "smithy.api#httpHeader": "Match-For-Version-Type" + } } }, "traits": { @@ -6149,6 +6229,27 @@ "smithy.api#httpQuery": "clientToken", "smithy.api#idempotencyToken": {} } + }, + "ifMatch": { + "target": "com.amazonaws.iotsitewise#ETag", + "traits": { + "smithy.api#documentation": "

    The expected current entity tag (ETag) for the asset model’s latest or active version (specified using matchForVersionType). \n The delete request is rejected if the tag does not match the latest or active version's current entity tag.\n See Optimistic locking for asset model writes\n in the IoT SiteWise User Guide.

    ", + "smithy.api#httpHeader": "If-Match" + } + }, + "ifNoneMatch": { + "target": "com.amazonaws.iotsitewise#SelectAll", + "traits": { + "smithy.api#documentation": "

    Accepts * to reject the delete request if an active version \n (specified using matchForVersionType as ACTIVE) already exists for the asset model.

    ", + "smithy.api#httpHeader": "If-None-Match" + } + }, + "matchForVersionType": { + "target": "com.amazonaws.iotsitewise#AssetModelVersionType", + "traits": { + "smithy.api#documentation": "

    Specifies the asset model version type (LATEST or ACTIVE) used in \n conjunction with If-Match or If-None-Match headers to determine the target ETag for the delete operation.

    ", + "smithy.api#httpHeader": "Match-For-Version-Type" + } } }, "traits": { @@ -7074,6 +7175,13 @@ "smithy.api#httpLabel": {}, "smithy.api#required": {} } + }, + "assetModelVersion": { + "target": "com.amazonaws.iotsitewise#AssetModelVersionFilter", + "traits": { + "smithy.api#documentation": "

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

    ", + "smithy.api#httpQuery": "assetModelVersion" + } } }, "traits": { @@ -7180,6 +7288,13 @@ "smithy.api#documentation": "

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

    ", "smithy.api#httpQuery": "excludeProperties" } + }, + "assetModelVersion": { + "target": "com.amazonaws.iotsitewise#AssetModelVersionFilter", + "traits": { + "smithy.api#documentation": "

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

    ", + "smithy.api#httpQuery": "assetModelVersion" + } } }, "traits": { @@ -7196,6 +7311,12 @@ "smithy.api#required": {} } }, + "assetModelExternalId": { + "target": "com.amazonaws.iotsitewise#ExternalId", + "traits": { + "smithy.api#documentation": "

    The external ID of the asset model, if any.

    " + } + }, "assetModelArn": { "target": "com.amazonaws.iotsitewise#ARN", "traits": { @@ -7210,6 +7331,12 @@ "smithy.api#required": {} } }, + "assetModelType": { + "target": "com.amazonaws.iotsitewise#AssetModelType", + "traits": { + "smithy.api#documentation": "

    The type of asset model.

    \n
      \n
    • \n

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

      \n
    • \n
    • \n

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

      \n
    • \n
    " + } + }, "assetModelDescription": { "target": "com.amazonaws.iotsitewise#Description", "traits": { @@ -7237,6 +7364,12 @@ "smithy.api#documentation": "

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

    " } }, + "assetModelCompositeModelSummaries": { + "target": "com.amazonaws.iotsitewise#AssetModelCompositeModelSummaries", + "traits": { + "smithy.api#documentation": "

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

    " + } + }, "assetModelCreationDate": { "target": "com.amazonaws.iotsitewise#Timestamp", "traits": { @@ -7258,22 +7391,17 @@ "smithy.api#required": {} } }, - "assetModelType": { - "target": "com.amazonaws.iotsitewise#AssetModelType", - "traits": { - "smithy.api#documentation": "

    The type of asset model.

    \n
      \n
    • \n

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

      \n
    • \n
    • \n

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

      \n
    • \n
    " - } - }, - "assetModelCompositeModelSummaries": { - "target": "com.amazonaws.iotsitewise#AssetModelCompositeModelSummaries", + "assetModelVersion": { + "target": "com.amazonaws.iotsitewise#Version", "traits": { - "smithy.api#documentation": "

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

    " + "smithy.api#documentation": "

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

    " } }, - "assetModelExternalId": { - "target": "com.amazonaws.iotsitewise#ExternalId", + "eTag": { + "target": "com.amazonaws.iotsitewise#ETag", "traits": { - "smithy.api#documentation": "

    The external ID of the asset model, if any.

    " + "smithy.api#documentation": "

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

    \n

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

    ", + "smithy.api#httpHeader": "ETag" } } }, @@ -8823,6 +8951,12 @@ } } }, + "com.amazonaws.iotsitewise#ETag": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[\\w-]{43}$" + } + }, "com.amazonaws.iotsitewise#Email": { "type": "string", "traits": { @@ -10684,6 +10818,13 @@ "smithy.api#documentation": "

    The maximum number of results to return for each paginated request.

    \n

    Default: 50

    ", "smithy.api#httpQuery": "maxResults" } + }, + "assetModelVersion": { + "target": "com.amazonaws.iotsitewise#AssetModelVersionFilter", + "traits": { + "smithy.api#documentation": "

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

    ", + "smithy.api#httpQuery": "assetModelVersion" + } } }, "traits": { @@ -10799,6 +10940,13 @@ "smithy.api#documentation": "

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

    \n
      \n
    • \n

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

      \n
    • \n
    • \n

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

      \n
    • \n
    \n

    Default: BASE\n

    ", "smithy.api#httpQuery": "filter" } + }, + "assetModelVersion": { + "target": "com.amazonaws.iotsitewise#AssetModelVersionFilter", + "traits": { + "smithy.api#documentation": "

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

    ", + "smithy.api#httpQuery": "assetModelVersion" + } } }, "traits": { @@ -10866,6 +11014,13 @@ "com.amazonaws.iotsitewise#ListAssetModelsRequest": { "type": "structure", "members": { + "assetModelTypes": { + "target": "com.amazonaws.iotsitewise#ListAssetModelsTypeFilter", + "traits": { + "smithy.api#documentation": "

    The type of asset model. If you don't provide an assetModelTypes, all types of asset models are returned.

    \n
      \n
    • \n

      \n ASSET_MODEL – An asset model that you can use to create assets.\n \t\tCan't be included as a component in another asset model.

      \n
    • \n
    • \n

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

      \n
    • \n
    ", + "smithy.api#httpQuery": "assetModelTypes" + } + }, "nextToken": { "target": "com.amazonaws.iotsitewise#NextToken", "traits": { @@ -10880,11 +11035,11 @@ "smithy.api#httpQuery": "maxResults" } }, - "assetModelTypes": { - "target": "com.amazonaws.iotsitewise#ListAssetModelsTypeFilter", + "assetModelVersion": { + "target": "com.amazonaws.iotsitewise#AssetModelVersionFilter", "traits": { - "smithy.api#documentation": "

    The type of asset model.

    \n
      \n
    • \n

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

      \n
    • \n
    • \n

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

      \n
    • \n
    ", - "smithy.api#httpQuery": "assetModelTypes" + "smithy.api#documentation": "

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

    ", + "smithy.api#httpQuery": "assetModelVersion" } } }, @@ -11270,7 +11425,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Retrieves a paginated list of associated assets.

    \n

    You can use this operation to do the following:

    \n
      \n
    • \n

      List child assets associated to a parent asset by a hierarchy that you specify.

      \n
    • \n
    • \n

      List an asset's parent asset.

      \n
    • \n
    ", + "smithy.api#documentation": "

    Retrieves a paginated list of associated assets.

    \n

    You can use this operation to do the following:

    \n
      \n
    • \n

      \n CHILD - List all child assets associated to the asset.

      \n
    • \n
    • \n

      \n PARENT - List the asset's parent asset.

      \n
    • \n
    ", "smithy.api#endpoint": { "hostPrefix": "api." }, @@ -11301,14 +11456,14 @@ "hierarchyId": { "target": "com.amazonaws.iotsitewise#CustomID", "traits": { - "smithy.api#documentation": "

    The ID of the hierarchy by which child assets are associated to the asset.\n (This can be either the actual ID in UUID format, or else externalId: followed by the external ID, if it has one.\n For more information, see Referencing objects with external IDs in the IoT SiteWise User Guide.) To find a hierarchy ID, use the DescribeAsset or DescribeAssetModel operations. This parameter is required if you choose\n CHILD for traversalDirection.

    \n

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

    ", + "smithy.api#documentation": "

    (Optional) If you don't provide a hierarchyId, all the immediate assets in the traversalDirection will be returned.

    \n

    \n The ID of the hierarchy by which child assets are associated to the asset. (This can be either the actual ID in UUID format, or else externalId: followed by the external ID, if it has one.\n For more information, see Referencing objects with external IDs in the IoT SiteWise User Guide.)

    \n

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

    ", "smithy.api#httpQuery": "hierarchyId" } }, "traversalDirection": { "target": "com.amazonaws.iotsitewise#TraversalDirection", "traits": { - "smithy.api#documentation": "

    The direction to list associated assets. Choose one of the following options:

    \n
      \n
    • \n

      \n CHILD – The list includes all child assets associated to the\n asset. The hierarchyId parameter is required if you choose\n CHILD.

      \n
    • \n
    • \n

      \n PARENT – The list includes the asset's parent asset.

      \n
    • \n
    \n

    Default: CHILD\n

    ", + "smithy.api#documentation": "

    The direction to list associated assets. Choose one of the following options:

    \n
      \n
    • \n

      \n CHILD – The list includes all child assets associated to the\n asset.

      \n
    • \n
    • \n

      \n PARENT – The list includes the asset's parent asset.

      \n
    • \n
    \n

    Default: CHILD\n

    ", "smithy.api#httpQuery": "traversalDirection" } }, @@ -12635,6 +12790,36 @@ "smithy.api#documentation": "

    Contains a portal summary.

    " } }, + "com.amazonaws.iotsitewise#PreconditionFailedException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.iotsitewise#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + }, + "resourceId": { + "target": "com.amazonaws.iotsitewise#ResourceId", + "traits": { + "smithy.api#documentation": "

    The ID of the resource on which precondition failed with this operation.

    ", + "smithy.api#required": {} + } + }, + "resourceArn": { + "target": "com.amazonaws.iotsitewise#ResourceArn", + "traits": { + "smithy.api#documentation": "

    The ARN of the resource on which precondition failed with this operation.

    ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

    The precondition in one or more of the request-header fields evaluated to FALSE.

    ", + "smithy.api#error": "client", + "smithy.api#httpError": 412 + } + }, "com.amazonaws.iotsitewise#ProjectResource": { "type": "structure", "members": { @@ -13470,6 +13655,12 @@ "com.amazonaws.iotsitewise#ScalarValue": { "type": "string" }, + "com.amazonaws.iotsitewise#SelectAll": { + "type": "string", + "traits": { + "smithy.api#pattern": "^\\*$" + } + }, "com.amazonaws.iotsitewise#ServiceUnavailableException": { "type": "structure", "members": { @@ -14175,6 +14366,9 @@ { "target": "com.amazonaws.iotsitewise#LimitExceededException" }, + { + "target": "com.amazonaws.iotsitewise#PreconditionFailedException" + }, { "target": "com.amazonaws.iotsitewise#ResourceAlreadyExistsException" }, @@ -14218,6 +14412,9 @@ { "target": "com.amazonaws.iotsitewise#LimitExceededException" }, + { + "target": "com.amazonaws.iotsitewise#PreconditionFailedException" + }, { "target": "com.amazonaws.iotsitewise#ResourceAlreadyExistsException" }, @@ -14290,6 +14487,27 @@ "traits": { "smithy.api#documentation": "

    The property definitions of the composite model. For more information, see \n Inline custom composite models in the IoT SiteWise User Guide.

    \n

    You can specify up to 200 properties per composite model. For more\n information, see Quotas in the IoT SiteWise User Guide.

    " } + }, + "ifMatch": { + "target": "com.amazonaws.iotsitewise#ETag", + "traits": { + "smithy.api#documentation": "

    The expected current entity tag (ETag) for the asset model’s latest or active version (specified using matchForVersionType). \n The update request is rejected if the tag does not match the latest or active version's current entity tag.\n See Optimistic locking for asset model writes\n in the IoT SiteWise User Guide.

    ", + "smithy.api#httpHeader": "If-Match" + } + }, + "ifNoneMatch": { + "target": "com.amazonaws.iotsitewise#SelectAll", + "traits": { + "smithy.api#documentation": "

    Accepts * to reject the update request if an active version \n (specified using matchForVersionType as ACTIVE) already exists for the asset model.

    ", + "smithy.api#httpHeader": "If-None-Match" + } + }, + "matchForVersionType": { + "target": "com.amazonaws.iotsitewise#AssetModelVersionType", + "traits": { + "smithy.api#documentation": "

    Specifies the asset model version type (LATEST or ACTIVE) used in \n conjunction with If-Match or If-None-Match headers to determine the target ETag for the update operation.

    ", + "smithy.api#httpHeader": "Match-For-Version-Type" + } } }, "traits": { @@ -14328,6 +14546,12 @@ "smithy.api#required": {} } }, + "assetModelExternalId": { + "target": "com.amazonaws.iotsitewise#ExternalId", + "traits": { + "smithy.api#documentation": "

    An external ID to assign to the asset model. The asset model must not already have an\n external ID. The external ID must be unique within your Amazon Web Services account. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " + } + }, "assetModelName": { "target": "com.amazonaws.iotsitewise#Name", "traits": { @@ -14366,10 +14590,25 @@ "smithy.api#idempotencyToken": {} } }, - "assetModelExternalId": { - "target": "com.amazonaws.iotsitewise#ExternalId", + "ifMatch": { + "target": "com.amazonaws.iotsitewise#ETag", "traits": { - "smithy.api#documentation": "

    An external ID to assign to the asset model. The asset model must not already have an\n external ID. The external ID must be unique within your Amazon Web Services account. For more information, see Using external IDs in the IoT SiteWise User Guide.

    " + "smithy.api#documentation": "

    The expected current entity tag (ETag) for the asset model’s latest or active version (specified using matchForVersionType). \n The update request is rejected if the tag does not match the latest or active version's current entity tag.\n See Optimistic locking for asset model writes\n in the IoT SiteWise User Guide.

    ", + "smithy.api#httpHeader": "If-Match" + } + }, + "ifNoneMatch": { + "target": "com.amazonaws.iotsitewise#SelectAll", + "traits": { + "smithy.api#documentation": "

    Accepts * to reject the update request if an active version \n (specified using matchForVersionType as ACTIVE) already exists for the asset model.

    ", + "smithy.api#httpHeader": "If-None-Match" + } + }, + "matchForVersionType": { + "target": "com.amazonaws.iotsitewise#AssetModelVersionType", + "traits": { + "smithy.api#documentation": "

    Specifies the asset model version type (LATEST or ACTIVE) used in \n conjunction with If-Match or If-None-Match headers to determine the target ETag for the update operation.

    ", + "smithy.api#httpHeader": "Match-For-Version-Type" } } }, @@ -15071,6 +15310,16 @@ "smithy.api#documentation": "

    Contains an asset property value (of a single type only).

    " } }, + "com.amazonaws.iotsitewise#Version": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + }, + "smithy.api#pattern": "^(0|([1-9]{1}\\d*))$" + } + }, "com.amazonaws.iotsitewise#WarmTierRetentionPeriod": { "type": "structure", "members": {