Skip to content

Put Anomaly Detector

prometheusservice_put_anomaly_detector R Documentation

When you call PutAnomalyDetector, the operation creates a new anomaly detector if one doesn't exist, or updates an existing one

Description

When you call put_anomaly_detector, 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.

Usage

prometheusservice_put_anomaly_detector(workspaceId, anomalyDetectorId,
  evaluationIntervalInSeconds, missingDataAction, configuration, labels,
  clientToken)

Arguments

workspaceId

[required] The identifier of the workspace containing the anomaly detector to update.

anomalyDetectorId

[required] The identifier of the anomaly detector to update.

evaluationIntervalInSeconds

The frequency, in seconds, at which the anomaly detector evaluates metrics.

missingDataAction

Specifies the action to take when data is missing during evaluation.

configuration

[required] The algorithm configuration for the anomaly detector.

labels

The Amazon Managed Service for Prometheus metric labels to associate with the anomaly detector.

clientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Value

A list with the following syntax:

list(
  anomalyDetectorId = "string",
  arn = "string",
  status = list(
    statusCode = "CREATING"|"ACTIVE"|"UPDATING"|"DELETING"|"CREATION_FAILED"|"UPDATE_FAILED"|"DELETION_FAILED",
    statusReason = "string"
  ),
  tags = list(
    "string"
  )
)

Request syntax

svc$put_anomaly_detector(
  workspaceId = "string",
  anomalyDetectorId = "string",
  evaluationIntervalInSeconds = 123,
  missingDataAction = list(
    markAsAnomaly = TRUE|FALSE,
    skip = TRUE|FALSE
  ),
  configuration = list(
    randomCutForest = list(
      query = "string",
      shingleSize = 123,
      sampleSize = 123,
      ignoreNearExpectedFromAbove = list(
        amount = 123.0,
        ratio = 123.0
      ),
      ignoreNearExpectedFromBelow = list(
        amount = 123.0,
        ratio = 123.0
      )
    )
  ),
  labels = list(
    "string"
  ),
  clientToken = "string"
)