UNPKG

466 kBJavaScriptView Raw
1"use strict";
2var _a, _b, _c, _d, _e, _f;
3Object.defineProperty(exports, "__esModule", { value: true });
4exports.CfnMetricStream = exports.CfnInsightRule = exports.CfnDashboard = exports.CfnCompositeAlarm = exports.CfnAnomalyDetector = exports.CfnAlarm = void 0;
5const jsiiDeprecationWarnings = require("../.warnings.jsii.js");
6const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
7// Copyright 2012-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
8// Generated from the AWS CloudFormation Resource Specification
9// See: docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html
10// @cfn2ts:meta@ {"generated":"2023-03-22T18:44:57.269Z","fingerprint":"SEcArSR2Gtw6Jxmkad4XV67pE2HpmXN4jN4fTegpY/4="}
11/* eslint-disable max-len */ // This is generated code - line lengths are difficult to control
12const cdk = require("@aws-cdk/core");
13const cfn_parse = require("@aws-cdk/core/lib/helpers-internal");
14/**
15 * Determine whether the given properties match those of a `CfnAlarmProps`
16 *
17 * @param properties - the TypeScript properties of a `CfnAlarmProps`
18 *
19 * @returns the result of the validation.
20 */
21function CfnAlarmPropsValidator(properties) {
22 if (!cdk.canInspect(properties)) {
23 return cdk.VALIDATION_SUCCESS;
24 }
25 const errors = new cdk.ValidationResults();
26 if (typeof properties !== 'object') {
27 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
28 }
29 errors.collect(cdk.propertyValidator('actionsEnabled', cdk.validateBoolean)(properties.actionsEnabled));
30 errors.collect(cdk.propertyValidator('alarmActions', cdk.listValidator(cdk.validateString))(properties.alarmActions));
31 errors.collect(cdk.propertyValidator('alarmDescription', cdk.validateString)(properties.alarmDescription));
32 errors.collect(cdk.propertyValidator('alarmName', cdk.validateString)(properties.alarmName));
33 errors.collect(cdk.propertyValidator('comparisonOperator', cdk.requiredValidator)(properties.comparisonOperator));
34 errors.collect(cdk.propertyValidator('comparisonOperator', cdk.validateString)(properties.comparisonOperator));
35 errors.collect(cdk.propertyValidator('datapointsToAlarm', cdk.validateNumber)(properties.datapointsToAlarm));
36 errors.collect(cdk.propertyValidator('dimensions', cdk.listValidator(CfnAlarm_DimensionPropertyValidator))(properties.dimensions));
37 errors.collect(cdk.propertyValidator('evaluateLowSampleCountPercentile', cdk.validateString)(properties.evaluateLowSampleCountPercentile));
38 errors.collect(cdk.propertyValidator('evaluationPeriods', cdk.requiredValidator)(properties.evaluationPeriods));
39 errors.collect(cdk.propertyValidator('evaluationPeriods', cdk.validateNumber)(properties.evaluationPeriods));
40 errors.collect(cdk.propertyValidator('extendedStatistic', cdk.validateString)(properties.extendedStatistic));
41 errors.collect(cdk.propertyValidator('insufficientDataActions', cdk.listValidator(cdk.validateString))(properties.insufficientDataActions));
42 errors.collect(cdk.propertyValidator('metricName', cdk.validateString)(properties.metricName));
43 errors.collect(cdk.propertyValidator('metrics', cdk.listValidator(CfnAlarm_MetricDataQueryPropertyValidator))(properties.metrics));
44 errors.collect(cdk.propertyValidator('namespace', cdk.validateString)(properties.namespace));
45 errors.collect(cdk.propertyValidator('okActions', cdk.listValidator(cdk.validateString))(properties.okActions));
46 errors.collect(cdk.propertyValidator('period', cdk.validateNumber)(properties.period));
47 errors.collect(cdk.propertyValidator('statistic', cdk.validateString)(properties.statistic));
48 errors.collect(cdk.propertyValidator('threshold', cdk.validateNumber)(properties.threshold));
49 errors.collect(cdk.propertyValidator('thresholdMetricId', cdk.validateString)(properties.thresholdMetricId));
50 errors.collect(cdk.propertyValidator('treatMissingData', cdk.validateString)(properties.treatMissingData));
51 errors.collect(cdk.propertyValidator('unit', cdk.validateString)(properties.unit));
52 return errors.wrap('supplied properties not correct for "CfnAlarmProps"');
53}
54/**
55 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::Alarm` resource
56 *
57 * @param properties - the TypeScript properties of a `CfnAlarmProps`
58 *
59 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::Alarm` resource.
60 */
61// @ts-ignore TS6133
62function cfnAlarmPropsToCloudFormation(properties) {
63 if (!cdk.canInspect(properties)) {
64 return properties;
65 }
66 CfnAlarmPropsValidator(properties).assertSuccess();
67 return {
68 ComparisonOperator: cdk.stringToCloudFormation(properties.comparisonOperator),
69 EvaluationPeriods: cdk.numberToCloudFormation(properties.evaluationPeriods),
70 ActionsEnabled: cdk.booleanToCloudFormation(properties.actionsEnabled),
71 AlarmActions: cdk.listMapper(cdk.stringToCloudFormation)(properties.alarmActions),
72 AlarmDescription: cdk.stringToCloudFormation(properties.alarmDescription),
73 AlarmName: cdk.stringToCloudFormation(properties.alarmName),
74 DatapointsToAlarm: cdk.numberToCloudFormation(properties.datapointsToAlarm),
75 Dimensions: cdk.listMapper(cfnAlarmDimensionPropertyToCloudFormation)(properties.dimensions),
76 EvaluateLowSampleCountPercentile: cdk.stringToCloudFormation(properties.evaluateLowSampleCountPercentile),
77 ExtendedStatistic: cdk.stringToCloudFormation(properties.extendedStatistic),
78 InsufficientDataActions: cdk.listMapper(cdk.stringToCloudFormation)(properties.insufficientDataActions),
79 MetricName: cdk.stringToCloudFormation(properties.metricName),
80 Metrics: cdk.listMapper(cfnAlarmMetricDataQueryPropertyToCloudFormation)(properties.metrics),
81 Namespace: cdk.stringToCloudFormation(properties.namespace),
82 OKActions: cdk.listMapper(cdk.stringToCloudFormation)(properties.okActions),
83 Period: cdk.numberToCloudFormation(properties.period),
84 Statistic: cdk.stringToCloudFormation(properties.statistic),
85 Threshold: cdk.numberToCloudFormation(properties.threshold),
86 ThresholdMetricId: cdk.stringToCloudFormation(properties.thresholdMetricId),
87 TreatMissingData: cdk.stringToCloudFormation(properties.treatMissingData),
88 Unit: cdk.stringToCloudFormation(properties.unit),
89 };
90}
91// @ts-ignore TS6133
92function CfnAlarmPropsFromCloudFormation(properties) {
93 properties = properties == null ? {} : properties;
94 if (typeof properties !== 'object') {
95 return new cfn_parse.FromCloudFormationResult(properties);
96 }
97 const ret = new cfn_parse.FromCloudFormationPropertyObject();
98 ret.addPropertyResult('comparisonOperator', 'ComparisonOperator', cfn_parse.FromCloudFormation.getString(properties.ComparisonOperator));
99 ret.addPropertyResult('evaluationPeriods', 'EvaluationPeriods', cfn_parse.FromCloudFormation.getNumber(properties.EvaluationPeriods));
100 ret.addPropertyResult('actionsEnabled', 'ActionsEnabled', properties.ActionsEnabled != null ? cfn_parse.FromCloudFormation.getBoolean(properties.ActionsEnabled) : undefined);
101 ret.addPropertyResult('alarmActions', 'AlarmActions', properties.AlarmActions != null ? cfn_parse.FromCloudFormation.getStringArray(properties.AlarmActions) : undefined);
102 ret.addPropertyResult('alarmDescription', 'AlarmDescription', properties.AlarmDescription != null ? cfn_parse.FromCloudFormation.getString(properties.AlarmDescription) : undefined);
103 ret.addPropertyResult('alarmName', 'AlarmName', properties.AlarmName != null ? cfn_parse.FromCloudFormation.getString(properties.AlarmName) : undefined);
104 ret.addPropertyResult('datapointsToAlarm', 'DatapointsToAlarm', properties.DatapointsToAlarm != null ? cfn_parse.FromCloudFormation.getNumber(properties.DatapointsToAlarm) : undefined);
105 ret.addPropertyResult('dimensions', 'Dimensions', properties.Dimensions != null ? cfn_parse.FromCloudFormation.getArray(CfnAlarmDimensionPropertyFromCloudFormation)(properties.Dimensions) : undefined);
106 ret.addPropertyResult('evaluateLowSampleCountPercentile', 'EvaluateLowSampleCountPercentile', properties.EvaluateLowSampleCountPercentile != null ? cfn_parse.FromCloudFormation.getString(properties.EvaluateLowSampleCountPercentile) : undefined);
107 ret.addPropertyResult('extendedStatistic', 'ExtendedStatistic', properties.ExtendedStatistic != null ? cfn_parse.FromCloudFormation.getString(properties.ExtendedStatistic) : undefined);
108 ret.addPropertyResult('insufficientDataActions', 'InsufficientDataActions', properties.InsufficientDataActions != null ? cfn_parse.FromCloudFormation.getStringArray(properties.InsufficientDataActions) : undefined);
109 ret.addPropertyResult('metricName', 'MetricName', properties.MetricName != null ? cfn_parse.FromCloudFormation.getString(properties.MetricName) : undefined);
110 ret.addPropertyResult('metrics', 'Metrics', properties.Metrics != null ? cfn_parse.FromCloudFormation.getArray(CfnAlarmMetricDataQueryPropertyFromCloudFormation)(properties.Metrics) : undefined);
111 ret.addPropertyResult('namespace', 'Namespace', properties.Namespace != null ? cfn_parse.FromCloudFormation.getString(properties.Namespace) : undefined);
112 ret.addPropertyResult('okActions', 'OKActions', properties.OKActions != null ? cfn_parse.FromCloudFormation.getStringArray(properties.OKActions) : undefined);
113 ret.addPropertyResult('period', 'Period', properties.Period != null ? cfn_parse.FromCloudFormation.getNumber(properties.Period) : undefined);
114 ret.addPropertyResult('statistic', 'Statistic', properties.Statistic != null ? cfn_parse.FromCloudFormation.getString(properties.Statistic) : undefined);
115 ret.addPropertyResult('threshold', 'Threshold', properties.Threshold != null ? cfn_parse.FromCloudFormation.getNumber(properties.Threshold) : undefined);
116 ret.addPropertyResult('thresholdMetricId', 'ThresholdMetricId', properties.ThresholdMetricId != null ? cfn_parse.FromCloudFormation.getString(properties.ThresholdMetricId) : undefined);
117 ret.addPropertyResult('treatMissingData', 'TreatMissingData', properties.TreatMissingData != null ? cfn_parse.FromCloudFormation.getString(properties.TreatMissingData) : undefined);
118 ret.addPropertyResult('unit', 'Unit', properties.Unit != null ? cfn_parse.FromCloudFormation.getString(properties.Unit) : undefined);
119 ret.addUnrecognizedPropertiesAsExtra(properties);
120 return ret;
121}
122/**
123 * A CloudFormation `AWS::CloudWatch::Alarm`
124 *
125 * The `AWS::CloudWatch::Alarm` type specifies an alarm and associates it with the specified metric or metric math expression.
126 *
127 * 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.
128 *
129 * When you update an existing alarm, its state is left unchanged, but the update completely overwrites the previous configuration of the alarm.
130 *
131 * @cloudformationResource AWS::CloudWatch::Alarm
132 * @stability external
133 *
134 * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-alarm.html
135 */
136class CfnAlarm extends cdk.CfnResource {
137 /**
138 * Create a new `AWS::CloudWatch::Alarm`.
139 *
140 * @param scope - scope in which this resource is defined
141 * @param id - scoped id of the resource
142 * @param props - resource properties
143 */
144 constructor(scope, id, props) {
145 super(scope, id, { type: CfnAlarm.CFN_RESOURCE_TYPE_NAME, properties: props });
146 try {
147 jsiiDeprecationWarnings._aws_cdk_aws_cloudwatch_CfnAlarmProps(props);
148 }
149 catch (error) {
150 if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
151 Error.captureStackTrace(error, CfnAlarm);
152 }
153 throw error;
154 }
155 cdk.requireProperty(props, 'comparisonOperator', this);
156 cdk.requireProperty(props, 'evaluationPeriods', this);
157 this.attrArn = cdk.Token.asString(this.getAtt('Arn'));
158 this.comparisonOperator = props.comparisonOperator;
159 this.evaluationPeriods = props.evaluationPeriods;
160 this.actionsEnabled = props.actionsEnabled;
161 this.alarmActions = props.alarmActions;
162 this.alarmDescription = props.alarmDescription;
163 this.alarmName = props.alarmName;
164 this.datapointsToAlarm = props.datapointsToAlarm;
165 this.dimensions = props.dimensions;
166 this.evaluateLowSampleCountPercentile = props.evaluateLowSampleCountPercentile;
167 this.extendedStatistic = props.extendedStatistic;
168 this.insufficientDataActions = props.insufficientDataActions;
169 this.metricName = props.metricName;
170 this.metrics = props.metrics;
171 this.namespace = props.namespace;
172 this.okActions = props.okActions;
173 this.period = props.period;
174 this.statistic = props.statistic;
175 this.threshold = props.threshold;
176 this.thresholdMetricId = props.thresholdMetricId;
177 this.treatMissingData = props.treatMissingData;
178 this.unit = props.unit;
179 }
180 /**
181 * A factory method that creates a new instance of this class from an object
182 * containing the CloudFormation properties of this resource.
183 * Used in the @aws-cdk/cloudformation-include module.
184 *
185 * @internal
186 */
187 static _fromCloudFormation(scope, id, resourceAttributes, options) {
188 resourceAttributes = resourceAttributes || {};
189 const resourceProperties = options.parser.parseValue(resourceAttributes.Properties);
190 const propsResult = CfnAlarmPropsFromCloudFormation(resourceProperties);
191 const ret = new CfnAlarm(scope, id, propsResult.value);
192 for (const [propKey, propVal] of Object.entries(propsResult.extraProperties)) {
193 ret.addPropertyOverride(propKey, propVal);
194 }
195 options.parser.handleAttributes(ret, resourceAttributes, id);
196 return ret;
197 }
198 /**
199 * Examines the CloudFormation resource and discloses attributes.
200 *
201 * @param inspector - tree inspector to collect and process attributes
202 *
203 */
204 inspect(inspector) {
205 inspector.addAttribute("aws:cdk:cloudformation:type", CfnAlarm.CFN_RESOURCE_TYPE_NAME);
206 inspector.addAttribute("aws:cdk:cloudformation:props", this.cfnProperties);
207 }
208 get cfnProperties() {
209 return {
210 comparisonOperator: this.comparisonOperator,
211 evaluationPeriods: this.evaluationPeriods,
212 actionsEnabled: this.actionsEnabled,
213 alarmActions: this.alarmActions,
214 alarmDescription: this.alarmDescription,
215 alarmName: this.alarmName,
216 datapointsToAlarm: this.datapointsToAlarm,
217 dimensions: this.dimensions,
218 evaluateLowSampleCountPercentile: this.evaluateLowSampleCountPercentile,
219 extendedStatistic: this.extendedStatistic,
220 insufficientDataActions: this.insufficientDataActions,
221 metricName: this.metricName,
222 metrics: this.metrics,
223 namespace: this.namespace,
224 okActions: this.okActions,
225 period: this.period,
226 statistic: this.statistic,
227 threshold: this.threshold,
228 thresholdMetricId: this.thresholdMetricId,
229 treatMissingData: this.treatMissingData,
230 unit: this.unit,
231 };
232 }
233 renderProperties(props) {
234 return cfnAlarmPropsToCloudFormation(props);
235 }
236}
237exports.CfnAlarm = CfnAlarm;
238_a = JSII_RTTI_SYMBOL_1;
239CfnAlarm[_a] = { fqn: "@aws-cdk/aws-cloudwatch.CfnAlarm", version: "1.198.0" };
240/**
241 * The CloudFormation resource type name for this resource class.
242 */
243CfnAlarm.CFN_RESOURCE_TYPE_NAME = "AWS::CloudWatch::Alarm";
244/**
245 * Determine whether the given properties match those of a `DimensionProperty`
246 *
247 * @param properties - the TypeScript properties of a `DimensionProperty`
248 *
249 * @returns the result of the validation.
250 */
251function CfnAlarm_DimensionPropertyValidator(properties) {
252 if (!cdk.canInspect(properties)) {
253 return cdk.VALIDATION_SUCCESS;
254 }
255 const errors = new cdk.ValidationResults();
256 if (typeof properties !== 'object') {
257 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
258 }
259 errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));
260 errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));
261 errors.collect(cdk.propertyValidator('value', cdk.requiredValidator)(properties.value));
262 errors.collect(cdk.propertyValidator('value', cdk.validateString)(properties.value));
263 return errors.wrap('supplied properties not correct for "DimensionProperty"');
264}
265/**
266 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::Alarm.Dimension` resource
267 *
268 * @param properties - the TypeScript properties of a `DimensionProperty`
269 *
270 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::Alarm.Dimension` resource.
271 */
272// @ts-ignore TS6133
273function cfnAlarmDimensionPropertyToCloudFormation(properties) {
274 if (!cdk.canInspect(properties)) {
275 return properties;
276 }
277 CfnAlarm_DimensionPropertyValidator(properties).assertSuccess();
278 return {
279 Name: cdk.stringToCloudFormation(properties.name),
280 Value: cdk.stringToCloudFormation(properties.value),
281 };
282}
283// @ts-ignore TS6133
284function CfnAlarmDimensionPropertyFromCloudFormation(properties) {
285 if (cdk.isResolvableObject(properties)) {
286 return new cfn_parse.FromCloudFormationResult(properties);
287 }
288 properties = properties == null ? {} : properties;
289 if (typeof properties !== 'object') {
290 return new cfn_parse.FromCloudFormationResult(properties);
291 }
292 const ret = new cfn_parse.FromCloudFormationPropertyObject();
293 ret.addPropertyResult('name', 'Name', cfn_parse.FromCloudFormation.getString(properties.Name));
294 ret.addPropertyResult('value', 'Value', cfn_parse.FromCloudFormation.getString(properties.Value));
295 ret.addUnrecognizedPropertiesAsExtra(properties);
296 return ret;
297}
298/**
299 * Determine whether the given properties match those of a `MetricProperty`
300 *
301 * @param properties - the TypeScript properties of a `MetricProperty`
302 *
303 * @returns the result of the validation.
304 */
305function CfnAlarm_MetricPropertyValidator(properties) {
306 if (!cdk.canInspect(properties)) {
307 return cdk.VALIDATION_SUCCESS;
308 }
309 const errors = new cdk.ValidationResults();
310 if (typeof properties !== 'object') {
311 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
312 }
313 errors.collect(cdk.propertyValidator('dimensions', cdk.listValidator(CfnAlarm_DimensionPropertyValidator))(properties.dimensions));
314 errors.collect(cdk.propertyValidator('metricName', cdk.validateString)(properties.metricName));
315 errors.collect(cdk.propertyValidator('namespace', cdk.validateString)(properties.namespace));
316 return errors.wrap('supplied properties not correct for "MetricProperty"');
317}
318/**
319 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::Alarm.Metric` resource
320 *
321 * @param properties - the TypeScript properties of a `MetricProperty`
322 *
323 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::Alarm.Metric` resource.
324 */
325// @ts-ignore TS6133
326function cfnAlarmMetricPropertyToCloudFormation(properties) {
327 if (!cdk.canInspect(properties)) {
328 return properties;
329 }
330 CfnAlarm_MetricPropertyValidator(properties).assertSuccess();
331 return {
332 Dimensions: cdk.listMapper(cfnAlarmDimensionPropertyToCloudFormation)(properties.dimensions),
333 MetricName: cdk.stringToCloudFormation(properties.metricName),
334 Namespace: cdk.stringToCloudFormation(properties.namespace),
335 };
336}
337// @ts-ignore TS6133
338function CfnAlarmMetricPropertyFromCloudFormation(properties) {
339 if (cdk.isResolvableObject(properties)) {
340 return new cfn_parse.FromCloudFormationResult(properties);
341 }
342 properties = properties == null ? {} : properties;
343 if (typeof properties !== 'object') {
344 return new cfn_parse.FromCloudFormationResult(properties);
345 }
346 const ret = new cfn_parse.FromCloudFormationPropertyObject();
347 ret.addPropertyResult('dimensions', 'Dimensions', properties.Dimensions != null ? cfn_parse.FromCloudFormation.getArray(CfnAlarmDimensionPropertyFromCloudFormation)(properties.Dimensions) : undefined);
348 ret.addPropertyResult('metricName', 'MetricName', properties.MetricName != null ? cfn_parse.FromCloudFormation.getString(properties.MetricName) : undefined);
349 ret.addPropertyResult('namespace', 'Namespace', properties.Namespace != null ? cfn_parse.FromCloudFormation.getString(properties.Namespace) : undefined);
350 ret.addUnrecognizedPropertiesAsExtra(properties);
351 return ret;
352}
353/**
354 * Determine whether the given properties match those of a `MetricDataQueryProperty`
355 *
356 * @param properties - the TypeScript properties of a `MetricDataQueryProperty`
357 *
358 * @returns the result of the validation.
359 */
360function CfnAlarm_MetricDataQueryPropertyValidator(properties) {
361 if (!cdk.canInspect(properties)) {
362 return cdk.VALIDATION_SUCCESS;
363 }
364 const errors = new cdk.ValidationResults();
365 if (typeof properties !== 'object') {
366 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
367 }
368 errors.collect(cdk.propertyValidator('accountId', cdk.validateString)(properties.accountId));
369 errors.collect(cdk.propertyValidator('expression', cdk.validateString)(properties.expression));
370 errors.collect(cdk.propertyValidator('id', cdk.requiredValidator)(properties.id));
371 errors.collect(cdk.propertyValidator('id', cdk.validateString)(properties.id));
372 errors.collect(cdk.propertyValidator('label', cdk.validateString)(properties.label));
373 errors.collect(cdk.propertyValidator('metricStat', CfnAlarm_MetricStatPropertyValidator)(properties.metricStat));
374 errors.collect(cdk.propertyValidator('period', cdk.validateNumber)(properties.period));
375 errors.collect(cdk.propertyValidator('returnData', cdk.validateBoolean)(properties.returnData));
376 return errors.wrap('supplied properties not correct for "MetricDataQueryProperty"');
377}
378/**
379 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::Alarm.MetricDataQuery` resource
380 *
381 * @param properties - the TypeScript properties of a `MetricDataQueryProperty`
382 *
383 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::Alarm.MetricDataQuery` resource.
384 */
385// @ts-ignore TS6133
386function cfnAlarmMetricDataQueryPropertyToCloudFormation(properties) {
387 if (!cdk.canInspect(properties)) {
388 return properties;
389 }
390 CfnAlarm_MetricDataQueryPropertyValidator(properties).assertSuccess();
391 return {
392 AccountId: cdk.stringToCloudFormation(properties.accountId),
393 Expression: cdk.stringToCloudFormation(properties.expression),
394 Id: cdk.stringToCloudFormation(properties.id),
395 Label: cdk.stringToCloudFormation(properties.label),
396 MetricStat: cfnAlarmMetricStatPropertyToCloudFormation(properties.metricStat),
397 Period: cdk.numberToCloudFormation(properties.period),
398 ReturnData: cdk.booleanToCloudFormation(properties.returnData),
399 };
400}
401// @ts-ignore TS6133
402function CfnAlarmMetricDataQueryPropertyFromCloudFormation(properties) {
403 if (cdk.isResolvableObject(properties)) {
404 return new cfn_parse.FromCloudFormationResult(properties);
405 }
406 properties = properties == null ? {} : properties;
407 if (typeof properties !== 'object') {
408 return new cfn_parse.FromCloudFormationResult(properties);
409 }
410 const ret = new cfn_parse.FromCloudFormationPropertyObject();
411 ret.addPropertyResult('accountId', 'AccountId', properties.AccountId != null ? cfn_parse.FromCloudFormation.getString(properties.AccountId) : undefined);
412 ret.addPropertyResult('expression', 'Expression', properties.Expression != null ? cfn_parse.FromCloudFormation.getString(properties.Expression) : undefined);
413 ret.addPropertyResult('id', 'Id', cfn_parse.FromCloudFormation.getString(properties.Id));
414 ret.addPropertyResult('label', 'Label', properties.Label != null ? cfn_parse.FromCloudFormation.getString(properties.Label) : undefined);
415 ret.addPropertyResult('metricStat', 'MetricStat', properties.MetricStat != null ? CfnAlarmMetricStatPropertyFromCloudFormation(properties.MetricStat) : undefined);
416 ret.addPropertyResult('period', 'Period', properties.Period != null ? cfn_parse.FromCloudFormation.getNumber(properties.Period) : undefined);
417 ret.addPropertyResult('returnData', 'ReturnData', properties.ReturnData != null ? cfn_parse.FromCloudFormation.getBoolean(properties.ReturnData) : undefined);
418 ret.addUnrecognizedPropertiesAsExtra(properties);
419 return ret;
420}
421/**
422 * Determine whether the given properties match those of a `MetricStatProperty`
423 *
424 * @param properties - the TypeScript properties of a `MetricStatProperty`
425 *
426 * @returns the result of the validation.
427 */
428function CfnAlarm_MetricStatPropertyValidator(properties) {
429 if (!cdk.canInspect(properties)) {
430 return cdk.VALIDATION_SUCCESS;
431 }
432 const errors = new cdk.ValidationResults();
433 if (typeof properties !== 'object') {
434 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
435 }
436 errors.collect(cdk.propertyValidator('metric', cdk.requiredValidator)(properties.metric));
437 errors.collect(cdk.propertyValidator('metric', CfnAlarm_MetricPropertyValidator)(properties.metric));
438 errors.collect(cdk.propertyValidator('period', cdk.requiredValidator)(properties.period));
439 errors.collect(cdk.propertyValidator('period', cdk.validateNumber)(properties.period));
440 errors.collect(cdk.propertyValidator('stat', cdk.requiredValidator)(properties.stat));
441 errors.collect(cdk.propertyValidator('stat', cdk.validateString)(properties.stat));
442 errors.collect(cdk.propertyValidator('unit', cdk.validateString)(properties.unit));
443 return errors.wrap('supplied properties not correct for "MetricStatProperty"');
444}
445/**
446 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::Alarm.MetricStat` resource
447 *
448 * @param properties - the TypeScript properties of a `MetricStatProperty`
449 *
450 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::Alarm.MetricStat` resource.
451 */
452// @ts-ignore TS6133
453function cfnAlarmMetricStatPropertyToCloudFormation(properties) {
454 if (!cdk.canInspect(properties)) {
455 return properties;
456 }
457 CfnAlarm_MetricStatPropertyValidator(properties).assertSuccess();
458 return {
459 Metric: cfnAlarmMetricPropertyToCloudFormation(properties.metric),
460 Period: cdk.numberToCloudFormation(properties.period),
461 Stat: cdk.stringToCloudFormation(properties.stat),
462 Unit: cdk.stringToCloudFormation(properties.unit),
463 };
464}
465// @ts-ignore TS6133
466function CfnAlarmMetricStatPropertyFromCloudFormation(properties) {
467 if (cdk.isResolvableObject(properties)) {
468 return new cfn_parse.FromCloudFormationResult(properties);
469 }
470 properties = properties == null ? {} : properties;
471 if (typeof properties !== 'object') {
472 return new cfn_parse.FromCloudFormationResult(properties);
473 }
474 const ret = new cfn_parse.FromCloudFormationPropertyObject();
475 ret.addPropertyResult('metric', 'Metric', CfnAlarmMetricPropertyFromCloudFormation(properties.Metric));
476 ret.addPropertyResult('period', 'Period', cfn_parse.FromCloudFormation.getNumber(properties.Period));
477 ret.addPropertyResult('stat', 'Stat', cfn_parse.FromCloudFormation.getString(properties.Stat));
478 ret.addPropertyResult('unit', 'Unit', properties.Unit != null ? cfn_parse.FromCloudFormation.getString(properties.Unit) : undefined);
479 ret.addUnrecognizedPropertiesAsExtra(properties);
480 return ret;
481}
482/**
483 * Determine whether the given properties match those of a `CfnAnomalyDetectorProps`
484 *
485 * @param properties - the TypeScript properties of a `CfnAnomalyDetectorProps`
486 *
487 * @returns the result of the validation.
488 */
489function CfnAnomalyDetectorPropsValidator(properties) {
490 if (!cdk.canInspect(properties)) {
491 return cdk.VALIDATION_SUCCESS;
492 }
493 const errors = new cdk.ValidationResults();
494 if (typeof properties !== 'object') {
495 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
496 }
497 errors.collect(cdk.propertyValidator('configuration', CfnAnomalyDetector_ConfigurationPropertyValidator)(properties.configuration));
498 errors.collect(cdk.propertyValidator('dimensions', cdk.listValidator(CfnAnomalyDetector_DimensionPropertyValidator))(properties.dimensions));
499 errors.collect(cdk.propertyValidator('metricMathAnomalyDetector', CfnAnomalyDetector_MetricMathAnomalyDetectorPropertyValidator)(properties.metricMathAnomalyDetector));
500 errors.collect(cdk.propertyValidator('metricName', cdk.validateString)(properties.metricName));
501 errors.collect(cdk.propertyValidator('namespace', cdk.validateString)(properties.namespace));
502 errors.collect(cdk.propertyValidator('singleMetricAnomalyDetector', CfnAnomalyDetector_SingleMetricAnomalyDetectorPropertyValidator)(properties.singleMetricAnomalyDetector));
503 errors.collect(cdk.propertyValidator('stat', cdk.validateString)(properties.stat));
504 return errors.wrap('supplied properties not correct for "CfnAnomalyDetectorProps"');
505}
506/**
507 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector` resource
508 *
509 * @param properties - the TypeScript properties of a `CfnAnomalyDetectorProps`
510 *
511 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector` resource.
512 */
513// @ts-ignore TS6133
514function cfnAnomalyDetectorPropsToCloudFormation(properties) {
515 if (!cdk.canInspect(properties)) {
516 return properties;
517 }
518 CfnAnomalyDetectorPropsValidator(properties).assertSuccess();
519 return {
520 Configuration: cfnAnomalyDetectorConfigurationPropertyToCloudFormation(properties.configuration),
521 Dimensions: cdk.listMapper(cfnAnomalyDetectorDimensionPropertyToCloudFormation)(properties.dimensions),
522 MetricMathAnomalyDetector: cfnAnomalyDetectorMetricMathAnomalyDetectorPropertyToCloudFormation(properties.metricMathAnomalyDetector),
523 MetricName: cdk.stringToCloudFormation(properties.metricName),
524 Namespace: cdk.stringToCloudFormation(properties.namespace),
525 SingleMetricAnomalyDetector: cfnAnomalyDetectorSingleMetricAnomalyDetectorPropertyToCloudFormation(properties.singleMetricAnomalyDetector),
526 Stat: cdk.stringToCloudFormation(properties.stat),
527 };
528}
529// @ts-ignore TS6133
530function CfnAnomalyDetectorPropsFromCloudFormation(properties) {
531 properties = properties == null ? {} : properties;
532 if (typeof properties !== 'object') {
533 return new cfn_parse.FromCloudFormationResult(properties);
534 }
535 const ret = new cfn_parse.FromCloudFormationPropertyObject();
536 ret.addPropertyResult('configuration', 'Configuration', properties.Configuration != null ? CfnAnomalyDetectorConfigurationPropertyFromCloudFormation(properties.Configuration) : undefined);
537 ret.addPropertyResult('dimensions', 'Dimensions', properties.Dimensions != null ? cfn_parse.FromCloudFormation.getArray(CfnAnomalyDetectorDimensionPropertyFromCloudFormation)(properties.Dimensions) : undefined);
538 ret.addPropertyResult('metricMathAnomalyDetector', 'MetricMathAnomalyDetector', properties.MetricMathAnomalyDetector != null ? CfnAnomalyDetectorMetricMathAnomalyDetectorPropertyFromCloudFormation(properties.MetricMathAnomalyDetector) : undefined);
539 ret.addPropertyResult('metricName', 'MetricName', properties.MetricName != null ? cfn_parse.FromCloudFormation.getString(properties.MetricName) : undefined);
540 ret.addPropertyResult('namespace', 'Namespace', properties.Namespace != null ? cfn_parse.FromCloudFormation.getString(properties.Namespace) : undefined);
541 ret.addPropertyResult('singleMetricAnomalyDetector', 'SingleMetricAnomalyDetector', properties.SingleMetricAnomalyDetector != null ? CfnAnomalyDetectorSingleMetricAnomalyDetectorPropertyFromCloudFormation(properties.SingleMetricAnomalyDetector) : undefined);
542 ret.addPropertyResult('stat', 'Stat', properties.Stat != null ? cfn_parse.FromCloudFormation.getString(properties.Stat) : undefined);
543 ret.addUnrecognizedPropertiesAsExtra(properties);
544 return ret;
545}
546/**
547 * A CloudFormation `AWS::CloudWatch::AnomalyDetector`
548 *
549 * 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.
550 *
551 * @cloudformationResource AWS::CloudWatch::AnomalyDetector
552 * @stability external
553 *
554 * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-anomalydetector.html
555 */
556class CfnAnomalyDetector extends cdk.CfnResource {
557 /**
558 * Create a new `AWS::CloudWatch::AnomalyDetector`.
559 *
560 * @param scope - scope in which this resource is defined
561 * @param id - scoped id of the resource
562 * @param props - resource properties
563 */
564 constructor(scope, id, props = {}) {
565 super(scope, id, { type: CfnAnomalyDetector.CFN_RESOURCE_TYPE_NAME, properties: props });
566 try {
567 jsiiDeprecationWarnings._aws_cdk_aws_cloudwatch_CfnAnomalyDetectorProps(props);
568 }
569 catch (error) {
570 if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
571 Error.captureStackTrace(error, CfnAnomalyDetector);
572 }
573 throw error;
574 }
575 this.configuration = props.configuration;
576 this.dimensions = props.dimensions;
577 this.metricMathAnomalyDetector = props.metricMathAnomalyDetector;
578 this.metricName = props.metricName;
579 this.namespace = props.namespace;
580 this.singleMetricAnomalyDetector = props.singleMetricAnomalyDetector;
581 this.stat = props.stat;
582 }
583 /**
584 * A factory method that creates a new instance of this class from an object
585 * containing the CloudFormation properties of this resource.
586 * Used in the @aws-cdk/cloudformation-include module.
587 *
588 * @internal
589 */
590 static _fromCloudFormation(scope, id, resourceAttributes, options) {
591 resourceAttributes = resourceAttributes || {};
592 const resourceProperties = options.parser.parseValue(resourceAttributes.Properties);
593 const propsResult = CfnAnomalyDetectorPropsFromCloudFormation(resourceProperties);
594 const ret = new CfnAnomalyDetector(scope, id, propsResult.value);
595 for (const [propKey, propVal] of Object.entries(propsResult.extraProperties)) {
596 ret.addPropertyOverride(propKey, propVal);
597 }
598 options.parser.handleAttributes(ret, resourceAttributes, id);
599 return ret;
600 }
601 /**
602 * Examines the CloudFormation resource and discloses attributes.
603 *
604 * @param inspector - tree inspector to collect and process attributes
605 *
606 */
607 inspect(inspector) {
608 inspector.addAttribute("aws:cdk:cloudformation:type", CfnAnomalyDetector.CFN_RESOURCE_TYPE_NAME);
609 inspector.addAttribute("aws:cdk:cloudformation:props", this.cfnProperties);
610 }
611 get cfnProperties() {
612 return {
613 configuration: this.configuration,
614 dimensions: this.dimensions,
615 metricMathAnomalyDetector: this.metricMathAnomalyDetector,
616 metricName: this.metricName,
617 namespace: this.namespace,
618 singleMetricAnomalyDetector: this.singleMetricAnomalyDetector,
619 stat: this.stat,
620 };
621 }
622 renderProperties(props) {
623 return cfnAnomalyDetectorPropsToCloudFormation(props);
624 }
625}
626exports.CfnAnomalyDetector = CfnAnomalyDetector;
627_b = JSII_RTTI_SYMBOL_1;
628CfnAnomalyDetector[_b] = { fqn: "@aws-cdk/aws-cloudwatch.CfnAnomalyDetector", version: "1.198.0" };
629/**
630 * The CloudFormation resource type name for this resource class.
631 */
632CfnAnomalyDetector.CFN_RESOURCE_TYPE_NAME = "AWS::CloudWatch::AnomalyDetector";
633/**
634 * Determine whether the given properties match those of a `ConfigurationProperty`
635 *
636 * @param properties - the TypeScript properties of a `ConfigurationProperty`
637 *
638 * @returns the result of the validation.
639 */
640function CfnAnomalyDetector_ConfigurationPropertyValidator(properties) {
641 if (!cdk.canInspect(properties)) {
642 return cdk.VALIDATION_SUCCESS;
643 }
644 const errors = new cdk.ValidationResults();
645 if (typeof properties !== 'object') {
646 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
647 }
648 errors.collect(cdk.propertyValidator('excludedTimeRanges', cdk.listValidator(CfnAnomalyDetector_RangePropertyValidator))(properties.excludedTimeRanges));
649 errors.collect(cdk.propertyValidator('metricTimeZone', cdk.validateString)(properties.metricTimeZone));
650 return errors.wrap('supplied properties not correct for "ConfigurationProperty"');
651}
652/**
653 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector.Configuration` resource
654 *
655 * @param properties - the TypeScript properties of a `ConfigurationProperty`
656 *
657 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector.Configuration` resource.
658 */
659// @ts-ignore TS6133
660function cfnAnomalyDetectorConfigurationPropertyToCloudFormation(properties) {
661 if (!cdk.canInspect(properties)) {
662 return properties;
663 }
664 CfnAnomalyDetector_ConfigurationPropertyValidator(properties).assertSuccess();
665 return {
666 ExcludedTimeRanges: cdk.listMapper(cfnAnomalyDetectorRangePropertyToCloudFormation)(properties.excludedTimeRanges),
667 MetricTimeZone: cdk.stringToCloudFormation(properties.metricTimeZone),
668 };
669}
670// @ts-ignore TS6133
671function CfnAnomalyDetectorConfigurationPropertyFromCloudFormation(properties) {
672 if (cdk.isResolvableObject(properties)) {
673 return new cfn_parse.FromCloudFormationResult(properties);
674 }
675 properties = properties == null ? {} : properties;
676 if (typeof properties !== 'object') {
677 return new cfn_parse.FromCloudFormationResult(properties);
678 }
679 const ret = new cfn_parse.FromCloudFormationPropertyObject();
680 ret.addPropertyResult('excludedTimeRanges', 'ExcludedTimeRanges', properties.ExcludedTimeRanges != null ? cfn_parse.FromCloudFormation.getArray(CfnAnomalyDetectorRangePropertyFromCloudFormation)(properties.ExcludedTimeRanges) : undefined);
681 ret.addPropertyResult('metricTimeZone', 'MetricTimeZone', properties.MetricTimeZone != null ? cfn_parse.FromCloudFormation.getString(properties.MetricTimeZone) : undefined);
682 ret.addUnrecognizedPropertiesAsExtra(properties);
683 return ret;
684}
685/**
686 * Determine whether the given properties match those of a `DimensionProperty`
687 *
688 * @param properties - the TypeScript properties of a `DimensionProperty`
689 *
690 * @returns the result of the validation.
691 */
692function CfnAnomalyDetector_DimensionPropertyValidator(properties) {
693 if (!cdk.canInspect(properties)) {
694 return cdk.VALIDATION_SUCCESS;
695 }
696 const errors = new cdk.ValidationResults();
697 if (typeof properties !== 'object') {
698 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
699 }
700 errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));
701 errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));
702 errors.collect(cdk.propertyValidator('value', cdk.requiredValidator)(properties.value));
703 errors.collect(cdk.propertyValidator('value', cdk.validateString)(properties.value));
704 return errors.wrap('supplied properties not correct for "DimensionProperty"');
705}
706/**
707 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector.Dimension` resource
708 *
709 * @param properties - the TypeScript properties of a `DimensionProperty`
710 *
711 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector.Dimension` resource.
712 */
713// @ts-ignore TS6133
714function cfnAnomalyDetectorDimensionPropertyToCloudFormation(properties) {
715 if (!cdk.canInspect(properties)) {
716 return properties;
717 }
718 CfnAnomalyDetector_DimensionPropertyValidator(properties).assertSuccess();
719 return {
720 Name: cdk.stringToCloudFormation(properties.name),
721 Value: cdk.stringToCloudFormation(properties.value),
722 };
723}
724// @ts-ignore TS6133
725function CfnAnomalyDetectorDimensionPropertyFromCloudFormation(properties) {
726 if (cdk.isResolvableObject(properties)) {
727 return new cfn_parse.FromCloudFormationResult(properties);
728 }
729 properties = properties == null ? {} : properties;
730 if (typeof properties !== 'object') {
731 return new cfn_parse.FromCloudFormationResult(properties);
732 }
733 const ret = new cfn_parse.FromCloudFormationPropertyObject();
734 ret.addPropertyResult('name', 'Name', cfn_parse.FromCloudFormation.getString(properties.Name));
735 ret.addPropertyResult('value', 'Value', cfn_parse.FromCloudFormation.getString(properties.Value));
736 ret.addUnrecognizedPropertiesAsExtra(properties);
737 return ret;
738}
739/**
740 * Determine whether the given properties match those of a `MetricProperty`
741 *
742 * @param properties - the TypeScript properties of a `MetricProperty`
743 *
744 * @returns the result of the validation.
745 */
746function CfnAnomalyDetector_MetricPropertyValidator(properties) {
747 if (!cdk.canInspect(properties)) {
748 return cdk.VALIDATION_SUCCESS;
749 }
750 const errors = new cdk.ValidationResults();
751 if (typeof properties !== 'object') {
752 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
753 }
754 errors.collect(cdk.propertyValidator('dimensions', cdk.listValidator(CfnAnomalyDetector_DimensionPropertyValidator))(properties.dimensions));
755 errors.collect(cdk.propertyValidator('metricName', cdk.requiredValidator)(properties.metricName));
756 errors.collect(cdk.propertyValidator('metricName', cdk.validateString)(properties.metricName));
757 errors.collect(cdk.propertyValidator('namespace', cdk.requiredValidator)(properties.namespace));
758 errors.collect(cdk.propertyValidator('namespace', cdk.validateString)(properties.namespace));
759 return errors.wrap('supplied properties not correct for "MetricProperty"');
760}
761/**
762 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector.Metric` resource
763 *
764 * @param properties - the TypeScript properties of a `MetricProperty`
765 *
766 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector.Metric` resource.
767 */
768// @ts-ignore TS6133
769function cfnAnomalyDetectorMetricPropertyToCloudFormation(properties) {
770 if (!cdk.canInspect(properties)) {
771 return properties;
772 }
773 CfnAnomalyDetector_MetricPropertyValidator(properties).assertSuccess();
774 return {
775 Dimensions: cdk.listMapper(cfnAnomalyDetectorDimensionPropertyToCloudFormation)(properties.dimensions),
776 MetricName: cdk.stringToCloudFormation(properties.metricName),
777 Namespace: cdk.stringToCloudFormation(properties.namespace),
778 };
779}
780// @ts-ignore TS6133
781function CfnAnomalyDetectorMetricPropertyFromCloudFormation(properties) {
782 if (cdk.isResolvableObject(properties)) {
783 return new cfn_parse.FromCloudFormationResult(properties);
784 }
785 properties = properties == null ? {} : properties;
786 if (typeof properties !== 'object') {
787 return new cfn_parse.FromCloudFormationResult(properties);
788 }
789 const ret = new cfn_parse.FromCloudFormationPropertyObject();
790 ret.addPropertyResult('dimensions', 'Dimensions', properties.Dimensions != null ? cfn_parse.FromCloudFormation.getArray(CfnAnomalyDetectorDimensionPropertyFromCloudFormation)(properties.Dimensions) : undefined);
791 ret.addPropertyResult('metricName', 'MetricName', cfn_parse.FromCloudFormation.getString(properties.MetricName));
792 ret.addPropertyResult('namespace', 'Namespace', cfn_parse.FromCloudFormation.getString(properties.Namespace));
793 ret.addUnrecognizedPropertiesAsExtra(properties);
794 return ret;
795}
796/**
797 * Determine whether the given properties match those of a `MetricDataQueryProperty`
798 *
799 * @param properties - the TypeScript properties of a `MetricDataQueryProperty`
800 *
801 * @returns the result of the validation.
802 */
803function CfnAnomalyDetector_MetricDataQueryPropertyValidator(properties) {
804 if (!cdk.canInspect(properties)) {
805 return cdk.VALIDATION_SUCCESS;
806 }
807 const errors = new cdk.ValidationResults();
808 if (typeof properties !== 'object') {
809 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
810 }
811 errors.collect(cdk.propertyValidator('accountId', cdk.validateString)(properties.accountId));
812 errors.collect(cdk.propertyValidator('expression', cdk.validateString)(properties.expression));
813 errors.collect(cdk.propertyValidator('id', cdk.requiredValidator)(properties.id));
814 errors.collect(cdk.propertyValidator('id', cdk.validateString)(properties.id));
815 errors.collect(cdk.propertyValidator('label', cdk.validateString)(properties.label));
816 errors.collect(cdk.propertyValidator('metricStat', CfnAnomalyDetector_MetricStatPropertyValidator)(properties.metricStat));
817 errors.collect(cdk.propertyValidator('period', cdk.validateNumber)(properties.period));
818 errors.collect(cdk.propertyValidator('returnData', cdk.validateBoolean)(properties.returnData));
819 return errors.wrap('supplied properties not correct for "MetricDataQueryProperty"');
820}
821/**
822 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector.MetricDataQuery` resource
823 *
824 * @param properties - the TypeScript properties of a `MetricDataQueryProperty`
825 *
826 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector.MetricDataQuery` resource.
827 */
828// @ts-ignore TS6133
829function cfnAnomalyDetectorMetricDataQueryPropertyToCloudFormation(properties) {
830 if (!cdk.canInspect(properties)) {
831 return properties;
832 }
833 CfnAnomalyDetector_MetricDataQueryPropertyValidator(properties).assertSuccess();
834 return {
835 AccountId: cdk.stringToCloudFormation(properties.accountId),
836 Expression: cdk.stringToCloudFormation(properties.expression),
837 Id: cdk.stringToCloudFormation(properties.id),
838 Label: cdk.stringToCloudFormation(properties.label),
839 MetricStat: cfnAnomalyDetectorMetricStatPropertyToCloudFormation(properties.metricStat),
840 Period: cdk.numberToCloudFormation(properties.period),
841 ReturnData: cdk.booleanToCloudFormation(properties.returnData),
842 };
843}
844// @ts-ignore TS6133
845function CfnAnomalyDetectorMetricDataQueryPropertyFromCloudFormation(properties) {
846 if (cdk.isResolvableObject(properties)) {
847 return new cfn_parse.FromCloudFormationResult(properties);
848 }
849 properties = properties == null ? {} : properties;
850 if (typeof properties !== 'object') {
851 return new cfn_parse.FromCloudFormationResult(properties);
852 }
853 const ret = new cfn_parse.FromCloudFormationPropertyObject();
854 ret.addPropertyResult('accountId', 'AccountId', properties.AccountId != null ? cfn_parse.FromCloudFormation.getString(properties.AccountId) : undefined);
855 ret.addPropertyResult('expression', 'Expression', properties.Expression != null ? cfn_parse.FromCloudFormation.getString(properties.Expression) : undefined);
856 ret.addPropertyResult('id', 'Id', cfn_parse.FromCloudFormation.getString(properties.Id));
857 ret.addPropertyResult('label', 'Label', properties.Label != null ? cfn_parse.FromCloudFormation.getString(properties.Label) : undefined);
858 ret.addPropertyResult('metricStat', 'MetricStat', properties.MetricStat != null ? CfnAnomalyDetectorMetricStatPropertyFromCloudFormation(properties.MetricStat) : undefined);
859 ret.addPropertyResult('period', 'Period', properties.Period != null ? cfn_parse.FromCloudFormation.getNumber(properties.Period) : undefined);
860 ret.addPropertyResult('returnData', 'ReturnData', properties.ReturnData != null ? cfn_parse.FromCloudFormation.getBoolean(properties.ReturnData) : undefined);
861 ret.addUnrecognizedPropertiesAsExtra(properties);
862 return ret;
863}
864/**
865 * Determine whether the given properties match those of a `MetricMathAnomalyDetectorProperty`
866 *
867 * @param properties - the TypeScript properties of a `MetricMathAnomalyDetectorProperty`
868 *
869 * @returns the result of the validation.
870 */
871function CfnAnomalyDetector_MetricMathAnomalyDetectorPropertyValidator(properties) {
872 if (!cdk.canInspect(properties)) {
873 return cdk.VALIDATION_SUCCESS;
874 }
875 const errors = new cdk.ValidationResults();
876 if (typeof properties !== 'object') {
877 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
878 }
879 errors.collect(cdk.propertyValidator('metricDataQueries', cdk.listValidator(CfnAnomalyDetector_MetricDataQueryPropertyValidator))(properties.metricDataQueries));
880 return errors.wrap('supplied properties not correct for "MetricMathAnomalyDetectorProperty"');
881}
882/**
883 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector.MetricMathAnomalyDetector` resource
884 *
885 * @param properties - the TypeScript properties of a `MetricMathAnomalyDetectorProperty`
886 *
887 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector.MetricMathAnomalyDetector` resource.
888 */
889// @ts-ignore TS6133
890function cfnAnomalyDetectorMetricMathAnomalyDetectorPropertyToCloudFormation(properties) {
891 if (!cdk.canInspect(properties)) {
892 return properties;
893 }
894 CfnAnomalyDetector_MetricMathAnomalyDetectorPropertyValidator(properties).assertSuccess();
895 return {
896 MetricDataQueries: cdk.listMapper(cfnAnomalyDetectorMetricDataQueryPropertyToCloudFormation)(properties.metricDataQueries),
897 };
898}
899// @ts-ignore TS6133
900function CfnAnomalyDetectorMetricMathAnomalyDetectorPropertyFromCloudFormation(properties) {
901 if (cdk.isResolvableObject(properties)) {
902 return new cfn_parse.FromCloudFormationResult(properties);
903 }
904 properties = properties == null ? {} : properties;
905 if (typeof properties !== 'object') {
906 return new cfn_parse.FromCloudFormationResult(properties);
907 }
908 const ret = new cfn_parse.FromCloudFormationPropertyObject();
909 ret.addPropertyResult('metricDataQueries', 'MetricDataQueries', properties.MetricDataQueries != null ? cfn_parse.FromCloudFormation.getArray(CfnAnomalyDetectorMetricDataQueryPropertyFromCloudFormation)(properties.MetricDataQueries) : undefined);
910 ret.addUnrecognizedPropertiesAsExtra(properties);
911 return ret;
912}
913/**
914 * Determine whether the given properties match those of a `MetricStatProperty`
915 *
916 * @param properties - the TypeScript properties of a `MetricStatProperty`
917 *
918 * @returns the result of the validation.
919 */
920function CfnAnomalyDetector_MetricStatPropertyValidator(properties) {
921 if (!cdk.canInspect(properties)) {
922 return cdk.VALIDATION_SUCCESS;
923 }
924 const errors = new cdk.ValidationResults();
925 if (typeof properties !== 'object') {
926 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
927 }
928 errors.collect(cdk.propertyValidator('metric', cdk.requiredValidator)(properties.metric));
929 errors.collect(cdk.propertyValidator('metric', CfnAnomalyDetector_MetricPropertyValidator)(properties.metric));
930 errors.collect(cdk.propertyValidator('period', cdk.requiredValidator)(properties.period));
931 errors.collect(cdk.propertyValidator('period', cdk.validateNumber)(properties.period));
932 errors.collect(cdk.propertyValidator('stat', cdk.requiredValidator)(properties.stat));
933 errors.collect(cdk.propertyValidator('stat', cdk.validateString)(properties.stat));
934 errors.collect(cdk.propertyValidator('unit', cdk.validateString)(properties.unit));
935 return errors.wrap('supplied properties not correct for "MetricStatProperty"');
936}
937/**
938 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector.MetricStat` resource
939 *
940 * @param properties - the TypeScript properties of a `MetricStatProperty`
941 *
942 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector.MetricStat` resource.
943 */
944// @ts-ignore TS6133
945function cfnAnomalyDetectorMetricStatPropertyToCloudFormation(properties) {
946 if (!cdk.canInspect(properties)) {
947 return properties;
948 }
949 CfnAnomalyDetector_MetricStatPropertyValidator(properties).assertSuccess();
950 return {
951 Metric: cfnAnomalyDetectorMetricPropertyToCloudFormation(properties.metric),
952 Period: cdk.numberToCloudFormation(properties.period),
953 Stat: cdk.stringToCloudFormation(properties.stat),
954 Unit: cdk.stringToCloudFormation(properties.unit),
955 };
956}
957// @ts-ignore TS6133
958function CfnAnomalyDetectorMetricStatPropertyFromCloudFormation(properties) {
959 if (cdk.isResolvableObject(properties)) {
960 return new cfn_parse.FromCloudFormationResult(properties);
961 }
962 properties = properties == null ? {} : properties;
963 if (typeof properties !== 'object') {
964 return new cfn_parse.FromCloudFormationResult(properties);
965 }
966 const ret = new cfn_parse.FromCloudFormationPropertyObject();
967 ret.addPropertyResult('metric', 'Metric', CfnAnomalyDetectorMetricPropertyFromCloudFormation(properties.Metric));
968 ret.addPropertyResult('period', 'Period', cfn_parse.FromCloudFormation.getNumber(properties.Period));
969 ret.addPropertyResult('stat', 'Stat', cfn_parse.FromCloudFormation.getString(properties.Stat));
970 ret.addPropertyResult('unit', 'Unit', properties.Unit != null ? cfn_parse.FromCloudFormation.getString(properties.Unit) : undefined);
971 ret.addUnrecognizedPropertiesAsExtra(properties);
972 return ret;
973}
974/**
975 * Determine whether the given properties match those of a `RangeProperty`
976 *
977 * @param properties - the TypeScript properties of a `RangeProperty`
978 *
979 * @returns the result of the validation.
980 */
981function CfnAnomalyDetector_RangePropertyValidator(properties) {
982 if (!cdk.canInspect(properties)) {
983 return cdk.VALIDATION_SUCCESS;
984 }
985 const errors = new cdk.ValidationResults();
986 if (typeof properties !== 'object') {
987 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
988 }
989 errors.collect(cdk.propertyValidator('endTime', cdk.requiredValidator)(properties.endTime));
990 errors.collect(cdk.propertyValidator('endTime', cdk.validateString)(properties.endTime));
991 errors.collect(cdk.propertyValidator('startTime', cdk.requiredValidator)(properties.startTime));
992 errors.collect(cdk.propertyValidator('startTime', cdk.validateString)(properties.startTime));
993 return errors.wrap('supplied properties not correct for "RangeProperty"');
994}
995/**
996 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector.Range` resource
997 *
998 * @param properties - the TypeScript properties of a `RangeProperty`
999 *
1000 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector.Range` resource.
1001 */
1002// @ts-ignore TS6133
1003function cfnAnomalyDetectorRangePropertyToCloudFormation(properties) {
1004 if (!cdk.canInspect(properties)) {
1005 return properties;
1006 }
1007 CfnAnomalyDetector_RangePropertyValidator(properties).assertSuccess();
1008 return {
1009 EndTime: cdk.stringToCloudFormation(properties.endTime),
1010 StartTime: cdk.stringToCloudFormation(properties.startTime),
1011 };
1012}
1013// @ts-ignore TS6133
1014function CfnAnomalyDetectorRangePropertyFromCloudFormation(properties) {
1015 if (cdk.isResolvableObject(properties)) {
1016 return new cfn_parse.FromCloudFormationResult(properties);
1017 }
1018 properties = properties == null ? {} : properties;
1019 if (typeof properties !== 'object') {
1020 return new cfn_parse.FromCloudFormationResult(properties);
1021 }
1022 const ret = new cfn_parse.FromCloudFormationPropertyObject();
1023 ret.addPropertyResult('endTime', 'EndTime', cfn_parse.FromCloudFormation.getString(properties.EndTime));
1024 ret.addPropertyResult('startTime', 'StartTime', cfn_parse.FromCloudFormation.getString(properties.StartTime));
1025 ret.addUnrecognizedPropertiesAsExtra(properties);
1026 return ret;
1027}
1028/**
1029 * Determine whether the given properties match those of a `SingleMetricAnomalyDetectorProperty`
1030 *
1031 * @param properties - the TypeScript properties of a `SingleMetricAnomalyDetectorProperty`
1032 *
1033 * @returns the result of the validation.
1034 */
1035function CfnAnomalyDetector_SingleMetricAnomalyDetectorPropertyValidator(properties) {
1036 if (!cdk.canInspect(properties)) {
1037 return cdk.VALIDATION_SUCCESS;
1038 }
1039 const errors = new cdk.ValidationResults();
1040 if (typeof properties !== 'object') {
1041 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
1042 }
1043 errors.collect(cdk.propertyValidator('dimensions', cdk.listValidator(CfnAnomalyDetector_DimensionPropertyValidator))(properties.dimensions));
1044 errors.collect(cdk.propertyValidator('metricName', cdk.validateString)(properties.metricName));
1045 errors.collect(cdk.propertyValidator('namespace', cdk.validateString)(properties.namespace));
1046 errors.collect(cdk.propertyValidator('stat', cdk.validateString)(properties.stat));
1047 return errors.wrap('supplied properties not correct for "SingleMetricAnomalyDetectorProperty"');
1048}
1049/**
1050 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector.SingleMetricAnomalyDetector` resource
1051 *
1052 * @param properties - the TypeScript properties of a `SingleMetricAnomalyDetectorProperty`
1053 *
1054 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::AnomalyDetector.SingleMetricAnomalyDetector` resource.
1055 */
1056// @ts-ignore TS6133
1057function cfnAnomalyDetectorSingleMetricAnomalyDetectorPropertyToCloudFormation(properties) {
1058 if (!cdk.canInspect(properties)) {
1059 return properties;
1060 }
1061 CfnAnomalyDetector_SingleMetricAnomalyDetectorPropertyValidator(properties).assertSuccess();
1062 return {
1063 Dimensions: cdk.listMapper(cfnAnomalyDetectorDimensionPropertyToCloudFormation)(properties.dimensions),
1064 MetricName: cdk.stringToCloudFormation(properties.metricName),
1065 Namespace: cdk.stringToCloudFormation(properties.namespace),
1066 Stat: cdk.stringToCloudFormation(properties.stat),
1067 };
1068}
1069// @ts-ignore TS6133
1070function CfnAnomalyDetectorSingleMetricAnomalyDetectorPropertyFromCloudFormation(properties) {
1071 if (cdk.isResolvableObject(properties)) {
1072 return new cfn_parse.FromCloudFormationResult(properties);
1073 }
1074 properties = properties == null ? {} : properties;
1075 if (typeof properties !== 'object') {
1076 return new cfn_parse.FromCloudFormationResult(properties);
1077 }
1078 const ret = new cfn_parse.FromCloudFormationPropertyObject();
1079 ret.addPropertyResult('dimensions', 'Dimensions', properties.Dimensions != null ? cfn_parse.FromCloudFormation.getArray(CfnAnomalyDetectorDimensionPropertyFromCloudFormation)(properties.Dimensions) : undefined);
1080 ret.addPropertyResult('metricName', 'MetricName', properties.MetricName != null ? cfn_parse.FromCloudFormation.getString(properties.MetricName) : undefined);
1081 ret.addPropertyResult('namespace', 'Namespace', properties.Namespace != null ? cfn_parse.FromCloudFormation.getString(properties.Namespace) : undefined);
1082 ret.addPropertyResult('stat', 'Stat', properties.Stat != null ? cfn_parse.FromCloudFormation.getString(properties.Stat) : undefined);
1083 ret.addUnrecognizedPropertiesAsExtra(properties);
1084 return ret;
1085}
1086/**
1087 * Determine whether the given properties match those of a `CfnCompositeAlarmProps`
1088 *
1089 * @param properties - the TypeScript properties of a `CfnCompositeAlarmProps`
1090 *
1091 * @returns the result of the validation.
1092 */
1093function CfnCompositeAlarmPropsValidator(properties) {
1094 if (!cdk.canInspect(properties)) {
1095 return cdk.VALIDATION_SUCCESS;
1096 }
1097 const errors = new cdk.ValidationResults();
1098 if (typeof properties !== 'object') {
1099 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
1100 }
1101 errors.collect(cdk.propertyValidator('actionsEnabled', cdk.validateBoolean)(properties.actionsEnabled));
1102 errors.collect(cdk.propertyValidator('actionsSuppressor', cdk.validateString)(properties.actionsSuppressor));
1103 errors.collect(cdk.propertyValidator('actionsSuppressorExtensionPeriod', cdk.validateNumber)(properties.actionsSuppressorExtensionPeriod));
1104 errors.collect(cdk.propertyValidator('actionsSuppressorWaitPeriod', cdk.validateNumber)(properties.actionsSuppressorWaitPeriod));
1105 errors.collect(cdk.propertyValidator('alarmActions', cdk.listValidator(cdk.validateString))(properties.alarmActions));
1106 errors.collect(cdk.propertyValidator('alarmDescription', cdk.validateString)(properties.alarmDescription));
1107 errors.collect(cdk.propertyValidator('alarmName', cdk.validateString)(properties.alarmName));
1108 errors.collect(cdk.propertyValidator('alarmRule', cdk.requiredValidator)(properties.alarmRule));
1109 errors.collect(cdk.propertyValidator('alarmRule', cdk.validateString)(properties.alarmRule));
1110 errors.collect(cdk.propertyValidator('insufficientDataActions', cdk.listValidator(cdk.validateString))(properties.insufficientDataActions));
1111 errors.collect(cdk.propertyValidator('okActions', cdk.listValidator(cdk.validateString))(properties.okActions));
1112 return errors.wrap('supplied properties not correct for "CfnCompositeAlarmProps"');
1113}
1114/**
1115 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::CompositeAlarm` resource
1116 *
1117 * @param properties - the TypeScript properties of a `CfnCompositeAlarmProps`
1118 *
1119 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::CompositeAlarm` resource.
1120 */
1121// @ts-ignore TS6133
1122function cfnCompositeAlarmPropsToCloudFormation(properties) {
1123 if (!cdk.canInspect(properties)) {
1124 return properties;
1125 }
1126 CfnCompositeAlarmPropsValidator(properties).assertSuccess();
1127 return {
1128 AlarmRule: cdk.stringToCloudFormation(properties.alarmRule),
1129 ActionsEnabled: cdk.booleanToCloudFormation(properties.actionsEnabled),
1130 ActionsSuppressor: cdk.stringToCloudFormation(properties.actionsSuppressor),
1131 ActionsSuppressorExtensionPeriod: cdk.numberToCloudFormation(properties.actionsSuppressorExtensionPeriod),
1132 ActionsSuppressorWaitPeriod: cdk.numberToCloudFormation(properties.actionsSuppressorWaitPeriod),
1133 AlarmActions: cdk.listMapper(cdk.stringToCloudFormation)(properties.alarmActions),
1134 AlarmDescription: cdk.stringToCloudFormation(properties.alarmDescription),
1135 AlarmName: cdk.stringToCloudFormation(properties.alarmName),
1136 InsufficientDataActions: cdk.listMapper(cdk.stringToCloudFormation)(properties.insufficientDataActions),
1137 OKActions: cdk.listMapper(cdk.stringToCloudFormation)(properties.okActions),
1138 };
1139}
1140// @ts-ignore TS6133
1141function CfnCompositeAlarmPropsFromCloudFormation(properties) {
1142 properties = properties == null ? {} : properties;
1143 if (typeof properties !== 'object') {
1144 return new cfn_parse.FromCloudFormationResult(properties);
1145 }
1146 const ret = new cfn_parse.FromCloudFormationPropertyObject();
1147 ret.addPropertyResult('alarmRule', 'AlarmRule', cfn_parse.FromCloudFormation.getString(properties.AlarmRule));
1148 ret.addPropertyResult('actionsEnabled', 'ActionsEnabled', properties.ActionsEnabled != null ? cfn_parse.FromCloudFormation.getBoolean(properties.ActionsEnabled) : undefined);
1149 ret.addPropertyResult('actionsSuppressor', 'ActionsSuppressor', properties.ActionsSuppressor != null ? cfn_parse.FromCloudFormation.getString(properties.ActionsSuppressor) : undefined);
1150 ret.addPropertyResult('actionsSuppressorExtensionPeriod', 'ActionsSuppressorExtensionPeriod', properties.ActionsSuppressorExtensionPeriod != null ? cfn_parse.FromCloudFormation.getNumber(properties.ActionsSuppressorExtensionPeriod) : undefined);
1151 ret.addPropertyResult('actionsSuppressorWaitPeriod', 'ActionsSuppressorWaitPeriod', properties.ActionsSuppressorWaitPeriod != null ? cfn_parse.FromCloudFormation.getNumber(properties.ActionsSuppressorWaitPeriod) : undefined);
1152 ret.addPropertyResult('alarmActions', 'AlarmActions', properties.AlarmActions != null ? cfn_parse.FromCloudFormation.getStringArray(properties.AlarmActions) : undefined);
1153 ret.addPropertyResult('alarmDescription', 'AlarmDescription', properties.AlarmDescription != null ? cfn_parse.FromCloudFormation.getString(properties.AlarmDescription) : undefined);
1154 ret.addPropertyResult('alarmName', 'AlarmName', properties.AlarmName != null ? cfn_parse.FromCloudFormation.getString(properties.AlarmName) : undefined);
1155 ret.addPropertyResult('insufficientDataActions', 'InsufficientDataActions', properties.InsufficientDataActions != null ? cfn_parse.FromCloudFormation.getStringArray(properties.InsufficientDataActions) : undefined);
1156 ret.addPropertyResult('okActions', 'OKActions', properties.OKActions != null ? cfn_parse.FromCloudFormation.getStringArray(properties.OKActions) : undefined);
1157 ret.addUnrecognizedPropertiesAsExtra(properties);
1158 return ret;
1159}
1160/**
1161 * A CloudFormation `AWS::CloudWatch::CompositeAlarm`
1162 *
1163 * 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.
1164 *
1165 * The alarms specified in a composite alarm's rule expression can include metric alarms and other composite alarms.
1166 *
1167 * 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.
1168 *
1169 * Currently, the only alarm actions that can be taken by composite alarms are notifying SNS topics.
1170 *
1171 * 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.
1172 *
1173 * When you update an existing alarm, its state is left unchanged, but the update completely overwrites the previous configuration of the alarm.
1174 *
1175 * @cloudformationResource AWS::CloudWatch::CompositeAlarm
1176 * @stability external
1177 *
1178 * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-compositealarm.html
1179 */
1180class CfnCompositeAlarm extends cdk.CfnResource {
1181 /**
1182 * Create a new `AWS::CloudWatch::CompositeAlarm`.
1183 *
1184 * @param scope - scope in which this resource is defined
1185 * @param id - scoped id of the resource
1186 * @param props - resource properties
1187 */
1188 constructor(scope, id, props) {
1189 super(scope, id, { type: CfnCompositeAlarm.CFN_RESOURCE_TYPE_NAME, properties: props });
1190 try {
1191 jsiiDeprecationWarnings._aws_cdk_aws_cloudwatch_CfnCompositeAlarmProps(props);
1192 }
1193 catch (error) {
1194 if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
1195 Error.captureStackTrace(error, CfnCompositeAlarm);
1196 }
1197 throw error;
1198 }
1199 cdk.requireProperty(props, 'alarmRule', this);
1200 this.attrArn = cdk.Token.asString(this.getAtt('Arn'));
1201 this.alarmRule = props.alarmRule;
1202 this.actionsEnabled = props.actionsEnabled;
1203 this.actionsSuppressor = props.actionsSuppressor;
1204 this.actionsSuppressorExtensionPeriod = props.actionsSuppressorExtensionPeriod;
1205 this.actionsSuppressorWaitPeriod = props.actionsSuppressorWaitPeriod;
1206 this.alarmActions = props.alarmActions;
1207 this.alarmDescription = props.alarmDescription;
1208 this.alarmName = props.alarmName;
1209 this.insufficientDataActions = props.insufficientDataActions;
1210 this.okActions = props.okActions;
1211 }
1212 /**
1213 * A factory method that creates a new instance of this class from an object
1214 * containing the CloudFormation properties of this resource.
1215 * Used in the @aws-cdk/cloudformation-include module.
1216 *
1217 * @internal
1218 */
1219 static _fromCloudFormation(scope, id, resourceAttributes, options) {
1220 resourceAttributes = resourceAttributes || {};
1221 const resourceProperties = options.parser.parseValue(resourceAttributes.Properties);
1222 const propsResult = CfnCompositeAlarmPropsFromCloudFormation(resourceProperties);
1223 const ret = new CfnCompositeAlarm(scope, id, propsResult.value);
1224 for (const [propKey, propVal] of Object.entries(propsResult.extraProperties)) {
1225 ret.addPropertyOverride(propKey, propVal);
1226 }
1227 options.parser.handleAttributes(ret, resourceAttributes, id);
1228 return ret;
1229 }
1230 /**
1231 * Examines the CloudFormation resource and discloses attributes.
1232 *
1233 * @param inspector - tree inspector to collect and process attributes
1234 *
1235 */
1236 inspect(inspector) {
1237 inspector.addAttribute("aws:cdk:cloudformation:type", CfnCompositeAlarm.CFN_RESOURCE_TYPE_NAME);
1238 inspector.addAttribute("aws:cdk:cloudformation:props", this.cfnProperties);
1239 }
1240 get cfnProperties() {
1241 return {
1242 alarmRule: this.alarmRule,
1243 actionsEnabled: this.actionsEnabled,
1244 actionsSuppressor: this.actionsSuppressor,
1245 actionsSuppressorExtensionPeriod: this.actionsSuppressorExtensionPeriod,
1246 actionsSuppressorWaitPeriod: this.actionsSuppressorWaitPeriod,
1247 alarmActions: this.alarmActions,
1248 alarmDescription: this.alarmDescription,
1249 alarmName: this.alarmName,
1250 insufficientDataActions: this.insufficientDataActions,
1251 okActions: this.okActions,
1252 };
1253 }
1254 renderProperties(props) {
1255 return cfnCompositeAlarmPropsToCloudFormation(props);
1256 }
1257}
1258exports.CfnCompositeAlarm = CfnCompositeAlarm;
1259_c = JSII_RTTI_SYMBOL_1;
1260CfnCompositeAlarm[_c] = { fqn: "@aws-cdk/aws-cloudwatch.CfnCompositeAlarm", version: "1.198.0" };
1261/**
1262 * The CloudFormation resource type name for this resource class.
1263 */
1264CfnCompositeAlarm.CFN_RESOURCE_TYPE_NAME = "AWS::CloudWatch::CompositeAlarm";
1265/**
1266 * Determine whether the given properties match those of a `CfnDashboardProps`
1267 *
1268 * @param properties - the TypeScript properties of a `CfnDashboardProps`
1269 *
1270 * @returns the result of the validation.
1271 */
1272function CfnDashboardPropsValidator(properties) {
1273 if (!cdk.canInspect(properties)) {
1274 return cdk.VALIDATION_SUCCESS;
1275 }
1276 const errors = new cdk.ValidationResults();
1277 if (typeof properties !== 'object') {
1278 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
1279 }
1280 errors.collect(cdk.propertyValidator('dashboardBody', cdk.requiredValidator)(properties.dashboardBody));
1281 errors.collect(cdk.propertyValidator('dashboardBody', cdk.validateString)(properties.dashboardBody));
1282 errors.collect(cdk.propertyValidator('dashboardName', cdk.validateString)(properties.dashboardName));
1283 return errors.wrap('supplied properties not correct for "CfnDashboardProps"');
1284}
1285/**
1286 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::Dashboard` resource
1287 *
1288 * @param properties - the TypeScript properties of a `CfnDashboardProps`
1289 *
1290 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::Dashboard` resource.
1291 */
1292// @ts-ignore TS6133
1293function cfnDashboardPropsToCloudFormation(properties) {
1294 if (!cdk.canInspect(properties)) {
1295 return properties;
1296 }
1297 CfnDashboardPropsValidator(properties).assertSuccess();
1298 return {
1299 DashboardBody: cdk.stringToCloudFormation(properties.dashboardBody),
1300 DashboardName: cdk.stringToCloudFormation(properties.dashboardName),
1301 };
1302}
1303// @ts-ignore TS6133
1304function CfnDashboardPropsFromCloudFormation(properties) {
1305 properties = properties == null ? {} : properties;
1306 if (typeof properties !== 'object') {
1307 return new cfn_parse.FromCloudFormationResult(properties);
1308 }
1309 const ret = new cfn_parse.FromCloudFormationPropertyObject();
1310 ret.addPropertyResult('dashboardBody', 'DashboardBody', cfn_parse.FromCloudFormation.getString(properties.DashboardBody));
1311 ret.addPropertyResult('dashboardName', 'DashboardName', properties.DashboardName != null ? cfn_parse.FromCloudFormation.getString(properties.DashboardName) : undefined);
1312 ret.addUnrecognizedPropertiesAsExtra(properties);
1313 return ret;
1314}
1315/**
1316 * A CloudFormation `AWS::CloudWatch::Dashboard`
1317 *
1318 * 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.
1319 *
1320 * All dashboards in your account are global, not region-specific.
1321 *
1322 * @cloudformationResource AWS::CloudWatch::Dashboard
1323 * @stability external
1324 *
1325 * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-dashboard.html
1326 */
1327class CfnDashboard extends cdk.CfnResource {
1328 /**
1329 * Create a new `AWS::CloudWatch::Dashboard`.
1330 *
1331 * @param scope - scope in which this resource is defined
1332 * @param id - scoped id of the resource
1333 * @param props - resource properties
1334 */
1335 constructor(scope, id, props) {
1336 super(scope, id, { type: CfnDashboard.CFN_RESOURCE_TYPE_NAME, properties: props });
1337 try {
1338 jsiiDeprecationWarnings._aws_cdk_aws_cloudwatch_CfnDashboardProps(props);
1339 }
1340 catch (error) {
1341 if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
1342 Error.captureStackTrace(error, CfnDashboard);
1343 }
1344 throw error;
1345 }
1346 cdk.requireProperty(props, 'dashboardBody', this);
1347 this.dashboardBody = props.dashboardBody;
1348 this.dashboardName = props.dashboardName;
1349 }
1350 /**
1351 * A factory method that creates a new instance of this class from an object
1352 * containing the CloudFormation properties of this resource.
1353 * Used in the @aws-cdk/cloudformation-include module.
1354 *
1355 * @internal
1356 */
1357 static _fromCloudFormation(scope, id, resourceAttributes, options) {
1358 resourceAttributes = resourceAttributes || {};
1359 const resourceProperties = options.parser.parseValue(resourceAttributes.Properties);
1360 const propsResult = CfnDashboardPropsFromCloudFormation(resourceProperties);
1361 const ret = new CfnDashboard(scope, id, propsResult.value);
1362 for (const [propKey, propVal] of Object.entries(propsResult.extraProperties)) {
1363 ret.addPropertyOverride(propKey, propVal);
1364 }
1365 options.parser.handleAttributes(ret, resourceAttributes, id);
1366 return ret;
1367 }
1368 /**
1369 * Examines the CloudFormation resource and discloses attributes.
1370 *
1371 * @param inspector - tree inspector to collect and process attributes
1372 *
1373 */
1374 inspect(inspector) {
1375 inspector.addAttribute("aws:cdk:cloudformation:type", CfnDashboard.CFN_RESOURCE_TYPE_NAME);
1376 inspector.addAttribute("aws:cdk:cloudformation:props", this.cfnProperties);
1377 }
1378 get cfnProperties() {
1379 return {
1380 dashboardBody: this.dashboardBody,
1381 dashboardName: this.dashboardName,
1382 };
1383 }
1384 renderProperties(props) {
1385 return cfnDashboardPropsToCloudFormation(props);
1386 }
1387}
1388exports.CfnDashboard = CfnDashboard;
1389_d = JSII_RTTI_SYMBOL_1;
1390CfnDashboard[_d] = { fqn: "@aws-cdk/aws-cloudwatch.CfnDashboard", version: "1.198.0" };
1391/**
1392 * The CloudFormation resource type name for this resource class.
1393 */
1394CfnDashboard.CFN_RESOURCE_TYPE_NAME = "AWS::CloudWatch::Dashboard";
1395/**
1396 * Determine whether the given properties match those of a `CfnInsightRuleProps`
1397 *
1398 * @param properties - the TypeScript properties of a `CfnInsightRuleProps`
1399 *
1400 * @returns the result of the validation.
1401 */
1402function CfnInsightRulePropsValidator(properties) {
1403 if (!cdk.canInspect(properties)) {
1404 return cdk.VALIDATION_SUCCESS;
1405 }
1406 const errors = new cdk.ValidationResults();
1407 if (typeof properties !== 'object') {
1408 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
1409 }
1410 errors.collect(cdk.propertyValidator('ruleBody', cdk.requiredValidator)(properties.ruleBody));
1411 errors.collect(cdk.propertyValidator('ruleBody', cdk.validateString)(properties.ruleBody));
1412 errors.collect(cdk.propertyValidator('ruleName', cdk.requiredValidator)(properties.ruleName));
1413 errors.collect(cdk.propertyValidator('ruleName', cdk.validateString)(properties.ruleName));
1414 errors.collect(cdk.propertyValidator('ruleState', cdk.requiredValidator)(properties.ruleState));
1415 errors.collect(cdk.propertyValidator('ruleState', cdk.validateString)(properties.ruleState));
1416 errors.collect(cdk.propertyValidator('tags', cdk.listValidator(cdk.validateCfnTag))(properties.tags));
1417 return errors.wrap('supplied properties not correct for "CfnInsightRuleProps"');
1418}
1419/**
1420 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::InsightRule` resource
1421 *
1422 * @param properties - the TypeScript properties of a `CfnInsightRuleProps`
1423 *
1424 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::InsightRule` resource.
1425 */
1426// @ts-ignore TS6133
1427function cfnInsightRulePropsToCloudFormation(properties) {
1428 if (!cdk.canInspect(properties)) {
1429 return properties;
1430 }
1431 CfnInsightRulePropsValidator(properties).assertSuccess();
1432 return {
1433 RuleBody: cdk.stringToCloudFormation(properties.ruleBody),
1434 RuleName: cdk.stringToCloudFormation(properties.ruleName),
1435 RuleState: cdk.stringToCloudFormation(properties.ruleState),
1436 Tags: cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags),
1437 };
1438}
1439// @ts-ignore TS6133
1440function CfnInsightRulePropsFromCloudFormation(properties) {
1441 properties = properties == null ? {} : properties;
1442 if (typeof properties !== 'object') {
1443 return new cfn_parse.FromCloudFormationResult(properties);
1444 }
1445 const ret = new cfn_parse.FromCloudFormationPropertyObject();
1446 ret.addPropertyResult('ruleBody', 'RuleBody', cfn_parse.FromCloudFormation.getString(properties.RuleBody));
1447 ret.addPropertyResult('ruleName', 'RuleName', cfn_parse.FromCloudFormation.getString(properties.RuleName));
1448 ret.addPropertyResult('ruleState', 'RuleState', cfn_parse.FromCloudFormation.getString(properties.RuleState));
1449 ret.addPropertyResult('tags', 'Tags', properties.Tags != null ? cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags) : undefined);
1450 ret.addUnrecognizedPropertiesAsExtra(properties);
1451 return ret;
1452}
1453/**
1454 * A CloudFormation `AWS::CloudWatch::InsightRule`
1455 *
1456 * 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* .
1457 *
1458 * @cloudformationResource AWS::CloudWatch::InsightRule
1459 * @stability external
1460 *
1461 * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-insightrule.html
1462 */
1463class CfnInsightRule extends cdk.CfnResource {
1464 /**
1465 * Create a new `AWS::CloudWatch::InsightRule`.
1466 *
1467 * @param scope - scope in which this resource is defined
1468 * @param id - scoped id of the resource
1469 * @param props - resource properties
1470 */
1471 constructor(scope, id, props) {
1472 super(scope, id, { type: CfnInsightRule.CFN_RESOURCE_TYPE_NAME, properties: props });
1473 try {
1474 jsiiDeprecationWarnings._aws_cdk_aws_cloudwatch_CfnInsightRuleProps(props);
1475 }
1476 catch (error) {
1477 if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
1478 Error.captureStackTrace(error, CfnInsightRule);
1479 }
1480 throw error;
1481 }
1482 cdk.requireProperty(props, 'ruleBody', this);
1483 cdk.requireProperty(props, 'ruleName', this);
1484 cdk.requireProperty(props, 'ruleState', this);
1485 this.attrArn = cdk.Token.asString(this.getAtt('Arn'));
1486 this.attrRuleName = cdk.Token.asString(this.getAtt('RuleName'));
1487 this.ruleBody = props.ruleBody;
1488 this.ruleName = props.ruleName;
1489 this.ruleState = props.ruleState;
1490 this.tags = new cdk.TagManager(cdk.TagType.STANDARD, "AWS::CloudWatch::InsightRule", props.tags, { tagPropertyName: 'tags' });
1491 }
1492 /**
1493 * A factory method that creates a new instance of this class from an object
1494 * containing the CloudFormation properties of this resource.
1495 * Used in the @aws-cdk/cloudformation-include module.
1496 *
1497 * @internal
1498 */
1499 static _fromCloudFormation(scope, id, resourceAttributes, options) {
1500 resourceAttributes = resourceAttributes || {};
1501 const resourceProperties = options.parser.parseValue(resourceAttributes.Properties);
1502 const propsResult = CfnInsightRulePropsFromCloudFormation(resourceProperties);
1503 const ret = new CfnInsightRule(scope, id, propsResult.value);
1504 for (const [propKey, propVal] of Object.entries(propsResult.extraProperties)) {
1505 ret.addPropertyOverride(propKey, propVal);
1506 }
1507 options.parser.handleAttributes(ret, resourceAttributes, id);
1508 return ret;
1509 }
1510 /**
1511 * Examines the CloudFormation resource and discloses attributes.
1512 *
1513 * @param inspector - tree inspector to collect and process attributes
1514 *
1515 */
1516 inspect(inspector) {
1517 inspector.addAttribute("aws:cdk:cloudformation:type", CfnInsightRule.CFN_RESOURCE_TYPE_NAME);
1518 inspector.addAttribute("aws:cdk:cloudformation:props", this.cfnProperties);
1519 }
1520 get cfnProperties() {
1521 return {
1522 ruleBody: this.ruleBody,
1523 ruleName: this.ruleName,
1524 ruleState: this.ruleState,
1525 tags: this.tags.renderTags(),
1526 };
1527 }
1528 renderProperties(props) {
1529 return cfnInsightRulePropsToCloudFormation(props);
1530 }
1531}
1532exports.CfnInsightRule = CfnInsightRule;
1533_e = JSII_RTTI_SYMBOL_1;
1534CfnInsightRule[_e] = { fqn: "@aws-cdk/aws-cloudwatch.CfnInsightRule", version: "1.198.0" };
1535/**
1536 * The CloudFormation resource type name for this resource class.
1537 */
1538CfnInsightRule.CFN_RESOURCE_TYPE_NAME = "AWS::CloudWatch::InsightRule";
1539/**
1540 * Determine whether the given properties match those of a `CfnMetricStreamProps`
1541 *
1542 * @param properties - the TypeScript properties of a `CfnMetricStreamProps`
1543 *
1544 * @returns the result of the validation.
1545 */
1546function CfnMetricStreamPropsValidator(properties) {
1547 if (!cdk.canInspect(properties)) {
1548 return cdk.VALIDATION_SUCCESS;
1549 }
1550 const errors = new cdk.ValidationResults();
1551 if (typeof properties !== 'object') {
1552 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
1553 }
1554 errors.collect(cdk.propertyValidator('excludeFilters', cdk.listValidator(CfnMetricStream_MetricStreamFilterPropertyValidator))(properties.excludeFilters));
1555 errors.collect(cdk.propertyValidator('firehoseArn', cdk.requiredValidator)(properties.firehoseArn));
1556 errors.collect(cdk.propertyValidator('firehoseArn', cdk.validateString)(properties.firehoseArn));
1557 errors.collect(cdk.propertyValidator('includeFilters', cdk.listValidator(CfnMetricStream_MetricStreamFilterPropertyValidator))(properties.includeFilters));
1558 errors.collect(cdk.propertyValidator('includeLinkedAccountsMetrics', cdk.validateBoolean)(properties.includeLinkedAccountsMetrics));
1559 errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));
1560 errors.collect(cdk.propertyValidator('outputFormat', cdk.requiredValidator)(properties.outputFormat));
1561 errors.collect(cdk.propertyValidator('outputFormat', cdk.validateString)(properties.outputFormat));
1562 errors.collect(cdk.propertyValidator('roleArn', cdk.requiredValidator)(properties.roleArn));
1563 errors.collect(cdk.propertyValidator('roleArn', cdk.validateString)(properties.roleArn));
1564 errors.collect(cdk.propertyValidator('statisticsConfigurations', cdk.listValidator(CfnMetricStream_MetricStreamStatisticsConfigurationPropertyValidator))(properties.statisticsConfigurations));
1565 errors.collect(cdk.propertyValidator('tags', cdk.listValidator(cdk.validateCfnTag))(properties.tags));
1566 return errors.wrap('supplied properties not correct for "CfnMetricStreamProps"');
1567}
1568/**
1569 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::MetricStream` resource
1570 *
1571 * @param properties - the TypeScript properties of a `CfnMetricStreamProps`
1572 *
1573 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::MetricStream` resource.
1574 */
1575// @ts-ignore TS6133
1576function cfnMetricStreamPropsToCloudFormation(properties) {
1577 if (!cdk.canInspect(properties)) {
1578 return properties;
1579 }
1580 CfnMetricStreamPropsValidator(properties).assertSuccess();
1581 return {
1582 FirehoseArn: cdk.stringToCloudFormation(properties.firehoseArn),
1583 OutputFormat: cdk.stringToCloudFormation(properties.outputFormat),
1584 RoleArn: cdk.stringToCloudFormation(properties.roleArn),
1585 ExcludeFilters: cdk.listMapper(cfnMetricStreamMetricStreamFilterPropertyToCloudFormation)(properties.excludeFilters),
1586 IncludeFilters: cdk.listMapper(cfnMetricStreamMetricStreamFilterPropertyToCloudFormation)(properties.includeFilters),
1587 IncludeLinkedAccountsMetrics: cdk.booleanToCloudFormation(properties.includeLinkedAccountsMetrics),
1588 Name: cdk.stringToCloudFormation(properties.name),
1589 StatisticsConfigurations: cdk.listMapper(cfnMetricStreamMetricStreamStatisticsConfigurationPropertyToCloudFormation)(properties.statisticsConfigurations),
1590 Tags: cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags),
1591 };
1592}
1593// @ts-ignore TS6133
1594function CfnMetricStreamPropsFromCloudFormation(properties) {
1595 properties = properties == null ? {} : properties;
1596 if (typeof properties !== 'object') {
1597 return new cfn_parse.FromCloudFormationResult(properties);
1598 }
1599 const ret = new cfn_parse.FromCloudFormationPropertyObject();
1600 ret.addPropertyResult('firehoseArn', 'FirehoseArn', cfn_parse.FromCloudFormation.getString(properties.FirehoseArn));
1601 ret.addPropertyResult('outputFormat', 'OutputFormat', cfn_parse.FromCloudFormation.getString(properties.OutputFormat));
1602 ret.addPropertyResult('roleArn', 'RoleArn', cfn_parse.FromCloudFormation.getString(properties.RoleArn));
1603 ret.addPropertyResult('excludeFilters', 'ExcludeFilters', properties.ExcludeFilters != null ? cfn_parse.FromCloudFormation.getArray(CfnMetricStreamMetricStreamFilterPropertyFromCloudFormation)(properties.ExcludeFilters) : undefined);
1604 ret.addPropertyResult('includeFilters', 'IncludeFilters', properties.IncludeFilters != null ? cfn_parse.FromCloudFormation.getArray(CfnMetricStreamMetricStreamFilterPropertyFromCloudFormation)(properties.IncludeFilters) : undefined);
1605 ret.addPropertyResult('includeLinkedAccountsMetrics', 'IncludeLinkedAccountsMetrics', properties.IncludeLinkedAccountsMetrics != null ? cfn_parse.FromCloudFormation.getBoolean(properties.IncludeLinkedAccountsMetrics) : undefined);
1606 ret.addPropertyResult('name', 'Name', properties.Name != null ? cfn_parse.FromCloudFormation.getString(properties.Name) : undefined);
1607 ret.addPropertyResult('statisticsConfigurations', 'StatisticsConfigurations', properties.StatisticsConfigurations != null ? cfn_parse.FromCloudFormation.getArray(CfnMetricStreamMetricStreamStatisticsConfigurationPropertyFromCloudFormation)(properties.StatisticsConfigurations) : undefined);
1608 ret.addPropertyResult('tags', 'Tags', properties.Tags != null ? cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags) : undefined);
1609 ret.addUnrecognizedPropertiesAsExtra(properties);
1610 return ret;
1611}
1612/**
1613 * A CloudFormation `AWS::CloudWatch::MetricStream`
1614 *
1615 * 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) .
1616 *
1617 * 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.
1618 *
1619 * When you create or update a metric stream, you choose one of the following:
1620 *
1621 * - Stream metrics from all metric namespaces in the account.
1622 * - Stream metrics from all metric namespaces in the account, except for the namespaces that you list in `ExcludeFilters` .
1623 * - Stream metrics from only the metric namespaces that you list in `IncludeFilters` .
1624 *
1625 * 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.
1626 *
1627 * If you create a metric stream in an account that has been set up as a monitoring account in CloudWatch cross-account observability, you can choose whether to include metrics from linked source accounts in the metric stream.
1628 *
1629 * @cloudformationResource AWS::CloudWatch::MetricStream
1630 * @stability external
1631 *
1632 * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html
1633 */
1634class CfnMetricStream extends cdk.CfnResource {
1635 /**
1636 * Create a new `AWS::CloudWatch::MetricStream`.
1637 *
1638 * @param scope - scope in which this resource is defined
1639 * @param id - scoped id of the resource
1640 * @param props - resource properties
1641 */
1642 constructor(scope, id, props) {
1643 super(scope, id, { type: CfnMetricStream.CFN_RESOURCE_TYPE_NAME, properties: props });
1644 try {
1645 jsiiDeprecationWarnings._aws_cdk_aws_cloudwatch_CfnMetricStreamProps(props);
1646 }
1647 catch (error) {
1648 if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
1649 Error.captureStackTrace(error, CfnMetricStream);
1650 }
1651 throw error;
1652 }
1653 cdk.requireProperty(props, 'firehoseArn', this);
1654 cdk.requireProperty(props, 'outputFormat', this);
1655 cdk.requireProperty(props, 'roleArn', this);
1656 this.attrArn = cdk.Token.asString(this.getAtt('Arn'));
1657 this.attrCreationDate = cdk.Token.asString(this.getAtt('CreationDate'));
1658 this.attrLastUpdateDate = cdk.Token.asString(this.getAtt('LastUpdateDate'));
1659 this.attrState = cdk.Token.asString(this.getAtt('State'));
1660 this.firehoseArn = props.firehoseArn;
1661 this.outputFormat = props.outputFormat;
1662 this.roleArn = props.roleArn;
1663 this.excludeFilters = props.excludeFilters;
1664 this.includeFilters = props.includeFilters;
1665 this.includeLinkedAccountsMetrics = props.includeLinkedAccountsMetrics;
1666 this.name = props.name;
1667 this.statisticsConfigurations = props.statisticsConfigurations;
1668 this.tags = new cdk.TagManager(cdk.TagType.STANDARD, "AWS::CloudWatch::MetricStream", props.tags, { tagPropertyName: 'tags' });
1669 }
1670 /**
1671 * A factory method that creates a new instance of this class from an object
1672 * containing the CloudFormation properties of this resource.
1673 * Used in the @aws-cdk/cloudformation-include module.
1674 *
1675 * @internal
1676 */
1677 static _fromCloudFormation(scope, id, resourceAttributes, options) {
1678 resourceAttributes = resourceAttributes || {};
1679 const resourceProperties = options.parser.parseValue(resourceAttributes.Properties);
1680 const propsResult = CfnMetricStreamPropsFromCloudFormation(resourceProperties);
1681 const ret = new CfnMetricStream(scope, id, propsResult.value);
1682 for (const [propKey, propVal] of Object.entries(propsResult.extraProperties)) {
1683 ret.addPropertyOverride(propKey, propVal);
1684 }
1685 options.parser.handleAttributes(ret, resourceAttributes, id);
1686 return ret;
1687 }
1688 /**
1689 * Examines the CloudFormation resource and discloses attributes.
1690 *
1691 * @param inspector - tree inspector to collect and process attributes
1692 *
1693 */
1694 inspect(inspector) {
1695 inspector.addAttribute("aws:cdk:cloudformation:type", CfnMetricStream.CFN_RESOURCE_TYPE_NAME);
1696 inspector.addAttribute("aws:cdk:cloudformation:props", this.cfnProperties);
1697 }
1698 get cfnProperties() {
1699 return {
1700 firehoseArn: this.firehoseArn,
1701 outputFormat: this.outputFormat,
1702 roleArn: this.roleArn,
1703 excludeFilters: this.excludeFilters,
1704 includeFilters: this.includeFilters,
1705 includeLinkedAccountsMetrics: this.includeLinkedAccountsMetrics,
1706 name: this.name,
1707 statisticsConfigurations: this.statisticsConfigurations,
1708 tags: this.tags.renderTags(),
1709 };
1710 }
1711 renderProperties(props) {
1712 return cfnMetricStreamPropsToCloudFormation(props);
1713 }
1714}
1715exports.CfnMetricStream = CfnMetricStream;
1716_f = JSII_RTTI_SYMBOL_1;
1717CfnMetricStream[_f] = { fqn: "@aws-cdk/aws-cloudwatch.CfnMetricStream", version: "1.198.0" };
1718/**
1719 * The CloudFormation resource type name for this resource class.
1720 */
1721CfnMetricStream.CFN_RESOURCE_TYPE_NAME = "AWS::CloudWatch::MetricStream";
1722/**
1723 * Determine whether the given properties match those of a `MetricStreamFilterProperty`
1724 *
1725 * @param properties - the TypeScript properties of a `MetricStreamFilterProperty`
1726 *
1727 * @returns the result of the validation.
1728 */
1729function CfnMetricStream_MetricStreamFilterPropertyValidator(properties) {
1730 if (!cdk.canInspect(properties)) {
1731 return cdk.VALIDATION_SUCCESS;
1732 }
1733 const errors = new cdk.ValidationResults();
1734 if (typeof properties !== 'object') {
1735 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
1736 }
1737 errors.collect(cdk.propertyValidator('namespace', cdk.requiredValidator)(properties.namespace));
1738 errors.collect(cdk.propertyValidator('namespace', cdk.validateString)(properties.namespace));
1739 return errors.wrap('supplied properties not correct for "MetricStreamFilterProperty"');
1740}
1741/**
1742 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::MetricStream.MetricStreamFilter` resource
1743 *
1744 * @param properties - the TypeScript properties of a `MetricStreamFilterProperty`
1745 *
1746 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::MetricStream.MetricStreamFilter` resource.
1747 */
1748// @ts-ignore TS6133
1749function cfnMetricStreamMetricStreamFilterPropertyToCloudFormation(properties) {
1750 if (!cdk.canInspect(properties)) {
1751 return properties;
1752 }
1753 CfnMetricStream_MetricStreamFilterPropertyValidator(properties).assertSuccess();
1754 return {
1755 Namespace: cdk.stringToCloudFormation(properties.namespace),
1756 };
1757}
1758// @ts-ignore TS6133
1759function CfnMetricStreamMetricStreamFilterPropertyFromCloudFormation(properties) {
1760 if (cdk.isResolvableObject(properties)) {
1761 return new cfn_parse.FromCloudFormationResult(properties);
1762 }
1763 properties = properties == null ? {} : properties;
1764 if (typeof properties !== 'object') {
1765 return new cfn_parse.FromCloudFormationResult(properties);
1766 }
1767 const ret = new cfn_parse.FromCloudFormationPropertyObject();
1768 ret.addPropertyResult('namespace', 'Namespace', cfn_parse.FromCloudFormation.getString(properties.Namespace));
1769 ret.addUnrecognizedPropertiesAsExtra(properties);
1770 return ret;
1771}
1772/**
1773 * Determine whether the given properties match those of a `MetricStreamStatisticsConfigurationProperty`
1774 *
1775 * @param properties - the TypeScript properties of a `MetricStreamStatisticsConfigurationProperty`
1776 *
1777 * @returns the result of the validation.
1778 */
1779function CfnMetricStream_MetricStreamStatisticsConfigurationPropertyValidator(properties) {
1780 if (!cdk.canInspect(properties)) {
1781 return cdk.VALIDATION_SUCCESS;
1782 }
1783 const errors = new cdk.ValidationResults();
1784 if (typeof properties !== 'object') {
1785 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
1786 }
1787 errors.collect(cdk.propertyValidator('additionalStatistics', cdk.requiredValidator)(properties.additionalStatistics));
1788 errors.collect(cdk.propertyValidator('additionalStatistics', cdk.listValidator(cdk.validateString))(properties.additionalStatistics));
1789 errors.collect(cdk.propertyValidator('includeMetrics', cdk.requiredValidator)(properties.includeMetrics));
1790 errors.collect(cdk.propertyValidator('includeMetrics', cdk.listValidator(CfnMetricStream_MetricStreamStatisticsMetricPropertyValidator))(properties.includeMetrics));
1791 return errors.wrap('supplied properties not correct for "MetricStreamStatisticsConfigurationProperty"');
1792}
1793/**
1794 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::MetricStream.MetricStreamStatisticsConfiguration` resource
1795 *
1796 * @param properties - the TypeScript properties of a `MetricStreamStatisticsConfigurationProperty`
1797 *
1798 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::MetricStream.MetricStreamStatisticsConfiguration` resource.
1799 */
1800// @ts-ignore TS6133
1801function cfnMetricStreamMetricStreamStatisticsConfigurationPropertyToCloudFormation(properties) {
1802 if (!cdk.canInspect(properties)) {
1803 return properties;
1804 }
1805 CfnMetricStream_MetricStreamStatisticsConfigurationPropertyValidator(properties).assertSuccess();
1806 return {
1807 AdditionalStatistics: cdk.listMapper(cdk.stringToCloudFormation)(properties.additionalStatistics),
1808 IncludeMetrics: cdk.listMapper(cfnMetricStreamMetricStreamStatisticsMetricPropertyToCloudFormation)(properties.includeMetrics),
1809 };
1810}
1811// @ts-ignore TS6133
1812function CfnMetricStreamMetricStreamStatisticsConfigurationPropertyFromCloudFormation(properties) {
1813 if (cdk.isResolvableObject(properties)) {
1814 return new cfn_parse.FromCloudFormationResult(properties);
1815 }
1816 properties = properties == null ? {} : properties;
1817 if (typeof properties !== 'object') {
1818 return new cfn_parse.FromCloudFormationResult(properties);
1819 }
1820 const ret = new cfn_parse.FromCloudFormationPropertyObject();
1821 ret.addPropertyResult('additionalStatistics', 'AdditionalStatistics', cfn_parse.FromCloudFormation.getStringArray(properties.AdditionalStatistics));
1822 ret.addPropertyResult('includeMetrics', 'IncludeMetrics', cfn_parse.FromCloudFormation.getArray(CfnMetricStreamMetricStreamStatisticsMetricPropertyFromCloudFormation)(properties.IncludeMetrics));
1823 ret.addUnrecognizedPropertiesAsExtra(properties);
1824 return ret;
1825}
1826/**
1827 * Determine whether the given properties match those of a `MetricStreamStatisticsMetricProperty`
1828 *
1829 * @param properties - the TypeScript properties of a `MetricStreamStatisticsMetricProperty`
1830 *
1831 * @returns the result of the validation.
1832 */
1833function CfnMetricStream_MetricStreamStatisticsMetricPropertyValidator(properties) {
1834 if (!cdk.canInspect(properties)) {
1835 return cdk.VALIDATION_SUCCESS;
1836 }
1837 const errors = new cdk.ValidationResults();
1838 if (typeof properties !== 'object') {
1839 errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
1840 }
1841 errors.collect(cdk.propertyValidator('metricName', cdk.requiredValidator)(properties.metricName));
1842 errors.collect(cdk.propertyValidator('metricName', cdk.validateString)(properties.metricName));
1843 errors.collect(cdk.propertyValidator('namespace', cdk.requiredValidator)(properties.namespace));
1844 errors.collect(cdk.propertyValidator('namespace', cdk.validateString)(properties.namespace));
1845 return errors.wrap('supplied properties not correct for "MetricStreamStatisticsMetricProperty"');
1846}
1847/**
1848 * Renders the AWS CloudFormation properties of an `AWS::CloudWatch::MetricStream.MetricStreamStatisticsMetric` resource
1849 *
1850 * @param properties - the TypeScript properties of a `MetricStreamStatisticsMetricProperty`
1851 *
1852 * @returns the AWS CloudFormation properties of an `AWS::CloudWatch::MetricStream.MetricStreamStatisticsMetric` resource.
1853 */
1854// @ts-ignore TS6133
1855function cfnMetricStreamMetricStreamStatisticsMetricPropertyToCloudFormation(properties) {
1856 if (!cdk.canInspect(properties)) {
1857 return properties;
1858 }
1859 CfnMetricStream_MetricStreamStatisticsMetricPropertyValidator(properties).assertSuccess();
1860 return {
1861 MetricName: cdk.stringToCloudFormation(properties.metricName),
1862 Namespace: cdk.stringToCloudFormation(properties.namespace),
1863 };
1864}
1865// @ts-ignore TS6133
1866function CfnMetricStreamMetricStreamStatisticsMetricPropertyFromCloudFormation(properties) {
1867 if (cdk.isResolvableObject(properties)) {
1868 return new cfn_parse.FromCloudFormationResult(properties);
1869 }
1870 properties = properties == null ? {} : properties;
1871 if (typeof properties !== 'object') {
1872 return new cfn_parse.FromCloudFormationResult(properties);
1873 }
1874 const ret = new cfn_parse.FromCloudFormationPropertyObject();
1875 ret.addPropertyResult('metricName', 'MetricName', cfn_parse.FromCloudFormation.getString(properties.MetricName));
1876 ret.addPropertyResult('namespace', 'Namespace', cfn_parse.FromCloudFormation.getString(properties.Namespace));
1877 ret.addUnrecognizedPropertiesAsExtra(properties);
1878 return ret;
1879}
1880//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xvdWR3YXRjaC5nZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJjbG91ZHdhdGNoLmdlbmVyYXRlZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSwrRUFBK0U7QUFDL0UsK0RBQStEO0FBQy9ELDhGQUE4RjtBQUM5RixzSEFBc0g7QUFFdEgsNEJBQTRCLENBQUMsaUVBQWlFO0FBRTlGLHFDQUFxQztBQUNyQyxnRUFBZ0U7QUE0TGhFOzs7Ozs7R0FNRztBQUNILFNBQVMsc0JBQXNCLENBQUMsVUFBZTtJQUMzQyxJQUFJLENBQUMsR0FBRyxDQUFDLFVBQVUsQ0FBQyxVQUFVLENBQUMsRUFBRTtRQUFFLE9BQU8sR0FBRyxDQU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