put_anomaly_detector
¶
put_anomaly_detector(
workspace_id: WorkspaceId,
anomaly_detector_id: AnomalyDetectorId,
configuration: AnomalyDetectorConfiguration,
*,
config_overrides: Optional[ampClientConfig] = None,
evaluation_interval_in_seconds: Optional[AnomalyDetectorEvaluationInterval] = None,
missing_data_action: Optional[AnomalyDetectorMissingDataAction] = None,
labels: Optional[PrometheusMetricLabelMap] = None,
client_token: Optional[IdempotencyToken] = None,
) -> PutAnomalyDetectorResponse
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.
Parameters:
-
workspace_id(WorkspaceId) –The identifier of the workspace containing the anomaly detector to update.
-
anomaly_detector_id(AnomalyDetectorId) –The identifier of the anomaly detector to update.
-
evaluation_interval_in_seconds(Optional[AnomalyDetectorEvaluationInterval], default:None) –The frequency, in seconds, at which the anomaly detector evaluates metrics.
-
missing_data_action(Optional[AnomalyDetectorMissingDataAction], default:None) –Specifies the action to take when data is missing during evaluation.
-
configuration(AnomalyDetectorConfiguration) –The algorithm configuration for the anomaly detector.
-
labels(Optional[PrometheusMetricLabelMap], default:None) –The Amazon Managed Service for Prometheus metric labels to associate with the anomaly detector.
-
client_token(Optional[IdempotencyToken], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–The request would cause an inconsistent state.
-
InternalServerException–An unexpected error occurred during the processing of the request.
-
ServiceQuotaExceededException–Completing the request would cause a service quota to be exceeded.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input fails to satisfy the constraints specified by an Amazon Web Services service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_amp/_services/amp.py
1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 | |