UNPKG

@aws-sdk/client-iot

Version:

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

161 lines (160 loc) 6.9 kB
import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTClient"; import { ListViolationEventsRequest, ListViolationEventsResponse } from "../models/models_2"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link ListViolationEventsCommand}. */ export interface ListViolationEventsCommandInput extends ListViolationEventsRequest { } /** * @public * * The output of {@link ListViolationEventsCommand}. */ export interface ListViolationEventsCommandOutput extends ListViolationEventsResponse, __MetadataBearer { } declare const ListViolationEventsCommand_base: { new (input: ListViolationEventsCommandInput): import("@smithy/smithy-client").CommandImpl<ListViolationEventsCommandInput, ListViolationEventsCommandOutput, IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>; new (input: ListViolationEventsCommandInput): import("@smithy/smithy-client").CommandImpl<ListViolationEventsCommandInput, ListViolationEventsCommandOutput, IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** * <p>Lists the Device Defender security profile violations discovered during the given time period. * You can use filters to limit the results to those alerts issued for a particular security profile, * behavior, or thing (device).</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">ListViolationEvents</a> action.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { IoTClient, ListViolationEventsCommand } from "@aws-sdk/client-iot"; // ES Modules import * // const { IoTClient, ListViolationEventsCommand } = require("@aws-sdk/client-iot"); // CommonJS import * const client = new IoTClient(config); * const input = { // ListViolationEventsRequest * startTime: new Date("TIMESTAMP"), // required * endTime: new Date("TIMESTAMP"), // required * thingName: "STRING_VALUE", * securityProfileName: "STRING_VALUE", * behaviorCriteriaType: "STATIC" || "STATISTICAL" || "MACHINE_LEARNING", * listSuppressedAlerts: true || false, * verificationState: "FALSE_POSITIVE" || "BENIGN_POSITIVE" || "TRUE_POSITIVE" || "UNKNOWN", * nextToken: "STRING_VALUE", * maxResults: Number("int"), * }; * const command = new ListViolationEventsCommand(input); * const response = await client.send(command); * // { // ListViolationEventsResponse * // violationEvents: [ // ViolationEvents * // { // ViolationEvent * // violationId: "STRING_VALUE", * // thingName: "STRING_VALUE", * // securityProfileName: "STRING_VALUE", * // behavior: { // Behavior * // name: "STRING_VALUE", // required * // metric: "STRING_VALUE", * // metricDimension: { // MetricDimension * // dimensionName: "STRING_VALUE", // required * // operator: "IN" || "NOT_IN", * // }, * // criteria: { // BehaviorCriteria * // comparisonOperator: "less-than" || "less-than-equals" || "greater-than" || "greater-than-equals" || "in-cidr-set" || "not-in-cidr-set" || "in-port-set" || "not-in-port-set" || "in-set" || "not-in-set", * // value: { // MetricValue * // count: Number("long"), * // cidrs: [ // Cidrs * // "STRING_VALUE", * // ], * // ports: [ // Ports * // Number("int"), * // ], * // number: Number("double"), * // numbers: [ // NumberList * // Number("double"), * // ], * // strings: [ // StringList * // "STRING_VALUE", * // ], * // }, * // durationSeconds: Number("int"), * // consecutiveDatapointsToAlarm: Number("int"), * // consecutiveDatapointsToClear: Number("int"), * // statisticalThreshold: { // StatisticalThreshold * // statistic: "STRING_VALUE", * // }, * // mlDetectionConfig: { // MachineLearningDetectionConfig * // confidenceLevel: "LOW" || "MEDIUM" || "HIGH", // required * // }, * // }, * // suppressAlerts: true || false, * // exportMetric: true || false, * // }, * // metricValue: { * // count: Number("long"), * // cidrs: [ * // "STRING_VALUE", * // ], * // ports: [ * // Number("int"), * // ], * // number: Number("double"), * // numbers: [ * // Number("double"), * // ], * // strings: [ * // "STRING_VALUE", * // ], * // }, * // violationEventAdditionalInfo: { // ViolationEventAdditionalInfo * // confidenceLevel: "LOW" || "MEDIUM" || "HIGH", * // }, * // violationEventType: "in-alarm" || "alarm-cleared" || "alarm-invalidated", * // verificationState: "FALSE_POSITIVE" || "BENIGN_POSITIVE" || "TRUE_POSITIVE" || "UNKNOWN", * // verificationStateDescription: "STRING_VALUE", * // violationEventTime: new Date("TIMESTAMP"), * // }, * // ], * // nextToken: "STRING_VALUE", * // }; * * ``` * * @param ListViolationEventsCommandInput - {@link ListViolationEventsCommandInput} * @returns {@link ListViolationEventsCommandOutput} * @see {@link ListViolationEventsCommandInput} for command's `input` shape. * @see {@link ListViolationEventsCommandOutput} for command's `response` shape. * @see {@link IoTClientResolvedConfig | config} for IoTClient's `config` shape. * * @throws {@link InternalFailureException} (server fault) * <p>An unexpected error has occurred.</p> * * @throws {@link InvalidRequestException} (client fault) * <p>The request is not valid.</p> * * @throws {@link ThrottlingException} (client fault) * <p>The rate exceeds the limit.</p> * * @throws {@link IoTServiceException} * <p>Base exception class for all service exceptions from IoT service.</p> * * * @public */ export declare class ListViolationEventsCommand extends ListViolationEventsCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: ListViolationEventsRequest; output: ListViolationEventsResponse; }; sdk: { input: ListViolationEventsCommandInput; output: ListViolationEventsCommandOutput; }; }; }