@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Amazon Lookout for Metrics
@version 2017-07-25
@auth AWS SigV4
@endpoints 30
@hint download_for_search
@toc ActivateAnomalyDetector(1), BackTestAnomalyDetector(1), CreateAlert(1), CreateAnomalyDetector(1), CreateMetricSet(1), DeactivateAnomalyDetector(1), DeleteAlert(1), DeleteAnomalyDetector(1), DescribeAlert(1), DescribeAnomalyDetectionExecutions(1), DescribeAnomalyDetector(1), DescribeMetricSet(1), DetectMetricSetConfig(1), GetAnomalyGroup(1), GetDataQualityMetrics(1), GetFeedback(1), GetSampleData(1), ListAlerts(1), ListAnomalyDetectors(1), ListAnomalyGroupRelatedMetrics(1), ListAnomalyGroupSummaries(1), ListAnomalyGroupTimeSeries(1), ListMetricSets(1), tags(3), PutFeedback(1), UpdateAlert(1), UpdateAnomalyDetector(1), UpdateMetricSet(1)

@group ActivateAnomalyDetector
@endpoint POST /ActivateAnomalyDetector
@desc Activates an anomaly detector.
@required {AnomalyDetectorArn: str}

@endgroup

@group BackTestAnomalyDetector
@endpoint POST /BackTestAnomalyDetector
@desc Runs a backtest for anomaly detection for the specified resource.
@required {AnomalyDetectorArn: str}

@endgroup

@group CreateAlert
@endpoint POST /CreateAlert
@desc Creates an alert for an anomaly detector.
@required {AlertName: str, AnomalyDetectorArn: str, Action: Action}
@optional {AlertSensitivityThreshold: int, AlertDescription: str, Tags: map<str,str>, AlertFilters: AlertFilters}
@returns(200) {AlertArn: str?}

@endgroup

@group CreateAnomalyDetector
@endpoint POST /CreateAnomalyDetector
@desc Creates an anomaly detector.
@required {AnomalyDetectorName: str, AnomalyDetectorConfig: AnomalyDetectorConfig}
@optional {AnomalyDetectorDescription: str, KmsKeyArn: str, Tags: map<str,str>}
@returns(200) {AnomalyDetectorArn: str?}

@endgroup

@group CreateMetricSet
@endpoint POST /CreateMetricSet
@desc Creates a dataset.
@required {AnomalyDetectorArn: str, MetricSetName: str, MetricList: [Metric], MetricSource: MetricSource}
@optional {MetricSetDescription: str, Offset: int, TimestampColumn: TimestampColumn, DimensionList: [str], MetricSetFrequency: str, Timezone: str, Tags: map<str,str>, DimensionFilterList: [MetricSetDimensionFilter]}
@returns(200) {MetricSetArn: str?}

@endgroup

@group DeactivateAnomalyDetector
@endpoint POST /DeactivateAnomalyDetector
@desc Deactivates an anomaly detector.
@required {AnomalyDetectorArn: str}

@endgroup

@group DeleteAlert
@endpoint POST /DeleteAlert
@desc Deletes an alert.
@required {AlertArn: str}

@endgroup

@group DeleteAnomalyDetector
@endpoint POST /DeleteAnomalyDetector
@desc Deletes a detector. Deleting an anomaly detector will delete all of its corresponding resources including any configured datasets and alerts.
@required {AnomalyDetectorArn: str}

@endgroup

@group DescribeAlert
@endpoint POST /DescribeAlert
@desc 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.
@required {AlertArn: str}
@returns(200) {Alert: Alert?{Action: Action?{SNSConfiguration: SNSConfiguration?{RoleArn: str, SnsTopicArn: str, SnsFormat: str?}, LambdaConfiguration: LambdaConfiguration?{RoleArn: str, LambdaArn: str}}, AlertDescription: str?, AlertArn: str?, AnomalyDetectorArn: str?, AlertName: str?, AlertSensitivityThreshold: int?, AlertType: str?, AlertStatus: str?, LastModificationTime: str(timestamp)?, CreationTime: str(timestamp)?, AlertFilters: AlertFilters?{MetricList: [str]?, DimensionFilterList: [DimensionFilter]?}}}

@endgroup

@group DescribeAnomalyDetectionExecutions
@endpoint POST /DescribeAnomalyDetectionExecutions
@desc Returns information about the status of the specified anomaly detection jobs.
@required {AnomalyDetectorArn: str}
@optional {Timestamp: str, MaxResults: int, NextToken: str}
@returns(200) {ExecutionList: [ExecutionStatus]?, NextToken: str?}

@endgroup

