agent-claw: automated task changes
This commit is contained in:
23
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm-action.d.ts
generated
vendored
Normal file
23
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm-action.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { IAlarm } from './alarm-base';
|
||||
/**
|
||||
* Interface for objects that can be the targets of CloudWatch alarm actions
|
||||
*/
|
||||
export interface IAlarmAction {
|
||||
/**
|
||||
* Return the properties required to send alarm actions to this CloudWatch alarm.
|
||||
*
|
||||
* @param scope root Construct that allows creating new Constructs
|
||||
* @param alarm CloudWatch alarm that the action will target [disable-awslint:prefer-ref-interface]
|
||||
*/
|
||||
bind(scope: Construct, alarm: IAlarm): AlarmActionConfig;
|
||||
}
|
||||
/**
|
||||
* Properties for an alarm action
|
||||
*/
|
||||
export interface AlarmActionConfig {
|
||||
/**
|
||||
* Return the ARN that should be used for a CloudWatch Alarm action
|
||||
*/
|
||||
readonly alarmActionArn: string;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm-action.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm-action.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
||||
66
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm-base.d.ts
generated
vendored
Normal file
66
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm-base.d.ts
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
import type { IAlarmAction } from './alarm-action';
|
||||
import type { IResource } from '../../core';
|
||||
import { Resource } from '../../core';
|
||||
import type { IAlarmRef, AlarmReference } from '../../interfaces/generated/aws-cloudwatch-interfaces.generated';
|
||||
/**
|
||||
* Interface for Alarm Rule.
|
||||
*/
|
||||
export interface IAlarmRule {
|
||||
/**
|
||||
* serialized representation of Alarm Rule to be used when building the Composite Alarm resource.
|
||||
*/
|
||||
renderAlarmRule(): string;
|
||||
}
|
||||
/**
|
||||
* Represents a CloudWatch Alarm
|
||||
*/
|
||||
export interface IAlarm extends IAlarmRule, IResource, IAlarmRef {
|
||||
/**
|
||||
* Alarm ARN (i.e. arn:aws:cloudwatch:<region>:<account-id>:alarm:Foo)
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
readonly alarmArn: string;
|
||||
/**
|
||||
* Name of the alarm
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
readonly alarmName: string;
|
||||
}
|
||||
/**
|
||||
* The base class for Alarm and CompositeAlarm resources.
|
||||
*/
|
||||
export declare abstract class AlarmBase extends Resource implements IAlarm {
|
||||
/**
|
||||
* @attribute
|
||||
*/
|
||||
abstract readonly alarmArn: string;
|
||||
abstract readonly alarmName: string;
|
||||
protected alarmActionArns?: string[];
|
||||
protected insufficientDataActionArns?: string[];
|
||||
protected okActionArns?: string[];
|
||||
get alarmRef(): AlarmReference;
|
||||
/**
|
||||
* AlarmRule indicating ALARM state for Alarm.
|
||||
*/
|
||||
renderAlarmRule(): string;
|
||||
/**
|
||||
* Trigger this action if the alarm fires
|
||||
*
|
||||
* Typically SnsAction or AutoScalingAction.
|
||||
*/
|
||||
addAlarmAction(...actions: IAlarmAction[]): void;
|
||||
/**
|
||||
* Trigger this action if there is insufficient data to evaluate the alarm
|
||||
*
|
||||
* Typically SnsAction or AutoScalingAction.
|
||||
*/
|
||||
addInsufficientDataAction(...actions: IAlarmAction[]): void;
|
||||
/**
|
||||
* Trigger this action if the alarm returns from breaching state into ok state
|
||||
*
|
||||
* Typically SnsAction or AutoScalingAction.
|
||||
*/
|
||||
addOkAction(...actions: IAlarmAction[]): void;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm-base.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm-base.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AlarmBase=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp};class AlarmBase extends core_1().Resource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudwatch.AlarmBase",version:"2.252.0"};alarmActionArns;insufficientDataActionArns;okActionArns;get alarmRef(){return{alarmName:this.alarmName,alarmArn:this.alarmArn}}renderAlarmRule(){return`ALARM("${this.alarmArn}")`}addAlarmAction(...actions){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_IAlarmAction(actions)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addAlarmAction),error}this.alarmActionArns===void 0&&(this.alarmActionArns=[]),this.alarmActionArns.push(...actions.map(a=>a.bind(this,this).alarmActionArn))}addInsufficientDataAction(...actions){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_IAlarmAction(actions)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addInsufficientDataAction),error}this.insufficientDataActionArns===void 0&&(this.insufficientDataActionArns=[]),this.insufficientDataActionArns.push(...actions.map(a=>a.bind(this,this).alarmActionArn))}addOkAction(...actions){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_IAlarmAction(actions)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addOkAction),error}this.okActionArns===void 0&&(this.okActionArns=[]),this.okActionArns.push(...actions.map(a=>a.bind(this,this).alarmActionArn))}}exports.AlarmBase=AlarmBase;
|
||||
62
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm-rule.d.ts
generated
vendored
Normal file
62
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm-rule.d.ts
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
import type { IAlarmRule } from './alarm-base';
|
||||
import type { IAlarmRef } from '../../interfaces/generated/aws-cloudwatch-interfaces.generated';
|
||||
/**
|
||||
* Enumeration indicates state of Alarm used in building Alarm Rule.
|
||||
*/
|
||||
export declare enum AlarmState {
|
||||
/**
|
||||
* State indicates resource is in ALARM
|
||||
*/
|
||||
ALARM = "ALARM",
|
||||
/**
|
||||
* State indicates resource is not in ALARM
|
||||
*/
|
||||
OK = "OK",
|
||||
/**
|
||||
* State indicates there is not enough data to determine is resource is in ALARM
|
||||
*/
|
||||
INSUFFICIENT_DATA = "INSUFFICIENT_DATA"
|
||||
}
|
||||
/**
|
||||
* Class with static functions to build AlarmRule for Composite Alarms.
|
||||
*/
|
||||
export declare class AlarmRule {
|
||||
/**
|
||||
* function to join all provided AlarmRules with AND operator.
|
||||
*
|
||||
* @param operands IAlarmRules to be joined with AND operator.
|
||||
*/
|
||||
static allOf(...operands: IAlarmRule[]): IAlarmRule;
|
||||
/**
|
||||
* function to join all provided AlarmRules with OR operator.
|
||||
*
|
||||
* @param operands IAlarmRules to be joined with OR operator.
|
||||
*/
|
||||
static anyOf(...operands: IAlarmRule[]): IAlarmRule;
|
||||
/**
|
||||
* function to wrap provided AlarmRule in NOT operator.
|
||||
*
|
||||
* @param operand IAlarmRule to be wrapped in NOT operator.
|
||||
*/
|
||||
static not(operand: IAlarmRule): IAlarmRule;
|
||||
/**
|
||||
* function to build TRUE/FALSE intent for Rule Expression.
|
||||
*
|
||||
* @param value boolean value to be used in rule expression.
|
||||
*/
|
||||
static fromBoolean(value: boolean): IAlarmRule;
|
||||
/**
|
||||
* function to build Rule Expression for given IAlarm and AlarmState.
|
||||
*
|
||||
* @param alarm IAlarm to be used in Rule Expression.
|
||||
* @param alarmState AlarmState to be used in Rule Expression.
|
||||
*/
|
||||
static fromAlarm(alarm: IAlarmRef, alarmState: AlarmState): IAlarmRule;
|
||||
/**
|
||||
* function to build Rule Expression for given Alarm Rule string.
|
||||
*
|
||||
* @param alarmRule string to be used in Rule Expression.
|
||||
*/
|
||||
static fromString(alarmRule: string): IAlarmRule;
|
||||
private static concat;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm-rule.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm-rule.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AlarmRule=exports.AlarmState=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},AlarmState;(function(AlarmState2){AlarmState2.ALARM="ALARM",AlarmState2.OK="OK",AlarmState2.INSUFFICIENT_DATA="INSUFFICIENT_DATA"})(AlarmState||(exports.AlarmState=AlarmState={}));var Operator;(function(Operator2){Operator2.AND="AND",Operator2.OR="OR",Operator2.NOT="NOT"})(Operator||(Operator={}));class AlarmRule{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudwatch.AlarmRule",version:"2.252.0"};static allOf(...operands){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_IAlarmRule(operands)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.allOf),error}return this.concat(Operator.AND,...operands)}static anyOf(...operands){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_IAlarmRule(operands)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.anyOf),error}return this.concat(Operator.OR,...operands)}static not(operand){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_IAlarmRule(operand)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.not),error}return new class{renderAlarmRule(){return`(NOT (${operand.renderAlarmRule()}))`}}}static fromBoolean(value){return new class{renderAlarmRule(){return`${String(value).toUpperCase()}`}}}static fromAlarm(alarm,alarmState){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_cloudwatch_IAlarmRef(alarm),jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_AlarmState(alarmState)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromAlarm),error}return new class{renderAlarmRule(){return`${alarmState}("${alarm.alarmRef.alarmArn}")`}}}static fromString(alarmRule){return new class{renderAlarmRule(){return alarmRule}}}static concat(operator,...operands){return new class{renderAlarmRule(){if(operands.length===0)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`NoOperandsDetectedForAlarmRule`,`Did not detect any operands for AlarmRule.${operator===Operator.AND?"allOf":"anyOf"}()`);return`(${operands.map(operand=>`${operand.renderAlarmRule()}`).join(` ${operator} `)})`}}}}exports.AlarmRule=AlarmRule;
|
||||
76
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm-status-widget.d.ts
generated
vendored
Normal file
76
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm-status-widget.d.ts
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
import type { AlarmState } from './alarm-rule';
|
||||
import { ConcreteWidget } from './widget';
|
||||
import type { IAlarmRef } from '../../interfaces/generated/aws-cloudwatch-interfaces.generated';
|
||||
/**
|
||||
* The sort possibilities for AlarmStatusWidgets
|
||||
*/
|
||||
export declare enum AlarmStatusWidgetSortBy {
|
||||
/**
|
||||
* Choose DEFAULT to sort them in alphabetical order by alarm name.
|
||||
*/
|
||||
DEFAULT = "default",
|
||||
/**
|
||||
* Choose STATE_UPDATED_TIMESTAMP to sort them first by alarm state, with alarms in ALARM state first,
|
||||
* INSUFFICIENT_DATA alarms next, and OK alarms last.
|
||||
* Within each group, the alarms are sorted by when they last changed state, with more recent state changes listed first.
|
||||
*/
|
||||
STATE_UPDATED_TIMESTAMP = "stateUpdatedTimestamp",
|
||||
/**
|
||||
* Choose TIMESTAMP to sort them by the time when the alarms most recently changed state,
|
||||
* no matter the current alarm state.
|
||||
* The alarm that changed state most recently is listed first.
|
||||
*/
|
||||
TIMESTAMP = "timestamp"
|
||||
}
|
||||
/**
|
||||
* Properties for an Alarm Status Widget
|
||||
*/
|
||||
export interface AlarmStatusWidgetProps {
|
||||
/**
|
||||
* CloudWatch Alarms to show in widget
|
||||
*/
|
||||
readonly alarms: IAlarmRef[];
|
||||
/**
|
||||
* The title of the widget
|
||||
*
|
||||
* @default 'Alarm Status'
|
||||
*/
|
||||
readonly title?: string;
|
||||
/**
|
||||
* Width of the widget, in a grid of 24 units wide
|
||||
*
|
||||
* @default 6
|
||||
*/
|
||||
readonly width?: number;
|
||||
/**
|
||||
* Height of the widget
|
||||
*
|
||||
* @default 3
|
||||
*/
|
||||
readonly height?: number;
|
||||
/**
|
||||
* Specifies how to sort the alarms in the widget.
|
||||
*
|
||||
* @default - alphabetical order
|
||||
*/
|
||||
readonly sortBy?: AlarmStatusWidgetSortBy;
|
||||
/**
|
||||
* Use this field to filter the list of alarms displayed in the widget to only those alarms currently in the specified states.
|
||||
* You can specify one or more alarm states in the value for this field.
|
||||
* The alarm states that you can specify are ALARM, INSUFFICIENT_DATA, and OK.
|
||||
*
|
||||
* If you omit this field or specify an empty array, all the alarms specified in alarms are displayed.
|
||||
*
|
||||
* @default - all the alarms specified in alarms are displayed.
|
||||
*/
|
||||
readonly states?: AlarmState[];
|
||||
}
|
||||
/**
|
||||
* A dashboard widget that displays alarms in a grid view
|
||||
*/
|
||||
export declare class AlarmStatusWidget extends ConcreteWidget {
|
||||
private readonly props;
|
||||
constructor(props: AlarmStatusWidgetProps);
|
||||
position(x: number, y: number): void;
|
||||
toJson(): any[];
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm-status-widget.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm-status-widget.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AlarmStatusWidget=exports.AlarmStatusWidgetSortBy=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var widget_1=()=>{var tmp=require("./widget");return widget_1=()=>tmp,tmp},AlarmStatusWidgetSortBy;(function(AlarmStatusWidgetSortBy2){AlarmStatusWidgetSortBy2.DEFAULT="default",AlarmStatusWidgetSortBy2.STATE_UPDATED_TIMESTAMP="stateUpdatedTimestamp",AlarmStatusWidgetSortBy2.TIMESTAMP="timestamp"})(AlarmStatusWidgetSortBy||(exports.AlarmStatusWidgetSortBy=AlarmStatusWidgetSortBy={}));class AlarmStatusWidget extends widget_1().ConcreteWidget{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudwatch.AlarmStatusWidget",version:"2.252.0"};props;constructor(props){super(props.width||6,props.height||3);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_AlarmStatusWidgetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AlarmStatusWidget),error}this.props=props}position(x,y){this.x=x,this.y=y}toJson(){return[{type:"alarm",width:this.width,height:this.height,x:this.x,y:this.y,properties:{title:this.props.title?this.props.title:"Alarm Status",alarms:this.props.alarms.map(alarm=>alarm.alarmRef.alarmArn),states:this.props.states,sortBy:this.props.sortBy}}]}}exports.AlarmStatusWidget=AlarmStatusWidget;
|
||||
254
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm.d.ts
generated
vendored
Normal file
254
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm.d.ts
generated
vendored
Normal file
@@ -0,0 +1,254 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { IAlarmAction } from './alarm-action';
|
||||
import type { IAlarm } from './alarm-base';
|
||||
import { AlarmBase } from './alarm-base';
|
||||
import type { HorizontalAnnotation } from './graph';
|
||||
import type { CreateAlarmOptions } from './metric';
|
||||
import type { IMetric } from './metric-types';
|
||||
import type { CreateAlarmOptionsBase } from './private/alarm-options';
|
||||
/**
|
||||
* Properties for Alarms
|
||||
*/
|
||||
export interface AlarmProps extends CreateAlarmOptions {
|
||||
/**
|
||||
* The metric to add the alarm on
|
||||
*
|
||||
* Metric objects can be obtained from most resources, or you can construct
|
||||
* custom Metric objects by instantiating one.
|
||||
*/
|
||||
readonly metric: IMetric;
|
||||
}
|
||||
/**
|
||||
* Properties for Anomaly Detection Alarms
|
||||
*/
|
||||
export interface AnomalyDetectionAlarmProps extends CreateAlarmOptionsBase {
|
||||
/**
|
||||
* The metric to add the alarm on
|
||||
*
|
||||
* Metric objects can be obtained from most resources, or you can construct
|
||||
* custom Metric objects by instantiating one.
|
||||
*/
|
||||
readonly metric: IMetric;
|
||||
/**
|
||||
* The number of standard deviations to use for the anomaly detection band. The higher the value, the wider the band.
|
||||
*
|
||||
* - Must be greater than 0. A value of 0 or negative values would not make sense in the context of calculating standard deviations.
|
||||
* - There is no strict maximum value defined, as standard deviations can theoretically extend infinitely. However, in practice, values beyond 5 or 6 standard deviations are rarely used, as they would result in an extremely wide anomaly detection band, potentially missing significant anomalies.
|
||||
*
|
||||
* @default 2
|
||||
*/
|
||||
readonly stdDevs?: number;
|
||||
/**
|
||||
* Comparison operator to use to check if metric is breaching.
|
||||
* Must be one of the anomaly detection operators:
|
||||
* - LESS_THAN_LOWER_OR_GREATER_THAN_UPPER_THRESHOLD
|
||||
* - GREATER_THAN_UPPER_THRESHOLD
|
||||
* - LESS_THAN_LOWER_THRESHOLD
|
||||
*
|
||||
* @default LESS_THAN_LOWER_OR_GREATER_THAN_UPPER_THRESHOLD
|
||||
*/
|
||||
readonly comparisonOperator?: ComparisonOperator;
|
||||
}
|
||||
/**
|
||||
* Comparison operator for evaluating alarms
|
||||
*/
|
||||
export declare enum ComparisonOperator {
|
||||
/**
|
||||
* Specified statistic is greater than or equal to the threshold
|
||||
*/
|
||||
GREATER_THAN_OR_EQUAL_TO_THRESHOLD = "GreaterThanOrEqualToThreshold",
|
||||
/**
|
||||
* Specified statistic is strictly greater than the threshold
|
||||
*/
|
||||
GREATER_THAN_THRESHOLD = "GreaterThanThreshold",
|
||||
/**
|
||||
* Specified statistic is strictly less than the threshold
|
||||
*/
|
||||
LESS_THAN_THRESHOLD = "LessThanThreshold",
|
||||
/**
|
||||
* Specified statistic is less than or equal to the threshold.
|
||||
*/
|
||||
LESS_THAN_OR_EQUAL_TO_THRESHOLD = "LessThanOrEqualToThreshold",
|
||||
/**
|
||||
* Specified statistic is lower than or greater than the anomaly model band.
|
||||
* Used only for alarms based on anomaly detection models
|
||||
*/
|
||||
LESS_THAN_LOWER_OR_GREATER_THAN_UPPER_THRESHOLD = "LessThanLowerOrGreaterThanUpperThreshold",
|
||||
/**
|
||||
* Specified statistic is greater than the anomaly model band.
|
||||
* Used only for alarms based on anomaly detection models
|
||||
*/
|
||||
GREATER_THAN_UPPER_THRESHOLD = "GreaterThanUpperThreshold",
|
||||
/**
|
||||
* Specified statistic is lower than the anomaly model band.
|
||||
* Used only for alarms based on anomaly detection models
|
||||
*/
|
||||
LESS_THAN_LOWER_THRESHOLD = "LessThanLowerThreshold"
|
||||
}
|
||||
/**
|
||||
* Specify how missing data points are treated during alarm evaluation
|
||||
*/
|
||||
export declare enum TreatMissingData {
|
||||
/**
|
||||
* Missing data points are treated as breaching the threshold
|
||||
*/
|
||||
BREACHING = "breaching",
|
||||
/**
|
||||
* Missing data points are treated as being within the threshold
|
||||
*/
|
||||
NOT_BREACHING = "notBreaching",
|
||||
/**
|
||||
* The current alarm state is maintained
|
||||
*/
|
||||
IGNORE = "ignore",
|
||||
/**
|
||||
* The alarm does not consider missing data points when evaluating whether to change state
|
||||
*/
|
||||
MISSING = "missing"
|
||||
}
|
||||
/**
|
||||
* An alarm on a CloudWatch metric
|
||||
*/
|
||||
export declare class Alarm extends AlarmBase {
|
||||
/** Uniquely identifies this class. */
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
/**
|
||||
* Conventional value for the threshold property when creating anomaly detection alarms.
|
||||
*
|
||||
* Anomaly detection alarms don't have numbered threshold. Instead, they have a dynamically
|
||||
* calculated threshold based on the metric math expression that contains a metric expression.
|
||||
*
|
||||
* The `threshold` property is required, but the value is ignored. This
|
||||
* constant has the value 0, and has a symbolic name to indicate why the
|
||||
* threshold is 0. You can use `new AnomalyDetectionAlarm()` to avoid having to pass
|
||||
* the `threshold` property at all.
|
||||
*/
|
||||
static readonly ANOMALY_DETECTION_NO_THRESHOLD = 0;
|
||||
/**
|
||||
* Import an existing CloudWatch alarm provided an Name.
|
||||
*
|
||||
* @param scope The parent creating construct (usually `this`)
|
||||
* @param id The construct's name
|
||||
* @param alarmName Alarm Name
|
||||
*/
|
||||
static fromAlarmName(scope: Construct, id: string, alarmName: string): IAlarm;
|
||||
/**
|
||||
* Import an existing CloudWatch alarm provided an ARN
|
||||
*
|
||||
* @param scope The parent creating construct (usually `this`).
|
||||
* @param id The construct's name
|
||||
* @param alarmArn Alarm ARN (i.e. arn:aws:cloudwatch:<region>:<account-id>:alarm:Foo)
|
||||
*/
|
||||
static fromAlarmArn(scope: Construct, id: string, alarmArn: string): IAlarm;
|
||||
/**
|
||||
* The metric object this alarm was based on
|
||||
*/
|
||||
readonly metric: IMetric;
|
||||
/**
|
||||
* This metric as an annotation
|
||||
*/
|
||||
private readonly annotation;
|
||||
private readonly alarm;
|
||||
constructor(scope: Construct, id: string, props: AlarmProps);
|
||||
/**
|
||||
* ARN of this alarm
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
get alarmArn(): string;
|
||||
/**
|
||||
* Name of this alarm.
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
get alarmName(): string;
|
||||
/**
|
||||
* Turn this alarm into a horizontal annotation
|
||||
*
|
||||
* This is useful if you want to represent an Alarm in a non-AlarmWidget.
|
||||
* An `AlarmWidget` can directly show an alarm, but it can only show a
|
||||
* single alarm and no other metrics. Instead, you can convert the alarm to
|
||||
* a HorizontalAnnotation and add it as an annotation to another graph.
|
||||
*
|
||||
* This might be useful if:
|
||||
*
|
||||
* - You want to show multiple alarms inside a single graph, for example if
|
||||
* you have both a "small margin/long period" alarm as well as a
|
||||
* "large margin/short period" alarm.
|
||||
*
|
||||
* - You want to show an Alarm line in a graph with multiple metrics in it.
|
||||
*/
|
||||
toAnnotation(): HorizontalAnnotation;
|
||||
/**
|
||||
* Trigger this action if the alarm fires
|
||||
*
|
||||
* Typically SnsAction or AutoScalingAction.
|
||||
*/
|
||||
addAlarmAction(...actions: IAlarmAction[]): void;
|
||||
private validateActionArn;
|
||||
/**
|
||||
* Render the given metric to properties of CfnAlarmProps
|
||||
*
|
||||
* - Tries to render to the legacy fields if possible (to not unduly change
|
||||
* existing templates from before the modern fields were added).
|
||||
* - If the metric is a math expression that depends on other metrics, recursively
|
||||
* render all of them to the `metrics[]` array.
|
||||
*
|
||||
* Returns the alarm fields, as well as the 'id' that was assigned to the primary metric
|
||||
* (if rendering to the modern fields, because the legacy fields don't have an id).
|
||||
*
|
||||
* The metric we are trying to render (potentially) forms a tree that looks like this
|
||||
* (the example doesn't make sense but it shows the data structures)
|
||||
*
|
||||
* ```
|
||||
* +-- MathExpression('m1 + m2')
|
||||
* |
|
||||
* +--- m1: MetricStat('AWS/DynamoDB', 'Errors', 'SUM')
|
||||
* +--- m2: MathExpression('m3 * m4')
|
||||
* |
|
||||
* +--- m3: MetricStat('AWS/DynamoDB', 'BytesWritten', 'AVG')
|
||||
* +--- m4: MetricStat('AWS/SQS', 'MessagesReceived', 'MIN')
|
||||
* ```
|
||||
*
|
||||
* `metric` is the root of this metric tree, and we need to render this to a
|
||||
* flat list of 5 `MetricData` objects where we make sure that all metrics
|
||||
* have a (unique) identifier assigned and only the root one has `ReturnData:
|
||||
* true` set.
|
||||
*
|
||||
* ## doubleReturnData
|
||||
*
|
||||
* Normally, exactly one metric in the list needs to have `ReturnData: true` set, and it's
|
||||
* the "primary" metric, i.e., the metric that the actual alarm should trigger on. There is
|
||||
* an exception to this rule: for anomaly detection alarms, both the anomaly detection
|
||||
* math expression *AND* the metric that the expression is based on must have `ReturnData: true`
|
||||
* set.
|
||||
*
|
||||
* This flag controls whether we set `ReturnData: true` only on the top-level math expression, or
|
||||
* on both the top-level and the second-level expression.
|
||||
*/
|
||||
private renderMetric;
|
||||
/**
|
||||
* Validate that if a region is in the given stat config, they match the Alarm
|
||||
*/
|
||||
private validateMetricStat;
|
||||
/**
|
||||
* Validates that the expression config does not specify searchAccount or searchRegion props
|
||||
* as search expressions are not supported by Alarms.
|
||||
*/
|
||||
private validateMetricExpression;
|
||||
/**
|
||||
* Determine if the accountId property should be included in the metric.
|
||||
*/
|
||||
private requiresAccountId;
|
||||
}
|
||||
/**
|
||||
* CloudWatch Alarm that uses anomaly detection to trigger alarms
|
||||
*
|
||||
* This alarm type is specifically designed for use with anomaly detection operators
|
||||
* like LESS_THAN_LOWER_OR_GREATER_THAN_UPPER_THRESHOLD.
|
||||
*/
|
||||
export declare class AnomalyDetectionAlarm extends Alarm {
|
||||
/** Uniquely identifies this class. */
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
constructor(scope: Construct, id: string, props: AnomalyDetectionAlarmProps);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/alarm.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
23
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/cloudwatch-canned-metrics.generated.d.ts
generated
vendored
Normal file
23
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/cloudwatch-canned-metrics.generated.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
export interface MetricWithDims<D> {
|
||||
readonly namespace: string;
|
||||
readonly metricName: string;
|
||||
readonly statistic: string;
|
||||
readonly dimensionsMap: D;
|
||||
}
|
||||
export declare class CloudWatchMetricStreamsMetrics {
|
||||
static metricUpdateSum(this: void, dimensions: {
|
||||
MetricStreamName: string;
|
||||
}): MetricWithDims<{
|
||||
MetricStreamName: string;
|
||||
}>;
|
||||
static totalMetricUpdateSum(this: void, dimensions: {
|
||||
MetricStreamName: string;
|
||||
}): MetricWithDims<{
|
||||
MetricStreamName: string;
|
||||
}>;
|
||||
static publishErrorRateAverage(this: void, dimensions: {
|
||||
MetricStreamName: string;
|
||||
}): MetricWithDims<{
|
||||
MetricStreamName: string;
|
||||
}>;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/cloudwatch-canned-metrics.generated.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/cloudwatch-canned-metrics.generated.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CloudWatchMetricStreamsMetrics=void 0;class CloudWatchMetricStreamsMetrics{static metricUpdateSum(dimensions){return{namespace:"AWS/CloudWatch/MetricStreams",metricName:"MetricUpdate",dimensionsMap:dimensions,statistic:"Sum"}}static totalMetricUpdateSum(dimensions){return{namespace:"AWS/CloudWatch/MetricStreams",metricName:"TotalMetricUpdate",dimensionsMap:dimensions,statistic:"Sum"}}static publishErrorRateAverage(dimensions){return{namespace:"AWS/CloudWatch/MetricStreams",metricName:"PublishErrorRate",dimensionsMap:dimensions,statistic:"Average"}}}exports.CloudWatchMetricStreamsMetrics=CloudWatchMetricStreamsMetrics;
|
||||
2544
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/cloudwatch.generated.d.ts
generated
vendored
Normal file
2544
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/cloudwatch.generated.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/cloudwatch.generated.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/cloudwatch.generated.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
91
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/composite-alarm.d.ts
generated
vendored
Normal file
91
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/composite-alarm.d.ts
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { IAlarm, IAlarmRule } from './alarm-base';
|
||||
import { AlarmBase } from './alarm-base';
|
||||
import { Duration } from '../../core';
|
||||
import type { IAlarmRef } from '../../interfaces/generated/aws-cloudwatch-interfaces.generated';
|
||||
/**
|
||||
* Properties for creating a Composite Alarm
|
||||
*/
|
||||
export interface CompositeAlarmProps {
|
||||
/**
|
||||
* Whether the actions for this alarm are enabled
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly actionsEnabled?: boolean;
|
||||
/**
|
||||
* Description for the alarm
|
||||
*
|
||||
* @default - No description.
|
||||
*/
|
||||
readonly alarmDescription?: string;
|
||||
/**
|
||||
* Name of the alarm
|
||||
*
|
||||
* @default - Automatically generated name.
|
||||
*/
|
||||
readonly compositeAlarmName?: string;
|
||||
/**
|
||||
* Expression that specifies which other alarms are to be evaluated to determine this composite alarm's state.
|
||||
*/
|
||||
readonly alarmRule: IAlarmRule;
|
||||
/**
|
||||
* Actions will be suppressed if the suppressor alarm is in the ALARM state.
|
||||
*
|
||||
* @default - alarm will not be suppressed.
|
||||
*/
|
||||
readonly actionsSuppressor?: IAlarmRef;
|
||||
/**
|
||||
* The maximum duration that the composite alarm waits after suppressor alarm goes out of the ALARM state.
|
||||
* After this time, the composite alarm performs its actions.
|
||||
*
|
||||
* @default - 1 minute extension period will be set.
|
||||
*/
|
||||
readonly actionsSuppressorExtensionPeriod?: Duration;
|
||||
/**
|
||||
* The maximum duration that the composite alarm waits for the suppressor alarm to go into the ALARM state.
|
||||
* After this time, the composite alarm performs its actions.
|
||||
*
|
||||
* @default - 1 minute wait period will be set.
|
||||
*/
|
||||
readonly actionsSuppressorWaitPeriod?: Duration;
|
||||
}
|
||||
/**
|
||||
* A Composite Alarm based on Alarm Rule.
|
||||
*/
|
||||
export declare class CompositeAlarm extends AlarmBase {
|
||||
/** Uniquely identifies this class. */
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
/**
|
||||
* Import an existing CloudWatch composite alarm provided an Name.
|
||||
*
|
||||
* @param scope The parent creating construct (usually `this`)
|
||||
* @param id The construct's name
|
||||
* @param compositeAlarmName Composite Alarm Name
|
||||
*/
|
||||
static fromCompositeAlarmName(scope: Construct, id: string, compositeAlarmName: string): IAlarm;
|
||||
/**
|
||||
* Import an existing CloudWatch composite alarm provided an ARN.
|
||||
*
|
||||
* @param scope The parent creating construct (usually `this`)
|
||||
* @param id The construct's name
|
||||
* @param compositeAlarmArn Composite Alarm ARN (i.e. arn:aws:cloudwatch:<region>:<account-id>:alarm:CompositeAlarmName)
|
||||
*/
|
||||
static fromCompositeAlarmArn(scope: Construct, id: string, compositeAlarmArn: string): IAlarm;
|
||||
/**
|
||||
* ARN of this alarm
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
get alarmArn(): string;
|
||||
/**
|
||||
* Name of this alarm.
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
get alarmName(): string;
|
||||
private readonly alarmRule;
|
||||
private readonly resource;
|
||||
constructor(scope: Construct, id: string, props: CompositeAlarmProps);
|
||||
private generateUniqueId;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/composite-alarm.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/composite-alarm.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
124
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/dashboard.d.ts
generated
vendored
Normal file
124
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/dashboard.d.ts
generated
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { IVariable } from './variable';
|
||||
import type { IWidget } from './widget';
|
||||
import type { Duration } from '../../core';
|
||||
import { Resource } from '../../core';
|
||||
/**
|
||||
* Specify the period for graphs when the CloudWatch dashboard loads
|
||||
*/
|
||||
export declare enum PeriodOverride {
|
||||
/**
|
||||
* Period of all graphs on the dashboard automatically adapt to the time range of the dashboard.
|
||||
*/
|
||||
AUTO = "auto",
|
||||
/**
|
||||
* Period set for each graph will be used
|
||||
*/
|
||||
INHERIT = "inherit"
|
||||
}
|
||||
/**
|
||||
* Properties for defining a CloudWatch Dashboard
|
||||
*/
|
||||
export interface DashboardProps {
|
||||
/**
|
||||
* Name of the dashboard.
|
||||
*
|
||||
* If set, must only contain alphanumerics, dash (-) and underscore (_)
|
||||
*
|
||||
* @default - automatically generated name
|
||||
*/
|
||||
readonly dashboardName?: string;
|
||||
/**
|
||||
* Interval duration for metrics.
|
||||
* You can specify defaultInterval with the relative time (e.g. cdk.Duration.days(7)).
|
||||
*
|
||||
* Both properties `defaultInterval` and `start` cannot be set at once.
|
||||
*
|
||||
* @default When the dashboard loads, the defaultInterval time will be the default time range.
|
||||
*/
|
||||
readonly defaultInterval?: Duration;
|
||||
/**
|
||||
* The start of the time range to use for each widget on the dashboard.
|
||||
* You can specify start without specifying end to specify a relative time range that ends with the current time.
|
||||
* In this case, the value of start must begin with -P, and you can use M, H, D, W and M as abbreviations for
|
||||
* minutes, hours, days, weeks and months. For example, -PT8H shows the last 8 hours and -P3M shows the last three months.
|
||||
* You can also use start along with an end field, to specify an absolute time range.
|
||||
* When specifying an absolute time range, use the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
|
||||
*
|
||||
* Both properties `defaultInterval` and `start` cannot be set at once.
|
||||
*
|
||||
* @default When the dashboard loads, the start time will be the default time range.
|
||||
*/
|
||||
readonly start?: string;
|
||||
/**
|
||||
* The end of the time range to use for each widget on the dashboard when the dashboard loads.
|
||||
* If you specify a value for end, you must also specify a value for start.
|
||||
* Specify an absolute time in the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
|
||||
*
|
||||
* @default When the dashboard loads, the end date will be the current time.
|
||||
*/
|
||||
readonly end?: string;
|
||||
/**
|
||||
* Use this field to specify the period for the graphs when the dashboard loads.
|
||||
* Specifying `Auto` causes the period of all graphs on the dashboard to automatically adapt to the time range of the dashboard.
|
||||
* Specifying `Inherit` ensures that the period set for each graph is always obeyed.
|
||||
*
|
||||
* @default Auto
|
||||
*/
|
||||
readonly periodOverride?: PeriodOverride;
|
||||
/**
|
||||
* Initial set of widgets on the dashboard
|
||||
*
|
||||
* One array represents a row of widgets.
|
||||
*
|
||||
* @default - No widgets
|
||||
*/
|
||||
readonly widgets?: IWidget[][];
|
||||
/**
|
||||
* A list of dashboard variables
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_dashboard_variables.html#cloudwatch_dashboard_variables_types
|
||||
*
|
||||
* @default - No variables
|
||||
*/
|
||||
readonly variables?: IVariable[];
|
||||
}
|
||||
/**
|
||||
* A CloudWatch dashboard
|
||||
*/
|
||||
export declare class Dashboard extends Resource {
|
||||
/** Uniquely identifies this class. */
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
/**
|
||||
* The name of this dashboard
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
get dashboardName(): string;
|
||||
/**
|
||||
* ARN of this dashboard
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
readonly dashboardArn: string;
|
||||
private readonly rows;
|
||||
private readonly variables;
|
||||
private readonly resource;
|
||||
constructor(scope: Construct, id: string, props?: DashboardProps);
|
||||
/**
|
||||
* Add a widget to the dashboard.
|
||||
*
|
||||
* Widgets given in multiple calls to add() will be laid out stacked on
|
||||
* top of each other.
|
||||
*
|
||||
* Multiple widgets added in the same call to add() will be laid out next
|
||||
* to each other.
|
||||
*/
|
||||
addWidgets(...widgets: IWidget[]): void;
|
||||
/**
|
||||
* Add a variable to the dashboard.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_dashboard_variables.html
|
||||
*/
|
||||
addVariable(variable: IVariable): void;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/dashboard.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/dashboard.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
810
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/graph.d.ts
generated
vendored
Normal file
810
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/graph.d.ts
generated
vendored
Normal file
@@ -0,0 +1,810 @@
|
||||
import type { IMetric } from './metric-types';
|
||||
import { ConcreteWidget } from './widget';
|
||||
import * as cdk from '../../core';
|
||||
import type { IAlarmRef } from '../../interfaces/generated/aws-cloudwatch-interfaces.generated';
|
||||
/**
|
||||
* Basic properties for widgets that display metrics
|
||||
*/
|
||||
export interface MetricWidgetProps {
|
||||
/**
|
||||
* Title for the graph
|
||||
*
|
||||
* @default - None
|
||||
*/
|
||||
readonly title?: string;
|
||||
/**
|
||||
* The region the metrics of this graph should be taken from
|
||||
*
|
||||
* @default - Current region
|
||||
*/
|
||||
readonly region?: string;
|
||||
/**
|
||||
* Width of the widget, in a grid of 24 units wide
|
||||
*
|
||||
* @default 6
|
||||
*/
|
||||
readonly width?: number;
|
||||
/**
|
||||
* Height of the widget
|
||||
*
|
||||
* @default - 6 for Alarm and Graph widgets.
|
||||
* 3 for single value widgets where most recent value of a metric is displayed.
|
||||
*/
|
||||
readonly height?: number;
|
||||
/**
|
||||
* The AWS account ID where the metrics are located.
|
||||
*
|
||||
* This enables cross-account functionality for CloudWatch dashboards.
|
||||
* Before using this feature, ensure that proper cross-account sharing is configured
|
||||
* between the monitoring account and source account.
|
||||
*
|
||||
* For more information, see:
|
||||
* https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
||||
*
|
||||
* @default - Current account
|
||||
*/
|
||||
readonly accountId?: string;
|
||||
}
|
||||
/**
|
||||
* Properties for a Y-Axis
|
||||
*/
|
||||
export interface YAxisProps {
|
||||
/**
|
||||
* The min value
|
||||
*
|
||||
* @default - Auto
|
||||
*/
|
||||
readonly min?: number;
|
||||
/**
|
||||
* The max value
|
||||
*
|
||||
* @default - Auto
|
||||
*/
|
||||
readonly max?: number;
|
||||
/**
|
||||
* The label
|
||||
*
|
||||
* @default - No label
|
||||
*/
|
||||
readonly label?: string;
|
||||
/**
|
||||
* Whether to show units
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly showUnits?: boolean;
|
||||
}
|
||||
/**
|
||||
* Properties for an AlarmWidget
|
||||
*/
|
||||
export interface AlarmWidgetProps extends MetricWidgetProps {
|
||||
/**
|
||||
* The alarm to show
|
||||
*/
|
||||
readonly alarm: IAlarmRef;
|
||||
/**
|
||||
* Left Y axis
|
||||
*
|
||||
* @default - No minimum or maximum values for the left Y-axis
|
||||
*/
|
||||
readonly leftYAxis?: YAxisProps;
|
||||
}
|
||||
/**
|
||||
* Display the metric associated with an alarm, including the alarm line
|
||||
*/
|
||||
export declare class AlarmWidget extends ConcreteWidget {
|
||||
private readonly props;
|
||||
constructor(props: AlarmWidgetProps);
|
||||
toJson(): any[];
|
||||
}
|
||||
/**
|
||||
* Types of view
|
||||
*/
|
||||
export declare enum GraphWidgetView {
|
||||
/**
|
||||
* Display as a line graph.
|
||||
*/
|
||||
TIME_SERIES = "timeSeries",
|
||||
/**
|
||||
* Display as a bar graph.
|
||||
*/
|
||||
BAR = "bar",
|
||||
/**
|
||||
* Display as a pie graph.
|
||||
*/
|
||||
PIE = "pie"
|
||||
}
|
||||
/**
|
||||
* Properties for a GaugeWidget
|
||||
*/
|
||||
export interface GaugeWidgetProps extends MetricWidgetProps {
|
||||
/**
|
||||
* Metrics to display on left Y axis
|
||||
*
|
||||
* @default - No metrics
|
||||
*/
|
||||
readonly metrics?: IMetric[];
|
||||
/**
|
||||
* Annotations for the left Y axis
|
||||
*
|
||||
* @default - No annotations
|
||||
*/
|
||||
readonly annotations?: HorizontalAnnotation[];
|
||||
/**
|
||||
* Left Y axis
|
||||
*
|
||||
* @default {min:0,max:100}
|
||||
*/
|
||||
readonly leftYAxis?: YAxisProps;
|
||||
/**
|
||||
* Position of the legend
|
||||
*
|
||||
* @default - bottom
|
||||
*/
|
||||
readonly legendPosition?: LegendPosition;
|
||||
/**
|
||||
* Whether the graph should show live data
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly liveData?: boolean;
|
||||
/**
|
||||
* Whether to show the value from the entire time range. Only applicable for Bar and Pie charts.
|
||||
*
|
||||
* If false, values will be from the most recent period of your chosen time range;
|
||||
* if true, shows the value from the entire time range.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly setPeriodToTimeRange?: boolean;
|
||||
/**
|
||||
* The default period for all metrics in this widget.
|
||||
* The period is the length of time represented by one data point on the graph.
|
||||
* This default can be overridden within each metric definition.
|
||||
*
|
||||
* @default cdk.Duration.seconds(300)
|
||||
*/
|
||||
readonly period?: cdk.Duration;
|
||||
/**
|
||||
* The default statistic to be displayed for each metric.
|
||||
* This default can be overridden within the definition of each individual metric
|
||||
*
|
||||
* @default - The statistic for each metric is used
|
||||
*/
|
||||
readonly statistic?: string;
|
||||
/**
|
||||
* The start of the time range to use for each widget independently from those of the dashboard.
|
||||
* You can specify start without specifying end to specify a relative time range that ends with the current time.
|
||||
* In this case, the value of start must begin with -P, and you can use M, H, D, W and M as abbreviations for
|
||||
* minutes, hours, days, weeks and months. For example, -PT8H shows the last 8 hours and -P3M shows the last three months.
|
||||
* You can also use start along with an end field, to specify an absolute time range.
|
||||
* When specifying an absolute time range, use the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
|
||||
*
|
||||
* @default When the dashboard loads, the start time will be the default time range.
|
||||
*/
|
||||
readonly start?: string;
|
||||
/**
|
||||
* The end of the time range to use for each widget independently from those of the dashboard.
|
||||
* If you specify a value for end, you must also specify a value for start.
|
||||
* Specify an absolute time in the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
|
||||
*
|
||||
* @default When the dashboard loads, the end date will be the current time.
|
||||
*/
|
||||
readonly end?: string;
|
||||
}
|
||||
/**
|
||||
* A dashboard gauge widget that displays metrics
|
||||
*/
|
||||
export declare class GaugeWidget extends ConcreteWidget {
|
||||
private readonly props;
|
||||
private readonly metrics;
|
||||
constructor(props: GaugeWidgetProps);
|
||||
/**
|
||||
* Add another metric to the left Y axis of the GaugeWidget
|
||||
*
|
||||
* @param metric the metric to add
|
||||
*/
|
||||
addMetric(metric: IMetric): void;
|
||||
toJson(): any[];
|
||||
}
|
||||
/**
|
||||
* Properties for a GraphWidget
|
||||
*/
|
||||
export interface GraphWidgetProps extends MetricWidgetProps {
|
||||
/**
|
||||
* Metrics to display on left Y axis
|
||||
*
|
||||
* @default - No metrics
|
||||
*/
|
||||
readonly left?: IMetric[];
|
||||
/**
|
||||
* Metrics to display on right Y axis
|
||||
*
|
||||
* @default - No metrics
|
||||
*/
|
||||
readonly right?: IMetric[];
|
||||
/**
|
||||
* Annotations for the left Y axis
|
||||
*
|
||||
* @default - No annotations
|
||||
*/
|
||||
readonly leftAnnotations?: HorizontalAnnotation[];
|
||||
/**
|
||||
* Annotations for the right Y axis
|
||||
*
|
||||
* @default - No annotations
|
||||
*/
|
||||
readonly rightAnnotations?: HorizontalAnnotation[];
|
||||
/**
|
||||
* Annotations for the X axis
|
||||
*
|
||||
* @default - No annotations
|
||||
*/
|
||||
readonly verticalAnnotations?: VerticalAnnotation[];
|
||||
/**
|
||||
* Whether the graph should be shown as stacked lines
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly stacked?: boolean;
|
||||
/**
|
||||
* Left Y axis
|
||||
*
|
||||
* @default - None
|
||||
*/
|
||||
readonly leftYAxis?: YAxisProps;
|
||||
/**
|
||||
* Right Y axis
|
||||
*
|
||||
* @default - None
|
||||
*/
|
||||
readonly rightYAxis?: YAxisProps;
|
||||
/**
|
||||
* Position of the legend
|
||||
*
|
||||
* @default - bottom
|
||||
*/
|
||||
readonly legendPosition?: LegendPosition;
|
||||
/**
|
||||
* Whether the graph should show live data
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly liveData?: boolean;
|
||||
/**
|
||||
* Whether the graph should show labels on the chart. Currently only applicable for Pie charts.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly displayLabelsOnChart?: boolean;
|
||||
/**
|
||||
* Display this metric
|
||||
*
|
||||
* @default TimeSeries
|
||||
*/
|
||||
readonly view?: GraphWidgetView;
|
||||
/**
|
||||
* Whether to show the value from the entire time range. Only applicable for Bar and Pie charts.
|
||||
*
|
||||
* If false, values will be from the most recent period of your chosen time range;
|
||||
* if true, shows the value from the entire time range.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly setPeriodToTimeRange?: boolean;
|
||||
/**
|
||||
* The default period for all metrics in this widget.
|
||||
* The period is the length of time represented by one data point on the graph.
|
||||
* This default can be overridden within each metric definition.
|
||||
*
|
||||
* @default cdk.Duration.seconds(300)
|
||||
*/
|
||||
readonly period?: cdk.Duration;
|
||||
/**
|
||||
* The default statistic to be displayed for each metric.
|
||||
* This default can be overridden within the definition of each individual metric
|
||||
*
|
||||
* @default - The statistic for each metric is used
|
||||
*/
|
||||
readonly statistic?: string;
|
||||
/**
|
||||
* The start of the time range to use for each widget independently from those of the dashboard.
|
||||
* You can specify start without specifying end to specify a relative time range that ends with the current time.
|
||||
* In this case, the value of start must begin with -P, and you can use M, H, D, W and M as abbreviations for
|
||||
* minutes, hours, days, weeks and months. For example, -PT8H shows the last 8 hours and -P3M shows the last three months.
|
||||
* You can also use start along with an end field, to specify an absolute time range.
|
||||
* When specifying an absolute time range, use the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
|
||||
*
|
||||
* @default When the dashboard loads, the start time will be the default time range.
|
||||
*/
|
||||
readonly start?: string;
|
||||
/**
|
||||
* The end of the time range to use for each widget independently from those of the dashboard.
|
||||
* If you specify a value for end, you must also specify a value for start.
|
||||
* Specify an absolute time in the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
|
||||
*
|
||||
* @default When the dashboard loads, the end date will be the current time.
|
||||
*/
|
||||
readonly end?: string;
|
||||
}
|
||||
/**
|
||||
* A dashboard widget that displays metrics
|
||||
*/
|
||||
export declare class GraphWidget extends ConcreteWidget {
|
||||
private static readonly ISO8601_REGEX;
|
||||
private static isIso8601;
|
||||
private readonly props;
|
||||
private readonly leftMetrics;
|
||||
private readonly rightMetrics;
|
||||
constructor(props: GraphWidgetProps);
|
||||
/**
|
||||
* Add another metric to the left Y axis of the GraphWidget
|
||||
*
|
||||
* @param metric the metric to add
|
||||
*/
|
||||
addLeftMetric(metric: IMetric): void;
|
||||
/**
|
||||
* Add another metric to the right Y axis of the GraphWidget
|
||||
*
|
||||
* @param metric the metric to add
|
||||
*/
|
||||
addRightMetric(metric: IMetric): void;
|
||||
toJson(): any[];
|
||||
}
|
||||
/**
|
||||
* Layout for TableWidget
|
||||
*/
|
||||
export declare enum TableLayout {
|
||||
/**
|
||||
* Data points are laid out in columns
|
||||
*/
|
||||
HORIZONTAL = "horizontal",
|
||||
/**
|
||||
* Data points are laid out in rows
|
||||
*/
|
||||
VERTICAL = "vertical"
|
||||
}
|
||||
/**
|
||||
* Standard table summary columns
|
||||
*/
|
||||
export declare enum TableSummaryColumn {
|
||||
/**
|
||||
* Minimum of all data points
|
||||
*/
|
||||
MINIMUM = "MIN",
|
||||
/**
|
||||
* Maximum of all data points
|
||||
*/
|
||||
MAXIMUM = "MAX",
|
||||
/**
|
||||
* Sum of all data points
|
||||
*/
|
||||
SUM = "SUM",
|
||||
/**
|
||||
* Average of all data points
|
||||
*/
|
||||
AVERAGE = "AVG"
|
||||
}
|
||||
/**
|
||||
* Properties for TableWidget's summary columns
|
||||
*/
|
||||
export interface TableSummaryProps {
|
||||
/**
|
||||
* Summary columns
|
||||
*
|
||||
* @default - No summary columns will be shown
|
||||
*/
|
||||
readonly columns?: TableSummaryColumn[];
|
||||
/**
|
||||
* Make the summary columns sticky, so that they remain in view while scrolling
|
||||
*
|
||||
* @default - false
|
||||
*/
|
||||
readonly sticky?: boolean;
|
||||
/**
|
||||
* Prevent the columns of datapoints from being displayed, so that only the label and summary columns are displayed
|
||||
*
|
||||
* @default - false
|
||||
*/
|
||||
readonly hideNonSummaryColumns?: boolean;
|
||||
}
|
||||
/**
|
||||
* Thresholds for highlighting cells in TableWidget
|
||||
*/
|
||||
export declare class TableThreshold {
|
||||
/**
|
||||
* A threshold for highlighting and coloring cells above the specified value
|
||||
*
|
||||
* @param value lower bound of threshold range
|
||||
* @param color cell color for values within threshold range
|
||||
*/
|
||||
static above(value: number, color?: string): TableThreshold;
|
||||
/**
|
||||
* A threshold for highlighting and coloring cells below the specified value
|
||||
*
|
||||
* @param value upper bound of threshold range
|
||||
* @param color cell color for values within threshold range
|
||||
*/
|
||||
static below(value: number, color?: string): TableThreshold;
|
||||
/**
|
||||
* A threshold for highlighting and coloring cells within the specified values
|
||||
*
|
||||
* @param lowerBound lower bound of threshold range
|
||||
* @param upperBound upper bound of threshold range
|
||||
* @param color cell color for values within threshold range
|
||||
*/
|
||||
static between(lowerBound: number, upperBound: number, color?: string): TableThreshold;
|
||||
private readonly lowerBound;
|
||||
private readonly upperBound?;
|
||||
private readonly color?;
|
||||
private readonly comparator?;
|
||||
private constructor();
|
||||
toJson(): any;
|
||||
}
|
||||
/**
|
||||
* Properties for a TableWidget
|
||||
*/
|
||||
export interface TableWidgetProps extends MetricWidgetProps {
|
||||
/**
|
||||
* Table layout
|
||||
*
|
||||
* @default - TableLayout.HORIZONTAL
|
||||
*/
|
||||
readonly layout?: TableLayout;
|
||||
/**
|
||||
* Properties for displaying summary columns
|
||||
*
|
||||
* @default - no summary columns are shown
|
||||
*/
|
||||
readonly summary?: TableSummaryProps;
|
||||
/**
|
||||
* Thresholds for highlighting table cells
|
||||
*
|
||||
* @default - No thresholds
|
||||
*/
|
||||
readonly thresholds?: TableThreshold[];
|
||||
/**
|
||||
* Show the metrics units in the label column
|
||||
*
|
||||
* @default - false
|
||||
*/
|
||||
readonly showUnitsInLabel?: boolean;
|
||||
/**
|
||||
* Metrics to display in the table
|
||||
*
|
||||
* @default - No metrics
|
||||
*/
|
||||
readonly metrics?: IMetric[];
|
||||
/**
|
||||
* Whether the graph should show live data
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly liveData?: boolean;
|
||||
/**
|
||||
* Whether to show as many digits as can fit, before rounding.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly fullPrecision?: boolean;
|
||||
/**
|
||||
* Whether to show the value from the entire time range. Only applicable for Bar and Pie charts.
|
||||
*
|
||||
* If false, values will be from the most recent period of your chosen time range;
|
||||
* if true, shows the value from the entire time range.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly setPeriodToTimeRange?: boolean;
|
||||
/**
|
||||
* The default period for all metrics in this widget.
|
||||
* The period is the length of time represented by one data point on the graph.
|
||||
* This default can be overridden within each metric definition.
|
||||
*
|
||||
* @default cdk.Duration.seconds(300)
|
||||
*/
|
||||
readonly period?: cdk.Duration;
|
||||
/**
|
||||
* The default statistic to be displayed for each metric.
|
||||
* This default can be overridden within the definition of each individual metric
|
||||
*
|
||||
* @default - The statistic for each metric is used
|
||||
*/
|
||||
readonly statistic?: string;
|
||||
/**
|
||||
* The start of the time range to use for each widget independently from those of the dashboard.
|
||||
* You can specify start without specifying end to specify a relative time range that ends with the current time.
|
||||
* In this case, the value of start must begin with -P, and you can use M, H, D, W and M as abbreviations for
|
||||
* minutes, hours, days, weeks and months. For example, -PT8H shows the last 8 hours and -P3M shows the last three months.
|
||||
* You can also use start along with an end field, to specify an absolute time range.
|
||||
* When specifying an absolute time range, use the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
|
||||
*
|
||||
* @default When the dashboard loads, the start time will be the default time range.
|
||||
*/
|
||||
readonly start?: string;
|
||||
/**
|
||||
* The end of the time range to use for each widget independently from those of the dashboard.
|
||||
* If you specify a value for end, you must also specify a value for start.
|
||||
* Specify an absolute time in the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
|
||||
*
|
||||
* @default When the dashboard loads, the end date will be the current time.
|
||||
*/
|
||||
readonly end?: string;
|
||||
}
|
||||
/**
|
||||
* A dashboard widget that displays metrics
|
||||
*/
|
||||
export declare class TableWidget extends ConcreteWidget {
|
||||
private readonly props;
|
||||
private readonly metrics;
|
||||
constructor(props: TableWidgetProps);
|
||||
/**
|
||||
* Add another metric
|
||||
*
|
||||
* @param metric the metric to add
|
||||
*/
|
||||
addMetric(metric: IMetric): void;
|
||||
toJson(): any[];
|
||||
}
|
||||
/**
|
||||
* Properties for a SingleValueWidget
|
||||
*/
|
||||
export interface SingleValueWidgetProps extends MetricWidgetProps {
|
||||
/**
|
||||
* Metrics to display
|
||||
*/
|
||||
readonly metrics: IMetric[];
|
||||
/**
|
||||
* The default period for all metrics in this widget.
|
||||
* The period is the length of time represented by one data point on the graph.
|
||||
* This default can be overridden within each metric definition.
|
||||
*
|
||||
* @default cdk.Duration.seconds(300)
|
||||
*/
|
||||
readonly period?: cdk.Duration;
|
||||
/**
|
||||
* Whether to show the value from the entire time range.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly setPeriodToTimeRange?: boolean;
|
||||
/**
|
||||
* Whether to show as many digits as can fit, before rounding.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly fullPrecision?: boolean;
|
||||
/**
|
||||
* Whether to show a graph below the value illustrating the value for the whole time range.
|
||||
* Cannot be used in combination with `setPeriodToTimeRange`
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly sparkline?: boolean;
|
||||
/**
|
||||
* The start of the time range to use for each widget independently from those of the dashboard.
|
||||
* You can specify start without specifying end to specify a relative time range that ends with the current time.
|
||||
* In this case, the value of start must begin with -P, and you can use M, H, D, W and M as abbreviations for
|
||||
* minutes, hours, days, weeks and months. For example, -PT8H shows the last 8 hours and -P3M shows the last three months.
|
||||
* You can also use start along with an end field, to specify an absolute time range.
|
||||
* When specifying an absolute time range, use the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
|
||||
*
|
||||
* @default When the dashboard loads, the start time will be the default time range.
|
||||
*/
|
||||
readonly start?: string;
|
||||
/**
|
||||
* The end of the time range to use for each widget independently from those of the dashboard.
|
||||
* If you specify a value for end, you must also specify a value for start.
|
||||
* Specify an absolute time in the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
|
||||
*
|
||||
* @default When the dashboard loads, the end date will be the current time.
|
||||
*/
|
||||
readonly end?: string;
|
||||
}
|
||||
/**
|
||||
* A dashboard widget that displays the most recent value for every metric
|
||||
*/
|
||||
export declare class SingleValueWidget extends ConcreteWidget {
|
||||
private readonly props;
|
||||
constructor(props: SingleValueWidgetProps);
|
||||
toJson(): any[];
|
||||
}
|
||||
/**
|
||||
* The properties for a CustomWidget
|
||||
*/
|
||||
export interface CustomWidgetProps {
|
||||
/**
|
||||
* The Arn of the AWS Lambda function that returns HTML or JSON that will be displayed in the widget
|
||||
*/
|
||||
readonly functionArn: string;
|
||||
/**
|
||||
* Width of the widget, in a grid of 24 units wide
|
||||
*
|
||||
* @default 6
|
||||
*/
|
||||
readonly width?: number;
|
||||
/**
|
||||
* Height of the widget
|
||||
*
|
||||
* @default - 6 for Alarm and Graph widgets.
|
||||
* 3 for single value widgets where most recent value of a metric is displayed.
|
||||
*/
|
||||
readonly height?: number;
|
||||
/**
|
||||
* The title of the widget
|
||||
*/
|
||||
readonly title: string;
|
||||
/**
|
||||
* Update the widget on refresh
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly updateOnRefresh?: boolean;
|
||||
/**
|
||||
* Update the widget on resize
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly updateOnResize?: boolean;
|
||||
/**
|
||||
* Update the widget on time range change
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly updateOnTimeRangeChange?: boolean;
|
||||
/**
|
||||
* Parameters passed to the lambda function
|
||||
*
|
||||
* @default - no parameters are passed to the lambda function
|
||||
*/
|
||||
readonly params?: any;
|
||||
}
|
||||
/**
|
||||
* A CustomWidget shows the result of a AWS lambda function
|
||||
*/
|
||||
export declare class CustomWidget extends ConcreteWidget {
|
||||
private readonly props;
|
||||
constructor(props: CustomWidgetProps);
|
||||
toJson(): any[];
|
||||
}
|
||||
/**
|
||||
* Horizontal annotation to be added to a graph
|
||||
*/
|
||||
export interface HorizontalAnnotation {
|
||||
/**
|
||||
* The value of the annotation
|
||||
*/
|
||||
readonly value: number;
|
||||
/**
|
||||
* Label for the annotation
|
||||
*
|
||||
* @default - No label
|
||||
*/
|
||||
readonly label?: string;
|
||||
/**
|
||||
* The hex color code, prefixed with '#' (e.g. '#00ff00'), to be used for the annotation.
|
||||
* The `Color` class has a set of standard colors that can be used here.
|
||||
*
|
||||
* @default - Automatic color
|
||||
*/
|
||||
readonly color?: string;
|
||||
/**
|
||||
* Add shading above or below the annotation
|
||||
*
|
||||
* @default No shading
|
||||
*/
|
||||
readonly fill?: Shading;
|
||||
/**
|
||||
* Whether the annotation is visible
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly visible?: boolean;
|
||||
}
|
||||
/**
|
||||
* Vertical annotation to be added to a graph
|
||||
*/
|
||||
export interface VerticalAnnotation {
|
||||
/**
|
||||
* The date and time (in ISO 8601 format) in the graph where the vertical annotation line is to appear
|
||||
*/
|
||||
readonly date: string;
|
||||
/**
|
||||
* Label for the annotation
|
||||
*
|
||||
* @default - No label
|
||||
*/
|
||||
readonly label?: string;
|
||||
/**
|
||||
* The hex color code, prefixed with '#' (e.g. '#00ff00'), to be used for the annotation.
|
||||
* The `Color` class has a set of standard colors that can be used here.
|
||||
*
|
||||
* @default - Automatic color
|
||||
*/
|
||||
readonly color?: string;
|
||||
/**
|
||||
* Add shading before or after the annotation
|
||||
*
|
||||
* @default No shading
|
||||
*/
|
||||
readonly fill?: VerticalShading;
|
||||
/**
|
||||
* Whether the annotation is visible
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly visible?: boolean;
|
||||
}
|
||||
/**
|
||||
* Fill shading options that will be used with a horizontal annotation
|
||||
*/
|
||||
export declare enum Shading {
|
||||
/**
|
||||
* Don't add shading
|
||||
*/
|
||||
NONE = "none",
|
||||
/**
|
||||
* Add shading above the annotation
|
||||
*/
|
||||
ABOVE = "above",
|
||||
/**
|
||||
* Add shading below the annotation
|
||||
*/
|
||||
BELOW = "below"
|
||||
}
|
||||
/**
|
||||
* Fill shading options that will be used with a vertical annotation
|
||||
*/
|
||||
export declare enum VerticalShading {
|
||||
/**
|
||||
* Don't add shading
|
||||
*/
|
||||
NONE = "none",
|
||||
/**
|
||||
* Add shading before the annotation
|
||||
*/
|
||||
BEFORE = "before",
|
||||
/**
|
||||
* Add shading after the annotation
|
||||
*/
|
||||
AFTER = "after"
|
||||
}
|
||||
/**
|
||||
* A set of standard colours that can be used in annotations in a GraphWidget.
|
||||
*/
|
||||
export declare class Color {
|
||||
/** blue - hex #1f77b4 */
|
||||
static readonly BLUE = "#1f77b4";
|
||||
/** brown - hex #8c564b */
|
||||
static readonly BROWN = "#8c564b";
|
||||
/** green - hex #2ca02c */
|
||||
static readonly GREEN = "#2ca02c";
|
||||
/** grey - hex #7f7f7f */
|
||||
static readonly GREY = "#7f7f7f";
|
||||
/** orange - hex #ff7f0e */
|
||||
static readonly ORANGE = "#ff7f0e";
|
||||
/** pink - hex #e377c2 */
|
||||
static readonly PINK = "#e377c2";
|
||||
/** purple - hex #9467bd */
|
||||
static readonly PURPLE = "#9467bd";
|
||||
/** red - hex #d62728 */
|
||||
static readonly RED = "#d62728";
|
||||
private constructor();
|
||||
}
|
||||
/**
|
||||
* The position of the legend on a GraphWidget.
|
||||
*/
|
||||
export declare enum LegendPosition {
|
||||
/**
|
||||
* Legend appears below the graph (default).
|
||||
*/
|
||||
BOTTOM = "bottom",
|
||||
/**
|
||||
* Add shading above the annotation
|
||||
*/
|
||||
RIGHT = "right",
|
||||
/**
|
||||
* Add shading below the annotation
|
||||
*/
|
||||
HIDDEN = "hidden"
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/graph.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/graph.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
17
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/index.d.ts
generated
vendored
Normal file
17
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
export * from './alarm';
|
||||
export * from './alarm-action';
|
||||
export * from './alarm-base';
|
||||
export * from './alarm-rule';
|
||||
export * from './composite-alarm';
|
||||
export * from './dashboard';
|
||||
export * from './graph';
|
||||
export * from './layout';
|
||||
export * from './metric';
|
||||
export * from './metric-types';
|
||||
export * from './log-query';
|
||||
export * from './text';
|
||||
export * from './widget';
|
||||
export * from './alarm-status-widget';
|
||||
export * from './stats';
|
||||
export * from './variable';
|
||||
export * from './cloudwatch.generated';
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/index.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/index.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
89
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/layout.d.ts
generated
vendored
Normal file
89
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/layout.d.ts
generated
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
import type { IWidget } from './widget';
|
||||
/**
|
||||
* A widget that contains other widgets in a horizontal row
|
||||
*
|
||||
* Widgets will be laid out next to each other
|
||||
*/
|
||||
export declare class Row implements IWidget {
|
||||
/**
|
||||
* Same as width, but writable inside class methods
|
||||
*/
|
||||
private _width;
|
||||
/**
|
||||
* Same as height, but writable inside class methods
|
||||
*/
|
||||
private _height;
|
||||
/**
|
||||
* List of contained widgets
|
||||
*/
|
||||
readonly widgets: IWidget[];
|
||||
/**
|
||||
* Relative position of each widget inside this row
|
||||
*/
|
||||
private readonly offsets;
|
||||
constructor(...widgets: IWidget[]);
|
||||
get width(): number;
|
||||
get height(): number;
|
||||
private updateDimensions;
|
||||
/**
|
||||
* Add the widget to this container
|
||||
*/
|
||||
addWidget(w: IWidget): void;
|
||||
position(x: number, y: number): void;
|
||||
toJson(): any[];
|
||||
}
|
||||
/**
|
||||
* A widget that contains other widgets in a vertical column
|
||||
*
|
||||
* Widgets will be laid out next to each other
|
||||
*/
|
||||
export declare class Column implements IWidget {
|
||||
/**
|
||||
* Same as width, but writable inside class methods
|
||||
*/
|
||||
private _width;
|
||||
/**
|
||||
* Same as height, but writable inside class methods
|
||||
*/
|
||||
private _height;
|
||||
/**
|
||||
* List of contained widgets
|
||||
*/
|
||||
readonly widgets: IWidget[];
|
||||
constructor(...widgets: IWidget[]);
|
||||
get width(): number;
|
||||
get height(): number;
|
||||
/**
|
||||
* Add the widget to this container
|
||||
*/
|
||||
addWidget(w: IWidget): void;
|
||||
position(x: number, y: number): void;
|
||||
toJson(): any[];
|
||||
}
|
||||
/**
|
||||
* Props of the spacer
|
||||
*/
|
||||
export interface SpacerProps {
|
||||
/**
|
||||
* Width of the spacer
|
||||
*
|
||||
* @default 1
|
||||
*/
|
||||
readonly width?: number;
|
||||
/**
|
||||
* Height of the spacer
|
||||
*
|
||||
* @default: 1
|
||||
*/
|
||||
readonly height?: number;
|
||||
}
|
||||
/**
|
||||
* A widget that doesn't display anything but takes up space
|
||||
*/
|
||||
export declare class Spacer implements IWidget {
|
||||
readonly width: number;
|
||||
readonly height: number;
|
||||
constructor(props?: SpacerProps);
|
||||
position(_x: number, _y: number): void;
|
||||
toJson(): any[];
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/layout.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/layout.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Spacer=exports.Column=exports.Row=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var widget_1=()=>{var tmp=require("./widget");return widget_1=()=>tmp,tmp};class Row{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudwatch.Row",version:"2.252.0"};_width;_height;widgets;offsets=[];constructor(...widgets){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_IWidget(widgets)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,Row),error}this.widgets=widgets,this._width=0,this._height=0;let x=0,y=0;for(const widget of widgets)x+widget.width>widget_1().GRID_WIDTH&&(y=this._height,x=0),this.updateDimensions(x,y,widget),x+=widget.width}get width(){return this._width}get height(){return this._height}updateDimensions(x,y,widget){this.offsets.push({x,y}),this._width=Math.max(this.width,x+widget.width),this._height=Math.max(this.height,y+widget.height)}addWidget(w){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_IWidget(w)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addWidget),error}this.widgets.push(w);let x=this.width,y=this.height;x+w.width>widget_1().GRID_WIDTH&&(y=this.height,x=0),this.updateDimensions(x,y,w)}position(x,y){for(let i=0;i<this.widgets.length;i++)this.widgets[i].position(x+this.offsets[i].x,y+this.offsets[i].y)}toJson(){const ret=[];for(const widget of this.widgets)ret.push(...widget.toJson());return ret}}exports.Row=Row;class Column{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudwatch.Column",version:"2.252.0"};_width;_height;widgets;constructor(...widgets){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_IWidget(widgets)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,Column),error}this.widgets=widgets,this._width=Math.max(...this.widgets.map(w=>w.width)),this._height=sum(...this.widgets.map(w=>w.height))}get width(){return this._width}get height(){return this._height}addWidget(w){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_IWidget(w)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addWidget),error}this.widgets.push(w),this._width=Math.max(this.width,w.width),this._height+=w.height}position(x,y){let widgetY=y;for(const widget of this.widgets)widget.position(x,widgetY),widgetY+=widget.height}toJson(){const ret=[];for(const widget of this.widgets)ret.push(...widget.toJson());return ret}}exports.Column=Column;class Spacer{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudwatch.Spacer",version:"2.252.0"};width;height;constructor(props={}){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_SpacerProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,Spacer),error}this.width=props.width||1,this.height=props.height||1}position(_x,_y){}toJson(){return[]}}exports.Spacer=Spacer;function sum(...xs){let ret=0;for(const x of xs)ret+=x;return ret}
|
||||
119
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/log-query.d.ts
generated
vendored
Normal file
119
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/log-query.d.ts
generated
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
import { ConcreteWidget } from './widget';
|
||||
/**
|
||||
* Types of view
|
||||
*/
|
||||
export declare enum LogQueryVisualizationType {
|
||||
/**
|
||||
* Table view
|
||||
*/
|
||||
TABLE = "table",
|
||||
/**
|
||||
* Line view
|
||||
*/
|
||||
LINE = "line",
|
||||
/**
|
||||
* Stacked area view
|
||||
*/
|
||||
STACKEDAREA = "stackedarea",
|
||||
/**
|
||||
* Bar view
|
||||
*/
|
||||
BAR = "bar",
|
||||
/**
|
||||
* Pie view
|
||||
*/
|
||||
PIE = "pie"
|
||||
}
|
||||
/**
|
||||
* Logs Query Language
|
||||
*/
|
||||
export declare enum LogQueryLanguage {
|
||||
/** Logs Insights QL */
|
||||
LOGS_INSIGHTS = "Logs",
|
||||
/** OpenSearch SQL */
|
||||
SQL = "SQL",
|
||||
/** OpenSearch PPL */
|
||||
PPL = "PPL"
|
||||
}
|
||||
/**
|
||||
* Properties for a Query widget
|
||||
*/
|
||||
export interface LogQueryWidgetProps {
|
||||
/**
|
||||
* Title for the widget
|
||||
*
|
||||
* @default No title
|
||||
*/
|
||||
readonly title?: string;
|
||||
/**
|
||||
* Names of log groups to query
|
||||
*/
|
||||
readonly logGroupNames: string[];
|
||||
/**
|
||||
* Full query string for log insights
|
||||
*
|
||||
* Be sure to prepend every new line with a newline and pipe character
|
||||
* (`\n|`).
|
||||
*
|
||||
* @default - Exactly one of `queryString`, `queryLines` is required.
|
||||
*/
|
||||
readonly queryString?: string;
|
||||
/**
|
||||
* A sequence of lines to use to build the query
|
||||
*
|
||||
* The query will be built by joining the lines together using `\n|`.
|
||||
*
|
||||
* @default - Exactly one of `queryString`, `queryLines` is required.
|
||||
*/
|
||||
readonly queryLines?: string[];
|
||||
/**
|
||||
* The query language to use for the query.
|
||||
* @default LogQueryLanguage.LOGS_INSIGHTS
|
||||
*/
|
||||
readonly queryLanguage?: LogQueryLanguage;
|
||||
/**
|
||||
* The region the metrics of this widget should be taken from
|
||||
*
|
||||
* @default Current region
|
||||
*/
|
||||
readonly region?: string;
|
||||
/**
|
||||
* The type of view to use
|
||||
*
|
||||
* @default LogQueryVisualizationType.TABLE
|
||||
*/
|
||||
readonly view?: LogQueryVisualizationType;
|
||||
/**
|
||||
* Width of the widget, in a grid of 24 units wide
|
||||
*
|
||||
* @default 6
|
||||
*/
|
||||
readonly width?: number;
|
||||
/**
|
||||
* Height of the widget
|
||||
*
|
||||
* @default 6
|
||||
*/
|
||||
readonly height?: number;
|
||||
/**
|
||||
* The AWS account ID where the log groups are located.
|
||||
*
|
||||
* This enables cross-account functionality for CloudWatch dashboards.
|
||||
* Before using this feature, ensure that proper cross-account sharing is configured
|
||||
* between the monitoring account and source account.
|
||||
*
|
||||
* For more information, see:
|
||||
* https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
||||
*
|
||||
* @default - Current account
|
||||
*/
|
||||
readonly accountId?: string;
|
||||
}
|
||||
/**
|
||||
* Display query results from Logs Insights
|
||||
*/
|
||||
export declare class LogQueryWidget extends ConcreteWidget {
|
||||
private readonly props;
|
||||
constructor(props: LogQueryWidgetProps);
|
||||
toJson(): any[];
|
||||
}
|
||||
2
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/log-query.js
generated
vendored
Normal file
2
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/log-query.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LogQueryWidget=exports.LogQueryLanguage=exports.LogQueryVisualizationType=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var widget_1=()=>{var tmp=require("./widget");return widget_1=()=>tmp,tmp},cdk=()=>{var tmp=require("../../core");return cdk=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},LogQueryVisualizationType;(function(LogQueryVisualizationType2){LogQueryVisualizationType2.TABLE="table",LogQueryVisualizationType2.LINE="line",LogQueryVisualizationType2.STACKEDAREA="stackedarea",LogQueryVisualizationType2.BAR="bar",LogQueryVisualizationType2.PIE="pie"})(LogQueryVisualizationType||(exports.LogQueryVisualizationType=LogQueryVisualizationType={}));var LogQueryLanguage;(function(LogQueryLanguage2){LogQueryLanguage2.LOGS_INSIGHTS="Logs",LogQueryLanguage2.SQL="SQL",LogQueryLanguage2.PPL="PPL"})(LogQueryLanguage||(exports.LogQueryLanguage=LogQueryLanguage={}));class LogQueryWidget extends widget_1().ConcreteWidget{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudwatch.LogQueryWidget",version:"2.252.0"};props;constructor(props){super(props.width||6,props.height||6);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_LogQueryWidgetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,LogQueryWidget),error}if(this.props=props,props.logGroupNames.length===0)throw new(cdk()).UnscopedValidationError((0,literal_string_1().lit)`AtLeastOneLogGroupRequired`,"Specify at least one log group name.");if(!!props.queryString==!!props.queryLines)throw new(cdk()).UnscopedValidationError((0,literal_string_1().lit)`ExactlyOneQueryStringOrLines`,"Specify exactly one of 'queryString' and 'queryLines'")}toJson(){const sources=this.props.logGroupNames.map(l=>`SOURCE '${l}'`).join(" | "),query=this.props.queryLines?this.props.queryLines.join(`
|
||||
| `):this.props.queryString,properties={view:this.props.view?this.props.view:LogQueryVisualizationType.TABLE,title:this.props.title,region:this.props.region||cdk().Aws.REGION,accountId:this.props.accountId,query:`${sources} | ${query}`};return this.props.queryLanguage&&(properties.queryLanguage=this.props.queryLanguage),(this.props.view===LogQueryVisualizationType.LINE||this.props.view===LogQueryVisualizationType.STACKEDAREA)&&(properties.view="timeSeries",properties.stacked=this.props.view===LogQueryVisualizationType.STACKEDAREA),[{type:"log",width:this.width,height:this.height,x:this.x,y:this.y,properties}]}}exports.LogQueryWidget=LogQueryWidget;
|
||||
316
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/metric-types.d.ts
generated
vendored
Normal file
316
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/metric-types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,316 @@
|
||||
import type { Duration } from '../../core';
|
||||
/**
|
||||
* Interface for metrics
|
||||
*/
|
||||
export interface IMetric {
|
||||
/**
|
||||
* Any warnings related to this metric
|
||||
*
|
||||
* Should be attached to the consuming construct.
|
||||
*
|
||||
* @default - None
|
||||
* @deprecated - use warningsV2
|
||||
*/
|
||||
readonly warnings?: string[];
|
||||
/**
|
||||
* Any warnings related to this metric
|
||||
*
|
||||
* Should be attached to the consuming construct.
|
||||
*
|
||||
* @default - None
|
||||
*/
|
||||
readonly warningsV2?: {
|
||||
[id: string]: string;
|
||||
};
|
||||
/**
|
||||
* Inspect the details of the metric object
|
||||
*/
|
||||
toMetricConfig(): MetricConfig;
|
||||
}
|
||||
/**
|
||||
* Metric dimension
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-dimension.html
|
||||
*/
|
||||
export interface Dimension {
|
||||
/**
|
||||
* Name of the dimension
|
||||
*/
|
||||
readonly name: string;
|
||||
/**
|
||||
* Value of the dimension
|
||||
*/
|
||||
readonly value: any;
|
||||
}
|
||||
/**
|
||||
* Statistic to use over the aggregation period
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html
|
||||
* @deprecated Use one of the factory methods on `Stats` to produce statistics strings
|
||||
*/
|
||||
export declare enum Statistic {
|
||||
/**
|
||||
* The count (number) of data points used for the statistical calculation.
|
||||
*/
|
||||
SAMPLE_COUNT = "SampleCount",
|
||||
/**
|
||||
* The value of Sum / SampleCount during the specified period.
|
||||
*/
|
||||
AVERAGE = "Average",
|
||||
/**
|
||||
* All values submitted for the matching metric added together.
|
||||
* This statistic can be useful for determining the total volume of a metric.
|
||||
*/
|
||||
SUM = "Sum",
|
||||
/**
|
||||
* The lowest value observed during the specified period.
|
||||
* You can use this value to determine low volumes of activity for your application.
|
||||
*/
|
||||
MINIMUM = "Minimum",
|
||||
/**
|
||||
* The highest value observed during the specified period.
|
||||
* You can use this value to determine high volumes of activity for your application.
|
||||
*/
|
||||
MAXIMUM = "Maximum"
|
||||
}
|
||||
/**
|
||||
* Unit for metric
|
||||
*/
|
||||
export declare enum Unit {
|
||||
/**
|
||||
* Seconds
|
||||
*/
|
||||
SECONDS = "Seconds",
|
||||
/**
|
||||
* Microseconds
|
||||
*/
|
||||
MICROSECONDS = "Microseconds",
|
||||
/**
|
||||
* Milliseconds
|
||||
*/
|
||||
MILLISECONDS = "Milliseconds",
|
||||
/**
|
||||
* Bytes
|
||||
*/
|
||||
BYTES = "Bytes",
|
||||
/**
|
||||
* Kilobytes
|
||||
*/
|
||||
KILOBYTES = "Kilobytes",
|
||||
/**
|
||||
* Megabytes
|
||||
*/
|
||||
MEGABYTES = "Megabytes",
|
||||
/**
|
||||
* Gigabytes
|
||||
*/
|
||||
GIGABYTES = "Gigabytes",
|
||||
/**
|
||||
* Terabytes
|
||||
*/
|
||||
TERABYTES = "Terabytes",
|
||||
/**
|
||||
* Bits
|
||||
*/
|
||||
BITS = "Bits",
|
||||
/**
|
||||
* Kilobits
|
||||
*/
|
||||
KILOBITS = "Kilobits",
|
||||
/**
|
||||
* Megabits
|
||||
*/
|
||||
MEGABITS = "Megabits",
|
||||
/**
|
||||
* Gigabits
|
||||
*/
|
||||
GIGABITS = "Gigabits",
|
||||
/**
|
||||
* Terabits
|
||||
*/
|
||||
TERABITS = "Terabits",
|
||||
/**
|
||||
* Percent
|
||||
*/
|
||||
PERCENT = "Percent",
|
||||
/**
|
||||
* Count
|
||||
*/
|
||||
COUNT = "Count",
|
||||
/**
|
||||
* Bytes/second (B/s)
|
||||
*/
|
||||
BYTES_PER_SECOND = "Bytes/Second",
|
||||
/**
|
||||
* Kilobytes/second (kB/s)
|
||||
*/
|
||||
KILOBYTES_PER_SECOND = "Kilobytes/Second",
|
||||
/**
|
||||
* Megabytes/second (MB/s)
|
||||
*/
|
||||
MEGABYTES_PER_SECOND = "Megabytes/Second",
|
||||
/**
|
||||
* Gigabytes/second (GB/s)
|
||||
*/
|
||||
GIGABYTES_PER_SECOND = "Gigabytes/Second",
|
||||
/**
|
||||
* Terabytes/second (TB/s)
|
||||
*/
|
||||
TERABYTES_PER_SECOND = "Terabytes/Second",
|
||||
/**
|
||||
* Bits/second (b/s)
|
||||
*/
|
||||
BITS_PER_SECOND = "Bits/Second",
|
||||
/**
|
||||
* Kilobits/second (kb/s)
|
||||
*/
|
||||
KILOBITS_PER_SECOND = "Kilobits/Second",
|
||||
/**
|
||||
* Megabits/second (Mb/s)
|
||||
*/
|
||||
MEGABITS_PER_SECOND = "Megabits/Second",
|
||||
/**
|
||||
* Gigabits/second (Gb/s)
|
||||
*/
|
||||
GIGABITS_PER_SECOND = "Gigabits/Second",
|
||||
/**
|
||||
* Terabits/second (Tb/s)
|
||||
*/
|
||||
TERABITS_PER_SECOND = "Terabits/Second",
|
||||
/**
|
||||
* Count/second
|
||||
*/
|
||||
COUNT_PER_SECOND = "Count/Second",
|
||||
/**
|
||||
* None
|
||||
*/
|
||||
NONE = "None"
|
||||
}
|
||||
/**
|
||||
* Properties of a rendered metric
|
||||
*/
|
||||
export interface MetricConfig {
|
||||
/**
|
||||
* In case the metric represents a query, the details of the query
|
||||
*
|
||||
* @default - None
|
||||
*/
|
||||
readonly metricStat?: MetricStatConfig;
|
||||
/**
|
||||
* In case the metric is a math expression, the details of the math expression
|
||||
*
|
||||
* @default - None
|
||||
*/
|
||||
readonly mathExpression?: MetricExpressionConfig;
|
||||
/**
|
||||
* In case the metric is a search expression, the details of the search expression
|
||||
*
|
||||
* @default - None
|
||||
*/
|
||||
readonly searchExpression?: MetricExpressionConfig;
|
||||
/**
|
||||
* Additional properties which will be rendered if the metric is used in a dashboard
|
||||
*
|
||||
* Examples are 'label' and 'color', but any key in here will be
|
||||
* added to dashboard graphs.
|
||||
*
|
||||
* @default - None
|
||||
*/
|
||||
readonly renderingProperties?: Record<string, unknown>;
|
||||
}
|
||||
/**
|
||||
* Properties for a concrete metric
|
||||
*
|
||||
* NOTE: `unit` is no longer on this object since it is only used for `Alarms`, and doesn't mean what one
|
||||
* would expect it to mean there anyway. It is most likely to be misused.
|
||||
*/
|
||||
export interface MetricStatConfig {
|
||||
/**
|
||||
* The dimensions to apply to the alarm
|
||||
*
|
||||
* @default []
|
||||
*/
|
||||
readonly dimensions?: Dimension[];
|
||||
/**
|
||||
* Namespace of the metric
|
||||
*/
|
||||
readonly namespace: string;
|
||||
/**
|
||||
* Name of the metric
|
||||
*/
|
||||
readonly metricName: string;
|
||||
/**
|
||||
* How many seconds to aggregate over
|
||||
*/
|
||||
readonly period: Duration;
|
||||
/**
|
||||
* Aggregation function to use (can be either simple or a percentile)
|
||||
*/
|
||||
readonly statistic: string;
|
||||
/**
|
||||
* Unit used to filter the metric stream
|
||||
*
|
||||
* Only refer to datums emitted to the metric stream with the given unit and
|
||||
* ignore all others. Only useful when datums are being emitted to the same
|
||||
* metric stream under different units.
|
||||
*
|
||||
* This field has been renamed from plain `unit` to clearly communicate
|
||||
* its purpose.
|
||||
*
|
||||
* @default - Refer to all metric datums
|
||||
*/
|
||||
readonly unitFilter?: Unit;
|
||||
/**
|
||||
* Region which this metric comes from.
|
||||
*
|
||||
* @default Deployment region.
|
||||
*/
|
||||
readonly region?: string;
|
||||
/**
|
||||
* Account which this metric comes from.
|
||||
*
|
||||
* @default Deployment account.
|
||||
*/
|
||||
readonly account?: string;
|
||||
/**
|
||||
* Region set directly on the metric, not inherited from the attached stack.
|
||||
*
|
||||
* @default No override.
|
||||
*/
|
||||
readonly regionOverride?: string;
|
||||
/**
|
||||
* Account set directly on the metric, not inherited from the attached stack.
|
||||
*
|
||||
* @default No override.
|
||||
*/
|
||||
readonly accountOverride?: string;
|
||||
}
|
||||
/**
|
||||
* Properties for a concrete metric
|
||||
*/
|
||||
export interface MetricExpressionConfig {
|
||||
/**
|
||||
* Math expression for the metric.
|
||||
*/
|
||||
readonly expression: string;
|
||||
/**
|
||||
* Metrics used in the math expression
|
||||
*/
|
||||
readonly usingMetrics: Record<string, IMetric>;
|
||||
/**
|
||||
* How many seconds to aggregate over
|
||||
*/
|
||||
readonly period: number;
|
||||
/**
|
||||
* Account to evaluate search expressions within.
|
||||
*
|
||||
* @default - Deployment account.
|
||||
*/
|
||||
readonly searchAccount?: string;
|
||||
/**
|
||||
* Region to evaluate search expressions within.
|
||||
*
|
||||
* @default - Deployment region.
|
||||
*/
|
||||
readonly searchRegion?: string;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/metric-types.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/metric-types.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Unit=exports.Statistic=void 0;var Statistic;(function(Statistic2){Statistic2.SAMPLE_COUNT="SampleCount",Statistic2.AVERAGE="Average",Statistic2.SUM="Sum",Statistic2.MINIMUM="Minimum",Statistic2.MAXIMUM="Maximum"})(Statistic||(exports.Statistic=Statistic={}));var Unit;(function(Unit2){Unit2.SECONDS="Seconds",Unit2.MICROSECONDS="Microseconds",Unit2.MILLISECONDS="Milliseconds",Unit2.BYTES="Bytes",Unit2.KILOBYTES="Kilobytes",Unit2.MEGABYTES="Megabytes",Unit2.GIGABYTES="Gigabytes",Unit2.TERABYTES="Terabytes",Unit2.BITS="Bits",Unit2.KILOBITS="Kilobits",Unit2.MEGABITS="Megabits",Unit2.GIGABITS="Gigabits",Unit2.TERABITS="Terabits",Unit2.PERCENT="Percent",Unit2.COUNT="Count",Unit2.BYTES_PER_SECOND="Bytes/Second",Unit2.KILOBYTES_PER_SECOND="Kilobytes/Second",Unit2.MEGABYTES_PER_SECOND="Megabytes/Second",Unit2.GIGABYTES_PER_SECOND="Gigabytes/Second",Unit2.TERABYTES_PER_SECOND="Terabytes/Second",Unit2.BITS_PER_SECOND="Bits/Second",Unit2.KILOBITS_PER_SECOND="Kilobits/Second",Unit2.MEGABITS_PER_SECOND="Megabits/Second",Unit2.GIGABITS_PER_SECOND="Gigabits/Second",Unit2.TERABITS_PER_SECOND="Terabits/Second",Unit2.COUNT_PER_SECOND="Count/Second",Unit2.NONE="None"})(Unit||(exports.Unit=Unit={}));
|
||||
632
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/metric.d.ts
generated
vendored
Normal file
632
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/metric.d.ts
generated
vendored
Normal file
@@ -0,0 +1,632 @@
|
||||
import type { Construct, IConstruct } from 'constructs';
|
||||
import type { ComparisonOperator } from './alarm';
|
||||
import { Alarm } from './alarm';
|
||||
import type { IMetric, MetricConfig, Unit } from './metric-types';
|
||||
import type { CreateAlarmOptionsBase } from './private/alarm-options';
|
||||
import * as iam from '../../aws-iam';
|
||||
import * as cdk from '../../core';
|
||||
export type DimensionHash = {
|
||||
[dim: string]: any;
|
||||
};
|
||||
export type DimensionsMap = {
|
||||
[dim: string]: string;
|
||||
};
|
||||
/**
|
||||
* Options shared by most methods accepting metric options
|
||||
*/
|
||||
export interface CommonMetricOptions {
|
||||
/**
|
||||
* The period over which the specified statistic is applied.
|
||||
*
|
||||
* @default Duration.minutes(5)
|
||||
*/
|
||||
readonly period?: cdk.Duration;
|
||||
/**
|
||||
* What function to use for aggregating.
|
||||
*
|
||||
* Use the `aws_cloudwatch.Stats` helper class to construct valid input strings.
|
||||
*
|
||||
* Can be one of the following:
|
||||
*
|
||||
* - "Minimum" | "min"
|
||||
* - "Maximum" | "max"
|
||||
* - "Average" | "avg"
|
||||
* - "Sum" | "sum"
|
||||
* - "SampleCount | "n"
|
||||
* - "pNN.NN"
|
||||
* - "tmNN.NN" | "tm(NN.NN%:NN.NN%)"
|
||||
* - "iqm"
|
||||
* - "wmNN.NN" | "wm(NN.NN%:NN.NN%)"
|
||||
* - "tcNN.NN" | "tc(NN.NN%:NN.NN%)"
|
||||
* - "tsNN.NN" | "ts(NN.NN%:NN.NN%)"
|
||||
*
|
||||
* @default Average
|
||||
*/
|
||||
readonly statistic?: string;
|
||||
/**
|
||||
* Dimensions of the metric
|
||||
*
|
||||
* @default - No dimensions.
|
||||
*/
|
||||
readonly dimensionsMap?: DimensionsMap;
|
||||
/**
|
||||
* Unit used to filter the metric stream
|
||||
*
|
||||
* Only refer to datums emitted to the metric stream with the given unit and
|
||||
* ignore all others. Only useful when datums are being emitted to the same
|
||||
* metric stream under different units.
|
||||
*
|
||||
* The default is to use all matric datums in the stream, regardless of unit,
|
||||
* which is recommended in nearly all cases.
|
||||
*
|
||||
* CloudWatch does not honor this property for graphs.
|
||||
*
|
||||
* @default - All metric datums in the given metric stream
|
||||
*/
|
||||
readonly unit?: Unit;
|
||||
/**
|
||||
* Label for this metric when added to a Graph in a Dashboard
|
||||
*
|
||||
* You can use [dynamic labels](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html)
|
||||
* to show summary information about the entire displayed time series
|
||||
* in the legend. For example, if you use:
|
||||
*
|
||||
* ```
|
||||
* [max: ${MAX}] MyMetric
|
||||
* ```
|
||||
*
|
||||
* As the metric label, the maximum value in the visible range will
|
||||
* be shown next to the time series name in the graph's legend.
|
||||
*
|
||||
* @default - No label
|
||||
*/
|
||||
readonly label?: string;
|
||||
/**
|
||||
* The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph.
|
||||
* The `Color` class has a set of standard colors that can be used here.
|
||||
* @default - Automatic color
|
||||
*/
|
||||
readonly color?: string;
|
||||
/**
|
||||
* Unique identifier for this metric when used in dashboard widgets.
|
||||
*
|
||||
* The id can be used as a variable to represent this metric in math expressions.
|
||||
* Valid characters are letters, numbers, and underscore. The first character
|
||||
* must be a lowercase letter.
|
||||
*
|
||||
* @default - No ID
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* Whether this metric should be visible in dashboard graphs.
|
||||
*
|
||||
* Setting this to false is useful when you want to hide raw metrics
|
||||
* that are used in math expressions, and show only the expression results.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly visible?: boolean;
|
||||
/**
|
||||
* Account which this metric comes from.
|
||||
*
|
||||
* @default - Deployment account.
|
||||
*/
|
||||
readonly account?: string;
|
||||
/**
|
||||
* Region which this metric comes from.
|
||||
*
|
||||
* @default - Deployment region.
|
||||
*/
|
||||
readonly region?: string;
|
||||
/**
|
||||
* Account of the stack this metric is attached to.
|
||||
*
|
||||
* @default - Deployment account.
|
||||
*/
|
||||
readonly stackAccount?: string;
|
||||
/**
|
||||
* Region of the stack this metric is attached to.
|
||||
*
|
||||
* @default - Deployment region.
|
||||
*/
|
||||
readonly stackRegion?: string;
|
||||
}
|
||||
/**
|
||||
* Properties for a metric
|
||||
*/
|
||||
export interface MetricProps extends CommonMetricOptions {
|
||||
/**
|
||||
* Namespace of the metric.
|
||||
*/
|
||||
readonly namespace: string;
|
||||
/**
|
||||
* Name of the metric.
|
||||
*/
|
||||
readonly metricName: string;
|
||||
}
|
||||
/**
|
||||
* Properties of a metric that can be changed
|
||||
*/
|
||||
export interface MetricOptions extends CommonMetricOptions {
|
||||
}
|
||||
/**
|
||||
* Configurable options for MathExpressions
|
||||
*/
|
||||
export interface MathExpressionOptions {
|
||||
/**
|
||||
* Label for this expression when added to a Graph in a Dashboard
|
||||
*
|
||||
* If this expression evaluates to more than one time series (for
|
||||
* example, through the use of `METRICS()` or `SEARCH()` expressions),
|
||||
* each time series will appear in the graph using a combination of the
|
||||
* expression label and the individual metric label. Specify the empty
|
||||
* string (`''`) to suppress the expression label and only keep the
|
||||
* metric label.
|
||||
*
|
||||
* You can use [dynamic labels](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html)
|
||||
* to show summary information about the displayed time series
|
||||
* in the legend. For example, if you use:
|
||||
*
|
||||
* ```
|
||||
* [max: ${MAX}] MyMetric
|
||||
* ```
|
||||
*
|
||||
* As the metric label, the maximum value in the visible range will
|
||||
* be shown next to the time series name in the graph's legend. If the
|
||||
* math expression produces more than one time series, the maximum
|
||||
* will be shown for each individual time series produce by this
|
||||
* math expression.
|
||||
*
|
||||
* @default - Expression value is used as label
|
||||
*/
|
||||
readonly label?: string;
|
||||
/**
|
||||
* Color for this metric when added to a Graph in a Dashboard
|
||||
*
|
||||
* @default - Automatic color
|
||||
*/
|
||||
readonly color?: string;
|
||||
/**
|
||||
* The period over which the math expression's statistics are applied.
|
||||
*
|
||||
* This period overrides all periods in the metrics used in this
|
||||
* math expression.
|
||||
*
|
||||
* @default Duration.minutes(5)
|
||||
*/
|
||||
readonly period?: cdk.Duration;
|
||||
/**
|
||||
* Account to evaluate search expressions within.
|
||||
*
|
||||
* Specifying a searchAccount has no effect to the account used
|
||||
* for metrics within the expression (passed via usingMetrics).
|
||||
*
|
||||
* @default - Deployment account.
|
||||
*/
|
||||
readonly searchAccount?: string;
|
||||
/**
|
||||
* Region to evaluate search expressions within.
|
||||
*
|
||||
* Specifying a searchRegion has no effect to the region used
|
||||
* for metrics within the expression (passed via usingMetrics).
|
||||
*
|
||||
* @default - Deployment region.
|
||||
*/
|
||||
readonly searchRegion?: string;
|
||||
}
|
||||
/**
|
||||
* Properties for a MathExpression
|
||||
*/
|
||||
export interface MathExpressionProps extends MathExpressionOptions {
|
||||
/**
|
||||
* The expression defining the metric.
|
||||
*
|
||||
* When an expression contains a SEARCH function, it cannot be used
|
||||
* within an Alarm.
|
||||
*/
|
||||
readonly expression: string;
|
||||
/**
|
||||
* The metrics used in the expression, in a map.
|
||||
*
|
||||
* The key is the identifier that represents the given metric in the
|
||||
* expression, and the value is the actual Metric object.
|
||||
*
|
||||
* The `period` of each metric in `usingMetrics` is ignored and instead overridden
|
||||
* by the `period` specified for the `MathExpression` construct. Even if no `period`
|
||||
* is specified for the `MathExpression`, it will be overridden by the default
|
||||
* value (`Duration.minutes(5)`).
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* ```ts
|
||||
* declare const metrics: elbv2.IApplicationLoadBalancerMetrics;
|
||||
* new cloudwatch.MathExpression({
|
||||
* expression: 'm1+m2',
|
||||
* label: 'AlbErrors',
|
||||
* usingMetrics: {
|
||||
* m1: metrics.custom('HTTPCode_ELB_500_Count', {
|
||||
* period: Duration.minutes(1), // <- This period will be ignored
|
||||
* statistic: 'Sum',
|
||||
* label: 'HTTPCode_ELB_500_Count',
|
||||
* }),
|
||||
* m2: metrics.custom('HTTPCode_ELB_502_Count', {
|
||||
* period: Duration.minutes(1), // <- This period will be ignored
|
||||
* statistic: 'Sum',
|
||||
* label: 'HTTPCode_ELB_502_Count',
|
||||
* }),
|
||||
* },
|
||||
* period: Duration.minutes(3), // <- This overrides the period of each metric in `usingMetrics`
|
||||
* // (Even if not specified, it is overridden by the default value)
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* @default - Empty map.
|
||||
*/
|
||||
readonly usingMetrics?: Record<string, IMetric>;
|
||||
}
|
||||
/**
|
||||
* Configurable options for SearchExpressions
|
||||
*/
|
||||
export interface SearchExpressionOptions {
|
||||
/**
|
||||
* Label for this search expression when added to a Graph in a Dashboard.
|
||||
*
|
||||
* If this expression evaluates to more than one time series,
|
||||
* each time series will appear in the graph using a combination of the
|
||||
* expression label and the individual metric label. Specify the empty
|
||||
* string (`''`) to suppress the expression label and only keep the
|
||||
* metric label.
|
||||
*
|
||||
* You can use [dynamic labels](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html)
|
||||
* to show summary information about the displayed time series
|
||||
* in the legend. For example, if you use:
|
||||
*
|
||||
* ```
|
||||
* [max: ${MAX}] MyMetric
|
||||
* ```
|
||||
*
|
||||
* As the metric label, the maximum value in the visible range will
|
||||
* be shown next to the time series name in the graph's legend. If the
|
||||
* search expression produces more than one time series, the maximum
|
||||
* will be shown for each individual time series produce by this
|
||||
* search expression.
|
||||
*
|
||||
* @default - No label.
|
||||
*/
|
||||
readonly label?: string;
|
||||
/**
|
||||
* Color for the metric produced by the search expression.
|
||||
*
|
||||
* If the search expression produces more than one time series, the color is assigned to the first one.
|
||||
* Other metrics are assigned colors automatically.
|
||||
*
|
||||
* @default - Automatically assigned.
|
||||
*/
|
||||
readonly color?: string;
|
||||
/**
|
||||
* The period over which the search expression's statistics are applied.
|
||||
*
|
||||
* This period overrides the period defined within the search expression.
|
||||
*
|
||||
* @default Duration.minutes(5)
|
||||
*/
|
||||
readonly period?: cdk.Duration;
|
||||
/**
|
||||
* Account to evaluate search expressions within.
|
||||
*
|
||||
* @default - Deployment account.
|
||||
*/
|
||||
readonly searchAccount?: string;
|
||||
/**
|
||||
* Region to evaluate search expressions within.
|
||||
*
|
||||
* @default - Deployment region.
|
||||
*/
|
||||
readonly searchRegion?: string;
|
||||
}
|
||||
/**
|
||||
* Properties for a SearchExpression
|
||||
*/
|
||||
export interface SearchExpressionProps extends SearchExpressionOptions {
|
||||
/**
|
||||
* The search expression defining the metrics to be retrieved.
|
||||
*
|
||||
* A search expression cannot be used within an Alarm.
|
||||
*
|
||||
* A search expression allows you to retrieve and graph multiple related metrics in a single statement.
|
||||
* It can return up to 500 time series.
|
||||
*
|
||||
* Examples:
|
||||
* - `SEARCH('{AWS/EC2,InstanceId} CPUUtilization', 'Average', 300)`
|
||||
* - `SEARCH('{AWS/ApplicationELB,LoadBalancer} RequestCount', 'Sum', 60)`
|
||||
* - `SEARCH('{MyNamespace,ServiceName} Errors', 'Sum')`
|
||||
*
|
||||
* For more information about search expression syntax, see:
|
||||
* https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html
|
||||
*/
|
||||
readonly expression: string;
|
||||
}
|
||||
/**
|
||||
* A metric emitted by a service
|
||||
*
|
||||
* The metric is a combination of a metric identifier (namespace, name and dimensions)
|
||||
* and an aggregation function (statistic, period and unit).
|
||||
*
|
||||
* It also contains metadata which is used only in graphs, such as color and label.
|
||||
* It makes sense to embed this in here, so that compound constructs can attach
|
||||
* that metadata to metrics they expose.
|
||||
*
|
||||
* This class does not represent a resource, so hence is not a construct. Instead,
|
||||
* Metric is an abstraction that makes it easy to specify metrics for use in both
|
||||
* alarms and graphs.
|
||||
*/
|
||||
export declare class Metric implements IMetric {
|
||||
#private;
|
||||
/**
|
||||
* Creates an anomaly detection metric from the provided metric
|
||||
*
|
||||
* @param props The anomaly detection alarm properties
|
||||
* @returns An anomaly detection metric
|
||||
*/
|
||||
static anomalyDetectionFor(props: AnomalyDetectionMetricOptions): MathExpression;
|
||||
/**
|
||||
* Grant permissions to the given identity to write metrics.
|
||||
*
|
||||
* @param grantee The IAM identity to give permissions to.
|
||||
*/
|
||||
static grantPutMetricData(grantee: iam.IGrantable): iam.Grant;
|
||||
/** Dimensions of this metric */
|
||||
readonly dimensions?: DimensionHash;
|
||||
/** Namespace of this metric */
|
||||
readonly namespace: string;
|
||||
/** Name of this metric */
|
||||
readonly metricName: string;
|
||||
/** Period of this metric */
|
||||
readonly period: cdk.Duration;
|
||||
/** Statistic of this metric */
|
||||
readonly statistic: string;
|
||||
/** Label for this metric when added to a Graph in a Dashboard */
|
||||
readonly label?: string;
|
||||
/** The hex color code used when this metric is rendered on a graph. */
|
||||
readonly color?: string;
|
||||
/** Unique identifier for this metric when used in dashboard widgets. */
|
||||
readonly id?: string;
|
||||
/** Whether this metric should be visible in dashboard graphs. */
|
||||
readonly visible?: boolean;
|
||||
/** Unit of the metric. */
|
||||
readonly unit?: Unit;
|
||||
/**
|
||||
* Warnings attached to this metric.
|
||||
* @deprecated - use warningsV2
|
||||
**/
|
||||
readonly warnings?: string[];
|
||||
/** Warnings attached to this metric. */
|
||||
readonly warningsV2?: {
|
||||
[id: string]: string;
|
||||
};
|
||||
constructor(props: MetricProps);
|
||||
/**
|
||||
* Return a copy of Metric `with` properties changed.
|
||||
*
|
||||
* All properties except namespace and metricName can be changed.
|
||||
*
|
||||
* @param props The set of properties to change.
|
||||
*/
|
||||
with(props: MetricOptions): Metric;
|
||||
/**
|
||||
* Attach the metric object to the given construct scope
|
||||
*
|
||||
* Returns a Metric object that uses the account and region from the Stack
|
||||
* the given construct is defined in. If the metric is subsequently used
|
||||
* in a Dashboard or Alarm in a different Stack defined in a different
|
||||
* account or region, the appropriate 'region' and 'account' fields
|
||||
* will be added to it.
|
||||
*
|
||||
* If the scope we attach to is in an environment-agnostic stack,
|
||||
* nothing is done and the same Metric object is returned.
|
||||
*/
|
||||
attachTo(scope: IConstruct): Metric;
|
||||
/**
|
||||
* Account which this metric comes from.
|
||||
*/
|
||||
get account(): string | undefined;
|
||||
/**
|
||||
* Region which this metric comes from.
|
||||
*/
|
||||
get region(): string | undefined;
|
||||
toMetricConfig(): MetricConfig;
|
||||
/**
|
||||
* Make a new Alarm for this metric
|
||||
*
|
||||
* Combines both properties that may adjust the metric (aggregation) as well
|
||||
* as alarm properties.
|
||||
*/
|
||||
createAlarm(scope: Construct, id: string, props: CreateAlarmOptions): Alarm;
|
||||
toString(): string;
|
||||
/**
|
||||
* Return the dimensions of this Metric as a list of Dimension.
|
||||
*/
|
||||
private dimensionsAsList;
|
||||
private validateDimensions;
|
||||
}
|
||||
/**
|
||||
* A math expression built with metric(s) emitted by a service
|
||||
*
|
||||
* The math expression is a combination of an expression (x+y) and metrics to apply expression on.
|
||||
* It also contains metadata which is used only in graphs, such as color and label.
|
||||
* It makes sense to embed this in here, so that compound constructs can attach
|
||||
* that metadata to metrics they expose.
|
||||
*
|
||||
* MathExpression can also be used for search expressions. In this case,
|
||||
* it also optionally accepts a searchRegion and searchAccount property for cross-environment
|
||||
* search expressions.
|
||||
*
|
||||
* This class does not represent a resource, so hence is not a construct. Instead,
|
||||
* MathExpression is an abstraction that makes it easy to specify metrics for use in both
|
||||
* alarms and graphs.
|
||||
*/
|
||||
export declare class MathExpression implements IMetric {
|
||||
/**
|
||||
* The expression defining the metric.
|
||||
*/
|
||||
readonly expression: string;
|
||||
/**
|
||||
* The metrics used in the expression as KeyValuePair <id, metric>.
|
||||
*/
|
||||
readonly usingMetrics: Record<string, IMetric>;
|
||||
/**
|
||||
* Label for this metric when added to a Graph.
|
||||
*/
|
||||
readonly label?: string;
|
||||
/**
|
||||
* The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph.
|
||||
* The `Color` class has a set of standard colors that can be used here.
|
||||
*/
|
||||
readonly color?: string;
|
||||
/**
|
||||
* Aggregation period of this metric
|
||||
*/
|
||||
readonly period: cdk.Duration;
|
||||
/**
|
||||
* Account to evaluate search expressions within.
|
||||
*/
|
||||
readonly searchAccount?: string;
|
||||
/**
|
||||
* Region to evaluate search expressions within.
|
||||
*/
|
||||
readonly searchRegion?: string;
|
||||
/**
|
||||
* Warnings generated by this math expression
|
||||
* @deprecated - use warningsV2
|
||||
*/
|
||||
readonly warnings?: string[];
|
||||
/**
|
||||
* Warnings generated by this math expression
|
||||
*/
|
||||
readonly warningsV2?: {
|
||||
[id: string]: string;
|
||||
};
|
||||
constructor(props: MathExpressionProps);
|
||||
/**
|
||||
* Return a copy of Metric with properties changed.
|
||||
*
|
||||
* All properties except namespace and metricName can be changed.
|
||||
*
|
||||
* @param props The set of properties to change.
|
||||
*/
|
||||
with(props: MathExpressionOptions): MathExpression;
|
||||
toMetricConfig(): MetricConfig;
|
||||
/**
|
||||
* Make a new Alarm for this metric
|
||||
*
|
||||
* Combines both properties that may adjust the metric (aggregation) as well
|
||||
* as alarm properties.
|
||||
*/
|
||||
createAlarm(scope: Construct, id: string, props: CreateAlarmOptions): Alarm;
|
||||
toString(): string;
|
||||
private validateNoIdConflicts;
|
||||
}
|
||||
/**
|
||||
* A CloudWatch search expression for dynamically finding and graphing multiple related metrics.
|
||||
*
|
||||
* Search expressions allow you to search for and graph multiple related metrics from a single expression.
|
||||
* This is particularly useful in dynamic environments where the exact metric names or dimensions
|
||||
* may not be known at deployment time.
|
||||
*
|
||||
* Example:
|
||||
* ```ts
|
||||
* const searchExpression = new cloudwatch.SearchExpression({
|
||||
* expression: "SEARCH('{AWS/EC2,InstanceId} CPUUtilization', 'Average', 300)",
|
||||
* label: 'EC2 CPU Utilization',
|
||||
* period: Duration.minutes(5),
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* This class does not represent a resource, so hence is not a construct. Instead,
|
||||
* SearchExpression is an abstraction that makes it easy to specify metrics for use in graphs.
|
||||
*/
|
||||
export declare class SearchExpression implements IMetric {
|
||||
/**
|
||||
* The search expression defining the metrics to be retrieved.
|
||||
*/
|
||||
readonly expression: string;
|
||||
/**
|
||||
* The label is used as a prefix for the title of each metric returned by the search expression.
|
||||
*/
|
||||
readonly label?: string;
|
||||
/**
|
||||
* Hex color code (e.g. '#00ff00'), to use when rendering the resulting metrics in a graph.
|
||||
* If multiple time series are returned, color is assigned to the first metric, color for the other metrics is automatically assigned
|
||||
*/
|
||||
readonly color?: string;
|
||||
/**
|
||||
* The aggregation period for the metrics produced by the Search Expression.
|
||||
*/
|
||||
readonly period: cdk.Duration;
|
||||
/**
|
||||
* Account to evaluate search expressions within.
|
||||
*/
|
||||
readonly searchAccount?: string;
|
||||
/**
|
||||
* Region to evaluate search expressions within.
|
||||
*/
|
||||
readonly searchRegion?: string;
|
||||
/**
|
||||
* Warnings generated by this search expression
|
||||
* @deprecated - use warningsV2
|
||||
*/
|
||||
readonly warnings?: string[];
|
||||
/**
|
||||
* Warnings generated by this search expression
|
||||
*/
|
||||
readonly warningsV2?: {
|
||||
[id: string]: string;
|
||||
};
|
||||
constructor(props: SearchExpressionProps);
|
||||
/**
|
||||
* Return a copy of SearchExpression with properties changed.
|
||||
*
|
||||
* All properties except expression can be changed.
|
||||
*
|
||||
* @param props The set of properties to change.
|
||||
*/
|
||||
with(props: SearchExpressionOptions): SearchExpression;
|
||||
toMetricConfig(): MetricConfig;
|
||||
toString(): string;
|
||||
}
|
||||
/**
|
||||
* Properties needed to make an alarm from a metric
|
||||
*/
|
||||
export interface CreateAlarmOptions extends CreateAlarmOptionsBase {
|
||||
/**
|
||||
* Comparison to use to check if metric is breaching
|
||||
*
|
||||
* @default GreaterThanOrEqualToThreshold
|
||||
*/
|
||||
readonly comparisonOperator?: ComparisonOperator;
|
||||
/**
|
||||
* The value against which the specified statistic is compared.
|
||||
*/
|
||||
readonly threshold: number;
|
||||
}
|
||||
/**
|
||||
* Properties needed to make an anomaly detection alarm from a metric
|
||||
*/
|
||||
export interface AnomalyDetectionMetricOptions extends MathExpressionOptions {
|
||||
/**
|
||||
* The metric to add the alarm on
|
||||
*
|
||||
* Metric objects can be obtained from most resources, or you can construct
|
||||
* custom Metric objects by instantiating one.
|
||||
*/
|
||||
readonly metric: IMetric;
|
||||
/**
|
||||
* The number of standard deviations to use for the anomaly detection band. The higher the value, the wider the band.
|
||||
*
|
||||
* - Must be greater than 0. A value of 0 or negative values would not make sense in the context of calculating standard deviations.
|
||||
* - There is no strict maximum value defined, as standard deviations can theoretically extend infinitely. However, in practice, values beyond 5 or 6 standard deviations are rarely used, as they would result in an extremely wide anomaly detection band, potentially missing significant anomalies.
|
||||
*
|
||||
* @default 2
|
||||
*/
|
||||
readonly stdDevs?: number;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/metric.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/metric.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
55
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/alarm-options.d.ts
generated
vendored
Normal file
55
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/alarm-options.d.ts
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
import type * as cdk from '../../../core';
|
||||
import type { TreatMissingData } from '../alarm';
|
||||
/**
|
||||
* Base options for creating CloudWatch alarms
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
export interface CreateAlarmOptionsBase {
|
||||
/**
|
||||
* Name of the alarm
|
||||
*
|
||||
* @default Automatically generated name
|
||||
*/
|
||||
readonly alarmName?: string;
|
||||
/**
|
||||
* Description for the alarm
|
||||
*
|
||||
* @default No description
|
||||
*/
|
||||
readonly alarmDescription?: string;
|
||||
/**
|
||||
* The number of periods over which data is compared to the specified threshold.
|
||||
*/
|
||||
readonly evaluationPeriods: number;
|
||||
/**
|
||||
* Specifies whether to evaluate the data and potentially change the alarm state if there are too few data points to be statistically significant.
|
||||
*
|
||||
* Used only for alarms that are based on percentiles.
|
||||
*
|
||||
* @default - Not configured.
|
||||
*/
|
||||
readonly evaluateLowSampleCountPercentile?: string;
|
||||
/**
|
||||
* Sets how this alarm is to handle missing data points.
|
||||
*
|
||||
* @default TreatMissingData.Missing
|
||||
*/
|
||||
readonly treatMissingData?: TreatMissingData;
|
||||
/**
|
||||
* Whether the actions for this alarm are enabled
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly actionsEnabled?: boolean;
|
||||
/**
|
||||
* The number of datapoints that must be breaching to trigger the alarm. This is used only if you are setting an "M
|
||||
* out of N" alarm. In that case, this value is the M. For more information, see Evaluating an Alarm in the Amazon
|
||||
* CloudWatch User Guide.
|
||||
*
|
||||
* @default ``evaluationPeriods``
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation
|
||||
*/
|
||||
readonly datapointsToAlarm?: number;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/alarm-options.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/alarm-options.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
||||
8
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/anomaly-detection.d.ts
generated
vendored
Normal file
8
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/anomaly-detection.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { ComparisonOperator } from '../alarm';
|
||||
/**
|
||||
* Determine whether this operator is an anomaly detection operator.
|
||||
*
|
||||
* @param operator the comparison operator for the alarm.
|
||||
* @returns true if the operator is an anomaly detection operator, false otherwise.
|
||||
*/
|
||||
export declare function isAnomalyDetectionOperator(operator?: ComparisonOperator): boolean;
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/anomaly-detection.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/anomaly-detection.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isAnomalyDetectionOperator=isAnomalyDetectionOperator;var alarm_1=()=>{var tmp=require("../alarm");return alarm_1=()=>tmp,tmp};function isAnomalyDetectionOperator(operator){const anomalyDetectionOperators=[alarm_1().ComparisonOperator.LESS_THAN_LOWER_OR_GREATER_THAN_UPPER_THRESHOLD,alarm_1().ComparisonOperator.GREATER_THAN_UPPER_THRESHOLD,alarm_1().ComparisonOperator.LESS_THAN_LOWER_THRESHOLD];return operator!==void 0&&anomalyDetectionOperators.includes(operator)}
|
||||
14
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/drop-empty-object-at-the-end-of-an-array-token.d.ts
generated
vendored
Normal file
14
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/drop-empty-object-at-the-end-of-an-array-token.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import type * as cdk from '../../../core';
|
||||
/**
|
||||
* A Token object that will drop the last element of an array if it is an empty object
|
||||
*
|
||||
* Necessary to prevent options objects that only contain "region" and "account" keys
|
||||
* that evaluate to "undefined" from showing up in the rendered JSON.
|
||||
*/
|
||||
export declare class DropEmptyObjectAtTheEndOfAnArray implements cdk.IResolvable, cdk.IPostProcessor {
|
||||
private readonly value;
|
||||
readonly creationStack: string[];
|
||||
constructor(value: any);
|
||||
resolve(context: cdk.IResolveContext): any;
|
||||
postProcess(o: any, _context: cdk.IResolveContext): any;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/drop-empty-object-at-the-end-of-an-array-token.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/drop-empty-object-at-the-end-of-an-array-token.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DropEmptyObjectAtTheEndOfAnArray=void 0;var object_1=()=>{var tmp=require("./object");return object_1=()=>tmp,tmp};class DropEmptyObjectAtTheEndOfAnArray{value;creationStack=["Token stack traces are no longer captured"];constructor(value){this.value=value}resolve(context){return context.registerPostProcessor(this),context.resolve(this.value)}postProcess(o,_context){if(!Array.isArray(o))return o;const lastEl=o[o.length-1];return typeof lastEl=="object"&&lastEl!==null&&Object.keys((0,object_1().dropUndefined)(lastEl)).length===0?o.slice(0,o.length-1):o}}exports.DropEmptyObjectAtTheEndOfAnArray=DropEmptyObjectAtTheEndOfAnArray;
|
||||
8
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/env-tokens.d.ts
generated
vendored
Normal file
8
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/env-tokens.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Make a Token that renders to given region if used in a different stack, otherwise undefined
|
||||
*/
|
||||
export declare function regionIfDifferentFromStack(region: string): string;
|
||||
/**
|
||||
* Make a Token that renders to given account if used in a different stack, otherwise undefined
|
||||
*/
|
||||
export declare function accountIfDifferentFromStack(account: string): string;
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/env-tokens.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/env-tokens.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.regionIfDifferentFromStack=regionIfDifferentFromStack,exports.accountIfDifferentFromStack=accountIfDifferentFromStack;var cdk=()=>{var tmp=require("../../../core");return cdk=()=>tmp,tmp};function regionIfDifferentFromStack(region){return cdk().Token.asString(new StackDependentToken(region,stack=>stack.region))}function accountIfDifferentFromStack(account){return cdk().Token.asString(new StackDependentToken(account,stack=>stack.account))}class StackDependentToken{originalValue;fn;creationStack=["Token stack traces are no longer captured"];constructor(originalValue,fn){this.originalValue=originalValue,this.fn=fn}resolve(context){const stackValue=this.fn(cdk().Stack.of(context.scope));if(!(!cdk().Token.isUnresolved(stackValue)&&stackValue===this.originalValue))return this.originalValue}toString(){return cdk().Token.asString(this)}toJSON(){return this.originalValue}}
|
||||
4
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/make-enumerable.d.ts
generated
vendored
Normal file
4
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/make-enumerable.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Make a property from the specified prototype enumerable on the specific instance.
|
||||
*/
|
||||
export declare function makeEnumerable(prototype: object, instance: object, propertyKey: string): void;
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/make-enumerable.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/make-enumerable.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeEnumerable=makeEnumerable;function makeEnumerable(prototype,instance,propertyKey){Object.defineProperty(instance,propertyKey,{...Object.getOwnPropertyDescriptor(prototype,propertyKey),enumerable:!0})}
|
||||
72
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/metric-util.d.ts
generated
vendored
Normal file
72
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/metric-util.d.ts
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
import { Duration } from '../../../core';
|
||||
import type { IMetric, MetricConfig, MetricExpressionConfig, MetricStatConfig } from '../metric-types';
|
||||
/**
|
||||
* Return a unique string representation for this metric.
|
||||
*
|
||||
* Can be used to determine as a hash key to determine if 2 Metric objects
|
||||
* represent the same metric. Excludes rendering properties.
|
||||
*/
|
||||
export declare function metricKey(metric: IMetric): string;
|
||||
/**
|
||||
* Return the period of a metric
|
||||
*
|
||||
* For a stat metric, return the immediate period.
|
||||
*
|
||||
* For a math expression metric, all metrics used in it have been made to have the
|
||||
* same period, so we return the period of the first inner metric.
|
||||
*
|
||||
* For a search expression metric, return the period of the search expression.
|
||||
*/
|
||||
export declare function metricPeriod(metric: IMetric): Duration;
|
||||
/**
|
||||
* Given a metric object, inspect it and call the correct function for the type of output
|
||||
*
|
||||
* In addition to the metric object itself, takes a callback object with three
|
||||
* methods, to be invoked for the particular type of metric.
|
||||
*
|
||||
* If the metric represent a metric query (nominally generated through an
|
||||
* instantiation of `Metric` but can be generated by any class that implements
|
||||
* `IMetric`) a particular field in its `toMetricConfig()` output will be set
|
||||
* (to wit, `metricStat`) and the `withStat()` callback will be called with
|
||||
* that object.
|
||||
*
|
||||
* If the metric represents a math expression (usually by instantiating `MathExpression`
|
||||
* but users can implement `IMetric` arbitrarily) the `mathExpression` field
|
||||
* will be set in the object returned from `toMetricConfig` and the callback
|
||||
* called `withMathExpression` will be applied to that object.
|
||||
*
|
||||
* If the metric represents a search expression (usually by instantiating `SearchExpression`
|
||||
* but users can implement `IMetric` arbitrarily) the `searchExpression` field
|
||||
* will be set in the object returned from `toMetricConfig` and the callback
|
||||
* called `withSearchExpression` will be applied to that object.
|
||||
*
|
||||
* Will return the values returned by the callbacks.
|
||||
*
|
||||
* To be used as such:
|
||||
*
|
||||
* ```ts
|
||||
* const ret = dispatchMetric(someMetric, {
|
||||
* withStat(stat) {
|
||||
* // do something with stat
|
||||
* return 1;
|
||||
* },
|
||||
* withMathExpression(mathExpr) {
|
||||
* // do something with math expression
|
||||
* return 2;
|
||||
* },
|
||||
* withSearchExpression(searchExpr) {
|
||||
* // do something with search expression
|
||||
* return 3;
|
||||
* },
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* This function encapsulates some type analysis that would otherwise have to be
|
||||
* repeated in all places where code needs to make a distinction on the type
|
||||
* of metric object that is being passed.
|
||||
*/
|
||||
export declare function dispatchMetric<A, B, C>(metric: IMetric, fns: {
|
||||
withStat: (x: MetricStatConfig, c: MetricConfig) => A;
|
||||
withMathExpression: (x: MetricExpressionConfig, c: MetricConfig) => B;
|
||||
withSearchExpression: (x: MetricExpressionConfig, c: MetricConfig) => C;
|
||||
}): A | B | C;
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/metric-util.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/metric-util.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.metricKey=metricKey,exports.metricPeriod=metricPeriod,exports.dispatchMetric=dispatchMetric;var core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};const METRICKEY_SYMBOL=Symbol("@aws-cdk/aws-cloudwatch.MetricKey");function metricKey(metric){if(metric.hasOwnProperty(METRICKEY_SYMBOL))return metric[METRICKEY_SYMBOL];const parts=new Array,conf=metric.toMetricConfig();if(conf.mathExpression){parts.push(conf.mathExpression.expression);for(const id of Object.keys(conf.mathExpression.usingMetrics).sort())parts.push(id),parts.push(metricKey(conf.mathExpression.usingMetrics[id]));conf.mathExpression.searchRegion&&parts.push(conf.mathExpression.searchRegion),conf.mathExpression.searchAccount&&parts.push(conf.mathExpression.searchAccount)}if(conf.searchExpression&&(parts.push(conf.searchExpression.expression),conf.searchExpression.searchRegion&&parts.push(conf.searchExpression.searchRegion),conf.searchExpression.searchAccount&&parts.push(conf.searchExpression.searchAccount)),conf.metricStat){parts.push(conf.metricStat.namespace),parts.push(conf.metricStat.metricName);for(const dim of conf.metricStat.dimensions||[])parts.push(dim.name),parts.push(dim.value);conf.metricStat.statistic&&parts.push(conf.metricStat.statistic),conf.metricStat.period&&parts.push(`${conf.metricStat.period.toSeconds()}`),conf.metricStat.region&&parts.push(conf.metricStat.region),conf.metricStat.account&&parts.push(conf.metricStat.account)}const ret=parts.join("|");return Object.defineProperty(metric,METRICKEY_SYMBOL,{value:ret}),ret}function metricPeriod(metric){return dispatchMetric(metric,{withStat(stat){return stat.period},withMathExpression(){return metric.period||core_1().Duration.minutes(5)},withSearchExpression(){return metric.period||core_1().Duration.minutes(5)}})}function dispatchMetric(metric,fns){const conf=metric.toMetricConfig();if([conf.metricStat,conf.mathExpression,conf.searchExpression].map(Boolean).filter(Boolean).length>1)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`MetricObjectCannotProduceMultipleTypes`,"Metric object must not produce more than one of 'metricStat', 'mathExpression', or 'searchExpression'");if(conf.metricStat)return fns.withStat(conf.metricStat,conf);if(conf.mathExpression)return fns.withMathExpression(conf.mathExpression,conf);if(conf.searchExpression)return fns.withSearchExpression(conf.searchExpression,conf);throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`MetricObjectMustHaveOneType`,"Metric object must have either 'metricStat', 'mathExpression', or 'searchExpression'")}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/object.d.ts
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/object.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function dropUndefined<T extends object>(x: T): T;
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/object.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/object.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.dropUndefined=dropUndefined;function dropUndefined(x){if(x===null)return x;const ret={};for(const[key,value]of Object.entries(x))value!==void 0&&(ret[key]=value);return ret}
|
||||
67
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/rendering.d.ts
generated
vendored
Normal file
67
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/rendering.d.ts
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
import type { IMetric } from '../metric-types';
|
||||
/**
|
||||
* Return the JSON structure which represents these metrics in a graph.
|
||||
*
|
||||
* Depending on the metric type (stat or expression), one `Metric` object
|
||||
* can render to multiple time series.
|
||||
*
|
||||
* - Top-level metrics will be rendered visibly, additionally added metrics will
|
||||
* be rendered invisibly.
|
||||
* - IDs used in math expressions need to be either globally unique, or refer to the same
|
||||
* metric object.
|
||||
*
|
||||
* This will be called by GraphWidget, no need for clients to call this.
|
||||
*/
|
||||
export declare function allMetricsGraphJson(left: IMetric[], right: IMetric[]): any[];
|
||||
/**
|
||||
* A single metric in a MetricSet
|
||||
*/
|
||||
export interface MetricEntry<A> {
|
||||
/**
|
||||
* The metric object
|
||||
*/
|
||||
readonly metric: IMetric;
|
||||
/**
|
||||
* The tag, added if the object is a primary metric
|
||||
*/
|
||||
tag?: A;
|
||||
/**
|
||||
* ID for this metric object
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* The level we discovered this metric at.
|
||||
*
|
||||
* Top-level has 1, metrics used by a math expression at level N will have
|
||||
* N+1.
|
||||
*/
|
||||
level: number;
|
||||
}
|
||||
/**
|
||||
* Contain a set of metrics, expanding math expressions
|
||||
*
|
||||
* "Primary" metrics (added via a top-level call) can be tagged with an additional value.
|
||||
*/
|
||||
export declare class MetricSet<A> {
|
||||
private readonly metrics;
|
||||
private readonly metricById;
|
||||
private readonly metricByKey;
|
||||
/**
|
||||
* Add the given set of metrics to this set
|
||||
*/
|
||||
addTopLevel(tag: A, ...metrics: IMetric[]): void;
|
||||
/**
|
||||
* Access all the accumulated timeseries entries
|
||||
*/
|
||||
get entries(): ReadonlyArray<MetricEntry<A>>;
|
||||
/**
|
||||
* Add a metric into the set
|
||||
*
|
||||
* The id may not be the same as a previous metric added, unless it's the same metric.
|
||||
*
|
||||
* It can be made visible, in which case the new "metric" object replaces the old
|
||||
* one (and the new ones "renderingPropertieS" will be honored instead of the old
|
||||
* one's).
|
||||
*/
|
||||
private addOne;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/rendering.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/rendering.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MetricSet=void 0,exports.allMetricsGraphJson=allMetricsGraphJson;var drop_empty_object_at_the_end_of_an_array_token_1=()=>{var tmp=require("./drop-empty-object-at-the-end-of-an-array-token");return drop_empty_object_at_the_end_of_an_array_token_1=()=>tmp,tmp},env_tokens_1=()=>{var tmp=require("./env-tokens");return env_tokens_1=()=>tmp,tmp},metric_util_1=()=>{var tmp=require("./metric-util");return metric_util_1=()=>tmp,tmp},object_1=()=>{var tmp=require("./object");return object_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};function allMetricsGraphJson(left,right){const mset=new MetricSet;return mset.addTopLevel("left",...left),mset.addTopLevel("right",...right),mset.entries.map(entry=>new(drop_empty_object_at_the_end_of_an_array_token_1()).DropEmptyObjectAtTheEndOfAnArray(metricGraphJson(entry.metric,entry.tag,entry.id)))}const applyExpressionOptions=(options,exprConfig)=>{options.expression=exprConfig.expression,exprConfig.searchAccount&&(options.accountId=(0,env_tokens_1().accountIfDifferentFromStack)(exprConfig.searchAccount)),exprConfig.searchRegion&&(options.region=(0,env_tokens_1().regionIfDifferentFromStack)(exprConfig.searchRegion)),exprConfig.period&&exprConfig.period!==300&&(options.period=exprConfig.period)};function metricGraphJson(metric,yAxis,id){const config=metric.toMetricConfig(),ret=[],options={...config.renderingProperties};(0,metric_util_1().dispatchMetric)(metric,{withStat(stat){ret.push(stat.namespace,stat.metricName);for(const dim of stat.dimensions||[])ret.push(dim.name,dim.value);stat.accountOverride?options.accountId=stat.accountOverride:stat.account&&(options.accountId=(0,env_tokens_1().accountIfDifferentFromStack)(stat.account)),stat.regionOverride?options.region=stat.regionOverride:stat.region&&(options.region=(0,env_tokens_1().regionIfDifferentFromStack)(stat.region)),stat.period&&stat.period.toSeconds()!==300&&(options.period=stat.period.toSeconds()),stat.statistic&&stat.statistic!=="Average"&&(options.stat=stat.statistic)},withMathExpression(mathExpr){applyExpressionOptions(options,mathExpr)},withSearchExpression(searchExpr){applyExpressionOptions(options,searchExpr)}}),yAxis||(options.visible=!1),yAxis!=="left"&&(options.yAxis=yAxis),id&&(options.id=id),options.visible!==!1&&options.expression&&!options.label&&(options.label=options.label===""?void 0:metric.toString());const renderedOpts=(0,object_1().dropUndefined)(options);return Object.keys(renderedOpts).length!==0&&ret.push(renderedOpts),ret}class MetricSet{metrics=new Array;metricById=new Map;metricByKey=new Map;addTopLevel(tag,...metrics){for(const metric of metrics)this.addOne(metric,1,tag)}get entries(){return this.metrics}addOne(metric,level,tag,id){const key=(0,metric_util_1().metricKey)(metric);let existingEntry;if(id&&(existingEntry=this.metricById.get(id),existingEntry&&(0,metric_util_1().metricKey)(existingEntry.metric)!==key))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`CannotShareSameIdForDifferentMetrics`,`Cannot have two different metrics share the same id ('${id}') in one Alarm or Graph. Rename one of them.`);existingEntry||(existingEntry=this.metricByKey.get(key),existingEntry?.id&&id&&(existingEntry=void 0));let entry;existingEntry?entry=existingEntry:(entry={metric,level},this.metrics.push(entry),this.metricByKey.set(key,entry)),!entry.id&&id&&(entry.id=id,this.metricById.set(id,entry)),!entry.tag&&tag&&(entry.tag=tag);const conf=metric.toMetricConfig();if(conf.mathExpression)for(const[subId,subMetric]of Object.entries(conf.mathExpression.usingMetrics))this.addOne(subMetric,level+1,void 0,subId)}}exports.MetricSet=MetricSet;
|
||||
51
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/statistic.d.ts
generated
vendored
Normal file
51
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/statistic.d.ts
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
export interface SimpleStatistic {
|
||||
type: 'simple';
|
||||
statistic: string;
|
||||
}
|
||||
export interface GenericStatistic {
|
||||
type: 'generic';
|
||||
statistic: string;
|
||||
}
|
||||
export interface ParseableStatistic {
|
||||
statPrefix: string;
|
||||
statName: string;
|
||||
rawStatistic: string;
|
||||
}
|
||||
export interface SingleStatistic extends ParseableStatistic {
|
||||
type: 'single';
|
||||
value: number;
|
||||
}
|
||||
export interface PairStatistic extends ParseableStatistic {
|
||||
type: 'pair';
|
||||
isPercent: boolean;
|
||||
lower?: number;
|
||||
upper?: number;
|
||||
canBeSingleStat: boolean;
|
||||
asSingleStatStr?: string;
|
||||
}
|
||||
export interface PercentileStatistic extends SingleStatistic {
|
||||
statName: 'percentile';
|
||||
}
|
||||
export interface PercentileRankStatistic extends PairStatistic {
|
||||
statName: 'percentileRank';
|
||||
}
|
||||
export interface TrimmedMeanStatistic extends PairStatistic {
|
||||
statName: 'trimmedMean';
|
||||
}
|
||||
export interface WinsorizedMeanStatistic extends PairStatistic {
|
||||
statName: 'winsorizedMean';
|
||||
}
|
||||
export interface TrimmedCountStatistic extends PairStatistic {
|
||||
statName: 'trimmedCount';
|
||||
}
|
||||
export interface TrimmedSumStatistic extends PairStatistic {
|
||||
statName: 'trimmedSum';
|
||||
}
|
||||
export declare function singleStatisticToString(parsed: SingleStatistic): string;
|
||||
export declare function pairStatisticToString(parsed: PairStatistic): string;
|
||||
/**
|
||||
* Parse a statistic, returning the type of metric that was used
|
||||
*/
|
||||
export declare function parseStatistic(stat: string): SimpleStatistic | PercentileStatistic | PercentileRankStatistic | TrimmedMeanStatistic | WinsorizedMeanStatistic | TrimmedCountStatistic | TrimmedSumStatistic | GenericStatistic;
|
||||
export declare function normalizeStatistic(parsed: ReturnType<typeof parseStatistic>): string;
|
||||
export declare function normalizeRawStringStatistic(stat: string): string;
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/statistic.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/private/statistic.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.singleStatisticToString=singleStatisticToString,exports.pairStatisticToString=pairStatisticToString,exports.parseStatistic=parseStatistic,exports.normalizeStatistic=normalizeStatistic,exports.normalizeRawStringStatistic=normalizeRawStringStatistic;var stats_1=()=>{var tmp=require("../stats");return stats_1=()=>tmp,tmp};function parseSingleStatistic(statistic,prefix){const prefixLower=prefix.toLowerCase();if(statistic=statistic.toLowerCase(),!statistic.startsWith(prefixLower))return;const reDecimal="\\d+(?:\\.\\d+)?",r=new RegExp(`^${prefixLower}(${reDecimal})$`).exec(statistic);if(!r)return;const value=parseFloat(r[1]);if(!(value<0||value>100))return{type:"single",rawStatistic:statistic,statPrefix:prefixLower,value}}function parsePairStatistic(statistic,prefix){const r=new RegExp(`^${prefix}\\(([^)]+)\\)$`,"i").exec(statistic);if(!r)return;const common={type:"pair",canBeSingleStat:!1,rawStatistic:statistic,statPrefix:prefix.toUpperCase()},[lhs,rhs]=r[1].split(":");if(rhs===void 0)return;const parseNumberAndPercent=x=>{if(x=x.trim(),!x)return[void 0,!1];const value=parseFloat(x.replace(/%$/,"")),percent=x.endsWith("%");return isNaN(value)||value<0||percent&&value>100?["fail",!1]:[value,percent]},[lower,lhsPercent]=parseNumberAndPercent(lhs),[upper,rhsPercent]=parseNumberAndPercent(rhs);if(lower==="fail"||upper==="fail"||lower===void 0&&upper===void 0||lower!==void 0&&upper!==void 0&&lhsPercent!==rhsPercent)return;const isPercent=lhsPercent||rhsPercent,canBeSingleStat=lower===void 0&&isPercent,asSingleStatStr=canBeSingleStat?`${prefix.toLowerCase()}${upper}`:void 0;return{...common,lower,upper,isPercent,canBeSingleStat,asSingleStatStr}}function singleStatisticToString(parsed){return`${parsed.statPrefix}${parsed.value}`}function pairStatisticToString(parsed){const percent=parsed.isPercent?"%":"",lower=parsed.lower?`${parsed.lower}${percent}`:"",upper=parsed.upper?`${parsed.upper}${percent}`:"";return`${parsed.statPrefix}(${lower}:${upper})`}function parseStatistic(stat){const lowerStat=stat.toLowerCase(),statMap={average:stats_1().Stats.AVERAGE,avg:stats_1().Stats.AVERAGE,minimum:stats_1().Stats.MINIMUM,min:stats_1().Stats.MINIMUM,maximum:stats_1().Stats.MAXIMUM,max:stats_1().Stats.MAXIMUM,samplecount:stats_1().Stats.SAMPLE_COUNT,n:stats_1().Stats.SAMPLE_COUNT,sum:stats_1().Stats.SUM,iqm:stats_1().Stats.IQM};if(lowerStat in statMap)return{type:"simple",statistic:statMap[lowerStat]};let m;return m=parseSingleStatistic(stat,"p"),m?{...m,statName:"percentile"}:(m=parsePairStatistic(stat,"pr"),m?{...m,statName:"percentileRank"}:(m=parseSingleStatistic(stat,"tm")||parsePairStatistic(stat,"tm"),m?{...m,statName:"trimmedMean"}:(m=parseSingleStatistic(stat,"wm")||parsePairStatistic(stat,"wm"),m?{...m,statName:"winsorizedMean"}:(m=parseSingleStatistic(stat,"tc")||parsePairStatistic(stat,"tc"),m?{...m,statName:"trimmedCount"}:(m=parseSingleStatistic(stat,"ts")||parsePairStatistic(stat,"ts"),m?{...m,statName:"trimmedSum"}:{type:"generic",statistic:stat})))))}function normalizeStatistic(parsed){return parsed.type==="simple"||parsed.type==="generic"?parsed.statistic:parsed.type==="single"?parsed.rawStatistic.toLowerCase():parsed.type==="pair"?parsed.rawStatistic.toUpperCase():""}function normalizeRawStringStatistic(stat){const parsed=parseStatistic(stat);return normalizeStatistic(parsed)}
|
||||
150
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/stats.d.ts
generated
vendored
Normal file
150
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/stats.d.ts
generated
vendored
Normal file
@@ -0,0 +1,150 @@
|
||||
/**
|
||||
* Factory functions for standard statistics strings
|
||||
*/
|
||||
export declare abstract class Stats {
|
||||
/**
|
||||
* The count (number) of data points used for the statistical calculation.
|
||||
*/
|
||||
static readonly SAMPLE_COUNT = "SampleCount";
|
||||
/**
|
||||
* The value of Sum / SampleCount during the specified period.
|
||||
*/
|
||||
static readonly AVERAGE = "Average";
|
||||
/**
|
||||
* All values submitted for the matching metric added together.
|
||||
* This statistic can be useful for determining the total volume of a metric.
|
||||
*/
|
||||
static readonly SUM = "Sum";
|
||||
/**
|
||||
* The lowest value observed during the specified period.
|
||||
* You can use this value to determine low volumes of activity for your application.
|
||||
*/
|
||||
static readonly MINIMUM = "Minimum";
|
||||
/**
|
||||
* The highest value observed during the specified period.
|
||||
* You can use this value to determine high volumes of activity for your application.
|
||||
*/
|
||||
static readonly MAXIMUM = "Maximum";
|
||||
/**
|
||||
* Interquartile mean (IQM) is the trimmed mean of the interquartile range, or the middle 50% of values.
|
||||
*
|
||||
* It is equivalent to `trimmedMean(25, 75)`.
|
||||
*/
|
||||
static readonly IQM = "IQM";
|
||||
/**
|
||||
* Percentile indicates the relative standing of a value in a dataset.
|
||||
*
|
||||
* Percentiles help you get a better understanding of the distribution of your metric data.
|
||||
*
|
||||
* For example, `p(90)` is the 90th percentile and means that 90% of the data
|
||||
* within the period is lower than this value and 10% of the data is higher
|
||||
* than this value.
|
||||
*/
|
||||
static percentile(percentile: number): string;
|
||||
/**
|
||||
* A shorter alias for `percentile()`.
|
||||
*/
|
||||
static p(percentile: number): string;
|
||||
/**
|
||||
* Trimmed mean (TM) is the mean of all values that are between two specified boundaries.
|
||||
*
|
||||
* Values outside of the boundaries are ignored when the mean is calculated.
|
||||
* You define the boundaries as one or two numbers between 0 and 100, up to 10
|
||||
* decimal places. The numbers are percentages.
|
||||
*
|
||||
* - If two numbers are given, they define the lower and upper bounds in percentages,
|
||||
* respectively.
|
||||
* - If one number is given, it defines the upper bound (the lower bound is assumed to
|
||||
* be 0).
|
||||
*
|
||||
* For example, `tm(90)` calculates the average after removing the 10% of data
|
||||
* points with the highest values; `tm(10, 90)` calculates the average after removing the
|
||||
* 10% with the lowest and 10% with the highest values.
|
||||
*/
|
||||
static trimmedMean(p1: number, p2?: number): string;
|
||||
/**
|
||||
* A shorter alias for `trimmedMean()`.
|
||||
*/
|
||||
static tm(p1: number, p2?: number): string;
|
||||
/**
|
||||
* Winsorized mean (WM) is similar to trimmed mean.
|
||||
*
|
||||
* However, with winsorized mean, the values that are outside the boundary are
|
||||
* not ignored, but instead are considered to be equal to the value at the
|
||||
* edge of the appropriate boundary. After this normalization, the average is
|
||||
* calculated. You define the boundaries as one or two numbers between 0 and
|
||||
* 100, up to 10 decimal places.
|
||||
*
|
||||
* - If two numbers are given, they define the lower and upper bounds in percentages,
|
||||
* respectively.
|
||||
* - If one number is given, it defines the upper bound (the lower bound is assumed to
|
||||
* be 0).
|
||||
*
|
||||
* For example, `tm(90)` calculates the average after removing the 10% of data
|
||||
* points with the highest values; `tm(10, 90)` calculates the average after removing the
|
||||
* 10% with the lowest and 10% with the highest values.
|
||||
*
|
||||
* For example, `wm(90)` calculates the average while treating the 10% of the
|
||||
* highest values to be equal to the value at the 90th percentile.
|
||||
* `wm(10, 90)` calculates the average while treaing the bottom 10% and the
|
||||
* top 10% of values to be equal to the boundary values.
|
||||
*/
|
||||
static winsorizedMean(p1: number, p2?: number): string;
|
||||
/**
|
||||
* A shorter alias for `winsorizedMean()`.
|
||||
*/
|
||||
static wm(p1: number, p2?: number): string;
|
||||
/**
|
||||
* Trimmed count (TC) is the number of data points in the chosen range for a trimmed mean statistic.
|
||||
*
|
||||
* - If two numbers are given, they define the lower and upper bounds in percentages,
|
||||
* respectively.
|
||||
* - If one number is given, it defines the upper bound (the lower bound is assumed to
|
||||
* be 0).
|
||||
*
|
||||
* For example, `tc(90)` returns the number of data points not including any
|
||||
* data points that fall in the highest 10% of the values. `tc(10, 90)`
|
||||
* returns the number of data points not including any data points that fall
|
||||
* in the lowest 10% of the values and the highest 90% of the values.
|
||||
*/
|
||||
static trimmedCount(p1: number, p2?: number): string;
|
||||
/**
|
||||
* Shorter alias for `trimmedCount()`.
|
||||
*/
|
||||
static tc(p1: number, p2?: number): string;
|
||||
/**
|
||||
* Trimmed sum (TS) is the sum of the values of data points in a chosen range for a trimmed mean statistic.
|
||||
* It is equivalent to `(Trimmed Mean) * (Trimmed count)`.
|
||||
*
|
||||
* - If two numbers are given, they define the lower and upper bounds in percentages,
|
||||
* respectively.
|
||||
* - If one number is given, it defines the upper bound (the lower bound is assumed to
|
||||
* be 0).
|
||||
*
|
||||
* For example, `ts(90)` returns the sum of the data points not including any
|
||||
* data points that fall in the highest 10% of the values. `ts(10, 90)`
|
||||
* returns the sum of the data points not including any data points that fall
|
||||
* in the lowest 10% of the values and the highest 90% of the values.
|
||||
*/
|
||||
static trimmedSum(p1: number, p2?: number): string;
|
||||
/**
|
||||
* Shorter alias for `trimmedSum()`.
|
||||
*/
|
||||
static ts(p1: number, p2?: number): string;
|
||||
/**
|
||||
* Percentile rank (PR) is the percentage of values that meet a fixed threshold.
|
||||
*
|
||||
* - If two numbers are given, they define the lower and upper bounds in absolute values,
|
||||
* respectively.
|
||||
* - If one number is given, it defines the upper bound (the lower bound is assumed to
|
||||
* be 0).
|
||||
*
|
||||
* For example, `percentileRank(300)` returns the percentage of data points that have a value of 300 or less.
|
||||
* `percentileRank(100, 2000)` returns the percentage of data points that have a value between 100 and 2000.
|
||||
*/
|
||||
static percentileRank(v1: number, v2?: number): string;
|
||||
/**
|
||||
* Shorter alias for `percentileRank()`.
|
||||
*/
|
||||
static pr(v1: number, v2?: number): string;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/stats.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/stats.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Stats=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class Stats{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudwatch.Stats",version:"2.252.0"};static SAMPLE_COUNT="SampleCount";static AVERAGE="Average";static SUM="Sum";static MINIMUM="Minimum";static MAXIMUM="Maximum";static IQM="IQM";static percentile(percentile){return assertPercentage(percentile),`p${percentile}`}static p(percentile){return Stats.percentile(percentile)}static trimmedMean(p1,p2){return boundaryPercentileStat("tm","TM",p1,p2)}static tm(p1,p2){return Stats.trimmedMean(p1,p2)}static winsorizedMean(p1,p2){return boundaryPercentileStat("wm","WM",p1,p2)}static wm(p1,p2){return Stats.winsorizedMean(p1,p2)}static trimmedCount(p1,p2){return boundaryPercentileStat("tc","TC",p1,p2)}static tc(p1,p2){return Stats.trimmedCount(p1,p2)}static trimmedSum(p1,p2){return boundaryPercentileStat("ts","TS",p1,p2)}static ts(p1,p2){return Stats.trimmedSum(p1,p2)}static percentileRank(v1,v2){return v2!==void 0?`PR(${v1}:${v2})`:`PR(:${v1})`}static pr(v1,v2){return this.percentileRank(v1,v2)}}exports.Stats=Stats;function assertPercentage(x){if(x!==void 0&&(x<0||x>100))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`ExpectingPercentage`,`Expecting a percentage, got: ${x}`)}function boundaryPercentileStat(oneBoundaryStat,twoBoundaryStat,p1,p2){return assertPercentage(p1),assertPercentage(p2),p2!==void 0?`${twoBoundaryStat}(${p1}%:${p2}%)`:`${oneBoundaryStat}${p1}`}
|
||||
51
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/text.d.ts
generated
vendored
Normal file
51
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/text.d.ts
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
import { ConcreteWidget } from './widget';
|
||||
/**
|
||||
* Background types available
|
||||
*/
|
||||
export declare enum TextWidgetBackground {
|
||||
/**
|
||||
* Solid background
|
||||
*/
|
||||
SOLID = "solid",
|
||||
/**
|
||||
* Transparent background
|
||||
*/
|
||||
TRANSPARENT = "transparent"
|
||||
}
|
||||
/**
|
||||
* Properties for a Text widget
|
||||
*/
|
||||
export interface TextWidgetProps {
|
||||
/**
|
||||
* The text to display, in MarkDown format
|
||||
*/
|
||||
readonly markdown: string;
|
||||
/**
|
||||
* Width of the widget, in a grid of 24 units wide
|
||||
*
|
||||
* @default 6
|
||||
*/
|
||||
readonly width?: number;
|
||||
/**
|
||||
* Height of the widget
|
||||
*
|
||||
* @default 2
|
||||
*/
|
||||
readonly height?: number;
|
||||
/**
|
||||
* Background for the widget
|
||||
*
|
||||
* @default solid
|
||||
*/
|
||||
readonly background?: TextWidgetBackground;
|
||||
}
|
||||
/**
|
||||
* A dashboard widget that displays MarkDown
|
||||
*/
|
||||
export declare class TextWidget extends ConcreteWidget {
|
||||
private readonly markdown;
|
||||
private readonly background?;
|
||||
constructor(props: TextWidgetProps);
|
||||
position(x: number, y: number): void;
|
||||
toJson(): any[];
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/text.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/text.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextWidget=exports.TextWidgetBackground=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var widget_1=()=>{var tmp=require("./widget");return widget_1=()=>tmp,tmp},TextWidgetBackground;(function(TextWidgetBackground2){TextWidgetBackground2.SOLID="solid",TextWidgetBackground2.TRANSPARENT="transparent"})(TextWidgetBackground||(exports.TextWidgetBackground=TextWidgetBackground={}));class TextWidget extends widget_1().ConcreteWidget{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudwatch.TextWidget",version:"2.252.0"};markdown;background;constructor(props){super(props.width||6,props.height||2);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_TextWidgetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,TextWidget),error}this.markdown=props.markdown,this.background=props.background}position(x,y){this.x=x,this.y=y}toJson(){return[{type:"text",width:this.width,height:this.height,x:this.x,y:this.y,properties:{markdown:this.markdown,background:this.background}}]}}exports.TextWidget=TextWidget;
|
||||
156
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/variable.d.ts
generated
vendored
Normal file
156
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/variable.d.ts
generated
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
export declare enum VariableInputType {
|
||||
/**
|
||||
* Freeform text input box
|
||||
*/
|
||||
INPUT = "input",
|
||||
/**
|
||||
* A dropdown of pre-defined values, or values filled in from a metric search query
|
||||
*/
|
||||
RADIO = "radio",
|
||||
/**
|
||||
* A set of pre-defined radio buttons, which can also be defined from a metric search query
|
||||
*/
|
||||
SELECT = "select"
|
||||
}
|
||||
export declare enum VariableType {
|
||||
/**
|
||||
* A property variable changes the values of all instances of a property in the list of widgets in the dashboard.
|
||||
*/
|
||||
PROPERTY = "property",
|
||||
/**
|
||||
* A pattern variable is one that changes a regex pattern across the dashboard JSON
|
||||
*/
|
||||
PATTERN = "pattern"
|
||||
}
|
||||
/**
|
||||
* A single dashboard variable
|
||||
*/
|
||||
export interface IVariable {
|
||||
/**
|
||||
* Return the variable JSON for use in the dashboard
|
||||
*/
|
||||
toJson(): any;
|
||||
}
|
||||
export interface VariableValue {
|
||||
/**
|
||||
* Optional label for the selected item
|
||||
*
|
||||
* @default - the variable's value
|
||||
*/
|
||||
readonly label?: string;
|
||||
/**
|
||||
* Value of the selected item
|
||||
*/
|
||||
readonly value: string;
|
||||
}
|
||||
/**
|
||||
* Search components for use with {@link Values.fromSearchComponents}
|
||||
*/
|
||||
export interface SearchComponents {
|
||||
/**
|
||||
* The namespace to be used in the search expression
|
||||
*/
|
||||
readonly namespace: string;
|
||||
/**
|
||||
* The list of dimensions to be used in the search expression
|
||||
*/
|
||||
readonly dimensions: string[];
|
||||
/**
|
||||
* The metric name to be used in the search expression
|
||||
*/
|
||||
readonly metricName: string;
|
||||
/**
|
||||
* The dimension name, that the search expression retrieves, whose values will be used to populate the values to choose from
|
||||
*/
|
||||
readonly populateFrom: string;
|
||||
}
|
||||
/**
|
||||
* A class for providing values for use with {@link VariableInputType.SELECT} and {@link VariableInputType.RADIO} dashboard variables
|
||||
*/
|
||||
export declare abstract class Values {
|
||||
/**
|
||||
* Create values from the components of search expression
|
||||
*/
|
||||
static fromSearchComponents(components: SearchComponents): Values;
|
||||
/**
|
||||
* Create values from a search expression
|
||||
*
|
||||
* @param expression search expression that specifies a namespace, dimension name(s) and a metric name. For example `{AWS/EC2,InstanceId} MetricName=\"CPUUtilization\"`
|
||||
* @param populateFrom dimension the dimension name, that the search expression retrieves, whose values will be used to populate the values to choose from. For example `InstanceId`
|
||||
*/
|
||||
static fromSearch(expression: string, populateFrom: string): Values;
|
||||
/**
|
||||
* Create values from an array of possible variable values
|
||||
*/
|
||||
static fromValues(...values: VariableValue[]): Values;
|
||||
abstract toJson(): any;
|
||||
}
|
||||
/**
|
||||
* Default value for use in {@link DashboardVariableOptions}
|
||||
*/
|
||||
export declare class DefaultValue {
|
||||
readonly val: any;
|
||||
/**
|
||||
* A special value for use with search expressions to have the default value be the first value returned from search
|
||||
*/
|
||||
static readonly FIRST: DefaultValue;
|
||||
/**
|
||||
* Create a default value
|
||||
* @param value the value to be used as default
|
||||
*/
|
||||
static value(value: any): DefaultValue;
|
||||
private constructor();
|
||||
}
|
||||
/**
|
||||
* Options for {@link DashboardVariable}
|
||||
*/
|
||||
export interface DashboardVariableOptions {
|
||||
/**
|
||||
* Type of the variable
|
||||
*/
|
||||
readonly type: VariableType;
|
||||
/**
|
||||
* The way the variable value is selected
|
||||
*/
|
||||
readonly inputType: VariableInputType;
|
||||
/**
|
||||
* Pattern or property value to replace
|
||||
*/
|
||||
readonly value: string;
|
||||
/**
|
||||
* Unique id
|
||||
*/
|
||||
readonly id: string;
|
||||
/**
|
||||
* Optional label in the toolbar
|
||||
*
|
||||
* @default - the variable's value
|
||||
*/
|
||||
readonly label?: string;
|
||||
/**
|
||||
* Optional values (required for {@link VariableInputType.RADIO} and {@link VariableInputType.SELECT} dashboard variables).
|
||||
*
|
||||
* @default - no values
|
||||
*/
|
||||
readonly values?: Values;
|
||||
/**
|
||||
* Optional default value
|
||||
*
|
||||
* @default - no default value is set
|
||||
*/
|
||||
readonly defaultValue?: DefaultValue;
|
||||
/**
|
||||
* Whether the variable is visible
|
||||
*
|
||||
* @default - true
|
||||
*/
|
||||
readonly visible?: boolean;
|
||||
}
|
||||
/**
|
||||
* Dashboard Variable
|
||||
*/
|
||||
export declare class DashboardVariable implements IVariable {
|
||||
private readonly options;
|
||||
constructor(options: DashboardVariableOptions);
|
||||
toJson(): any;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/variable.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/variable.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DashboardVariable=exports.DefaultValue=exports.Values=exports.VariableType=exports.VariableInputType=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},VariableInputType;(function(VariableInputType2){VariableInputType2.INPUT="input",VariableInputType2.RADIO="radio",VariableInputType2.SELECT="select"})(VariableInputType||(exports.VariableInputType=VariableInputType={}));var VariableType;(function(VariableType2){VariableType2.PROPERTY="property",VariableType2.PATTERN="pattern"})(VariableType||(exports.VariableType=VariableType={}));class Values{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudwatch.Values",version:"2.252.0"};static fromSearchComponents(components){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_SearchComponents(components)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromSearchComponents),error}if(components.dimensions.length===0)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`EmptyDimensionsNotAllowed`,"Empty dimensions provided. Please specify one dimension at least");if(!components.dimensions.includes(components.populateFrom))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`PopulateFromNotInDimensions`,`populateFrom (${components.populateFrom}) is not present in dimensions`);const metricSchema=[components.namespace,...components.dimensions];return Values.fromSearch(`{${metricSchema.join(",")}} MetricName="${components.metricName}"`,components.populateFrom)}static fromSearch(expression,populateFrom){return new SearchValues(expression,populateFrom)}static fromValues(...values){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_VariableValue(values)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromValues),error}if(values.length==0)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`EmptyValuesNotAllowed`,"Empty values is not allowed");return new StaticValues(values)}}exports.Values=Values;class StaticValues extends Values{values;constructor(values){super(),this.values=values}toJson(){return{values:this.values.map(value=>({label:value.label,value:value.value}))}}}class SearchValues extends Values{expression;populateFrom;constructor(expression,populateFrom){super(),this.expression=expression,this.populateFrom=populateFrom}toJson(){return{search:this.expression,populateFrom:this.populateFrom}}}class DefaultValue{val;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudwatch.DefaultValue",version:"2.252.0"};static FIRST=new DefaultValue("__FIRST");static value(value){return new DefaultValue(value)}constructor(val){this.val=val}}exports.DefaultValue=DefaultValue;class DashboardVariable{options;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudwatch.DashboardVariable",version:"2.252.0"};constructor(options){this.options=options;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_DashboardVariableOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,DashboardVariable),error}if(options.inputType!==VariableInputType.INPUT&&!options.values)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`InputTypeRequiresValues`,`Variable with inputType (${options.inputType}) requires values to be set`);if(options.inputType==VariableInputType.INPUT&&options.values)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`InputTypeInputCannotHaveValues`,"inputType INPUT cannot be combined with values. Please choose either SELECT or RADIO or remove 'values' from options.")}toJson(){return{[this.options.type]:this.options.value,type:this.options.type,inputType:this.options.inputType,id:this.options.id,defaultValue:this.options.defaultValue?.val,visible:this.options.visible,label:this.options.label,...this.options.values?.toJson()}}}exports.DashboardVariable=DashboardVariable;
|
||||
59
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/widget.d.ts
generated
vendored
Normal file
59
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/widget.d.ts
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
import type { IMetric } from './metric-types';
|
||||
/**
|
||||
* The width of the grid we're filling
|
||||
*/
|
||||
export declare const GRID_WIDTH = 24;
|
||||
/**
|
||||
* A single dashboard widget
|
||||
*/
|
||||
export interface IWidget {
|
||||
/**
|
||||
* The amount of horizontal grid units the widget will take up
|
||||
*/
|
||||
readonly width: number;
|
||||
/**
|
||||
* The amount of vertical grid units the widget will take up
|
||||
*/
|
||||
readonly height: number;
|
||||
/**
|
||||
* Any warnings that are produced as a result of putting together this widget
|
||||
* @deprecated - use warningsV2
|
||||
*/
|
||||
readonly warnings?: string[];
|
||||
/**
|
||||
* Any warnings that are produced as a result of putting together this widget
|
||||
*/
|
||||
readonly warningsV2?: {
|
||||
[id: string]: string;
|
||||
};
|
||||
/**
|
||||
* Place the widget at a given position
|
||||
*/
|
||||
position(x: number, y: number): void;
|
||||
/**
|
||||
* Return the widget JSON for use in the dashboard
|
||||
*/
|
||||
toJson(): any[];
|
||||
}
|
||||
/**
|
||||
* A real CloudWatch widget that has its own fixed size and remembers its position
|
||||
*
|
||||
* This is in contrast to other widgets which exist for layout purposes.
|
||||
*/
|
||||
export declare abstract class ConcreteWidget implements IWidget {
|
||||
readonly width: number;
|
||||
readonly height: number;
|
||||
protected x?: number;
|
||||
protected y?: number;
|
||||
readonly warnings: string[] | undefined;
|
||||
readonly warningsV2: {
|
||||
[id: string]: string;
|
||||
} | undefined;
|
||||
constructor(width: number, height: number);
|
||||
position(x: number, y: number): void;
|
||||
abstract toJson(): any[];
|
||||
/**
|
||||
* Copy the warnings from the given metric
|
||||
*/
|
||||
protected copyMetricWarnings(...ms: IMetric[]): void;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/widget.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudwatch/lib/widget.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ConcreteWidget=exports.GRID_WIDTH=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};exports.GRID_WIDTH=24;class ConcreteWidget{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudwatch.ConcreteWidget",version:"2.252.0"};width;height;x;y;warnings=[];warningsV2={};constructor(width,height){if(this.width=width,this.height=height,this.width>exports.GRID_WIDTH)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`WidgetTooWide`,`Widget is too wide, max ${exports.GRID_WIDTH} units allowed`)}position(x,y){this.x=x,this.y=y}copyMetricWarnings(...ms){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudwatch_IMetric(ms)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.copyMetricWarnings),error}ms.forEach(m=>{for(const[id,message]of Object.entries(m.warningsV2??{}))this.warningsV2[id]=message})}}exports.ConcreteWidget=ConcreteWidget;
|
||||
Reference in New Issue
Block a user