Amazon Lookout for Metrics

2021/03/25 - Amazon Lookout for Metrics - 25 new api methods

Changes  Amazon Lookout for Metrics is now generally available. You can use Lookout for Metrics to monitor your data for anomalies. For more information, see the Amazon Lookout for Metrics Developer Guide.

DeleteAnomalyDetector (new) Link ¶

Deletes a detector. Deleting an anomaly detector will delete all of its corresponding resources including any configured datasets and alerts.

See also: AWS API Documentation

Request Syntax

client.delete_anomaly_detector(
    AnomalyDetectorArn='string'
)
type AnomalyDetectorArn:

string

param AnomalyDetectorArn:

[REQUIRED]

The ARN of the detector to delete.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

GetAnomalyGroup (new) Link ¶

Returns details about a group of anomalous metrics.

See also: AWS API Documentation

Request Syntax

client.get_anomaly_group(
    AnomalyGroupId='string',
    AnomalyDetectorArn='string'
)
type AnomalyGroupId:

string

param AnomalyGroupId:

[REQUIRED]

The ID of the anomaly group.

type AnomalyDetectorArn:

string

param AnomalyDetectorArn:

[REQUIRED]

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

rtype:

dict

returns:

Response Syntax

{
    'AnomalyGroup': {
        'StartTime': 'string',
        'EndTime': 'string',
        'AnomalyGroupId': 'string',
        'AnomalyGroupScore': 123.0,
        'PrimaryMetricName': 'string',
        'MetricLevelImpactList': [
            {
                'MetricName': 'string',
                'NumTimeSeries': 123,
                'ContributionMatrix': {
                    'DimensionContributionList': [
                        {
                            'DimensionName': 'string',
                            'DimensionValueContributionList': [
                                {
                                    'DimensionValue': 'string',
                                    'ContributionScore': 123.0
                                },
                            ]
                        },
                    ]
                }
            },
        ]
    }
}

Response Structure

  • (dict) --

    • AnomalyGroup (dict) --

      Details about the anomaly group.

      • StartTime (string) --

        The start time for the group.

      • EndTime (string) --

        The end time for the group.

      • AnomalyGroupId (string) --

        The ID of the anomaly group.

      • AnomalyGroupScore (float) --

        The severity score of the group.

      • PrimaryMetricName (string) --

        The name of the primary affected measure for the group.

      • MetricLevelImpactList (list) --

        A list of measures affected by the anomaly.

        • (dict) --

          Details about a measure affected by an anomaly.

          • MetricName (string) --

            The name of the measure.

          • NumTimeSeries (integer) --

            The number of anomalous metrics for the measure.

          • ContributionMatrix (dict) --

            Details about the dimensions that contributed to the anomaly.

            • DimensionContributionList (list) --

              A list of contributing dimensions.

              • (dict) --

                Details about a dimension that contributed to an anomaly.

                • DimensionName (string) --

                  The name of the dimension.

                • DimensionValueContributionList (list) --

                  A list of dimension values that contributed to the anomaly.

                  • (dict) --

                    The severity of a value of a dimension that contributed to an anomaly.

                    • DimensionValue (string) --

                      The value of the dimension.

                    • ContributionScore (float) --

                      The severity score of the value.

CreateAlert (new) Link ¶

Creates an alert for an anomaly detector.

See also: AWS API Documentation

Request Syntax

client.create_alert(
    AlertName='string',
    AlertSensitivityThreshold=123,
    AlertDescription='string',
    AnomalyDetectorArn='string',
    Action={
        'SNSConfiguration': {
            'RoleArn': 'string',
            'SnsTopicArn': 'string'
        },
        'LambdaConfiguration': {
            'RoleArn': 'string',
            'LambdaArn': 'string'
        }
    },
    Tags={
        'string': 'string'
    }
)
type AlertName:

string

param AlertName:

[REQUIRED]

The name of the alert.

type AlertSensitivityThreshold:

integer

param AlertSensitivityThreshold:

[REQUIRED]

An integer from 0 to 100 specifying the alert sensitivity threshold.

type AlertDescription:

string

param AlertDescription:

A description of the alert.

type AnomalyDetectorArn:

string

param AnomalyDetectorArn:

[REQUIRED]

The ARN of the detector to which the alert is attached.

type Action:

dict

param Action:

[REQUIRED]

Action that will be triggered when there is an alert.

  • SNSConfiguration (dict) --

    A configuration for an Amazon SNS channel.

    • RoleArn (string) -- [REQUIRED]

      THe ARN of the IAM role that has access to the target SNS topic.

    • SnsTopicArn (string) -- [REQUIRED]

      The ARN of the target SNS topic.

  • LambdaConfiguration (dict) --

    A configuration for an AWS Lambda channel.

    • RoleArn (string) -- [REQUIRED]

      The ARN of an IAM role that has permission to invoke the Lambda function.

    • LambdaArn (string) -- [REQUIRED]

      The ARN of the Lambda function.

type Tags:

dict

param Tags:

A list of tags to apply to the alert.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'AlertArn': 'string'
}

Response Structure

  • (dict) --

    • AlertArn (string) --

      The ARN of the alert.

ActivateAnomalyDetector (new) Link ¶

Activates an anomaly detector.

See also: AWS API Documentation

Request Syntax

client.activate_anomaly_detector(
    AnomalyDetectorArn='string'
)
type AnomalyDetectorArn:

string

param AnomalyDetectorArn:

[REQUIRED]

The ARN of the anomaly detector.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

BackTestAnomalyDetector (new) Link ¶

Runs a backtest for anomaly detection for the specified resource.

See also: AWS API Documentation

Request Syntax

client.back_test_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) --

ListAnomalyGroupSummaries (new) Link ¶

Returns a list of anomaly groups.

See also: AWS API Documentation

Request Syntax

client.list_anomaly_group_summaries(
    AnomalyDetectorArn='string',
    SensitivityThreshold=123,
    MaxResults=123,
    NextToken='string'
)
type AnomalyDetectorArn:

string

param AnomalyDetectorArn:

[REQUIRED]

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

type SensitivityThreshold:

integer

param SensitivityThreshold:

[REQUIRED]

The minimum severity score for inclusion in the output.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return.

type NextToken:

string

param NextToken:

Specify the pagination token that's returned by a previous request to retrieve the next page of results.

