Table of Contents
LookoutMetrics.
Client
¶A low-level client representing Amazon Lookout for Metrics (LookoutMetrics)
This is the Amazon Lookout for Metrics API Reference . For an introduction to the service with tutorials for getting started, visit Amazon Lookout for Metrics Developer Guide .
import boto3
client = boto3.client('lookoutmetrics')
These are the available methods:
activate_anomaly_detector()
back_test_anomaly_detector()
can_paginate()
close()
create_alert()
create_anomaly_detector()
create_metric_set()
deactivate_anomaly_detector()
delete_alert()
delete_anomaly_detector()
describe_alert()
describe_anomaly_detection_executions()
describe_anomaly_detector()
describe_metric_set()
detect_metric_set_config()
get_anomaly_group()
get_data_quality_metrics()
get_feedback()
get_paginator()
get_sample_data()
get_waiter()
list_alerts()
list_anomaly_detectors()
list_anomaly_group_related_metrics()
list_anomaly_group_summaries()
list_anomaly_group_time_series()
list_metric_sets()
list_tags_for_resource()
put_feedback()
tag_resource()
untag_resource()
update_alert()
update_anomaly_detector()
update_metric_set()
activate_anomaly_detector
(**kwargs)¶Activates an anomaly detector.
See also: AWS API Documentation
Request Syntax
response = client.activate_anomaly_detector(
AnomalyDetectorArn='string'
)
[REQUIRED]
The ARN of the anomaly detector.
{}
Response Structure
Exceptions
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.ConflictException
back_test_anomaly_detector
(**kwargs)¶Runs a backtest for anomaly detection for the specified resource.
See also: AWS API Documentation
Request Syntax
response = client.back_test_anomaly_detector(
AnomalyDetectorArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the anomaly detector.
{}
Response Structure
Exceptions
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
LookoutMetrics.Client.exceptions.InternalServerException
can_paginate
(operation_name)¶Check if an operation can be paginated.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.True
if the operation can be paginated,
False
otherwise.close
()¶Closes underlying endpoint connections.
create_alert
(**kwargs)¶Creates an alert for an anomaly detector.
See also: AWS API Documentation
Request Syntax
response = client.create_alert(
AlertName='string',
AlertSensitivityThreshold=123,
AlertDescription='string',
AnomalyDetectorArn='string',
Action={
'SNSConfiguration': {
'RoleArn': 'string',
'SnsTopicArn': 'string',
'SnsFormat': 'LONG_TEXT'|'SHORT_TEXT'|'JSON'
},
'LambdaConfiguration': {
'RoleArn': 'string',
'LambdaArn': 'string'
}
},
Tags={
'string': 'string'
},
AlertFilters={
'MetricList': [
'string',
],
'DimensionFilterList': [
{
'DimensionName': 'string',
'DimensionValueList': [
'string',
]
},
]
}
)
[REQUIRED]
The name of the alert.
[REQUIRED]
The ARN of the detector to which the alert is attached.
[REQUIRED]
Action that will be triggered when there is an alert.
A configuration for an Amazon SNS channel.
The ARN of the IAM role that has access to the target SNS topic.
The ARN of the target SNS topic.
The format of the SNS topic.
JSON
– Send JSON alerts with an anomaly ID and a link to the anomaly detail page. This is the default.LONG_TEXT
– Send human-readable alerts with information about the impacted timeseries and a link to the anomaly detail page. We recommend this for email.SHORT_TEXT
– Send human-readable alerts with a link to the anomaly detail page. We recommend this for SMS.A configuration for an AWS Lambda channel.
The ARN of an IAM role that has permission to invoke the Lambda function.
The ARN of the Lambda function.
A list of tags to apply to the alert.
The configuration of the alert filters, containing MetricList and DimensionFilterList.
The list of measures that you want to get alerts for.
The list of DimensionFilter objects that are used for dimension-based filtering.
The dimension filter, containing DimensionName and DimensionValueList.
The name of the dimension to filter on.
The list of values for the dimension specified in DimensionName that you want to filter on.
dict
Response Syntax
{
'AlertArn': 'string'
}
Response Structure
(dict) --
AlertArn (string) --
The ARN of the alert.
Exceptions
LookoutMetrics.Client.exceptions.ConflictException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.ServiceQuotaExceededException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.InternalServerException
create_anomaly_detector
(**kwargs)¶Creates an anomaly detector.
See also: AWS API Documentation
Request Syntax
response = client.create_anomaly_detector(
AnomalyDetectorName='string',
AnomalyDetectorDescription='string',
AnomalyDetectorConfig={
'AnomalyDetectorFrequency': 'P1D'|'PT1H'|'PT10M'|'PT5M'
},
KmsKeyArn='string',
Tags={
'string': 'string'
}
)
[REQUIRED]
The name of the detector.
[REQUIRED]
Contains information about the configuration of the anomaly detector.
The frequency at which the detector analyzes its source data.
A list of tags to apply to the anomaly detector.
dict
Response Syntax
{
'AnomalyDetectorArn': 'string'
}
Response Structure
(dict) --
AnomalyDetectorArn (string) --
The ARN of the detector.
Exceptions
LookoutMetrics.Client.exceptions.ConflictException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.ServiceQuotaExceededException
LookoutMetrics.Client.exceptions.ConflictException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
LookoutMetrics.Client.exceptions.InternalServerException
create_metric_set
(**kwargs)¶Creates a dataset.
See also: AWS API Documentation
Request Syntax
response = 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',
'BackTestConfiguration': {
'RunBackTestMode': True|False
}
},
'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',
]
}
},
'AthenaSourceConfig': {
'RoleArn': 'string',
'DatabaseName': 'string',
'DataCatalog': 'string',
'TableName': 'string',
'WorkGroupName': 'string',
'S3ResultsPath': 'string',
'BackTestConfiguration': {
'RunBackTestMode': True|False
}
}
},
Timezone='string',
Tags={
'string': 'string'
},
DimensionFilterList=[
{
'Name': 'string',
'FilterList': [
{
'DimensionValue': 'string',
'FilterOperation': 'EQUALS'
},
]
},
]
)
[REQUIRED]
The ARN of the anomaly detector that will use the dataset.
[REQUIRED]
The name of the dataset.
[REQUIRED]
A list of metrics that the dataset will contain.
A calculation made by contrasting a measure and a dimension from your source data.
The name of the metric.
The function with which the metric is calculated.
The namespace for the metric.
Contains information about the column used for tracking time in your source data.
The name of the timestamp column.
The format of the timestamp column.
A list of the fields you want to treat as dimensions.
[REQUIRED]
Contains information about how the source data should be interpreted.
Contains information about the configuration of the S3 bucket that contains source files.
The ARN of an IAM role that has read and write access permissions to the source S3 bucket.
A list of templated paths to the source files.
A list of paths to the historical data files.
Contains information about a source file's formatting.
Contains information about how a source CSV data file should be analyzed.
The level of compression of the source CSV file.
The character set in which the source CSV file is written.
Whether or not the source CSV file contains a header.
The character used to delimit the source CSV file.
A list of the source CSV file's headers, if any.
The character used as a quote character.
Contains information about how a source JSON data file should be analyzed.
The level of compression of the source CSV file.
The character set in which the source JSON file is written.
Details about an AppFlow datasource.
An IAM role that gives Amazon Lookout for Metrics permission to access the flow.
name of the flow.
Details about an Amazon CloudWatch monitoring datasource.
An IAM role that gives Amazon Lookout for Metrics permission to access data in Amazon CloudWatch.
Settings for backtest mode.
Run a backtest instead of monitoring new data.
Details about an Amazon Relational Database Service (RDS) datasource.
A string identifying the database instance.
The host name of the database.
The port number where the database can be accessed.
The Amazon Resource Name (ARN) of the AWS Secrets Manager role.
The name of the RDS database.
The name of the table in the database.
The Amazon Resource Name (ARN) of the role.
An object containing information about the Amazon Virtual Private Cloud (VPC) configuration.
An array of strings containing the Amazon VPC subnet IDs (e.g., subnet-0bb1c79de3EXAMPLE
.
An array of strings containing the list of security groups.
Details about an Amazon Redshift database datasource.
A string identifying the Redshift cluster.
The name of the database host.
The port number where the database can be accessed.
The Amazon Resource Name (ARN) of the AWS Secrets Manager role.
The Redshift database name.
The table name of the Redshift database.
The Amazon Resource Name (ARN) of the role providing access to the database.
Contains information about the Amazon Virtual Private Cloud (VPC) configuration.
An array of strings containing the Amazon VPC subnet IDs (e.g., subnet-0bb1c79de3EXAMPLE
.
An array of strings containing the list of security groups.
Details about an Amazon Athena datasource.
An IAM role that gives Amazon Lookout for Metrics permission to access the data.
The database's name.
The database's data catalog.
The database's table name.
The database's work group name.
The database's results path.
Settings for backtest mode.
Run a backtest instead of monitoring new data.
A list of tags to apply to the dataset.
A list of filters that specify which data is kept for anomaly detection.
Describes a list of filters for choosing a subset of dimension values. Each filter consists of the dimension and one of its values that you want to include. When multiple dimensions or values are specified, the dimensions are joined with an AND operation and the values are joined with an OR operation.
The dimension that you want to filter on.
The list of filters that you are applying.
Describes a filter for choosing a subset of dimension values. Each filter consists of the dimension that you want to include and the condition statement. The condition statement is specified in the FilterOperation
object.
The value that you want to include in the filter.
The condition to apply.
dict
Response Syntax
{
'MetricSetArn': 'string'
}
Response Structure
(dict) --
MetricSetArn (string) --
The ARN of the dataset.
Exceptions
LookoutMetrics.Client.exceptions.ConflictException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ServiceQuotaExceededException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
LookoutMetrics.Client.exceptions.InternalServerException
deactivate_anomaly_detector
(**kwargs)¶Deactivates an anomaly detector.
See also: AWS API Documentation
Request Syntax
response = client.deactivate_anomaly_detector(
AnomalyDetectorArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the anomaly detector.
{}
Response Structure
Exceptions
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.ConflictException
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
LookoutMetrics.Client.exceptions.InternalServerException
delete_alert
(**kwargs)¶Deletes an alert.
See also: AWS API Documentation
Request Syntax
response = client.delete_alert(
AlertArn='string'
)
[REQUIRED]
The ARN of the alert to delete.
{}
Response Structure
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.TooManyRequestsException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.InternalServerException
delete_anomaly_detector
(**kwargs)¶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
response = client.delete_anomaly_detector(
AnomalyDetectorArn='string'
)
[REQUIRED]
The ARN of the detector to delete.
{}
Response Structure
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.ConflictException
LookoutMetrics.Client.exceptions.TooManyRequestsException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.InternalServerException
describe_alert
(**kwargs)¶Describes an alert.
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
response = client.describe_alert(
AlertArn='string'
)
[REQUIRED]
The ARN of the alert to describe.
{
'Alert': {
'Action': {
'SNSConfiguration': {
'RoleArn': 'string',
'SnsTopicArn': 'string',
'SnsFormat': 'LONG_TEXT'|'SHORT_TEXT'|'JSON'
},
'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),
'AlertFilters': {
'MetricList': [
'string',
],
'DimensionFilterList': [
{
'DimensionName': 'string',
'DimensionValueList': [
'string',
]
},
]
}
}
}
Response Structure
Contains information about an alert.
Action that will be triggered when there is an alert.
A configuration for an Amazon SNS channel.
The ARN of the IAM role that has access to the target SNS topic.
The ARN of the target SNS topic.
The format of the SNS topic.
JSON
– Send JSON alerts with an anomaly ID and a link to the anomaly detail page. This is the default.LONG_TEXT
– Send human-readable alerts with information about the impacted timeseries and a link to the anomaly detail page. We recommend this for email.SHORT_TEXT
– Send human-readable alerts with a link to the anomaly detail page. We recommend this for SMS.A configuration for an AWS Lambda channel.
The ARN of an IAM role that has permission to invoke the Lambda function.
The ARN of the Lambda function.
A description of the alert.
The ARN of the alert.
The ARN of the detector to which the alert is attached.
The name of the alert.
The minimum severity for an anomaly to trigger the alert.
The type of the alert.
The status of the alert.
The time at which the alert was last modified.
The time at which the alert was created.
The configuration of the alert filters, containing MetricList and DimensionFilter.
The list of measures that you want to get alerts for.
The list of DimensionFilter objects that are used for dimension-based filtering.
The dimension filter, containing DimensionName and DimensionValueList.
The name of the dimension to filter on.
The list of values for the dimension specified in DimensionName that you want to filter on.
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.TooManyRequestsException
describe_anomaly_detection_executions
(**kwargs)¶Returns information about the status of the specified anomaly detection jobs.
See also: AWS API Documentation
Request Syntax
response = client.describe_anomaly_detection_executions(
AnomalyDetectorArn='string',
Timestamp='string',
MaxResults=123,
NextToken='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the anomaly detector.
dict
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.
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
LookoutMetrics.Client.exceptions.InternalServerException
describe_anomaly_detector
(**kwargs)¶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
response = client.describe_anomaly_detector(
AnomalyDetectorArn='string'
)
[REQUIRED]
The ARN of the detector to describe.
{
'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
The ARN of the detector.
The name of the detector.
A description of the detector.
Contains information about the detector's configuration.
The interval at which the detector analyzes its source data.
The time at which the detector was created.
The time at which the detector was last modified.
The status of the detector.
The reason that the detector failed.
The ARN of the KMS key to use to encrypt your data.
The process that caused the detector to fail.
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.TooManyRequestsException
describe_metric_set
(**kwargs)¶Describes a dataset.
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
response = client.describe_metric_set(
MetricSetArn='string'
)
[REQUIRED]
The ARN of the dataset.
{
'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',
'BackTestConfiguration': {
'RunBackTestMode': True|False
}
},
'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',
]
}
},
'AthenaSourceConfig': {
'RoleArn': 'string',
'DatabaseName': 'string',
'DataCatalog': 'string',
'TableName': 'string',
'WorkGroupName': 'string',
'S3ResultsPath': 'string',
'BackTestConfiguration': {
'RunBackTestMode': True|False
}
}
},
'DimensionFilterList': [
{
'Name': 'string',
'FilterList': [
{
'DimensionValue': 'string',
'FilterOperation': 'EQUALS'
},
]
},
]
}
Response Structure
The ARN of the dataset.
The ARN of the detector that contains the dataset.
The name of the dataset.
The dataset's description.
The time at which the dataset was created.
The time at which the dataset was last modified.
After an interval ends, the amount of seconds that the detector waits before importing data. Offset is only supported for S3, Redshift, Athena and datasources.
A list of the metrics defined by the dataset.
A calculation made by contrasting a measure and a dimension from your source data.
The name of the metric.
The function with which the metric is calculated.
The namespace for the metric.
Contains information about the column used for tracking time in your source data.
The name of the timestamp column.
The format of the timestamp column.
A list of the dimensions chosen for analysis.
The interval at which the data will be analyzed for anomalies.
The time zone in which the dataset's data was recorded.
Contains information about the dataset's source data.
Contains information about the configuration of the S3 bucket that contains source files.
The ARN of an IAM role that has read and write access permissions to the source S3 bucket.
A list of templated paths to the source files.
A list of paths to the historical data files.
Contains information about a source file's formatting.
Contains information about how a source CSV data file should be analyzed.
The level of compression of the source CSV file.
The character set in which the source CSV file is written.
Whether or not the source CSV file contains a header.
The character used to delimit the source CSV file.
A list of the source CSV file's headers, if any.
The character used as a quote character.
Contains information about how a source JSON data file should be analyzed.
The level of compression of the source CSV file.
The character set in which the source JSON file is written.
Details about an AppFlow datasource.
An IAM role that gives Amazon Lookout for Metrics permission to access the flow.
name of the flow.
Details about an Amazon CloudWatch monitoring datasource.
An IAM role that gives Amazon Lookout for Metrics permission to access data in Amazon CloudWatch.
Settings for backtest mode.
Run a backtest instead of monitoring new data.
Details about an Amazon Relational Database Service (RDS) datasource.
A string identifying the database instance.
The host name of the database.
The port number where the database can be accessed.
The Amazon Resource Name (ARN) of the AWS Secrets Manager role.
The name of the RDS database.
The name of the table in the database.
The Amazon Resource Name (ARN) of the role.
An object containing information about the Amazon Virtual Private Cloud (VPC) configuration.
An array of strings containing the Amazon VPC subnet IDs (e.g., subnet-0bb1c79de3EXAMPLE
.
An array of strings containing the list of security groups.
Details about an Amazon Redshift database datasource.
A string identifying the Redshift cluster.
The name of the database host.
The port number where the database can be accessed.
The Amazon Resource Name (ARN) of the AWS Secrets Manager role.
The Redshift database name.
The table name of the Redshift database.
The Amazon Resource Name (ARN) of the role providing access to the database.
Contains information about the Amazon Virtual Private Cloud (VPC) configuration.
An array of strings containing the Amazon VPC subnet IDs (e.g., subnet-0bb1c79de3EXAMPLE
.
An array of strings containing the list of security groups.
Details about an Amazon Athena datasource.
An IAM role that gives Amazon Lookout for Metrics permission to access the data.
The database's name.
The database's data catalog.
The database's table name.
The database's work group name.
The database's results path.
Settings for backtest mode.
Run a backtest instead of monitoring new data.
The dimensions and their values that were used to filter the dataset.
Describes a list of filters for choosing a subset of dimension values. Each filter consists of the dimension and one of its values that you want to include. When multiple dimensions or values are specified, the dimensions are joined with an AND operation and the values are joined with an OR operation.
The dimension that you want to filter on.
The list of filters that you are applying.
Describes a filter for choosing a subset of dimension values. Each filter consists of the dimension that you want to include and the condition statement. The condition statement is specified in the FilterOperation
object.
The value that you want to include in the filter.
The condition to apply.
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
LookoutMetrics.Client.exceptions.InternalServerException
detect_metric_set_config
(**kwargs)¶Detects an Amazon S3 dataset's file format, interval, and offset.
See also: AWS API Documentation
Request Syntax
response = client.detect_metric_set_config(
AnomalyDetectorArn='string',
AutoDetectionMetricSource={
'S3SourceConfig': {
'TemplatedPathList': [
'string',
],
'HistoricalDataPathList': [
'string',
]
}
}
)
[REQUIRED]
An anomaly detector ARN.
[REQUIRED]
A data source.
The source's source config.
The config's templated path list.
The config's historical data path list.
dict
Response Syntax
{
'DetectedMetricSetConfig': {
'Offset': {
'Value': {
'S': 'string',
'N': 'string',
'B': 'string',
'SS': [
'string',
],
'NS': [
'string',
],
'BS': [
'string',
]
},
'Confidence': 'HIGH'|'LOW'|'NONE',
'Message': 'string'
},
'MetricSetFrequency': {
'Value': {
'S': 'string',
'N': 'string',
'B': 'string',
'SS': [
'string',
],
'NS': [
'string',
],
'BS': [
'string',
]
},
'Confidence': 'HIGH'|'LOW'|'NONE',
'Message': 'string'
},
'MetricSource': {
'S3SourceConfig': {
'FileFormatDescriptor': {
'CsvFormatDescriptor': {
'FileCompression': {
'Value': {
'S': 'string',
'N': 'string',
'B': 'string',
'SS': [
'string',
],
'NS': [
'string',
],
'BS': [
'string',
]
},
'Confidence': 'HIGH'|'LOW'|'NONE',
'Message': 'string'
},
'Charset': {
'Value': {
'S': 'string',
'N': 'string',
'B': 'string',
'SS': [
'string',
],
'NS': [
'string',
],
'BS': [
'string',
]
},
'Confidence': 'HIGH'|'LOW'|'NONE',
'Message': 'string'
},
'ContainsHeader': {
'Value': {
'S': 'string',
'N': 'string',
'B': 'string',
'SS': [
'string',
],
'NS': [
'string',
],
'BS': [
'string',
]
},
'Confidence': 'HIGH'|'LOW'|'NONE',
'Message': 'string'
},
'Delimiter': {
'Value': {
'S': 'string',
'N': 'string',
'B': 'string',
'SS': [
'string',
],
'NS': [
'string',
],
'BS': [
'string',
]
},
'Confidence': 'HIGH'|'LOW'|'NONE',
'Message': 'string'
},
'HeaderList': {
'Value': {
'S': 'string',
'N': 'string',
'B': 'string',
'SS': [
'string',
],
'NS': [
'string',
],
'BS': [
'string',
]
},
'Confidence': 'HIGH'|'LOW'|'NONE',
'Message': 'string'
},
'QuoteSymbol': {
'Value': {
'S': 'string',
'N': 'string',
'B': 'string',
'SS': [
'string',
],
'NS': [
'string',
],
'BS': [
'string',
]
},
'Confidence': 'HIGH'|'LOW'|'NONE',
'Message': 'string'
}
},
'JsonFormatDescriptor': {
'FileCompression': {
'Value': {
'S': 'string',
'N': 'string',
'B': 'string',
'SS': [
'string',
],
'NS': [
'string',
],
'BS': [
'string',
]
},
'Confidence': 'HIGH'|'LOW'|'NONE',
'Message': 'string'
},
'Charset': {
'Value': {
'S': 'string',
'N': 'string',
'B': 'string',
'SS': [
'string',
],
'NS': [
'string',
],
'BS': [
'string',
]
},
'Confidence': 'HIGH'|'LOW'|'NONE',
'Message': 'string'
}
}
}
}
}
}
}
Response Structure
(dict) --
DetectedMetricSetConfig (dict) --
The inferred dataset configuration for the datasource.
Offset (dict) --
The dataset's offset.
Value (dict) --
The field's value.
S (string) --
A string.
N (string) --
A number.
B (string) --
A binary value.
SS (list) --
A list of strings.
NS (list) --
A list of numbers.
BS (list) --
A list of binary values.
Confidence (string) --
The field's confidence.
Message (string) --
The field's message.
MetricSetFrequency (dict) --
The dataset's interval.
Value (dict) --
The field's value.
S (string) --
A string.
N (string) --
A number.
B (string) --
A binary value.
SS (list) --
A list of strings.
NS (list) --
A list of numbers.
BS (list) --
A list of binary values.
Confidence (string) --
The field's confidence.
Message (string) --
The field's message.
MetricSource (dict) --
The dataset's data source.
S3SourceConfig (dict) --
The data source's source configuration.
FileFormatDescriptor (dict) --
The source's file format descriptor.
CsvFormatDescriptor (dict) --
Details about a CSV format.
FileCompression (dict) --
The format's file compression.
Value (dict) --
The field's value.
S (string) --
A string.
N (string) --
A number.
B (string) --
A binary value.
SS (list) --
A list of strings.
NS (list) --
A list of numbers.
BS (list) --
A list of binary values.
Confidence (string) --
The field's confidence.
Message (string) --
The field's message.
Charset (dict) --
The format's charset.
Value (dict) --
The field's value.
S (string) --
A string.
N (string) --
A number.
B (string) --
A binary value.
SS (list) --
A list of strings.
NS (list) --
A list of numbers.
BS (list) --
A list of binary values.
Confidence (string) --
The field's confidence.
Message (string) --
The field's message.
ContainsHeader (dict) --
Whether the format includes a header.
Value (dict) --
The field's value.
S (string) --
A string.
N (string) --
A number.
B (string) --
A binary value.
SS (list) --
A list of strings.
NS (list) --
A list of numbers.
BS (list) --
A list of binary values.
Confidence (string) --
The field's confidence.
Message (string) --
The field's message.
Delimiter (dict) --
The format's delimiter.
Value (dict) --
The field's value.
S (string) --
A string.
N (string) --
A number.
B (string) --
A binary value.
SS (list) --
A list of strings.
NS (list) --
A list of numbers.
BS (list) --
A list of binary values.
Confidence (string) --
The field's confidence.
Message (string) --
The field's message.
HeaderList (dict) --
The format's header list.
Value (dict) --
The field's value.
S (string) --
A string.
N (string) --
A number.
B (string) --
A binary value.
SS (list) --
A list of strings.
NS (list) --
A list of numbers.
BS (list) --
A list of binary values.
Confidence (string) --
The field's confidence.
Message (string) --
The field's message.
QuoteSymbol (dict) --
The format's quote symbol.
Value (dict) --
The field's value.
S (string) --
A string.
N (string) --
A number.
B (string) --
A binary value.
SS (list) --
A list of strings.
NS (list) --
A list of numbers.
BS (list) --
A list of binary values.
Confidence (string) --
The field's confidence.
Message (string) --
The field's message.
JsonFormatDescriptor (dict) --
Details about a JSON format.
FileCompression (dict) --
The format's file compression.
Value (dict) --
The field's value.
S (string) --
A string.
N (string) --
A number.
B (string) --
A binary value.
SS (list) --
A list of strings.
NS (list) --
A list of numbers.
BS (list) --
A list of binary values.
Confidence (string) --
The field's confidence.
Message (string) --
The field's message.
Charset (dict) --
The format's character set.
Value (dict) --
The field's value.
S (string) --
A string.
N (string) --
A number.
B (string) --
A binary value.
SS (list) --
A list of strings.
NS (list) --
A list of numbers.
BS (list) --
A list of binary values.
Confidence (string) --
The field's confidence.
Message (string) --
The field's message.
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
get_anomaly_group
(**kwargs)¶Returns details about a group of anomalous metrics.
See also: AWS API Documentation
Request Syntax
response = client.get_anomaly_group(
AnomalyGroupId='string',
AnomalyDetectorArn='string'
)
[REQUIRED]
The ID of the anomaly group.
[REQUIRED]
The Amazon Resource Name (ARN) of the anomaly detector.
dict
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.
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
get_data_quality_metrics
(**kwargs)¶Returns details about the requested data quality metrics.
See also: AWS API Documentation
Request Syntax
response = client.get_data_quality_metrics(
AnomalyDetectorArn='string',
MetricSetArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the anomaly detector that you want to investigate.
dict
Response Syntax
{
'AnomalyDetectorDataQualityMetricList': [
{
'StartTimestamp': datetime(2015, 1, 1),
'MetricSetDataQualityMetricList': [
{
'MetricSetArn': 'string',
'DataQualityMetricList': [
{
'MetricType': 'COLUMN_COMPLETENESS'|'DIMENSION_UNIQUENESS'|'TIME_SERIES_COUNT'|'ROWS_PROCESSED'|'ROWS_PARTIAL_COMPLIANCE'|'INVALID_ROWS_COMPLIANCE'|'BACKTEST_TRAINING_DATA_START_TIME_STAMP'|'BACKTEST_TRAINING_DATA_END_TIME_STAMP'|'BACKTEST_INFERENCE_DATA_START_TIME_STAMP'|'BACKTEST_INFERENCE_DATA_END_TIME_STAMP',
'MetricDescription': 'string',
'RelatedColumnName': 'string',
'MetricValue': 123.0
},
]
},
]
},
]
}
Response Structure
(dict) --
AnomalyDetectorDataQualityMetricList (list) --
A list of the data quality metrics for the AnomalyDetectorArn
that you requested.
(dict) --
Aggregated details about the data quality metrics collected for the AnomalyDetectorArn
provided in the GetDataQualityMetrics object.
StartTimestamp (datetime) --
The start time for the data quality metrics collection.
MetricSetDataQualityMetricList (list) --
An array of DataQualityMetricList
objects. Each object in the array contains information about a data quality metric.
(dict) --
An array of DataQualityMetric
objects that describes one or more data quality metrics.
MetricSetArn (string) --
The Amazon Resource Name (ARN) of the data quality metric array.
DataQualityMetricList (list) --
The array of data quality metrics contained in the data quality metric set.
(dict) --
An array that describes a data quality metric. Each DataQualityMetric
object contains the data quality metric name, its value, a description of the metric, and the affected column.
MetricType (string) --
The name of the data quality metric.
MetricDescription (string) --
A description of the data quality metric.
RelatedColumnName (string) --
The column that is being monitored.
MetricValue (float) --
The value of the data quality metric.
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
LookoutMetrics.Client.exceptions.InternalServerException
get_feedback
(**kwargs)¶Get feedback for an anomaly group.
See also: AWS API Documentation
Request Syntax
response = client.get_feedback(
AnomalyDetectorArn='string',
AnomalyGroupTimeSeriesFeedback={
'AnomalyGroupId': 'string',
'TimeSeriesId': 'string'
},
MaxResults=123,
NextToken='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the anomaly detector.
[REQUIRED]
The anomalous metric and group ID.
The ID of the anomaly group.
The ID of the metric.
dict
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.
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.TooManyRequestsException
get_paginator
(operation_name)¶Create a paginator for an operation.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.client.can_paginate
method to
check if an operation is pageable.get_sample_data
(**kwargs)¶Returns a selection of sample records from an Amazon S3 datasource.
See also: AWS API Documentation
Request Syntax
response = 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'
}
}
}
)
A datasource bucket in Amazon S3.
The Amazon Resource Name (ARN) of the role.
An array of strings containing the list of templated paths.
An array of strings containing the historical set of data paths.
Contains information about a source file's formatting.
Contains information about how a source CSV data file should be analyzed.
The level of compression of the source CSV file.
The character set in which the source CSV file is written.
Whether or not the source CSV file contains a header.
The character used to delimit the source CSV file.
A list of the source CSV file's headers, if any.
The character used as a quote character.
Contains information about how a source JSON data file should be analyzed.
The level of compression of the source CSV file.
The character set in which the source JSON file is written.
{
'HeaderValues': [
'string',
],
'SampleRows': [
[
'string',
],
]
}
Response Structure
A list of header labels for the records.
A list of records.
Exceptions
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
LookoutMetrics.Client.exceptions.InternalServerException
get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
list_alerts
(**kwargs)¶Lists the alerts attached to 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
response = client.list_alerts(
AnomalyDetectorArn='string',
NextToken='string',
MaxResults=123
)
NextToken
. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.dict
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 .
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.
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.TooManyRequestsException
LookoutMetrics.Client.exceptions.ValidationException
list_anomaly_detectors
(**kwargs)¶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
response = client.list_anomaly_detectors(
MaxResults=123,
NextToken='string'
)
NextToken
. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.dict
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 .
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.
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
LookoutMetrics.Client.exceptions.InternalServerException
Returns a list of measures that are potential causes or effects of an anomaly group.
See also: AWS API Documentation
Request Syntax
response = client.list_anomaly_group_related_metrics(
AnomalyDetectorArn='string',
AnomalyGroupId='string',
RelationshipTypeFilter='CAUSE_OF_INPUT_ANOMALY_GROUP'|'EFFECT_OF_INPUT_ANOMALY_GROUP',
MaxResults=123,
NextToken='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the anomaly detector.
[REQUIRED]
The ID of the anomaly group.
CAUSE_OF_INPUT_ANOMALY_GROUP
) or downstream effects (EFFECT_OF_INPUT_ANOMALY_GROUP
) of the anomaly group.dict
Response Syntax
{
'InterMetricImpactList': [
{
'MetricName': 'string',
'AnomalyGroupId': 'string',
'RelationshipType': 'CAUSE_OF_INPUT_ANOMALY_GROUP'|'EFFECT_OF_INPUT_ANOMALY_GROUP',
'ContributionPercentage': 123.0
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
InterMetricImpactList (list) --
Aggregated details about the measures contributing to the anomaly group, and the measures potentially impacted by the anomaly group.
(dict) --
Aggregated details about the measures contributing to the anomaly group, and the measures potentially impacted by the anomaly group.
MetricName (string) --
The name of the measure.
AnomalyGroupId (string) --
The ID of the anomaly group.
RelationshipType (string) --
Whether a measure is a potential cause of the anomaly group (CAUSE_OF_INPUT_ANOMALY_GROUP
), or whether the measure is impacted by the anomaly group (EFFECT_OF_INPUT_ANOMALY_GROUP
).
ContributionPercentage (float) --
For potential causes (CAUSE_OF_INPUT_ANOMALY_GROUP
), the percentage contribution the measure has in causing the anomalies.
NextToken (string) --
The pagination token that's included if more results are available.
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
list_anomaly_group_summaries
(**kwargs)¶Returns a list of anomaly groups.
See also: AWS API Documentation
Request Syntax
response = client.list_anomaly_group_summaries(
AnomalyDetectorArn='string',
SensitivityThreshold=123,
MaxResults=123,
NextToken='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the anomaly detector.
[REQUIRED]
The minimum severity score for inclusion in the output.
dict
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.
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
list_anomaly_group_time_series
(**kwargs)¶Gets a list of anomalous metrics for a measure in an anomaly group.
See also: AWS API Documentation
Request Syntax
response = client.list_anomaly_group_time_series(
AnomalyDetectorArn='string',
AnomalyGroupId='string',
MetricName='string',
MaxResults=123,
NextToken='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the anomaly detector.
[REQUIRED]
The ID of the anomaly group.
[REQUIRED]
The name of the measure field.
dict
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.
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.
Exceptions
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.TooManyRequestsException
list_metric_sets
(**kwargs)¶Lists the datasets 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
response = client.list_metric_sets(
AnomalyDetectorArn='string',
MaxResults=123,
NextToken='string'
)
NextToken
. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.dict
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 .
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.
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
LookoutMetrics.Client.exceptions.InternalServerException
Gets a list of tags for a detector, dataset, or alert.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
ResourceArn='string'
)
[REQUIRED]
The resource's Amazon Resource Name (ARN).
{
'Tags': {
'string': 'string'
}
}
Response Structure
The resource's tags.
Exceptions
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.ResourceNotFoundException
put_feedback
(**kwargs)¶Add feedback for an anomalous metric.
See also: AWS API Documentation
Request Syntax
response = client.put_feedback(
AnomalyDetectorArn='string',
AnomalyGroupTimeSeriesFeedback={
'AnomalyGroupId': 'string',
'TimeSeriesId': 'string',
'IsAnomaly': True|False
}
)
[REQUIRED]
The Amazon Resource Name (ARN) of the anomaly detector.
[REQUIRED]
Feedback for an anomalous metric.
The ID of the anomaly group.
The ID of the metric.
Feedback on whether the metric is a legitimate anomaly.
dict
Response Syntax
{}
Response Structure
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.TooManyRequestsException
tag_resource
(**kwargs)¶Adds tags to a detector, dataset, or alert.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
ResourceArn='string',
Tags={
'string': 'string'
}
)
[REQUIRED]
The resource's Amazon Resource Name (ARN).
[REQUIRED]
Tags to apply to the resource. Tag keys and values can contain letters, numbers, spaces, and the following symbols: _.:/=+@-
dict
Response Syntax
{}
Response Structure
Exceptions
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.ResourceNotFoundException
untag_resource
(**kwargs)¶Removes tags from a detector, dataset, or alert.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
ResourceArn='string',
TagKeys=[
'string',
]
)
[REQUIRED]
The resource's Amazon Resource Name (ARN).
[REQUIRED]
Keys to remove from the resource's tags.
dict
Response Syntax
{}
Response Structure
Exceptions
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.ResourceNotFoundException
update_alert
(**kwargs)¶Make changes to an existing alert.
See also: AWS API Documentation
Request Syntax
response = client.update_alert(
AlertArn='string',
AlertDescription='string',
AlertSensitivityThreshold=123,
Action={
'SNSConfiguration': {
'RoleArn': 'string',
'SnsTopicArn': 'string',
'SnsFormat': 'LONG_TEXT'|'SHORT_TEXT'|'JSON'
},
'LambdaConfiguration': {
'RoleArn': 'string',
'LambdaArn': 'string'
}
},
AlertFilters={
'MetricList': [
'string',
],
'DimensionFilterList': [
{
'DimensionName': 'string',
'DimensionValueList': [
'string',
]
},
]
}
)
[REQUIRED]
The ARN of the alert to update.
Action that will be triggered when there is an alert.
A configuration for an Amazon SNS channel.
The ARN of the IAM role that has access to the target SNS topic.
The ARN of the target SNS topic.
The format of the SNS topic.
JSON
– Send JSON alerts with an anomaly ID and a link to the anomaly detail page. This is the default.LONG_TEXT
– Send human-readable alerts with information about the impacted timeseries and a link to the anomaly detail page. We recommend this for email.SHORT_TEXT
– Send human-readable alerts with a link to the anomaly detail page. We recommend this for SMS.A configuration for an AWS Lambda channel.
The ARN of an IAM role that has permission to invoke the Lambda function.
The ARN of the Lambda function.
The configuration of the alert filters, containing MetricList and DimensionFilterList.
The list of measures that you want to get alerts for.
The list of DimensionFilter objects that are used for dimension-based filtering.
The dimension filter, containing DimensionName and DimensionValueList.
The name of the dimension to filter on.
The list of values for the dimension specified in DimensionName that you want to filter on.
dict
Response Syntax
{
'AlertArn': 'string'
}
Response Structure
(dict) --
AlertArn (string) --
The ARN of the updated alert.
Exceptions
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
update_anomaly_detector
(**kwargs)¶Updates a detector. After activation, you can only change a detector's ingestion delay and description.
See also: AWS API Documentation
Request Syntax
response = client.update_anomaly_detector(
AnomalyDetectorArn='string',
KmsKeyArn='string',
AnomalyDetectorDescription='string',
AnomalyDetectorConfig={
'AnomalyDetectorFrequency': 'P1D'|'PT1H'|'PT10M'|'PT5M'
}
)
[REQUIRED]
The ARN of the detector to update.
Contains information about the configuration to which the detector will be updated.
The frequency at which the detector analyzes its source data.
dict
Response Syntax
{
'AnomalyDetectorArn': 'string'
}
Response Structure
(dict) --
AnomalyDetectorArn (string) --
The ARN of the updated detector.
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
update_metric_set
(**kwargs)¶Updates a dataset.
See also: AWS API Documentation
Request Syntax
response = 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',
'BackTestConfiguration': {
'RunBackTestMode': True|False
}
},
'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',
]
}
},
'AthenaSourceConfig': {
'RoleArn': 'string',
'DatabaseName': 'string',
'DataCatalog': 'string',
'TableName': 'string',
'WorkGroupName': 'string',
'S3ResultsPath': 'string',
'BackTestConfiguration': {
'RunBackTestMode': True|False
}
}
},
DimensionFilterList=[
{
'Name': 'string',
'FilterList': [
{
'DimensionValue': 'string',
'FilterOperation': 'EQUALS'
},
]
},
]
)
[REQUIRED]
The ARN of the dataset to update.
The metric list.
A calculation made by contrasting a measure and a dimension from your source data.
The name of the metric.
The function with which the metric is calculated.
The namespace for the metric.
The timestamp column.
The name of the timestamp column.
The format of the timestamp column.
The dimension list.
Contains information about source data used to generate metrics.
Contains information about the configuration of the S3 bucket that contains source files.
The ARN of an IAM role that has read and write access permissions to the source S3 bucket.
A list of templated paths to the source files.
A list of paths to the historical data files.
Contains information about a source file's formatting.
Contains information about how a source CSV data file should be analyzed.
The level of compression of the source CSV file.
The character set in which the source CSV file is written.
Whether or not the source CSV file contains a header.
The character used to delimit the source CSV file.
A list of the source CSV file's headers, if any.
The character used as a quote character.
Contains information about how a source JSON data file should be analyzed.
The level of compression of the source CSV file.
The character set in which the source JSON file is written.
Details about an AppFlow datasource.
An IAM role that gives Amazon Lookout for Metrics permission to access the flow.
name of the flow.
Details about an Amazon CloudWatch monitoring datasource.
An IAM role that gives Amazon Lookout for Metrics permission to access data in Amazon CloudWatch.
Settings for backtest mode.
Run a backtest instead of monitoring new data.
Details about an Amazon Relational Database Service (RDS) datasource.
A string identifying the database instance.
The host name of the database.
The port number where the database can be accessed.
The Amazon Resource Name (ARN) of the AWS Secrets Manager role.
The name of the RDS database.
The name of the table in the database.
The Amazon Resource Name (ARN) of the role.
An object containing information about the Amazon Virtual Private Cloud (VPC) configuration.
An array of strings containing the Amazon VPC subnet IDs (e.g., subnet-0bb1c79de3EXAMPLE
.
An array of strings containing the list of security groups.
Details about an Amazon Redshift database datasource.
A string identifying the Redshift cluster.
The name of the database host.
The port number where the database can be accessed.
The Amazon Resource Name (ARN) of the AWS Secrets Manager role.
The Redshift database name.
The table name of the Redshift database.
The Amazon Resource Name (ARN) of the role providing access to the database.
Contains information about the Amazon Virtual Private Cloud (VPC) configuration.
An array of strings containing the Amazon VPC subnet IDs (e.g., subnet-0bb1c79de3EXAMPLE
.
An array of strings containing the list of security groups.
Details about an Amazon Athena datasource.
An IAM role that gives Amazon Lookout for Metrics permission to access the data.
The database's name.
The database's data catalog.
The database's table name.
The database's work group name.
The database's results path.
Settings for backtest mode.
Run a backtest instead of monitoring new data.
Describes a list of filters for choosing specific dimensions and specific values. Each filter consists of the dimension and one of its values that you want to include. When multiple dimensions or values are specified, the dimensions are joined with an AND operation and the values are joined with an OR operation.
Describes a list of filters for choosing a subset of dimension values. Each filter consists of the dimension and one of its values that you want to include. When multiple dimensions or values are specified, the dimensions are joined with an AND operation and the values are joined with an OR operation.
The dimension that you want to filter on.
The list of filters that you are applying.
Describes a filter for choosing a subset of dimension values. Each filter consists of the dimension that you want to include and the condition statement. The condition statement is specified in the FilterOperation
object.
The value that you want to include in the filter.
The condition to apply.
dict
Response Syntax
{
'MetricSetArn': 'string'
}
Response Structure
(dict) --
MetricSetArn (string) --
The ARN of the dataset.
Exceptions
LookoutMetrics.Client.exceptions.ResourceNotFoundException
LookoutMetrics.Client.exceptions.ValidationException
LookoutMetrics.Client.exceptions.InternalServerException
LookoutMetrics.Client.exceptions.AccessDeniedException
LookoutMetrics.Client.exceptions.TooManyRequestsException
LookoutMetrics.Client.exceptions.ServiceQuotaExceededException
The available paginators are: