UNPKG

498 kBJSONView Raw
1{
2 "version": "2",
3 "toolVersion": "1.58.0",
4 "snippets": {
5 "d49c979b36d1f57a507f7f95e9e2d23d003214f8bdeb16d07ea83910b08db7ea": {
6 "translations": {
7 "python": {
8 "source": "# fn: lambda.Function\n\n\nerrors = fn.metric_errors()",
9 "version": "2"
10 },
11 "csharp": {
12 "source": "Function fn;\n\n\nMetric errors = fn.MetricErrors();",
13 "version": "1"
14 },
15 "java": {
16 "source": "Function fn;\n\n\nMetric errors = fn.metricErrors();",
17 "version": "1"
18 },
19 "go": {
20 "source": "var fn function\n\n\nerrors := fn.metricErrors()",
21 "version": "1"
22 },
23 "$": {
24 "source": "declare const fn: lambda.Function;\n\nconst errors = fn.metricErrors();",
25 "version": "0"
26 }
27 },
28 "location": {
29 "api": {
30 "api": "moduleReadme",
31 "moduleFqn": "@aws-cdk/aws-cloudwatch"
32 },
33 "field": {
34 "field": "markdown",
35 "line": 27
36 }
37 },
38 "didCompile": true,
39 "fqnsReferenced": [
40 "@aws-cdk/aws-cloudwatch.Metric"
41 ],
42 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const fn: lambda.Function;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\nimport * as route53 from '@aws-cdk/aws-route53';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as lambda from '@aws-cdk/aws-lambda';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst errors = fn.metricErrors();\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n\n",
43 "syntaxKindCounter": {
44 "75": 6,
45 "130": 1,
46 "153": 1,
47 "169": 1,
48 "194": 1,
49 "196": 1,
50 "225": 2,
51 "242": 2,
52 "243": 2,
53 "290": 1
54 },
55 "fqnsFingerprint": "b75bb3a9d9b2452f1b355571a09bb2d42514b1b88cc82697da3748575aaafa00"
56 },
57 "7c03a3d404f91569cb80fce723ee41998a7cf14d98191192247e133b3887fe49": {
58 "translations": {
59 "python": {
60 "source": "hosted_zone = route53.HostedZone(self, \"MyHostedZone\", zone_name=\"example.org\")\nmetric = cloudwatch.Metric(\n namespace=\"AWS/Route53\",\n metric_name=\"DNSQueries\",\n dimensions_map={\n \"HostedZoneId\": hosted_zone.hosted_zone_id\n }\n)",
61 "version": "2"
62 },
63 "csharp": {
64 "source": "HostedZone hostedZone = new HostedZone(this, \"MyHostedZone\", new HostedZoneProps { ZoneName = \"example.org\" });\nMetric metric = new Metric(new MetricProps {\n Namespace = \"AWS/Route53\",\n MetricName = \"DNSQueries\",\n DimensionsMap = new Dictionary<string, string> {\n { \"HostedZoneId\", hostedZone.HostedZoneId }\n }\n});",
65 "version": "1"
66 },
67 "java": {
68 "source": "HostedZone hostedZone = HostedZone.Builder.create(this, \"MyHostedZone\").zoneName(\"example.org\").build();\nMetric metric = Metric.Builder.create()\n .namespace(\"AWS/Route53\")\n .metricName(\"DNSQueries\")\n .dimensionsMap(Map.of(\n \"HostedZoneId\", hostedZone.getHostedZoneId()))\n .build();",
69 "version": "1"
70 },
71 "go": {
72 "source": "hostedZone := route53.NewHostedZone(this, jsii.String(\"MyHostedZone\"), &hostedZoneProps{\n\tzoneName: jsii.String(\"example.org\"),\n})\nmetric := cloudwatch.NewMetric(&metricProps{\n\tnamespace: jsii.String(\"AWS/Route53\"),\n\tmetricName: jsii.String(\"DNSQueries\"),\n\tdimensionsMap: map[string]*string{\n\t\t\"HostedZoneId\": hostedZone.hostedZoneId,\n\t},\n})",
73 "version": "1"
74 },
75 "$": {
76 "source": "const hostedZone = new route53.HostedZone(this, 'MyHostedZone', { zoneName: \"example.org\" });\nconst metric = new cloudwatch.Metric({\n namespace: 'AWS/Route53',\n metricName: 'DNSQueries',\n dimensionsMap: {\n HostedZoneId: hostedZone.hostedZoneId\n }\n});",
77 "version": "0"
78 }
79 },
80 "location": {
81 "api": {
82 "api": "moduleReadme",
83 "moduleFqn": "@aws-cdk/aws-cloudwatch"
84 },
85 "field": {
86 "field": "markdown",
87 "line": 40
88 }
89 },
90 "didCompile": true,
91 "fqnsReferenced": [
92 "@aws-cdk/aws-cloudwatch.Metric",
93 "@aws-cdk/aws-cloudwatch.MetricProps",
94 "@aws-cdk/aws-route53.HostedZone",
95 "@aws-cdk/aws-route53.HostedZone#hostedZoneId",
96 "@aws-cdk/aws-route53.HostedZoneProps",
97 "constructs.Construct"
98 ],
99 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\nimport * as route53 from '@aws-cdk/aws-route53';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as lambda from '@aws-cdk/aws-lambda';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst hostedZone = new route53.HostedZone(this, 'MyHostedZone', { zoneName: \"example.org\" });\nconst metric = new cloudwatch.Metric({\n namespace: 'AWS/Route53',\n metricName: 'DNSQueries',\n dimensionsMap: {\n HostedZoneId: hostedZone.hostedZoneId\n }\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n\n",
100 "syntaxKindCounter": {
101 "10": 4,
102 "75": 13,
103 "104": 1,
104 "193": 3,
105 "194": 3,
106 "197": 2,
107 "225": 2,
108 "242": 2,
109 "243": 2,
110 "281": 5
111 },
112 "fqnsFingerprint": "246a2fbd4e692aa56cf78e29e8b695cfff1768c78645b3353df0bad9eeec7ba2"
113 },
114 "1c24d76a9416e5e1854f02b341d462fc6f2c84275adb8ba45bc9a4a4906e1bb7": {
115 "translations": {
116 "python": {
117 "source": "metric = cloudwatch.Metric(\n namespace=\"MyNamespace\",\n metric_name=\"MyMetric\",\n dimensions_map={\n \"ProcessingStep\": \"Download\"\n }\n)",
118 "version": "2"
119 },
120 "csharp": {
121 "source": "Metric metric = new Metric(new MetricProps {\n Namespace = \"MyNamespace\",\n MetricName = \"MyMetric\",\n DimensionsMap = new Dictionary<string, string> {\n { \"ProcessingStep\", \"Download\" }\n }\n});",
122 "version": "1"
123 },
124 "java": {
125 "source": "Metric metric = Metric.Builder.create()\n .namespace(\"MyNamespace\")\n .metricName(\"MyMetric\")\n .dimensionsMap(Map.of(\n \"ProcessingStep\", \"Download\"))\n .build();",
126 "version": "1"
127 },
128 "go": {
129 "source": "metric := cloudwatch.NewMetric(&metricProps{\n\tnamespace: jsii.String(\"MyNamespace\"),\n\tmetricName: jsii.String(\"MyMetric\"),\n\tdimensionsMap: map[string]*string{\n\t\t\"ProcessingStep\": jsii.String(\"Download\"),\n\t},\n})",
130 "version": "1"
131 },
132 "$": {
133 "source": "const metric = new cloudwatch.Metric({\n namespace: 'MyNamespace',\n metricName: 'MyMetric',\n dimensionsMap: {\n ProcessingStep: 'Download'\n }\n});",
134 "version": "0"
135 }
136 },
137 "location": {
138 "api": {
139 "api": "moduleReadme",
140 "moduleFqn": "@aws-cdk/aws-cloudwatch"
141 },
142 "field": {
143 "field": "markdown",
144 "line": 56
145 }
146 },
147 "didCompile": true,
148 "fqnsReferenced": [
149 "@aws-cdk/aws-cloudwatch.Metric",
150 "@aws-cdk/aws-cloudwatch.MetricProps"
151 ],
152 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\nimport * as route53 from '@aws-cdk/aws-route53';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as lambda from '@aws-cdk/aws-lambda';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst metric = new cloudwatch.Metric({\n namespace: 'MyNamespace',\n metricName: 'MyMetric',\n dimensionsMap: {\n ProcessingStep: 'Download'\n }\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n\n",
153 "syntaxKindCounter": {
154 "10": 3,
155 "75": 7,
156 "193": 2,
157 "194": 1,
158 "197": 1,
159 "225": 1,
160 "242": 1,
161 "243": 1,
162 "281": 4
163 },
164 "fqnsFingerprint": "087202f23cfe91448b6f603badfd0f34456db0f16bbb5a99a5e48aca326762c6"
165 },
166 "e0e6577612f4e90fca287dcf97860b1cbfd24be1756b60b03839bef859c150c7": {
167 "translations": {
168 "python": {
169 "source": "# fn: lambda.Function\n\n\nall_problems = cloudwatch.MathExpression(\n expression=\"errors + throttles\",\n using_metrics={\n \"errors\": fn.metric_errors(),\n \"faults\": fn.metric_throttles()\n }\n)",
170 "version": "2"
171 },
172 "csharp": {
173 "source": "Function fn;\n\n\nMathExpression allProblems = new MathExpression(new MathExpressionProps {\n Expression = \"errors + throttles\",\n UsingMetrics = new Dictionary<string, IMetric> {\n { \"errors\", fn.MetricErrors() },\n { \"faults\", fn.MetricThrottles() }\n }\n});",
174 "version": "1"
175 },
176 "java": {
177 "source": "Function fn;\n\n\nMathExpression allProblems = MathExpression.Builder.create()\n .expression(\"errors + throttles\")\n .usingMetrics(Map.of(\n \"errors\", fn.metricErrors(),\n \"faults\", fn.metricThrottles()))\n .build();",
178 "version": "1"
179 },
180 "go": {
181 "source": "var fn function\n\n\nallProblems := cloudwatch.NewMathExpression(&mathExpressionProps{\n\texpression: jsii.String(\"errors + throttles\"),\n\tusingMetrics: map[string]iMetric{\n\t\t\"errors\": fn.metricErrors(),\n\t\t\"faults\": fn.metricThrottles(),\n\t},\n})",
182 "version": "1"
183 },
184 "$": {
185 "source": "declare const fn: lambda.Function;\n\nconst allProblems = new cloudwatch.MathExpression({\n expression: \"errors + throttles\",\n usingMetrics: {\n errors: fn.metricErrors(),\n faults: fn.metricThrottles(),\n }\n});",
186 "version": "0"
187 }
188 },
189 "location": {
190 "api": {
191 "api": "moduleReadme",
192 "moduleFqn": "@aws-cdk/aws-cloudwatch"
193 },
194 "field": {
195 "field": "markdown",
196 "line": 71
197 }
198 },
199 "didCompile": true,
200 "fqnsReferenced": [
201 "@aws-cdk/aws-cloudwatch.IMetric",
202 "@aws-cdk/aws-cloudwatch.MathExpression",
203 "@aws-cdk/aws-cloudwatch.MathExpressionProps"
204 ],
205 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const fn: lambda.Function;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\nimport * as route53 from '@aws-cdk/aws-route53';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as lambda from '@aws-cdk/aws-lambda';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst allProblems = new cloudwatch.MathExpression({\n expression: \"errors + throttles\",\n usingMetrics: {\n errors: fn.metricErrors(),\n faults: fn.metricThrottles(),\n }\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n\n",
206 "syntaxKindCounter": {
207 "10": 1,
208 "75": 14,
209 "130": 1,
210 "153": 1,
211 "169": 1,
212 "193": 2,
213 "194": 3,
214 "196": 2,
215 "197": 1,
216 "225": 2,
217 "242": 2,
218 "243": 2,
219 "281": 4,
220 "290": 1
221 },
222 "fqnsFingerprint": "8a95c14cad450e60e066f38e4e55360a750a83efd1716dfbd4e3bc9cf1607374"
223 },
224 "3c44ef26fbf1700dc2d558fdb87da7bccc962a384472ffb84411cd91e987ecd8": {
225 "translations": {
226 "python": {
227 "source": "# fn: lambda.Function\n# all_problems: cloudwatch.MathExpression\n\n\nproblem_percentage = cloudwatch.MathExpression(\n expression=\"(problems / invocations) * 100\",\n using_metrics={\n \"problems\": all_problems,\n \"invocations\": fn.metric_invocations()\n }\n)",
228 "version": "2"
229 },
230 "csharp": {
231 "source": "Function fn;\nMathExpression allProblems;\n\n\nMathExpression problemPercentage = new MathExpression(new MathExpressionProps {\n Expression = \"(problems / invocations) * 100\",\n UsingMetrics = new Dictionary<string, IMetric> {\n { \"problems\", allProblems },\n { \"invocations\", fn.MetricInvocations() }\n }\n});",
232 "version": "1"
233 },
234 "java": {
235 "source": "Function fn;\nMathExpression allProblems;\n\n\nMathExpression problemPercentage = MathExpression.Builder.create()\n .expression(\"(problems / invocations) * 100\")\n .usingMetrics(Map.of(\n \"problems\", allProblems,\n \"invocations\", fn.metricInvocations()))\n .build();",
236 "version": "1"
237 },
238 "go": {
239 "source": "var fn function\nvar allProblems mathExpression\n\n\nproblemPercentage := cloudwatch.NewMathExpression(&mathExpressionProps{\n\texpression: jsii.String(\"(problems / invocations) * 100\"),\n\tusingMetrics: map[string]iMetric{\n\t\t\"problems\": allProblems,\n\t\t\"invocations\": fn.metricInvocations(),\n\t},\n})",
240 "version": "1"
241 },
242 "$": {
243 "source": "declare const fn: lambda.Function;\ndeclare const allProblems: cloudwatch.MathExpression;\n\nconst problemPercentage = new cloudwatch.MathExpression({\n expression: \"(problems / invocations) * 100\",\n usingMetrics: {\n problems: allProblems,\n invocations: fn.metricInvocations()\n }\n});",
244 "version": "0"
245 }
246 },
247 "location": {
248 "api": {
249 "api": "moduleReadme",
250 "moduleFqn": "@aws-cdk/aws-cloudwatch"
251 },
252 "field": {
253 "field": "markdown",
254 "line": 86
255 }
256 },
257 "didCompile": true,
258 "fqnsReferenced": [
259 "@aws-cdk/aws-cloudwatch.IMetric",
260 "@aws-cdk/aws-cloudwatch.MathExpression",
261 "@aws-cdk/aws-cloudwatch.MathExpressionProps"
262 ],
263 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const fn: lambda.Function;\ndeclare const allProblems: cloudwatch.MathExpression;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\nimport * as route53 from '@aws-cdk/aws-route53';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as lambda from '@aws-cdk/aws-lambda';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst problemPercentage = new cloudwatch.MathExpression({\n expression: \"(problems / invocations) * 100\",\n usingMetrics: {\n problems: allProblems,\n invocations: fn.metricInvocations()\n }\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n\n",
264 "syntaxKindCounter": {
265 "10": 1,
266 "75": 16,
267 "130": 2,
268 "153": 2,
269 "169": 2,
270 "193": 2,
271 "194": 2,
272 "196": 1,
273 "197": 1,
274 "225": 3,
275 "242": 3,
276 "243": 3,
277 "281": 4,
278 "290": 1
279 },
280 "fqnsFingerprint": "8a95c14cad450e60e066f38e4e55360a750a83efd1716dfbd4e3bc9cf1607374"
281 },
282 "9bb2a1cc3eff64a126194c3fd08d28fddda3000fe27c44ac356adc5e38ff2d96": {
283 "translations": {
284 "python": {
285 "source": "cpu_utilization = cloudwatch.MathExpression(\n expression=\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\"CPUUtilization\\\"', 'Average', 300)\",\n\n # Specifying '' as the label suppresses the default behavior\n # of using the expression as metric label. This is especially appropriate\n # when using expressions that return multiple time series (like SEARCH()\n # or METRICS()), to show the labels of the retrieved metrics only.\n label=\"\"\n)",
286 "version": "2"
287 },
288 "csharp": {
289 "source": "MathExpression cpuUtilization = new MathExpression(new MathExpressionProps {\n Expression = \"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\"CPUUtilization\\\"', 'Average', 300)\",\n\n // Specifying '' as the label suppresses the default behavior\n // of using the expression as metric label. This is especially appropriate\n // when using expressions that return multiple time series (like SEARCH()\n // or METRICS()), to show the labels of the retrieved metrics only.\n Label = \"\"\n});",
290 "version": "1"
291 },
292 "java": {
293 "source": "MathExpression cpuUtilization = MathExpression.Builder.create()\n .expression(\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\"CPUUtilization\\\"', 'Average', 300)\")\n\n // Specifying '' as the label suppresses the default behavior\n // of using the expression as metric label. This is especially appropriate\n // when using expressions that return multiple time series (like SEARCH()\n // or METRICS()), to show the labels of the retrieved metrics only.\n .label(\"\")\n .build();",
294 "version": "1"
295 },
296 "go": {
297 "source": "cpuUtilization := cloudwatch.NewMathExpression(&mathExpressionProps{\n\texpression: jsii.String(\"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\"CPUUtilization\\\"', 'Average', 300)\"),\n\n\t// Specifying '' as the label suppresses the default behavior\n\t// of using the expression as metric label. This is especially appropriate\n\t// when using expressions that return multiple time series (like SEARCH()\n\t// or METRICS()), to show the labels of the retrieved metrics only.\n\tlabel: jsii.String(\"\"),\n})",
298 "version": "1"
299 },
300 "$": {
301 "source": "const cpuUtilization = new cloudwatch.MathExpression({\n expression: \"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\"CPUUtilization\\\"', 'Average', 300)\",\n\n // Specifying '' as the label suppresses the default behavior\n // of using the expression as metric label. This is especially appropriate\n // when using expressions that return multiple time series (like SEARCH()\n // or METRICS()), to show the labels of the retrieved metrics only.\n label: '',\n});",
302 "version": "0"
303 }
304 },
305 "location": {
306 "api": {
307 "api": "moduleReadme",
308 "moduleFqn": "@aws-cdk/aws-cloudwatch"
309 },
310 "field": {
311 "field": "markdown",
312 "line": 105
313 }
314 },
315 "didCompile": true,
316 "fqnsReferenced": [
317 "@aws-cdk/aws-cloudwatch.MathExpression",
318 "@aws-cdk/aws-cloudwatch.MathExpressionProps"
319 ],
320 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\nimport * as route53 from '@aws-cdk/aws-route53';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as lambda from '@aws-cdk/aws-lambda';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst cpuUtilization = new cloudwatch.MathExpression({\n expression: \"SEARCH('{AWS/EC2,InstanceId} MetricName=\\\"CPUUtilization\\\"', 'Average', 300)\",\n\n // Specifying '' as the label suppresses the default behavior\n // of using the expression as metric label. This is especially appropriate\n // when using expressions that return multiple time series (like SEARCH()\n // or METRICS()), to show the labels of the retrieved metrics only.\n label: '',\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n\n",
321 "syntaxKindCounter": {
322 "10": 2,
323 "75": 5,
324 "193": 1,
325 "194": 1,
326 "197": 1,
327 "225": 1,
328 "242": 1,
329 "243": 1,
330 "281": 2
331 },
332 "fqnsFingerprint": "d076b8f8d5159f89701271919860e1d06da34c1b313ccdeda1241e8347a71d6f"
333 },
334 "2cde04306e1a22bd62e171efa5384e4e8e27af0ee46cea9a8734eb5bd670c361": {
335 "translations": {
336 "python": {
337 "source": "# fn: lambda.Function\n\n\nminute_error_rate = fn.metric_errors(\n statistic=\"avg\",\n period=Duration.minutes(1),\n label=\"Lambda failure rate\"\n)",
338 "version": "2"
339 },
340 "csharp": {
341 "source": "Function fn;\n\n\nMetric minuteErrorRate = fn.MetricErrors(new MetricOptions {\n Statistic = \"avg\",\n Period = Duration.Minutes(1),\n Label = \"Lambda failure rate\"\n});",
342 "version": "1"
343 },
344 "java": {
345 "source": "Function fn;\n\n\nMetric minuteErrorRate = fn.metricErrors(MetricOptions.builder()\n .statistic(\"avg\")\n .period(Duration.minutes(1))\n .label(\"Lambda failure rate\")\n .build());",
346 "version": "1"
347 },
348 "go": {
349 "source": "var fn function\n\n\nminuteErrorRate := fn.metricErrors(&metricOptions{\n\tstatistic: jsii.String(\"avg\"),\n\tperiod: *awscdkcore.Duration.minutes(jsii.Number(1)),\n\tlabel: jsii.String(\"Lambda failure rate\"),\n})",
350 "version": "1"
351 },
352 "$": {
353 "source": "declare const fn: lambda.Function;\n\nconst minuteErrorRate = fn.metricErrors({\n statistic: 'avg',\n period: Duration.minutes(1),\n label: 'Lambda failure rate'\n});",
354 "version": "0"
355 }
356 },
357 "location": {
358 "api": {
359 "api": "moduleReadme",
360 "moduleFqn": "@aws-cdk/aws-cloudwatch"
361 },
362 "field": {
363 "field": "markdown",
364 "line": 135
365 }
366 },
367 "didCompile": true,
368 "fqnsReferenced": [
369 "@aws-cdk/aws-cloudwatch.Metric",
370 "@aws-cdk/aws-cloudwatch.MetricOptions",
371 "@aws-cdk/core.Duration",
372 "@aws-cdk/core.Duration#minutes"
373 ],
374 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const fn: lambda.Function;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\nimport * as route53 from '@aws-cdk/aws-route53';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as lambda from '@aws-cdk/aws-lambda';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst minuteErrorRate = fn.metricErrors({\n statistic: 'avg',\n period: Duration.minutes(1),\n label: 'Lambda failure rate'\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n\n",
375 "syntaxKindCounter": {
376 "8": 1,
377 "10": 2,
378 "75": 11,
379 "130": 1,
380 "153": 1,
381 "169": 1,
382 "193": 1,
383 "194": 2,
384 "196": 2,
385 "225": 2,
386 "242": 2,
387 "243": 2,
388 "281": 3,
389 "290": 1
390 },
391 "fqnsFingerprint": "0403a2d3527b3542a5966cc11b3ed44ac3ea5d6f87538223070f30ed3dd59f87"
392 },
393 "c48368c3648768426d3ff9557d4d50a524f8033ec2776e226c92ecf4aeece403": {
394 "translations": {
395 "python": {
396 "source": "# fn: lambda.Function\n\n\nminute_error_rate = fn.metric_errors(\n statistic=\"sum\",\n period=Duration.hours(1),\n\n # Show the maximum hourly error count in the legend\n label=\"[max: ${MAX}] Lambda failure rate\"\n)",
397 "version": "2"
398 },
399 "csharp": {
400 "source": "Function fn;\n\n\nMetric minuteErrorRate = fn.MetricErrors(new MetricOptions {\n Statistic = \"sum\",\n Period = Duration.Hours(1),\n\n // Show the maximum hourly error count in the legend\n Label = \"[max: ${MAX}] Lambda failure rate\"\n});",
401 "version": "1"
402 },
403 "java": {
404 "source": "Function fn;\n\n\nMetric minuteErrorRate = fn.metricErrors(MetricOptions.builder()\n .statistic(\"sum\")\n .period(Duration.hours(1))\n\n // Show the maximum hourly error count in the legend\n .label(\"[max: ${MAX}] Lambda failure rate\")\n .build());",
405 "version": "1"
406 },
407 "go": {
408 "source": "var fn function\n\n\nminuteErrorRate := fn.metricErrors(&metricOptions{\n\tstatistic: jsii.String(\"sum\"),\n\tperiod: *awscdkcore.Duration.hours(jsii.Number(1)),\n\n\t// Show the maximum hourly error count in the legend\n\tlabel: jsii.String(\"[max: ${MAX}] Lambda failure rate\"),\n})",
409 "version": "1"
410 },
411 "$": {
412 "source": "declare const fn: lambda.Function;\n\nconst minuteErrorRate = fn.metricErrors({\n statistic: 'sum',\n period: Duration.hours(1),\n\n // Show the maximum hourly error count in the legend\n label: '[max: ${MAX}] Lambda failure rate',\n});",
413 "version": "0"
414 }
415 },
416 "location": {
417 "api": {
418 "api": "moduleReadme",
419 "moduleFqn": "@aws-cdk/aws-cloudwatch"
420 },
421 "field": {
422 "field": "markdown",
423 "line": 174
424 }
425 },
426 "didCompile": true,
427 "fqnsReferenced": [
428 "@aws-cdk/aws-cloudwatch.Metric",
429 "@aws-cdk/aws-cloudwatch.MetricOptions",
430 "@aws-cdk/core.Duration",
431 "@aws-cdk/core.Duration#hours"
432 ],
433 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const fn: lambda.Function;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\nimport * as route53 from '@aws-cdk/aws-route53';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as lambda from '@aws-cdk/aws-lambda';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst minuteErrorRate = fn.metricErrors({\n statistic: 'sum',\n period: Duration.hours(1),\n\n // Show the maximum hourly error count in the legend\n label: '[max: ${MAX}] Lambda failure rate',\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n\n",
434 "syntaxKindCounter": {
435 "8": 1,
436 "10": 2,
437 "75": 11,
438 "130": 1,
439 "153": 1,
440 "169": 1,
441 "193": 1,
442 "194": 2,
443 "196": 2,
444 "225": 2,
445 "242": 2,
446 "243": 2,
447 "281": 3,
448 "290": 1
449 },
450 "fqnsFingerprint": "3945d2aa18e8771579b70b9961819dabe3de06c0504da86161687cd36713019b"
451 },
452 "c62b6e9ea6eb19cde44536cb807c284a15ba05e9615294eda4a7fc502259f55d": {
453 "translations": {
454 "python": {
455 "source": "# fn: lambda.Function\n\n\ncloudwatch.Alarm(self, \"Alarm\",\n metric=fn.metric_errors(),\n threshold=100,\n evaluation_periods=2\n)",
456 "version": "2"
457 },
458 "csharp": {
459 "source": "Function fn;\n\n\nnew Alarm(this, \"Alarm\", new AlarmProps {\n Metric = fn.MetricErrors(),\n Threshold = 100,\n EvaluationPeriods = 2\n});",
460 "version": "1"
461 },
462 "java": {
463 "source": "Function fn;\n\n\nAlarm.Builder.create(this, \"Alarm\")\n .metric(fn.metricErrors())\n .threshold(100)\n .evaluationPeriods(2)\n .build();",
464 "version": "1"
465 },
466 "go": {
467 "source": "var fn function\n\n\ncloudwatch.NewAlarm(this, jsii.String(\"Alarm\"), &alarmProps{\n\tmetric: fn.metricErrors(),\n\tthreshold: jsii.Number(100),\n\tevaluationPeriods: jsii.Number(2),\n})",
468 "version": "1"
469 },
470 "$": {
471 "source": "declare const fn: lambda.Function;\n\nnew cloudwatch.Alarm(this, 'Alarm', {\n metric: fn.metricErrors(),\n threshold: 100,\n evaluationPeriods: 2,\n});",
472 "version": "0"
473 }
474 },
475 "location": {
476 "api": {
477 "api": "moduleReadme",
478 "moduleFqn": "@aws-cdk/aws-cloudwatch"
479 },
480 "field": {
481 "field": "markdown",
482 "line": 198
483 }
484 },
485 "didCompile": true,
486 "fqnsReferenced": [
487 "@aws-cdk/aws-cloudwatch.Alarm",
488 "@aws-cdk/aws-cloudwatch.AlarmProps",
489 "@aws-cdk/aws-cloudwatch.IMetric",
490 "constructs.Construct"
491 ],
492 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const fn: lambda.Function;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\nimport * as route53 from '@aws-cdk/aws-route53';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as lambda from '@aws-cdk/aws-lambda';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nnew cloudwatch.Alarm(this, 'Alarm', {\n metric: fn.metricErrors(),\n threshold: 100,\n evaluationPeriods: 2,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n\n",
493 "syntaxKindCounter": {
494 "8": 2,
495 "10": 1,
496 "75": 10,
497 "104": 1,
498 "130": 1,
499 "153": 1,
500 "169": 1,
501 "193": 1,
502 "194": 2,
503 "196": 1,
504 "197": 1,
505 "225": 1,
506 "226": 1,
507 "242": 1,
508 "243": 1,
509 "281": 3,
510 "290": 1
511 },
512 "fqnsFingerprint": "6e79e7dcfe0189242492fb93f3f778cec45c81a17088ee3486ae591176f05d95"
513 },
514 "79c88735991c2aa6796adf9e38f29a8328ece1d607bf300be6700e755aa652fd": {
515 "translations": {
516 "python": {
517 "source": "# fn: lambda.Function\n\n\nfn.metric_errors().create_alarm(self, \"Alarm\",\n threshold=100,\n evaluation_periods=2\n)",
518 "version": "2"
519 },
520 "csharp": {
521 "source": "Function fn;\n\n\nfn.MetricErrors().CreateAlarm(this, \"Alarm\", new CreateAlarmOptions {\n Threshold = 100,\n EvaluationPeriods = 2\n});",
522 "version": "1"
523 },
524 "java": {
525 "source": "Function fn;\n\n\nfn.metricErrors().createAlarm(this, \"Alarm\", CreateAlarmOptions.builder()\n .threshold(100)\n .evaluationPeriods(2)\n .build());",
526 "version": "1"
527 },
528 "go": {
529 "source": "var fn function\n\n\nfn.metricErrors().createAlarm(this, jsii.String(\"Alarm\"), &createAlarmOptions{\n\tthreshold: jsii.Number(100),\n\tevaluationPeriods: jsii.Number(2),\n})",
530 "version": "1"
531 },
532 "$": {
533 "source": "declare const fn: lambda.Function;\n\nfn.metricErrors().createAlarm(this, 'Alarm', {\n threshold: 100,\n evaluationPeriods: 2,\n});",
534 "version": "0"
535 }
536 },
537 "location": {
538 "api": {
539 "api": "moduleReadme",
540 "moduleFqn": "@aws-cdk/aws-cloudwatch"
541 },
542 "field": {
543 "field": "markdown",
544 "line": 210
545 }
546 },
547 "didCompile": true,
548 "fqnsReferenced": [
549 "@aws-cdk/aws-cloudwatch.CreateAlarmOptions",
550 "@aws-cdk/aws-cloudwatch.Metric#createAlarm",
551 "@aws-cdk/core.Construct"
552 ],
553 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const fn: lambda.Function;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\nimport * as route53 from '@aws-cdk/aws-route53';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as lambda from '@aws-cdk/aws-lambda';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nfn.metricErrors().createAlarm(this, 'Alarm', {\n threshold: 100,\n evaluationPeriods: 2,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n\n",
554 "syntaxKindCounter": {
555 "8": 2,
556 "10": 1,
557 "75": 8,
558 "104": 1,
559 "130": 1,
560 "153": 1,
561 "169": 1,
562 "193": 1,
563 "194": 2,
564 "196": 2,
565 "225": 1,
566 "226": 1,
567 "242": 1,
568 "243": 1,
569 "281": 2,
570 "290": 1
571 },
572 "fqnsFingerprint": "ecd9b00a4113c7a85c9d87a2d5cb2133b2e7eaf42a1f4b221f50ed8608c77f0c"
573 },
574 "3a31b8ab4f24dc7de1dc1aa021ccae3b0074fc61ebe97ba9c528b5418a4fefcc": {
575 "translations": {
576 "python": {
577 "source": "import aws_cdk.aws_cloudwatch_actions as cw_actions\n# alarm: cloudwatch.Alarm\n\n\ntopic = sns.Topic(self, \"Topic\")\nalarm.add_alarm_action(cw_actions.SnsAction(topic))",
578 "version": "2"
579 },
580 "csharp": {
581 "source": "using Amazon.CDK.AWS.CloudWatch.Actions;\nAlarm alarm;\n\n\nTopic topic = new Topic(this, \"Topic\");\nalarm.AddAlarmAction(new SnsAction(topic));",
582 "version": "1"
583 },
584 "java": {
585 "source": "import software.amazon.awscdk.services.cloudwatch.actions.*;\nAlarm alarm;\n\n\nTopic topic = new Topic(this, \"Topic\");\nalarm.addAlarmAction(new SnsAction(topic));",
586 "version": "1"
587 },
588 "go": {
589 "source": "import cw_actions \"github.com/aws-samples/dummy/awscdkawscloudwatchactions\"\nvar alarm alarm\n\n\ntopic := sns.NewTopic(this, jsii.String(\"Topic\"))\nalarm.addAlarmAction(cw_actions.NewSnsAction(topic))",
590 "version": "1"
591 },
592 "$": {
593 "source": "import * as cw_actions from '@aws-cdk/aws-cloudwatch-actions';\ndeclare const alarm: cloudwatch.Alarm;\n\nconst topic = new sns.Topic(this, 'Topic');\nalarm.addAlarmAction(new cw_actions.SnsAction(topic));",
594 "version": "0"
595 }
596 },
597 "location": {
598 "api": {
599 "api": "moduleReadme",
600 "moduleFqn": "@aws-cdk/aws-cloudwatch"
601 },
602 "field": {
603 "field": "markdown",
604 "line": 234
605 }
606 },
607 "didCompile": true,
608 "fqnsReferenced": [
609 "@aws-cdk/aws-cloudwatch-actions.SnsAction",
610 "@aws-cdk/aws-cloudwatch.Alarm#addAlarmAction",
611 "@aws-cdk/aws-cloudwatch.IAlarmAction",
612 "@aws-cdk/aws-sns.ITopic",
613 "@aws-cdk/aws-sns.Topic",
614 "constructs.Construct"
615 ],
616 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport * as cw_actions from '@aws-cdk/aws-cloudwatch-actions';\ndeclare const alarm: cloudwatch.Alarm;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\nimport * as route53 from '@aws-cdk/aws-route53';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as lambda from '@aws-cdk/aws-lambda';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst topic = new sns.Topic(this, 'Topic');\nalarm.addAlarmAction(new cw_actions.SnsAction(topic));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n\n",
617 "syntaxKindCounter": {
618 "10": 2,
619 "75": 12,
620 "104": 1,
621 "130": 1,
622 "153": 1,
623 "169": 1,
624 "194": 3,
625 "196": 1,
626 "197": 2,
627 "225": 2,
628 "226": 1,
629 "242": 2,
630 "243": 2,
631 "254": 1,
632 "255": 1,
633 "256": 1,
634 "290": 1
635 },
636 "fqnsFingerprint": "fa70d9ce808da817e3a4f0c7b3066421e3844c75f6796d714b24b7063a53cfe4"
637 },
638 "c1484f351e36b25a33ad249d74d35830c5473e7ea50fe6424359174d131c5b4e": {
639 "translations": {
640 "python": {
641 "source": "# alarm1: cloudwatch.Alarm\n# alarm2: cloudwatch.Alarm\n# alarm3: cloudwatch.Alarm\n# alarm4: cloudwatch.Alarm\n\n\nalarm_rule = cloudwatch.AlarmRule.any_of(\n cloudwatch.AlarmRule.all_of(\n cloudwatch.AlarmRule.any_of(alarm1,\n cloudwatch.AlarmRule.from_alarm(alarm2, cloudwatch.AlarmState.OK), alarm3),\n cloudwatch.AlarmRule.not(cloudwatch.AlarmRule.from_alarm(alarm4, cloudwatch.AlarmState.INSUFFICIENT_DATA))),\n cloudwatch.AlarmRule.from_boolean(False))\n\ncloudwatch.CompositeAlarm(self, \"MyAwesomeCompositeAlarm\",\n alarm_rule=alarm_rule\n)",
642 "version": "2"
643 },
644 "csharp": {
645 "source": "Alarm alarm1;\nAlarm alarm2;\nAlarm alarm3;\nAlarm alarm4;\n\n\nIAlarmRule alarmRule = AlarmRule.AnyOf(AlarmRule.AllOf(AlarmRule.AnyOf(alarm1, AlarmRule.FromAlarm(alarm2, AlarmState.OK), alarm3), AlarmRule.Not(AlarmRule.FromAlarm(alarm4, AlarmState.INSUFFICIENT_DATA))), AlarmRule.FromBoolean(false));\n\nnew CompositeAlarm(this, \"MyAwesomeCompositeAlarm\", new CompositeAlarmProps {\n AlarmRule = alarmRule\n});",
646 "version": "1"
647 },
648 "java": {
649 "source": "Alarm alarm1;\nAlarm alarm2;\nAlarm alarm3;\nAlarm alarm4;\n\n\nIAlarmRule alarmRule = AlarmRule.anyOf(AlarmRule.allOf(AlarmRule.anyOf(alarm1, AlarmRule.fromAlarm(alarm2, AlarmState.OK), alarm3), AlarmRule.not(AlarmRule.fromAlarm(alarm4, AlarmState.INSUFFICIENT_DATA))), AlarmRule.fromBoolean(false));\n\nCompositeAlarm.Builder.create(this, \"MyAwesomeCompositeAlarm\")\n .alarmRule(alarmRule)\n .build();",
650 "version": "1"
651 },
652 "go": {
653 "source": "var alarm1 alarm\nvar alarm2 alarm\nvar alarm3 alarm\nvar alarm4 alarm\n\n\nalarmRule := cloudwatch.alarmRule.anyOf(cloudwatch.alarmRule.allOf(cloudwatch.alarmRule.anyOf(alarm1, cloudwatch.alarmRule.fromAlarm(alarm2, cloudwatch.alarmState_OK), alarm3), cloudwatch.alarmRule.not(cloudwatch.alarmRule.fromAlarm(alarm4, cloudwatch.alarmState_INSUFFICIENT_DATA))), cloudwatch.alarmRule.fromBoolean(jsii.Boolean(false)))\n\ncloudwatch.NewCompositeAlarm(this, jsii.String(\"MyAwesomeCompositeAlarm\"), &compositeAlarmProps{\n\talarmRule: alarmRule,\n})",
654 "version": "1"
655 },
656 "$": {
657 "source": "declare const alarm1: cloudwatch.Alarm;\ndeclare const alarm2: cloudwatch.Alarm;\ndeclare const alarm3: cloudwatch.Alarm;\ndeclare const alarm4: cloudwatch.Alarm;\n\nconst alarmRule = cloudwatch.AlarmRule.anyOf(\n cloudwatch.AlarmRule.allOf(\n cloudwatch.AlarmRule.anyOf(\n alarm1,\n cloudwatch.AlarmRule.fromAlarm(alarm2, cloudwatch.AlarmState.OK),\n alarm3,\n ),\n cloudwatch.AlarmRule.not(cloudwatch.AlarmRule.fromAlarm(alarm4, cloudwatch.AlarmState.INSUFFICIENT_DATA)),\n ),\n cloudwatch.AlarmRule.fromBoolean(false),\n);\n\nnew cloudwatch.CompositeAlarm(this, 'MyAwesomeCompositeAlarm', {\n alarmRule,\n});",
658 "version": "0"
659 }
660 },
661 "location": {
662 "api": {
663 "api": "moduleReadme",
664 "moduleFqn": "@aws-cdk/aws-cloudwatch"
665 },
666 "field": {
667 "field": "markdown",
668 "line": 268
669 }
670 },
671 "didCompile": true,
672 "fqnsReferenced": [
673 "@aws-cdk/aws-cloudwatch.AlarmRule",
674 "@aws-cdk/aws-cloudwatch.AlarmRule#allOf",
675 "@aws-cdk/aws-cloudwatch.AlarmRule#anyOf",
676 "@aws-cdk/aws-cloudwatch.AlarmRule#fromAlarm",
677 "@aws-cdk/aws-cloudwatch.AlarmRule#fromBoolean",
678 "@aws-cdk/aws-cloudwatch.AlarmRule#not",
679 "@aws-cdk/aws-cloudwatch.AlarmState",
680 "@aws-cdk/aws-cloudwatch.AlarmState#INSUFFICIENT_DATA",
681 "@aws-cdk/aws-cloudwatch.AlarmState#OK",
682 "@aws-cdk/aws-cloudwatch.CompositeAlarm",
683 "@aws-cdk/aws-cloudwatch.CompositeAlarmProps",
684 "@aws-cdk/aws-cloudwatch.IAlarm",
685 "@aws-cdk/aws-cloudwatch.IAlarmRule",
686 "constructs.Construct"
687 ],
688 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const alarm1: cloudwatch.Alarm;\ndeclare const alarm2: cloudwatch.Alarm;\ndeclare const alarm3: cloudwatch.Alarm;\ndeclare const alarm4: cloudwatch.Alarm;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\nimport * as route53 from '@aws-cdk/aws-route53';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as lambda from '@aws-cdk/aws-lambda';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst alarmRule = cloudwatch.AlarmRule.anyOf(\n cloudwatch.AlarmRule.allOf(\n cloudwatch.AlarmRule.anyOf(\n alarm1,\n cloudwatch.AlarmRule.fromAlarm(alarm2, cloudwatch.AlarmState.OK),\n alarm3,\n ),\n cloudwatch.AlarmRule.not(cloudwatch.AlarmRule.fromAlarm(alarm4, cloudwatch.AlarmState.INSUFFICIENT_DATA)),\n ),\n cloudwatch.AlarmRule.fromBoolean(false),\n);\n\nnew cloudwatch.CompositeAlarm(this, 'MyAwesomeCompositeAlarm', {\n alarmRule,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n\n",
689 "syntaxKindCounter": {
690 "10": 1,
691 "75": 47,
692 "91": 1,
693 "104": 1,
694 "130": 4,
695 "153": 4,
696 "169": 4,
697 "193": 1,
698 "194": 19,
699 "196": 7,
700 "197": 1,
701 "225": 5,
702 "226": 1,
703 "242": 5,
704 "243": 5,
705 "282": 1,
706 "290": 1
707 },
708 "fqnsFingerprint": "fee41f55ebdb796ada349b0655c3d755869d1a1f81292ff128fb32225e52886f"
709 },
710 "108729d9bad0f66478ac124f1c1e4a1b7267b0308868fad209f878f7d624f0c1": {
711 "translations": {
712 "python": {
713 "source": "# dashboard: cloudwatch.Dashboard\n# execution_count_metric: cloudwatch.Metric\n# error_count_metric: cloudwatch.Metric\n\n\ndashboard.add_widgets(cloudwatch.GraphWidget(\n title=\"Executions vs error rate\",\n\n left=[execution_count_metric],\n\n right=[error_count_metric.with(\n statistic=\"average\",\n label=\"Error rate\",\n color=cloudwatch.Color.GREEN\n )]\n))",
714 "version": "2"
715 },
716 "csharp": {
717 "source": "Dashboard dashboard;\nMetric executionCountMetric;\nMetric errorCountMetric;\n\n\ndashboard.AddWidgets(new GraphWidget(new GraphWidgetProps {\n Title = \"Executions vs error rate\",\n\n Left = new [] { executionCountMetric },\n\n Right = new [] { errorCountMetric.With(new MetricOptions {\n Statistic = \"average\",\n Label = \"Error rate\",\n Color = Color.GREEN\n }) }\n}));",
718 "version": "1"
719 },
720 "java": {
721 "source": "Dashboard dashboard;\nMetric executionCountMetric;\nMetric errorCountMetric;\n\n\ndashboard.addWidgets(GraphWidget.Builder.create()\n .title(\"Executions vs error rate\")\n\n .left(List.of(executionCountMetric))\n\n .right(List.of(errorCountMetric.with(MetricOptions.builder()\n .statistic(\"average\")\n .label(\"Error rate\")\n .color(Color.GREEN)\n .build())))\n .build());",
722 "version": "1"
723 },
724 "go": {
725 "source": "var dashboard dashboard\nvar executionCountMetric metric\nvar errorCountMetric metric\n\n\ndashboard.addWidgets(cloudwatch.NewGraphWidget(&graphWidgetProps{\n\ttitle: jsii.String(\"Executions vs error rate\"),\n\n\tleft: []iMetric{\n\t\texecutionCountMetric,\n\t},\n\n\tright: []*iMetric{\n\t\terrorCountMetric.with(&metricOptions{\n\t\t\tstatistic: jsii.String(\"average\"),\n\t\t\tlabel: jsii.String(\"Error rate\"),\n\t\t\tcolor: cloudwatch.color_GREEN(),\n\t\t}),\n\t},\n}))",
726 "version": "1"
727 },
728 "$": {
729 "source": "declare const dashboard: cloudwatch.Dashboard;\ndeclare const executionCountMetric: cloudwatch.Metric;\ndeclare const errorCountMetric: cloudwatch.Metric;\n\ndashboard.addWidgets(new cloudwatch.GraphWidget({\n title: \"Executions vs error rate\",\n\n left: [executionCountMetric],\n\n right: [errorCountMetric.with({\n statistic: \"average\",\n label: \"Error rate\",\n color: cloudwatch.Color.GREEN,\n })]\n}));",
730 "version": "0"
731 }
732 },
733 "location": {
734 "api": {
735 "api": "moduleReadme",
736 "moduleFqn": "@aws-cdk/aws-cloudwatch"
737 },
738 "field": {
739 "field": "markdown",
740 "line": 331
741 }
742 },
743 "didCompile": true,
744 "fqnsReferenced": [
745 "@aws-cdk/aws-cloudwatch.Color",
746 "@aws-cdk/aws-cloudwatch.Color#GREEN",
747 "@aws-cdk/aws-cloudwatch.Dashboard#addWidgets",
748 "@aws-cdk/aws-cloudwatch.GraphWidget",
749 "@aws-cdk/aws-cloudwatch.GraphWidgetProps",
750 "@aws-cdk/aws-cloudwatch.IWidget",
751 "@aws-cdk/aws-cloudwatch.Metric#with",
752 "@aws-cdk/aws-cloudwatch.MetricOptions"
753 ],
754 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const dashboard: cloudwatch.Dashboard;\ndeclare const executionCountMetric: cloudwatch.Metric;\ndeclare const errorCountMetric: cloudwatch.Metric;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\nimport * as route53 from '@aws-cdk/aws-route53';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as lambda from '@aws-cdk/aws-lambda';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\ndashboard.addWidgets(new cloudwatch.GraphWidget({\n title: \"Executions vs error rate\",\n\n left: [executionCountMetric],\n\n right: [errorCountMetric.with({\n statistic: \"average\",\n label: \"Error rate\",\n color: cloudwatch.Color.GREEN,\n })]\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n\n",
755 "syntaxKindCounter": {
756 "10": 3,
757 "75": 25,
758 "130": 3,
759 "153": 3,
760 "169": 3,
761 "192": 2,
762 "193": 2,
763 "194": 5,
764 "196": 2,
765 "197": 1,
766 "225": 3,
767 "226": 1,
768 "242": 3,
769 "243": 3,
770 "281": 6,
771 "290": 1
772 },
773 "fqnsFingerprint": "1645fef2b75b21b1050b2ea6bda4405579544588e20fc0f2a7e37d7eb18b7f63"
774 },
775 "2e8b47815ed5ca3b937b3be6af75939cc73563b5ae737f8429adc5643fdff9c8": {
776 "translations": {
777 "python": {
778 "source": "# dashboard: cloudwatch.Dashboard\n\n\ndashboard.add_widgets(cloudwatch.GraphWidget(\n # ...\n\n left_annotations=[cloudwatch.HorizontalAnnotation(value=1800, label=Duration.minutes(30).to_human_string(), color=cloudwatch.Color.RED), cloudwatch.HorizontalAnnotation(value=3600, label=\"1 hour\", color=\"#2ca02c\")\n ]\n))",
779 "version": "2"
780 },
781 "csharp": {
782 "source": "Dashboard dashboard;\n\n\ndashboard.AddWidgets(new GraphWidget(new GraphWidgetProps {\n // ...\n\n LeftAnnotations = new [] { new HorizontalAnnotation { Value = 1800, Label = Duration.Minutes(30).ToHumanString(), Color = Color.RED }, new HorizontalAnnotation { Value = 3600, Label = \"1 hour\", Color = \"#2ca02c\" } }\n}));",
783 "version": "1"
784 },
785 "java": {
786 "source": "Dashboard dashboard;\n\n\ndashboard.addWidgets(GraphWidget.Builder.create()\n // ...\n\n .leftAnnotations(List.of(HorizontalAnnotation.builder().value(1800).label(Duration.minutes(30).toHumanString()).color(Color.RED).build(), HorizontalAnnotation.builder().value(3600).label(\"1 hour\").color(\"#2ca02c\").build()))\n .build());",
787 "version": "1"
788 },
789 "go": {
790 "source": "var dashboard dashboard\n\n\ndashboard.addWidgets(cloudwatch.NewGraphWidget(&graphWidgetProps{\n\t// ...\n\n\tleftAnnotations: []horizontalAnnotation{\n\t\t&horizontalAnnotation{\n\t\t\tvalue: jsii.Number(1800),\n\t\t\tlabel: *awscdkcore.Duration.minutes(jsii.Number(30)).toHumanString(),\n\t\t\tcolor: cloudwatch.color_RED(),\n\t\t},\n\t\t&horizontalAnnotation{\n\t\t\tvalue: jsii.Number(3600),\n\t\t\tlabel: jsii.String(\"1 hour\"),\n\t\t\tcolor: jsii.String(\"#2ca02c\"),\n\t\t},\n\t},\n}))",
791 "version": "1"
792 },
793 "$": {
794 "source": "declare const dashboard: cloudwatch.Dashboard;\n\ndashboard.addWidgets(new cloudwatch.GraphWidget({\n // ...\n\n leftAnnotations: [\n { value: 1800, label: Duration.minutes(30).toHumanString(), color: cloudwatch.Color.RED, },\n { value: 3600, label: '1 hour', color: '#2ca02c', }\n ],\n}));",
795 "version": "0"
796 }
797 },
798 "location": {
799 "api": {
800 "api": "moduleReadme",
801 "moduleFqn": "@aws-cdk/aws-cloudwatch"
802 },
803 "field": {
804 "field": "markdown",
805 "line": 353
806 }
807 },
808 "didCompile": true,
809 "fqnsReferenced": [
810 "@aws-cdk/aws-cloudwatch.Color",
811 "@aws-cdk/aws-cloudwatch.Color#RED",
812 "@aws-cdk/aws-cloudwatch.Dashboard#addWidgets",
813 "@aws-cdk/aws-cloudwatch.GraphWidget",
814 "@aws-cdk/aws-cloudwatch.GraphWidgetProps",
815 "@aws-cdk/aws-cloudwatch.IWidget",
816 "@aws-cdk/core.Duration#minutes",
817 "@aws-cdk/core.Duration#toHumanString"
818 ],
819 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const dashboard: cloudwatch.Dashboard;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\nimport * as route53 from '@aws-cdk/aws-route53';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as lambda from '@aws-cdk/aws-lambda';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\ndashboard.addWidgets(new cloudwatch.GraphWidget({\n // ...\n\n leftAnnotations: [\n { value: 1800, label: Duration.minutes(30).toHumanString(), color: cloudwatch.Color.RED, },\n { value: 3600, label: '1 hour', color: '#2ca02c', }\n ],\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n\n",
820 "syntaxKindCounter": {
821 "8": 3,
822 "10": 2,
823 "75": 20,
824 "130": 1,
825 "153": 1,
826 "169": 1,
827 "192": 1,
828 "193": 3,
829 "194": 6,
830 "196": 3,
831 "197": 1,
832 "225": 1,
833 "226": 1,
834 "242": 1,
835 "243": 1,
836 "281": 7,
837 "290": 1
838 },
839 "fqnsFingerprint": "060e31b28e77f024e29d1b39e1b4d21d9f16e99270ee5625447c4e45ec82ae84"
840 },
841 "ebffb1747be766ac73a8c46aa4c87806e62a7e714d66019e4673710be3bb05dc": {
842 "translations": {
843 "python": {
844 "source": "# dashboard: cloudwatch.Dashboard\n\n\ndashboard.add_widgets(cloudwatch.GraphWidget(\n # ...\n\n legend_position=cloudwatch.LegendPosition.RIGHT\n))",
845 "version": "2"
846 },
847 "csharp": {
848 "source": "Dashboard dashboard;\n\n\ndashboard.AddWidgets(new GraphWidget(new GraphWidgetProps {\n // ...\n\n LegendPosition = LegendPosition.RIGHT\n}));",
849 "version": "1"
850 },
851 "java": {
852 "source": "Dashboard dashboard;\n\n\ndashboard.addWidgets(GraphWidget.Builder.create()\n // ...\n\n .legendPosition(LegendPosition.RIGHT)\n .build());",
853 "version": "1"
854 },
855 "go": {
856 "source": "var dashboard dashboard\n\n\ndashboard.addWidgets(cloudwatch.NewGraphWidget(&graphWidgetProps{\n\t// ...\n\n\tlegendPosition: cloudwatch.legendPosition_RIGHT,\n}))", <