Documentation ¶
Index ¶
- func AlarmBase_IsConstruct(x interface{}) *bool
- func AlarmBase_IsResource(construct awscdk.IConstruct) *bool
- func Alarm_IsConstruct(x interface{}) *bool
- func Alarm_IsResource(construct awscdk.IConstruct) *bool
- func CfnAlarm_CFN_RESOURCE_TYPE_NAME() *string
- func CfnAlarm_IsCfnElement(x interface{}) *bool
- func CfnAlarm_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnAlarm_IsConstruct(x interface{}) *bool
- func CfnAnomalyDetector_CFN_RESOURCE_TYPE_NAME() *string
- func CfnAnomalyDetector_IsCfnElement(x interface{}) *bool
- func CfnAnomalyDetector_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnAnomalyDetector_IsConstruct(x interface{}) *bool
- func CfnCompositeAlarm_CFN_RESOURCE_TYPE_NAME() *string
- func CfnCompositeAlarm_IsCfnElement(x interface{}) *bool
- func CfnCompositeAlarm_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnCompositeAlarm_IsConstruct(x interface{}) *bool
- func CfnDashboard_CFN_RESOURCE_TYPE_NAME() *string
- func CfnDashboard_IsCfnElement(x interface{}) *bool
- func CfnDashboard_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnDashboard_IsConstruct(x interface{}) *bool
- func CfnInsightRule_CFN_RESOURCE_TYPE_NAME() *string
- func CfnInsightRule_IsCfnElement(x interface{}) *bool
- func CfnInsightRule_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnInsightRule_IsConstruct(x interface{}) *bool
- func CfnMetricStream_CFN_RESOURCE_TYPE_NAME() *string
- func CfnMetricStream_IsCfnElement(x interface{}) *bool
- func CfnMetricStream_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnMetricStream_IsConstruct(x interface{}) *bool
- func Color_BLUE() *string
- func Color_BROWN() *string
- func Color_GREEN() *string
- func Color_GREY() *string
- func Color_ORANGE() *string
- func Color_PINK() *string
- func Color_PURPLE() *string
- func Color_RED() *string
- func CompositeAlarm_IsConstruct(x interface{}) *bool
- func CompositeAlarm_IsResource(construct awscdk.IConstruct) *bool
- func Dashboard_IsConstruct(x interface{}) *bool
- func Dashboard_IsResource(construct awscdk.IConstruct) *bool
- func Metric_GrantPutMetricData(grantee awsiam.IGrantable) awsiam.Grant
- func NewAlarmBase_Override(a AlarmBase, scope constructs.Construct, id *string, ...)
- func NewAlarmRule_Override(a AlarmRule)
- func NewAlarmStatusWidget_Override(a AlarmStatusWidget, props *AlarmStatusWidgetProps)
- func NewAlarmWidget_Override(a AlarmWidget, props *AlarmWidgetProps)
- func NewAlarm_Override(a Alarm, scope constructs.Construct, id *string, props *AlarmProps)
- func NewCfnAlarm_Override(c CfnAlarm, scope awscdk.Construct, id *string, props *CfnAlarmProps)
- func NewCfnAnomalyDetector_Override(c CfnAnomalyDetector, scope awscdk.Construct, id *string, ...)
- func NewCfnCompositeAlarm_Override(c CfnCompositeAlarm, scope awscdk.Construct, id *string, ...)
- func NewCfnDashboard_Override(c CfnDashboard, scope awscdk.Construct, id *string, props *CfnDashboardProps)
- func NewCfnInsightRule_Override(c CfnInsightRule, scope awscdk.Construct, id *string, ...)
- func NewCfnMetricStream_Override(c CfnMetricStream, scope awscdk.Construct, id *string, ...)
- func NewColumn_Override(c Column, widgets ...IWidget)
- func NewCompositeAlarm_Override(c CompositeAlarm, scope constructs.Construct, id *string, ...)
- func NewConcreteWidget_Override(c ConcreteWidget, width *float64, height *float64)
- func NewCustomWidget_Override(c CustomWidget, props *CustomWidgetProps)
- func NewDashboard_Override(d Dashboard, scope constructs.Construct, id *string, props *DashboardProps)
- func NewGraphWidget_Override(g GraphWidget, props *GraphWidgetProps)
- func NewLogQueryWidget_Override(l LogQueryWidget, props *LogQueryWidgetProps)
- func NewMathExpression_Override(m MathExpression, props *MathExpressionProps)
- func NewMetric_Override(m Metric, props *MetricProps)
- func NewRow_Override(r Row, widgets ...IWidget)
- func NewSingleValueWidget_Override(s SingleValueWidget, props *SingleValueWidgetProps)
- func NewSpacer_Override(s Spacer, props *SpacerProps)
- func NewTextWidget_Override(t TextWidget, props *TextWidgetProps)
- type Alarm
- type AlarmActionConfig
- type AlarmBase
- type AlarmProps
- type AlarmRule
- type AlarmState
- type AlarmStatusWidget
- type AlarmStatusWidgetProps
- type AlarmStatusWidgetSortBy
- type AlarmWidget
- type AlarmWidgetProps
- type CfnAlarm
- type CfnAlarmProps
- type CfnAlarm_DimensionProperty
- type CfnAlarm_MetricDataQueryProperty
- type CfnAlarm_MetricProperty
- type CfnAlarm_MetricStatProperty
- type CfnAnomalyDetector
- type CfnAnomalyDetectorProps
- type CfnAnomalyDetector_ConfigurationProperty
- type CfnAnomalyDetector_DimensionProperty
- type CfnAnomalyDetector_MetricDataQueryProperty
- type CfnAnomalyDetector_MetricMathAnomalyDetectorProperty
- type CfnAnomalyDetector_MetricProperty
- type CfnAnomalyDetector_MetricStatProperty
- type CfnAnomalyDetector_RangeProperty
- type CfnAnomalyDetector_SingleMetricAnomalyDetectorProperty
- type CfnCompositeAlarm
- type CfnCompositeAlarmProps
- type CfnDashboard
- type CfnDashboardProps
- type CfnInsightRule
- type CfnInsightRuleProps
- type CfnMetricStream
- type CfnMetricStreamProps
- type CfnMetricStream_MetricStreamFilterProperty
- type CfnMetricStream_MetricStreamStatisticsConfigurationProperty
- type CfnMetricStream_MetricStreamStatisticsMetricProperty
- type Color
- type Column
- type CommonMetricOptions
- type ComparisonOperator
- type CompositeAlarm
- type CompositeAlarmProps
- type ConcreteWidget
- type CreateAlarmOptions
- type CustomWidget
- type CustomWidgetProps
- type Dashboard
- type DashboardProps
- type Dimension
- type GraphWidget
- type GraphWidgetProps
- type GraphWidgetView
- type HorizontalAnnotation
- type IAlarm
- func Alarm_FromAlarmArn(scope constructs.Construct, id *string, alarmArn *string) IAlarm
- func CompositeAlarm_FromCompositeAlarmArn(scope constructs.Construct, id *string, compositeAlarmArn *string) IAlarm
- func CompositeAlarm_FromCompositeAlarmName(scope constructs.Construct, id *string, compositeAlarmName *string) IAlarm
- type IAlarmAction
- type IAlarmRule
- func AlarmRule_AllOf(operands ...IAlarmRule) IAlarmRule
- func AlarmRule_AnyOf(operands ...IAlarmRule) IAlarmRule
- func AlarmRule_FromAlarm(alarm IAlarm, alarmState AlarmState) IAlarmRule
- func AlarmRule_FromBoolean(value *bool) IAlarmRule
- func AlarmRule_FromString(alarmRule *string) IAlarmRule
- func AlarmRule_Not(operand IAlarmRule) IAlarmRule
- type IMetric
- type IWidget
- type LegendPosition
- type LogQueryVisualizationType
- type LogQueryWidget
- type LogQueryWidgetProps
- type MathExpression
- type MathExpressionOptions
- type MathExpressionProps
- type Metric
- type MetricAlarmConfigdeprecated
- type MetricConfig
- type MetricExpressionConfig
- type MetricGraphConfigdeprecated
- type MetricOptions
- type MetricProps
- type MetricRenderingPropertiesdeprecated
- type MetricStatConfig
- type MetricWidgetProps
- type PeriodOverride
- type Row
- type Shading
- type SingleValueWidget
- type SingleValueWidgetProps
- type Spacer
- type SpacerProps
- type Statistic
- type TextWidget
- type TextWidgetProps
- type TreatMissingData
- type Unit
- type YAxisProps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlarmBase_IsConstruct ¶
func AlarmBase_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func AlarmBase_IsResource ¶
func AlarmBase_IsResource(construct awscdk.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func Alarm_IsConstruct ¶
func Alarm_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func Alarm_IsResource ¶
func Alarm_IsResource(construct awscdk.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func CfnAlarm_CFN_RESOURCE_TYPE_NAME ¶
func CfnAlarm_CFN_RESOURCE_TYPE_NAME() *string
func CfnAlarm_IsCfnElement ¶
func CfnAlarm_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.
func CfnAlarm_IsCfnResource ¶
func CfnAlarm_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnAlarm_IsConstruct ¶
func CfnAlarm_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CfnAnomalyDetector_CFN_RESOURCE_TYPE_NAME ¶
func CfnAnomalyDetector_CFN_RESOURCE_TYPE_NAME() *string
func CfnAnomalyDetector_IsCfnElement ¶
func CfnAnomalyDetector_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.
func CfnAnomalyDetector_IsCfnResource ¶
func CfnAnomalyDetector_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnAnomalyDetector_IsConstruct ¶
func CfnAnomalyDetector_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CfnCompositeAlarm_CFN_RESOURCE_TYPE_NAME ¶
func CfnCompositeAlarm_CFN_RESOURCE_TYPE_NAME() *string
func CfnCompositeAlarm_IsCfnElement ¶
func CfnCompositeAlarm_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.
func CfnCompositeAlarm_IsCfnResource ¶
func CfnCompositeAlarm_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnCompositeAlarm_IsConstruct ¶
func CfnCompositeAlarm_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CfnDashboard_CFN_RESOURCE_TYPE_NAME ¶
func CfnDashboard_CFN_RESOURCE_TYPE_NAME() *string
func CfnDashboard_IsCfnElement ¶
func CfnDashboard_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.
func CfnDashboard_IsCfnResource ¶
func CfnDashboard_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnDashboard_IsConstruct ¶
func CfnDashboard_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CfnInsightRule_CFN_RESOURCE_TYPE_NAME ¶
func CfnInsightRule_CFN_RESOURCE_TYPE_NAME() *string
func CfnInsightRule_IsCfnElement ¶
func CfnInsightRule_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.
func CfnInsightRule_IsCfnResource ¶
func CfnInsightRule_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnInsightRule_IsConstruct ¶
func CfnInsightRule_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CfnMetricStream_CFN_RESOURCE_TYPE_NAME ¶
func CfnMetricStream_CFN_RESOURCE_TYPE_NAME() *string
func CfnMetricStream_IsCfnElement ¶
func CfnMetricStream_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.
func CfnMetricStream_IsCfnResource ¶
func CfnMetricStream_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnMetricStream_IsConstruct ¶
func CfnMetricStream_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func Color_BLUE ¶
func Color_BLUE() *string
func Color_BROWN ¶
func Color_BROWN() *string
func Color_GREEN ¶
func Color_GREEN() *string
func Color_GREY ¶
func Color_GREY() *string
func Color_ORANGE ¶
func Color_ORANGE() *string
func Color_PINK ¶
func Color_PINK() *string
func Color_PURPLE ¶
func Color_PURPLE() *string
func CompositeAlarm_IsConstruct ¶
func CompositeAlarm_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CompositeAlarm_IsResource ¶
func CompositeAlarm_IsResource(construct awscdk.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func Dashboard_IsConstruct ¶
func Dashboard_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func Dashboard_IsResource ¶
func Dashboard_IsResource(construct awscdk.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func Metric_GrantPutMetricData ¶
func Metric_GrantPutMetricData(grantee awsiam.IGrantable) awsiam.Grant
Grant permissions to the given identity to write metrics. Experimental.
func NewAlarmBase_Override ¶
func NewAlarmBase_Override(a AlarmBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)
Experimental.
func NewAlarmStatusWidget_Override ¶
func NewAlarmStatusWidget_Override(a AlarmStatusWidget, props *AlarmStatusWidgetProps)
Experimental.
func NewAlarmWidget_Override ¶
func NewAlarmWidget_Override(a AlarmWidget, props *AlarmWidgetProps)
Experimental.
func NewAlarm_Override ¶
func NewAlarm_Override(a Alarm, scope constructs.Construct, id *string, props *AlarmProps)
Experimental.
func NewCfnAlarm_Override ¶
func NewCfnAlarm_Override(c CfnAlarm, scope awscdk.Construct, id *string, props *CfnAlarmProps)
Create a new `AWS::CloudWatch::Alarm`.
func NewCfnAnomalyDetector_Override ¶
func NewCfnAnomalyDetector_Override(c CfnAnomalyDetector, scope awscdk.Construct, id *string, props *CfnAnomalyDetectorProps)
Create a new `AWS::CloudWatch::AnomalyDetector`.
func NewCfnCompositeAlarm_Override ¶
func NewCfnCompositeAlarm_Override(c CfnCompositeAlarm, scope awscdk.Construct, id *string, props *CfnCompositeAlarmProps)
Create a new `AWS::CloudWatch::CompositeAlarm`.
func NewCfnDashboard_Override ¶
func NewCfnDashboard_Override(c CfnDashboard, scope awscdk.Construct, id *string, props *CfnDashboardProps)
Create a new `AWS::CloudWatch::Dashboard`.
func NewCfnInsightRule_Override ¶
func NewCfnInsightRule_Override(c CfnInsightRule, scope awscdk.Construct, id *string, props *CfnInsightRuleProps)
Create a new `AWS::CloudWatch::InsightRule`.
func NewCfnMetricStream_Override ¶
func NewCfnMetricStream_Override(c CfnMetricStream, scope awscdk.Construct, id *string, props *CfnMetricStreamProps)
Create a new `AWS::CloudWatch::MetricStream`.
func NewCompositeAlarm_Override ¶
func NewCompositeAlarm_Override(c CompositeAlarm, scope constructs.Construct, id *string, props *CompositeAlarmProps)
Experimental.
func NewConcreteWidget_Override ¶
func NewConcreteWidget_Override(c ConcreteWidget, width *float64, height *float64)
Experimental.
func NewCustomWidget_Override ¶
func NewCustomWidget_Override(c CustomWidget, props *CustomWidgetProps)
Experimental.
func NewDashboard_Override ¶
func NewDashboard_Override(d Dashboard, scope constructs.Construct, id *string, props *DashboardProps)
Experimental.
func NewGraphWidget_Override ¶
func NewGraphWidget_Override(g GraphWidget, props *GraphWidgetProps)
Experimental.
func NewLogQueryWidget_Override ¶
func NewLogQueryWidget_Override(l LogQueryWidget, props *LogQueryWidgetProps)
Experimental.
func NewMathExpression_Override ¶
func NewMathExpression_Override(m MathExpression, props *MathExpressionProps)
Experimental.
func NewSingleValueWidget_Override ¶
func NewSingleValueWidget_Override(s SingleValueWidget, props *SingleValueWidgetProps)
Experimental.
func NewTextWidget_Override ¶
func NewTextWidget_Override(t TextWidget, props *TextWidgetProps)
Experimental.
Types ¶
type Alarm ¶
type Alarm interface { AlarmBase // Experimental. AlarmActionArns() *[]*string // Experimental. SetAlarmActionArns(val *[]*string) // ARN of this alarm. // Experimental. AlarmArn() *string // Name of this alarm. // Experimental. AlarmName() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // Experimental. InsufficientDataActionArns() *[]*string // Experimental. SetInsufficientDataActionArns(val *[]*string) // The metric object this alarm was based on. // Experimental. Metric() IMetric // The construct tree node associated with this construct. // Experimental. Node() awscdk.ConstructNode // Experimental. OkActionArns() *[]*string // Experimental. SetOkActionArns(val *[]*string) // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Trigger this action if the alarm fires. // // Typically the ARN of an SNS topic or ARN of an AutoScaling policy. // Experimental. AddAlarmAction(actions ...IAlarmAction) // Trigger this action if there is insufficient data to evaluate the alarm. // // Typically the ARN of an SNS topic or ARN of an AutoScaling policy. // Experimental. AddInsufficientDataAction(actions ...IAlarmAction) // Trigger this action if the alarm returns from breaching state into ok state. // // Typically the ARN of an SNS topic or ARN of an AutoScaling policy. // Experimental. AddOkAction(actions ...IAlarmAction) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. OnPrepare() // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. OnSynthesize(session constructs.ISynthesisSession) // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. OnValidate() *[]*string // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. Prepare() // AlarmRule indicating ALARM state for Alarm. // Experimental. RenderAlarmRule() *string // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. Synthesize(session awscdk.ISynthesisSession) // 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. // Experimental. ToAnnotation() *HorizontalAnnotation // Returns a string representation of this construct. // Experimental. ToString() *string // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. Validate() *[]*string }
An alarm on a CloudWatch metric.
Example:
import cloudwatch "github.com/aws/aws-cdk-go/awscdk" var alias alias // or add alarms to an existing group var blueGreenAlias alias alarm := cloudwatch.NewAlarm(this, jsii.String("Errors"), &alarmProps{ comparisonOperator: cloudwatch.comparisonOperator_GREATER_THAN_THRESHOLD, threshold: jsii.Number(1), evaluationPeriods: jsii.Number(1), metric: alias.metricErrors(), }) deploymentGroup := codedeploy.NewLambdaDeploymentGroup(this, jsii.String("BlueGreenDeployment"), &lambdaDeploymentGroupProps{ alias: alias, deploymentConfig: codedeploy.lambdaDeploymentConfig_LINEAR_10PERCENT_EVERY_1MINUTE(), alarms: []iAlarm{ alarm, }, }) deploymentGroup.addAlarm(cloudwatch.NewAlarm(this, jsii.String("BlueGreenErrors"), &alarmProps{ comparisonOperator: cloudwatch.*comparisonOperator_GREATER_THAN_THRESHOLD, threshold: jsii.Number(1), evaluationPeriods: jsii.Number(1), metric: blueGreenAlias.metricErrors(), }))
Experimental.
func NewAlarm ¶
func NewAlarm(scope constructs.Construct, id *string, props *AlarmProps) Alarm
Experimental.
type AlarmActionConfig ¶
type AlarmActionConfig struct { // Return the ARN that should be used for a CloudWatch Alarm action. // Experimental. AlarmActionArn *string `field:"required" json:"alarmActionArn" yaml:"alarmActionArn"` }
Properties for an alarm action.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" alarmActionConfig := &alarmActionConfig{ alarmActionArn: jsii.String("alarmActionArn"), }
Experimental.
type AlarmBase ¶
type AlarmBase interface { awscdk.Resource IAlarm // Experimental. AlarmActionArns() *[]*string // Experimental. SetAlarmActionArns(val *[]*string) // Alarm ARN (i.e. arn:aws:cloudwatch:<region>:<account-id>:alarm:Foo). // Experimental. AlarmArn() *string // Name of the alarm. // Experimental. AlarmName() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // Experimental. InsufficientDataActionArns() *[]*string // Experimental. SetInsufficientDataActionArns(val *[]*string) // The construct tree node associated with this construct. // Experimental. Node() awscdk.ConstructNode // Experimental. OkActionArns() *[]*string // Experimental. SetOkActionArns(val *[]*string) // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Trigger this action if the alarm fires. // // Typically the ARN of an SNS topic or ARN of an AutoScaling policy. // Experimental. AddAlarmAction(actions ...IAlarmAction) // Trigger this action if there is insufficient data to evaluate the alarm. // // Typically the ARN of an SNS topic or ARN of an AutoScaling policy. // Experimental. AddInsufficientDataAction(actions ...IAlarmAction) // Trigger this action if the alarm returns from breaching state into ok state. // // Typically the ARN of an SNS topic or ARN of an AutoScaling policy. // Experimental. AddOkAction(actions ...IAlarmAction) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. OnPrepare() // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. OnSynthesize(session constructs.ISynthesisSession) // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. OnValidate() *[]*string // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. Prepare() // AlarmRule indicating ALARM state for Alarm. // Experimental. RenderAlarmRule() *string // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. Synthesize(session awscdk.ISynthesisSession) // Returns a string representation of this construct. // Experimental. ToString() *string // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. Validate() *[]*string }
The base class for Alarm and CompositeAlarm resources. Experimental.
type AlarmProps ¶
type AlarmProps struct { // The number of periods over which data is compared to the specified threshold. // Experimental. EvaluationPeriods *float64 `field:"required" json:"evaluationPeriods" yaml:"evaluationPeriods"` // The value against which the specified statistic is compared. // Experimental. Threshold *float64 `field:"required" json:"threshold" yaml:"threshold"` // Whether the actions for this alarm are enabled. // Experimental. ActionsEnabled *bool `field:"optional" json:"actionsEnabled" yaml:"actionsEnabled"` // Description for the alarm. // Experimental. AlarmDescription *string `field:"optional" json:"alarmDescription" yaml:"alarmDescription"` // Name of the alarm. // Experimental. AlarmName *string `field:"optional" json:"alarmName" yaml:"alarmName"` // Comparison to use to check if metric is breaching. // Experimental. ComparisonOperator ComparisonOperator `field:"optional" json:"comparisonOperator" yaml:"comparisonOperator"` // 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. // See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation // // Experimental. DatapointsToAlarm *float64 `field:"optional" json:"datapointsToAlarm" yaml:"datapointsToAlarm"` // 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. // Experimental. EvaluateLowSampleCountPercentile *string `field:"optional" json:"evaluateLowSampleCountPercentile" yaml:"evaluateLowSampleCountPercentile"` // The period over which the specified statistic is applied. // // Cannot be used with `MathExpression` objects. // Deprecated: Use `metric.with({ period: ... })` to encode the period into the Metric object Period awscdk.Duration `field:"optional" json:"period" yaml:"period"` // What function to use for aggregating. // // Can be one of the following: // // - "Minimum" | "min" // - "Maximum" | "max" // - "Average" | "avg" // - "Sum" | "sum" // - "SampleCount | "n" // - "pNN.NN" // // Cannot be used with `MathExpression` objects. // Deprecated: Use `metric.with({ statistic: ... })` to encode the period into the Metric object Statistic *string `field:"optional" json:"statistic" yaml:"statistic"` // Sets how this alarm is to handle missing data points. // Experimental. TreatMissingData TreatMissingData `field:"optional" json:"treatMissingData" yaml:"treatMissingData"` // 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. // Experimental. Metric IMetric `field:"required" json:"metric" yaml:"metric"` }
Properties for Alarms.
Example:
import cloudwatch "github.com/aws/aws-cdk-go/awscdk" var alias alias // or add alarms to an existing group var blueGreenAlias alias alarm := cloudwatch.NewAlarm(this, jsii.String("Errors"), &alarmProps{ comparisonOperator: cloudwatch.comparisonOperator_GREATER_THAN_THRESHOLD, threshold: jsii.Number(1), evaluationPeriods: jsii.Number(1), metric: alias.metricErrors(), }) deploymentGroup := codedeploy.NewLambdaDeploymentGroup(this, jsii.String("BlueGreenDeployment"), &lambdaDeploymentGroupProps{ alias: alias, deploymentConfig: codedeploy.lambdaDeploymentConfig_LINEAR_10PERCENT_EVERY_1MINUTE(), alarms: []iAlarm{ alarm, }, }) deploymentGroup.addAlarm(cloudwatch.NewAlarm(this, jsii.String("BlueGreenErrors"), &alarmProps{ comparisonOperator: cloudwatch.*comparisonOperator_GREATER_THAN_THRESHOLD, threshold: jsii.Number(1), evaluationPeriods: jsii.Number(1), metric: blueGreenAlias.metricErrors(), }))
Experimental.
type AlarmRule ¶
type AlarmRule interface { }
Class with static functions to build AlarmRule for Composite Alarms.
Example:
var alarm1 alarm var alarm2 alarm var alarm3 alarm var alarm4 alarm alarmRule := cloudwatch.alarmRule.anyOf(cloudwatch.alarmRule.allOf(cloudwatch.alarmRule.anyOf(alarm1, cloudwatch.alarmRule.fromAlarm(alarm2, cloudwatch.alarmState_OK), alarm3), cloudwatch.alarmRule.not(cloudwatch.alarmRule.fromAlarm(alarm4, cloudwatch.alarmState_INSUFFICIENT_DATA))), cloudwatch.alarmRule.fromBoolean(jsii.Boolean(false))) cloudwatch.NewCompositeAlarm(this, jsii.String("MyAwesomeCompositeAlarm"), &compositeAlarmProps{ alarmRule: alarmRule, })
Experimental.
type AlarmState ¶
type AlarmState string
Enumeration indicates state of Alarm used in building Alarm Rule.
Example:
var dashboard dashboard var errorAlarm alarm dashboard.addWidgets(cloudwatch.NewAlarmStatusWidget(&alarmStatusWidgetProps{ title: jsii.String("Errors"), alarms: []iAlarm{ errorAlarm, }, sortBy: cloudwatch.alarmStatusWidgetSortBy_STATE_UPDATED_TIMESTAMP, states: []alarmState{ cloudwatch.*alarmState_ALARM, }, }))
Experimental.
const ( // State indicates resource is in ALARM. // Experimental. AlarmState_ALARM AlarmState = "ALARM" // State indicates resource is not in ALARM. // Experimental. AlarmState_OK AlarmState = "OK" // State indicates there is not enough data to determine is resource is in ALARM. // Experimental. AlarmState_INSUFFICIENT_DATA AlarmState = "INSUFFICIENT_DATA" )
type AlarmStatusWidget ¶
type AlarmStatusWidget interface { ConcreteWidget // The amount of vertical grid units the widget will take up. // Experimental. Height() *float64 // Any warnings that are produced as a result of putting together this widget. // Experimental. Warnings() *[]*string // The amount of horizontal grid units the widget will take up. // Experimental. Width() *float64 // Experimental. X() *float64 // Experimental. SetX(val *float64) // Experimental. Y() *float64 // Experimental. SetY(val *float64) // Copy the warnings from the given metric. // Experimental. CopyMetricWarnings(ms ...IMetric) // Place the widget at a given position. // Experimental. Position(x *float64, y *float64) // Return the widget JSON for use in the dashboard. // Experimental. ToJson() *[]interface{} }
A dashboard widget that displays alarms in a grid view.
Example:
var dashboard dashboard var errorAlarm alarm dashboard.addWidgets( cloudwatch.NewAlarmStatusWidget(&alarmStatusWidgetProps{ alarms: []iAlarm{ errorAlarm, }, }))
Experimental.
func NewAlarmStatusWidget ¶
func NewAlarmStatusWidget(props *AlarmStatusWidgetProps) AlarmStatusWidget
Experimental.
type AlarmStatusWidgetProps ¶
type AlarmStatusWidgetProps struct { // CloudWatch Alarms to show in widget. // Experimental. Alarms *[]IAlarm `field:"required" json:"alarms" yaml:"alarms"` // Height of the widget. // Experimental. Height *float64 `field:"optional" json:"height" yaml:"height"` // Specifies how to sort the alarms in the widget. // Experimental. SortBy AlarmStatusWidgetSortBy `field:"optional" json:"sortBy" yaml:"sortBy"` // 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 specifed in alarms are displayed. // Experimental. States *[]AlarmState `field:"optional" json:"states" yaml:"states"` // The title of the widget. // Experimental. Title *string `field:"optional" json:"title" yaml:"title"` // Width of the widget, in a grid of 24 units wide. // Experimental. Width *float64 `field:"optional" json:"width" yaml:"width"` }
Properties for an Alarm Status Widget.
Example:
var dashboard dashboard var errorAlarm alarm dashboard.addWidgets( cloudwatch.NewAlarmStatusWidget(&alarmStatusWidgetProps{ alarms: []iAlarm{ errorAlarm, }, }))
Experimental.
type AlarmStatusWidgetSortBy ¶
type AlarmStatusWidgetSortBy string
The sort possibilities for AlarmStatusWidgets.
Example:
var dashboard dashboard var errorAlarm alarm dashboard.addWidgets(cloudwatch.NewAlarmStatusWidget(&alarmStatusWidgetProps{ title: jsii.String("Errors"), alarms: []iAlarm{ errorAlarm, }, sortBy: cloudwatch.alarmStatusWidgetSortBy_STATE_UPDATED_TIMESTAMP, states: []alarmState{ cloudwatch.*alarmState_ALARM, }, }))
Experimental.
const ( // Choose DEFAULT to sort them in alphabetical order by alarm name. // Experimental. AlarmStatusWidgetSortBy_DEFAULT AlarmStatusWidgetSortBy = "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. // Experimental. AlarmStatusWidgetSortBy_STATE_UPDATED_TIMESTAMP AlarmStatusWidgetSortBy = "STATE_UPDATED_TIMESTAMP" // 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. // Experimental. AlarmStatusWidgetSortBy_TIMESTAMP AlarmStatusWidgetSortBy = "TIMESTAMP" )
type AlarmWidget ¶
type AlarmWidget interface { ConcreteWidget // The amount of vertical grid units the widget will take up. // Experimental. Height() *float64 // Any warnings that are produced as a result of putting together this widget. // Experimental. Warnings() *[]*string // The amount of horizontal grid units the widget will take up. // Experimental. Width() *float64 // Experimental. X() *float64 // Experimental. SetX(val *float64) // Experimental. Y() *float64 // Experimental. SetY(val *float64) // Copy the warnings from the given metric. // Experimental. CopyMetricWarnings(ms ...IMetric) // Place the widget at a given position. // Experimental. Position(x *float64, y *float64) // Return the widget JSON for use in the dashboard. // Experimental. ToJson() *[]interface{} }
Display the metric associated with an alarm, including the alarm line.
Example:
var dashboard dashboard var errorAlarm alarm dashboard.addWidgets(cloudwatch.NewAlarmWidget(&alarmWidgetProps{ title: jsii.String("Errors"), alarm: errorAlarm, }))
Experimental.
type AlarmWidgetProps ¶
type AlarmWidgetProps struct { // Height of the widget. // Experimental. Height *float64 `field:"optional" json:"height" yaml:"height"` // The region the metrics of this graph should be taken from. // Experimental. Region *string `field:"optional" json:"region" yaml:"region"` // Title for the graph. // Experimental. Title *string `field:"optional" json:"title" yaml:"title"` // Width of the widget, in a grid of 24 units wide. // Experimental. Width *float64 `field:"optional" json:"width" yaml:"width"` // The alarm to show. // Experimental. Alarm IAlarm `field:"required" json:"alarm" yaml:"alarm"` // Left Y axis. // Experimental. LeftYAxis *YAxisProps `field:"optional" json:"leftYAxis" yaml:"leftYAxis"` }
Properties for an AlarmWidget.
Example:
var dashboard dashboard var errorAlarm alarm dashboard.addWidgets(cloudwatch.NewAlarmWidget(&alarmWidgetProps{ title: jsii.String("Errors"), alarm: errorAlarm, }))
Experimental.
type CfnAlarm ¶
type CfnAlarm interface { awscdk.CfnResource awscdk.IInspectable // Indicates whether actions should be executed during any changes to the alarm state. // // The default is TRUE. ActionsEnabled() interface{} SetActionsEnabled(val interface{}) // The list of actions to execute when this alarm transitions into an ALARM state from any other state. // // Specify each action as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see [PutMetricAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html) in the *Amazon CloudWatch API Reference* . AlarmActions() *[]*string SetAlarmActions(val *[]*string) // The description of the alarm. AlarmDescription() *string SetAlarmDescription(val *string) // The name of the alarm. // // If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the alarm name. // // > If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name. AlarmName() *string SetAlarmName(val *string) // The ARN of the CloudWatch alarm, such as `arn:aws:cloudwatch:us-west-2:123456789012:alarm:myCloudWatchAlarm-CPUAlarm-UXMMZK36R55Z` . AttrArn() *string // Options for this resource, such as condition, update policy etc. // Experimental. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. // Experimental. CfnResourceType() *string // The arithmetic operation to use when comparing the specified statistic and threshold. // // The specified statistic value is used as the first operand. // // You can specify the following values: `GreaterThanThreshold` , `GreaterThanOrEqualToThreshold` , `LessThanThreshold` , or `LessThanOrEqualToThreshold` . ComparisonOperator() *string SetComparisonOperator(val *string) // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. // Experimental. CreationStack() *[]*string // 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, and the value that you set for `EvaluationPeriods` is the N value. For more information, see [Evaluating an Alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation) in the *Amazon CloudWatch User Guide* . // // If you omit this parameter, CloudWatch uses the same value here that you set for `EvaluationPeriods` , and the alarm goes to alarm state if that many consecutive periods are breaching. DatapointsToAlarm() *float64 SetDatapointsToAlarm(val *float64) // The dimensions for the metric associated with the alarm. // // For an alarm based on a math expression, you can't specify `Dimensions` . Instead, you use `Metrics` . Dimensions() interface{} SetDimensions(val interface{}) // Used only for alarms based on percentiles. // // If `ignore` , the alarm state does not change during periods with too few data points to be statistically significant. If `evaluate` or this parameter is not used, the alarm is always evaluated and possibly changes state no matter how many data points are available. EvaluateLowSampleCountPercentile() *string SetEvaluateLowSampleCountPercentile(val *string) // The number of periods over which data is compared to the specified threshold. // // If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies that number. If you are setting an "M out of N" alarm, this value is the N, and `DatapointsToAlarm` is the M. // // For more information, see [Evaluating an Alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation) in the *Amazon CloudWatch User Guide* . EvaluationPeriods() *float64 SetEvaluationPeriods(val *float64) // The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100. // // For an alarm based on a metric, you must specify either `Statistic` or `ExtendedStatistic` but not both. // // For an alarm based on a math expression, you can't specify `ExtendedStatistic` . Instead, you use `Metrics` . ExtendedStatistic() *string SetExtendedStatistic(val *string) // The actions to execute when this alarm transitions to the `INSUFFICIENT_DATA` state from any other state. // // Each action is specified as an Amazon Resource Name (ARN). InsufficientDataActions() *[]*string SetInsufficientDataActions(val *[]*string) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. // Experimental. LogicalId() *string // The name of the metric associated with the alarm. // // This is required for an alarm based on a metric. For an alarm based on a math expression, you use `Metrics` instead and you can't specify `MetricName` . MetricName() *string SetMetricName(val *string) // An array that enables you to create an alarm based on the result of a metric math expression. // // Each item in the array either retrieves a metric or performs a math expression. // // If you specify the `Metrics` parameter, you cannot specify `MetricName` , `Dimensions` , `Period` , `Namespace` , `Statistic` , `ExtendedStatistic` , or `Unit` . Metrics() interface{} SetMetrics(val interface{}) // The namespace of the metric associated with the alarm. // // This is required for an alarm based on a metric. For an alarm based on a math expression, you can't specify `Namespace` and you use `Metrics` instead. // // For a list of namespaces for metrics from AWS services, see [AWS Services That Publish CloudWatch Metrics.](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) Namespace() *string SetNamespace(val *string) // The construct tree node associated with this construct. // Experimental. Node() awscdk.ConstructNode // The actions to execute when this alarm transitions to the `OK` state from any other state. // // Each action is specified as an Amazon Resource Name (ARN). OkActions() *[]*string SetOkActions(val *[]*string) // The period, in seconds, over which the statistic is applied. // // This is required for an alarm based on a metric. Valid values are 10, 30, 60, and any multiple of 60. // // For an alarm based on a math expression, you can't specify `Period` , and instead you use the `Metrics` parameter. // // *Minimum:* 10. Period() *float64 SetPeriod(val *float64) // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. // Experimental. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). // Experimental. Stack() awscdk.Stack // The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use `ExtendedStatistic` . // // For an alarm based on a metric, you must specify either `Statistic` or `ExtendedStatistic` but not both. // // For an alarm based on a math expression, you can't specify `Statistic` . Instead, you use `Metrics` . Statistic() *string SetStatistic(val *string) // The value to compare with the specified statistic. Threshold() *float64 SetThreshold(val *float64) // In an alarm based on an anomaly detection model, this is the ID of the `ANOMALY_DETECTION_BAND` function used as the threshold for the alarm. ThresholdMetricId() *string SetThresholdMetricId(val *string) // Sets how this alarm is to handle missing data points. // // Valid values are `breaching` , `notBreaching` , `ignore` , and `missing` . For more information, see [Configuring How CloudWatch Alarms Treat Missing Data](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarms-and-missing-data) in the *Amazon CloudWatch User Guide* . // // If you omit this parameter, the default behavior of `missing` is used. TreatMissingData() *string SetTreatMissingData(val *string) // The unit of the metric associated with the alarm. // // Specify this only if you are creating an alarm based on a single metric. Do not specify this if you are specifying a `Metrics` array. // // You can specify the following values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, or None. Unit() *string SetUnit(val *string) // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. // Experimental. UpdatedProperites() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. // Experimental. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. // Experimental. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // // Experimental. AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. // Experimental. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. // Experimental. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. // Experimental. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. // Experimental. GetAtt(attributeName *string) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // // Experimental. GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. OnPrepare() // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. OnSynthesize(session constructs.ISynthesisSession) // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. OnValidate() *[]*string // Overrides the auto-generated logical ID with a specific ID. // Experimental. OverrideLogicalId(newLogicalId *string) // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. Prepare() RenderProperties(props *map[string]interface{}) *map[string]interface{} // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. // Experimental. ShouldSynthesize() *bool // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. Synthesize(session awscdk.ISynthesisSession) // Returns a string representation of this construct. // // Returns: a string representation of this resource. // Experimental. ToString() *string // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. Validate() *[]*string // Experimental. ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::CloudWatch::Alarm`.
The `AWS::CloudWatch::Alarm` type specifies an alarm and associates it with the specified metric or metric math expression.
When this operation creates an alarm, the alarm state is immediately set to `INSUFFICIENT_DATA` . The alarm is then evaluated and its state is set appropriately. Any actions associated with the new state are then executed.
When you update an existing alarm, its state is left unchanged, but the update completely overwrites the previous configuration of the alarm.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnAlarm := awscdk.Aws_cloudwatch.NewCfnAlarm(this, jsii.String("MyCfnAlarm"), &cfnAlarmProps{ comparisonOperator: jsii.String("comparisonOperator"), evaluationPeriods: jsii.Number(123), // the properties below are optional actionsEnabled: jsii.Boolean(false), alarmActions: []*string{ jsii.String("alarmActions"), }, alarmDescription: jsii.String("alarmDescription"), alarmName: jsii.String("alarmName"), datapointsToAlarm: jsii.Number(123), dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, evaluateLowSampleCountPercentile: jsii.String("evaluateLowSampleCountPercentile"), extendedStatistic: jsii.String("extendedStatistic"), insufficientDataActions: []*string{ jsii.String("insufficientDataActions"), }, metricName: jsii.String("metricName"), metrics: []interface{}{ &metricDataQueryProperty{ id: jsii.String("id"), // the properties below are optional accountId: jsii.String("accountId"), expression: jsii.String("expression"), label: jsii.String("label"), metricStat: &metricStatProperty{ metric: &metricProperty{ dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), }, period: jsii.Number(123), stat: jsii.String("stat"), // the properties below are optional unit: jsii.String("unit"), }, period: jsii.Number(123), returnData: jsii.Boolean(false), }, }, namespace: jsii.String("namespace"), okActions: []*string{ jsii.String("okActions"), }, period: jsii.Number(123), statistic: jsii.String("statistic"), threshold: jsii.Number(123), thresholdMetricId: jsii.String("thresholdMetricId"), treatMissingData: jsii.String("treatMissingData"), unit: jsii.String("unit"), })
func NewCfnAlarm ¶
func NewCfnAlarm(scope awscdk.Construct, id *string, props *CfnAlarmProps) CfnAlarm
Create a new `AWS::CloudWatch::Alarm`.
type CfnAlarmProps ¶
type CfnAlarmProps struct { // The arithmetic operation to use when comparing the specified statistic and threshold. // // The specified statistic value is used as the first operand. // // You can specify the following values: `GreaterThanThreshold` , `GreaterThanOrEqualToThreshold` , `LessThanThreshold` , or `LessThanOrEqualToThreshold` . ComparisonOperator *string `field:"required" json:"comparisonOperator" yaml:"comparisonOperator"` // The number of periods over which data is compared to the specified threshold. // // If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies that number. If you are setting an "M out of N" alarm, this value is the N, and `DatapointsToAlarm` is the M. // // For more information, see [Evaluating an Alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation) in the *Amazon CloudWatch User Guide* . EvaluationPeriods *float64 `field:"required" json:"evaluationPeriods" yaml:"evaluationPeriods"` // Indicates whether actions should be executed during any changes to the alarm state. // // The default is TRUE. ActionsEnabled interface{} `field:"optional" json:"actionsEnabled" yaml:"actionsEnabled"` // The list of actions to execute when this alarm transitions into an ALARM state from any other state. // // Specify each action as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see [PutMetricAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html) in the *Amazon CloudWatch API Reference* . AlarmActions *[]*string `field:"optional" json:"alarmActions" yaml:"alarmActions"` // The description of the alarm. AlarmDescription *string `field:"optional" json:"alarmDescription" yaml:"alarmDescription"` // The name of the alarm. // // If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the alarm name. // // > If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name. AlarmName *string `field:"optional" json:"alarmName" yaml:"alarmName"` // 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, and the value that you set for `EvaluationPeriods` is the N value. For more information, see [Evaluating an Alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation) in the *Amazon CloudWatch User Guide* . // // If you omit this parameter, CloudWatch uses the same value here that you set for `EvaluationPeriods` , and the alarm goes to alarm state if that many consecutive periods are breaching. DatapointsToAlarm *float64 `field:"optional" json:"datapointsToAlarm" yaml:"datapointsToAlarm"` // The dimensions for the metric associated with the alarm. // // For an alarm based on a math expression, you can't specify `Dimensions` . Instead, you use `Metrics` . Dimensions interface{} `field:"optional" json:"dimensions" yaml:"dimensions"` // Used only for alarms based on percentiles. // // If `ignore` , the alarm state does not change during periods with too few data points to be statistically significant. If `evaluate` or this parameter is not used, the alarm is always evaluated and possibly changes state no matter how many data points are available. EvaluateLowSampleCountPercentile *string `field:"optional" json:"evaluateLowSampleCountPercentile" yaml:"evaluateLowSampleCountPercentile"` // The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100. // // For an alarm based on a metric, you must specify either `Statistic` or `ExtendedStatistic` but not both. // // For an alarm based on a math expression, you can't specify `ExtendedStatistic` . Instead, you use `Metrics` . ExtendedStatistic *string `field:"optional" json:"extendedStatistic" yaml:"extendedStatistic"` // The actions to execute when this alarm transitions to the `INSUFFICIENT_DATA` state from any other state. // // Each action is specified as an Amazon Resource Name (ARN). InsufficientDataActions *[]*string `field:"optional" json:"insufficientDataActions" yaml:"insufficientDataActions"` // The name of the metric associated with the alarm. // // This is required for an alarm based on a metric. For an alarm based on a math expression, you use `Metrics` instead and you can't specify `MetricName` . MetricName *string `field:"optional" json:"metricName" yaml:"metricName"` // An array that enables you to create an alarm based on the result of a metric math expression. // // Each item in the array either retrieves a metric or performs a math expression. // // If you specify the `Metrics` parameter, you cannot specify `MetricName` , `Dimensions` , `Period` , `Namespace` , `Statistic` , `ExtendedStatistic` , or `Unit` . Metrics interface{} `field:"optional" json:"metrics" yaml:"metrics"` // The namespace of the metric associated with the alarm. // // This is required for an alarm based on a metric. For an alarm based on a math expression, you can't specify `Namespace` and you use `Metrics` instead. // // For a list of namespaces for metrics from AWS services, see [AWS Services That Publish CloudWatch Metrics.](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) Namespace *string `field:"optional" json:"namespace" yaml:"namespace"` // The actions to execute when this alarm transitions to the `OK` state from any other state. // // Each action is specified as an Amazon Resource Name (ARN). OkActions *[]*string `field:"optional" json:"okActions" yaml:"okActions"` // The period, in seconds, over which the statistic is applied. // // This is required for an alarm based on a metric. Valid values are 10, 30, 60, and any multiple of 60. // // For an alarm based on a math expression, you can't specify `Period` , and instead you use the `Metrics` parameter. // // *Minimum:* 10. Period *float64 `field:"optional" json:"period" yaml:"period"` // The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use `ExtendedStatistic` . // // For an alarm based on a metric, you must specify either `Statistic` or `ExtendedStatistic` but not both. // // For an alarm based on a math expression, you can't specify `Statistic` . Instead, you use `Metrics` . Statistic *string `field:"optional" json:"statistic" yaml:"statistic"` // The value to compare with the specified statistic. Threshold *float64 `field:"optional" json:"threshold" yaml:"threshold"` // In an alarm based on an anomaly detection model, this is the ID of the `ANOMALY_DETECTION_BAND` function used as the threshold for the alarm. ThresholdMetricId *string `field:"optional" json:"thresholdMetricId" yaml:"thresholdMetricId"` // Sets how this alarm is to handle missing data points. // // Valid values are `breaching` , `notBreaching` , `ignore` , and `missing` . For more information, see [Configuring How CloudWatch Alarms Treat Missing Data](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarms-and-missing-data) in the *Amazon CloudWatch User Guide* . // // If you omit this parameter, the default behavior of `missing` is used. TreatMissingData *string `field:"optional" json:"treatMissingData" yaml:"treatMissingData"` // The unit of the metric associated with the alarm. // // Specify this only if you are creating an alarm based on a single metric. Do not specify this if you are specifying a `Metrics` array. // // You can specify the following values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, or None. Unit *string `field:"optional" json:"unit" yaml:"unit"` }
Properties for defining a `CfnAlarm`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnAlarmProps := &cfnAlarmProps{ comparisonOperator: jsii.String("comparisonOperator"), evaluationPeriods: jsii.Number(123), // the properties below are optional actionsEnabled: jsii.Boolean(false), alarmActions: []*string{ jsii.String("alarmActions"), }, alarmDescription: jsii.String("alarmDescription"), alarmName: jsii.String("alarmName"), datapointsToAlarm: jsii.Number(123), dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, evaluateLowSampleCountPercentile: jsii.String("evaluateLowSampleCountPercentile"), extendedStatistic: jsii.String("extendedStatistic"), insufficientDataActions: []*string{ jsii.String("insufficientDataActions"), }, metricName: jsii.String("metricName"), metrics: []interface{}{ &metricDataQueryProperty{ id: jsii.String("id"), // the properties below are optional accountId: jsii.String("accountId"), expression: jsii.String("expression"), label: jsii.String("label"), metricStat: &metricStatProperty{ metric: &metricProperty{ dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), }, period: jsii.Number(123), stat: jsii.String("stat"), // the properties below are optional unit: jsii.String("unit"), }, period: jsii.Number(123), returnData: jsii.Boolean(false), }, }, namespace: jsii.String("namespace"), okActions: []*string{ jsii.String("okActions"), }, period: jsii.Number(123), statistic: jsii.String("statistic"), threshold: jsii.Number(123), thresholdMetricId: jsii.String("thresholdMetricId"), treatMissingData: jsii.String("treatMissingData"), unit: jsii.String("unit"), }
type CfnAlarm_DimensionProperty ¶
type CfnAlarm_DimensionProperty struct { // The name of the dimension, from 1–255 characters in length. // // This dimension name must have been included when the metric was published. Name *string `field:"required" json:"name" yaml:"name"` // The value for the dimension, from 1–255 characters in length. Value *string `field:"required" json:"value" yaml:"value"` }
Dimension is an embedded property of the `AWS::CloudWatch::Alarm` type.
Dimensions are name/value pairs that can be associated with a CloudWatch metric. You can specify a maximum of 10 dimensions for a given metric.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" dimensionProperty := &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }
type CfnAlarm_MetricDataQueryProperty ¶
type CfnAlarm_MetricDataQueryProperty struct { // A short name used to tie this object to the results in the response. // // This name must be unique within a single call to `GetMetricData` . If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscore. The first character must be a lowercase letter. Id *string `field:"required" json:"id" yaml:"id"` // The ID of the account where the metrics are located, if this is a cross-account alarm. AccountId *string `field:"optional" json:"accountId" yaml:"accountId"` // The math expression to be performed on the returned data, if this object is performing a math expression. // // This expression can use the `Id` of the other metrics to refer to those metrics, and can also use the `Id` of other expressions to use the result of those expressions. For more information about metric math expressions, see [Metric Math Syntax and Functions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) in the *Amazon CloudWatch User Guide* . // // Within each MetricDataQuery object, you must specify either `Expression` or `MetricStat` but not both. Expression *string `field:"optional" json:"expression" yaml:"expression"` // A human-readable label for this metric or expression. // // This is especially useful if this is an expression, so that you know what the value represents. If the metric or expression is shown in a CloudWatch dashboard widget, the label is shown. If `Label` is omitted, CloudWatch generates a default. Label *string `field:"optional" json:"label" yaml:"label"` // The metric to be returned, along with statistics, period, and units. // // Use this parameter only if this object is retrieving a metric and not performing a math expression on returned data. // // Within one MetricDataQuery object, you must specify either `Expression` or `MetricStat` but not both. MetricStat interface{} `field:"optional" json:"metricStat" yaml:"metricStat"` // The granularity, in seconds, of the returned data points. // // For metrics with regular resolution, a period can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are collected at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of 60. High-resolution metrics are those metrics stored by a `PutMetricData` operation that includes a `StorageResolution of 1 second` . Period *float64 `field:"optional" json:"period" yaml:"period"` // This option indicates whether to return the timestamps and raw data values of this metric. // // When you create an alarm based on a metric math expression, specify `True` for this value for only the one math expression that the alarm is based on. You must specify `False` for `ReturnData` for all the other metrics and expressions used in the alarm. // // This field is required. ReturnData interface{} `field:"optional" json:"returnData" yaml:"returnData"` }
The `MetricDataQuery` property type specifies the metric data to return, and whether this call is just retrieving a batch set of data for one metric, or is performing a math expression on metric data.
Any expression used must return a single time series. For more information, see [Metric Math Syntax and Functions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) in the *Amazon CloudWatch User Guide* .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" metricDataQueryProperty := &metricDataQueryProperty{ id: jsii.String("id"), // the properties below are optional accountId: jsii.String("accountId"), expression: jsii.String("expression"), label: jsii.String("label"), metricStat: &metricStatProperty{ metric: &metricProperty{ dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), }, period: jsii.Number(123), stat: jsii.String("stat"), // the properties below are optional unit: jsii.String("unit"), }, period: jsii.Number(123), returnData: jsii.Boolean(false), }
type CfnAlarm_MetricProperty ¶
type CfnAlarm_MetricProperty struct { // The metric dimensions that you want to be used for the metric that the alarm will watch. Dimensions interface{} `field:"optional" json:"dimensions" yaml:"dimensions"` // The name of the metric that you want the alarm to watch. // // This is a required field. MetricName *string `field:"optional" json:"metricName" yaml:"metricName"` // The namespace of the metric that the alarm will watch. Namespace *string `field:"optional" json:"namespace" yaml:"namespace"` }
The `Metric` property type represents a specific metric.
`Metric` is a property of the [MetricStat](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricstat.html) property type.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" metricProperty := &metricProperty{ dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), }
type CfnAlarm_MetricStatProperty ¶
type CfnAlarm_MetricStatProperty struct { // The metric to return, including the metric name, namespace, and dimensions. Metric interface{} `field:"required" json:"metric" yaml:"metric"` // The granularity, in seconds, of the returned data points. // // For metrics with regular resolution, a period can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are collected at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of 60. High-resolution metrics are those metrics stored by a `PutMetricData` call that includes a `StorageResolution` of 1 second. // // If the `StartTime` parameter specifies a time stamp that is greater than 3 hours ago, you must specify the period as follows or no data points in that time range is returned: // // - Start time between 3 hours and 15 days ago - Use a multiple of 60 seconds (1 minute). // - Start time between 15 and 63 days ago - Use a multiple of 300 seconds (5 minutes). // - Start time greater than 63 days ago - Use a multiple of 3600 seconds (1 hour). Period *float64 `field:"required" json:"period" yaml:"period"` // The statistic to return. // // It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in [Statistics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Statistic) in the *Amazon CloudWatch User Guide* . Stat *string `field:"required" json:"stat" yaml:"stat"` // The unit to use for the returned data points. // // Valid values are: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, or None. Unit *string `field:"optional" json:"unit" yaml:"unit"` }
This structure defines the metric to be returned, along with the statistics, period, and units.
`MetricStat` is a property of the [MetricDataQuery](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricdataquery.html) property type.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" metricStatProperty := &metricStatProperty{ metric: &metricProperty{ dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), }, period: jsii.Number(123), stat: jsii.String("stat"), // the properties below are optional unit: jsii.String("unit"), }
type CfnAnomalyDetector ¶
type CfnAnomalyDetector interface { awscdk.CfnResource awscdk.IInspectable // Options for this resource, such as condition, update policy etc. // Experimental. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. // Experimental. CfnResourceType() *string // Specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model. // // The configuration can also include the time zone to use for the metric. Configuration() interface{} SetConfiguration(val interface{}) // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. // Experimental. CreationStack() *[]*string // The dimensions of the metric associated with the anomaly detection band. Dimensions() interface{} SetDimensions(val interface{}) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. // Experimental. LogicalId() *string // The CloudWatch metric math expression for this anomaly detector. MetricMathAnomalyDetector() interface{} SetMetricMathAnomalyDetector(val interface{}) // The name of the metric associated with the anomaly detection band. MetricName() *string SetMetricName(val *string) // The namespace of the metric associated with the anomaly detection band. Namespace() *string SetNamespace(val *string) // The construct tree node associated with this construct. // Experimental. Node() awscdk.ConstructNode // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. // Experimental. Ref() *string // The CloudWatch metric and statistic for this anomaly detector. SingleMetricAnomalyDetector() interface{} SetSingleMetricAnomalyDetector(val interface{}) // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). // Experimental. Stack() awscdk.Stack // The statistic of the metric associated with the anomaly detection band. Stat() *string SetStat(val *string) // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. // Experimental. UpdatedProperites() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. // Experimental. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. // Experimental. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // // Experimental. AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. // Experimental. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. // Experimental. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. // Experimental. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. // Experimental. GetAtt(attributeName *string) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // // Experimental. GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. OnPrepare() // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. OnSynthesize(session constructs.ISynthesisSession) // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. OnValidate() *[]*string // Overrides the auto-generated logical ID with a specific ID. // Experimental. OverrideLogicalId(newLogicalId *string) // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. Prepare() RenderProperties(props *map[string]interface{}) *map[string]interface{} // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. // Experimental. ShouldSynthesize() *bool // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. Synthesize(session awscdk.ISynthesisSession) // Returns a string representation of this construct. // // Returns: a string representation of this resource. // Experimental. ToString() *string // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. Validate() *[]*string // Experimental. ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::CloudWatch::AnomalyDetector`.
The `AWS::CloudWatch::AnomalyDetector` type specifies an anomaly detection band for a certain metric and statistic. The band represents the expected "normal" range for the metric values. Anomaly detection bands can be used for visualization of a metric's expected values, and for alarms.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnAnomalyDetector := awscdk.Aws_cloudwatch.NewCfnAnomalyDetector(this, jsii.String("MyCfnAnomalyDetector"), &cfnAnomalyDetectorProps{ configuration: &configurationProperty{ excludedTimeRanges: []interface{}{ &rangeProperty{ endTime: jsii.String("endTime"), startTime: jsii.String("startTime"), }, }, metricTimeZone: jsii.String("metricTimeZone"), }, dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, metricMathAnomalyDetector: &metricMathAnomalyDetectorProperty{ metricDataQueries: []interface{}{ &metricDataQueryProperty{ id: jsii.String("id"), // the properties below are optional accountId: jsii.String("accountId"), expression: jsii.String("expression"), label: jsii.String("label"), metricStat: &metricStatProperty{ metric: &metricProperty{ metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), // the properties below are optional dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, }, period: jsii.Number(123), stat: jsii.String("stat"), // the properties below are optional unit: jsii.String("unit"), }, period: jsii.Number(123), returnData: jsii.Boolean(false), }, }, }, metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), singleMetricAnomalyDetector: &singleMetricAnomalyDetectorProperty{ dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), stat: jsii.String("stat"), }, stat: jsii.String("stat"), })
func NewCfnAnomalyDetector ¶
func NewCfnAnomalyDetector(scope awscdk.Construct, id *string, props *CfnAnomalyDetectorProps) CfnAnomalyDetector
Create a new `AWS::CloudWatch::AnomalyDetector`.
type CfnAnomalyDetectorProps ¶
type CfnAnomalyDetectorProps struct { // Specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model. // // The configuration can also include the time zone to use for the metric. Configuration interface{} `field:"optional" json:"configuration" yaml:"configuration"` // The dimensions of the metric associated with the anomaly detection band. Dimensions interface{} `field:"optional" json:"dimensions" yaml:"dimensions"` // The CloudWatch metric math expression for this anomaly detector. MetricMathAnomalyDetector interface{} `field:"optional" json:"metricMathAnomalyDetector" yaml:"metricMathAnomalyDetector"` // The name of the metric associated with the anomaly detection band. MetricName *string `field:"optional" json:"metricName" yaml:"metricName"` // The namespace of the metric associated with the anomaly detection band. Namespace *string `field:"optional" json:"namespace" yaml:"namespace"` // The CloudWatch metric and statistic for this anomaly detector. SingleMetricAnomalyDetector interface{} `field:"optional" json:"singleMetricAnomalyDetector" yaml:"singleMetricAnomalyDetector"` // The statistic of the metric associated with the anomaly detection band. Stat *string `field:"optional" json:"stat" yaml:"stat"` }
Properties for defining a `CfnAnomalyDetector`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnAnomalyDetectorProps := &cfnAnomalyDetectorProps{ configuration: &configurationProperty{ excludedTimeRanges: []interface{}{ &rangeProperty{ endTime: jsii.String("endTime"), startTime: jsii.String("startTime"), }, }, metricTimeZone: jsii.String("metricTimeZone"), }, dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, metricMathAnomalyDetector: &metricMathAnomalyDetectorProperty{ metricDataQueries: []interface{}{ &metricDataQueryProperty{ id: jsii.String("id"), // the properties below are optional accountId: jsii.String("accountId"), expression: jsii.String("expression"), label: jsii.String("label"), metricStat: &metricStatProperty{ metric: &metricProperty{ metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), // the properties below are optional dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, }, period: jsii.Number(123), stat: jsii.String("stat"), // the properties below are optional unit: jsii.String("unit"), }, period: jsii.Number(123), returnData: jsii.Boolean(false), }, }, }, metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), singleMetricAnomalyDetector: &singleMetricAnomalyDetectorProperty{ dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), stat: jsii.String("stat"), }, stat: jsii.String("stat"), }
type CfnAnomalyDetector_ConfigurationProperty ¶
type CfnAnomalyDetector_ConfigurationProperty struct { // Specifies an array of time ranges to exclude from use when the anomaly detection model is trained and updated. // // Use this to make sure that events that could cause unusual values for the metric, such as deployments, aren't used when CloudWatch creates or updates the model. ExcludedTimeRanges interface{} `field:"optional" json:"excludedTimeRanges" yaml:"excludedTimeRanges"` // The time zone to use for the metric. // // This is useful to enable the model to automatically account for daylight savings time changes if the metric is sensitive to such time changes. // // To specify a time zone, use the name of the time zone as specified in the standard tz database. For more information, see [tz database](https://docs.aws.amazon.com/https://en.wikipedia.org/wiki/Tz_database) . MetricTimeZone *string `field:"optional" json:"metricTimeZone" yaml:"metricTimeZone"` }
Specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model.
The configuration can also include the time zone to use for the metric.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" configurationProperty := &configurationProperty{ excludedTimeRanges: []interface{}{ &rangeProperty{ endTime: jsii.String("endTime"), startTime: jsii.String("startTime"), }, }, metricTimeZone: jsii.String("metricTimeZone"), }
type CfnAnomalyDetector_DimensionProperty ¶
type CfnAnomalyDetector_DimensionProperty struct { // The name of the dimension. Name *string `field:"required" json:"name" yaml:"name"` // The value of the dimension. // // Dimension values must contain only ASCII characters and must include at least one non-whitespace character. Value *string `field:"required" json:"value" yaml:"value"` }
A dimension is a name/value pair that is part of the identity of a metric.
Because dimensions are part of the unique identifier for a metric, whenever you add a unique name/value pair to one of your metrics, you are creating a new variation of that metric. For example, many Amazon EC2 metrics publish `InstanceId` as a dimension name, and the actual instance ID as the value for that dimension.
You can assign up to 30 dimensions to a metric.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" dimensionProperty := &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }
type CfnAnomalyDetector_MetricDataQueryProperty ¶
type CfnAnomalyDetector_MetricDataQueryProperty struct { // A short name used to tie this object to the results in the response. // // This name must be unique within a single call to `GetMetricData` . If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscore. The first character must be a lowercase letter. Id *string `field:"required" json:"id" yaml:"id"` // The ID of the account where the metrics are located. // // If you are performing a `GetMetricData` operation in a monitoring account, use this to specify which account to retrieve this metric from. // // If you are performing a `PutMetricAlarm` operation, use this to specify which account contains the metric that the alarm is watching. AccountId *string `field:"optional" json:"accountId" yaml:"accountId"` // This field can contain either a Metrics Insights query, or a metric math expression to be performed on the returned data. // // For more information about Metrics Insights queries, see [Metrics Insights query components and syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch-metrics-insights-querylanguage) in the *Amazon CloudWatch User Guide* . // // A math expression can use the `Id` of the other metrics or queries to refer to those metrics, and can also use the `Id` of other expressions to use the result of those expressions. For more information about metric math expressions, see [Metric Math Syntax and Functions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) in the *Amazon CloudWatch User Guide* . // // Within each MetricDataQuery object, you must specify either `Expression` or `MetricStat` but not both. Expression *string `field:"optional" json:"expression" yaml:"expression"` // A human-readable label for this metric or expression. // // This is especially useful if this is an expression, so that you know what the value represents. If the metric or expression is shown in a CloudWatch dashboard widget, the label is shown. If Label is omitted, CloudWatch generates a default. // // You can put dynamic expressions into a label, so that it is more descriptive. For more information, see [Using Dynamic Labels](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html) . Label *string `field:"optional" json:"label" yaml:"label"` // The metric to be returned, along with statistics, period, and units. // // Use this parameter only if this object is retrieving a metric and not performing a math expression on returned data. // // Within one MetricDataQuery object, you must specify either `Expression` or `MetricStat` but not both. MetricStat interface{} `field:"optional" json:"metricStat" yaml:"metricStat"` // The granularity, in seconds, of the returned data points. // // For metrics with regular resolution, a period can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are collected at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of 60. High-resolution metrics are those metrics stored by a `PutMetricData` operation that includes a `StorageResolution of 1 second` . Period *float64 `field:"optional" json:"period" yaml:"period"` // When used in `GetMetricData` , this option indicates whether to return the timestamps and raw data values of this metric. // // If you are performing this call just to do math expressions and do not also need the raw data returned, you can specify `false` . If you omit this, the default of `true` is used. // // When used in `PutMetricAlarm` , specify `true` for the one expression result to use as the alarm. For all other metrics and expressions in the same `PutMetricAlarm` operation, specify `ReturnData` as False. ReturnData interface{} `field:"optional" json:"returnData" yaml:"returnData"` }
This structure is used in both `GetMetricData` and `PutMetricAlarm` .
The supported use of this structure is different for those two operations.
When used in `GetMetricData` , it indicates the metric data to return, and whether this call is just retrieving a batch set of data for one metric, or is performing a Metrics Insights query or a math expression. A single `GetMetricData` call can include up to 500 `MetricDataQuery` structures.
When used in `PutMetricAlarm` , it enables you to create an alarm based on a metric math expression. Each `MetricDataQuery` in the array specifies either a metric to retrieve, or a math expression to be performed on retrieved metrics. A single `PutMetricAlarm` call can include up to 20 `MetricDataQuery` structures in the array. The 20 structures can include as many as 10 structures that contain a `MetricStat` parameter to retrieve a metric, and as many as 10 structures that contain the `Expression` parameter to perform a math expression. Of those `Expression` structures, one must have `true` as the value for `ReturnData` . The result of this expression is the value the alarm watches.
Any expression used in a `PutMetricAlarm` operation must return a single time series. For more information, see [Metric Math Syntax and Functions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) in the *Amazon CloudWatch User Guide* .
Some of the parameters of this structure also have different uses whether you are using this structure in a `GetMetricData` operation or a `PutMetricAlarm` operation. These differences are explained in the following parameter list.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" metricDataQueryProperty := &metricDataQueryProperty{ id: jsii.String("id"), // the properties below are optional accountId: jsii.String("accountId"), expression: jsii.String("expression"), label: jsii.String("label"), metricStat: &metricStatProperty{ metric: &metricProperty{ metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), // the properties below are optional dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, }, period: jsii.Number(123), stat: jsii.String("stat"), // the properties below are optional unit: jsii.String("unit"), }, period: jsii.Number(123), returnData: jsii.Boolean(false), }
type CfnAnomalyDetector_MetricMathAnomalyDetectorProperty ¶
type CfnAnomalyDetector_MetricMathAnomalyDetectorProperty struct { // An array of metric data query structures that enables you to create an anomaly detector based on the result of a metric math expression. // // Each item in `MetricDataQueries` gets a metric or performs a math expression. One item in `MetricDataQueries` is the expression that provides the time series that the anomaly detector uses as input. Designate the expression by setting `ReturnData` to `true` for this object in the array. For all other expressions and metrics, set `ReturnData` to `false` . The designated expression must return a single time series. MetricDataQueries interface{} `field:"optional" json:"metricDataQueries" yaml:"metricDataQueries"` }
Indicates the CloudWatch math expression that provides the time series the anomaly detector uses as input.
The designated math expression must return a single time series.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" metricMathAnomalyDetectorProperty := &metricMathAnomalyDetectorProperty{ metricDataQueries: []interface{}{ &metricDataQueryProperty{ id: jsii.String("id"), // the properties below are optional accountId: jsii.String("accountId"), expression: jsii.String("expression"), label: jsii.String("label"), metricStat: &metricStatProperty{ metric: &metricProperty{ metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), // the properties below are optional dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, }, period: jsii.Number(123), stat: jsii.String("stat"), // the properties below are optional unit: jsii.String("unit"), }, period: jsii.Number(123), returnData: jsii.Boolean(false), }, }, }
type CfnAnomalyDetector_MetricProperty ¶
type CfnAnomalyDetector_MetricProperty struct { // The name of the metric. // // This is a required field. MetricName *string `field:"required" json:"metricName" yaml:"metricName"` // The namespace of the metric. Namespace *string `field:"required" json:"namespace" yaml:"namespace"` // The dimensions for the metric. Dimensions interface{} `field:"optional" json:"dimensions" yaml:"dimensions"` }
Represents a specific metric.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" metricProperty := &metricProperty{ metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), // the properties below are optional dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, }
type CfnAnomalyDetector_MetricStatProperty ¶
type CfnAnomalyDetector_MetricStatProperty struct { // The metric to return, including the metric name, namespace, and dimensions. Metric interface{} `field:"required" json:"metric" yaml:"metric"` // The granularity, in seconds, of the returned data points. // // For metrics with regular resolution, a period can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are collected at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of 60. High-resolution metrics are those metrics stored by a `PutMetricData` call that includes a `StorageResolution` of 1 second. // // If the `StartTime` parameter specifies a time stamp that is greater than 3 hours ago, you must specify the period as follows or no data points in that time range is returned: // // - Start time between 3 hours and 15 days ago - Use a multiple of 60 seconds (1 minute). // - Start time between 15 and 63 days ago - Use a multiple of 300 seconds (5 minutes). // - Start time greater than 63 days ago - Use a multiple of 3600 seconds (1 hour). Period *float64 `field:"required" json:"period" yaml:"period"` // The statistic to return. // // It can include any CloudWatch statistic or extended statistic. Stat *string `field:"required" json:"stat" yaml:"stat"` // When you are using a `Put` operation, this defines what unit you want to use when storing the metric. // // In a `Get` operation, if you omit `Unit` then all data that was collected with any unit is returned, along with the corresponding units that were specified when the data was reported to CloudWatch. If you specify a unit, the operation returns only data that was collected with that unit specified. If you specify a unit that does not match the data collected, the results of the operation are null. CloudWatch does not perform unit conversions. Unit *string `field:"optional" json:"unit" yaml:"unit"` }
This structure defines the metric to be returned, along with the statistics, period, and units.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" metricStatProperty := &metricStatProperty{ metric: &metricProperty{ metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), // the properties below are optional dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, }, period: jsii.Number(123), stat: jsii.String("stat"), // the properties below are optional unit: jsii.String("unit"), }
type CfnAnomalyDetector_RangeProperty ¶
type CfnAnomalyDetector_RangeProperty struct { // The end time of the range to exclude. // // The format is `yyyy-MM-dd'T'HH:mm:ss` . For example, `2019-07-01T23:59:59` . EndTime *string `field:"required" json:"endTime" yaml:"endTime"` // The start time of the range to exclude. // // The format is `yyyy-MM-dd'T'HH:mm:ss` . For example, `2019-07-01T23:59:59` . StartTime *string `field:"required" json:"startTime" yaml:"startTime"` }
Each `Range` specifies one range of days or times to exclude from use for training or updating an anomaly detection model.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" rangeProperty := &rangeProperty{ endTime: jsii.String("endTime"), startTime: jsii.String("startTime"), }
type CfnAnomalyDetector_SingleMetricAnomalyDetectorProperty ¶
type CfnAnomalyDetector_SingleMetricAnomalyDetectorProperty struct { // The metric dimensions to create the anomaly detection model for. Dimensions interface{} `field:"optional" json:"dimensions" yaml:"dimensions"` // The name of the metric to create the anomaly detection model for. MetricName *string `field:"optional" json:"metricName" yaml:"metricName"` // The namespace of the metric to create the anomaly detection model for. Namespace *string `field:"optional" json:"namespace" yaml:"namespace"` // The statistic to use for the metric and anomaly detection model. Stat *string `field:"optional" json:"stat" yaml:"stat"` }
Designates the CloudWatch metric and statistic that provides the time series the anomaly detector uses as input.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" singleMetricAnomalyDetectorProperty := &singleMetricAnomalyDetectorProperty{ dimensions: []interface{}{ &dimensionProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), stat: jsii.String("stat"), }
type CfnCompositeAlarm ¶
type CfnCompositeAlarm interface { awscdk.CfnResource awscdk.IInspectable // Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. // // The default is TRUE. ActionsEnabled() interface{} SetActionsEnabled(val interface{}) // Actions will be suppressed if the suppressor alarm is in the `ALARM` state. // // `ActionsSuppressor` can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm. ActionsSuppressor() *string SetActionsSuppressor(val *string) // The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the `ALARM` state. // // After this time, the composite alarm performs its actions. // // > `ExtensionPeriod` is required only when `ActionsSuppressor` is specified. ActionsSuppressorExtensionPeriod() *float64 SetActionsSuppressorExtensionPeriod(val *float64) // The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the `ALARM` state. // // After this time, the composite alarm performs its actions. // // > `WaitPeriod` is required only when `ActionsSuppressor` is specified. ActionsSuppressorWaitPeriod() *float64 SetActionsSuppressorWaitPeriod(val *float64) // The actions to execute when this alarm transitions to the ALARM state from any other state. // // Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see [PutCompositeAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutCompositeAlarm.html) in the *Amazon CloudWatch API Reference* . AlarmActions() *[]*string SetAlarmActions(val *[]*string) // The description for the composite alarm. AlarmDescription() *string SetAlarmDescription(val *string) // The name for the composite alarm. // // This name must be unique within your AWS account. AlarmName() *string SetAlarmName(val *string) // An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. // // For each alarm that you reference, you designate a function that specifies whether that alarm needs to be in ALARM state, OK state, or INSUFFICIENT_DATA state. You can use operators (AND, OR and NOT) to combine multiple functions in a single expression. You can use parenthesis to logically group the functions in your expression. // // You can use either alarm names or ARNs to reference the other alarms that are to be evaluated. // // Functions can include the following: // // - ALARM("alarm-name or alarm-ARN") is TRUE if the named alarm is in ALARM state. // - OK("alarm-name or alarm-ARN") is TRUE if the named alarm is in OK state. // - INSUFFICIENT_DATA("alarm-name or alarm-ARN") is TRUE if the named alarm is in INSUFFICIENT_DATA state. // - TRUE always evaluates to TRUE. // - FALSE always evaluates to FALSE. // // TRUE and FALSE are useful for testing a complex AlarmRule structure, and for testing your alarm actions. // // For more information about `AlarmRule` syntax, see [PutCompositeAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutCompositeAlarm.html) in the *Amazon CloudWatch API Reference* . AlarmRule() *string SetAlarmRule(val *string) // The ARN of the composite alarm, such as `arn:aws:cloudwatch:us-west-2:123456789012:alarm/CompositeAlarmName` . AttrArn() *string // Options for this resource, such as condition, update policy etc. // Experimental. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. // Experimental. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. // Experimental. CreationStack() *[]*string // The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. // // Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see [PutCompositeAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutCompositeAlarm.html) in the *Amazon CloudWatch API Reference* . InsufficientDataActions() *[]*string SetInsufficientDataActions(val *[]*string) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. // Experimental. LogicalId() *string // The construct tree node associated with this construct. // Experimental. Node() awscdk.ConstructNode // The actions to execute when this alarm transitions to the OK state from any other state. // // Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see [PutCompositeAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutCompositeAlarm.html) in the *Amazon CloudWatch API Reference* . OkActions() *[]*string SetOkActions(val *[]*string) // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. // Experimental. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). // Experimental. Stack() awscdk.Stack // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. // Experimental. UpdatedProperites() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. // Experimental. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. // Experimental. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // // Experimental. AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. // Experimental. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. // Experimental. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. // Experimental. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. // Experimental. GetAtt(attributeName *string) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // // Experimental. GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. OnPrepare() // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. OnSynthesize(session constructs.ISynthesisSession) // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. OnValidate() *[]*string // Overrides the auto-generated logical ID with a specific ID. // Experimental. OverrideLogicalId(newLogicalId *string) // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. Prepare() RenderProperties(props *map[string]interface{}) *map[string]interface{} // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. // Experimental. ShouldSynthesize() *bool // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. Synthesize(session awscdk.ISynthesisSession) // Returns a string representation of this construct. // // Returns: a string representation of this resource. // Experimental. ToString() *string // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. Validate() *[]*string // Experimental. ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::CloudWatch::CompositeAlarm`.
The `AWS::CloudWatch::CompositeAlarm` type creates or updates a composite alarm. When you create a composite alarm, you specify a rule expression for the alarm that takes into account the alarm states of other alarms that you have created. The composite alarm goes into ALARM state only if all conditions of the rule are met.
The alarms specified in a composite alarm's rule expression can include metric alarms and other composite alarms.
Using composite alarms can reduce alarm noise. You can create multiple metric alarms, and also create a composite alarm and set up alerts only for the composite alarm. For example, you could create a composite alarm that goes into ALARM state only when more than one of the underlying metric alarms are in ALARM state.
Currently, the only alarm actions that can be taken by composite alarms are notifying SNS topics.
When this operation creates an alarm, the alarm state is immediately set to INSUFFICIENT_DATA. The alarm is then evaluated and its state is set appropriately. Any actions associated with the new state are then executed. For a composite alarm, this initial time after creation is the only time that the alarm can be in INSUFFICIENT_DATA state.
When you update an existing alarm, its state is left unchanged, but the update completely overwrites the previous configuration of the alarm.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnCompositeAlarm := awscdk.Aws_cloudwatch.NewCfnCompositeAlarm(this, jsii.String("MyCfnCompositeAlarm"), &cfnCompositeAlarmProps{ alarmRule: jsii.String("alarmRule"), // the properties below are optional actionsEnabled: jsii.Boolean(false), actionsSuppressor: jsii.String("actionsSuppressor"), actionsSuppressorExtensionPeriod: jsii.Number(123), actionsSuppressorWaitPeriod: jsii.Number(123), alarmActions: []*string{ jsii.String("alarmActions"), }, alarmDescription: jsii.String("alarmDescription"), alarmName: jsii.String("alarmName"), insufficientDataActions: []*string{ jsii.String("insufficientDataActions"), }, okActions: []*string{ jsii.String("okActions"), }, })
func NewCfnCompositeAlarm ¶
func NewCfnCompositeAlarm(scope awscdk.Construct, id *string, props *CfnCompositeAlarmProps) CfnCompositeAlarm
Create a new `AWS::CloudWatch::CompositeAlarm`.
type CfnCompositeAlarmProps ¶
type CfnCompositeAlarmProps struct { // An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. // // For each alarm that you reference, you designate a function that specifies whether that alarm needs to be in ALARM state, OK state, or INSUFFICIENT_DATA state. You can use operators (AND, OR and NOT) to combine multiple functions in a single expression. You can use parenthesis to logically group the functions in your expression. // // You can use either alarm names or ARNs to reference the other alarms that are to be evaluated. // // Functions can include the following: // // - ALARM("alarm-name or alarm-ARN") is TRUE if the named alarm is in ALARM state. // - OK("alarm-name or alarm-ARN") is TRUE if the named alarm is in OK state. // - INSUFFICIENT_DATA("alarm-name or alarm-ARN") is TRUE if the named alarm is in INSUFFICIENT_DATA state. // - TRUE always evaluates to TRUE. // - FALSE always evaluates to FALSE. // // TRUE and FALSE are useful for testing a complex AlarmRule structure, and for testing your alarm actions. // // For more information about `AlarmRule` syntax, see [PutCompositeAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutCompositeAlarm.html) in the *Amazon CloudWatch API Reference* . AlarmRule *string `field:"required" json:"alarmRule" yaml:"alarmRule"` // Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. // // The default is TRUE. ActionsEnabled interface{} `field:"optional" json:"actionsEnabled" yaml:"actionsEnabled"` // Actions will be suppressed if the suppressor alarm is in the `ALARM` state. // // `ActionsSuppressor` can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm. ActionsSuppressor *string `field:"optional" json:"actionsSuppressor" yaml:"actionsSuppressor"` // The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the `ALARM` state. // // After this time, the composite alarm performs its actions. // // > `ExtensionPeriod` is required only when `ActionsSuppressor` is specified. ActionsSuppressorExtensionPeriod *float64 `field:"optional" json:"actionsSuppressorExtensionPeriod" yaml:"actionsSuppressorExtensionPeriod"` // The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the `ALARM` state. // // After this time, the composite alarm performs its actions. // // > `WaitPeriod` is required only when `ActionsSuppressor` is specified. ActionsSuppressorWaitPeriod *float64 `field:"optional" json:"actionsSuppressorWaitPeriod" yaml:"actionsSuppressorWaitPeriod"` // The actions to execute when this alarm transitions to the ALARM state from any other state. // // Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see [PutCompositeAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutCompositeAlarm.html) in the *Amazon CloudWatch API Reference* . AlarmActions *[]*string `field:"optional" json:"alarmActions" yaml:"alarmActions"` // The description for the composite alarm. AlarmDescription *string `field:"optional" json:"alarmDescription" yaml:"alarmDescription"` // The name for the composite alarm. // // This name must be unique within your AWS account. AlarmName *string `field:"optional" json:"alarmName" yaml:"alarmName"` // The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. // // Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see [PutCompositeAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutCompositeAlarm.html) in the *Amazon CloudWatch API Reference* . InsufficientDataActions *[]*string `field:"optional" json:"insufficientDataActions" yaml:"insufficientDataActions"` // The actions to execute when this alarm transitions to the OK state from any other state. // // Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see [PutCompositeAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutCompositeAlarm.html) in the *Amazon CloudWatch API Reference* . OkActions *[]*string `field:"optional" json:"okActions" yaml:"okActions"` }
Properties for defining a `CfnCompositeAlarm`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnCompositeAlarmProps := &cfnCompositeAlarmProps{ alarmRule: jsii.String("alarmRule"), // the properties below are optional actionsEnabled: jsii.Boolean(false), actionsSuppressor: jsii.String("actionsSuppressor"), actionsSuppressorExtensionPeriod: jsii.Number(123), actionsSuppressorWaitPeriod: jsii.Number(123), alarmActions: []*string{ jsii.String("alarmActions"), }, alarmDescription: jsii.String("alarmDescription"), alarmName: jsii.String("alarmName"), insufficientDataActions: []*string{ jsii.String("insufficientDataActions"), }, okActions: []*string{ jsii.String("okActions"), }, }
type CfnDashboard ¶
type CfnDashboard interface { awscdk.CfnResource awscdk.IInspectable // Options for this resource, such as condition, update policy etc. // Experimental. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. // Experimental. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. // Experimental. CreationStack() *[]*string // The detailed information about the dashboard in JSON format, including the widgets to include and their location on the dashboard. // // This parameter is required. // // For more information about the syntax, see [Dashboard Body Structure and Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html) . DashboardBody() *string SetDashboardBody(val *string) // The name of the dashboard. // // The name must be between 1 and 255 characters. If you do not specify a name, one will be generated automatically. DashboardName() *string SetDashboardName(val *string) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. // Experimental. LogicalId() *string // The construct tree node associated with this construct. // Experimental. Node() awscdk.ConstructNode // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. // Experimental. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). // Experimental. Stack() awscdk.Stack // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. // Experimental. UpdatedProperites() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. // Experimental. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. // Experimental. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // // Experimental. AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. // Experimental. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. // Experimental. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. // Experimental. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. // Experimental. GetAtt(attributeName *string) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // // Experimental. GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. OnPrepare() // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. OnSynthesize(session constructs.ISynthesisSession) // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. OnValidate() *[]*string // Overrides the auto-generated logical ID with a specific ID. // Experimental. OverrideLogicalId(newLogicalId *string) // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. Prepare() RenderProperties(props *map[string]interface{}) *map[string]interface{} // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. // Experimental. ShouldSynthesize() *bool // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. Synthesize(session awscdk.ISynthesisSession) // Returns a string representation of this construct. // // Returns: a string representation of this resource. // Experimental. ToString() *string // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. Validate() *[]*string // Experimental. ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::CloudWatch::Dashboard`.
The `AWS::CloudWatch::Dashboard` resource specifies an Amazon CloudWatch dashboard. A dashboard is a customizable home page in the CloudWatch console that you can use to monitor your AWS resources in a single view.
All dashboards in your account are global, not region-specific.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnDashboard := awscdk.Aws_cloudwatch.NewCfnDashboard(this, jsii.String("MyCfnDashboard"), &cfnDashboardProps{ dashboardBody: jsii.String("dashboardBody"), // the properties below are optional dashboardName: jsii.String("dashboardName"), })
func NewCfnDashboard ¶
func NewCfnDashboard(scope awscdk.Construct, id *string, props *CfnDashboardProps) CfnDashboard
Create a new `AWS::CloudWatch::Dashboard`.
type CfnDashboardProps ¶
type CfnDashboardProps struct { // The detailed information about the dashboard in JSON format, including the widgets to include and their location on the dashboard. // // This parameter is required. // // For more information about the syntax, see [Dashboard Body Structure and Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html) . DashboardBody *string `field:"required" json:"dashboardBody" yaml:"dashboardBody"` // The name of the dashboard. // // The name must be between 1 and 255 characters. If you do not specify a name, one will be generated automatically. DashboardName *string `field:"optional" json:"dashboardName" yaml:"dashboardName"` }
Properties for defining a `CfnDashboard`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnDashboardProps := &cfnDashboardProps{ dashboardBody: jsii.String("dashboardBody"), // the properties below are optional dashboardName: jsii.String("dashboardName"), }
type CfnInsightRule ¶
type CfnInsightRule interface { awscdk.CfnResource awscdk.IInspectable // The ARN of the Contributor Insights rule, such as `arn:aws:cloudwatch:us-west-2:123456789012:insight-rule/MyInsightRuleName` . AttrArn() *string // The name of the Contributor Insights rule. AttrRuleName() *string // Options for this resource, such as condition, update policy etc. // Experimental. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. // Experimental. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. // Experimental. CreationStack() *[]*string // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. // Experimental. LogicalId() *string // The construct tree node associated with this construct. // Experimental. Node() awscdk.ConstructNode // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. // Experimental. Ref() *string // The definition of the rule, as a JSON object. // // For details about the syntax, see [Contributor Insights Rule Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights-RuleSyntax.html) in the *Amazon CloudWatch User Guide* . RuleBody() *string SetRuleBody(val *string) // The name of the rule. RuleName() *string SetRuleName(val *string) // The current state of the rule. // // Valid values are `ENABLED` and `DISABLED` . RuleState() *string SetRuleState(val *string) // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). // Experimental. Stack() awscdk.Stack // A list of key-value pairs to associate with the Contributor Insights rule. // // You can associate as many as 50 tags with a rule. // // Tags can help you organize and categorize your resources. For more information, see [Tagging Your Amazon CloudWatch Resources](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Tagging.html) . // // To be able to associate tags with a rule, you must have the `cloudwatch:TagResource` permission in addition to the `cloudwatch:PutInsightRule` permission. Tags() awscdk.TagManager // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. // Experimental. UpdatedProperites() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. // Experimental. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. // Experimental. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // // Experimental. AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. // Experimental. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. // Experimental. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. // Experimental. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. // Experimental. GetAtt(attributeName *string) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // // Experimental. GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. OnPrepare() // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. OnSynthesize(session constructs.ISynthesisSession) // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. OnValidate() *[]*string // Overrides the auto-generated logical ID with a specific ID. // Experimental. OverrideLogicalId(newLogicalId *string) // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. Prepare() RenderProperties(props *map[string]interface{}) *map[string]interface{} // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. // Experimental. ShouldSynthesize() *bool // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. Synthesize(session awscdk.ISynthesisSession) // Returns a string representation of this construct. // // Returns: a string representation of this resource. // Experimental. ToString() *string // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. Validate() *[]*string // Experimental. ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::CloudWatch::InsightRule`.
Creates or updates a Contributor Insights rule. Rules evaluate log events in a CloudWatch Logs log group, enabling you to find contributor data for the log events in that log group. For more information, see [Using Contributor Insights to Analyze High-Cardinality Data](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights.html) in the *Amazon CloudWatch User Guide* .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnInsightRule := awscdk.Aws_cloudwatch.NewCfnInsightRule(this, jsii.String("MyCfnInsightRule"), &cfnInsightRuleProps{ ruleBody: jsii.String("ruleBody"), ruleName: jsii.String("ruleName"), ruleState: jsii.String("ruleState"), // the properties below are optional tags: []interface{}{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, })
func NewCfnInsightRule ¶
func NewCfnInsightRule(scope awscdk.Construct, id *string, props *CfnInsightRuleProps) CfnInsightRule
Create a new `AWS::CloudWatch::InsightRule`.
type CfnInsightRuleProps ¶
type CfnInsightRuleProps struct { // The definition of the rule, as a JSON object. // // For details about the syntax, see [Contributor Insights Rule Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights-RuleSyntax.html) in the *Amazon CloudWatch User Guide* . RuleBody *string `field:"required" json:"ruleBody" yaml:"ruleBody"` // The name of the rule. RuleName *string `field:"required" json:"ruleName" yaml:"ruleName"` // The current state of the rule. // // Valid values are `ENABLED` and `DISABLED` . RuleState *string `field:"required" json:"ruleState" yaml:"ruleState"` // A list of key-value pairs to associate with the Contributor Insights rule. // // You can associate as many as 50 tags with a rule. // // Tags can help you organize and categorize your resources. For more information, see [Tagging Your Amazon CloudWatch Resources](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Tagging.html) . // // To be able to associate tags with a rule, you must have the `cloudwatch:TagResource` permission in addition to the `cloudwatch:PutInsightRule` permission. Tags interface{} `field:"optional" json:"tags" yaml:"tags"` }
Properties for defining a `CfnInsightRule`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnInsightRuleProps := &cfnInsightRuleProps{ ruleBody: jsii.String("ruleBody"), ruleName: jsii.String("ruleName"), ruleState: jsii.String("ruleState"), // the properties below are optional tags: []interface{}{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, }
type CfnMetricStream ¶
type CfnMetricStream interface { awscdk.CfnResource awscdk.IInspectable // The ARN of the metric stream. AttrArn() *string // The date that the metric stream was originally created. AttrCreationDate() *string // The date that the metric stream was most recently updated. AttrLastUpdateDate() *string // The state of the metric stream, either `running` or `stopped` . AttrState() *string // Options for this resource, such as condition, update policy etc. // Experimental. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. // Experimental. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. // Experimental. CreationStack() *[]*string // If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that you specify here. // // You cannot specify both `IncludeFilters` and `ExcludeFilters` in the same metric stream. // // When you modify the `IncludeFilters` or `ExcludeFilters` of an existing metric stream in any way, the metric stream is effectively restarted, so after such a change you will get only the datapoints that have a timestamp after the time of the update. ExcludeFilters() interface{} SetExcludeFilters(val interface{}) // The ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream. // // This Amazon Kinesis Firehose delivery stream must already exist and must be in the same account as the metric stream. FirehoseArn() *string SetFirehoseArn(val *string) // If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify here. // // You cannot specify both `IncludeFilters` and `ExcludeFilters` in the same metric stream. // // When you modify the `IncludeFilters` or `ExcludeFilters` of an existing metric stream in any way, the metric stream is effectively restarted, so after such a change you will get only the datapoints that have a timestamp after the time of the update. IncludeFilters() interface{} SetIncludeFilters(val interface{}) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. // Experimental. LogicalId() *string // If you are creating a new metric stream, this is the name for the new stream. // // The name must be different than the names of other metric streams in this account and Region. // // If you are updating a metric stream, specify the name of that stream here. Name() *string SetName(val *string) // The construct tree node associated with this construct. // Experimental. Node() awscdk.ConstructNode // The output format for the stream. // // Valid values are `json` and `opentelemetry0.7` For more information about metric stream output formats, see [Metric streams output formats](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-metric-streams-formats.html) . // // This parameter is required. OutputFormat() *string SetOutputFormat(val *string) // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. // Experimental. Ref() *string // The ARN of an IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. // // This IAM role must already exist and must be in the same account as the metric stream. This IAM role must include the `firehose:PutRecord` and `firehose:PutRecordBatch` permissions. RoleArn() *string SetRoleArn(val *string) // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). // Experimental. Stack() awscdk.Stack // By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. // // You can use this parameter to have the metric stream also send additional statistics in the stream. This array can have up to 100 members. // // For each entry in this array, you specify one or more metrics and the list of additional statistics to stream for those metrics. The additional statistics that you can stream depend on the stream's `OutputFormat` . If the `OutputFormat` is `json` , you can stream any additional statistic that is supported by CloudWatch , listed in [CloudWatch statistics definitions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.html) . If the `OutputFormat` is `opentelemetry0` .7, you can stream percentile statistics *(p??)* . StatisticsConfigurations() interface{} SetStatisticsConfigurations(val interface{}) // An array of key-value pairs to apply to the metric stream. // // For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) . Tags() awscdk.TagManager // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. // Experimental. UpdatedProperites() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. // Experimental. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. // Experimental. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // // Experimental. AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. // Experimental. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. // Experimental. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. // Experimental. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. // Experimental. GetAtt(attributeName *string) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // // Experimental. GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. OnPrepare() // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. OnSynthesize(session constructs.ISynthesisSession) // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. OnValidate() *[]*string // Overrides the auto-generated logical ID with a specific ID. // Experimental. OverrideLogicalId(newLogicalId *string) // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. Prepare() RenderProperties(props *map[string]interface{}) *map[string]interface{} // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. // Experimental. ShouldSynthesize() *bool // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. Synthesize(session awscdk.ISynthesisSession) // Returns a string representation of this construct. // // Returns: a string representation of this resource. // Experimental. ToString() *string // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. Validate() *[]*string // Experimental. ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::CloudWatch::MetricStream`.
Creates or updates a metric stream. Metrics streams can automatically stream CloudWatch metrics to AWS destinations including Amazon S3 and to many third-party solutions. For more information, see [Metric streams](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Metric-Streams.html) .
To create a metric stream, you must be logged on to an account that has the `iam:PassRole` permission and either the *CloudWatchFullAccess* policy or the `cloudwatch:PutMetricStream` permission.
When you create or update a metric stream, you choose one of the following:
- Stream metrics from all metric namespaces in the account. - Stream metrics from all metric namespaces in the account, except for the namespaces that you list in `ExcludeFilters` . - Stream metrics from only the metric namespaces that you list in `IncludeFilters` .
When you create a metric stream, the stream is created in the `running` state. If you update an existing metric stream, the state does not change.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnMetricStream := awscdk.Aws_cloudwatch.NewCfnMetricStream(this, jsii.String("MyCfnMetricStream"), &cfnMetricStreamProps{ firehoseArn: jsii.String("firehoseArn"), outputFormat: jsii.String("outputFormat"), roleArn: jsii.String("roleArn"), // the properties below are optional excludeFilters: []interface{}{ &metricStreamFilterProperty{ namespace: jsii.String("namespace"), }, }, includeFilters: []interface{}{ &metricStreamFilterProperty{ namespace: jsii.String("namespace"), }, }, name: jsii.String("name"), statisticsConfigurations: []interface{}{ &metricStreamStatisticsConfigurationProperty{ additionalStatistics: []*string{ jsii.String("additionalStatistics"), }, includeMetrics: []interface{}{ &metricStreamStatisticsMetricProperty{ metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), }, }, }, }, tags: []cfnTag{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, })
func NewCfnMetricStream ¶
func NewCfnMetricStream(scope awscdk.Construct, id *string, props *CfnMetricStreamProps) CfnMetricStream
Create a new `AWS::CloudWatch::MetricStream`.
type CfnMetricStreamProps ¶
type CfnMetricStreamProps struct { // The ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream. // // This Amazon Kinesis Firehose delivery stream must already exist and must be in the same account as the metric stream. FirehoseArn *string `field:"required" json:"firehoseArn" yaml:"firehoseArn"` // The output format for the stream. // // Valid values are `json` and `opentelemetry0.7` For more information about metric stream output formats, see [Metric streams output formats](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-metric-streams-formats.html) . // // This parameter is required. OutputFormat *string `field:"required" json:"outputFormat" yaml:"outputFormat"` // The ARN of an IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. // // This IAM role must already exist and must be in the same account as the metric stream. This IAM role must include the `firehose:PutRecord` and `firehose:PutRecordBatch` permissions. RoleArn *string `field:"required" json:"roleArn" yaml:"roleArn"` // If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that you specify here. // // You cannot specify both `IncludeFilters` and `ExcludeFilters` in the same metric stream. // // When you modify the `IncludeFilters` or `ExcludeFilters` of an existing metric stream in any way, the metric stream is effectively restarted, so after such a change you will get only the datapoints that have a timestamp after the time of the update. ExcludeFilters interface{} `field:"optional" json:"excludeFilters" yaml:"excludeFilters"` // If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify here. // // You cannot specify both `IncludeFilters` and `ExcludeFilters` in the same metric stream. // // When you modify the `IncludeFilters` or `ExcludeFilters` of an existing metric stream in any way, the metric stream is effectively restarted, so after such a change you will get only the datapoints that have a timestamp after the time of the update. IncludeFilters interface{} `field:"optional" json:"includeFilters" yaml:"includeFilters"` // If you are creating a new metric stream, this is the name for the new stream. // // The name must be different than the names of other metric streams in this account and Region. // // If you are updating a metric stream, specify the name of that stream here. Name *string `field:"optional" json:"name" yaml:"name"` // By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. // // You can use this parameter to have the metric stream also send additional statistics in the stream. This array can have up to 100 members. // // For each entry in this array, you specify one or more metrics and the list of additional statistics to stream for those metrics. The additional statistics that you can stream depend on the stream's `OutputFormat` . If the `OutputFormat` is `json` , you can stream any additional statistic that is supported by CloudWatch , listed in [CloudWatch statistics definitions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.html) . If the `OutputFormat` is `opentelemetry0` .7, you can stream percentile statistics *(p??)* . StatisticsConfigurations interface{} `field:"optional" json:"statisticsConfigurations" yaml:"statisticsConfigurations"` // An array of key-value pairs to apply to the metric stream. // // For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) . Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` }
Properties for defining a `CfnMetricStream`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnMetricStreamProps := &cfnMetricStreamProps{ firehoseArn: jsii.String("firehoseArn"), outputFormat: jsii.String("outputFormat"), roleArn: jsii.String("roleArn"), // the properties below are optional excludeFilters: []interface{}{ &metricStreamFilterProperty{ namespace: jsii.String("namespace"), }, }, includeFilters: []interface{}{ &metricStreamFilterProperty{ namespace: jsii.String("namespace"), }, }, name: jsii.String("name"), statisticsConfigurations: []interface{}{ &metricStreamStatisticsConfigurationProperty{ additionalStatistics: []*string{ jsii.String("additionalStatistics"), }, includeMetrics: []interface{}{ &metricStreamStatisticsMetricProperty{ metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), }, }, }, }, tags: []cfnTag{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, }
type CfnMetricStream_MetricStreamFilterProperty ¶
type CfnMetricStream_MetricStreamFilterProperty struct { // The name of the metric namespace in the filter. Namespace *string `field:"required" json:"namespace" yaml:"namespace"` }
This structure contains the name of one of the metric namespaces that is listed in a filter of a metric stream.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" metricStreamFilterProperty := &metricStreamFilterProperty{ namespace: jsii.String("namespace"), }
type CfnMetricStream_MetricStreamStatisticsConfigurationProperty ¶
type CfnMetricStream_MetricStreamStatisticsConfigurationProperty struct { // The additional statistics to stream for the metrics listed in `IncludeMetrics` . AdditionalStatistics *[]*string `field:"required" json:"additionalStatistics" yaml:"additionalStatistics"` // An array that defines the metrics that are to have additional statistics streamed. IncludeMetrics interface{} `field:"required" json:"includeMetrics" yaml:"includeMetrics"` }
This structure specifies a list of additional statistics to stream, and the metrics to stream those additional statistics for.
All metrics that match the combination of metric name and namespace will be streamed with the additional statistics, no matter their dimensions.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" metricStreamStatisticsConfigurationProperty := &metricStreamStatisticsConfigurationProperty{ additionalStatistics: []*string{ jsii.String("additionalStatistics"), }, includeMetrics: []interface{}{ &metricStreamStatisticsMetricProperty{ metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), }, }, }
type CfnMetricStream_MetricStreamStatisticsMetricProperty ¶
type CfnMetricStream_MetricStreamStatisticsMetricProperty struct { // The name of the metric. MetricName *string `field:"required" json:"metricName" yaml:"metricName"` // The namespace of the metric. Namespace *string `field:"required" json:"namespace" yaml:"namespace"` }
A structure that specifies the metric name and namespace for one metric that is going to have additional statistics included in the stream.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" metricStreamStatisticsMetricProperty := &metricStreamStatisticsMetricProperty{ metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), }
type Color ¶
type Color interface { }
A set of standard colours that can be used in annotations in a GraphWidget.
Example:
var dashboard dashboard var executionCountMetric metric var errorCountMetric metric dashboard.addWidgets(cloudwatch.NewGraphWidget(&graphWidgetProps{ title: jsii.String("Executions vs error rate"), left: []iMetric{ executionCountMetric, }, right: []*iMetric{ errorCountMetric.with(&metricOptions{ statistic: jsii.String("average"), label: jsii.String("Error rate"), color: cloudwatch.color_GREEN(), }), }, }))
Experimental.
type Column ¶
type Column interface { IWidget // The amount of vertical grid units the widget will take up. // Experimental. Height() *float64 // List of contained widgets. // Experimental. Widgets() *[]IWidget // The amount of horizontal grid units the widget will take up. // Experimental. Width() *float64 // Place the widget at a given position. // Experimental. Position(x *float64, y *float64) // Return the widget JSON for use in the dashboard. // Experimental. ToJson() *[]interface{} }
A widget that contains other widgets in a vertical column.
Widgets will be laid out next to each other.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var widget iWidget column := awscdk.Aws_cloudwatch.NewColumn(widget)
Experimental.
type CommonMetricOptions ¶
type CommonMetricOptions struct { // Account which this metric comes from. // Experimental. Account *string `field:"optional" json:"account" yaml:"account"` // 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. // Experimental. Color *string `field:"optional" json:"color" yaml:"color"` // Dimensions of the metric. // Deprecated: Use 'dimensionsMap' instead. Dimensions *map[string]interface{} `field:"optional" json:"dimensions" yaml:"dimensions"` // Dimensions of the metric. // Experimental. DimensionsMap *map[string]*string `field:"optional" json:"dimensionsMap" yaml:"dimensionsMap"` // 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. // Experimental. Label *string `field:"optional" json:"label" yaml:"label"` // The period over which the specified statistic is applied. // Experimental. Period awscdk.Duration `field:"optional" json:"period" yaml:"period"` // Region which this metric comes from. // Experimental. Region *string `field:"optional" json:"region" yaml:"region"` // What function to use for aggregating. // // Can be one of the following: // // - "Minimum" | "min" // - "Maximum" | "max" // - "Average" | "avg" // - "Sum" | "sum" // - "SampleCount | "n" // - "pNN.NN" // Experimental. Statistic *string `field:"optional" json:"statistic" yaml:"statistic"` // 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. // Experimental. Unit Unit `field:"optional" json:"unit" yaml:"unit"` }
Options shared by most methods accepting metric options.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import monocdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var dimensions interface{} var duration duration commonMetricOptions := &commonMetricOptions{ account: jsii.String("account"), color: jsii.String("color"), dimensions: map[string]interface{}{ "dimensionsKey": dimensions, }, dimensionsMap: map[string]*string{ "dimensionsMapKey": jsii.String("dimensionsMap"), }, label: jsii.String("label"), period: duration, region: jsii.String("region"), statistic: jsii.String("statistic"), unit: awscdk.Aws_cloudwatch.unit_SECONDS, }
Experimental.
type ComparisonOperator ¶
type ComparisonOperator string
Comparison operator for evaluating alarms.
Example:
import cloudwatch "github.com/aws/aws-cdk-go/awscdk" var myHostedZone hostedZone certificate := acm.NewCertificate(this, jsii.String("Certificate"), &certificateProps{ domainName: jsii.String("hello.example.com"), validation: acm.certificateValidation.fromDns(myHostedZone), }) certificate.metricDaysToExpiry().createAlarm(this, jsii.String("Alarm"), &createAlarmOptions{ comparisonOperator: cloudwatch.comparisonOperator_LESS_THAN_THRESHOLD, evaluationPeriods: jsii.Number(1), threshold: jsii.Number(45), })
Experimental.
const ( // Specified statistic is greater than or equal to the threshold. // Experimental. ComparisonOperator_GREATER_THAN_OR_EQUAL_TO_THRESHOLD ComparisonOperator = "GREATER_THAN_OR_EQUAL_TO_THRESHOLD" // Specified statistic is strictly greater than the threshold. // Experimental. ComparisonOperator_GREATER_THAN_THRESHOLD ComparisonOperator = "GREATER_THAN_THRESHOLD" // Specified statistic is strictly less than the threshold. // Experimental. ComparisonOperator_LESS_THAN_THRESHOLD ComparisonOperator = "LESS_THAN_THRESHOLD" // Specified statistic is less than or equal to the threshold. // Experimental. ComparisonOperator_LESS_THAN_OR_EQUAL_TO_THRESHOLD ComparisonOperator = "LESS_THAN_OR_EQUAL_TO_THRESHOLD" // Specified statistic is lower than or greater than the anomaly model band. // // Used only for alarms based on anomaly detection models. // Experimental. ComparisonOperator_LESS_THAN_LOWER_OR_GREATER_THAN_UPPER_THRESHOLD ComparisonOperator = "LESS_THAN_LOWER_OR_GREATER_THAN_UPPER_THRESHOLD" // Specified statistic is greater than the anomaly model band. // // Used only for alarms based on anomaly detection models. // Experimental. ComparisonOperator_GREATER_THAN_UPPER_THRESHOLD ComparisonOperator = "GREATER_THAN_UPPER_THRESHOLD" // Specified statistic is lower than the anomaly model band. // // Used only for alarms based on anomaly detection models. // Experimental. ComparisonOperator_LESS_THAN_LOWER_THRESHOLD ComparisonOperator = "LESS_THAN_LOWER_THRESHOLD" )
type CompositeAlarm ¶
type CompositeAlarm interface { AlarmBase // Experimental. AlarmActionArns() *[]*string // Experimental. SetAlarmActionArns(val *[]*string) // ARN of this alarm. // Experimental. AlarmArn() *string // Name of this alarm. // Experimental. AlarmName() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // Experimental. InsufficientDataActionArns() *[]*string // Experimental. SetInsufficientDataActionArns(val *[]*string) // The construct tree node associated with this construct. // Experimental. Node() awscdk.ConstructNode // Experimental. OkActionArns() *[]*string // Experimental. SetOkActionArns(val *[]*string) // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Trigger this action if the alarm fires. // // Typically the ARN of an SNS topic or ARN of an AutoScaling policy. // Experimental. AddAlarmAction(actions ...IAlarmAction) // Trigger this action if there is insufficient data to evaluate the alarm. // // Typically the ARN of an SNS topic or ARN of an AutoScaling policy. // Experimental. AddInsufficientDataAction(actions ...IAlarmAction) // Trigger this action if the alarm returns from breaching state into ok state. // // Typically the ARN of an SNS topic or ARN of an AutoScaling policy. // Experimental. AddOkAction(actions ...IAlarmAction) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. OnPrepare() // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. OnSynthesize(session constructs.ISynthesisSession) // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. OnValidate() *[]*string // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. Prepare() // AlarmRule indicating ALARM state for Alarm. // Experimental. RenderAlarmRule() *string // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. Synthesize(session awscdk.ISynthesisSession) // Returns a string representation of this construct. // Experimental. ToString() *string // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. Validate() *[]*string }
A Composite Alarm based on Alarm Rule.
Example:
var alarm1 alarm var alarm2 alarm var alarm3 alarm var alarm4 alarm alarmRule := cloudwatch.alarmRule.anyOf(cloudwatch.alarmRule.allOf(cloudwatch.alarmRule.anyOf(alarm1, cloudwatch.alarmRule.fromAlarm(alarm2, cloudwatch.alarmState_OK), alarm3), cloudwatch.alarmRule.not(cloudwatch.alarmRule.fromAlarm(alarm4, cloudwatch.alarmState_INSUFFICIENT_DATA))), cloudwatch.alarmRule.fromBoolean(jsii.Boolean(false))) cloudwatch.NewCompositeAlarm(this, jsii.String("MyAwesomeCompositeAlarm"), &compositeAlarmProps{ alarmRule: alarmRule, })
Experimental.
func NewCompositeAlarm ¶
func NewCompositeAlarm(scope constructs.Construct, id *string, props *CompositeAlarmProps) CompositeAlarm
Experimental.
type CompositeAlarmProps ¶
type CompositeAlarmProps struct { // Expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. // Experimental. AlarmRule IAlarmRule `field:"required" json:"alarmRule" yaml:"alarmRule"` // Whether the actions for this alarm are enabled. // Experimental. ActionsEnabled *bool `field:"optional" json:"actionsEnabled" yaml:"actionsEnabled"` // Description for the alarm. // Experimental. AlarmDescription *string `field:"optional" json:"alarmDescription" yaml:"alarmDescription"` // Name of the alarm. // Experimental. CompositeAlarmName *string `field:"optional" json:"compositeAlarmName" yaml:"compositeAlarmName"` }
Properties for creating a Composite Alarm.
Example:
var alarm1 alarm var alarm2 alarm var alarm3 alarm var alarm4 alarm alarmRule := cloudwatch.alarmRule.anyOf(cloudwatch.alarmRule.allOf(cloudwatch.alarmRule.anyOf(alarm1, cloudwatch.alarmRule.fromAlarm(alarm2, cloudwatch.alarmState_OK), alarm3), cloudwatch.alarmRule.not(cloudwatch.alarmRule.fromAlarm(alarm4, cloudwatch.alarmState_INSUFFICIENT_DATA))), cloudwatch.alarmRule.fromBoolean(jsii.Boolean(false))) cloudwatch.NewCompositeAlarm(this, jsii.String("MyAwesomeCompositeAlarm"), &compositeAlarmProps{ alarmRule: alarmRule, })
Experimental.
type ConcreteWidget ¶
type ConcreteWidget interface { IWidget // The amount of vertical grid units the widget will take up. // Experimental. Height() *float64 // Any warnings that are produced as a result of putting together this widget. // Experimental. Warnings() *[]*string // The amount of horizontal grid units the widget will take up. // Experimental. Width() *float64 // Experimental. X() *float64 // Experimental. SetX(val *float64) // Experimental. Y() *float64 // Experimental. SetY(val *float64) // Copy the warnings from the given metric. // Experimental. CopyMetricWarnings(ms ...IMetric) // Place the widget at a given position. // Experimental. Position(x *float64, y *float64) // Return the widget JSON for use in the dashboard. // Experimental. ToJson() *[]interface{} }
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. Experimental.
type CreateAlarmOptions ¶
type CreateAlarmOptions struct { // The number of periods over which data is compared to the specified threshold. // Experimental. EvaluationPeriods *float64 `field:"required" json:"evaluationPeriods" yaml:"evaluationPeriods"` // The value against which the specified statistic is compared. // Experimental. Threshold *float64 `field:"required" json:"threshold" yaml:"threshold"` // Whether the actions for this alarm are enabled. // Experimental. ActionsEnabled *bool `field:"optional" json:"actionsEnabled" yaml:"actionsEnabled"` // Description for the alarm. // Experimental. AlarmDescription *string `field:"optional" json:"alarmDescription" yaml:"alarmDescription"` // Name of the alarm. // Experimental. AlarmName *string `field:"optional" json:"alarmName" yaml:"alarmName"` // Comparison to use to check if metric is breaching. // Experimental. ComparisonOperator ComparisonOperator `field:"optional" json:"comparisonOperator" yaml:"comparisonOperator"` // 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. // See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation // // Experimental. DatapointsToAlarm *float64 `field:"optional" json:"datapointsToAlarm" yaml:"datapointsToAlarm"` // 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. // Experimental. EvaluateLowSampleCountPercentile *string `field:"optional" json:"evaluateLowSampleCountPercentile" yaml:"evaluateLowSampleCountPercentile"` // The period over which the specified statistic is applied. // // Cannot be used with `MathExpression` objects. // Deprecated: Use `metric.with({ period: ... })` to encode the period into the Metric object Period awscdk.Duration `field:"optional" json:"period" yaml:"period"` // What function to use for aggregating. // // Can be one of the following: // // - "Minimum" | "min" // - "Maximum" | "max" // - "Average" | "avg" // - "Sum" | "sum" // - "SampleCount | "n" // - "pNN.NN" // // Cannot be used with `MathExpression` objects. // Deprecated: Use `metric.with({ statistic: ... })` to encode the period into the Metric object Statistic *string `field:"optional" json:"statistic" yaml:"statistic"` // Sets how this alarm is to handle missing data points. // Experimental. TreatMissingData TreatMissingData `field:"optional" json:"treatMissingData" yaml:"treatMissingData"` }
Properties needed to make an alarm from a metric.
Example:
import cloudwatch "github.com/aws/aws-cdk-go/awscdk" var myHostedZone hostedZone certificate := acm.NewCertificate(this, jsii.String("Certificate"), &certificateProps{ domainName: jsii.String("hello.example.com"), validation: acm.certificateValidation.fromDns(myHostedZone), }) certificate.metricDaysToExpiry().createAlarm(this, jsii.String("Alarm"), &createAlarmOptions{ comparisonOperator: cloudwatch.comparisonOperator_LESS_THAN_THRESHOLD, evaluationPeriods: jsii.Number(1), threshold: jsii.Number(45), })
Experimental.
type CustomWidget ¶
type CustomWidget interface { ConcreteWidget // The amount of vertical grid units the widget will take up. // Experimental. Height() *float64 // Any warnings that are produced as a result of putting together this widget. // Experimental. Warnings() *[]*string // The amount of horizontal grid units the widget will take up. // Experimental. Width() *float64 // Experimental. X() *float64 // Experimental. SetX(val *float64) // Experimental. Y() *float64 // Experimental. SetY(val *float64) // Copy the warnings from the given metric. // Experimental. CopyMetricWarnings(ms ...IMetric) // Place the widget at a given position. // Experimental. Position(x *float64, y *float64) // Return the widget JSON for use in the dashboard. // Experimental. ToJson() *[]interface{} }
A CustomWidget shows the result of a AWS lambda function.
Example:
var dashboard dashboard // Import or create a lambda function fn := lambda.function.fromFunctionArn(dashboard, jsii.String("Function"), jsii.String("arn:aws:lambda:us-east-1:123456789012:function:MyFn")) dashboard.addWidgets(cloudwatch.NewCustomWidget(&customWidgetProps{ functionArn: fn.functionArn, title: jsii.String("My lambda baked widget"), }))
Experimental.
type CustomWidgetProps ¶
type CustomWidgetProps struct { // The Arn of the AWS Lambda function that returns HTML or JSON that will be displayed in the widget. // Experimental. FunctionArn *string `field:"required" json:"functionArn" yaml:"functionArn"` // The title of the widget. // Experimental. Title *string `field:"required" json:"title" yaml:"title"` // Height of the widget. // Experimental. Height *float64 `field:"optional" json:"height" yaml:"height"` // Parameters passed to the lambda function. // Experimental. Params interface{} `field:"optional" json:"params" yaml:"params"` // Update the widget on refresh. // Experimental. UpdateOnRefresh *bool `field:"optional" json:"updateOnRefresh" yaml:"updateOnRefresh"` // Update the widget on resize. // Experimental. UpdateOnResize *bool `field:"optional" json:"updateOnResize" yaml:"updateOnResize"` // Update the widget on time range change. // Experimental. UpdateOnTimeRangeChange *bool `field:"optional" json:"updateOnTimeRangeChange" yaml:"updateOnTimeRangeChange"` // Width of the widget, in a grid of 24 units wide. // Experimental. Width *float64 `field:"optional" json:"width" yaml:"width"` }
The properties for a CustomWidget.
Example:
var dashboard dashboard // Import or create a lambda function fn := lambda.function.fromFunctionArn(dashboard, jsii.String("Function"), jsii.String("arn:aws:lambda:us-east-1:123456789012:function:MyFn")) dashboard.addWidgets(cloudwatch.NewCustomWidget(&customWidgetProps{ functionArn: fn.functionArn, title: jsii.String("My lambda baked widget"), }))
Experimental.
type Dashboard ¶
type Dashboard interface { awscdk.Resource // ARN of this dashboard. // Experimental. DashboardArn() *string // The name of this dashboard. // Experimental. DashboardName() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The construct tree node associated with this construct. // Experimental. Node() awscdk.ConstructNode // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // 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. // Experimental. AddWidgets(widgets ...IWidget) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. OnPrepare() // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. OnSynthesize(session constructs.ISynthesisSession) // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. OnValidate() *[]*string // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. // Experimental. Prepare() // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. // Experimental. Synthesize(session awscdk.ISynthesisSession) // Returns a string representation of this construct. // Experimental. ToString() *string // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. // Experimental. Validate() *[]*string }
A CloudWatch dashboard.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var widget iWidget dashboard := awscdk.Aws_cloudwatch.NewDashboard(this, jsii.String("MyDashboard"), &dashboardProps{ dashboardName: jsii.String("dashboardName"), end: jsii.String("end"), periodOverride: awscdk.*Aws_cloudwatch.periodOverride_AUTO, start: jsii.String("start"), widgets: [][]*iWidget{ []*iWidget{ widget, }, }, })
Experimental.
func NewDashboard ¶
func NewDashboard(scope constructs.Construct, id *string, props *DashboardProps) Dashboard
Experimental.
type DashboardProps ¶
type DashboardProps struct { // Name of the dashboard. // // If set, must only contain alphanumerics, dash (-) and underscore (_). // Experimental. DashboardName *string `field:"optional" json:"dashboardName" yaml:"dashboardName"` // 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. // Experimental. End *string `field:"optional" json:"end" yaml:"end"` // 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. // Experimental. PeriodOverride PeriodOverride `field:"optional" json:"periodOverride" yaml:"periodOverride"` // 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. // Experimental. Start *string `field:"optional" json:"start" yaml:"start"` // Initial set of widgets on the dashboard. // // One array represents a row of widgets. // Experimental. Widgets *[]*[]IWidget `field:"optional" json:"widgets" yaml:"widgets"` }
Properties for defining a CloudWatch Dashboard.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var widget iWidget dashboardProps := &dashboardProps{ dashboardName: jsii.String("dashboardName"), end: jsii.String("end"), periodOverride: awscdk.Aws_cloudwatch.periodOverride_AUTO, start: jsii.String("start"), widgets: [][]*iWidget{ []*iWidget{ widget, }, }, }
Experimental.
type Dimension ¶
type Dimension struct { // Name of the dimension. // Experimental. Name *string `field:"required" json:"name" yaml:"name"` // Value of the dimension. // Experimental. Value interface{} `field:"required" json:"value" yaml:"value"` }
Metric dimension.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var value interface{} dimension := &dimension{ name: jsii.String("name"), value: value, }
See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-dimension.html
Experimental.
type GraphWidget ¶
type GraphWidget interface { ConcreteWidget // The amount of vertical grid units the widget will take up. // Experimental. Height() *float64 // Any warnings that are produced as a result of putting together this widget. // Experimental. Warnings() *[]*string // The amount of horizontal grid units the widget will take up. // Experimental. Width() *float64 // Experimental. X() *float64 // Experimental. SetX(val *float64) // Experimental. Y() *float64 // Experimental. SetY(val *float64) // Add another metric to the left Y axis of the GraphWidget. // Experimental. AddLeftMetric(metric IMetric) // Add another metric to the right Y axis of the GraphWidget. // Experimental. AddRightMetric(metric IMetric) // Copy the warnings from the given metric. // Experimental. CopyMetricWarnings(ms ...IMetric) // Place the widget at a given position. // Experimental. Position(x *float64, y *float64) // Return the widget JSON for use in the dashboard. // Experimental. ToJson() *[]interface{} }
A dashboard widget that displays metrics.
Example:
var dashboard dashboard dashboard.addWidgets(cloudwatch.NewGraphWidget(&graphWidgetProps{ // ... legendPosition: cloudwatch.legendPosition_RIGHT, }))
Experimental.
type GraphWidgetProps ¶
type GraphWidgetProps struct { // Height of the widget. // Experimental. Height *float64 `field:"optional" json:"height" yaml:"height"` // The region the metrics of this graph should be taken from. // Experimental. Region *string `field:"optional" json:"region" yaml:"region"` // Title for the graph. // Experimental. Title *string `field:"optional" json:"title" yaml:"title"` // Width of the widget, in a grid of 24 units wide. // Experimental. Width *float64 `field:"optional" json:"width" yaml:"width"` // Metrics to display on left Y axis. // Experimental. Left *[]IMetric `field:"optional" json:"left" yaml:"left"` // Annotations for the left Y axis. // Experimental. LeftAnnotations *[]*HorizontalAnnotation `field:"optional" json:"leftAnnotations" yaml:"leftAnnotations"` // Left Y axis. // Experimental. LeftYAxis *YAxisProps `field:"optional" json:"leftYAxis" yaml:"leftYAxis"` // Position of the legend. // Experimental. LegendPosition LegendPosition `field:"optional" json:"legendPosition" yaml:"legendPosition"` // Whether the graph should show live data. // Experimental. LiveData *bool `field:"optional" json:"liveData" yaml:"liveData"` // 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. // Experimental. Period awscdk.Duration `field:"optional" json:"period" yaml:"period"` // Metrics to display on right Y axis. // Experimental. Right *[]IMetric `field:"optional" json:"right" yaml:"right"` // Annotations for the right Y axis. // Experimental. RightAnnotations *[]*HorizontalAnnotation `field:"optional" json:"rightAnnotations" yaml:"rightAnnotations"` // Right Y axis. // Experimental. RightYAxis *YAxisProps `field:"optional" json:"rightYAxis" yaml:"rightYAxis"` // 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. // Experimental. SetPeriodToTimeRange *bool `field:"optional" json:"setPeriodToTimeRange" yaml:"setPeriodToTimeRange"` // Whether the graph should be shown as stacked lines. // Experimental. Stacked *bool `field:"optional" json:"stacked" yaml:"stacked"` // The default statistic to be displayed for each metric. // // This default can be overridden within the definition of each individual metric. // Experimental. Statistic *string `field:"optional" json:"statistic" yaml:"statistic"` // Display this metric. // Experimental. View GraphWidgetView `field:"optional" json:"view" yaml:"view"` }
Properties for a GraphWidget.
Example:
var dashboard dashboard dashboard.addWidgets(cloudwatch.NewGraphWidget(&graphWidgetProps{ // ... legendPosition: cloudwatch.legendPosition_RIGHT, }))
Experimental.
type GraphWidgetView ¶
type GraphWidgetView string
Types of view.
Example:
var dashboard dashboard dashboard.addWidgets(cloudwatch.NewGraphWidget(&graphWidgetProps{ // ... view: cloudwatch.graphWidgetView_BAR, }))
Experimental.
const ( // Display as a line graph. // Experimental. GraphWidgetView_TIME_SERIES GraphWidgetView = "TIME_SERIES" // Display as a bar graph. // Experimental. GraphWidgetView_BAR GraphWidgetView = "BAR" // Display as a pie graph. // Experimental. GraphWidgetView_PIE GraphWidgetView = "PIE" )
type HorizontalAnnotation ¶
type HorizontalAnnotation struct { // The value of the annotation. // Experimental. Value *float64 `field:"required" json:"value" yaml:"value"` // 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. // Experimental. Color *string `field:"optional" json:"color" yaml:"color"` // Add shading above or below the annotation. // Experimental. Fill Shading `field:"optional" json:"fill" yaml:"fill"` // Label for the annotation. // Experimental. Label *string `field:"optional" json:"label" yaml:"label"` // Whether the annotation is visible. // Experimental. Visible *bool `field:"optional" json:"visible" yaml:"visible"` }
Horizontal annotation to be added to a graph.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" horizontalAnnotation := &horizontalAnnotation{ value: jsii.Number(123), // the properties below are optional color: jsii.String("color"), fill: awscdk.Aws_cloudwatch.shading_NONE, label: jsii.String("label"), visible: jsii.Boolean(false), }
Experimental.
type IAlarm ¶
type IAlarm interface { IAlarmRule awscdk.IResource // Alarm ARN (i.e. arn:aws:cloudwatch:<region>:<account-id>:alarm:Foo). // Experimental. AlarmArn() *string // Name of the alarm. // Experimental. AlarmName() *string }
Represents a CloudWatch Alarm. Experimental.
func Alarm_FromAlarmArn ¶
Import an existing CloudWatch alarm provided an ARN. Experimental.
func CompositeAlarm_FromCompositeAlarmArn ¶
func CompositeAlarm_FromCompositeAlarmArn(scope constructs.Construct, id *string, compositeAlarmArn *string) IAlarm
Import an existing CloudWatch composite alarm provided an ARN. Experimental.
func CompositeAlarm_FromCompositeAlarmName ¶
func CompositeAlarm_FromCompositeAlarmName(scope constructs.Construct, id *string, compositeAlarmName *string) IAlarm
Import an existing CloudWatch composite alarm provided an Name. Experimental.
type IAlarmAction ¶
type IAlarmAction interface { // Return the properties required to send alarm actions to this CloudWatch alarm. // Experimental. Bind(scope awscdk.Construct, alarm IAlarm) *AlarmActionConfig }
Interface for objects that can be the targets of CloudWatch alarm actions. Experimental.
type IAlarmRule ¶
type IAlarmRule interface { // serialized representation of Alarm Rule to be used when building the Composite Alarm resource. // Experimental. RenderAlarmRule() *string }
Interface for Alarm Rule. Experimental.
func AlarmRule_AllOf ¶
func AlarmRule_AllOf(operands ...IAlarmRule) IAlarmRule
function to join all provided AlarmRules with AND operator. Experimental.
func AlarmRule_AnyOf ¶
func AlarmRule_AnyOf(operands ...IAlarmRule) IAlarmRule
function to join all provided AlarmRules with OR operator. Experimental.
func AlarmRule_FromAlarm ¶
func AlarmRule_FromAlarm(alarm IAlarm, alarmState AlarmState) IAlarmRule
function to build Rule Expression for given IAlarm and AlarmState. Experimental.
func AlarmRule_FromBoolean ¶
func AlarmRule_FromBoolean(value *bool) IAlarmRule
function to build TRUE/FALSE intent for Rule Expression. Experimental.
func AlarmRule_FromString ¶
func AlarmRule_FromString(alarmRule *string) IAlarmRule
function to build Rule Expression for given Alarm Rule string. Experimental.
func AlarmRule_Not ¶
func AlarmRule_Not(operand IAlarmRule) IAlarmRule
function to wrap provided AlarmRule in NOT operator. Experimental.
type IMetric ¶
type IMetric interface { // Turn this metric object into an alarm configuration. // Deprecated: Use `toMetricConfig()` instead. ToAlarmConfig() *MetricAlarmConfig // Turn this metric object into a graph configuration. // Deprecated: Use `toMetricConfig()` instead. ToGraphConfig() *MetricGraphConfig // Inspect the details of the metric object. // Experimental. ToMetricConfig() *MetricConfig // Any warnings related to this metric. // // Should be attached to the consuming construct. // Experimental. Warnings() *[]*string }
Interface for metrics. Experimental.
type IWidget ¶
type IWidget interface { // Place the widget at a given position. // Experimental. Position(x *float64, y *float64) // Return the widget JSON for use in the dashboard. // Experimental. ToJson() *[]interface{} // The amount of vertical grid units the widget will take up. // Experimental. Height() *float64 // Any warnings that are produced as a result of putting together this widget. // Experimental. Warnings() *[]*string // The amount of horizontal grid units the widget will take up. // Experimental. Width() *float64 }
A single dashboard widget. Experimental.
type LegendPosition ¶
type LegendPosition string
The position of the legend on a GraphWidget.
Example:
var dashboard dashboard dashboard.addWidgets(cloudwatch.NewGraphWidget(&graphWidgetProps{ // ... legendPosition: cloudwatch.legendPosition_RIGHT, }))
Experimental.
const ( // Legend appears below the graph (default). // Experimental. LegendPosition_BOTTOM LegendPosition = "BOTTOM" // Add shading above the annotation. // Experimental. LegendPosition_RIGHT LegendPosition = "RIGHT" // Add shading below the annotation. // Experimental. LegendPosition_HIDDEN LegendPosition = "HIDDEN" )
type LogQueryVisualizationType ¶
type LogQueryVisualizationType string
Types of view.
Example:
var dashboard dashboard dashboard.addWidgets(cloudwatch.NewLogQueryWidget(&logQueryWidgetProps{ logGroupNames: []*string{ jsii.String("my-log-group"), }, view: cloudwatch.logQueryVisualizationType_TABLE, // The lines will be automatically combined using '\n|'. queryLines: []*string{ jsii.String("fields @message"), jsii.String("filter @message like /Error/"), }, }))
Experimental.
const ( // Table view. // Experimental. LogQueryVisualizationType_TABLE LogQueryVisualizationType = "TABLE" // Line view. // Experimental. LogQueryVisualizationType_LINE LogQueryVisualizationType = "LINE" // Stacked area view. // Experimental. LogQueryVisualizationType_STACKEDAREA LogQueryVisualizationType = "STACKEDAREA" // Bar view. // Experimental. LogQueryVisualizationType_BAR LogQueryVisualizationType = "BAR" // Pie view. // Experimental. LogQueryVisualizationType_PIE LogQueryVisualizationType = "PIE" )
type LogQueryWidget ¶
type LogQueryWidget interface { ConcreteWidget // The amount of vertical grid units the widget will take up. // Experimental. Height() *float64 // Any warnings that are produced as a result of putting together this widget. // Experimental. Warnings() *[]*string // The amount of horizontal grid units the widget will take up. // Experimental. Width() *float64 // Experimental. X() *float64 // Experimental. SetX(val *float64) // Experimental. Y() *float64 // Experimental. SetY(val *float64) // Copy the warnings from the given metric. // Experimental. CopyMetricWarnings(ms ...IMetric) // Place the widget at a given position. // Experimental. Position(x *float64, y *float64) // Return the widget JSON for use in the dashboard. // Experimental. ToJson() *[]interface{} }
Display query results from Logs Insights.
Example:
var dashboard dashboard dashboard.addWidgets(cloudwatch.NewLogQueryWidget(&logQueryWidgetProps{ logGroupNames: []*string{ jsii.String("my-log-group"), }, view: cloudwatch.logQueryVisualizationType_TABLE, // The lines will be automatically combined using '\n|'. queryLines: []*string{ jsii.String("fields @message"), jsii.String("filter @message like /Error/"), }, }))
Experimental.
func NewLogQueryWidget ¶
func NewLogQueryWidget(props *LogQueryWidgetProps) LogQueryWidget
Experimental.
type LogQueryWidgetProps ¶
type LogQueryWidgetProps struct { // Names of log groups to query. // Experimental. LogGroupNames *[]*string `field:"required" json:"logGroupNames" yaml:"logGroupNames"` // Height of the widget. // Experimental. Height *float64 `field:"optional" json:"height" yaml:"height"` // A sequence of lines to use to build the query. // // The query will be built by joining the lines together using `\n|`. // Experimental. QueryLines *[]*string `field:"optional" json:"queryLines" yaml:"queryLines"` // Full query string for log insights. // // Be sure to prepend every new line with a newline and pipe character // (`\n|`). // Experimental. QueryString *string `field:"optional" json:"queryString" yaml:"queryString"` // The region the metrics of this widget should be taken from. // Experimental. Region *string `field:"optional" json:"region" yaml:"region"` // Title for the widget. // Experimental. Title *string `field:"optional" json:"title" yaml:"title"` // The type of view to use. // Experimental. View LogQueryVisualizationType `field:"optional" json:"view" yaml:"view"` // Width of the widget, in a grid of 24 units wide. // Experimental. Width *float64 `field:"optional" json:"width" yaml:"width"` }
Properties for a Query widget.
Example:
var dashboard dashboard dashboard.addWidgets(cloudwatch.NewLogQueryWidget(&logQueryWidgetProps{ logGroupNames: []*string{ jsii.String("my-log-group"), }, view: cloudwatch.logQueryVisualizationType_TABLE, // The lines will be automatically combined using '\n|'. queryLines: []*string{ jsii.String("fields @message"), jsii.String("filter @message like /Error/"), }, }))
Experimental.
type MathExpression ¶
type MathExpression interface { IMetric // 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. // Experimental. Color() *string // The expression defining the metric. // Experimental. Expression() *string // Label for this metric when added to a Graph. // Experimental. Label() *string // Aggregation period of this metric. // Experimental. Period() awscdk.Duration // Account to evaluate search expressions within. // Experimental. SearchAccount() *string // Region to evaluate search expressions within. // Experimental. SearchRegion() *string // The metrics used in the expression as KeyValuePair <id, metric>. // Experimental. UsingMetrics() *map[string]IMetric // Warnings generated by this math expression. // Experimental. Warnings() *[]*string // Make a new Alarm for this metric. // // Combines both properties that may adjust the metric (aggregation) as well // as alarm properties. // Experimental. CreateAlarm(scope awscdk.Construct, id *string, props *CreateAlarmOptions) Alarm // Turn this metric object into an alarm configuration. // Deprecated: use toMetricConfig(). ToAlarmConfig() *MetricAlarmConfig // Turn this metric object into a graph configuration. // Deprecated: use toMetricConfig(). ToGraphConfig() *MetricGraphConfig // Inspect the details of the metric object. // Experimental. ToMetricConfig() *MetricConfig // Returns a string representation of an object. // Experimental. ToString() *string // Return a copy of Metric with properties changed. // // All properties except namespace and metricName can be changed. // Experimental. With(props *MathExpressionOptions) MathExpression }
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.
Example:
var fn function allProblems := cloudwatch.NewMathExpression(&mathExpressionProps{ expression: jsii.String("errors + throttles"), usingMetrics: map[string]iMetric{ "errors": fn.metricErrors(), "faults": fn.metricThrottles(), }, })
Experimental.
func NewMathExpression ¶
func NewMathExpression(props *MathExpressionProps) MathExpression
Experimental.
type MathExpressionOptions ¶
type MathExpressionOptions struct { // Color for this metric when added to a Graph in a Dashboard. // Experimental. Color *string `field:"optional" json:"color" yaml:"color"` // 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. // Experimental. Label *string `field:"optional" json:"label" yaml:"label"` // The period over which the expression's statistics are applied. // // This period overrides all periods in the metrics used in this // math expression. // Experimental. Period awscdk.Duration `field:"optional" json:"period" yaml:"period"` // Account to evaluate search expressions within. // // Specifying a searchAccount has no effect to the account used // for metrics within the expression (passed via usingMetrics). // Experimental. SearchAccount *string `field:"optional" json:"searchAccount" yaml:"searchAccount"` // Region to evaluate search expressions within. // // Specifying a searchRegion has no effect to the region used // for metrics within the expression (passed via usingMetrics). // Experimental. SearchRegion *string `field:"optional" json:"searchRegion" yaml:"searchRegion"` }
Configurable options for MathExpressions.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import monocdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var duration duration mathExpressionOptions := &mathExpressionOptions{ color: jsii.String("color"), label: jsii.String("label"), period: duration, searchAccount: jsii.String("searchAccount"), searchRegion: jsii.String("searchRegion"), }
Experimental.
type MathExpressionProps ¶
type MathExpressionProps struct { // Color for this metric when added to a Graph in a Dashboard. // Experimental. Color *string `field:"optional" json:"color" yaml:"color"` // 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. // Experimental. Label *string `field:"optional" json:"label" yaml:"label"` // The period over which the expression's statistics are applied. // // This period overrides all periods in the metrics used in this // math expression. // Experimental. Period awscdk.Duration `field:"optional" json:"period" yaml:"period"` // Account to evaluate search expressions within. // // Specifying a searchAccount has no effect to the account used // for metrics within the expression (passed via usingMetrics). // Experimental. SearchAccount *string `field:"optional" json:"searchAccount" yaml:"searchAccount"` // Region to evaluate search expressions within. // // Specifying a searchRegion has no effect to the region used // for metrics within the expression (passed via usingMetrics). // Experimental. SearchRegion *string `field:"optional" json:"searchRegion" yaml:"searchRegion"` // The expression defining the metric. // // When an expression contains a SEARCH function, it cannot be used // within an Alarm. // Experimental. Expression *string `field:"required" json:"expression" yaml:"expression"` // 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. // Experimental. UsingMetrics *map[string]IMetric `field:"optional" json:"usingMetrics" yaml:"usingMetrics"` }
Properties for a MathExpression.
Example:
var fn function allProblems := cloudwatch.NewMathExpression(&mathExpressionProps{ expression: jsii.String("errors + throttles"), usingMetrics: map[string]iMetric{ "errors": fn.metricErrors(), "faults": fn.metricThrottles(), }, })
Experimental.
type Metric ¶
type Metric interface { IMetric // Account which this metric comes from. // Experimental. Account() *string // The hex color code used when this metric is rendered on a graph. // Experimental. Color() *string // Dimensions of this metric. // Experimental. Dimensions() *map[string]interface{} // Label for this metric when added to a Graph in a Dashboard. // Experimental. Label() *string // Name of this metric. // Experimental. MetricName() *string // Namespace of this metric. // Experimental. Namespace() *string // Period of this metric. // Experimental. Period() awscdk.Duration // Region which this metric comes from. // Experimental. Region() *string // Statistic of this metric. // Experimental. Statistic() *string // Unit of the metric. // Experimental. Unit() Unit // Warnings attached to this metric. // Experimental. Warnings() *[]*string // 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. // Experimental. AttachTo(scope constructs.IConstruct) Metric // Make a new Alarm for this metric. // // Combines both properties that may adjust the metric (aggregation) as well // as alarm properties. // Experimental. CreateAlarm(scope awscdk.Construct, id *string, props *CreateAlarmOptions) Alarm // Turn this metric object into an alarm configuration. // Deprecated: use toMetricConfig(). ToAlarmConfig() *MetricAlarmConfig // Turn this metric object into a graph configuration. // Deprecated: use toMetricConfig(). ToGraphConfig() *MetricGraphConfig // Inspect the details of the metric object. // Experimental. ToMetricConfig() *MetricConfig // Returns a string representation of an object. // Experimental. ToString() *string // Return a copy of Metric `with` properties changed. // // All properties except namespace and metricName can be changed. // Experimental. With(props *MetricOptions) Metric }
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.
Example:
var fn function minuteErrorRate := fn.metricErrors(&metricOptions{ statistic: jsii.String("avg"), period: awscdk.Duration.minutes(jsii.Number(1)), label: jsii.String("Lambda failure rate"), })
Experimental.
type MetricAlarmConfig
deprecated
type MetricAlarmConfig struct { // Name of the metric. // Deprecated: Replaced by MetricConfig. MetricName *string `field:"required" json:"metricName" yaml:"metricName"` // Namespace of the metric. // Deprecated: Replaced by MetricConfig. Namespace *string `field:"required" json:"namespace" yaml:"namespace"` // How many seconds to aggregate over. // Deprecated: Replaced by MetricConfig. Period *float64 `field:"required" json:"period" yaml:"period"` // The dimensions to apply to the alarm. // Deprecated: Replaced by MetricConfig. Dimensions *[]*Dimension `field:"optional" json:"dimensions" yaml:"dimensions"` // Percentile aggregation function to use. // Deprecated: Replaced by MetricConfig. ExtendedStatistic *string `field:"optional" json:"extendedStatistic" yaml:"extendedStatistic"` // Simple aggregation function to use. // Deprecated: Replaced by MetricConfig. Statistic Statistic `field:"optional" json:"statistic" yaml:"statistic"` // The unit of the alarm. // Deprecated: Replaced by MetricConfig. Unit Unit `field:"optional" json:"unit" yaml:"unit"` }
Properties used to construct the Metric identifying part of an Alarm.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var value interface{} metricAlarmConfig := &metricAlarmConfig{ metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), period: jsii.Number(123), // the properties below are optional dimensions: []dimension{ &dimension{ name: jsii.String("name"), value: value, }, }, extendedStatistic: jsii.String("extendedStatistic"), statistic: awscdk.Aws_cloudwatch.statistic_SAMPLE_COUNT, unit: awscdk.*Aws_cloudwatch.unit_SECONDS, }
Deprecated: Replaced by MetricConfig.
type MetricConfig ¶
type MetricConfig struct { // In case the metric is a math expression, the details of the math expression. // Experimental. MathExpression *MetricExpressionConfig `field:"optional" json:"mathExpression" yaml:"mathExpression"` // In case the metric represents a query, the details of the query. // Experimental. MetricStat *MetricStatConfig `field:"optional" json:"metricStat" yaml:"metricStat"` // 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. // Experimental. RenderingProperties *map[string]interface{} `field:"optional" json:"renderingProperties" yaml:"renderingProperties"` }
Properties of a rendered metric.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import monocdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var duration duration var metric metric var renderingProperties interface{} var value interface{} metricConfig := &metricConfig{ mathExpression: &metricExpressionConfig{ expression: jsii.String("expression"), period: jsii.Number(123), usingMetrics: map[string]iMetric{ "usingMetricsKey": metric, }, // the properties below are optional searchAccount: jsii.String("searchAccount"), searchRegion: jsii.String("searchRegion"), }, metricStat: &metricStatConfig{ metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), period: duration, statistic: jsii.String("statistic"), // the properties below are optional account: jsii.String("account"), dimensions: []dimension{ &dimension{ name: jsii.String("name"), value: value, }, }, region: jsii.String("region"), unitFilter: awscdk.Aws_cloudwatch.unit_SECONDS, }, renderingProperties: map[string]interface{}{ "renderingPropertiesKey": renderingProperties, }, }
Experimental.
type MetricExpressionConfig ¶
type MetricExpressionConfig struct { // Math expression for the metric. // Experimental. Expression *string `field:"required" json:"expression" yaml:"expression"` // How many seconds to aggregate over. // Experimental. Period *float64 `field:"required" json:"period" yaml:"period"` // Metrics used in the math expression. // Experimental. UsingMetrics *map[string]IMetric `field:"required" json:"usingMetrics" yaml:"usingMetrics"` // Account to evaluate search expressions within. // Experimental. SearchAccount *string `field:"optional" json:"searchAccount" yaml:"searchAccount"` // Region to evaluate search expressions within. // Experimental. SearchRegion *string `field:"optional" json:"searchRegion" yaml:"searchRegion"` }
Properties for a concrete metric.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var metric metric metricExpressionConfig := &metricExpressionConfig{ expression: jsii.String("expression"), period: jsii.Number(123), usingMetrics: map[string]iMetric{ "usingMetricsKey": metric, }, // the properties below are optional searchAccount: jsii.String("searchAccount"), searchRegion: jsii.String("searchRegion"), }
Experimental.
type MetricGraphConfig
deprecated
type MetricGraphConfig struct { // Name of the metric. // Deprecated: Replaced by MetricConfig. MetricName *string `field:"required" json:"metricName" yaml:"metricName"` // Namespace of the metric. // Deprecated: Replaced by MetricConfig. Namespace *string `field:"required" json:"namespace" yaml:"namespace"` // How many seconds to aggregate over. // Deprecated: Use `period` in `renderingProperties`. Period *float64 `field:"required" json:"period" yaml:"period"` // Rendering properties override yAxis parameter of the widget object. // Deprecated: Replaced by MetricConfig. RenderingProperties *MetricRenderingProperties `field:"required" json:"renderingProperties" yaml:"renderingProperties"` // Color for the graph line. // Deprecated: Use `color` in `renderingProperties`. Color *string `field:"optional" json:"color" yaml:"color"` // The dimensions to apply to the alarm. // Deprecated: Replaced by MetricConfig. Dimensions *[]*Dimension `field:"optional" json:"dimensions" yaml:"dimensions"` // Label for the metric. // Deprecated: Use `label` in `renderingProperties`. Label *string `field:"optional" json:"label" yaml:"label"` // Aggregation function to use (can be either simple or a percentile). // Deprecated: Use `stat` in `renderingProperties`. Statistic *string `field:"optional" json:"statistic" yaml:"statistic"` // The unit of the alarm. // Deprecated: not used in dashboard widgets. Unit Unit `field:"optional" json:"unit" yaml:"unit"` }
Properties used to construct the Metric identifying part of a Graph.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var value interface{} metricGraphConfig := &metricGraphConfig{ metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), period: jsii.Number(123), renderingProperties: &metricRenderingProperties{ period: jsii.Number(123), // the properties below are optional color: jsii.String("color"), label: jsii.String("label"), stat: jsii.String("stat"), }, // the properties below are optional color: jsii.String("color"), dimensions: []dimension{ &dimension{ name: jsii.String("name"), value: value, }, }, label: jsii.String("label"), statistic: jsii.String("statistic"), unit: awscdk.Aws_cloudwatch.unit_SECONDS, }
Deprecated: Replaced by MetricConfig.
type MetricOptions ¶
type MetricOptions struct { // Account which this metric comes from. // Experimental. Account *string `field:"optional" json:"account" yaml:"account"` // 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. // Experimental. Color *string `field:"optional" json:"color" yaml:"color"` // Dimensions of the metric. // Deprecated: Use 'dimensionsMap' instead. Dimensions *map[string]interface{} `field:"optional" json:"dimensions" yaml:"dimensions"` // Dimensions of the metric. // Experimental. DimensionsMap *map[string]*string `field:"optional" json:"dimensionsMap" yaml:"dimensionsMap"` // 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. // Experimental. Label *string `field:"optional" json:"label" yaml:"label"` // The period over which the specified statistic is applied. // Experimental. Period awscdk.Duration `field:"optional" json:"period" yaml:"period"` // Region which this metric comes from. // Experimental. Region *string `field:"optional" json:"region" yaml:"region"` // What function to use for aggregating. // // Can be one of the following: // // - "Minimum" | "min" // - "Maximum" | "max" // - "Average" | "avg" // - "Sum" | "sum" // - "SampleCount | "n" // - "pNN.NN" // Experimental. Statistic *string `field:"optional" json:"statistic" yaml:"statistic"` // 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. // Experimental. Unit Unit `field:"optional" json:"unit" yaml:"unit"` }
Properties of a metric that can be changed.
Example:
import cloudwatch "github.com/aws/aws-cdk-go/awscdk" var deliveryStream deliveryStream // Alarm that triggers when the per-second average of incoming bytes exceeds 90% of the current service limit incomingBytesPercentOfLimit := cloudwatch.NewMathExpression(&mathExpressionProps{ expression: jsii.String("incomingBytes / 300 / bytePerSecLimit"), usingMetrics: map[string]iMetric{ "incomingBytes": deliveryStream.metricIncomingBytes(&MetricOptions{ "statistic": cloudwatch.Statistic_SUM, }), "bytePerSecLimit": deliveryStream.metric(jsii.String("BytesPerSecondLimit")), }, }) cloudwatch.NewAlarm(this, jsii.String("Alarm"), &alarmProps{ metric: incomingBytesPercentOfLimit, threshold: jsii.Number(0.9), evaluationPeriods: jsii.Number(3), })
Experimental.
type MetricProps ¶
type MetricProps struct { // Account which this metric comes from. // Experimental. Account *string `field:"optional" json:"account" yaml:"account"` // 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. // Experimental. Color *string `field:"optional" json:"color" yaml:"color"` // Dimensions of the metric. // Deprecated: Use 'dimensionsMap' instead. Dimensions *map[string]interface{} `field:"optional" json:"dimensions" yaml:"dimensions"` // Dimensions of the metric. // Experimental. DimensionsMap *map[string]*string `field:"optional" json:"dimensionsMap" yaml:"dimensionsMap"` // 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. // Experimental. Label *string `field:"optional" json:"label" yaml:"label"` // The period over which the specified statistic is applied. // Experimental. Period awscdk.Duration `field:"optional" json:"period" yaml:"period"` // Region which this metric comes from. // Experimental. Region *string `field:"optional" json:"region" yaml:"region"` // What function to use for aggregating. // // Can be one of the following: // // - "Minimum" | "min" // - "Maximum" | "max" // - "Average" | "avg" // - "Sum" | "sum" // - "SampleCount | "n" // - "pNN.NN" // Experimental. Statistic *string `field:"optional" json:"statistic" yaml:"statistic"` // 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. // Experimental. Unit Unit `field:"optional" json:"unit" yaml:"unit"` // Name of the metric. // Experimental. MetricName *string `field:"required" json:"metricName" yaml:"metricName"` // Namespace of the metric. // Experimental. Namespace *string `field:"required" json:"namespace" yaml:"namespace"` }
Properties for a metric.
Example:
hostedZone := route53.NewHostedZone(this, jsii.String("MyHostedZone"), &hostedZoneProps{ zoneName: jsii.String("example.org"), }) metric := cloudwatch.NewMetric(&metricProps{ namespace: jsii.String("AWS/Route53"), metricName: jsii.String("DNSQueries"), dimensionsMap: map[string]*string{ "HostedZoneId": hostedZone.hostedZoneId, }, })
Experimental.
type MetricRenderingProperties
deprecated
type MetricRenderingProperties struct { // How many seconds to aggregate over. // Deprecated: Replaced by MetricConfig. Period *float64 `field:"required" json:"period" yaml:"period"` // 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. // Deprecated: Replaced by MetricConfig. Color *string `field:"optional" json:"color" yaml:"color"` // Label for the metric. // Deprecated: Replaced by MetricConfig. Label *string `field:"optional" json:"label" yaml:"label"` // Aggregation function to use (can be either simple or a percentile). // Deprecated: Replaced by MetricConfig. Stat *string `field:"optional" json:"stat" yaml:"stat"` }
Custom rendering properties that override the default rendering properties specified in the yAxis parameter of the widget object.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" metricRenderingProperties := &metricRenderingProperties{ period: jsii.Number(123), // the properties below are optional color: jsii.String("color"), label: jsii.String("label"), stat: jsii.String("stat"), }
Deprecated: Replaced by MetricConfig.
type MetricStatConfig ¶
type MetricStatConfig struct { // Name of the metric. // Experimental. MetricName *string `field:"required" json:"metricName" yaml:"metricName"` // Namespace of the metric. // Experimental. Namespace *string `field:"required" json:"namespace" yaml:"namespace"` // How many seconds to aggregate over. // Experimental. Period awscdk.Duration `field:"required" json:"period" yaml:"period"` // Aggregation function to use (can be either simple or a percentile). // Experimental. Statistic *string `field:"required" json:"statistic" yaml:"statistic"` // Account which this metric comes from. // Experimental. Account *string `field:"optional" json:"account" yaml:"account"` // The dimensions to apply to the alarm. // Experimental. Dimensions *[]*Dimension `field:"optional" json:"dimensions" yaml:"dimensions"` // Region which this metric comes from. // Experimental. Region *string `field:"optional" json:"region" yaml:"region"` // 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. // Experimental. UnitFilter Unit `field:"optional" json:"unitFilter" yaml:"unitFilter"` }
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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import monocdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var duration duration var value interface{} metricStatConfig := &metricStatConfig{ metricName: jsii.String("metricName"), namespace: jsii.String("namespace"), period: duration, statistic: jsii.String("statistic"), // the properties below are optional account: jsii.String("account"), dimensions: []dimension{ &dimension{ name: jsii.String("name"), value: value, }, }, region: jsii.String("region"), unitFilter: awscdk.Aws_cloudwatch.unit_SECONDS, }
Experimental.
type MetricWidgetProps ¶
type MetricWidgetProps struct { // Height of the widget. // Experimental. Height *float64 `field:"optional" json:"height" yaml:"height"` // The region the metrics of this graph should be taken from. // Experimental. Region *string `field:"optional" json:"region" yaml:"region"` // Title for the graph. // Experimental. Title *string `field:"optional" json:"title" yaml:"title"` // Width of the widget, in a grid of 24 units wide. // Experimental. Width *float64 `field:"optional" json:"width" yaml:"width"` }
Basic properties for widgets that display metrics.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" metricWidgetProps := &metricWidgetProps{ height: jsii.Number(123), region: jsii.String("region"), title: jsii.String("title"), width: jsii.Number(123), }
Experimental.
type PeriodOverride ¶
type PeriodOverride string
Specify the period for graphs when the CloudWatch dashboard loads. Experimental.
const ( // Period of all graphs on the dashboard automatically adapt to the time range of the dashboard. // Experimental. PeriodOverride_AUTO PeriodOverride = "AUTO" // Period set for each graph will be used. // Experimental. PeriodOverride_INHERIT PeriodOverride = "INHERIT" )
type Row ¶
type Row interface { IWidget // The amount of vertical grid units the widget will take up. // Experimental. Height() *float64 // List of contained widgets. // Experimental. Widgets() *[]IWidget // The amount of horizontal grid units the widget will take up. // Experimental. Width() *float64 // Place the widget at a given position. // Experimental. Position(x *float64, y *float64) // Return the widget JSON for use in the dashboard. // Experimental. ToJson() *[]interface{} }
A widget that contains other widgets in a horizontal row.
Widgets will be laid out next to each other.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var widget iWidget row := awscdk.Aws_cloudwatch.NewRow(widget)
Experimental.
type Shading ¶
type Shading string
Fill shading options that will be used with an annotation. Experimental.
type SingleValueWidget ¶
type SingleValueWidget interface { ConcreteWidget // The amount of vertical grid units the widget will take up. // Experimental. Height() *float64 // Any warnings that are produced as a result of putting together this widget. // Experimental. Warnings() *[]*string // The amount of horizontal grid units the widget will take up. // Experimental. Width() *float64 // Experimental. X() *float64 // Experimental. SetX(val *float64) // Experimental. Y() *float64 // Experimental. SetY(val *float64) // Copy the warnings from the given metric. // Experimental. CopyMetricWarnings(ms ...IMetric) // Place the widget at a given position. // Experimental. Position(x *float64, y *float64) // Return the widget JSON for use in the dashboard. // Experimental. ToJson() *[]interface{} }
A dashboard widget that displays the most recent value for every metric.
Example:
var dashboard dashboard var visitorCount metric var purchaseCount metric dashboard.addWidgets(cloudwatch.NewSingleValueWidget(&singleValueWidgetProps{ metrics: []iMetric{ visitorCount, purchaseCount, }, }))
Experimental.
func NewSingleValueWidget ¶
func NewSingleValueWidget(props *SingleValueWidgetProps) SingleValueWidget
Experimental.
type SingleValueWidgetProps ¶
type SingleValueWidgetProps struct { // Height of the widget. // Experimental. Height *float64 `field:"optional" json:"height" yaml:"height"` // The region the metrics of this graph should be taken from. // Experimental. Region *string `field:"optional" json:"region" yaml:"region"` // Title for the graph. // Experimental. Title *string `field:"optional" json:"title" yaml:"title"` // Width of the widget, in a grid of 24 units wide. // Experimental. Width *float64 `field:"optional" json:"width" yaml:"width"` // Metrics to display. // Experimental. Metrics *[]IMetric `field:"required" json:"metrics" yaml:"metrics"` // Whether to show as many digits as can fit, before rounding. // Experimental. FullPrecision *bool `field:"optional" json:"fullPrecision" yaml:"fullPrecision"` // Whether to show the value from the entire time range. // Experimental. SetPeriodToTimeRange *bool `field:"optional" json:"setPeriodToTimeRange" yaml:"setPeriodToTimeRange"` }
Properties for a SingleValueWidget.
Example:
var dashboard dashboard var visitorCount metric var purchaseCount metric dashboard.addWidgets(cloudwatch.NewSingleValueWidget(&singleValueWidgetProps{ metrics: []iMetric{ visitorCount, purchaseCount, }, }))
Experimental.
type Spacer ¶
type Spacer interface { IWidget // The amount of vertical grid units the widget will take up. // Experimental. Height() *float64 // The amount of horizontal grid units the widget will take up. // Experimental. Width() *float64 // Place the widget at a given position. // Experimental. Position(_x *float64, _y *float64) // Return the widget JSON for use in the dashboard. // Experimental. ToJson() *[]interface{} }
A widget that doesn't display anything but takes up space.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" spacer := awscdk.Aws_cloudwatch.NewSpacer(&spacerProps{ height: jsii.Number(123), width: jsii.Number(123), })
Experimental.
type SpacerProps ¶
type SpacerProps struct { // Height of the spacer. // Experimental. Height *float64 `field:"optional" json:"height" yaml:"height"` // Width of the spacer. // Experimental. Width *float64 `field:"optional" json:"width" yaml:"width"` }
Props of the spacer.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" spacerProps := &spacerProps{ height: jsii.Number(123), width: jsii.Number(123), }
Experimental.
type Statistic ¶
type Statistic string
Statistic to use over the aggregation period.
Example:
import cloudwatch "github.com/aws/aws-cdk-go/awscdk" var deliveryStream deliveryStream // Alarm that triggers when the per-second average of incoming bytes exceeds 90% of the current service limit incomingBytesPercentOfLimit := cloudwatch.NewMathExpression(&mathExpressionProps{ expression: jsii.String("incomingBytes / 300 / bytePerSecLimit"), usingMetrics: map[string]iMetric{ "incomingBytes": deliveryStream.metricIncomingBytes(&MetricOptions{ "statistic": cloudwatch.Statistic_SUM, }), "bytePerSecLimit": deliveryStream.metric(jsii.String("BytesPerSecondLimit")), }, }) cloudwatch.NewAlarm(this, jsii.String("Alarm"), &alarmProps{ metric: incomingBytesPercentOfLimit, threshold: jsii.Number(0.9), evaluationPeriods: jsii.Number(3), })
Experimental.
const ( // The count (number) of data points used for the statistical calculation. // Experimental. Statistic_SAMPLE_COUNT Statistic = "SAMPLE_COUNT" // The value of Sum / SampleCount during the specified period. // Experimental. Statistic_AVERAGE Statistic = "AVERAGE" // All values submitted for the matching metric added together. // // This statistic can be useful for determining the total volume of a metric. // Experimental. Statistic_SUM Statistic = "SUM" // The lowest value observed during the specified period. // // You can use this value to determine low volumes of activity for your application. // Experimental. Statistic_MINIMUM Statistic = "MINIMUM" // The highest value observed during the specified period. // // You can use this value to determine high volumes of activity for your application. // Experimental. Statistic_MAXIMUM Statistic = "MAXIMUM" )
type TextWidget ¶
type TextWidget interface { ConcreteWidget // The amount of vertical grid units the widget will take up. // Experimental. Height() *float64 // Any warnings that are produced as a result of putting together this widget. // Experimental. Warnings() *[]*string // The amount of horizontal grid units the widget will take up. // Experimental. Width() *float64 // Experimental. X() *float64 // Experimental. SetX(val *float64) // Experimental. Y() *float64 // Experimental. SetY(val *float64) // Copy the warnings from the given metric. // Experimental. CopyMetricWarnings(ms ...IMetric) // Place the widget at a given position. // Experimental. Position(x *float64, y *float64) // Return the widget JSON for use in the dashboard. // Experimental. ToJson() *[]interface{} }
A dashboard widget that displays MarkDown.
Example:
var dashboard dashboard dashboard.addWidgets(cloudwatch.NewTextWidget(&textWidgetProps{ markdown: jsii.String("# Key Performance Indicators"), }))
Experimental.
type TextWidgetProps ¶
type TextWidgetProps struct { // The text to display, in MarkDown format. // Experimental. Markdown *string `field:"required" json:"markdown" yaml:"markdown"` // Height of the widget. // Experimental. Height *float64 `field:"optional" json:"height" yaml:"height"` // Width of the widget, in a grid of 24 units wide. // Experimental. Width *float64 `field:"optional" json:"width" yaml:"width"` }
Properties for a Text widget.
Example:
var dashboard dashboard dashboard.addWidgets(cloudwatch.NewTextWidget(&textWidgetProps{ markdown: jsii.String("# Key Performance Indicators"), }))
Experimental.
type TreatMissingData ¶
type TreatMissingData string
Specify how missing data points are treated during alarm evaluation.
Example:
import cdk "github.com/aws/aws-cdk-go/awscdk" import cloudwatch "github.com/aws/aws-cdk-go/awscdk" fn := lambda.NewFunction(this, jsii.String("MyFunction"), &functionProps{ runtime: lambda.runtime_NODEJS_16_X(), handler: jsii.String("index.handler"), code: lambda.code.fromAsset(path.join(__dirname, jsii.String("lambda-handler"))), timeout: cdk.duration.minutes(jsii.Number(5)), }) if fn.timeout { cloudwatch.NewAlarm(this, jsii.String("MyAlarm"), &alarmProps{ metric: fn.metricDuration().with(&metricOptions{ statistic: jsii.String("Maximum"), }), evaluationPeriods: jsii.Number(1), datapointsToAlarm: jsii.Number(1), threshold: fn.timeout.toMilliseconds(), treatMissingData: cloudwatch.treatMissingData_IGNORE, alarmName: jsii.String("My Lambda Timeout"), }) }
Experimental.
const ( // Missing data points are treated as breaching the threshold. // Experimental. TreatMissingData_BREACHING TreatMissingData = "BREACHING" // Missing data points are treated as being within the threshold. // Experimental. TreatMissingData_NOT_BREACHING TreatMissingData = "NOT_BREACHING" // The current alarm state is maintained. // Experimental. TreatMissingData_IGNORE TreatMissingData = "IGNORE" // The alarm does not consider missing data points when evaluating whether to change state. // Experimental. TreatMissingData_MISSING TreatMissingData = "MISSING" )
type Unit ¶
type Unit string
Unit for metric. Experimental.
const ( // Seconds. // Experimental. Unit_SECONDS Unit = "SECONDS" // Microseconds. // Experimental. Unit_MICROSECONDS Unit = "MICROSECONDS" // Milliseconds. // Experimental. Unit_MILLISECONDS Unit = "MILLISECONDS" // Bytes. // Experimental. Unit_BYTES Unit = "BYTES" // Kilobytes. // Experimental. Unit_KILOBYTES Unit = "KILOBYTES" // Megabytes. // Experimental. Unit_MEGABYTES Unit = "MEGABYTES" // Gigabytes. // Experimental. Unit_GIGABYTES Unit = "GIGABYTES" // Terabytes. // Experimental. Unit_TERABYTES Unit = "TERABYTES" // Bits. // Experimental. Unit_BITS Unit = "BITS" // Kilobits. // Experimental. Unit_KILOBITS Unit = "KILOBITS" // Megabits. // Experimental. Unit_MEGABITS Unit = "MEGABITS" // Gigabits. // Experimental. Unit_GIGABITS Unit = "GIGABITS" // Terabits. // Experimental. Unit_TERABITS Unit = "TERABITS" // Percent. // Experimental. Unit_PERCENT Unit = "PERCENT" // Count. // Experimental. Unit_COUNT Unit = "COUNT" // Bytes/second (B/s). // Experimental. Unit_BYTES_PER_SECOND Unit = "BYTES_PER_SECOND" // Kilobytes/second (kB/s). // Experimental. Unit_KILOBYTES_PER_SECOND Unit = "KILOBYTES_PER_SECOND" // Megabytes/second (MB/s). // Experimental. Unit_MEGABYTES_PER_SECOND Unit = "MEGABYTES_PER_SECOND" // Gigabytes/second (GB/s). // Experimental. Unit_GIGABYTES_PER_SECOND Unit = "GIGABYTES_PER_SECOND" // Terabytes/second (TB/s). // Experimental. Unit_TERABYTES_PER_SECOND Unit = "TERABYTES_PER_SECOND" // Bits/second (b/s). // Experimental. Unit_BITS_PER_SECOND Unit = "BITS_PER_SECOND" // Kilobits/second (kb/s). // Experimental. Unit_KILOBITS_PER_SECOND Unit = "KILOBITS_PER_SECOND" // Megabits/second (Mb/s). // Experimental. Unit_MEGABITS_PER_SECOND Unit = "MEGABITS_PER_SECOND" // Gigabits/second (Gb/s). // Experimental. Unit_GIGABITS_PER_SECOND Unit = "GIGABITS_PER_SECOND" // Terabits/second (Tb/s). // Experimental. Unit_TERABITS_PER_SECOND Unit = "TERABITS_PER_SECOND" // Count/second. // Experimental. Unit_COUNT_PER_SECOND Unit = "COUNT_PER_SECOND" // None. // Experimental. Unit_NONE Unit = "NONE" )
type YAxisProps ¶
type YAxisProps struct { // The label. // Experimental. Label *string `field:"optional" json:"label" yaml:"label"` // The max value. // Experimental. Max *float64 `field:"optional" json:"max" yaml:"max"` // The min value. // Experimental. Min *float64 `field:"optional" json:"min" yaml:"min"` // Whether to show units. // Experimental. ShowUnits *bool `field:"optional" json:"showUnits" yaml:"showUnits"` }
Properties for a Y-Axis.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" yAxisProps := &yAxisProps{ label: jsii.String("label"), max: jsii.Number(123), min: jsii.Number(123), showUnits: jsii.Boolean(false), }
Experimental.
Source Files ¶
- awscloudwatch.go
- awscloudwatch_Alarm.go
- awscloudwatch_AlarmActionConfig.go
- awscloudwatch_AlarmBase.go
- awscloudwatch_AlarmBase__runtime_type_checks.go
- awscloudwatch_AlarmProps.go
- awscloudwatch_AlarmRule.go
- awscloudwatch_AlarmRule__runtime_type_checks.go
- awscloudwatch_AlarmState.go
- awscloudwatch_AlarmStatusWidget.go
- awscloudwatch_AlarmStatusWidgetProps.go
- awscloudwatch_AlarmStatusWidgetSortBy.go
- awscloudwatch_AlarmStatusWidget__runtime_type_checks.go
- awscloudwatch_AlarmWidget.go
- awscloudwatch_AlarmWidgetProps.go
- awscloudwatch_AlarmWidget__runtime_type_checks.go
- awscloudwatch_Alarm__runtime_type_checks.go
- awscloudwatch_CfnAlarm.go
- awscloudwatch_CfnAlarmProps.go
- awscloudwatch_CfnAlarm_DimensionProperty.go
- awscloudwatch_CfnAlarm_MetricDataQueryProperty.go
- awscloudwatch_CfnAlarm_MetricProperty.go
- awscloudwatch_CfnAlarm_MetricStatProperty.go
- awscloudwatch_CfnAlarm__runtime_type_checks.go
- awscloudwatch_CfnAnomalyDetector.go
- awscloudwatch_CfnAnomalyDetectorProps.go
- awscloudwatch_CfnAnomalyDetector_ConfigurationProperty.go
- awscloudwatch_CfnAnomalyDetector_DimensionProperty.go
- awscloudwatch_CfnAnomalyDetector_MetricDataQueryProperty.go
- awscloudwatch_CfnAnomalyDetector_MetricMathAnomalyDetectorProperty.go
- awscloudwatch_CfnAnomalyDetector_MetricProperty.go
- awscloudwatch_CfnAnomalyDetector_MetricStatProperty.go
- awscloudwatch_CfnAnomalyDetector_RangeProperty.go
- awscloudwatch_CfnAnomalyDetector_SingleMetricAnomalyDetectorProperty.go
- awscloudwatch_CfnAnomalyDetector__runtime_type_checks.go
- awscloudwatch_CfnCompositeAlarm.go
- awscloudwatch_CfnCompositeAlarmProps.go
- awscloudwatch_CfnCompositeAlarm__runtime_type_checks.go
- awscloudwatch_CfnDashboard.go
- awscloudwatch_CfnDashboardProps.go
- awscloudwatch_CfnDashboard__runtime_type_checks.go
- awscloudwatch_CfnInsightRule.go
- awscloudwatch_CfnInsightRuleProps.go
- awscloudwatch_CfnInsightRule__runtime_type_checks.go
- awscloudwatch_CfnMetricStream.go
- awscloudwatch_CfnMetricStreamProps.go
- awscloudwatch_CfnMetricStream_MetricStreamFilterProperty.go
- awscloudwatch_CfnMetricStream_MetricStreamStatisticsConfigurationProperty.go
- awscloudwatch_CfnMetricStream_MetricStreamStatisticsMetricProperty.go
- awscloudwatch_CfnMetricStream__runtime_type_checks.go
- awscloudwatch_Color.go
- awscloudwatch_Column.go
- awscloudwatch_Column__runtime_type_checks.go
- awscloudwatch_CommonMetricOptions.go
- awscloudwatch_ComparisonOperator.go
- awscloudwatch_CompositeAlarm.go
- awscloudwatch_CompositeAlarmProps.go
- awscloudwatch_CompositeAlarm__runtime_type_checks.go
- awscloudwatch_ConcreteWidget.go
- awscloudwatch_ConcreteWidget__runtime_type_checks.go
- awscloudwatch_CreateAlarmOptions.go
- awscloudwatch_CustomWidget.go
- awscloudwatch_CustomWidgetProps.go
- awscloudwatch_CustomWidget__runtime_type_checks.go
- awscloudwatch_Dashboard.go
- awscloudwatch_DashboardProps.go
- awscloudwatch_Dashboard__runtime_type_checks.go
- awscloudwatch_Dimension.go
- awscloudwatch_GraphWidget.go
- awscloudwatch_GraphWidgetProps.go
- awscloudwatch_GraphWidgetView.go
- awscloudwatch_GraphWidget__runtime_type_checks.go
- awscloudwatch_HorizontalAnnotation.go
- awscloudwatch_IAlarm.go
- awscloudwatch_IAlarmAction.go
- awscloudwatch_IAlarmAction__runtime_type_checks.go
- awscloudwatch_IAlarmRule.go
- awscloudwatch_IAlarm__runtime_type_checks.go
- awscloudwatch_IMetric.go
- awscloudwatch_IWidget.go
- awscloudwatch_IWidget__runtime_type_checks.go
- awscloudwatch_LegendPosition.go
- awscloudwatch_LogQueryVisualizationType.go
- awscloudwatch_LogQueryWidget.go
- awscloudwatch_LogQueryWidgetProps.go
- awscloudwatch_LogQueryWidget__runtime_type_checks.go
- awscloudwatch_MathExpression.go
- awscloudwatch_MathExpressionOptions.go
- awscloudwatch_MathExpressionProps.go
- awscloudwatch_MathExpression__runtime_type_checks.go
- awscloudwatch_Metric.go
- awscloudwatch_MetricAlarmConfig.go
- awscloudwatch_MetricConfig.go
- awscloudwatch_MetricExpressionConfig.go
- awscloudwatch_MetricGraphConfig.go
- awscloudwatch_MetricOptions.go
- awscloudwatch_MetricProps.go
- awscloudwatch_MetricRenderingProperties.go
- awscloudwatch_MetricStatConfig.go
- awscloudwatch_MetricWidgetProps.go
- awscloudwatch_Metric__runtime_type_checks.go
- awscloudwatch_PeriodOverride.go
- awscloudwatch_Row.go
- awscloudwatch_Row__runtime_type_checks.go
- awscloudwatch_Shading.go
- awscloudwatch_SingleValueWidget.go
- awscloudwatch_SingleValueWidgetProps.go
- awscloudwatch_SingleValueWidget__runtime_type_checks.go
- awscloudwatch_Spacer.go
- awscloudwatch_SpacerProps.go
- awscloudwatch_Spacer__runtime_type_checks.go
- awscloudwatch_Statistic.go
- awscloudwatch_TextWidget.go
- awscloudwatch_TextWidgetProps.go
- awscloudwatch_TextWidget__runtime_type_checks.go
- awscloudwatch_TreatMissingData.go
- awscloudwatch_Unit.go
- awscloudwatch_YAxisProps.go