UNPKG

@aws-sdk/client-iot

Version:

AWS SDK for JavaScript Iot Client for Node.js, Browser and React Native

115 lines (114 loc) 4.6 kB
import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTClient"; import { GetStatisticsRequest, GetStatisticsResponse } from "../models/models_1"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link GetStatisticsCommand}. */ export interface GetStatisticsCommandInput extends GetStatisticsRequest { } /** * @public * * The output of {@link GetStatisticsCommand}. */ export interface GetStatisticsCommandOutput extends GetStatisticsResponse, __MetadataBearer { } declare const GetStatisticsCommand_base: { new (input: GetStatisticsCommandInput): import("@smithy/smithy-client").CommandImpl<GetStatisticsCommandInput, GetStatisticsCommandOutput, IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>; new (input: GetStatisticsCommandInput): import("@smithy/smithy-client").CommandImpl<GetStatisticsCommandInput, GetStatisticsCommandOutput, IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** * <p>Returns the count, average, sum, minimum, maximum, sum of squares, variance, * and standard deviation for the specified aggregated field. If the aggregation field is of type * <code>String</code>, only the count statistic is returned.</p> * <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">GetStatistics</a> action.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { IoTClient, GetStatisticsCommand } from "@aws-sdk/client-iot"; // ES Modules import * // const { IoTClient, GetStatisticsCommand } = require("@aws-sdk/client-iot"); // CommonJS import * const client = new IoTClient(config); * const input = { // GetStatisticsRequest * indexName: "STRING_VALUE", * queryString: "STRING_VALUE", // required * aggregationField: "STRING_VALUE", * queryVersion: "STRING_VALUE", * }; * const command = new GetStatisticsCommand(input); * const response = await client.send(command); * // { // GetStatisticsResponse * // statistics: { // Statistics * // count: Number("int"), * // average: Number("double"), * // sum: Number("double"), * // minimum: Number("double"), * // maximum: Number("double"), * // sumOfSquares: Number("double"), * // variance: Number("double"), * // stdDeviation: Number("double"), * // }, * // }; * * ``` * * @param GetStatisticsCommandInput - {@link GetStatisticsCommandInput} * @returns {@link GetStatisticsCommandOutput} * @see {@link GetStatisticsCommandInput} for command's `input` shape. * @see {@link GetStatisticsCommandOutput} for command's `response` shape. * @see {@link IoTClientResolvedConfig | config} for IoTClient's `config` shape. * * @throws {@link IndexNotReadyException} (client fault) * <p>The index is not ready.</p> * * @throws {@link InternalFailureException} (server fault) * <p>An unexpected error has occurred.</p> * * @throws {@link InvalidAggregationException} (client fault) * <p>The aggregation is invalid.</p> * * @throws {@link InvalidQueryException} (client fault) * <p>The query is invalid.</p> * * @throws {@link InvalidRequestException} (client fault) * <p>The request is not valid.</p> * * @throws {@link ResourceNotFoundException} (client fault) * <p>The specified resource does not exist.</p> * * @throws {@link ServiceUnavailableException} (server fault) * <p>The service is temporarily unavailable.</p> * * @throws {@link ThrottlingException} (client fault) * <p>The rate exceeds the limit.</p> * * @throws {@link UnauthorizedException} (client fault) * <p>You are not authorized to perform this operation.</p> * * @throws {@link IoTServiceException} * <p>Base exception class for all service exceptions from IoT service.</p> * * * @public */ export declare class GetStatisticsCommand extends GetStatisticsCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: GetStatisticsRequest; output: GetStatisticsResponse; }; sdk: { input: GetStatisticsCommandInput; output: GetStatisticsCommandOutput; }; }; }