rtype:

dict

returns:

Response Syntax

{
    'AnomalyGroupSummaryList': [
        {
            'StartTime': 'string',
            'EndTime': 'string',
            'AnomalyGroupId': 'string',
            'AnomalyGroupScore': 123.0,
            'PrimaryMetricName': 'string'
        },
    ],
    'AnomalyGroupStatistics': {
        'EvaluationStartDate': 'string',
        'TotalCount': 123,
        'ItemizedMetricStatsList': [
            {
                'MetricName': 'string',
                'OccurrenceCount': 123
            },
        ]
    },
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • AnomalyGroupSummaryList (list) --

      A list of anomaly group summaries.

      • (dict) --

        Details about a group of anomalous metrics.

        • StartTime (string) --

          The start time for the group.

        • EndTime (string) --

          The end time for the group.

        • AnomalyGroupId (string) --

          The ID of the anomaly group.

        • AnomalyGroupScore (float) --

          The severity score of the group.

        • PrimaryMetricName (string) --

          The name of the primary affected measure for the group.

    • AnomalyGroupStatistics (dict) --

      Aggregated details about the anomaly groups.

      • EvaluationStartDate (string) --

        The start of the time range that was searched.

      • TotalCount (integer) --

        The number of groups found.

      • ItemizedMetricStatsList (list) --

        Statistics for individual metrics within the group.

        • (dict) --

          Aggregated statistics about a measure affected by an anomaly.

          • MetricName (string) --

            The name of the measure.

          • OccurrenceCount (integer) --

            The number of times that the measure appears.

    • NextToken (string) --

      The pagination token that's included if more results are available.

ListMetricSets (new) Link ¶

Lists the datasets in the current AWS Region.

See also: AWS API Documentation

Request Syntax

client.list_metric_sets(
    AnomalyDetectorArn='string',
    MaxResults=123,
    NextToken='string'
)
type AnomalyDetectorArn:

string

param AnomalyDetectorArn:

The ARN of the anomaly detector containing the metrics sets to list.

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

{
    'MetricSetSummaryList': [
        {
            'MetricSetArn': 'string',
            'AnomalyDetectorArn': 'string',
            'MetricSetDescription': 'string',
            'MetricSetName': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'LastModificationTime': datetime(2015, 1, 1),
            'Tags': {
                'string': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • MetricSetSummaryList (list) --

      A list of the datasets in the AWS Region, with configuration details for each.

      • (dict) --

        Contains information about a dataset.

        • MetricSetArn (string) --

          The ARN of the dataset.

        • AnomalyDetectorArn (string) --

          The ARN of the detector to which the dataset belongs.

        • MetricSetDescription (string) --

          The description of the dataset.

        • MetricSetName (string) --

          The name of the dataset.

        • CreationTime (datetime) --

          The time at which the dataset was created.

        • LastModificationTime (datetime) --

          The time at which the dataset was last modified.

        • Tags (dict) --

          The dataset's tags.

          • (string) --

            • (string) --

    • NextToken (string) --

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

DescribeMetricSet (new) Link ¶

Describes a dataset.

See also: AWS API Documentation

Request Syntax

client.describe_metric_set(
    MetricSetArn='string'
)
type MetricSetArn:

string

param MetricSetArn:

[REQUIRED]

The ARN of the dataset.

rtype:

dict

returns:

Response Syntax

{
    'MetricSetArn': 'string',
    'AnomalyDetectorArn': 'string',
    'MetricSetName': 'string',
    'MetricSetDescription': 'string',
    'CreationTime': datetime(2015, 1, 1),
    'LastModificationTime': datetime(2015, 1, 1),
    'Offset': 123,
    'MetricList': [
        {
            'MetricName': 'string',
            'AggregationFunction': 'AVG'|'SUM',
            'Namespace': 'string'
        },
    ],
    'TimestampColumn': {
        'ColumnName': 'string',
        'ColumnFormat': 'string'
    },
    'DimensionList': [
        'string',
    ],
    'MetricSetFrequency': 'P1D'|'PT1H'|'PT10M'|'PT5M',
    'Timezone': 'string',
    'MetricSource': {
        'S3SourceConfig': {
            'RoleArn': 'string',
            'TemplatedPathList': [
                'string',
            ],
            'HistoricalDataPathList': [
                'string',
            ],
            'FileFormatDescriptor': {
                'CsvFormatDescriptor': {
                    'FileCompression': 'NONE'|'GZIP',
                    'Charset': 'string',
                    'ContainsHeader': True|False,
                    'Delimiter': 'string',
                    'HeaderList': [
                        'string',
                    ],
                    'QuoteSymbol': 'string'
                },
                'JsonFormatDescriptor': {
                    'FileCompression': 'NONE'|'GZIP',
                    'Charset': 'string'
                }
            }
        },
        'AppFlowConfig': {
            'RoleArn': 'string',
            'FlowName': 'string'
        },
        'CloudWatchConfig': {
            'RoleArn': 'string'
        },
        'RDSSourceConfig': {
            'DBInstanceIdentifier': 'string',
            'DatabaseHost': 'string',
            'DatabasePort': 123,
            'SecretManagerArn': 'string',
            'DatabaseName': 'string',
            'TableName': 'string',
            'RoleArn': 'string',
            'VpcConfiguration': {
                'SubnetIdList': [
                    'string',
                ],
                'SecurityGroupIdList': [
                    'string',
                ]
            }
        },
        'RedshiftSourceConfig': {
            'ClusterIdentifier': 'string',
            'DatabaseHost': 'string',
            'DatabasePort': 123,
            'SecretManagerArn': 'string',
            'DatabaseName': 'string',
            'TableName': 'string',
            'RoleArn': 'string',
            'VpcConfiguration': {
                'SubnetIdList': [
                    'string',
                ],
                'SecurityGroupIdList': [
                    'string',
                ]
            }
        }
    }
}

Response Structure

  • (dict) --

    • MetricSetArn (string) --

      The ARN of the dataset.

    • AnomalyDetectorArn (string) --

      The ARN of the detector that contains the dataset.

    • MetricSetName (string) --

      The name of the dataset.

    • MetricSetDescription (string) --

      The dataset's description.

    • CreationTime (datetime) --

      The time at which the dataset was created.

    • LastModificationTime (datetime) --

      The time at which the dataset was last modified.

    • Offset (integer) --

      The offset for the dataset.

    • MetricList (list) --

      A list of the metrics defined by the dataset.

      • (dict) --

        A calculation made by contrasting a measure and a dimension from your source data.

        • MetricName (string) --

          The name of the metric.

        • AggregationFunction (string) --

          The function with which the metric is calculated.

        • Namespace (string) --

          The namespace for the metric.

    • TimestampColumn (dict) --

      Contains information about the column used for tracking time in your source data.

      • ColumnName (string) --

        The name of the timestamp column.

      • ColumnFormat (string) --

        The format of the timestamp column.

    • DimensionList (list) --

      A list of the dimensions chosen for analysis.

      • (string) --

    • MetricSetFrequency (string) --

      The interval at which the data will be analyzed for anomalies.

    • Timezone (string) --

      The time zone in which the dataset's data was recorded.

    • MetricSource (dict) --

      Contains information about the dataset's source data.

      • S3SourceConfig (dict) --

        Contains information about the configuration of the S3 bucket that contains source files.

        • RoleArn (string) --

          The ARN of an IAM role that has read and write access permissions to the source S3 bucket.

        • TemplatedPathList (list) --

          A list of templated paths to the source files.

          • (string) --

        • HistoricalDataPathList (list) --

          A list of paths to the historical data files.

          • (string) --

        • FileFormatDescriptor (dict) --

          Contains information about a source file's formatting.

          • CsvFormatDescriptor (dict) --

            Contains information about how a source CSV data file should be analyzed.

            • FileCompression (string) --

              The level of compression of the source CSV file.

            • Charset (string) --

              The character set in which the source CSV file is written.

            • ContainsHeader (boolean) --

              Whether or not the source CSV file contains a header.

            • Delimiter (string) --

              The character used to delimit the source CSV file.

            • HeaderList (list) --

              A list of the source CSV file's headers, if any.

              • (string) --

            • QuoteSymbol (string) --

              The character used as a quote character.

          • JsonFormatDescriptor (dict) --

            Contains information about how a source JSON data file should be analyzed.

            • FileCompression (string) --

              The level of compression of the source CSV file.

            • Charset (string) --

              The character set in which the source JSON file is written.

      • AppFlowConfig (dict) --

        An object containing information about the AppFlow configuration.

        • RoleArn (string) --

          An IAM role that gives Amazon Lookout for Metrics permission to access the flow.

        • FlowName (string) --

          The name of the flow.

      • CloudWatchConfig (dict) --

        An object containing information about the Amazon CloudWatch monitoring configuration.

        • RoleArn (string) --

          An IAM role that gives Amazon Lookout for Metrics permission to access data in Amazon CloudWatch.

      • RDSSourceConfig (dict) --

        An object containing information about the Amazon Relational Database Service (RDS) configuration.

        • DBInstanceIdentifier (string) --

          A string identifying the database instance.

        • DatabaseHost (string) --

          The host name of the database.

        • DatabasePort (integer) --

          The port number where the database can be accessed.

        • SecretManagerArn (string) --

          The Amazon Resource Name (ARN) of the AWS Secrets Manager role.

        • DatabaseName (string) --

          The name of the RDS database.

        • TableName (string) --

          The name of the table in the database.

        • RoleArn (string) --

          The Amazon Resource Name (ARN) of the role.

        • VpcConfiguration (dict) --

          An object containing information about the Amazon Virtual Private Cloud (VPC) configuration.

          • SubnetIdList (list) --

            An array of strings containing the Amazon VPC subnet IDs (e.g., subnet-0bb1c79de3EXAMPLE.

            • (string) --

          • SecurityGroupIdList (list) --

            An array of strings containing the list of security groups.

            • (string) --

      • RedshiftSourceConfig (dict) --

        An object containing information about the Amazon Redshift database configuration.

        • ClusterIdentifier (string) --

          A string identifying the Redshift cluster.

        • DatabaseHost (string) --

          The name of the database host.

        • DatabasePort (integer) --

          The port number where the database can be accessed.

        • SecretManagerArn (string) --

          The Amazon Resource Name (ARN) of the AWS Secrets Manager role.

        • DatabaseName (string) --

          The Redshift database name.

        • TableName (string) --

          The table name of the Redshift database.

        • RoleArn (string) --

          The Amazon Resource Name (ARN) of the role providing access to the database.

        • VpcConfiguration (dict) --

          Contains information about the Amazon Virtual Private Cloud (VPC) configuration.

          • SubnetIdList (list) --

            An array of strings containing the Amazon VPC subnet IDs (e.g., subnet-0bb1c79de3EXAMPLE.

            • (string) --

          • SecurityGroupIdList (list) --

            An array of strings containing the list of security groups.

            • (string) --

CreateMetricSet (new) Link ¶

Creates a dataset.

See also: AWS API Documentation

Request Syntax

client.create_metric_set(
    AnomalyDetectorArn='string',
    MetricSetName='string',
    MetricSetDescription='string',
    MetricList=[
        {
            'MetricName': 'string',
            'AggregationFunction': 'AVG'|'SUM',
            'Namespace': 'string'
        },
    ],
    Offset=123,
    TimestampColumn={
        'ColumnName': 'string',
        'ColumnFormat': 'string'
    },
    DimensionList=[
        'string',
    ],
    MetricSetFrequency='P1D'|'PT1H'|'PT10M'|'PT5M',
    MetricSource={
        'S3SourceConfig': {
            'RoleArn': 'string',
            'TemplatedPathList': [
                'string',
            ],
            'HistoricalDataPathList': [
                'string',
            ],
            'FileFormatDescriptor': {
                'CsvFormatDescriptor': {
                    'FileCompression': 'NONE'|'GZIP',
                    'Charset': 'string',
                    'ContainsHeader': True|False,
                    'Delimiter': 'string',
                    'HeaderList': [
                        'string',
                    ],
                    'QuoteSymbol': 'string'
                },
                'JsonFormatDescriptor': {
                    'FileCompression': 'NONE'|'GZIP',
                    'Charset': 'string'
                }
            }
        },
        'AppFlowConfig': {
            'RoleArn': 'string',
            'FlowName': 'string'
        },
        'CloudWatchConfig': {
            'RoleArn': 'string'
        },
        'RDSSourceConfig': {
            'DBInstanceIdentifier': 'string',
            'DatabaseHost': 'string',
            'DatabasePort': 123,
            'SecretManagerArn': 'string',
            'DatabaseName': 'string',
            'TableName': 'string',
            'RoleArn': 'string',
            'VpcConfiguration': {
                'SubnetIdList': [
                    'string',
                ],
                'SecurityGroupIdList': [
                    'string',
                ]
            }
        },
        'RedshiftSourceConfig': {
            'ClusterIdentifier': 'string',
            'DatabaseHost': 'string',
            'DatabasePort': 123,
            'SecretManagerArn': 'string',
            'DatabaseName': 'string',
            'TableName': 'string',
            'RoleArn': 'string',
            'VpcConfiguration': {
                'SubnetIdList': [
                    'string',
                ],
                'SecurityGroupIdList': [
                    'string',
                ]
            }
        }
    },
    Timezone='string',
    Tags={
        'string': 'string'
    }
)
type AnomalyDetectorArn:

string

param AnomalyDetectorArn:

[REQUIRED]

The ARN of the anomaly detector that will use the dataset.

type MetricSetName:

string

param MetricSetName:

[REQUIRED]

The name of the dataset.

type MetricSetDescription:

string

param MetricSetDescription:

A description of the dataset you are creating.

type MetricList:

list

param MetricList:

[REQUIRED]

A list of metrics that the dataset will contain.

  • (dict) --

    A calculation made by contrasting a measure and a dimension from your source data.

    • MetricName (string) -- [REQUIRED]

      The name of the metric.

    • AggregationFunction (string) -- [REQUIRED]

      The function with which the metric is calculated.

    • Namespace (string) --

      The namespace for the metric.

type Offset:

integer

param Offset:

After an interval ends, the amount of time that the detector waits before importing data.

type TimestampColumn:

dict

param TimestampColumn:

Contains information about the column used for tracking time in your source data.

  • ColumnName (string) --

    The name of the timestamp column.

  • ColumnFormat (string) --

    The format of the timestamp column.

type DimensionList:

list

param DimensionList:

A list of the fields you want to treat as dimensions.

  • (string) --

type MetricSetFrequency:

string

param MetricSetFrequency:

The frequency with which the source data will be analyzed for anomalies.

type MetricSource:

dict

param MetricSource:

[REQUIRED]

Contains information about how the source data should be interpreted.

  • S3SourceConfig (dict) --

    Contains information about the configuration of the S3 bucket that contains source files.

    • RoleArn (string) -- [REQUIRED]

      The ARN of an IAM role that has read and write access permissions to the source S3 bucket.

    • TemplatedPathList (list) --

      A list of templated paths to the source files.

      • (string) --

    • HistoricalDataPathList (list) --

      A list of paths to the historical data files.

      • (string) --

    • FileFormatDescriptor (dict) --

      Contains information about a source file's formatting.

      • CsvFormatDescriptor (dict) --

        Contains information about how a source CSV data file should be analyzed.

        • FileCompression (string) --

          The level of compression of the source CSV file.

        • Charset (string) --

          The character set in which the source CSV file is written.

        • ContainsHeader (boolean) --

          Whether or not the source CSV file contains a header.

        • Delimiter (string) --

          The character used to delimit the source CSV file.

        • HeaderList (list) --

          A list of the source CSV file's headers, if any.

          • (string) --

        • QuoteSymbol (string) --

          The character used as a quote character.

      • JsonFormatDescriptor (dict) --

        Contains information about how a source JSON data file should be analyzed.

        • FileCompression (string) --

          The level of compression of the source CSV file.

        • Charset (string) --

          The character set in which the source JSON file is written.

  • AppFlowConfig (dict) --

    An object containing information about the AppFlow configuration.

    • RoleArn (string) -- [REQUIRED]

      An IAM role that gives Amazon Lookout for Metrics permission to access the flow.

    • FlowName (string) -- [REQUIRED]

      The name of the flow.

  • CloudWatchConfig (dict) --

    An object containing information about the Amazon CloudWatch monitoring configuration.

    • RoleArn (string) -- [REQUIRED]

      An IAM role that gives Amazon Lookout for Metrics permission to access data in Amazon CloudWatch.

  • RDSSourceConfig (dict) --

    An object containing information about the Amazon Relational Database Service (RDS) configuration.

    • DBInstanceIdentifier (string) -- [REQUIRED]

      A string identifying the database instance.

    • DatabaseHost (string) -- [REQUIRED]

      The host name of the database.

    • DatabasePort (integer) -- [REQUIRED]

      The port number where the database can be accessed.

    • SecretManagerArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the AWS Secrets Manager role.

    • DatabaseName (string) -- [REQUIRED]

      The name of the RDS database.

    • TableName (string) -- [REQUIRED]

      The name of the table in the database.

    • RoleArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the role.

    • VpcConfiguration (dict) -- [REQUIRED]

      An object containing information about the Amazon Virtual Private Cloud (VPC) configuration.

      • SubnetIdList (list) -- [REQUIRED]

        An array of strings containing the Amazon VPC subnet IDs (e.g., subnet-0bb1c79de3EXAMPLE.

        • (string) --

      • SecurityGroupIdList (list) -- [REQUIRED]

        An array of strings containing the list of security groups.

        • (string) --

  • RedshiftSourceConfig (dict) --

    An object containing information about the Amazon Redshift database configuration.

    • ClusterIdentifier (string) -- [REQUIRED]

      A string identifying the Redshift cluster.

    • DatabaseHost (string) -- [REQUIRED]

      The name of the database host.

    • DatabasePort (integer) -- [REQUIRED]

      The port number where the database can be accessed.

    • SecretManagerArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the AWS Secrets Manager role.

    • DatabaseName (string) -- [REQUIRED]

      The Redshift database name.

    • TableName (string) -- [REQUIRED]

      The table name of the Redshift database.

    • RoleArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the role providing access to the database.

    • VpcConfiguration (dict) -- [REQUIRED]

      Contains information about the Amazon Virtual Private Cloud (VPC) configuration.

      • SubnetIdList (list) -- [REQUIRED]

        An array of strings containing the Amazon VPC subnet IDs (e.g., subnet-0bb1c79de3EXAMPLE.

        • (string) --

      • SecurityGroupIdList (list) -- [REQUIRED]

        An array of strings containing the list of security groups.

        • (string) --

type Timezone:

string

param Timezone:

The time zone in which your source data was recorded.

type Tags:

dict

param Tags:

A list of tags to apply to the dataset.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'MetricSetArn': 'string'
}

Response Structure

  • (dict) --

    • MetricSetArn (string) --

      The ARN of the dataset.

GetSampleData (new) Link ¶

Returns a selection of sample records from an Amazon S3 datasource.

See also: AWS API Documentation

Request Syntax

client.get_sample_data(
    S3SourceConfig={
        'RoleArn': 'string',
        'TemplatedPathList': [
            'string',
        ],
        'HistoricalDataPathList': [
            'string',
        ],
        'FileFormatDescriptor': {
            'CsvFormatDescriptor': {
                'FileCompression': 'NONE'|'GZIP',
                'Charset': 'string',
                'ContainsHeader': True|False,
                'Delimiter': 'string',
                'HeaderList': [
                    'string',
                ],
                'QuoteSymbol': 'string'
            },
            'JsonFormatDescriptor': {
                'FileCompression': 'NONE'|'GZIP',
                'Charset': 'string'
            }
        }
    }
)
type S3SourceConfig:

dict

param S3SourceConfig:

A datasource bucket in Amazon S3.

  • RoleArn (string) -- [REQUIRED]

    The Amazon Resource Name (ARN) of the role.

  • TemplatedPathList (list) --

    An array of strings containing the list of templated paths.

    • (string) --

  • HistoricalDataPathList (list) --

    An array of strings containing the historical set of data paths.

    • (string) --

  • FileFormatDescriptor (dict) -- [REQUIRED]

    Contains information about a source file's formatting.

    • CsvFormatDescriptor (dict) --

      Contains information about how a source CSV data file should be analyzed.

      • FileCompression (string) --

        The level of compression of the source CSV file.

      • Charset (string) --

        The character set in which the source CSV file is written.

      • ContainsHeader (boolean) --

        Whether or not the source CSV file contains a header.

      • Delimiter (string) --

        The character used to delimit the source CSV file.

      • HeaderList (list) --

        A list of the source CSV file's headers, if any.

        • (string) --

      • QuoteSymbol (string) --

        The character used as a quote character.

    • JsonFormatDescriptor (dict) --

      Contains information about how a source JSON data file should be analyzed.

      • FileCompression (string) --

        The level of compression of the source CSV file.

      • Charset (string) --

        The character set in which the source JSON file is written.

rtype:

dict

returns:

Response Syntax

{
    'HeaderValues': [
        'string',
    ],
    'SampleRows': [
        [
            'string',
        ],
    ]
}

Response Structure

  • (dict) --

    • HeaderValues (list) --

      A list of header labels for the records.

      • (string) --

    • SampleRows (list) --

      A list of records.

      • (list) --

        • (string) --

PutFeedback (new) Link ¶

Add feedback for an anomalous metric.

See also: AWS API Documentation

Request Syntax

client.put_feedback(
    AnomalyDetectorArn='string',
    AnomalyGroupTimeSeriesFeedback={
        'AnomalyGroupId': 'string',
        'TimeSeriesId': 'string',
        'IsAnomaly': True|False
    }
)
type AnomalyDetectorArn:

string

param AnomalyDetectorArn:

[REQUIRED]

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

type AnomalyGroupTimeSeriesFeedback:

dict

param AnomalyGroupTimeSeriesFeedback:

[REQUIRED]

Feedback for an anomalous metric.

  • AnomalyGroupId (string) -- [REQUIRED]

    The ID of the anomaly group.

  • TimeSeriesId (string) -- [REQUIRED]

    The ID of the metric.

  • IsAnomaly (boolean) -- [REQUIRED]

    Feedback on whether the metric is a legitimate anomaly.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

DescribeAlert (new) Link ¶

Describes an alert.

See also: AWS API Documentation

Request Syntax

client.describe_alert(
    AlertArn='string'
)
type AlertArn:

string

param AlertArn:

[REQUIRED]

The ARN of the alert to describe.

rtype:

dict

returns:

Response Syntax

{
    'Alert': {
        'Action': {
            'SNSConfiguration': {
                'RoleArn': 'string',
                'SnsTopicArn': 'string'
            },
            'LambdaConfiguration': {
                'RoleArn': 'string',
                'LambdaArn': 'string'
            }
        },
        'AlertDescription': 'string',
        'AlertArn': 'string',
        'AnomalyDetectorArn': 'string',
        'AlertName': 'string',
        'AlertSensitivityThreshold': 123,
        'AlertType': 'SNS'|'LAMBDA',
        'AlertStatus': 'ACTIVE'|'INACTIVE',
        'LastModificationTime': datetime(2015, 1, 1),
        'CreationTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • Alert (dict) --

      Contains information about an alert.

      • Action (dict) --

        Action that will be triggered when there is an alert.

        • SNSConfiguration (dict) --

          A configuration for an Amazon SNS channel.

          • RoleArn (string) --

            THe ARN of the IAM role that has access to the target SNS topic.

          • SnsTopicArn (string) --

            The ARN of the target SNS topic.

        • LambdaConfiguration (dict) --

          A configuration for an AWS Lambda channel.

          • RoleArn (string) --

            The ARN of an IAM role that has permission to invoke the Lambda function.

          • LambdaArn (string) --

            The ARN of the Lambda function.

      • AlertDescription (string) --

        A description of the alert.

      • AlertArn (string) --

        The ARN of the alert.

      • AnomalyDetectorArn (string) --

        The ARN of the detector to which the alert is attached.

      • AlertName (string) --

        The name of the alert.

      • AlertSensitivityThreshold (integer) --

        The minimum severity for an anomaly to trigger the alert.

      • AlertType (string) --

        The type of the alert.

      • AlertStatus (string) --

        The status of the alert.

      • LastModificationTime (datetime) --

        The time at which the alert was last modified.

      • CreationTime (datetime) --

        The time at which the alert was created.

GetFeedback (new) Link ¶

Get feedback for an anomaly group.

See also: AWS API Documentation

Request Syntax

client.get_feedback(
    AnomalyDetectorArn='string',
    AnomalyGroupTimeSeriesFeedback={
        'AnomalyGroupId': 'string',
        'TimeSeriesId': 'string'
    },
    MaxResults=123,
    NextToken='string'
)
type AnomalyDetectorArn:

string

param AnomalyDetectorArn:

[REQUIRED]

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

type AnomalyGroupTimeSeriesFeedback:

dict

param AnomalyGroupTimeSeriesFeedback:

[REQUIRED]

The anomalous metric and group ID.

  • AnomalyGroupId (string) -- [REQUIRED]

    The ID of the anomaly group.

  • TimeSeriesId (string) --

    The ID of the metric.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return.

type NextToken:

string

param NextToken:

Specify the pagination token that's returned by a previous request to retrieve the next page of results.

rtype:

dict

returns:

Response Syntax

{
    'AnomalyGroupTimeSeriesFeedback': [
        {
            'TimeSeriesId': 'string',
            'IsAnomaly': True|False
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • AnomalyGroupTimeSeriesFeedback (list) --

      Feedback for an anomalous metric.

      • (dict) --

        Details about feedback submitted for an anomalous metric.

        • TimeSeriesId (string) --

          The ID of the metric.

        • IsAnomaly (boolean) --

          Feedback on whether the metric is a legitimate anomaly.

    • NextToken (string) --

      The pagination token that's included if more results are available.

TagResource (new) Link ¶

Adds tags to a detector, dataset, or alert.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    ResourceArn='string',
    Tags={
        'string': 'string'
    }
)
type ResourceArn:

string

param ResourceArn:

[REQUIRED]

The resource's Amazon Resource Name (ARN).

type Tags:

dict

param Tags:

[REQUIRED]

Tags to apply to the resource. Tag keys and values can contain letters, numbers, spaces, and the following symbols: _.:/=+@-

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

UpdateAnomalyDetector (new) Link ¶

Updates a detector. After activation, you can only change a detector's ingestion delay and description.

See also: AWS API Documentation

Request Syntax

client.update_anomaly_detector(
    AnomalyDetectorArn='string',
    KmsKeyArn='string',
    AnomalyDetectorDescription='string',
    AnomalyDetectorConfig={
        'AnomalyDetectorFrequency': 'P1D'|'PT1H'|'PT10M'|'PT5M'
    }
)
type AnomalyDetectorArn:

string

param AnomalyDetectorArn:

[REQUIRED]

The ARN of the detector to update.

type KmsKeyArn:

string

param KmsKeyArn:

The Amazon Resource Name (ARN) of an AWS KMS encryption key.

type AnomalyDetectorDescription:

string

param AnomalyDetectorDescription:

The updated detector description.

type AnomalyDetectorConfig:

dict

param AnomalyDetectorConfig:

Contains information about the configuration to which the detector will be updated.

  • AnomalyDetectorFrequency (string) --

    The frequency at which the detector analyzes its source data.

rtype:

dict

returns:

Response Syntax

{
    'AnomalyDetectorArn': 'string'
}

Response Structure

  • (dict) --

    • AnomalyDetectorArn (string) --

      The ARN of the updated detector.

UpdateMetricSet (new) Link ¶

Updates a dataset.

See also: AWS API Documentation

Request Syntax

client.update_metric_set(
    MetricSetArn='string',
    MetricSetDescription='string',
    MetricList=[
        {
            'MetricName': 'string',
            'AggregationFunction': 'AVG'|'SUM',
            'Namespace': 'string'
        },
    ],
    Offset=123,
    TimestampColumn={
        'ColumnName': 'string',
        'ColumnFormat': 'string'
    },
    DimensionList=[
        'string',
    ],
    MetricSetFrequency='P1D'|'PT1H'|'PT10M'|'PT5M',
    MetricSource={
        'S3SourceConfig': {
            'RoleArn': 'string',
            'TemplatedPathList': [
                'string',
            ],
            'HistoricalDataPathList': [
                'string',
            ],
            'FileFormatDescriptor': {
                'CsvFormatDescriptor': {
                    'FileCompression': 'NONE'|'GZIP',
                    'Charset': 'string',
                    'ContainsHeader': True|False,
                    'Delimiter': 'string',
                    'HeaderList': [
                        'string',
                    ],
                    'QuoteSymbol': 'string'
                },
                'JsonFormatDescriptor': {
                    'FileCompression': 'NONE'|'GZIP',
                    'Charset': 'string'
                }
            }
        },
        'AppFlowConfig': {
            'RoleArn': 'string',
            'FlowName': 'string'
        },
        'CloudWatchConfig': {
            'RoleArn': 'string'
        },
        'RDSSourceConfig': {
            'DBInstanceIdentifier': 'string',
            'DatabaseHost': 'string',
            'DatabasePort': 123,
            'SecretManagerArn': 'string',
            'DatabaseName': 'string',
            'TableName': 'string',
            'RoleArn': 'string',
            'VpcConfiguration': {
                'SubnetIdList': [
                    'string',
                ],
                'SecurityGroupIdList': [
                    'string',
                ]
            }
        },
        'RedshiftSourceConfig': {
            'ClusterIdentifier': 'string',
            'DatabaseHost': 'string',
            'DatabasePort': 123,
            'SecretManagerArn': 'string',
            'DatabaseName': 'string',
            'TableName': 'string',
            'RoleArn': 'string',
            'VpcConfiguration': {
                'SubnetIdList': [
                    'string',
                ],
                'SecurityGroupIdList': [
                    'string',
                ]
            }
        }
    }
)
type MetricSetArn:

string

param MetricSetArn:

[REQUIRED]

The ARN of the dataset to update.

type MetricSetDescription:

string

param MetricSetDescription:

The dataset's description.

type MetricList:

list

param MetricList:

The metric list.

  • (dict) --

    A calculation made by contrasting a measure and a dimension from your source data.

    • MetricName (string) -- [REQUIRED]

      The name of the metric.

    • AggregationFunction (string) -- [REQUIRED]

      The function with which the metric is calculated.

    • Namespace (string) --

      The namespace for the metric.

type Offset:

integer

param Offset:

After an interval ends, the amount of time that the detector waits before importing data.

type TimestampColumn:

dict

param TimestampColumn:

The timestamp column.

  • ColumnName (string) --

    The name of the timestamp column.

  • ColumnFormat (string) --

    The format of the timestamp column.

type DimensionList:

list

param DimensionList:

The dimension list.

  • (string) --

type MetricSetFrequency:

string

param MetricSetFrequency:

The dataset's interval.

type MetricSource:

dict

param MetricSource:

Contains information about source data used to generate a metric.

  • S3SourceConfig (dict) --

    Contains information about the configuration of the S3 bucket that contains source files.

    • RoleArn (string) -- [REQUIRED]

      The ARN of an IAM role that has read and write access permissions to the source S3 bucket.

    • TemplatedPathList (list) --

      A list of templated paths to the source files.

      • (string) --

    • HistoricalDataPathList (list) --

      A list of paths to the historical data files.

      • (string) --

    • FileFormatDescriptor (dict) --

      Contains information about a source file's formatting.

      • CsvFormatDescriptor (dict) --

        Contains information about how a source CSV data file should be analyzed.

        • FileCompression (string) --

          The level of compression of the source CSV file.

        • Charset (string) --

          The character set in which the source CSV file is written.

        • ContainsHeader (boolean) --

          Whether or not the source CSV file contains a header.

        • Delimiter (string) --

          The character used to delimit the source CSV file.

        • HeaderList (list) --

          A list of the source CSV file's headers, if any.

          • (string) --

        • QuoteSymbol (string) --

          The character used as a quote character.

      • JsonFormatDescriptor (dict) --

        Contains information about how a source JSON data file should be analyzed.

        • FileCompression (string) --

          The level of compression of the source CSV file.

        • Charset (string) --

          The character set in which the source JSON file is written.

  • AppFlowConfig (dict) --

    An object containing information about the AppFlow configuration.

    • RoleArn (string) -- [REQUIRED]

      An IAM role that gives Amazon Lookout for Metrics permission to access the flow.

    • FlowName (string) -- [REQUIRED]

      The name of the flow.

  • CloudWatchConfig (dict) --

    An object containing information about the Amazon CloudWatch monitoring configuration.

    • RoleArn (string) -- [REQUIRED]

      An IAM role that gives Amazon Lookout for Metrics permission to access data in Amazon CloudWatch.

  • RDSSourceConfig (dict) --

    An object containing information about the Amazon Relational Database Service (RDS) configuration.

    • DBInstanceIdentifier (string) -- [REQUIRED]

      A string identifying the database instance.

    • DatabaseHost (string) -- [REQUIRED]

      The host name of the database.

    • DatabasePort (integer) -- [REQUIRED]

      The port number where the database can be accessed.

    • SecretManagerArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the AWS Secrets Manager role.

    • DatabaseName (string) -- [REQUIRED]

      The name of the RDS database.

    • TableName (string) -- [REQUIRED]

      The name of the table in the database.

    • RoleArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the role.

    • VpcConfiguration (dict) -- [REQUIRED]

      An object containing information about the Amazon Virtual Private Cloud (VPC) configuration.

      • SubnetIdList (list) -- [REQUIRED]

        An array of strings containing the Amazon VPC subnet IDs (e.g., subnet-0bb1c79de3EXAMPLE.

        • (string) --

      • SecurityGroupIdList (list) -- [REQUIRED]

        An array of strings containing the list of security groups.

        • (string) --

  • RedshiftSourceConfig (dict) --

    An object containing information about the Amazon Redshift database configuration.

    • ClusterIdentifier (string) -- [REQUIRED]

      A string identifying the Redshift cluster.

    • DatabaseHost (string) -- [REQUIRED]

      The name of the database host.

    • DatabasePort (integer) -- [REQUIRED]

      The port number where the database can be accessed.

    • SecretManagerArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the AWS Secrets Manager role.

    • DatabaseName (string) -- [REQUIRED]

      The Redshift database name.

    • TableName (string) -- [REQUIRED]

      The table name of the Redshift database.

    • RoleArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the role providing access to the database.

    • VpcConfiguration (dict) -- [REQUIRED]

      Contains information about the Amazon Virtual Private Cloud (VPC) configuration.

      • SubnetIdList (list) -- [REQUIRED]

        An array of strings containing the Amazon VPC subnet IDs (e.g., subnet-0bb1c79de3EXAMPLE.

        • (string) --

      • SecurityGroupIdList (list) -- [REQUIRED]

        An array of strings containing the list of security groups.

        • (string) --

rtype:

dict

returns:

Response Syntax

{
    'MetricSetArn': 'string'
}

Response Structure

  • (dict) --

    • MetricSetArn (string) --

      The ARN of the dataset.

DeleteAlert (new) Link ¶

Deletes an alert.

See also: AWS API Documentation

Request Syntax

client.delete_alert(
    AlertArn='string'
)
type AlertArn:

string

param AlertArn:

[REQUIRED]

The ARN of the alert to delete.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

DescribeAnomalyDetector (new) Link ¶

Describes a detector.

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'|'BACK_TEST_ACTIVATING'|'BACK_TEST_ACTIVE'|'BACK_TEST_COMPLETE',
    'FailureReason': 'string',
    'KmsKeyArn': 'string'
}

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, if any.

    • KmsKeyArn (string) --

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

ListTagsForResource (new) Link ¶

Gets a list of tags for a detector, dataset, or alert.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    ResourceArn='string'
)
type ResourceArn:

string

param ResourceArn:

[REQUIRED]

The resource's Amazon Resource Name (ARN).

rtype:

dict

returns:

Response Syntax

{
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • Tags (dict) --

      The resource's tags.

      • (string) --

        • (string) --

ListAnomalyGroupTimeSeries (new) Link ¶

Gets a list of anomalous metrics for a measure in an anomaly group.

See also: AWS API Documentation

Request Syntax

client.list_anomaly_group_time_series(
    AnomalyDetectorArn='string',
    AnomalyGroupId='string',
    MetricName='string',
    MaxResults=123,
    NextToken='string'
)
type AnomalyDetectorArn:

string

param AnomalyDetectorArn:

[REQUIRED]

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

type AnomalyGroupId:

string

param AnomalyGroupId:

[REQUIRED]

The ID of the anomaly group.

type MetricName:

string

param MetricName:

[REQUIRED]

The name of the measure field.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return.

type NextToken:

string

param NextToken:

Specify the pagination token that's returned by a previous request to retrieve the next page of results.

rtype:

dict

returns:

Response Syntax

{
    'AnomalyGroupId': 'string',
    'MetricName': 'string',
    'TimestampList': [
        'string',
    ],
    'NextToken': 'string',
    'TimeSeriesList': [
        {
            'TimeSeriesId': 'string',
            'DimensionList': [
                {
                    'DimensionName': 'string',
                    'DimensionValue': 'string'
                },
            ],
            'MetricValueList': [
                123.0,
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • AnomalyGroupId (string) --

      The ID of the anomaly group.

    • MetricName (string) --

      The name of the measure field.

    • TimestampList (list) --

      Timestamps for the anomalous metrics.

      • (string) --

    • NextToken (string) --

      The pagination token that's included if more results are available.

    • TimeSeriesList (list) --

      A list of anomalous metrics.

      • (dict) --

        Details about a metric. A metric is an aggregation of the values of a measure for a dimension value, such as availability in the us-east-1 Region.

        • TimeSeriesId (string) --

          The ID of the metric.

        • DimensionList (list) --

          The dimensions of the metric.

          • (dict) --

            A dimension name and value.

            • DimensionName (string) --

              The name of the dimension.

            • DimensionValue (string) --

              The value of the dimension.

        • MetricValueList (list) --

          The values for the metric.

          • (float) --

DescribeAnomalyDetectionExecutions (new) Link ¶

Returns information about the status of the specified anomaly detection jobs.

See also: AWS API Documentation

Request Syntax

client.describe_anomaly_detection_executions(
    AnomalyDetectorArn='string',
    Timestamp='string',
    MaxResults=123,
    NextToken='string'
)
type AnomalyDetectorArn:

string

param AnomalyDetectorArn:

[REQUIRED]

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

type Timestamp:

string

param Timestamp:

The timestamp of the anomaly detection job.

type MaxResults:

integer

param MaxResults:

The number of items to return in the response.

type NextToken:

string

param NextToken:

Specify the pagination token that's returned by a previous request to retrieve the next page of results.

rtype:

dict

returns:

Response Syntax

{
    'ExecutionList': [
        {
            'Timestamp': 'string',
            'Status': 'PENDING'|'IN_PROGRESS'|'COMPLETED'|'FAILED'|'FAILED_TO_SCHEDULE',
            'FailureReason': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ExecutionList (list) --

      A list of detection jobs.

      • (dict) --

        The status of an anomaly detector run.

        • Timestamp (string) --

          The run's timestamp.

        • Status (string) --

          The run's status.

        • FailureReason (string) --

          The reason that the run failed, if applicable.

    • NextToken (string) --

      The pagination token that's included if more results are available.

ListAlerts (new) Link ¶

Lists the alerts attached to a detector.

See also: AWS API Documentation

Request Syntax

client.list_alerts(
    AnomalyDetectorArn='string',
    NextToken='string',
    MaxResults=123
)
type AnomalyDetectorArn:

string

param AnomalyDetectorArn:

The ARN of the alert's detector.

type NextToken:

string

param NextToken:

If the result of the previous request is 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.

type MaxResults:

integer

param MaxResults:

The maximum number of results that will be displayed by the request.

rtype:

dict

returns:

Response Syntax

{
    'AlertSummaryList': [
        {
            'AlertArn': 'string',
            'AnomalyDetectorArn': 'string',
            'AlertName': 'string',
            'AlertSensitivityThreshold': 123,
            'AlertType': 'SNS'|'LAMBDA',
            'AlertStatus': 'ACTIVE'|'INACTIVE',
            'LastModificationTime': datetime(2015, 1, 1),
            'CreationTime': datetime(2015, 1, 1),
            'Tags': {
                'string': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • AlertSummaryList (list) --

      Contains information about an alert.

      • (dict) --

        Provides a summary of an alert's configuration.

        • AlertArn (string) --

          The ARN of the alert.

        • AnomalyDetectorArn (string) --

          The ARN of the detector to which the alert is attached.

        • AlertName (string) --

          The name of the alert.

        • AlertSensitivityThreshold (integer) --

          The minimum severity for an anomaly to trigger the alert.

        • AlertType (string) --

          The type of the alert.

        • AlertStatus (string) --

          The status of the alert.

        • LastModificationTime (datetime) --

          The time at which the alert was last modified.

        • CreationTime (datetime) --

          The time at which the alert was created.

        • Tags (dict) --

          The alert's tags.

          • (string) --

            • (string) --

    • NextToken (string) --

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

UntagResource (new) Link ¶

Removes tags from a detector, dataset, or alert.

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    ResourceArn='string',
    TagKeys=[
        'string',
    ]
)
type ResourceArn:

string

param ResourceArn:

[REQUIRED]

The resource's Amazon Resource Name (ARN).

type TagKeys:

list

param TagKeys:

[REQUIRED]

Keys to remove from the resource's tags.

  • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

ListAnomalyDetectors (new) Link ¶

Lists the detectors in the current AWS Region.

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'|'BACK_TEST_ACTIVATING'|'BACK_TEST_ACTIVE'|'BACK_TEST_COMPLETE',
            '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.

CreateAnomalyDetector (new) Link ¶

Creates an anomaly detector.

See also: AWS API Documentation

Request Syntax

client.create_anomaly_detector(
    AnomalyDetectorName='string',
    AnomalyDetectorDescription='string',
    AnomalyDetectorConfig={
        'AnomalyDetectorFrequency': 'P1D'|'PT1H'|'PT10M'|'PT5M'
    },
    KmsKeyArn='string',
    Tags={
        'string': 'string'
    }
)
type AnomalyDetectorName:

string

param AnomalyDetectorName:

[REQUIRED]

The name of the detector.

type AnomalyDetectorDescription:

string

param AnomalyDetectorDescription:

A description of the detector.

type AnomalyDetectorConfig:

dict

param AnomalyDetectorConfig:

[REQUIRED]

Contains information about the configuration of the anomaly detector.

  • AnomalyDetectorFrequency (string) --

    The frequency at which the detector analyzes its source data.

type KmsKeyArn:

string

param KmsKeyArn:

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

type Tags:

dict

param Tags:

A list of tags to apply to the anomaly detector.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'AnomalyDetectorArn': 'string'
}

Response Structure

  • (dict) --

    • AnomalyDetectorArn (string) --

      The ARN of the detector.