import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CloudTrailClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudTrailClient"; import type { ListInsightsMetricDataRequest, ListInsightsMetricDataResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link ListInsightsMetricDataCommand}. */ export interface ListInsightsMetricDataCommandInput extends ListInsightsMetricDataRequest { } /** * @public * * The output of {@link ListInsightsMetricDataCommand}. */ export interface ListInsightsMetricDataCommandOutput extends ListInsightsMetricDataResponse, __MetadataBearer { } declare const ListInsightsMetricDataCommand_base: { new (input: ListInsightsMetricDataCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: ListInsightsMetricDataCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Returns Insights metrics data for trails that have enabled Insights. The request must include the EventSource, * EventName, and InsightType parameters.

*

If the InsightType is set to ApiErrorRateInsight, the request must also include the ErrorCode parameter.

*

The following are the available time periods for ListInsightsMetricData. Each cutoff is inclusive.

* *

To use ListInsightsMetricData operation, you must have the following permissions:

* * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CloudTrailClient, ListInsightsMetricDataCommand } from "@aws-sdk/client-cloudtrail"; // ES Modules import * // const { CloudTrailClient, ListInsightsMetricDataCommand } = require("@aws-sdk/client-cloudtrail"); // CommonJS import * // import type { CloudTrailClientConfig } from "@aws-sdk/client-cloudtrail"; * const config = {}; // type is CloudTrailClientConfig * const client = new CloudTrailClient(config); * const input = { // ListInsightsMetricDataRequest * TrailName: "STRING_VALUE", * EventSource: "STRING_VALUE", // required * EventName: "STRING_VALUE", // required * InsightType: "ApiCallRateInsight" || "ApiErrorRateInsight", // required * ErrorCode: "STRING_VALUE", * StartTime: new Date("TIMESTAMP"), * EndTime: new Date("TIMESTAMP"), * Period: Number("int"), * DataType: "FillWithZeros" || "NonZeroData", * MaxResults: Number("int"), * NextToken: "STRING_VALUE", * }; * const command = new ListInsightsMetricDataCommand(input); * const response = await client.send(command); * // { // ListInsightsMetricDataResponse * // TrailARN: "STRING_VALUE", * // EventSource: "STRING_VALUE", * // EventName: "STRING_VALUE", * // InsightType: "ApiCallRateInsight" || "ApiErrorRateInsight", * // ErrorCode: "STRING_VALUE", * // Timestamps: [ // Timestamps * // new Date("TIMESTAMP"), * // ], * // Values: [ // InsightsMetricValues * // Number("double"), * // ], * // NextToken: "STRING_VALUE", * // }; * * ``` * * @param ListInsightsMetricDataCommandInput - {@link ListInsightsMetricDataCommandInput} * @returns {@link ListInsightsMetricDataCommandOutput} * @see {@link ListInsightsMetricDataCommandInput} for command's `input` shape. * @see {@link ListInsightsMetricDataCommandOutput} for command's `response` shape. * @see {@link CloudTrailClientResolvedConfig | config} for CloudTrailClient's `config` shape. * * @throws {@link InvalidParameterException} (client fault) *

The request includes a parameter that is not valid.

* * @throws {@link InvalidTrailNameException} (client fault) *

This exception is thrown when the provided trail name is not valid. Trail names must * meet the following requirements:

* * * @throws {@link OperationNotPermittedException} (client fault) *

This exception is thrown when the requested operation is not permitted.

* * @throws {@link UnsupportedOperationException} (client fault) *

This exception is thrown when the requested operation is not supported.

* * @throws {@link CloudTrailServiceException} *

Base exception class for all service exceptions from CloudTrail service.

* * * @public */ export declare class ListInsightsMetricDataCommand extends ListInsightsMetricDataCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: ListInsightsMetricDataRequest; output: ListInsightsMetricDataResponse; }; sdk: { input: ListInsightsMetricDataCommandInput; output: ListInsightsMetricDataCommandOutput; }; }; }