Skip to content

Commit f35b0f3

Browse files
author
awstools
committed
feat(client-lookoutequipment): This release adds the following new features: 1) Introduces an option for automatic schema creation 2) Now allows for Ingestion of data containing most common errors and allows automatic data cleaning 3) Introduces new API ListSensorStatistics that gives further information about the ingested data
1 parent 0aa6ba2 commit f35b0f3

File tree

11 files changed

+2009
-61
lines changed

11 files changed

+2009
-61
lines changed

clients/client-lookoutequipment/src/LookoutEquipment.ts

+41-2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ import {
6363
ListInferenceSchedulersCommandOutput,
6464
} from "./commands/ListInferenceSchedulersCommand";
6565
import { ListModelsCommand, ListModelsCommandInput, ListModelsCommandOutput } from "./commands/ListModelsCommand";
66+
import {
67+
ListSensorStatisticsCommand,
68+
ListSensorStatisticsCommandInput,
69+
ListSensorStatisticsCommandOutput,
70+
} from "./commands/ListSensorStatisticsCommand";
6671
import {
6772
ListTagsForResourceCommand,
6873
ListTagsForResourceCommandInput,
@@ -304,7 +309,7 @@ export class LookoutEquipment extends LookoutEquipmentClient {
304309

305310
/**
306311
* <p>Provides information on a specific data ingestion job such as creation time, dataset
307-
* ARN, status, and so on. </p>
312+
* ARN, and status.</p>
308313
*/
309314
public describeDataIngestionJob(
310315
args: DescribeDataIngestionJobCommandInput,
@@ -336,7 +341,7 @@ export class LookoutEquipment extends LookoutEquipmentClient {
336341
}
337342

338343
/**
339-
* <p>Provides a JSON description of the data that is in each time series dataset, including names, column names, and data types.</p>
344+
* <p>Provides a JSON description of the data in each time series dataset, including names, column names, and data types.</p>
340345
*/
341346
public describeDataset(
342347
args: DescribeDatasetCommandInput,
@@ -589,6 +594,40 @@ export class LookoutEquipment extends LookoutEquipmentClient {
589594
}
590595
}
591596

597+
/**
598+
* <p>
599+
* Lists statistics about the data collected for each of the sensors that have been successfully ingested in the particular dataset. Can also be used to retreive Sensor Statistics for a previous ingestion job.
600+
* </p>
601+
*/
602+
public listSensorStatistics(
603+
args: ListSensorStatisticsCommandInput,
604+
options?: __HttpHandlerOptions
605+
): Promise<ListSensorStatisticsCommandOutput>;
606+
public listSensorStatistics(
607+
args: ListSensorStatisticsCommandInput,
608+
cb: (err: any, data?: ListSensorStatisticsCommandOutput) => void
609+
): void;
610+
public listSensorStatistics(
611+
args: ListSensorStatisticsCommandInput,
612+
options: __HttpHandlerOptions,
613+
cb: (err: any, data?: ListSensorStatisticsCommandOutput) => void
614+
): void;
615+
public listSensorStatistics(
616+
args: ListSensorStatisticsCommandInput,
617+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListSensorStatisticsCommandOutput) => void),
618+
cb?: (err: any, data?: ListSensorStatisticsCommandOutput) => void
619+
): Promise<ListSensorStatisticsCommandOutput> | void {
620+
const command = new ListSensorStatisticsCommand(args);
621+
if (typeof optionsOrCb === "function") {
622+
this.send(command, optionsOrCb);
623+
} else if (typeof cb === "function") {
624+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
625+
this.send(command, optionsOrCb || {}, cb);
626+
} else {
627+
return this.send(command, optionsOrCb);
628+
}
629+
}
630+
592631
/**
593632
* <p>Lists all the tags for a specified resource, including key and value. </p>
594633
*/

clients/client-lookoutequipment/src/LookoutEquipmentClient.ts

+6
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ import {
8787
ListInferenceSchedulersCommandOutput,
8888
} from "./commands/ListInferenceSchedulersCommand";
8989
import { ListModelsCommandInput, ListModelsCommandOutput } from "./commands/ListModelsCommand";
90+
import {
91+
ListSensorStatisticsCommandInput,
92+
ListSensorStatisticsCommandOutput,
93+
} from "./commands/ListSensorStatisticsCommand";
9094
import {
9195
ListTagsForResourceCommandInput,
9296
ListTagsForResourceCommandOutput,
@@ -127,6 +131,7 @@ export type ServiceInputTypes =
127131
| ListInferenceExecutionsCommandInput
128132
| ListInferenceSchedulersCommandInput
129133
| ListModelsCommandInput
134+
| ListSensorStatisticsCommandInput
130135
| ListTagsForResourceCommandInput
131136
| StartDataIngestionJobCommandInput
132137
| StartInferenceSchedulerCommandInput
@@ -151,6 +156,7 @@ export type ServiceOutputTypes =
151156
| ListInferenceExecutionsCommandOutput
152157
| ListInferenceSchedulersCommandOutput
153158
| ListModelsCommandOutput
159+
| ListSensorStatisticsCommandOutput
154160
| ListTagsForResourceCommandOutput
155161
| StartDataIngestionJobCommandOutput
156162
| StartInferenceSchedulerCommandOutput

clients/client-lookoutequipment/src/commands/DescribeDataIngestionJobCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export interface DescribeDataIngestionJobCommandOutput extends DescribeDataInges
2323

2424
/**
2525
* <p>Provides information on a specific data ingestion job such as creation time, dataset
26-
* ARN, status, and so on. </p>
26+
* ARN, and status.</p>
2727
* @example
2828
* Use a bare-bones client and the command you need to make an API call.
2929
* ```javascript

clients/client-lookoutequipment/src/commands/DescribeDatasetCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface DescribeDatasetCommandInput extends DescribeDatasetRequest {}
2222
export interface DescribeDatasetCommandOutput extends DescribeDatasetResponse, __MetadataBearer {}
2323

2424
/**
25-
* <p>Provides a JSON description of the data that is in each time series dataset, including names, column names, and data types.</p>
25+
* <p>Provides a JSON description of the data in each time series dataset, including names, column names, and data types.</p>
2626
* @example
2727
* Use a bare-bones client and the command you need to make an API call.
2828
* ```javascript
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3+
import { Command as $Command } from "@aws-sdk/smithy-client";
4+
import {
5+
FinalizeHandlerArguments,
6+
Handler,
7+
HandlerExecutionContext,
8+
HttpHandlerOptions as __HttpHandlerOptions,
9+
MetadataBearer as __MetadataBearer,
10+
MiddlewareStack,
11+
SerdeContext as __SerdeContext,
12+
} from "@aws-sdk/types";
13+
14+
import { LookoutEquipmentClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LookoutEquipmentClient";
15+
import { ListSensorStatisticsRequest, ListSensorStatisticsResponse } from "../models/models_0";
16+
import {
17+
deserializeAws_json1_0ListSensorStatisticsCommand,
18+
serializeAws_json1_0ListSensorStatisticsCommand,
19+
} from "../protocols/Aws_json1_0";
20+
21+
export interface ListSensorStatisticsCommandInput extends ListSensorStatisticsRequest {}
22+
export interface ListSensorStatisticsCommandOutput extends ListSensorStatisticsResponse, __MetadataBearer {}
23+
24+
/**
25+
* <p>
26+
* Lists statistics about the data collected for each of the sensors that have been successfully ingested in the particular dataset. Can also be used to retreive Sensor Statistics for a previous ingestion job.
27+
* </p>
28+
* @example
29+
* Use a bare-bones client and the command you need to make an API call.
30+
* ```javascript
31+
* import { LookoutEquipmentClient, ListSensorStatisticsCommand } from "@aws-sdk/client-lookoutequipment"; // ES Modules import
32+
* // const { LookoutEquipmentClient, ListSensorStatisticsCommand } = require("@aws-sdk/client-lookoutequipment"); // CommonJS import
33+
* const client = new LookoutEquipmentClient(config);
34+
* const command = new ListSensorStatisticsCommand(input);
35+
* const response = await client.send(command);
36+
* ```
37+
*
38+
* @see {@link ListSensorStatisticsCommandInput} for command's `input` shape.
39+
* @see {@link ListSensorStatisticsCommandOutput} for command's `response` shape.
40+
* @see {@link LookoutEquipmentClientResolvedConfig | config} for LookoutEquipmentClient's `config` shape.
41+
*
42+
*/
43+
export class ListSensorStatisticsCommand extends $Command<
44+
ListSensorStatisticsCommandInput,
45+
ListSensorStatisticsCommandOutput,
46+
LookoutEquipmentClientResolvedConfig
47+
> {
48+
// Start section: command_properties
49+
// End section: command_properties
50+
51+
constructor(readonly input: ListSensorStatisticsCommandInput) {
52+
// Start section: command_constructor
53+
super();
54+
// End section: command_constructor
55+
}
56+
57+
/**
58+
* @internal
59+
*/
60+
resolveMiddleware(
61+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
62+
configuration: LookoutEquipmentClientResolvedConfig,
63+
options?: __HttpHandlerOptions
64+
): Handler<ListSensorStatisticsCommandInput, ListSensorStatisticsCommandOutput> {
65+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
66+
67+
const stack = clientStack.concat(this.middlewareStack);
68+
69+
const { logger } = configuration;
70+
const clientName = "LookoutEquipmentClient";
71+
const commandName = "ListSensorStatisticsCommand";
72+
const handlerExecutionContext: HandlerExecutionContext = {
73+
logger,
74+
clientName,
75+
commandName,
76+
inputFilterSensitiveLog: ListSensorStatisticsRequest.filterSensitiveLog,
77+
outputFilterSensitiveLog: ListSensorStatisticsResponse.filterSensitiveLog,
78+
};
79+
const { requestHandler } = configuration;
80+
return stack.resolve(
81+
(request: FinalizeHandlerArguments<any>) =>
82+
requestHandler.handle(request.request as __HttpRequest, options || {}),
83+
handlerExecutionContext
84+
);
85+
}
86+
87+
private serialize(input: ListSensorStatisticsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
88+
return serializeAws_json1_0ListSensorStatisticsCommand(input, context);
89+
}
90+
91+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListSensorStatisticsCommandOutput> {
92+
return deserializeAws_json1_0ListSensorStatisticsCommand(output, context);
93+
}
94+
95+
// Start section: command_body_extra
96+
// End section: command_body_extra
97+
}

clients/client-lookoutequipment/src/commands/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export * from "./ListDatasetsCommand";
1313
export * from "./ListInferenceExecutionsCommand";
1414
export * from "./ListInferenceSchedulersCommand";
1515
export * from "./ListModelsCommand";
16+
export * from "./ListSensorStatisticsCommand";
1617
export * from "./ListTagsForResourceCommand";
1718
export * from "./StartDataIngestionJobCommand";
1819
export * from "./StartInferenceSchedulerCommand";

0 commit comments

Comments
 (0)