2023-02-03 14:27:48 -06:00
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// public/app/plugins/gen.go
// Using jennies:
// TSTypesJenny
2024-03-11 06:51:44 -05:00
// PluginTsTypesJenny
2023-02-03 14:27:48 -06:00
//
// Run 'make gen-cue' from repository root to regenerate.
import * as common from '@grafana/schema' ;
export interface MetricStat {
2023-04-24 10:57:39 -05:00
/ * *
* The ID of the AWS account to query for the metric , specifying ` all ` will query all accounts that the monitoring account is permitted to query .
* /
2023-02-03 14:27:48 -06:00
accountId? : string ;
2023-04-24 10:57:39 -05:00
/ * *
* The dimensions of the metric
* /
2023-02-03 14:27:48 -06:00
dimensions? : Dimensions ;
2023-04-24 10:57:39 -05:00
/ * *
* Only show metrics that exactly match all defined dimension names .
* /
2023-02-03 14:27:48 -06:00
matchExact? : boolean ;
2023-04-24 10:57:39 -05:00
/ * *
* Name of the metric
* /
2023-02-03 14:27:48 -06:00
metricName? : string ;
2023-04-24 10:57:39 -05:00
/ * *
* A namespace is a container for CloudWatch metrics . Metrics in different namespaces are isolated from each other , so that metrics from different applications are not mistakenly aggregated into the same statistics . For example , Amazon EC2 uses the AWS / EC2 namespace .
* /
2023-02-03 14:27:48 -06:00
namespace : string ;
2023-04-24 10:57:39 -05:00
/ * *
* The length of time associated with a specific Amazon CloudWatch statistic . Can be specified by a number of seconds , 'auto' , or as a duration string e . g . '15m' being 15 minutes
* /
2023-02-03 14:27:48 -06:00
period? : string ;
2023-04-24 10:57:39 -05:00
/ * *
* AWS region to query for the metric
* /
2023-02-03 14:27:48 -06:00
region : string ;
2023-04-24 10:57:39 -05:00
/ * *
* Metric data aggregations over specified periods of time . For detailed definitions of the statistics supported by CloudWatch , see https : //docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.
* /
2023-02-03 14:27:48 -06:00
statistic? : string ;
/ * *
* @deprecated use statistic
* /
statistics? : Array < string > ;
}
export const defaultMetricStat : Partial < MetricStat > = {
statistics : [ ] ,
} ;
2023-04-24 10:57:39 -05:00
/ * *
* A name / value pair that is part of the identity of a metric . For example , you can get statistics for a specific EC2 instance by specifying the InstanceId dimension when you search for metrics .
* /
2023-02-03 14:27:48 -06:00
export type Dimensions = Record < string , ( string | Array < string > ) > ;
2023-04-24 10:57:39 -05:00
/ * *
* Shape of a CloudWatch Metrics query
* /
2023-03-07 06:39:52 -06:00
export interface CloudWatchMetricsQuery extends common . DataQuery , MetricStat {
2023-04-24 10:57:39 -05:00
/ * *
2023-04-27 04:19:45 -05:00
* Deprecated : use label
* @deprecated use label
2023-04-24 10:57:39 -05:00
* /
2023-02-03 14:27:48 -06:00
alias? : string ;
/ * *
* Math expression query
* /
expression? : string ;
/ * *
2023-04-24 10:57:39 -05:00
* ID can be used to reference other queries in math expressions . The ID can include numbers , letters , and underscore , and must start with a lowercase letter .
2023-02-03 14:27:48 -06:00
* /
id : string ;
2023-04-24 10:57:39 -05:00
/ * *
* Change the time series legend names using dynamic labels . See https : //docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html for more details.
* /
2023-02-03 14:27:48 -06:00
label? : string ;
2023-04-24 10:57:39 -05:00
/ * *
* Whether to use the query builder or code editor to create the query
* /
2023-02-03 14:27:48 -06:00
metricEditorMode? : MetricEditorMode ;
2023-04-24 10:57:39 -05:00
/ * *
* Whether to use a metric search or metric query . Metric query is referred to as "Metrics Insights" in the AWS console .
* /
2023-02-03 14:27:48 -06:00
metricQueryType? : MetricQueryType ;
2023-04-24 10:57:39 -05:00
/ * *
* Whether a query is a Metrics , Logs , or Annotations query
* /
2023-02-03 14:27:48 -06:00
queryMode? : CloudWatchQueryMode ;
2023-04-24 10:57:39 -05:00
/ * *
* When the metric query type is ` metricQueryType ` is set to ` Query ` and the ` metricEditorMode ` is set to ` Builder ` , this field is used to build up an object representation of a SQL query .
* /
2023-02-03 14:27:48 -06:00
sql? : SQLExpression ;
2023-04-24 10:57:39 -05:00
/ * *
* When the metric query type is ` metricQueryType ` is set to ` Query ` , this field is used to specify the query string .
* /
2023-02-03 14:27:48 -06:00
sqlExpression? : string ;
}
export type CloudWatchQueryMode = ( 'Metrics' | 'Logs' | 'Annotations' ) ;
export enum MetricQueryType {
Query = 1 ,
Search = 0 ,
}
export enum MetricEditorMode {
Builder = 0 ,
Code = 1 ,
}
export interface SQLExpression {
2023-04-24 10:57:39 -05:00
/ * *
* FROM part of the SQL expression
* /
2023-02-03 14:27:48 -06:00
from ? : ( QueryEditorPropertyExpression | QueryEditorFunctionExpression ) ;
2023-04-24 10:57:39 -05:00
/ * *
* GROUP BY part of the SQL expression
* /
2023-02-03 14:27:48 -06:00
groupBy? : QueryEditorArrayExpression ;
2023-04-24 10:57:39 -05:00
/ * *
* LIMIT part of the SQL expression
* /
2023-02-03 14:27:48 -06:00
limit? : number ;
2023-04-24 10:57:39 -05:00
/ * *
* ORDER BY part of the SQL expression
* /
2023-02-03 14:27:48 -06:00
orderBy? : QueryEditorFunctionExpression ;
2023-04-24 10:57:39 -05:00
/ * *
* The sort order of the SQL expression , ` ASC ` or ` DESC `
* /
2023-02-03 14:27:48 -06:00
orderByDirection? : string ;
2023-04-24 10:57:39 -05:00
/ * *
* SELECT part of the SQL expression
* /
2023-02-03 14:27:48 -06:00
select? : QueryEditorFunctionExpression ;
2023-04-24 10:57:39 -05:00
/ * *
* WHERE part of the SQL expression
* /
2023-02-03 14:27:48 -06:00
where? : QueryEditorArrayExpression ;
}
export interface QueryEditorFunctionExpression {
name? : string ;
parameters? : Array < QueryEditorFunctionParameterExpression > ;
type : QueryEditorExpressionType . Function ;
}
export const defaultQueryEditorFunctionExpression : Partial < QueryEditorFunctionExpression > = {
parameters : [ ] ,
} ;
export enum QueryEditorExpressionType {
And = 'and' ,
Function = 'function' ,
FunctionParameter = 'functionParameter' ,
GroupBy = 'groupBy' ,
Operator = 'operator' ,
Or = 'or' ,
Property = 'property' ,
}
export interface QueryEditorFunctionParameterExpression {
name? : string ;
type : QueryEditorExpressionType . FunctionParameter ;
}
export interface QueryEditorPropertyExpression {
property : QueryEditorProperty ;
type : QueryEditorExpressionType . Property ;
}
export interface QueryEditorGroupByExpression {
property : QueryEditorProperty ;
type : QueryEditorExpressionType . GroupBy ;
}
export interface QueryEditorOperatorExpression {
/ * *
2023-03-07 06:39:52 -06:00
* TS type is operator : QueryEditorOperator < QueryEditorOperatorValueType > , extended in veneer
2023-02-03 14:27:48 -06:00
* /
2023-03-07 06:39:52 -06:00
operator : QueryEditorOperator ;
2023-02-03 14:27:48 -06:00
property : QueryEditorProperty ;
type : QueryEditorExpressionType . Operator ;
}
2023-03-07 06:39:52 -06:00
/ * *
* TS type is QueryEditorOperator < T extends QueryEditorOperatorValueType > , extended in veneer
* /
export interface QueryEditorOperator {
name? : string ;
value ? : ( QueryEditorOperatorType | Array < QueryEditorOperatorType > ) ;
}
2023-02-03 14:27:48 -06:00
export type QueryEditorOperatorValueType = ( QueryEditorOperatorType | Array < QueryEditorOperatorType > ) ;
export type QueryEditorOperatorType = ( string | boolean | number ) ;
export interface QueryEditorProperty {
name? : string ;
type : QueryEditorPropertyType ;
}
export enum QueryEditorPropertyType {
String = 'string' ,
}
export interface QueryEditorArrayExpression {
2023-04-18 00:46:51 -05:00
expressions : ( Array < QueryEditorExpression > | Array < QueryEditorArrayExpression > ) ;
2023-04-14 09:45:54 -05:00
type : ( QueryEditorExpressionType . And | QueryEditorExpressionType . Or ) ;
2023-02-03 14:27:48 -06:00
}
2023-04-20 11:39:02 -05:00
export type QueryEditorExpression = ( QueryEditorArrayExpression | QueryEditorPropertyExpression | QueryEditorGroupByExpression | QueryEditorFunctionExpression | QueryEditorFunctionParameterExpression | QueryEditorOperatorExpression ) ;
2023-03-07 06:39:52 -06:00
2023-04-24 10:57:39 -05:00
/ * *
* Shape of a CloudWatch Logs query
* /
2023-02-03 14:27:48 -06:00
export interface CloudWatchLogsQuery extends common . DataQuery {
2023-04-24 10:57:39 -05:00
/ * *
* The CloudWatch Logs Insights query to execute
* /
2023-02-03 14:27:48 -06:00
expression? : string ;
id : string ;
/ * *
2023-04-24 10:57:39 -05:00
* @deprecated use logGroups
2023-02-03 14:27:48 -06:00
* /
logGroupNames? : Array < string > ;
2023-04-24 10:57:39 -05:00
/ * *
* Log groups to query
* /
2023-02-03 14:27:48 -06:00
logGroups? : Array < LogGroup > ;
2023-04-24 10:57:39 -05:00
/ * *
* Whether a query is a Metrics , Logs , or Annotations query
* /
2023-02-03 14:27:48 -06:00
queryMode : CloudWatchQueryMode ;
2023-04-24 10:57:39 -05:00
/ * *
* AWS region to query for the logs
* /
2023-02-03 14:27:48 -06:00
region : string ;
2023-04-24 10:57:39 -05:00
/ * *
* Fields to group the results by , this field is automatically populated whenever the query is updated
* /
2023-02-03 14:27:48 -06:00
statsGroups? : Array < string > ;
}
export const defaultCloudWatchLogsQuery : Partial < CloudWatchLogsQuery > = {
logGroupNames : [ ] ,
logGroups : [ ] ,
statsGroups : [ ] ,
} ;
export interface LogGroup {
2023-04-24 10:57:39 -05:00
/ * *
* AccountId of the log group
* /
2023-02-03 14:27:48 -06:00
accountId? : string ;
2023-04-24 10:57:39 -05:00
/ * *
* Label of the log group
* /
2023-02-03 14:27:48 -06:00
accountLabel? : string ;
2023-04-24 10:57:39 -05:00
/ * *
* ARN of the log group
* /
2023-02-03 14:27:48 -06:00
arn : string ;
2023-04-24 10:57:39 -05:00
/ * *
* Name of the log group
* /
2023-02-03 14:27:48 -06:00
name : string ;
}
2023-04-24 10:57:39 -05:00
/ * *
* Shape of a CloudWatch Annotation query
* /
2023-05-24 03:47:25 -05:00
/ * *
* TS type is CloudWatchDefaultQuery = Omit < CloudWatchLogsQuery , ' queryMode ' > & CloudWatchMetricsQuery , declared in veneer
* # CloudWatchDefaultQuery : # CloudWatchLogsQuery & # CloudWatchMetricsQuery @cuetsy ( kind = "type" )
* /
2023-03-07 06:39:52 -06:00
export interface CloudWatchAnnotationQuery extends common . DataQuery , MetricStat {
2023-04-24 10:57:39 -05:00
/ * *
* Use this parameter to filter the results of the operation to only those alarms
* that use a certain alarm action . For example , you could specify the ARN of
* an SNS topic to find all alarms that send notifications to that topic .
* e . g . ` arn:aws:sns:us-east-1:123456789012:my-app- ` would match ` arn:aws:sns:us-east-1:123456789012:my-app-action `
* but not match ` arn:aws:sns:us-east-1:123456789012:your-app-action `
* /
2023-02-03 14:27:48 -06:00
actionPrefix? : string ;
2023-04-24 10:57:39 -05:00
/ * *
* An alarm name prefix . If you specify this parameter , you receive information
* about all alarms that have names that start with this prefix .
* e . g . ` my-team-service- ` would match ` my-team-service-high-cpu ` but not match ` your-team-service-high-cpu `
* /
2023-02-03 14:27:48 -06:00
alarmNamePrefix? : string ;
2023-04-24 10:57:39 -05:00
/ * *
* Enable matching on the prefix of the action name or alarm name , specify the prefixes with actionPrefix and / or alarmNamePrefix
* /
2023-02-03 14:27:48 -06:00
prefixMatching? : boolean ;
2023-04-24 10:57:39 -05:00
/ * *
* Whether a query is a Metrics , Logs , or Annotations query
* /
2023-02-03 14:27:48 -06:00
queryMode : CloudWatchQueryMode ;
}
2024-03-11 06:51:44 -05:00
export interface CloudWatchDataQuery { }