@group DescribeAnomalyDetector
@endpoint POST /DescribeAnomalyDetector
@desc 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.
@required {AnomalyDetectorArn: str}
@returns(200) {AnomalyDetectorArn: str?, AnomalyDetectorName: str?, AnomalyDetectorDescription: str?, AnomalyDetectorConfig: AnomalyDetectorConfigSummary?{AnomalyDetectorFrequency: str?}, CreationTime: str(timestamp)?, LastModificationTime: str(timestamp)?, Status: str?, FailureReason: str?, KmsKeyArn: str?, FailureType: str?}

@endgroup

@group DescribeMetricSet
@endpoint POST /DescribeMetricSet
@desc 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.
@required {MetricSetArn: str}
@returns(200) {MetricSetArn: str?, AnomalyDetectorArn: str?, MetricSetName: str?, MetricSetDescription: str?, CreationTime: str(timestamp)?, LastModificationTime: str(timestamp)?, Offset: int?, MetricList: [Metric]?, TimestampColumn: TimestampColumn?{ColumnName: str?, ColumnFormat: str?}, DimensionList: [str]?, MetricSetFrequency: str?, Timezone: str?, MetricSource: MetricSource?{S3SourceConfig: S3SourceConfig?{RoleArn: str?, TemplatedPathList: [str]?, HistoricalDataPathList: [str]?, FileFormatDescriptor: FileFormatDescriptor?{CsvFormatDescriptor: CsvFormatDescriptor?, JsonFormatDescriptor: JsonFormatDescriptor?}}, AppFlowConfig: AppFlowConfig?{RoleArn: str?, FlowName: str?}, CloudWatchConfig: CloudWatchConfig?{RoleArn: str?, BackTestConfiguration: BackTestConfiguration?{RunBackTestMode: bool}}, RDSSourceConfig: RDSSourceConfig?{DBInstanceIdentifier: str?, DatabaseHost: str?, DatabasePort: int?, SecretManagerArn: str?, DatabaseName: str?, TableName: str?, RoleArn: str?, VpcConfiguration: VpcConfiguration?{SubnetIdList: [str], SecurityGroupIdList: [str]}}, RedshiftSourceConfig: RedshiftSourceConfig?{ClusterIdentifier: str?, DatabaseHost: str?, DatabasePort: int?, SecretManagerArn: str?, DatabaseName: str?, TableName: str?, RoleArn: str?, VpcConfiguration: VpcConfiguration?{SubnetIdList: [str], SecurityGroupIdList: [str]}}, AthenaSourceConfig: AthenaSourceConfig?{RoleArn: str?, DatabaseName: str?, DataCatalog: str?, TableName: str?, WorkGroupName: str?, S3ResultsPath: str?, BackTestConfiguration: BackTestConfiguration?{RunBackTestMode: bool}}}, DimensionFilterList: [MetricSetDimensionFilter]?}

@endgroup

@group DetectMetricSetConfig
@endpoint POST /DetectMetricSetConfig
@desc Detects an Amazon S3 dataset's file format, interval, and offset.
@required {AnomalyDetectorArn: str, AutoDetectionMetricSource: AutoDetectionMetricSource}
@returns(200) {DetectedMetricSetConfig: DetectedMetricSetConfig?{Offset: DetectedField?{Value: AttributeValue?{S: str?, N: str?, B: str?, SS: [str]?, NS: [str]?, BS: [str]?}, Confidence: str?, Message: str?}, MetricSetFrequency: DetectedField?{Value: AttributeValue?{S: str?, N: str?, B: str?, SS: [str]?, NS: [str]?, BS: [str]?}, Confidence: str?, Message: str?}, MetricSource: DetectedMetricSource?{S3SourceConfig: DetectedS3SourceConfig?{FileFormatDescriptor: DetectedFileFormatDescriptor?}}}}

@endgroup

@group GetAnomalyGroup
@endpoint POST /GetAnomalyGroup
@desc Returns details about a group of anomalous metrics.
@required {AnomalyGroupId: str, AnomalyDetectorArn: str}
@returns(200) {AnomalyGroup: AnomalyGroup?{StartTime: str?, EndTime: str?, AnomalyGroupId: str?, AnomalyGroupScore: num(f64)?, PrimaryMetricName: str?, MetricLevelImpactList: [MetricLevelImpact]?}}

@endgroup

@group GetDataQualityMetrics
@endpoint POST /GetDataQualityMetrics
@desc Returns details about the requested data quality metrics.
@required {AnomalyDetectorArn: str}
@optional {MetricSetArn: str}
@returns(200) {AnomalyDetectorDataQualityMetricList: [AnomalyDetectorDataQualityMetric]?}

@endgroup

@group GetFeedback
@endpoint POST /GetFeedback
@desc Get feedback for an anomaly group.
@required {AnomalyDetectorArn: str, AnomalyGroupTimeSeriesFeedback: AnomalyGroupTimeSeries}
@optional {MaxResults: int, NextToken: str}
@returns(200) {AnomalyGroupTimeSeriesFeedback: [TimeSeriesFeedback]?, NextToken: str?}

