CloudWatch Logs: Support Log Anomalies query type (#113067)
This commit is contained in:
+36
@@ -218,6 +218,11 @@ export interface QueryEditorArrayExpression {
|
||||
|
||||
export type QueryEditorExpression = (QueryEditorArrayExpression | QueryEditorPropertyExpression | QueryEditorGroupByExpression | QueryEditorFunctionExpression | QueryEditorFunctionParameterExpression | QueryEditorOperatorExpression);
|
||||
|
||||
export enum LogsMode {
|
||||
Anomalies = 'Anomalies',
|
||||
Insights = 'Insights',
|
||||
}
|
||||
|
||||
export enum LogsQueryLanguage {
|
||||
CWLI = 'CWLI',
|
||||
PPL = 'PPL',
|
||||
@@ -241,6 +246,10 @@ export interface CloudWatchLogsQuery extends common.DataQuery {
|
||||
* Log groups to query
|
||||
*/
|
||||
logGroups?: Array<LogGroup>;
|
||||
/**
|
||||
* Whether a query is a Logs Insights or Logs Anomalies query
|
||||
*/
|
||||
logsMode?: LogsMode;
|
||||
/**
|
||||
* Language used for querying logs, can be CWLI, SQL, or PPL. If empty, the default language is CWLI.
|
||||
*/
|
||||
@@ -265,6 +274,33 @@ export const defaultCloudWatchLogsQuery: Partial<CloudWatchLogsQuery> = {
|
||||
statsGroups: [],
|
||||
};
|
||||
|
||||
/**
|
||||
* Shape of a Cloudwatch Logs Anomalies query
|
||||
*/
|
||||
export interface CloudWatchLogsAnomaliesQuery extends common.DataQuery {
|
||||
/**
|
||||
* Used to filter only the anomalies found by a certain anomaly detector
|
||||
*/
|
||||
anomalyDetectionARN?: string;
|
||||
id: string;
|
||||
/**
|
||||
* Whether a query is a Logs Insights or Logs Anomalies query
|
||||
*/
|
||||
logsMode?: LogsMode;
|
||||
/**
|
||||
* Whether a query is a Metrics, Logs or Annotations query
|
||||
*/
|
||||
queryMode?: CloudWatchQueryMode;
|
||||
/**
|
||||
* AWS region to query for the logs
|
||||
*/
|
||||
region: string;
|
||||
/**
|
||||
* Filter to return only anomalies that are 'SUPPRESSED', 'UNSUPPRESSED', or 'ALL' (default)
|
||||
*/
|
||||
suppressionState?: string;
|
||||
}
|
||||
|
||||
export interface LogGroup {
|
||||
/**
|
||||
* AccountId of the log group
|
||||
|
||||
Reference in New Issue
Block a user