-
Notifications
You must be signed in to change notification settings - Fork 589
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-iotsitewise): This release adds 3 new batch data query AP…
…Is : BatchGetAssetPropertyValue, BatchGetAssetPropertyValueHistory and BatchGetAssetPropertyAggregates
- Loading branch information
awstools
committed
Apr 21, 2022
1 parent
7b8954d
commit f07f481
Showing
13 changed files
with
3,390 additions
and
302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
clients/client-iotsitewise/src/commands/BatchGetAssetPropertyAggregatesCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
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 { IoTSiteWiseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTSiteWiseClient"; | ||
import { BatchGetAssetPropertyAggregatesRequest, BatchGetAssetPropertyAggregatesResponse } from "../models/models_0"; | ||
import { | ||
deserializeAws_restJson1BatchGetAssetPropertyAggregatesCommand, | ||
serializeAws_restJson1BatchGetAssetPropertyAggregatesCommand, | ||
} from "../protocols/Aws_restJson1"; | ||
|
||
export interface BatchGetAssetPropertyAggregatesCommandInput extends BatchGetAssetPropertyAggregatesRequest {} | ||
export interface BatchGetAssetPropertyAggregatesCommandOutput | ||
extends BatchGetAssetPropertyAggregatesResponse, | ||
__MetadataBearer {} | ||
|
||
/** | ||
* <p>Gets aggregated values (for example, average, minimum, and maximum) for one or more asset properties. | ||
* For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/query-industrial-data.html#aggregates">Querying | ||
* aggregates</a> in the <i>IoT SiteWise User Guide</i>.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { IoTSiteWiseClient, BatchGetAssetPropertyAggregatesCommand } from "@aws-sdk/client-iotsitewise"; // ES Modules import | ||
* // const { IoTSiteWiseClient, BatchGetAssetPropertyAggregatesCommand } = require("@aws-sdk/client-iotsitewise"); // CommonJS import | ||
* const client = new IoTSiteWiseClient(config); | ||
* const command = new BatchGetAssetPropertyAggregatesCommand(input); | ||
* const response = await client.send(command); | ||
* ``` | ||
* | ||
* @see {@link BatchGetAssetPropertyAggregatesCommandInput} for command's `input` shape. | ||
* @see {@link BatchGetAssetPropertyAggregatesCommandOutput} for command's `response` shape. | ||
* @see {@link IoTSiteWiseClientResolvedConfig | config} for IoTSiteWiseClient's `config` shape. | ||
* | ||
*/ | ||
export class BatchGetAssetPropertyAggregatesCommand extends $Command< | ||
BatchGetAssetPropertyAggregatesCommandInput, | ||
BatchGetAssetPropertyAggregatesCommandOutput, | ||
IoTSiteWiseClientResolvedConfig | ||
> { | ||
// Start section: command_properties | ||
// End section: command_properties | ||
|
||
constructor(readonly input: BatchGetAssetPropertyAggregatesCommandInput) { | ||
// Start section: command_constructor | ||
super(); | ||
// End section: command_constructor | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: IoTSiteWiseClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<BatchGetAssetPropertyAggregatesCommandInput, BatchGetAssetPropertyAggregatesCommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "IoTSiteWiseClient"; | ||
const commandName = "BatchGetAssetPropertyAggregatesCommand"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: BatchGetAssetPropertyAggregatesRequest.filterSensitiveLog, | ||
outputFilterSensitiveLog: BatchGetAssetPropertyAggregatesResponse.filterSensitiveLog, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
private serialize( | ||
input: BatchGetAssetPropertyAggregatesCommandInput, | ||
context: __SerdeContext | ||
): Promise<__HttpRequest> { | ||
return serializeAws_restJson1BatchGetAssetPropertyAggregatesCommand(input, context); | ||
} | ||
|
||
private deserialize( | ||
output: __HttpResponse, | ||
context: __SerdeContext | ||
): Promise<BatchGetAssetPropertyAggregatesCommandOutput> { | ||
return deserializeAws_restJson1BatchGetAssetPropertyAggregatesCommand(output, context); | ||
} | ||
|
||
// Start section: command_body_extra | ||
// End section: command_body_extra | ||
} |
99 changes: 99 additions & 0 deletions
99
clients/client-iotsitewise/src/commands/BatchGetAssetPropertyValueCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
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 { IoTSiteWiseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTSiteWiseClient"; | ||
import { BatchGetAssetPropertyValueRequest, BatchGetAssetPropertyValueResponse } from "../models/models_0"; | ||
import { | ||
deserializeAws_restJson1BatchGetAssetPropertyValueCommand, | ||
serializeAws_restJson1BatchGetAssetPropertyValueCommand, | ||
} from "../protocols/Aws_restJson1"; | ||
|
||
export interface BatchGetAssetPropertyValueCommandInput extends BatchGetAssetPropertyValueRequest {} | ||
export interface BatchGetAssetPropertyValueCommandOutput extends BatchGetAssetPropertyValueResponse, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Gets the current value for one or more asset properties. For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/query-industrial-data.html#current-values">Querying | ||
* current values</a> in the <i>IoT SiteWise User Guide</i>.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { IoTSiteWiseClient, BatchGetAssetPropertyValueCommand } from "@aws-sdk/client-iotsitewise"; // ES Modules import | ||
* // const { IoTSiteWiseClient, BatchGetAssetPropertyValueCommand } = require("@aws-sdk/client-iotsitewise"); // CommonJS import | ||
* const client = new IoTSiteWiseClient(config); | ||
* const command = new BatchGetAssetPropertyValueCommand(input); | ||
* const response = await client.send(command); | ||
* ``` | ||
* | ||
* @see {@link BatchGetAssetPropertyValueCommandInput} for command's `input` shape. | ||
* @see {@link BatchGetAssetPropertyValueCommandOutput} for command's `response` shape. | ||
* @see {@link IoTSiteWiseClientResolvedConfig | config} for IoTSiteWiseClient's `config` shape. | ||
* | ||
*/ | ||
export class BatchGetAssetPropertyValueCommand extends $Command< | ||
BatchGetAssetPropertyValueCommandInput, | ||
BatchGetAssetPropertyValueCommandOutput, | ||
IoTSiteWiseClientResolvedConfig | ||
> { | ||
// Start section: command_properties | ||
// End section: command_properties | ||
|
||
constructor(readonly input: BatchGetAssetPropertyValueCommandInput) { | ||
// Start section: command_constructor | ||
super(); | ||
// End section: command_constructor | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: IoTSiteWiseClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<BatchGetAssetPropertyValueCommandInput, BatchGetAssetPropertyValueCommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "IoTSiteWiseClient"; | ||
const commandName = "BatchGetAssetPropertyValueCommand"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: BatchGetAssetPropertyValueRequest.filterSensitiveLog, | ||
outputFilterSensitiveLog: BatchGetAssetPropertyValueResponse.filterSensitiveLog, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
private serialize(input: BatchGetAssetPropertyValueCommandInput, context: __SerdeContext): Promise<__HttpRequest> { | ||
return serializeAws_restJson1BatchGetAssetPropertyValueCommand(input, context); | ||
} | ||
|
||
private deserialize( | ||
output: __HttpResponse, | ||
context: __SerdeContext | ||
): Promise<BatchGetAssetPropertyValueCommandOutput> { | ||
return deserializeAws_restJson1BatchGetAssetPropertyValueCommand(output, context); | ||
} | ||
|
||
// Start section: command_body_extra | ||
// End section: command_body_extra | ||
} |
Oops, something went wrong.