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