Amazon Lookout for Metrics

2022/01/14 - Amazon Lookout for Metrics - 1 new 2 updated api methods

Changes  This release adds a new DeactivateAnomalyDetector API operation.

DeactivateAnomalyDetector (new) Link ¶

Deactivates an anomaly detector.

See also: AWS API Documentation

Request Syntax

client.deactivate_anomaly_detector(
    AnomalyDetectorArn='string'
)
type AnomalyDetectorArn

string

param AnomalyDetectorArn

[REQUIRED]

The Amazon Resource Name (ARN) of the anomaly detector.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DescribeAnomalyDetector (updated) Link ¶
Changes (response)
{'FailureType': {'DEACTIVATION_FAILURE'},
 'Status': {'DEACTIVATED', 'DEACTIVATING'}}

Describes a detector.

Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.

See also: AWS API Documentation

Request Syntax

client.describe_anomaly_detector(
    AnomalyDetectorArn='string'
)
type AnomalyDetectorArn

string

param AnomalyDetectorArn

[REQUIRED]

The ARN of the detector to describe.

rtype

dict

returns

Response Syntax

{
    'AnomalyDetectorArn': 'string',
    'AnomalyDetectorName': 'string',
    'AnomalyDetectorDescription': 'string',
    'AnomalyDetectorConfig': {
        'AnomalyDetectorFrequency': 'P1D'|'PT1H'|'PT10M'|'PT5M'
    },
    'CreationTime': datetime(2015, 1, 1),
    'LastModificationTime': datetime(2015, 1, 1),
    'Status': 'ACTIVE'|'ACTIVATING'|'DELETING'|'FAILED'|'INACTIVE'|'LEARNING'|'BACK_TEST_ACTIVATING'|'BACK_TEST_ACTIVE'|'BACK_TEST_COMPLETE'|'DEACTIVATED'|'DEACTIVATING',
    'FailureReason': 'string',
    'KmsKeyArn': 'string',
    'FailureType': 'ACTIVATION_FAILURE'|'BACK_TEST_ACTIVATION_FAILURE'|'DELETION_FAILURE'|'DEACTIVATION_FAILURE'
}

Response Structure

  • (dict) --

    • AnomalyDetectorArn (string) --

      The ARN of the detector.

    • AnomalyDetectorName (string) --

      The name of the detector.

    • AnomalyDetectorDescription (string) --

      A description of the detector.

    • AnomalyDetectorConfig (dict) --

      Contains information about the detector's configuration.

      • AnomalyDetectorFrequency (string) --

        The interval at which the detector analyzes its source data.

    • CreationTime (datetime) --

      The time at which the detector was created.

    • LastModificationTime (datetime) --

      The time at which the detector was last modified.

    • Status (string) --

      The status of the detector.

    • FailureReason (string) --

      The reason that the detector failed.

    • KmsKeyArn (string) --

      The ARN of the KMS key to use to encrypt your data.

    • FailureType (string) --

      The process that caused the detector to fail.

ListAnomalyDetectors (updated) Link ¶
Changes (response)
{'AnomalyDetectorSummaryList': {'Status': {'DEACTIVATED', 'DEACTIVATING'}}}

Lists the detectors in the current AWS Region.

Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.

See also: AWS API Documentation

Request Syntax

client.list_anomaly_detectors(
    MaxResults=123,
    NextToken='string'
)
type MaxResults

integer

param MaxResults

The maximum number of results to return.

type NextToken

string

param NextToken

If the result of the previous request was truncated, the response includes a NextToken . To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.

rtype

dict

returns

Response Syntax

{
    'AnomalyDetectorSummaryList': [
        {
            'AnomalyDetectorArn': 'string',
            'AnomalyDetectorName': 'string',
            'AnomalyDetectorDescription': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'LastModificationTime': datetime(2015, 1, 1),
            'Status': 'ACTIVE'|'ACTIVATING'|'DELETING'|'FAILED'|'INACTIVE'|'LEARNING'|'BACK_TEST_ACTIVATING'|'BACK_TEST_ACTIVE'|'BACK_TEST_COMPLETE'|'DEACTIVATED'|'DEACTIVATING',
            'Tags': {
                'string': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • AnomalyDetectorSummaryList (list) --

      A list of anomaly detectors in the account in the current region.

      • (dict) --

        Contains information about an an anomaly detector.

        • AnomalyDetectorArn (string) --

          The ARN of the detector.

        • AnomalyDetectorName (string) --

          The name of the detector.

        • AnomalyDetectorDescription (string) --

          A description of the detector.

        • CreationTime (datetime) --

          The time at which the detector was created.

        • LastModificationTime (datetime) --

          The time at which the detector was last modified.

        • Status (string) --

          The status of detector.

        • Tags (dict) --

          The detector's tags.

          • (string) --

            • (string) --

    • NextToken (string) --

      If the response is truncated, the service returns this token. To retrieve the next set of results, use the token in the next request.