@endgroup

@group GetSampleData
@endpoint POST /GetSampleData
@desc Returns a selection of sample records from an Amazon S3 datasource.
@optional {S3SourceConfig: SampleDataS3SourceConfig}
@returns(200) {HeaderValues: [str]?, SampleRows: [[str]]?}

@endgroup

@group ListAlerts
@endpoint POST /ListAlerts
@desc 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.
@optional {AnomalyDetectorArn: str, NextToken: str, MaxResults: int}
@returns(200) {AlertSummaryList: [AlertSummary]?, NextToken: str?}

@endgroup

@group ListAnomalyDetectors
@endpoint POST /ListAnomalyDetectors
@desc 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.
@optional {MaxResults: int, NextToken: str}
@returns(200) {AnomalyDetectorSummaryList: [AnomalyDetectorSummary]?, NextToken: str?}

@endgroup

@group ListAnomalyGroupRelatedMetrics
@endpoint POST /ListAnomalyGroupRelatedMetrics
@desc Returns a list of measures that are potential causes or effects of an anomaly group.
@required {AnomalyDetectorArn: str, AnomalyGroupId: str}
@optional {RelationshipTypeFilter: str, MaxResults: int, NextToken: str}
@returns(200) {InterMetricImpactList: [InterMetricImpactDetails]?, NextToken: str?}

@endgroup

@group ListAnomalyGroupSummaries
@endpoint POST /ListAnomalyGroupSummaries
@desc Returns a list of anomaly groups.
@required {AnomalyDetectorArn: str, SensitivityThreshold: int}
@optional {MaxResults: int, NextToken: str}
@returns(200) {AnomalyGroupSummaryList: [AnomalyGroupSummary]?, AnomalyGroupStatistics: AnomalyGroupStatistics?{EvaluationStartDate: str?, TotalCount: int?, ItemizedMetricStatsList: [ItemizedMetricStats]?}, NextToken: str?}

@endgroup

@group ListAnomalyGroupTimeSeries
@endpoint POST /ListAnomalyGroupTimeSeries
@desc Gets a list of anomalous metrics for a measure in an anomaly group.
@required {AnomalyDetectorArn: str, AnomalyGroupId: str, MetricName: str}
@optional {MaxResults: int, NextToken: str}
@returns(200) {AnomalyGroupId: str?, MetricName: str?, TimestampList: [str]?, NextToken: str?, TimeSeriesList: [TimeSeries]?}

@endgroup

@group ListMetricSets
@endpoint POST /ListMetricSets
@desc 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.
@optional {AnomalyDetectorArn: str, MaxResults: int, NextToken: str}
@returns(200) {MetricSetSummaryList: [MetricSetSummary]?, NextToken: str?}

@endgroup

@group tags
@endpoint GET /tags/{resourceArn}
@desc Gets a list of tags for a detector, dataset, or alert.
@required {ResourceArn: str}
@returns(200) {Tags: map<str,str>?}

@endgroup

@group PutFeedback
@endpoint POST /PutFeedback
@desc Add feedback for an anomalous metric.
@required {AnomalyDetectorArn: str, AnomalyGroupTimeSeriesFeedback: AnomalyGroupTimeSeriesFeedback}

@endgroup

@group tags
@endpoint POST /tags/{resourceArn}
@desc Adds tags to a detector, dataset, or alert.
@required {ResourceArn: str, Tags: map<str,str>}

@endpoint DELETE /tags/{resourceArn}
@desc Removes tags from a detector, dataset, or alert.
@required {ResourceArn: str, tagKeys: [str]}

@endgroup

@group UpdateAlert
@endpoint POST /UpdateAlert
@desc Make changes to an existing alert.
@required {AlertArn: str}
@optional {AlertDescription: str, AlertSensitivityThreshold: int, Action: Action, AlertFilters: AlertFilters}
@returns(200) {AlertArn: str?}

@endgroup

@group UpdateAnomalyDetector
@endpoint POST /UpdateAnomalyDetector
@desc Updates a detector. After activation, you can only change a detector's ingestion delay and description.
@required {AnomalyDetectorArn: str}
@optional {KmsKeyArn: str, AnomalyDetectorDescription: str, AnomalyDetectorConfig: AnomalyDetectorConfig}
@returns(200) {AnomalyDetectorArn: str?}

@endgroup

@group UpdateMetricSet
@endpoint POST /UpdateMetricSet
@desc Updates a dataset.
@required {MetricSetArn: str}
@optional {MetricSetDescription: str, MetricList: [Metric], Offset: int, TimestampColumn: TimestampColumn, DimensionList: [str], MetricSetFrequency: str, MetricSource: MetricSource, DimensionFilterList: [MetricSetDimensionFilter]}
@returns(200) {MetricSetArn: str?}

@endgroup

@end
