Skip to content

Commit

Permalink
feat(client-lookoutequipment): This release adds the following new fe…
Browse files Browse the repository at this point in the history
…atures: 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
  • Loading branch information
awstools committed Apr 27, 2022
1 parent 0aa6ba2 commit f35b0f3
Show file tree
Hide file tree
Showing 11 changed files with 2,009 additions and 61 deletions.
43 changes: 41 additions & 2 deletions clients/client-lookoutequipment/src/LookoutEquipment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ import {
ListInferenceSchedulersCommandOutput,
} from "./commands/ListInferenceSchedulersCommand";
import { ListModelsCommand, ListModelsCommandInput, ListModelsCommandOutput } from "./commands/ListModelsCommand";
import {
ListSensorStatisticsCommand,
ListSensorStatisticsCommandInput,
ListSensorStatisticsCommandOutput,
} from "./commands/ListSensorStatisticsCommand";
import {
ListTagsForResourceCommand,
ListTagsForResourceCommandInput,
Expand Down Expand Up @@ -304,7 +309,7 @@ export class LookoutEquipment extends LookoutEquipmentClient {

/**
* <p>Provides information on a specific data ingestion job such as creation time, dataset
* ARN, status, and so on. </p>
* ARN, and status.</p>
*/
public describeDataIngestionJob(
args: DescribeDataIngestionJobCommandInput,
Expand Down Expand Up @@ -336,7 +341,7 @@ export class LookoutEquipment extends LookoutEquipmentClient {
}

/**
* <p>Provides a JSON description of the data that is in each time series dataset, including names, column names, and data types.</p>
* <p>Provides a JSON description of the data in each time series dataset, including names, column names, and data types.</p>
*/
public describeDataset(
args: DescribeDatasetCommandInput,
Expand Down Expand Up @@ -589,6 +594,40 @@ export class LookoutEquipment extends LookoutEquipmentClient {
}
}

/**
* <p>
* 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.
* </p>
*/
public listSensorStatistics(
args: ListSensorStatisticsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListSensorStatisticsCommandOutput>;
public listSensorStatistics(
args: ListSensorStatisticsCommandInput,
cb: (err: any, data?: ListSensorStatisticsCommandOutput) => void
): void;
public listSensorStatistics(
args: ListSensorStatisticsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListSensorStatisticsCommandOutput) => void
): void;
public listSensorStatistics(
args: ListSensorStatisticsCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListSensorStatisticsCommandOutput) => void),
cb?: (err: any, data?: ListSensorStatisticsCommandOutput) => void
): Promise<ListSensorStatisticsCommandOutput> | void {
const command = new ListSensorStatisticsCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Lists all the tags for a specified resource, including key and value. </p>
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-lookoutequipment/src/LookoutEquipmentClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ import {
ListInferenceSchedulersCommandOutput,
} from "./commands/ListInferenceSchedulersCommand";
import { ListModelsCommandInput, ListModelsCommandOutput } from "./commands/ListModelsCommand";
import {
ListSensorStatisticsCommandInput,
ListSensorStatisticsCommandOutput,
} from "./commands/ListSensorStatisticsCommand";
import {
ListTagsForResourceCommandInput,
ListTagsForResourceCommandOutput,
Expand Down Expand Up @@ -127,6 +131,7 @@ export type ServiceInputTypes =
| ListInferenceExecutionsCommandInput
| ListInferenceSchedulersCommandInput
| ListModelsCommandInput
| ListSensorStatisticsCommandInput
| ListTagsForResourceCommandInput
| StartDataIngestionJobCommandInput
| StartInferenceSchedulerCommandInput
Expand All @@ -151,6 +156,7 @@ export type ServiceOutputTypes =
| ListInferenceExecutionsCommandOutput
| ListInferenceSchedulersCommandOutput
| ListModelsCommandOutput
| ListSensorStatisticsCommandOutput
| ListTagsForResourceCommandOutput
| StartDataIngestionJobCommandOutput
| StartInferenceSchedulerCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface DescribeDataIngestionJobCommandOutput extends DescribeDataInges

/**
* <p>Provides information on a specific data ingestion job such as creation time, dataset
* ARN, status, and so on. </p>
* ARN, and status.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface DescribeDatasetCommandInput extends DescribeDatasetRequest {}
export interface DescribeDatasetCommandOutput extends DescribeDatasetResponse, __MetadataBearer {}

/**
* <p>Provides a JSON description of the data that is in each time series dataset, including names, column names, and data types.</p>
* <p>Provides a JSON description of the data in each time series dataset, including names, column names, and data types.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { LookoutEquipmentClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LookoutEquipmentClient";
import { ListSensorStatisticsRequest, ListSensorStatisticsResponse } from "../models/models_0";
import {
deserializeAws_json1_0ListSensorStatisticsCommand,
serializeAws_json1_0ListSensorStatisticsCommand,
} from "../protocols/Aws_json1_0";

export interface ListSensorStatisticsCommandInput extends ListSensorStatisticsRequest {}
export interface ListSensorStatisticsCommandOutput extends ListSensorStatisticsResponse, __MetadataBearer {}

/**
* <p>
* 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.
* </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { LookoutEquipmentClient, ListSensorStatisticsCommand } from "@aws-sdk/client-lookoutequipment"; // ES Modules import
* // const { LookoutEquipmentClient, ListSensorStatisticsCommand } = require("@aws-sdk/client-lookoutequipment"); // CommonJS import
* const client = new LookoutEquipmentClient(config);
* const command = new ListSensorStatisticsCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link ListSensorStatisticsCommandInput} for command's `input` shape.
* @see {@link ListSensorStatisticsCommandOutput} for command's `response` shape.
* @see {@link LookoutEquipmentClientResolvedConfig | config} for LookoutEquipmentClient's `config` shape.
*
*/
export class ListSensorStatisticsCommand extends $Command<
ListSensorStatisticsCommandInput,
ListSensorStatisticsCommandOutput,
LookoutEquipmentClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: ListSensorStatisticsCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: LookoutEquipmentClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<ListSensorStatisticsCommandInput, ListSensorStatisticsCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "LookoutEquipmentClient";
const commandName = "ListSensorStatisticsCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: ListSensorStatisticsRequest.filterSensitiveLog,
outputFilterSensitiveLog: ListSensorStatisticsResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: ListSensorStatisticsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_0ListSensorStatisticsCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListSensorStatisticsCommandOutput> {
return deserializeAws_json1_0ListSensorStatisticsCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
1 change: 1 addition & 0 deletions clients/client-lookoutequipment/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export * from "./ListDatasetsCommand";
export * from "./ListInferenceExecutionsCommand";
export * from "./ListInferenceSchedulersCommand";
export * from "./ListModelsCommand";
export * from "./ListSensorStatisticsCommand";
export * from "./ListTagsForResourceCommand";
export * from "./StartDataIngestionJobCommand";
export * from "./StartInferenceSchedulerCommand";
Expand Down
Loading

0 comments on commit f35b0f3

Please sign in to comment.