import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { PutAnomalyDetectorRequest, PutAnomalyDetectorResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link PutAnomalyDetectorCommand}. */ export interface PutAnomalyDetectorCommandInput extends PutAnomalyDetectorRequest { } /** * @public * * The output of {@link PutAnomalyDetectorCommand}. */ export interface PutAnomalyDetectorCommandOutput extends PutAnomalyDetectorResponse, __MetadataBearer { } declare const PutAnomalyDetectorCommand_base: { new (input: PutAnomalyDetectorCommandInput): import("@smithy/core/client").CommandImpl; new (input: PutAnomalyDetectorCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

When you call PutAnomalyDetector, the operation creates a new anomaly detector if one doesn't exist, or updates an existing one. Each call to this operation triggers a complete retraining of the detector, which includes querying the minimum required samples and backfilling the detector with historical data. This process occurs regardless of whether you're making a minor change like updating the evaluation interval or making more substantial modifications. The operation serves as the single method for creating, updating, and retraining anomaly detectors.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { AmpClient, PutAnomalyDetectorCommand } from "@aws-sdk/client-amp"; // ES Modules import * // const { AmpClient, PutAnomalyDetectorCommand } = require("@aws-sdk/client-amp"); // CommonJS import * // import type { AmpClientConfig } from "@aws-sdk/client-amp"; * const config = {}; // type is AmpClientConfig * const client = new AmpClient(config); * const input = { // PutAnomalyDetectorRequest * workspaceId: "STRING_VALUE", // required * anomalyDetectorId: "STRING_VALUE", // required * evaluationIntervalInSeconds: Number("int"), * missingDataAction: { // AnomalyDetectorMissingDataAction Union: only one key present * markAsAnomaly: true || false, * skip: true || false, * }, * configuration: { // AnomalyDetectorConfiguration Union: only one key present * randomCutForest: { // RandomCutForestConfiguration * query: "STRING_VALUE", // required * shingleSize: Number("int"), * sampleSize: Number("int"), * ignoreNearExpectedFromAbove: { // IgnoreNearExpected Union: only one key present * amount: Number("double"), * ratio: Number("double"), * }, * ignoreNearExpectedFromBelow: {// Union: only one key present * amount: Number("double"), * ratio: Number("double"), * }, * }, * }, * labels: { // PrometheusMetricLabelMap * "": "STRING_VALUE", * }, * clientToken: "STRING_VALUE", * }; * const command = new PutAnomalyDetectorCommand(input); * const response = await client.send(command); * // { // PutAnomalyDetectorResponse * // anomalyDetectorId: "STRING_VALUE", // required * // arn: "STRING_VALUE", // required * // status: { // AnomalyDetectorStatus * // statusCode: "CREATING" || "ACTIVE" || "UPDATING" || "DELETING" || "CREATION_FAILED" || "UPDATE_FAILED" || "DELETION_FAILED", // required * // statusReason: "STRING_VALUE", * // }, * // tags: { // TagMap * // "": "STRING_VALUE", * // }, * // }; * * ``` * * @param PutAnomalyDetectorCommandInput - {@link PutAnomalyDetectorCommandInput} * @returns {@link PutAnomalyDetectorCommandOutput} * @see {@link PutAnomalyDetectorCommandInput} for command's `input` shape. * @see {@link PutAnomalyDetectorCommandOutput} for command's `response` shape. * @see {@link AmpClientResolvedConfig | config} for AmpClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

You do not have sufficient access to perform this action.

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

The request would cause an inconsistent state.

* * @throws {@link InternalServerException} (server fault) *

An unexpected error occurred during the processing of the request.

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

Completing the request would cause a service quota to be exceeded.

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

The request was denied due to request throttling.

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

The input fails to satisfy the constraints specified by an Amazon Web Services service.

* * @throws {@link AmpServiceException} *

Base exception class for all service exceptions from Amp service.

* * * @public */ export declare class PutAnomalyDetectorCommand extends PutAnomalyDetectorCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: PutAnomalyDetectorRequest; output: PutAnomalyDetectorResponse; }; sdk: { input: PutAnomalyDetectorCommandInput; output: PutAnomalyDetectorCommandOutput; }; }; }