Skip to content

Commit

Permalink
feat(client-iotsitewise): AWS IoT SiteWise now supports ingestion and…
Browse files Browse the repository at this point in the history
… querying of Null (all data types) and NaN (double type) values of bad or uncertain data quality. New partial error handling prevents data loss during ingestion. Enabled by default for new customers; existing customers can opt-in.
  • Loading branch information
awstools committed Jan 21, 2025
1 parent c6e07aa commit a0e3771
Show file tree
Hide file tree
Showing 13 changed files with 263 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ export interface BatchGetAssetPropertyValueCommandOutput extends BatchGetAssetPr
* // integerValue: Number("int"),
* // doubleValue: Number("double"),
* // booleanValue: true || false,
* // nullValue: { // PropertyValueNullValue
* // valueType: "D" || "B" || "S" || "I" || "U", // required
* // },
* // },
* // timestamp: { // TimeInNanos
* // timeInSeconds: Number("long"), // required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ export interface BatchGetAssetPropertyValueHistoryCommandOutput
* // integerValue: Number("int"),
* // doubleValue: Number("double"),
* // booleanValue: true || false,
* // nullValue: { // PropertyValueNullValue
* // valueType: "D" || "B" || "S" || "I" || "U", // required
* // },
* // },
* // timestamp: { // TimeInNanos
* // timeInSeconds: Number("long"), // required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export interface BatchPutAssetPropertyValueCommandOutput extends BatchPutAssetPr
* // const { IoTSiteWiseClient, BatchPutAssetPropertyValueCommand } = require("@aws-sdk/client-iotsitewise"); // CommonJS import
* const client = new IoTSiteWiseClient(config);
* const input = { // BatchPutAssetPropertyValueRequest
* enablePartialEntryProcessing: true || false,
* entries: [ // PutAssetPropertyValueEntries // required
* { // PutAssetPropertyValueEntry
* entryId: "STRING_VALUE", // required
Expand All @@ -73,6 +74,9 @@ export interface BatchPutAssetPropertyValueCommandOutput extends BatchPutAssetPr
* integerValue: Number("int"),
* doubleValue: Number("double"),
* booleanValue: true || false,
* nullValue: { // PropertyValueNullValue
* valueType: "D" || "B" || "S" || "I" || "U", // required
* },
* },
* timestamp: { // TimeInNanos
* timeInSeconds: Number("long"), // required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export interface DescribeStorageConfigurationCommandOutput
* // numberOfDays: Number("int"),
* // unlimited: true || false,
* // },
* // disallowIngestNullNaN: true || false,
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ export interface GetAssetPropertyValueCommandOutput extends GetAssetPropertyValu
* // integerValue: Number("int"),
* // doubleValue: Number("double"),
* // booleanValue: true || false,
* // nullValue: { // PropertyValueNullValue
* // valueType: "D" || "B" || "S" || "I" || "U", // required
* // },
* // },
* // timestamp: { // TimeInNanos
* // timeInSeconds: Number("long"), // required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ export interface GetAssetPropertyValueHistoryCommandOutput
* // integerValue: Number("int"),
* // doubleValue: Number("double"),
* // booleanValue: true || false,
* // nullValue: { // PropertyValueNullValue
* // valueType: "D" || "B" || "S" || "I" || "U", // required
* // },
* // },
* // timestamp: { // TimeInNanos
* // timeInSeconds: Number("long"), // required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ export interface GetInterpolatedAssetPropertyValuesCommandOutput
* // integerValue: Number("int"),
* // doubleValue: Number("double"),
* // booleanValue: true || false,
* // nullValue: { // PropertyValueNullValue
* // valueType: "D" || "B" || "S" || "I" || "U", // required
* // },
* // },
* // },
* // ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { IoTSiteWiseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTSiteWiseClient";
import { ListAssociatedAssetsRequest } from "../models/models_0";
import { ListAssociatedAssetsResponse } from "../models/models_1";
import { ListAssociatedAssetsRequest, ListAssociatedAssetsResponse } from "../models/models_1";
import { de_ListAssociatedAssetsCommand, se_ListAssociatedAssetsCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export interface PutStorageConfigurationCommandOutput extends PutStorageConfigur
* numberOfDays: Number("int"),
* unlimited: true || false,
* },
* disallowIngestNullNaN: true || false,
* };
* const command = new PutStorageConfigurationCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -81,6 +82,7 @@ export interface PutStorageConfigurationCommandOutput extends PutStorageConfigur
* // numberOfDays: Number("int"),
* // unlimited: true || false,
* // },
* // disallowIngestNullNaN: true || false,
* // };
*
* ```
Expand Down
128 changes: 57 additions & 71 deletions clients/client-iotsitewise/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1873,13 +1873,45 @@ export interface TimeInNanos {
offsetInNanos?: number | undefined;
}

/**
* @public
* @enum
*/
export const RawValueType = {
BOOLEAN: "B",
DOUBLE: "D",
INTEGER: "I",
STRING: "S",
UNKNOWN: "U",
} as const;

/**
* @public
*/
export type RawValueType = (typeof RawValueType)[keyof typeof RawValueType];

/**
* <p>The value type of null asset property data with BAD and UNCERTAIN qualities.</p>
* @public
*/
export interface PropertyValueNullValue {
/**
* <p>The type of null asset property data.</p>
* @public
*/
valueType: RawValueType | undefined;
}

/**
* <p>Contains an asset property value (of a single type only).</p>
* @public
*/
export interface Variant {
/**
* <p>Asset property data of type string (sequence of characters).</p>
* <p>
* Asset property data of type string (sequence of characters).
* The allowed pattern: "^$|[^\u0000-\u001F\u007F]+". The max length is 1024.
* </p>
* @public
*/
stringValue?: string | undefined;
Expand All @@ -1891,7 +1923,10 @@ export interface Variant {
integerValue?: number | undefined;

/**
* <p>Asset property data of type double (floating point number).</p>
* <p>
* Asset property data of type double (floating point number). The min value is -10^10.
* The max value is 10^10. Double.NaN is allowed.
* </p>
* @public
*/
doubleValue?: number | undefined;
Expand All @@ -1901,6 +1936,12 @@ export interface Variant {
* @public
*/
booleanValue?: boolean | undefined;

/**
* <p>The type of null asset property data with BAD and UNCERTAIN qualities.</p>
* @public
*/
nullValue?: PropertyValueNullValue | undefined;
}

/**
Expand Down Expand Up @@ -3247,6 +3288,13 @@ export interface PutAssetPropertyValueEntry {
* @public
*/
export interface BatchPutAssetPropertyValueRequest {
/**
* <p>This setting enables partial ingestion at entry-level. If set to <code>true</code>, we ingest all TQVs not resulting in an error. If set to
* <code>false</code>, an invalid TQV fails ingestion of the entire entry that contains it.</p>
* @public
*/
enablePartialEntryProcessing?: boolean | undefined;

/**
* <p>The list of asset property value entries for the batch put request. You can specify up to
* 10 entries per request.</p>
Expand Down Expand Up @@ -6745,6 +6793,13 @@ export interface DescribeStorageConfigurationResponse {
* @public
*/
warmTierRetentionPeriod?: WarmTierRetentionPeriod | undefined;

/**
* <p>Describes the configuration for ingesting NULL and NaN data.
* By default the feature is allowed. The feature is disallowed if the value is <code>true</code>.</p>
* @public
*/
disallowIngestNullNaN?: boolean | undefined;
}

/**
Expand Down Expand Up @@ -8440,75 +8495,6 @@ export interface ListAssetsResponse {
nextToken?: string | undefined;
}

/**
* @public
* @enum
*/
export const TraversalDirection = {
CHILD: "CHILD",
PARENT: "PARENT",
} as const;

/**
* @public
*/
export type TraversalDirection = (typeof TraversalDirection)[keyof typeof TraversalDirection];

/**
* @public
*/
export interface ListAssociatedAssetsRequest {
/**
* <p>The ID of the asset to query. This can be either the actual ID in UUID format, or else <code>externalId:</code> followed by the external ID, if it has one.
* For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/object-ids.html#external-id-references">Referencing objects with external IDs</a> in the <i>IoT SiteWise User Guide</i>.</p>
* @public
*/
assetId: string | undefined;

/**
* <p>(Optional) If you don't provide a <code>hierarchyId</code>, all the immediate assets in
* the <code>traversalDirection</code> will be returned. </p>
* <p> 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 <code>externalId:</code> followed by the external ID, if it has one.
* For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/object-ids.html#external-id-references">Referencing objects with external IDs</a> in the <i>IoT SiteWise User Guide</i>.)</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-hierarchies.html">Asset hierarchies</a> in the <i>IoT SiteWise User Guide</i>.</p>
* @public
*/
hierarchyId?: string | undefined;

/**
* <p>The direction to list associated assets. Choose one of the following options:</p>
* <ul>
* <li>
* <p>
* <code>CHILD</code> – The list includes all child assets associated to the
* asset.</p>
* </li>
* <li>
* <p>
* <code>PARENT</code> – The list includes the asset's parent asset.</p>
* </li>
* </ul>
* <p>Default: <code>CHILD</code>
* </p>
* @public
*/
traversalDirection?: TraversalDirection | undefined;

/**
* <p>The token to be used for the next set of paginated results.</p>
* @public
*/
nextToken?: string | undefined;

/**
* <p>The maximum number of results to return for each paginated request.</p>
* <p>Default: 50</p>
* @public
*/
maxResults?: number | undefined;
}

/**
* @internal
*/
Expand Down
83 changes: 83 additions & 0 deletions clients/client-iotsitewise/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,75 @@ import {
WarmTierState,
} from "./models_0";

/**
* @public
* @enum
*/
export const TraversalDirection = {
CHILD: "CHILD",
PARENT: "PARENT",
} as const;

/**
* @public
*/
export type TraversalDirection = (typeof TraversalDirection)[keyof typeof TraversalDirection];

/**
* @public
*/
export interface ListAssociatedAssetsRequest {
/**
* <p>The ID of the asset to query. This can be either the actual ID in UUID format, or else <code>externalId:</code> followed by the external ID, if it has one.
* For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/object-ids.html#external-id-references">Referencing objects with external IDs</a> in the <i>IoT SiteWise User Guide</i>.</p>
* @public
*/
assetId: string | undefined;

/**
* <p>(Optional) If you don't provide a <code>hierarchyId</code>, all the immediate assets in
* the <code>traversalDirection</code> will be returned. </p>
* <p> 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 <code>externalId:</code> followed by the external ID, if it has one.
* For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/object-ids.html#external-id-references">Referencing objects with external IDs</a> in the <i>IoT SiteWise User Guide</i>.)</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-hierarchies.html">Asset hierarchies</a> in the <i>IoT SiteWise User Guide</i>.</p>
* @public
*/
hierarchyId?: string | undefined;

/**
* <p>The direction to list associated assets. Choose one of the following options:</p>
* <ul>
* <li>
* <p>
* <code>CHILD</code> – The list includes all child assets associated to the
* asset.</p>
* </li>
* <li>
* <p>
* <code>PARENT</code> – The list includes the asset's parent asset.</p>
* </li>
* </ul>
* <p>Default: <code>CHILD</code>
* </p>
* @public
*/
traversalDirection?: TraversalDirection | undefined;

/**
* <p>The token to be used for the next set of paginated results.</p>
* @public
*/
nextToken?: string | undefined;

/**
* <p>The maximum number of results to return for each paginated request.</p>
* <p>Default: 50</p>
* @public
*/
maxResults?: number | undefined;
}

/**
* @public
*/
Expand Down Expand Up @@ -1020,6 +1089,13 @@ export interface PutStorageConfigurationRequest {
* @public
*/
warmTierRetentionPeriod?: WarmTierRetentionPeriod | undefined;

/**
* <p>Describes the configuration for ingesting NULL and NaN data.
* By default the feature is allowed. The feature is disallowed if the value is <code>true</code>.</p>
* @public
*/
disallowIngestNullNaN?: boolean | undefined;
}

/**
Expand Down Expand Up @@ -1096,6 +1172,13 @@ export interface PutStorageConfigurationResponse {
* @public
*/
warmTierRetentionPeriod?: WarmTierRetentionPeriod | undefined;

/**
* <p>Describes the configuration for ingesting NULL and NaN data.
* By default the feature is allowed. The feature is disallowed if the value is <code>true</code>.</p>
* @public
*/
disallowIngestNullNaN?: boolean | undefined;
}

/**
Expand Down
Loading

0 comments on commit a0e3771

Please sign in to comment.