Skip to content

Commit d809dff

Browse files
author
awstools
committed
feat(client-lookoutequipment): This release adds visualizations to the scheduled inference results. Users will be able to see interference results, including diagnostic results from their running inference schedulers.
1 parent 5bf16df commit d809dff

17 files changed

+1001
-495
lines changed

clients/client-lookoutequipment/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99

1010
AWS SDK for JavaScript LookoutEquipment Client for Node.js, Browser and React Native.
1111

12-
<p>Amazon Lookout for Equipment is a machine learning service that uses advanced analytics to identify
13-
anomalies in machines from sensor data for use in predictive maintenance. </p>
12+
<p>Amazon Lookout for Equipment is a machine learning service that uses advanced analytics
13+
to identify anomalies in machines from sensor data for use in predictive maintenance.
14+
</p>
1415

1516
## Installing
1617

clients/client-lookoutequipment/src/LookoutEquipment.ts

Lines changed: 62 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ import {
5353
ListDatasetsCommandInput,
5454
ListDatasetsCommandOutput,
5555
} from "./commands/ListDatasetsCommand";
56+
import {
57+
ListInferenceEventsCommand,
58+
ListInferenceEventsCommandInput,
59+
ListInferenceEventsCommandOutput,
60+
} from "./commands/ListInferenceEventsCommand";
5661
import {
5762
ListInferenceExecutionsCommand,
5863
ListInferenceExecutionsCommandInput,
@@ -103,8 +108,9 @@ import {
103108
import { LookoutEquipmentClient } from "./LookoutEquipmentClient";
104109

105110
/**
106-
* <p>Amazon Lookout for Equipment is a machine learning service that uses advanced analytics to identify
107-
* anomalies in machines from sensor data for use in predictive maintenance. </p>
111+
* <p>Amazon Lookout for Equipment is a machine learning service that uses advanced analytics
112+
* to identify anomalies in machines from sensor data for use in predictive maintenance.
113+
* </p>
108114
*/
109115
export class LookoutEquipment extends LookoutEquipmentClient {
110116
/**
@@ -181,10 +187,10 @@ export class LookoutEquipment extends LookoutEquipmentClient {
181187
/**
182188
* <p>Creates an ML model for data inference. </p>
183189
* <p>A machine-learning (ML) model is a mathematical model that finds patterns in your data.
184-
* In Amazon Lookout for Equipment, the model learns the patterns of normal behavior and detects abnormal
185-
* behavior that could be potential equipment failure (or maintenance events). The models are
186-
* made by analyzing normal data and abnormalities in machine behavior that have already
187-
* occurred.</p>
190+
* In Amazon Lookout for Equipment, the model learns the patterns of normal behavior and
191+
* detects abnormal behavior that could be potential equipment failure (or maintenance
192+
* events). The models are made by analyzing normal data and abnormalities in machine behavior
193+
* that have already occurred.</p>
188194
* <p>Your model is trained using a portion of the data from your dataset and uses that data
189195
* to learn patterns of normal behavior and abnormal patterns that lead to equipment failure.
190196
* Another portion of the data is used to evaluate the model's accuracy. </p>
@@ -282,8 +288,9 @@ export class LookoutEquipment extends LookoutEquipmentClient {
282288
}
283289

284290
/**
285-
* <p>Deletes an ML model currently available for Amazon Lookout for Equipment. This will prevent it from
286-
* being used with an inference scheduler, even one that is already set up. </p>
291+
* <p>Deletes an ML model currently available for Amazon Lookout for Equipment. This will
292+
* prevent it from being used with an inference scheduler, even one that is already set up.
293+
* </p>
287294
*/
288295
public deleteModel(args: DeleteModelCommandInput, options?: __HttpHandlerOptions): Promise<DeleteModelCommandOutput>;
289296
public deleteModel(args: DeleteModelCommandInput, cb: (err: any, data?: DeleteModelCommandOutput) => void): void;
@@ -342,7 +349,8 @@ export class LookoutEquipment extends LookoutEquipmentClient {
342349
}
343350

344351
/**
345-
* <p>Provides a JSON description of the data in each time series dataset, including names, column names, and data types.</p>
352+
* <p>Provides a JSON description of the data in each time series dataset, including names,
353+
* column names, and data types.</p>
346354
*/
347355
public describeDataset(
348356
args: DescribeDatasetCommandInput,
@@ -407,8 +415,9 @@ export class LookoutEquipment extends LookoutEquipmentClient {
407415
}
408416

409417
/**
410-
* <p>Provides a JSON containing the overall information about a specific ML model, including model name and ARN,
411-
* dataset, training and evaluation information, status, and so on. </p>
418+
* <p>Provides a JSON containing the overall information about a specific ML model, including
419+
* model name and ARN, dataset, training and evaluation information, status, and so on.
420+
* </p>
412421
*/
413422
public describeModel(
414423
args: DescribeModelCommandInput,
@@ -502,6 +511,39 @@ export class LookoutEquipment extends LookoutEquipmentClient {
502511
}
503512
}
504513

514+
/**
515+
* <p> Lists all inference events that have been found for the specified inference
516+
* scheduler. </p>
517+
*/
518+
public listInferenceEvents(
519+
args: ListInferenceEventsCommandInput,
520+
options?: __HttpHandlerOptions
521+
): Promise<ListInferenceEventsCommandOutput>;
522+
public listInferenceEvents(
523+
args: ListInferenceEventsCommandInput,
524+
cb: (err: any, data?: ListInferenceEventsCommandOutput) => void
525+
): void;
526+
public listInferenceEvents(
527+
args: ListInferenceEventsCommandInput,
528+
options: __HttpHandlerOptions,
529+
cb: (err: any, data?: ListInferenceEventsCommandOutput) => void
530+
): void;
531+
public listInferenceEvents(
532+
args: ListInferenceEventsCommandInput,
533+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListInferenceEventsCommandOutput) => void),
534+
cb?: (err: any, data?: ListInferenceEventsCommandOutput) => void
535+
): Promise<ListInferenceEventsCommandOutput> | void {
536+
const command = new ListInferenceEventsCommand(args);
537+
if (typeof optionsOrCb === "function") {
538+
this.send(command, optionsOrCb);
539+
} else if (typeof cb === "function") {
540+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
541+
this.send(command, optionsOrCb || {}, cb);
542+
} else {
543+
return this.send(command, optionsOrCb);
544+
}
545+
}
546+
505547
/**
506548
* <p> Lists all inference executions that have been performed by the specified inference
507549
* scheduler. </p>
@@ -596,9 +638,9 @@ export class LookoutEquipment extends LookoutEquipmentClient {
596638
}
597639

598640
/**
599-
* <p>
600-
* 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.
601-
* </p>
641+
* <p> Lists statistics about the data collected for each of the sensors that have been
642+
* successfully ingested in the particular dataset. Can also be used to retreive Sensor
643+
* Statistics for a previous ingestion job. </p>
602644
*/
603645
public listSensorStatistics(
604646
args: ListSensorStatisticsCommandInput,
@@ -662,7 +704,8 @@ export class LookoutEquipment extends LookoutEquipmentClient {
662704
}
663705

664706
/**
665-
* <p>Starts a data ingestion job. Amazon Lookout for Equipment returns the job status. </p>
707+
* <p>Starts a data ingestion job. Amazon Lookout for Equipment returns the job status.
708+
* </p>
666709
*/
667710
public startDataIngestionJob(
668711
args: StartDataIngestionJobCommandInput,
@@ -759,10 +802,10 @@ export class LookoutEquipment extends LookoutEquipmentClient {
759802

760803
/**
761804
* <p>Associates a given tag to a resource in your account. A tag is a key-value pair which
762-
* can be added to an Amazon Lookout for Equipment resource as metadata. Tags can be used for organizing your
763-
* resources as well as helping you to search and filter by tag. Multiple tags can be added to
764-
* a resource, either when you create it, or later. Up to 50 tags can be associated with each
765-
* resource. </p>
805+
* can be added to an Amazon Lookout for Equipment resource as metadata. Tags can be used for
806+
* organizing your resources as well as helping you to search and filter by tag. Multiple tags
807+
* can be added to a resource, either when you create it, or later. Up to 50 tags can be
808+
* associated with each resource. </p>
766809
*/
767810
public tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
768811
public tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;

clients/client-lookoutequipment/src/LookoutEquipmentClient.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ import {
8080
ListDataIngestionJobsCommandOutput,
8181
} from "./commands/ListDataIngestionJobsCommand";
8282
import { ListDatasetsCommandInput, ListDatasetsCommandOutput } from "./commands/ListDatasetsCommand";
83+
import {
84+
ListInferenceEventsCommandInput,
85+
ListInferenceEventsCommandOutput,
86+
} from "./commands/ListInferenceEventsCommand";
8387
import {
8488
ListInferenceExecutionsCommandInput,
8589
ListInferenceExecutionsCommandOutput,
@@ -130,6 +134,7 @@ export type ServiceInputTypes =
130134
| DescribeModelCommandInput
131135
| ListDataIngestionJobsCommandInput
132136
| ListDatasetsCommandInput
137+
| ListInferenceEventsCommandInput
133138
| ListInferenceExecutionsCommandInput
134139
| ListInferenceSchedulersCommandInput
135140
| ListModelsCommandInput
@@ -155,6 +160,7 @@ export type ServiceOutputTypes =
155160
| DescribeModelCommandOutput
156161
| ListDataIngestionJobsCommandOutput
157162
| ListDatasetsCommandOutput
163+
| ListInferenceEventsCommandOutput
158164
| ListInferenceExecutionsCommandOutput
159165
| ListInferenceSchedulersCommandOutput
160166
| ListModelsCommandOutput
@@ -321,8 +327,9 @@ type LookoutEquipmentClientResolvedConfigType = __SmithyResolvedConfiguration<__
321327
export interface LookoutEquipmentClientResolvedConfig extends LookoutEquipmentClientResolvedConfigType {}
322328

323329
/**
324-
* <p>Amazon Lookout for Equipment is a machine learning service that uses advanced analytics to identify
325-
* anomalies in machines from sensor data for use in predictive maintenance. </p>
330+
* <p>Amazon Lookout for Equipment is a machine learning service that uses advanced analytics
331+
* to identify anomalies in machines from sensor data for use in predictive maintenance.
332+
* </p>
326333
*/
327334
export class LookoutEquipmentClient extends __Client<
328335
__HttpHandlerOptions,

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ export interface CreateModelCommandOutput extends CreateModelResponse, __Metadat
2525
/**
2626
* <p>Creates an ML model for data inference. </p>
2727
* <p>A machine-learning (ML) model is a mathematical model that finds patterns in your data.
28-
* In Amazon Lookout for Equipment, the model learns the patterns of normal behavior and detects abnormal
29-
* behavior that could be potential equipment failure (or maintenance events). The models are
30-
* made by analyzing normal data and abnormalities in machine behavior that have already
31-
* occurred.</p>
28+
* In Amazon Lookout for Equipment, the model learns the patterns of normal behavior and
29+
* detects abnormal behavior that could be potential equipment failure (or maintenance
30+
* events). The models are made by analyzing normal data and abnormalities in machine behavior
31+
* that have already occurred.</p>
3232
* <p>Your model is trained using a portion of the data from your dataset and uses that data
3333
* to learn patterns of normal behavior and abnormal patterns that lead to equipment failure.
3434
* Another portion of the data is used to evaluate the model's accuracy. </p>

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ export interface DeleteModelCommandInput extends DeleteModelRequest {}
2323
export interface DeleteModelCommandOutput extends __MetadataBearer {}
2424

2525
/**
26-
* <p>Deletes an ML model currently available for Amazon Lookout for Equipment. This will prevent it from
27-
* being used with an inference scheduler, even one that is already set up. </p>
26+
* <p>Deletes an ML model currently available for Amazon Lookout for Equipment. This will
27+
* prevent it from being used with an inference scheduler, even one that is already set up.
28+
* </p>
2829
* @example
2930
* Use a bare-bones client and the command you need to make an API call.
3031
* ```javascript

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export interface DescribeDatasetCommandInput extends DescribeDatasetRequest {}
2323
export interface DescribeDatasetCommandOutput extends DescribeDatasetResponse, __MetadataBearer {}
2424

2525
/**
26-
* <p>Provides a JSON description of the data in each time series dataset, including names, column names, and data types.</p>
26+
* <p>Provides a JSON description of the data in each time series dataset, including names,
27+
* column names, and data types.</p>
2728
* @example
2829
* Use a bare-bones client and the command you need to make an API call.
2930
* ```javascript

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ export interface DescribeModelCommandInput extends DescribeModelRequest {}
2323
export interface DescribeModelCommandOutput extends DescribeModelResponse, __MetadataBearer {}
2424

2525
/**
26-
* <p>Provides a JSON containing the overall information about a specific ML model, including model name and ARN,
27-
* dataset, training and evaluation information, status, and so on. </p>
26+
* <p>Provides a JSON containing the overall information about a specific ML model, including
27+
* model name and ARN, dataset, training and evaluation information, status, and so on.
28+
* </p>
2829
* @example
2930
* Use a bare-bones client and the command you need to make an API call.
3031
* ```javascript
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
// smithy-typescript generated code
2+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
4+
import { Command as $Command } from "@aws-sdk/smithy-client";
5+
import {
6+
FinalizeHandlerArguments,
7+
Handler,
8+
HandlerExecutionContext,
9+
HttpHandlerOptions as __HttpHandlerOptions,
10+
MetadataBearer as __MetadataBearer,
11+
MiddlewareStack,
12+
SerdeContext as __SerdeContext,
13+
} from "@aws-sdk/types";
14+
15+
import { LookoutEquipmentClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LookoutEquipmentClient";
16+
import { ListInferenceEventsRequest, ListInferenceEventsResponse } from "../models/models_0";
17+
import {
18+
deserializeAws_json1_0ListInferenceEventsCommand,
19+
serializeAws_json1_0ListInferenceEventsCommand,
20+
} from "../protocols/Aws_json1_0";
21+
22+
export interface ListInferenceEventsCommandInput extends ListInferenceEventsRequest {}
23+
export interface ListInferenceEventsCommandOutput extends ListInferenceEventsResponse, __MetadataBearer {}
24+
25+
/**
26+
* <p> Lists all inference events that have been found for the specified inference
27+
* scheduler. </p>
28+
* @example
29+
* Use a bare-bones client and the command you need to make an API call.
30+
* ```javascript
31+
* import { LookoutEquipmentClient, ListInferenceEventsCommand } from "@aws-sdk/client-lookoutequipment"; // ES Modules import
32+
* // const { LookoutEquipmentClient, ListInferenceEventsCommand } = require("@aws-sdk/client-lookoutequipment"); // CommonJS import
33+
* const client = new LookoutEquipmentClient(config);
34+
* const command = new ListInferenceEventsCommand(input);
35+
* const response = await client.send(command);
36+
* ```
37+
*
38+
* @see {@link ListInferenceEventsCommandInput} for command's `input` shape.
39+
* @see {@link ListInferenceEventsCommandOutput} for command's `response` shape.
40+
* @see {@link LookoutEquipmentClientResolvedConfig | config} for LookoutEquipmentClient's `config` shape.
41+
*
42+
*/
43+
export class ListInferenceEventsCommand extends $Command<
44+
ListInferenceEventsCommandInput,
45+
ListInferenceEventsCommandOutput,
46+
LookoutEquipmentClientResolvedConfig
47+
> {
48+
// Start section: command_properties
49+
// End section: command_properties
50+
51+
constructor(readonly input: ListInferenceEventsCommandInput) {
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<ListInferenceEventsCommandInput, ListInferenceEventsCommandOutput> {
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 = "ListInferenceEventsCommand";
72+
const handlerExecutionContext: HandlerExecutionContext = {
73+
logger,
74+
clientName,
75+
commandName,
76+
inputFilterSensitiveLog: ListInferenceEventsRequest.filterSensitiveLog,
77+
outputFilterSensitiveLog: ListInferenceEventsResponse.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: ListInferenceEventsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
88+
return serializeAws_json1_0ListInferenceEventsCommand(input, context);
89+
}
90+
91+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListInferenceEventsCommandOutput> {
92+
return deserializeAws_json1_0ListInferenceEventsCommand(output, context);
93+
}
94+
95+
// Start section: command_body_extra
96+
// End section: command_body_extra
97+
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ export interface ListSensorStatisticsCommandInput extends ListSensorStatisticsRe
2323
export interface ListSensorStatisticsCommandOutput extends ListSensorStatisticsResponse, __MetadataBearer {}
2424

2525
/**
26-
* <p>
27-
* 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.
28-
* </p>
26+
* <p> Lists statistics about the data collected for each of the sensors that have been
27+
* successfully ingested in the particular dataset. Can also be used to retreive Sensor
28+
* Statistics for a previous ingestion job. </p>
2929
* @example
3030
* Use a bare-bones client and the command you need to make an API call.
3131
* ```javascript

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export interface StartDataIngestionJobCommandInput extends StartDataIngestionJob
2323
export interface StartDataIngestionJobCommandOutput extends StartDataIngestionJobResponse, __MetadataBearer {}
2424

2525
/**
26-
* <p>Starts a data ingestion job. Amazon Lookout for Equipment returns the job status. </p>
26+
* <p>Starts a data ingestion job. Amazon Lookout for Equipment returns the job status.
27+
* </p>
2728
* @example
2829
* Use a bare-bones client and the command you need to make an API call.
2930
* ```javascript

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ export interface TagResourceCommandOutput extends TagResourceResponse, __Metadat
2424

2525
/**
2626
* <p>Associates a given tag to a resource in your account. A tag is a key-value pair which
27-
* can be added to an Amazon Lookout for Equipment resource as metadata. Tags can be used for organizing your
28-
* resources as well as helping you to search and filter by tag. Multiple tags can be added to
29-
* a resource, either when you create it, or later. Up to 50 tags can be associated with each
30-
* resource. </p>
27+
* can be added to an Amazon Lookout for Equipment resource as metadata. Tags can be used for
28+
* organizing your resources as well as helping you to search and filter by tag. Multiple tags
29+
* can be added to a resource, either when you create it, or later. Up to 50 tags can be
30+
* associated with each resource. </p>
3131
* @example
3232
* Use a bare-bones client and the command you need to make an API call.
3333
* ```javascript

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export * from "./DescribeInferenceSchedulerCommand";
1111
export * from "./DescribeModelCommand";
1212
export * from "./ListDataIngestionJobsCommand";
1313
export * from "./ListDatasetsCommand";
14+
export * from "./ListInferenceEventsCommand";
1415
export * from "./ListInferenceExecutionsCommand";
1516
export * from "./ListInferenceSchedulersCommand";
1617
export * from "./ListModelsCommand";

0 commit comments

Comments
 (0)