UNPKG

519 kBJSONView Raw
1{
2 "version": "2",
3 "toolVersion": "1.57.0",
4 "snippets": {
5 "7cf49f40f663c44c6234d9e5bf65b18c13a6e7329610df601d01a65a8bccd5d7": {
6 "translations": {
7 "python": {
8 "source": "# repo: codecommit.Repository\n# project: codebuild.Project\n\n\non_commit_rule = repo.on_commit(\"OnCommit\",\n target=targets.CodeBuildProject(project),\n branches=[\"master\"]\n)",
9 "version": "2"
10 },
11 "csharp": {
12 "source": "Repository repo;\nProject project;\n\n\nRule onCommitRule = repo.OnCommit(\"OnCommit\", new OnCommitOptions {\n Target = new CodeBuildProject(project),\n Branches = new [] { \"master\" }\n});",
13 "version": "1"
14 },
15 "java": {
16 "source": "Repository repo;\nProject project;\n\n\nRule onCommitRule = repo.onCommit(\"OnCommit\", OnCommitOptions.builder()\n .target(new CodeBuildProject(project))\n .branches(List.of(\"master\"))\n .build());",
17 "version": "1"
18 },
19 "go": {
20 "source": "var repo repository\nvar project project\n\nonCommitRule := repo.onCommit(jsii.String(\"OnCommit\"), &onCommitOptions{\n\ttarget: targets.NewCodeBuildProject(project),\n\tbranches: []*string{\n\t\tjsii.String(\"master\"),\n\t},\n})",
21 "version": "1"
22 },
23 "$": {
24 "source": "declare const repo: codecommit.Repository;\ndeclare const project: codebuild.Project;\n\nconst onCommitRule = repo.onCommit('OnCommit', {\n target: new targets.CodeBuildProject(project),\n branches: ['master']\n});",
25 "version": "0"
26 }
27 },
28 "location": {
29 "api": {
30 "api": "moduleReadme",
31 "moduleFqn": "@aws-cdk/aws-events"
32 },
33 "field": {
34 "field": "markdown",
35 "line": 61
36 }
37 },
38 "didCompile": true,
39 "fqnsReferenced": [
40 "@aws-cdk/aws-codebuild.IProject",
41 "@aws-cdk/aws-codecommit.OnCommitOptions",
42 "@aws-cdk/aws-events-targets.CodeBuildProject",
43 "@aws-cdk/aws-events.IRuleTarget",
44 "@aws-cdk/aws-events.Rule"
45 ],
46 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const repo: codecommit.Repository;\ndeclare const project: codebuild.Project;\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 events from '@aws-cdk/aws-events';\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as ecs from '@aws-cdk/aws-ecs';\nimport * as iam from '@aws-cdk/aws-iam';\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 onCommitRule = repo.onCommit('OnCommit', {\n target: new targets.CodeBuildProject(project),\n branches: ['master']\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
47 "syntaxKindCounter": {
48 "10": 2,
49 "75": 14,
50 "130": 2,
51 "153": 2,
52 "169": 2,
53 "192": 1,
54 "193": 1,
55 "194": 2,
56 "196": 1,
57 "197": 1,
58 "225": 3,
59 "242": 3,
60 "243": 3,
61 "281": 2,
62 "290": 1
63 },
64 "fqnsFingerprint": "17d9c68eb4fac1cbff55367b87d7eb6c7a573c4011e1f272ac93eda10fc8620d"
65 },
66 "0ff6e72a22dbd36dacd690373116c162c1bd2b4ff43d7d01218d1ac6811c0ab7": {
67 "translations": {
68 "python": {
69 "source": "# on_commit_rule: events.Rule\n# topic: sns.Topic\n\n\non_commit_rule.add_target(targets.SnsTopic(topic,\n message=events.RuleTargetInput.from_text(f\"A commit was pushed to the repository {codecommit.ReferenceEvent.repositoryName} on branch {codecommit.ReferenceEvent.referenceName}\")\n))",
70 "version": "2"
71 },
72 "csharp": {
73 "source": "Rule onCommitRule;\nTopic topic;\n\n\nonCommitRule.AddTarget(new SnsTopic(topic, new SnsTopicProps {\n Message = RuleTargetInput.FromText($\"A commit was pushed to the repository {codecommit.ReferenceEvent.repositoryName} on branch {codecommit.ReferenceEvent.referenceName}\")\n}));",
74 "version": "1"
75 },
76 "java": {
77 "source": "Rule onCommitRule;\nTopic topic;\n\n\nonCommitRule.addTarget(SnsTopic.Builder.create(topic)\n .message(RuleTargetInput.fromText(String.format(\"A commit was pushed to the repository %s on branch %s\", ReferenceEvent.getRepositoryName(), ReferenceEvent.getReferenceName())))\n .build());",
78 "version": "1"
79 },
80 "go": {
81 "source": "var onCommitRule rule\nvar topic topic\n\nonCommitRule.addTarget(targets.NewSnsTopic(topic, &snsTopicProps{\n\tmessage: events.ruleTargetInput.fromText(\n\tfmt.Sprintf(\"A commit was pushed to the repository %v on branch %v\", codecommit.referenceEvent.repositoryName, codecommit.*referenceEvent.referenceName)),\n}))",
82 "version": "1"
83 },
84 "$": {
85 "source": "declare const onCommitRule: events.Rule;\ndeclare const topic: sns.Topic;\n\nonCommitRule.addTarget(new targets.SnsTopic(topic, {\n message: events.RuleTargetInput.fromText(\n `A commit was pushed to the repository ${codecommit.ReferenceEvent.repositoryName} on branch ${codecommit.ReferenceEvent.referenceName}`\n )\n}));",
86 "version": "0"
87 }
88 },
89 "location": {
90 "api": {
91 "api": "moduleReadme",
92 "moduleFqn": "@aws-cdk/aws-events"
93 },
94 "field": {
95 "field": "markdown",
96 "line": 78
97 }
98 },
99 "didCompile": true,
100 "fqnsReferenced": [
101 "@aws-cdk/aws-events-targets.SnsTopic",
102 "@aws-cdk/aws-events-targets.SnsTopicProps",
103 "@aws-cdk/aws-events.IRuleTarget",
104 "@aws-cdk/aws-events.Rule#addTarget",
105 "@aws-cdk/aws-events.RuleTargetInput",
106 "@aws-cdk/aws-events.RuleTargetInput#fromText",
107 "@aws-cdk/aws-sns.ITopic"
108 ],
109 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const onCommitRule: events.Rule;\ndeclare const topic: sns.Topic;\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 events from '@aws-cdk/aws-events';\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as ecs from '@aws-cdk/aws-ecs';\nimport * as iam from '@aws-cdk/aws-iam';\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\nonCommitRule.addTarget(new targets.SnsTopic(topic, {\n message: events.RuleTargetInput.fromText(\n `A commit was pushed to the repository ${codecommit.ReferenceEvent.repositoryName} on branch ${codecommit.ReferenceEvent.referenceName}`\n )\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
110 "syntaxKindCounter": {
111 "15": 1,
112 "16": 1,
113 "17": 1,
114 "75": 21,
115 "130": 2,
116 "153": 2,
117 "169": 2,
118 "193": 1,
119 "194": 8,
120 "196": 2,
121 "197": 1,
122 "211": 1,
123 "221": 2,
124 "225": 2,
125 "226": 1,
126 "242": 2,
127 "243": 2,
128 "281": 1,
129 "290": 1
130 },
131 "fqnsFingerprint": "f145cbc85542cf87295364cac1028907524b57d1a5ffe8cc47bd11ee09edfd08"
132 },
133 "8acd9a78f8d185adde2917387febff93e5528fbbc486f4e4718724eadc295dca": {
134 "translations": {
135 "python": {
136 "source": "# on_commit_rule: events.Rule\n# topic: sns.Topic\n\n\non_commit_rule.add_target(targets.SnsTopic(topic,\n message=events.RuleTargetInput.from_object({\n \"DataType\": f\"custom_{events.EventField.fromPath('$.detail-type')}\"\n })\n))",
137 "version": "2"
138 },
139 "csharp": {
140 "source": "Rule onCommitRule;\nTopic topic;\n\n\nonCommitRule.AddTarget(new SnsTopic(topic, new SnsTopicProps {\n Message = RuleTargetInput.FromObject(new Dictionary<string, string> {\n { \"DataType\", $\"custom_{events.EventField.fromPath('$.detail-type')}\" }\n })\n}));",
141 "version": "1"
142 },
143 "java": {
144 "source": "Rule onCommitRule;\nTopic topic;\n\n\nonCommitRule.addTarget(SnsTopic.Builder.create(topic)\n .message(RuleTargetInput.fromObject(Map.of(\n \"DataType\", String.format(\"custom_%s\", EventField.fromPath(\"$.detail-type\")))))\n .build());",
145 "version": "1"
146 },
147 "go": {
148 "source": "var onCommitRule rule\nvar topic topic\n\nonCommitRule.addTarget(targets.NewSnsTopic(topic, &snsTopicProps{\n\tmessage: events.ruleTargetInput.fromObject(map[string]*string{\n\t\t\"DataType\": fmt.Sprintf(\"custom_%v\", events.EventField.fromPath(jsii.String(\"$.detail-type\"))),\n\t}),\n}))",
149 "version": "1"
150 },
151 "$": {
152 "source": "declare const onCommitRule: events.Rule;\ndeclare const topic: sns.Topic;\n\nonCommitRule.addTarget(new targets.SnsTopic(topic, {\n message: events.RuleTargetInput.fromObject(\n {\n DataType: `custom_${events.EventField.fromPath('$.detail-type')}`\n }\n )\n}));",
153 "version": "0"
154 }
155 },
156 "location": {
157 "api": {
158 "api": "moduleReadme",
159 "moduleFqn": "@aws-cdk/aws-events"
160 },
161 "field": {
162 "field": "markdown",
163 "line": 91
164 }
165 },
166 "didCompile": true,
167 "fqnsReferenced": [
168 "@aws-cdk/aws-events-targets.SnsTopic",
169 "@aws-cdk/aws-events-targets.SnsTopicProps",
170 "@aws-cdk/aws-events.IRuleTarget",
171 "@aws-cdk/aws-events.Rule#addTarget",
172 "@aws-cdk/aws-events.RuleTargetInput",
173 "@aws-cdk/aws-events.RuleTargetInput#fromObject",
174 "@aws-cdk/aws-sns.ITopic"
175 ],
176 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const onCommitRule: events.Rule;\ndeclare const topic: sns.Topic;\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 events from '@aws-cdk/aws-events';\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as ecs from '@aws-cdk/aws-ecs';\nimport * as iam from '@aws-cdk/aws-iam';\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\nonCommitRule.addTarget(new targets.SnsTopic(topic, {\n message: events.RuleTargetInput.fromObject(\n {\n DataType: `custom_${events.EventField.fromPath('$.detail-type')}`\n }\n )\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
177 "syntaxKindCounter": {
178 "10": 1,
179 "15": 1,
180 "17": 1,
181 "75": 19,
182 "130": 2,
183 "153": 2,
184 "169": 2,
185 "193": 2,
186 "194": 6,
187 "196": 3,
188 "197": 1,
189 "211": 1,
190 "221": 1,
191 "225": 2,
192 "226": 1,
193 "242": 2,
194 "243": 2,
195 "281": 2,
196 "290": 1
197 },
198 "fqnsFingerprint": "1cf19a7a748d1239f6b47dca9cd1884215f3a44d1bb074e996a16d0cb7489b02"
199 },
200 "eccf9afcaf8de6691b31152d3661bc14dc7cee02f8010f72354b48b5fa5ed3d8": {
201 "translations": {
202 "python": {
203 "source": "from aws_cdk.aws_events import Rule, Schedule\nfrom aws_cdk.aws_events_targets import EcsTask\nfrom aws_cdk.aws_ecs import Cluster, TaskDefinition\nfrom aws_cdk.aws_iam import Role\n\n# cluster: Cluster\n# task_definition: TaskDefinition\n# role: Role\n\n\necs_task_target = EcsTask(cluster=cluster, task_definition=task_definition, role=role)\n\nRule(self, \"ScheduleRule\",\n schedule=Schedule.cron(minute=\"0\", hour=\"4\"),\n targets=[ecs_task_target]\n)",
204 "version": "2"
205 },
206 "csharp": {
207 "source": "using Amazon.CDK.AWS.Events;\nusing Amazon.CDK.AWS.Events.Targets;\nusing Amazon.CDK.AWS.ECS;\nusing Amazon.CDK.AWS.IAM;\n\nCluster cluster;\nTaskDefinition taskDefinition;\nRole role;\n\n\nEcsTask ecsTaskTarget = new EcsTask(new EcsTaskProps { Cluster = cluster, TaskDefinition = taskDefinition, Role = role });\n\nnew Rule(this, \"ScheduleRule\", new RuleProps {\n Schedule = Schedule.Cron(new CronOptions { Minute = \"0\", Hour = \"4\" }),\n Targets = new [] { ecsTaskTarget }\n});",
208 "version": "1"
209 },
210 "java": {
211 "source": "import software.amazon.awscdk.services.events.Rule;\nimport software.amazon.awscdk.services.events.Schedule;\nimport software.amazon.awscdk.services.events.targets.EcsTask;\nimport software.amazon.awscdk.services.ecs.Cluster;\nimport software.amazon.awscdk.services.ecs.TaskDefinition;\nimport software.amazon.awscdk.services.iam.Role;\n\nCluster cluster;\nTaskDefinition taskDefinition;\nRole role;\n\n\nEcsTask ecsTaskTarget = EcsTask.Builder.create().cluster(cluster).taskDefinition(taskDefinition).role(role).build();\n\nRule.Builder.create(this, \"ScheduleRule\")\n .schedule(Schedule.cron(CronOptions.builder().minute(\"0\").hour(\"4\").build()))\n .targets(List.of(ecsTaskTarget))\n .build();",
212 "version": "1"
213 },
214 "go": {
215 "source": "import awscdkawsevents \"github.com/aws-samples/dummy/awscdkawsevents\"type Rule awscdkawsevents.Rule\ntype Schedule awscdkawsevents.Scheduleimport awscdkawseventstargets \"github.com/aws-samples/dummy/awscdkawseventstargets\"type EcsTask awscdkawseventstargets.EcsTaskimport awscdkawsecs \"github.com/aws-samples/dummy/awscdkawsecs\"type Cluster awscdkawsecs.Cluster\ntype TaskDefinition awscdkawsecs.TaskDefinitionimport awscdkawsiam \"github.com/aws-samples/dummy/awscdkawsiam\"type Role awscdkawsiam.Role\n\nvar cluster cluster\nvar taskDefinition taskDefinition\nvar role role\n\necsTaskTarget := NewEcsTask(&ecsTaskProps{\n\tcluster: cluster,\n\ttaskDefinition: taskDefinition,\n\trole: role,\n})\n\nNewRule(this, jsii.String(\"ScheduleRule\"), &ruleProps{\n\tschedule: schedule.cron(&cronOptions{\n\t\tminute: jsii.String(\"0\"),\n\t\thour: jsii.String(\"4\"),\n\t}),\n\ttargets: []iRuleTarget{\n\t\tecsTaskTarget,\n\t},\n})",
216 "version": "1"
217 },
218 "$": {
219 "source": "import { Rule, Schedule } from '@aws-cdk/aws-events';\nimport { EcsTask } from '@aws-cdk/aws-events-targets';\nimport { Cluster, TaskDefinition } from '@aws-cdk/aws-ecs';\nimport { Role } from '@aws-cdk/aws-iam';\n\ndeclare const cluster: Cluster;\ndeclare const taskDefinition: TaskDefinition;\ndeclare const role: Role;\n\nconst ecsTaskTarget = new EcsTask({ cluster, taskDefinition, role });\n\nnew Rule(this, 'ScheduleRule', {\n schedule: Schedule.cron({ minute: '0', hour: '4' }),\n targets: [ecsTaskTarget],\n});",
220 "version": "0"
221 }
222 },
223 "location": {
224 "api": {
225 "api": "moduleReadme",
226 "moduleFqn": "@aws-cdk/aws-events"
227 },
228 "field": {
229 "field": "markdown",
230 "line": 111
231 }
232 },
233 "didCompile": true,
234 "fqnsReferenced": [
235 "@aws-cdk/aws-ecs.ICluster",
236 "@aws-cdk/aws-ecs.ITaskDefinition",
237 "@aws-cdk/aws-events-targets.EcsTask",
238 "@aws-cdk/aws-events-targets.EcsTaskProps",
239 "@aws-cdk/aws-events.CronOptions",
240 "@aws-cdk/aws-events.Rule",
241 "@aws-cdk/aws-events.RuleProps",
242 "@aws-cdk/aws-events.Schedule",
243 "@aws-cdk/aws-events.Schedule#cron",
244 "@aws-cdk/aws-iam.IRole",
245 "constructs.Construct"
246 ],
247 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport { Rule, Schedule } from '@aws-cdk/aws-events';\nimport { EcsTask } from '@aws-cdk/aws-events-targets';\nimport { Cluster, TaskDefinition } from '@aws-cdk/aws-ecs';\nimport { Role } from '@aws-cdk/aws-iam';\n\ndeclare const cluster: Cluster;\ndeclare const taskDefinition: TaskDefinition;\ndeclare const role: Role;\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';\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 ecsTaskTarget = new EcsTask({ cluster, taskDefinition, role });\n\nnew Rule(this, 'ScheduleRule', {\n schedule: Schedule.cron({ minute: '0', hour: '4' }),\n targets: [ecsTaskTarget],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
248 "syntaxKindCounter": {
249 "10": 7,
250 "75": 25,
251 "104": 1,
252 "130": 3,
253 "169": 3,
254 "192": 1,
255 "193": 3,
256 "194": 1,
257 "196": 1,
258 "197": 2,
259 "225": 4,
260 "226": 1,
261 "242": 4,
262 "243": 4,
263 "254": 4,
264 "255": 4,
265 "257": 4,
266 "258": 6,
267 "281": 4,
268 "282": 3,
269 "290": 1
270 },
271 "fqnsFingerprint": "d475f9c9575b8eb66617076935580c307d039f547f8303425190b74f03e85bd9"
272 },
273 "fc9533bb39108e00dfa980b5b1c40dfe71ad2e992477c5bac2208bf6ca78c9d5": {
274 "translations": {
275 "python": {
276 "source": "# cluster: ecs.Cluster\n# task_definition: ecs.TaskDefinition\n# role: iam.Role\n\n\nplatform_version = ecs.FargatePlatformVersion.VERSION1_4\necs_task_target = targets.EcsTask(cluster=cluster, task_definition=task_definition, role=role, platform_version=platform_version)",
277 "version": "2"
278 },
279 "csharp": {
280 "source": "Cluster cluster;\nTaskDefinition taskDefinition;\nRole role;\n\n\nFargatePlatformVersion platformVersion = FargatePlatformVersion.VERSION1_4;\nEcsTask ecsTaskTarget = new EcsTask(new EcsTaskProps { Cluster = cluster, TaskDefinition = taskDefinition, Role = role, PlatformVersion = platformVersion });",
281 "version": "1"
282 },
283 "java": {
284 "source": "Cluster cluster;\nTaskDefinition taskDefinition;\nRole role;\n\n\nFargatePlatformVersion platformVersion = FargatePlatformVersion.VERSION1_4;\nEcsTask ecsTaskTarget = EcsTask.Builder.create().cluster(cluster).taskDefinition(taskDefinition).role(role).platformVersion(platformVersion).build();",
285 "version": "1"
286 },
287 "go": {
288 "source": "var cluster cluster\nvar taskDefinition taskDefinition\nvar role role\n\nplatformVersion := ecs.fargatePlatformVersion_VERSION1_4\necsTaskTarget := targets.NewEcsTask(&ecsTaskProps{\n\tcluster: cluster,\n\ttaskDefinition: taskDefinition,\n\trole: role,\n\tplatformVersion: platformVersion,\n})",
289 "version": "1"
290 },
291 "$": {
292 "source": "declare const cluster: ecs.Cluster;\ndeclare const taskDefinition: ecs.TaskDefinition;\ndeclare const role: iam.Role;\n\nconst platformVersion = ecs.FargatePlatformVersion.VERSION1_4;\nconst ecsTaskTarget = new targets.EcsTask({ cluster, taskDefinition, role, platformVersion });",
293 "version": "0"
294 }
295 },
296 "location": {
297 "api": {
298 "api": "moduleReadme",
299 "moduleFqn": "@aws-cdk/aws-events"
300 },
301 "field": {
302 "field": "markdown",
303 "line": 131
304 }
305 },
306 "didCompile": true,
307 "fqnsReferenced": [
308 "@aws-cdk/aws-ecs.FargatePlatformVersion",
309 "@aws-cdk/aws-ecs.FargatePlatformVersion#VERSION1_4",
310 "@aws-cdk/aws-ecs.ICluster",
311 "@aws-cdk/aws-ecs.ITaskDefinition",
312 "@aws-cdk/aws-events-targets.EcsTask",
313 "@aws-cdk/aws-events-targets.EcsTaskProps",
314 "@aws-cdk/aws-iam.IRole"
315 ],
316 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const cluster: ecs.Cluster;\ndeclare const taskDefinition: ecs.TaskDefinition;\ndeclare const role: iam.Role;\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 events from '@aws-cdk/aws-events';\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as ecs from '@aws-cdk/aws-ecs';\nimport * as iam from '@aws-cdk/aws-iam';\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 platformVersion = ecs.FargatePlatformVersion.VERSION1_4;\nconst ecsTaskTarget = new targets.EcsTask({ cluster, taskDefinition, role, platformVersion });\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
317 "syntaxKindCounter": {
318 "75": 20,
319 "130": 3,
320 "153": 3,
321 "169": 3,
322 "193": 1,
323 "194": 3,
324 "197": 1,
325 "225": 5,
326 "242": 5,
327 "243": 5,
328 "282": 4,
329 "290": 1
330 },
331 "fqnsFingerprint": "b5f36e86592cf98fd11b0a24c9b4b5f810db015b7b3a187466993616d3f2fec3"
332 },
333 "cb3ed42d1e89aa602607c9052cd892132b3e488d3a8a51142ae4d813b3e1bcc7": {
334 "translations": {
335 "python": {
336 "source": "from aws_cdk.core import Environment, Environment\nfrom aws_cdk.core import App, Stack\nimport aws_cdk.aws_codebuild as codebuild\nimport aws_cdk.aws_codecommit as codecommit\nimport aws_cdk.aws_events_targets as targets\n\napp = App()\n\naccount1 = \"11111111111\"\naccount2 = \"22222222222\"\n\nstack1 = Stack(app, \"Stack1\", env=Environment(account=account1, region=\"us-west-1\"))\nrepo = codecommit.Repository(stack1, \"Repository\",\n repository_name=\"myrepository\"\n)\n\nstack2 = Stack(app, \"Stack2\", env=Environment(account=account2, region=\"us-east-1\"))\nproject = codebuild.Project(stack2, \"Project\")\n\nrepo.on_commit(\"OnCommit\",\n target=targets.CodeBuildProject(project)\n)",
337 "version": "2"
338 },
339 "csharp": {
340 "source": "using Amazon.CDK;\nusing Amazon.CDK.AWS.CodeBuild;\nusing Amazon.CDK.AWS.CodeCommit;\nusing Amazon.CDK.AWS.Events.Targets;\n\nApp app = new App();\n\nstring account1 = \"11111111111\";\nstring account2 = \"22222222222\";\n\nStack stack1 = new Stack(app, \"Stack1\", new StackProps { Env = new Environment { Account = account1, Region = \"us-west-1\" } });\nRepository repo = new Repository(stack1, \"Repository\", new RepositoryProps {\n RepositoryName = \"myrepository\"\n});\n\nStack stack2 = new Stack(app, \"Stack2\", new StackProps { Env = new Environment { Account = account2, Region = \"us-east-1\" } });\nProject project = new Project(stack2, \"Project\", new ProjectProps { });\n\nrepo.OnCommit(\"OnCommit\", new OnCommitOptions {\n Target = new CodeBuildProject(project)\n});",
341 "version": "1"
342 },
343 "java": {
344 "source": "import software.amazon.awscdk.core.App;\nimport software.amazon.awscdk.core.Stack;\nimport software.amazon.awscdk.services.codebuild.*;\nimport software.amazon.awscdk.services.codecommit.*;\nimport software.amazon.awscdk.services.events.targets.*;\n\nApp app = new App();\n\nString account1 = \"11111111111\";\nString account2 = \"22222222222\";\n\nStack stack1 = Stack.Builder.create(app, \"Stack1\").env(Environment.builder().account(account1).region(\"us-west-1\").build()).build();\nRepository repo = Repository.Builder.create(stack1, \"Repository\")\n .repositoryName(\"myrepository\")\n .build();\n\nStack stack2 = Stack.Builder.create(app, \"Stack2\").env(Environment.builder().account(account2).region(\"us-east-1\").build()).build();\nProject project = Project.Builder.create(stack2, \"Project\").build();\n\nrepo.onCommit(\"OnCommit\", OnCommitOptions.builder()\n .target(new CodeBuildProject(project))\n .build());",
345 "version": "1"
346 },
347 "go": {
348 "source": "import awscdkcore \"github.com/aws-samples/dummy/awscdkcore\"type App awscdkcore.App\ntype Stack awscdkcore.Stackimport codebuild \"github.com/aws-samples/dummy/awscdkawscodebuild\"import codecommit \"github.com/aws-samples/dummy/awscdkawscodecommit\"import targets \"github.com/aws-samples/dummy/awscdkawseventstargets\"\n\napp := NewApp()\n\naccount1 := \"11111111111\"\naccount2 := \"22222222222\"\n\nstack1 := NewStack(app, jsii.String(\"Stack1\"), &stackProps{\n\tenv: &environment{\n\t\taccount: account1,\n\t\tregion: jsii.String(\"us-west-1\"),\n\t},\n})\nrepo := codecommit.NewRepository(stack1, jsii.String(\"Repository\"), &repositoryProps{\n\trepositoryName: jsii.String(\"myrepository\"),\n})\n\nstack2 := NewStack(app, jsii.String(\"Stack2\"), &stackProps{\n\tenv: &environment{\n\t\taccount: account2,\n\t\tregion: jsii.String(\"us-east-1\"),\n\t},\n})\nproject := codebuild.NewProject(stack2, jsii.String(\"Project\"), &projectProps{\n})\n\nrepo.onCommit(jsii.String(\"OnCommit\"), &onCommitOptions{\n\ttarget: targets.NewCodeBuildProject(project),\n})",
349 "version": "1"
350 },
351 "$": {
352 "source": "import { App, Stack } from '@aws-cdk/core';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as targets from '@aws-cdk/aws-events-targets';\n\nconst app = new App();\n\nconst account1 = '11111111111';\nconst account2 = '22222222222';\n\nconst stack1 = new Stack(app, 'Stack1', { env: { account: account1, region: 'us-west-1' } });\nconst repo = new codecommit.Repository(stack1, 'Repository', {\n repositoryName: 'myrepository',\n});\n\nconst stack2 = new Stack(app, 'Stack2', { env: { account: account2, region: 'us-east-1' } });\nconst project = new codebuild.Project(stack2, 'Project', {\n // ...\n});\n\nrepo.onCommit('OnCommit', {\n target: new targets.CodeBuildProject(project),\n});",
353 "version": "0"
354 }
355 },
356 "location": {
357 "api": {
358 "api": "moduleReadme",
359 "moduleFqn": "@aws-cdk/aws-events"
360 },
361 "field": {
362 "field": "markdown",
363 "line": 163
364 }
365 },
366 "didCompile": true,
367 "fqnsReferenced": [
368 "@aws-cdk/aws-codebuild.IProject",
369 "@aws-cdk/aws-codebuild.Project",
370 "@aws-cdk/aws-codebuild.ProjectProps",
371 "@aws-cdk/aws-codecommit.OnCommitOptions",
372 "@aws-cdk/aws-codecommit.Repository",
373 "@aws-cdk/aws-codecommit.RepositoryProps",
374 "@aws-cdk/aws-events-targets.CodeBuildProject",
375 "@aws-cdk/aws-events.IRuleTarget",
376 "@aws-cdk/core.App",
377 "@aws-cdk/core.Environment",
378 "@aws-cdk/core.Stack",
379 "@aws-cdk/core.StackProps",
380 "constructs.Construct"
381 ],
382 "fullSource": "import { App, Stack } from '@aws-cdk/core';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as targets from '@aws-cdk/aws-events-targets';\n\nconst app = new App();\n\nconst account1 = '11111111111';\nconst account2 = '22222222222';\n\nconst stack1 = new Stack(app, 'Stack1', { env: { account: account1, region: 'us-west-1' } });\nconst repo = new codecommit.Repository(stack1, 'Repository', {\n repositoryName: 'myrepository',\n});\n\nconst stack2 = new Stack(app, 'Stack2', { env: { account: account2, region: 'us-east-1' } });\nconst project = new codebuild.Project(stack2, 'Project', {\n // ...\n});\n\nrepo.onCommit('OnCommit', {\n target: new targets.CodeBuildProject(project),\n});",
383 "syntaxKindCounter": {
384 "10": 14,
385 "75": 38,
386 "193": 7,
387 "194": 4,
388 "196": 1,
389 "197": 6,
390 "225": 7,
391 "226": 1,
392 "242": 7,
393 "243": 7,
394 "254": 4,
395 "255": 4,
396 "256": 3,
397 "257": 1,
398 "258": 2,
399 "281": 8,
400 "290": 1
401 },
402 "fqnsFingerprint": "601170eb478d69cbb6fd1e1ef2a27a061091c3c48d95368858a17b59f2ad584b"
403 },
404 "9b906e679698ac5a36a82dbffb362b7397ae5c64753e3a4b41310b70c1be19a7": {
405 "translations": {
406 "python": {
407 "source": "bus = events.EventBus(self, \"bus\",\n event_bus_name=\"MyCustomEventBus\"\n)\n\nbus.archive(\"MyArchive\",\n archive_name=\"MyCustomEventBusArchive\",\n description=\"MyCustomerEventBus Archive\",\n event_pattern=events.EventPattern(\n account=[Stack.of(self).account]\n ),\n retention=Duration.days(365)\n)",
408 "version": "2"
409 },
410 "csharp": {
411 "source": "EventBus bus = new EventBus(this, \"bus\", new EventBusProps {\n EventBusName = \"MyCustomEventBus\"\n});\n\nbus.Archive(\"MyArchive\", new BaseArchiveProps {\n ArchiveName = \"MyCustomEventBusArchive\",\n Description = \"MyCustomerEventBus Archive\",\n EventPattern = new EventPattern {\n Account = new [] { Stack.Of(this).Account }\n },\n Retention = Duration.Days(365)\n});",
412 "version": "1"
413 },
414 "java": {
415 "source": "EventBus bus = EventBus.Builder.create(this, \"bus\")\n .eventBusName(\"MyCustomEventBus\")\n .build();\n\nbus.archive(\"MyArchive\", BaseArchiveProps.builder()\n .archiveName(\"MyCustomEventBusArchive\")\n .description(\"MyCustomerEventBus Archive\")\n .eventPattern(EventPattern.builder()\n .account(List.of(Stack.of(this).getAccount()))\n .build())\n .retention(Duration.days(365))\n .build());",
416 "version": "1"
417 },
418 "go": {
419 "source": "bus := events.NewEventBus(this, jsii.String(\"bus\"), &eventBusProps{\n\teventBusName: jsii.String(\"MyCustomEventBus\"),\n})\n\nbus.archive(jsii.String(\"MyArchive\"), &baseArchiveProps{\n\tarchiveName: jsii.String(\"MyCustomEventBusArchive\"),\n\tdescription: jsii.String(\"MyCustomerEventBus Archive\"),\n\teventPattern: &eventPattern{\n\t\taccount: []*string{\n\t\t\t*stack.of(this).account,\n\t\t},\n\t},\n\tretention: duration.days(jsii.Number(365)),\n})",
420 "version": "1"
421 },
422 "$": {
423 "source": "const bus = new events.EventBus(this, 'bus', {\n eventBusName: 'MyCustomEventBus'\n});\n\nbus.archive('MyArchive', {\n archiveName: 'MyCustomEventBusArchive',\n description: 'MyCustomerEventBus Archive',\n eventPattern: {\n account: [Stack.of(this).account],\n },\n retention: Duration.days(365),\n});",
424 "version": "0"
425 }
426 },
427 "location": {
428 "api": {
429 "api": "moduleReadme",
430 "moduleFqn": "@aws-cdk/aws-events"
431 },
432 "field": {
433 "field": "markdown",
434 "line": 204
435 }
436 },
437 "didCompile": true,
438 "fqnsReferenced": [
439 "@aws-cdk/aws-events.BaseArchiveProps",
440 "@aws-cdk/aws-events.EventBus",
441 "@aws-cdk/aws-events.EventBusProps",
442 "@aws-cdk/aws-events.EventPattern",
443 "@aws-cdk/core.Duration",
444 "@aws-cdk/core.Duration#days",
445 "@aws-cdk/core.Stack#account",
446 "@aws-cdk/core.Stack#of",
447 "constructs.Construct",
448 "constructs.IConstruct"
449 ],
450 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as events from '@aws-cdk/aws-events';\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as ecs from '@aws-cdk/aws-ecs';\nimport * as iam from '@aws-cdk/aws-iam';\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 bus = new events.EventBus(this, 'bus', {\n eventBusName: 'MyCustomEventBus'\n});\n\nbus.archive('MyArchive', {\n archiveName: 'MyCustomEventBusArchive',\n description: 'MyCustomerEventBus Archive',\n eventPattern: {\n account: [Stack.of(this).account],\n },\n retention: Duration.days(365),\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
451 "syntaxKindCounter": {
452 "8": 1,
453 "10": 5,
454 "75": 16,
455 "104": 2,
456 "192": 1,
457 "193": 3,
458 "194": 5,
459 "196": 3,
460 "197": 1,
461 "225": 1,
462 "226": 1,
463 "242": 1,
464 "243": 1,
465 "281": 6
466 },
467 "fqnsFingerprint": "8a370448c8850f9d3bf4b97e19e578ded327b3a3770acbff3aee6834ce814a3f"
468 },
469 "8b5cf83c5bb4b90175ce2c38aaa59de642928ef4d0c277ccebc7f0e17d8196fa": {
470 "translations": {
471 "python": {
472 "source": "# lambda_function: lambda.Function\n\n\nevent_bus = events.EventBus.from_event_bus_arn(self, \"ImportedEventBus\", \"arn:aws:events:us-east-1:111111111:event-bus/my-event-bus\")\n\n# now you can just call methods on the eventbus\nevent_bus.grant_put_events_to(lambda_function)",
473 "version": "2"
474 },
475 "csharp": {
476 "source": "Function lambdaFunction;\n\n\nIEventBus eventBus = EventBus.FromEventBusArn(this, \"ImportedEventBus\", \"arn:aws:events:us-east-1:111111111:event-bus/my-event-bus\");\n\n// now you can just call methods on the eventbus\neventBus.GrantPutEventsTo(lambdaFunction);",
477 "version": "1"
478 },
479 "java": {
480 "source": "Function lambdaFunction;\n\n\nIEventBus eventBus = EventBus.fromEventBusArn(this, \"ImportedEventBus\", \"arn:aws:events:us-east-1:111111111:event-bus/my-event-bus\");\n\n// now you can just call methods on the eventbus\neventBus.grantPutEventsTo(lambdaFunction);",
481 "version": "1"
482 },
483 "go": {
484 "source": "var lambdaFunction function\n\neventBus := events.eventBus.fromEventBusArn(this, jsii.String(\"ImportedEventBus\"), jsii.String(\"arn:aws:events:us-east-1:111111111:event-bus/my-event-bus\"))\n\n// now you can just call methods on the eventbus\neventBus.grantPutEventsTo(lambdaFunction)",
485 "version": "1"
486 },
487 "$": {
488 "source": "declare const lambdaFunction: lambda.Function;\n\nconst eventBus = events.EventBus.fromEventBusArn(this, 'ImportedEventBus', 'arn:aws:events:us-east-1:111111111:event-bus/my-event-bus');\n\n// now you can just call methods on the eventbus\neventBus.grantPutEventsTo(lambdaFunction);",
489 "version": "0"
490 }
491 },
492 "location": {
493 "api": {
494 "api": "moduleReadme",
495 "moduleFqn": "@aws-cdk/aws-events"
496 },
497 "field": {
498 "field": "markdown",
499 "line": 226
500 }
501 },
502 "didCompile": true,
503 "fqnsReferenced": [
504 "@aws-cdk/aws-events.EventBus",
505 "@aws-cdk/aws-events.EventBus#fromEventBusArn",
506 "@aws-cdk/aws-events.IEventBus",
507 "@aws-cdk/aws-events.IEventBus#grantPutEventsTo",
508 "@aws-cdk/aws-iam.IGrantable",
509 "constructs.Construct"
510 ],
511 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const lambdaFunction: 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 events from '@aws-cdk/aws-events';\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as ecs from '@aws-cdk/aws-ecs';\nimport * as iam from '@aws-cdk/aws-iam';\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 eventBus = events.EventBus.fromEventBusArn(this, 'ImportedEventBus', 'arn:aws:events:us-east-1:111111111:event-bus/my-event-bus');\n\n// now you can just call methods on the eventbus\neventBus.grantPutEventsTo(lambdaFunction);\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
512 "syntaxKindCounter": {
513 "10": 2,
514 "75": 10,
515 "104": 1,
516 "130": 1,
517 "153": 1,
518 "169": 1,
519 "194": 3,
520 "196": 2,
521 "225": 2,
522 "226": 1,
523 "242": 2,
524 "243": 2,
525 "290": 1
526 },
527 "fqnsFingerprint": "cc068bc2c924b1e141e3c013b86be098f8cac5d226af8bee597d203bbf2dbea1"
528 },
529 "a4827dbeee1582d0bb87d1ecadcb5b55214df35b9893403fde11829245c840cb": {
530 "translations": {
531 "python": {
532 "source": "connection = events.Connection(self, \"Connection\",\n authorization=events.Authorization.api_key(\"x-api-key\", SecretValue.secrets_manager(\"ApiSecretName\")),\n description=\"Connection with API Key x-api-key\"\n)\n\ndestination = events.ApiDestination(self, \"Destination\",\n connection=connection,\n endpoint=\"https://example.com\",\n description=\"Calling example.com with API key x-api-key\"\n)\n\nrule = events.Rule(self, \"Rule\",\n schedule=events.Schedule.rate(cdk.Duration.minutes(1)),\n targets=[targets.ApiDestination(destination)]\n)",
533 "version": "2"
534 },
535 "csharp": {
536 "source": "Connection connection = new Connection(this, \"Connection\", new ConnectionProps {\n Authorization = Authorization.ApiKey(\"x-api-key\", SecretValue.SecretsManager(\"ApiSecretName\")),\n Description = \"Connection with API Key x-api-key\"\n});\n\nApiDestination destination = new ApiDestination(this, \"Destination\", new ApiDestinationProps {\n Connection = connection,\n Endpoint = \"https://example.com\",\n Description = \"Calling example.com with API key x-api-key\"\n});\n\nRule rule = new Rule(this, \"Rule\", new RuleProps {\n Schedule = Schedule.Rate(Duration.Minutes(1)),\n Targets = new [] { new ApiDestination(destination) }\n});",
537 "version": "1"
538 },
539 "java": {
540 "source": "Connection connection = Connection.Builder.create(this, \"Connection\")\n .authorization(Authorization.apiKey(\"x-api-key\", SecretValue.secretsManager(\"ApiSecretName\")))\n .description(\"Connection with API Key x-api-key\")\n .build();\n\nApiDestination destination = ApiDestination.Builder.create(this, \"Destination\")\n .connection(connection)\n .endpoint(\"https://example.com\")\n .description(\"Calling example.com with API key x-api-key\")\n .build();\n\nRule rule = Rule.Builder.create(this, \"Rule\")\n .schedule(Schedule.rate(Duration.minutes(1)))\n .targets(List.of(new ApiDestination(destination)))\n .build();",
541 "version": "1"
542 },
543 "go": {
544 "source": "connection := events.NewConnection(this, jsii.String(\"Connection\"), &connectionProps{\n\tauthorization: events.authorization.apiKey(jsii.String(\"x-api-key\"), secretValue.secretsManager(jsii.String(\"ApiSecretName\"))),\n\tdescription: jsii.String(\"Connection with API Key x-api-key\"),\n})\n\ndestination := events.NewApiDestination(this, jsii.String(\"Destination\"), &apiDestinationProps{\n\tconnection: connection,\n\tendpoint: jsii.String(\"https://example.com\"),\n\tdescription: jsii.String(\"Calling example.com with API key x-api-key\"),\n})\n\nrule := events.NewRule(this, jsii.String(\"Rule\"), &ruleProps{\n\tschedule: events.schedule.rate(cdk.duration.minutes(jsii.Number(1))),\n\ttargets: []iRuleTarget{\n\t\ttargets.NewApiDestination(destination),\n\t},\n})",
545 "version": "1"
546 },
547 "$": {
548 "source": "const connection = new events.Connection(this, 'Connection', {\n authorization: events.Authorization.apiKey('x-api-key', SecretValue.secretsManager('ApiSecretName')),\n description: 'Connection with API Key x-api-key',\n});\n\nconst destination = new events.ApiDestination(this, 'Destination', {\n connection,\n endpoint: 'https://example.com',\n description: 'Calling example.com with API key x-api-key',\n});\n\nconst rule = new events.Rule(this, 'Rule', {\n schedule: events.Schedule.rate(cdk.Duration.minutes(1)),\n targets: [new targets.ApiDestination(destination)],\n});",
549 "version": "0"
550 }
551 },
552 "location": {
553 "api": {
554 "api": "type",
555 "fqn": "@aws-cdk/aws-events.ApiDestination"
556 },
557 "field": {
558 "field": "example"
559 }
560 },
561 "didCompile": true,
562 "fqnsReferenced": [
563 "@aws-cdk/aws-events-targets.ApiDestination",
564 "@aws-cdk/aws-events.ApiDestination",
565 "@aws-cdk/aws-events.ApiDestinationProps",
566 "@aws-cdk/aws-events.Authorization",
567 "@aws-cdk/aws-events.Authorization#apiKey",
568 "@aws-cdk/aws-events.Connection",
569 "@aws-cdk/aws-events.ConnectionProps",
570 "@aws-cdk/aws-events.IApiDestination",
571 "@aws-cdk/aws-events.IConnection",
572 "@aws-cdk/aws-events.Rule",
573 "@aws-cdk/aws-events.RuleProps",
574 "@aws-cdk/aws-events.Schedule",
575 "@aws-cdk/aws-events.Schedule#rate",
576 "@aws-cdk/core.Duration",
577 "@aws-cdk/core.Duration#minutes",
578 "@aws-cdk/core.SecretValue",
579 "@aws-cdk/core.SecretValue#secretsManager",
580 "constructs.Construct"
581 ],
582 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Duration, RemovalPolicy, SecretValue, Stack } from '@aws-cdk/core';\nimport { Construct } from 'constructs';\n\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as events from '@aws-cdk/aws-events';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as cdk from '@aws-cdk/core';\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 connection = new events.Connection(this, 'Connection', {\n authorization: events.Authorization.apiKey('x-api-key', SecretValue.secretsManager('ApiSecretName')),\n description: 'Connection with API Key x-api-key',\n});\n\nconst destination = new events.ApiDestination(this, 'Destination', {\n connection,\n endpoint: 'https://example.com',\n description: 'Calling example.com with API key x-api-key',\n});\n\nconst rule = new events.Rule(this, 'Rule', {\n schedule: events.Schedule.rate(cdk.Duration.minutes(1)),\n targets: [new targets.ApiDestination(destination)],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
583 "syntaxKindCounter": {
584 "8": 1,
585 "10": 8,
586 "75": 30,
587 "104": 3,
588 "192": 1,
589 "193": 3,
590 "194": 11,
591 "196": 4,
592 "197": 4,
593 "225": 3,
594 "242": 3,
595 "243": 3,
596 "281": 6,
597 "282": 1
598 },
599 "fqnsFingerprint": "d2c56457bed24a5a332230dfd2303263bf2a0e23e167544d086fc2ba69a24328"
600 },
601 "c8275deddeed5cd49edb8c21a818c2b3d1bd40389befb97dd8166e2ccb80f9f4": {
602 "translations": {
603 "python": {
604 "source": "connection = events.Connection(self, \"Connection\",\n authorization=events.Authorization.api_key(\"x-api-key\", SecretValue.secrets_manager(\"ApiSecretName\")),\n description=\"Connection with API Key x-api-key\"\n)\n\ndestination = events.ApiDestination(self, \"Destination\",\n connection=connection,\n endpoint=\"https://example.com\",\n description=\"Calling example.com with API key x-api-key\"\n)\n\nrule = events.Rule(self, \"Rule\",\n schedule=events.Schedule.rate(cdk.Duration.minutes(1)),\n targets=[targets.ApiDestination(destination)]\n)",
605 "version": "2"
606 },
607 "csharp": {
608 "source": "Connection connection = new Connection(this, \"Connection\", new ConnectionProps {\n Authorization = Authorization.ApiKey(\"x-api-key\", SecretValue.SecretsManager(\"ApiSecretName\")),\n Description = \"Connection with API Key x-api-key\"\n});\n\nApiDestination destination = new ApiDestination(this, \"Destination\", new ApiDestinationProps {\n Connection = connection,\n Endpoint = \"https://example.com\",\n Description = \"Calling example.com with API key x-api-key\"\n});\n\nRule rule = new Rule(this, \"Rule\", new RuleProps {\n Schedule = Schedule.Rate(Duration.Minutes(1)),\n Targets = new [] { new ApiDestination(destination) }\n});",
609 "version": "1"
610 },
611 "java": {
612 "source": "Connection connection = Connection.Builder.create(this, \"Connection\")\n .authorization(Authorization.apiKey(\"x-api-key\", SecretValue.secretsManager(\"ApiSecretName\")))\n .description(\"Connection with API Key x-api-key\")\n .build();\n\nApiDestination destination = ApiDestination.Builder.create(this, \"Destination\")\n .connection(connection)\n .endpoint(\"https://example.com\")\n .description(\"Calling example.com with API key x-api-key\")\n .build();\n\nRule rule = Rule.Builder.create(this, \"Rule\")\n .schedule(Schedule.rate(Duration.minutes(1)))\n .targets(List.of(new ApiDestination(destination)))\n .build();",
613 "version": "1"
614 },
615 "go": {
616 "source": "connection := events.NewConnection(this, jsii.String(\"Connection\"), &connectionProps{\n\tauthorization: events.authorization.apiKey(jsii.String(\"x-api-key\"), secretValue.secretsManager(jsii.String(\"ApiSecretName\"))),\n\tdescription: jsii.String(\"Connection with API Key x-api-key\"),\n})\n\ndestination := events.NewApiDestination(this, jsii.String(\"Destination\"), &apiDestinationProps{\n\tconnection: connection,\n\tendpoint: jsii.String(\"https://example.com\"),\n\tdescription: jsii.String(\"Calling example.com with API key x-api-key\"),\n})\n\nrule := events.NewRule(this, jsii.String(\"Rule\"), &ruleProps{\n\tschedule: events.schedule.rate(cdk.duration.minutes(jsii.Number(1))),\n\ttargets: []iRuleTarget{\n\t\ttargets.NewApiDestination(destination),\n\t},\n})",
617 "version": "1"
618 },
619 "$": {
620 "source": "const connection = new events.Connection(this, 'Connection', {\n authorization: events.Authorization.apiKey('x-api-key', SecretValue.secretsManager('ApiSecretName')),\n description: 'Connection with API Key x-api-key',\n});\n\nconst destination = new events.ApiDestination(this, 'Destination', {\n connection,\n endpoint: 'https://example.com',\n description: 'Calling example.com with API key x-api-key',\n});\n\nconst rule = new events.Rule(this, 'Rule', {\n schedule: events.Schedule.rate(cdk.Duration.minutes(1)),\n targets: [new targets.ApiDestination(destination)],\n});",
621 "version": "0"
622 }
623 },
624 "location": {
625 "api": {
626 "api": "type",
627 "fqn": "@aws-cdk/aws-events.ApiDestinationProps"
628 },
629 "field": {
630 "field": "example"
631 }
632 },
633 "didCompile": true,
634 "fqnsReferenced": [
635 "@aws-cdk/aws-events-targets.ApiDestination",
636 "@aws-cdk/aws-events.ApiDestination",
637 "@aws-cdk/aws-events.ApiDestinationProps",
638 "@aws-cdk/aws-events.Authorization",
639 "@aws-cdk/aws-events.Authorization#apiKey",
640 "@aws-cdk/aws-events.Connection",
641 "@aws-cdk/aws-events.ConnectionProps",
642 "@aws-cdk/aws-events.IApiDestination",
643 "@aws-cdk/aws-events.IConnection",
644 "@aws-cdk/aws-events.Rule",
645 "@aws-cdk/aws-events.RuleProps",
646 "@aws-cdk/aws-events.Schedule",
647 "@aws-cdk/aws-events.Schedule#rate",
648 "@aws-cdk/core.Duration",
649 "@aws-cdk/core.Duration#minutes",
650 "@aws-cdk/core.SecretValue",
651 "@aws-cdk/core.SecretValue#secretsManager",
652 "constructs.Construct"
653 ],
654 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Duration, RemovalPolicy, SecretValue, Stack } from '@aws-cdk/core';\nimport { Construct } from 'constructs';\n\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as events from '@aws-cdk/aws-events';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as cdk from '@aws-cdk/core';\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 connection = new events.Connection(this, 'Connection', {\n authorization: events.Authorization.apiKey('x-api-key', SecretValue.secretsManager('ApiSecretName')),\n description: 'Connection with API Key x-api-key',\n});\n\nconst destination = new events.ApiDestination(this, 'Destination', {\n connection,\n endpoint: 'https://example.com',\n description: 'Calling example.com with API key x-api-key',\n});\n\nconst rule = new events.Rule(this, 'Rule', {\n schedule: events.Schedule.rate(cdk.Duration.minutes(1)),\n targets: [new targets.ApiDestination(destination)],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
655 "syntaxKindCounter": {
656 "8": 1,
657 "10": 8,
658 "75": 30,
659 "104": 3,
660 "192": 1,
661 "193": 3,
662 "194": 11,
663 "196": 4,
664 "197": 4,
665 "225": 3,
666 "242": 3,
667 "243": 3,
668 "281": 6,
669 "282": 1
670 },
671 "fqnsFingerprint": "d2c56457bed24a5a332230dfd2303263bf2a0e23e167544d086fc2ba69a24328"
672 },
673 "3bfa4880a9c7066e6c40c8a52777eb616b63d2a331c6d5960ae5081f2f8d43af": {
674 "translations": {
675 "python": {
676 "source": "# The code below shows an example of how to instantiate this type.\n# The values are placeholders you should change.\nimport aws_cdk.aws_events as events\nimport aws_cdk.core as cdk\n\n# detail: Any\n# event_bus: events.EventBus\n\narchive = events.Archive(self, \"MyArchive\",\n event_pattern=events.EventPattern(\n account=[\"account\"],\n detail={\n \"detail_key\": detail\n },\n detail_type=[\"detailType\"],\n id=[\"id\"],\n region=[\"region\"],\n resources=[\"resources\"],\n source=[\"source\"],\n time=[\"time\"],\n version=[\"version\"]\n ),\n source_event_bus=event_bus,\n\n # the properties below are optional\n archive_name=\"archiveName\",\n description=\"description\",\n retention=cdk.Duration.minutes(30)\n)",
677 "version": "2"
678 },
679 "csharp": {
680 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nusing Amazon.CDK.AWS.Events;\nusing Amazon.CDK;\n\nvar detail;\nEventBus eventBus;\nArchive archive = new Archive(this, \"MyArchive\", new ArchiveProps {\n EventPattern = new EventPattern {\n Account = new [] { \"account\" },\n Detail = new Dictionary<string, object> {\n { \"detailKey\", detail }\n },\n DetailType = new [] { \"detailType\" },\n Id = new [] { \"id\" },\n Region = new [] { \"region\" },\n Resources = new [] { \"resources\" },\n Source = new [] { \"source\" },\n Time = new [] { \"time\" },\n Version = new [] { \"version\" }\n },\n SourceEventBus = eventBus,\n\n // the properties below are optional\n ArchiveName = \"archiveName\",\n Description = \"description\",\n Retention = Duration.Minutes(30)\n});",
681 "version": "1"
682 },
683 "java": {
684 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport software.amazon.awscdk.services.events.*;\nimport software.amazon.awscdk.core.*;\n\nObject detail;\nEventBus eventBus;\n\nArchive archive = Archive.Builder.create(this, \"MyArchive\")\n .eventPattern(EventPattern.builder()\n .account(List.of(\"account\"))\n .detail(Map.of(\n \"detailKey\", detail))\n .detailType(List.of(\"detailType\"))\n .id(List.of(\"id\"))\n .region(List.of(\"region\"))\n .resources(List.of(\"resources\"))\n .source(List.of(\"source\"))\n .time(List.of(\"time\"))\n .version(List.of(\"version\"))\n .build())\n .sourceEventBus(eventBus)\n\n // the properties below are optional\n .archiveName(\"archiveName\")\n .description(\"description\")\n .retention(Duration.minutes(30))\n .build();",
685 "version": "1"
686 },
687 "go": {
688 "source": "import events \"github.com/aws-samples/dummy/awscdkawsevents\"import cdk \"github.com/aws-samples/dummy/awscdkcore\"\n\nvar detail interface{}\nvar eventBus eventBus\narchive := events.NewArchive(this, jsii.String(\"MyArchive\"), &archiveProps{\n\teventPattern: &eventPattern{\n\t\taccount: []*string{\n\t\t\tjsii.String(\"account\"),\n\t\t},\n\t\tdetail: map[string]interface{}{\n\t\t\t\"detailKey\": detail,\n\t\t},\n\t\tdetailType: []*string{\n\t\t\tjsii.String(\"detailType\"),\n\t\t},\n\t\tid: []*string{\n\t\t\tjsii.String(\"id\"),\n\t\t},\n\t\tregion: []*string{\n\t\t\tjsii.String(\"region\"),\n\t\t},\n\t\tresources: []*string{\n\t\t\tjsii.String(\"resources\"),\n\t\t},\n\t\tsource: []*string{\n\t\t\tjsii.String(\"source\"),\n\t\t},\n\t\ttime: []*string{\n\t\t\tjsii.String(\"time\"),\n\t\t},\n\t\tversion: []*string{\n\t\t\tjsii.String(\"version\"),\n\t\t},\n\t},\n\tsourceEventBus: eventBus,\n\n\t// the properties below are optional\n\tarchiveName: jsii.String(\"archiveName\"),\n\tdescription: jsii.String(\"description\"),\n\tretention: cdk.duration.minutes(jsii.Number(30)),\n})",
689 "version": "1"
690 },
691 "$": {
692 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as events from '@aws-cdk/aws-events';\nimport * as cdk from '@aws-cdk/core';\n\ndeclare const detail: any;\ndeclare const eventBus: events.EventBus;\nconst archive = new events.Archive(this, 'MyArchive', {\n eventPattern: {\n account: ['account'],\n detail: {\n detailKey: detail,\n },\n detailType: ['detailType'],\n id: ['id'],\n region: ['region'],\n resources: ['resources'],\n source: ['source'],\n time: ['time'],\n version: ['version'],\n },\n sourceEventBus: eventBus,\n\n // the properties below are optional\n archiveName: 'archiveName',\n description: 'description',\n retention: cdk.Duration.minutes(30),\n});",
693 "version": "0"
694 }
695 },
696 "location": {
697 "api": {
698 "api": "type",
699 "fqn": "@aws-cdk/aws-events.Archive"
700 },
701 "field": {
702 "field": "example"
703 }
704 },
705 "didCompile": true,
706 "fqnsReferenced": [
707 "@aws-cdk/aws-events.Archive",
708 "@aws-cdk/aws-events.ArchiveProps",
709 "@aws-cdk/aws-events.EventPattern",
710 "@aws-cdk/aws-events.IEventBus",
711 "@aws-cdk/core.Duration",
712 "@aws-cdk/core.Duration#minutes",
713 "constructs.Construct"
714 ],
715 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\n// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as events from '@aws-cdk/aws-events';\nimport * as cdk from '@aws-cdk/core';\n\ndeclare const detail: any;\ndeclare const eventBus: events.EventBus;\n/// !hide\n// Hoisted imports ended before !hide marker above\nimport { Construct } from \"@aws-cdk/core\";\nclass MyConstruct extends Construct {\nconstructor(scope: Construct, id: string) {\nsuper(scope, id);\n// Code snippet begins after !show marker below\n/// !show\n\nconst archive = new events.Archive(this, 'MyArchive', {\n eventPattern: {\n account: ['account'],\n detail: {\n detailKey: detail,\n },\n detailType: ['detailType'],\n id: ['id'],\n region: ['region'],\n resources: ['resources'],\n source: ['source'],\n time: ['time'],\n version: ['version'],\n },\n sourceEventBus: eventBus,\n\n // the properties below are optional\n archiveName: 'archiveName',\n description: 'description',\n retention: cdk.Duration.minutes(30),\n});\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
716 "syntaxKindCounter": {
717 "8": 1,
718 "10": 13,
719 "75": 29,
720 "104": 1,
721 "125": 1,
722 "130": 2,
723 "153": 1,
724 "169": 1,
725 "192": 8,
726 "193": 3,
727 "194": 3,
728 "196": 1,
729 "197": 1,
730 "225": 3,
731 "242": 3,
732 "243": 3,
733 "254": 2,
734 "255": 2,
735 "256": 2,
736 "281": 15,
737 "290": 1
738 },
739 "fqnsFingerprint": "9e5d7d2ecf1da652d5cfd80939e175c3e06664bc53dde30279901cafda14007c"
740 },
741 "a0af5e04f438e5dd410292fb3f633daa1025f388fadc456653778cda58bc8174": {
742 "translations": {
743 "python": {
744 "source": "# The code below shows an example of how to instantiate this type.\n# The values are placeholders you should change.\nimport aws_cdk.aws_events as events\nimport aws_cdk.core as cdk\n\n# detail: Any\n# event_bus: events.EventBus\n\narchive_props = events.ArchiveProps(\n event_pattern=events.EventPattern(\n account=[\"account\"],\n detail={\n \"detail_key\": detail\n },\n detail_type=[\"detailType\"],\n id=[\"id\"],\n region=[\"region\"],\n resources=[\"resources\"],\n source=[\"source\"],\n time=[\"time\"],\n version=[\"version\"]\n ),\n source_event_bus=event_bus,\n\n # the properties below are optional\n archive_name=\"archiveName\",\n description=\"description\",\n retention=cdk.Duration.minutes(30)\n)",
745 "version": "2"
746 },
747 "csharp": {
748 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nusing Amazon.CDK.AWS.Events;\nusing Amazon.CDK;\n\nvar detail;\nEventBus eventBus;\nArchiveProps archiveProps = new ArchiveProps {\n EventPattern = new EventPattern {\n Account = new [] { \"account\" },\n Detail = new Dictionary<string, object> {\n { \"detailKey\", detail }\n },\n DetailType = new [] { \"detailType\" },\n Id = new [] { \"id\" },\n Region = new [] { \"region\" },\n Resources = new [] { \"resources\" },\n Source = new [] { \"source\" },\n Time = new [] { \"time\" },\n Version = new [] { \"version\" }\n },\n SourceEventBus = eventBus,\n\n // the properties below are optional\n ArchiveName = \"archiveName\",\n Description = \"description\",\n Retention = Duration.Minutes(30)\n};",
749 "version": "1"
750 },
751 "java": {
752 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport software.amazon.awscdk.services.events.*;\nimport software.amazon.awscdk.core.*;\n\nObject detail;\nEventBus eventBus;\n\nArchiveProps archiveProps = ArchiveProps.builder()\n .eventPattern(EventPattern.builder()\n .account(List.of(\"account\"))\n .detail(Map.of(\n \"detailKey\", detail))\n .detailType(List.of(\"detailType\"))\n .id(List.of(\"id\"))\n .region(List.of(\"region\"))\n .resources(List.of(\"resources\"))\n .source(List.of(\"source\"))\n .time(List.of(\"time\"))\n .version(List.of(\"version\"))\n .build())\n .sourceEventBus(eventBus)\n\n // the properties below are optional\n .archiveName(\"archiveName\")\n .description(\"description\")\n .retention(Duration.minutes(30))\n .build();",
753 "version": "1"
754 },
755 "go": {
756 "source": "import events \"github.com/aws-samples/dummy/awscdkawsevents\"import cdk \"github.com/aws-samples/dummy/awscdkcore\"\n\nvar detail interface{}\nvar eventBus eventBus\narchiveProps := &archiveProps{\n\teventPattern: &eventPattern{\n\t\taccount: []*string{\n\t\t\tjsii.String(\"account\"),\n\t\t},\n\t\tdetail: map[string]interface{}{\n\t\t\t\"detailKey\": detail,\n\t\t},\n\t\tdetailType: []*string{\n\t\t\tjsii.String(\"detailType\"),\n\t\t},\n\t\tid: []*string{\n\t\t\tjsii.String(\"id\"),\n\t\t},\n\t\tregion: []*string{\n\t\t\tjsii.String(\"region\"),\n\t\t},\n\t\tresources: []*string{\n\t\t\tjsii.String(\"resources\"),\n\t\t},\n\t\tsource: []*string{\n\t\t\tjsii.String(\"source\"),\n\t\t},\n\t\ttime: []*string{\n\t\t\tjsii.String(\"time\"),\n\t\t},\n\t\tversion: []*string{\n\t\t\tjsii.String(\"version\"),\n\t\t},\n\t},\n\tsourceEventBus: eventBus,\n\n\t// the properties below are optional\n\tarchiveName: jsii.String(\"archiveName\"),\n\tdescription: jsii.String(\"description\"),\n\tretention: cdk.duration.minutes(jsii.Number(30)),\n}",
757 "version": "1"
758 },
759 "$": {
760 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as events from '@aws-cdk/aws-events';\nimport * as cdk from '@aws-cdk/core';\n\ndeclare const detail: any;\ndeclare const eventBus: events.EventBus;\nconst archiveProps: events.ArchiveProps = {\n eventPattern: {\n account: ['account'],\n detail: {\n detailKey: detail,\n },\n detailType: ['detailType'],\n id: ['id'],\n region: ['region'],\n resources: ['resources'],\n source: ['source'],\n time: ['time'],\n version: ['version'],\n },\n sourceEventBus: eventBus,\n\n // the properties below are optional\n archiveName: 'archiveName',\n description: 'description',\n retention: cdk.Duration.minutes(30),\n};",
761 "version": "0"
762 }
763 },
764 "location": {
765 "api": {
766 "api": "type",
767 "fqn": "@aws-cdk/aws-events.ArchiveProps"
768 },
769 "field": {
770 "field": "example"
771 }
772 },
773 "didCompile": true,
774 "fqnsReferenced": [
775 "@aws-cdk/aws-events.ArchiveProps",
776 "@aws-cdk/aws-events.EventPattern",
777 "@aws-cdk/aws-events.IEventBus",
778 "@aws-cdk/core.Duration",
779 "@aws-cdk/core.Duration#minutes"
780 ],
781 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\n// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as events from '@aws-cdk/aws-events';\nimport * as cdk from '@aws-cdk/core';\n\ndeclare const detail: any;\ndeclare const eventBus: events.EventBus;\n/// !hide\n// Hoisted imports ended before !hide marker above\nimport { Construct } from \"@aws-cdk/core\";\nclass MyConstruct extends Construct {\nconstructor(scope: Construct, id: string) {\nsuper(scope, id);\n// Code snippet begins after !show marker below\n/// !show\n\nconst archiveProps: events.ArchiveProps = {\n eventPattern: {\n account: ['account'],\n detail: {\n detailKey: detail,\n },\n detailType: ['detailType'],\n id: ['id'],\n region: ['region'],\n resources: ['resources'],\n source: ['source'],\n time: ['time'],\n version: ['version'],\n },\n sourceEventBus: eventBus,\n\n // the properties below are optional\n archiveName: 'archiveName',\n description: 'description',\n retention: cdk.Duration.minutes(30),\n};\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
782 "syntaxKindCounter": {
783 "8": 1,
784 "10": 12,
785 "75": 29,
786 "125": 1,
787 "130": 2,
788 "153": 2,
789 "169": 2,
790 "192": 8,
791 "193": 3,
792 "194": 2,
793 "196": 1,
794 "225": 3,
795 "242": 3,
796 "243": 3,
797 "254": 2,
798 "255": 2,
799 "256": 2,
800 "281": 15,
801 "290": 1
802 },
803 "fqnsFingerprint": "6d7d1962a881d005a96fce23cdf32f8163f1c3345e88378d8242f6d5007e5be0"
804 },
805 "ce2adb2aa227db55bb22760520af285c5cfdb3c16bc6680748537d660d8ec485": {
806 "translations": {
807 "python": {
808 "source": "connection = events.Connection(self, \"Connection\",\n authorization=events.Authorization.api_key(\"x-api-key\", SecretValue.secrets_manager(\"ApiSecretName\")),\n description=\"Connection with API Key x-api-key\"\n)\n\ndestination = events.ApiDestination(self, \"Destination\",\n connection=connection,\n endpoint=\"https://example.com\",\n description=\"Calling example.com with API key x-api-key\"\n)\n\nrule = events.Rule(self, \"Rule\",\n schedule=events.Schedule.rate(cdk.Duration.minutes(1)),\n targets=[targets.ApiDestination(destination)]\n)",
809 "version": "2"
810 },
811 "csharp": {
812 "source": "Connection connection = new Connection(this, \"Connection\", new ConnectionProps {\n Authorization = Authorization.ApiKey(\"x-api-key\", SecretValue.SecretsManager(\"ApiSecretName\")),\n Description = \"Connection with API Key x-api-key\"\n});\n\nApiDestination destination = new ApiDestination(this, \"Destination\", new ApiDestinationProps {\n Connection = connection,\n Endpoint = \"https://example.com\",\n Description = \"Calling example.com with API key x-api-key\"\n});\n\nRule rule = new Rule(this, \"Rule\", new RuleProps {\n Schedule = Schedule.Rate(Duration.Minutes(1)),\n Targets = new [] { new ApiDestination(destination) }\n});",
813 "version": "1"
814 },
815 "java": {
816 "source": "Connection connection = Connection.Builder.create(this, \"Connection\")\n .authorization(Authorization.apiKey(\"x-api-key\", SecretValue.secretsManager(\"ApiSecretName\")))\n .description(\"Connection with API Key x-api-key\")\n .build();\n\nApiDestination destination = ApiDestination.Builder.create(this, \"Destination\")\n .connection(connection)\n .endpoint(\"https://example.com\")\n .description(\"Calling example.com with API key x-api-key\")\n .build();\n\nRule rule = Rule.Builder.create(this, \"Rule\")\n .schedule(Schedule.rate(Duration.minutes(1)))\n .targets(List.of(new ApiDestination(destination)))\n .build();",
817 "version": "1"
818 },
819 "go": {
820 "source": "connection := events.NewConnection(this, jsii.String(\"Connection\"), &connectionProps{\n\tauthorization: events.authorization.apiKey(jsii.String(\"x-api-key\"), secretValue.secretsManager(jsii.String(\"ApiSecretName\"))),\n\tdescription: jsii.String(\"Connection with API Key x-api-key\"),\n})\n\ndestination := events.NewApiDestination(this, jsii.String(\"Destination\"), &apiDestinationProps{\n\tconnection: connection,\n\tendpoint: jsii.String(\"https://example.com\"),\n\tdescription: jsii.String(\"Calling example.com with API key x-api-key\"),\n})\n\nrule := events.NewRule(this, jsii.String(\"Rule\"), &ruleProps{\n\tschedule: events.schedule.rate(cdk.duration.minutes(jsii.Number(1))),\n\ttargets: []iRuleTarget{\n\t\ttargets.NewApiDestination(destination),\n\t},\n})",
821 "version": "1"
822 },
823 "$": {
824 "source": "const connection = new events.Connection(this, 'Connection', {\n authorization: events.Authorization.apiKey('x-api-key', SecretValue.secretsManager('ApiSecretName')),\n description: 'Connection with API Key x-api-key',\n});\n\nconst destination = new events.ApiDestination(this, 'Destination', {\n connection,\n endpoint: 'https://example.com',\n description: 'Calling example.com with API key x-api-key',\n});\n\nconst rule = new events.Rule(this, 'Rule', {\n schedule: events.Schedule.rate(cdk.Duration.minutes(1)),\n targets: [new targets.ApiDestination(destination)],\n});",
825 "version": "0"
826 }
827 },
828 "location": {
829 "api": {
830 "api": "type",
831 "fqn": "@aws-cdk/aws-events.Authorization"
832 },
833 "field": {
834 "field": "example"
835 }
836 },
837 "didCompile": true,
838 "fqnsReferenced": [
839 "@aws-cdk/aws-events-targets.ApiDestination",
840 "@aws-cdk/aws-events.ApiDestination",
841 "@aws-cdk/aws-events.ApiDestinationProps",
842 "@aws-cdk/aws-events.Authorization",
843 "@aws-cdk/aws-events.Authorization#apiKey",
844 "@aws-cdk/aws-events.Connection",
845 "@aws-cdk/aws-events.ConnectionProps",
846 "@aws-cdk/aws-events.IApiDestination",
847 "@aws-cdk/aws-events.IConnection",
848 "@aws-cdk/aws-events.Rule",
849 "@aws-cdk/aws-events.RuleProps",
850 "@aws-cdk/aws-events.Schedule",
851 "@aws-cdk/aws-events.Schedule#rate",
852 "@aws-cdk/core.Duration",
853 "@aws-cdk/core.Duration#minutes",
854 "@aws-cdk/core.SecretValue",
855 "@aws-cdk/core.SecretValue#secretsManager",
856 "constructs.Construct"
857 ],
858 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Duration, RemovalPolicy, SecretValue, Stack } from '@aws-cdk/core';\nimport { Construct } from 'constructs';\n\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as events from '@aws-cdk/aws-events';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as cdk from '@aws-cdk/core';\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 connection = new events.Connection(this, 'Connection', {\n authorization: events.Authorization.apiKey('x-api-key', SecretValue.secretsManager('ApiSecretName')),\n description: 'Connection with API Key x-api-key',\n});\n\nconst destination = new events.ApiDestination(this, 'Destination', {\n connection,\n endpoint: 'https://example.com',\n description: 'Calling example.com with API key x-api-key',\n});\n\nconst rule = new events.Rule(this, 'Rule', {\n schedule: events.Schedule.rate(cdk.Duration.minutes(1)),\n targets: [new targets.ApiDestination(destination)],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
859 "syntaxKindCounter": {
860 "8": 1,
861 "10": 8,
862 "75": 30,
863 "104": 3,
864 "192": 1,
865 "193": 3,
866 "194": 11,
867 "196": 4,
868 "197": 4,
869 "225": 3,
870 "242": 3,
871 "243": 3,
872 "281": 6,
873 "282": 1
874 },
875 "fqnsFingerprint": "d2c56457bed24a5a332230dfd2303263bf2a0e23e167544d086fc2ba69a24328"
876 },
877 "4b70a6d11a76731ce19aaf470539ae2cc2512ff10d725afd93db88294d7b4694": {
878 "translations": {
879 "python": {
880 "source": "bus = events.EventBus(self, \"bus\",\n event_bus_name=\"MyCustomEventBus\"\n)\n\nbus.archive(\"MyArchive\",\n archive_name=\"MyCustomEventBusArchive\",\n description=\"MyCustomerEventBus Archive\",\n event_pattern=events.EventPattern(\n account=[Stack.of(self).account]\n ),\n retention=Duration.days(365)\n)",
881 "version": "2"
882 },
883 "csharp": {
884 "source": "EventBus bus = new EventBus(this, \"bus\", new EventBusProps {\n EventBusName = \"MyCustomEventBus\"\n});\n\nbus.Archive(\"MyArchive\", new BaseArchiveProps {\n ArchiveName = \"MyCustomEventBusArchive\",\n Description = \"MyCustomerEventBus Archive\",\n EventPattern = new EventPattern {\n Account = new [] { Stack.Of(this).Account }\n },\n Retention = Duration.Days(365)\n});",
885 "version": "1"
886 },
887 "java": {
888 "source": "EventBus bus = EventBus.Builder.create(this, \"bus\")\n .eventBusName(\"MyCustomEventBus\")\n .build();\n\nbus.archive(\"MyArchive\", BaseArchiveProps.builder()\n .archiveName(\"MyCustomEventBusArchive\")\n .description(\"MyCustomerEventBus Archive\")\n .eventPattern(EventPattern.builder()\n .account(List.of(Stack.of(this).getAccount()))\n .build())\n .retention(Duration.days(365))\n .build());",
889 "version": "1"
890 },
891 "go": {
892 "source": "bus := events.NewEventBus(this, jsii.String(\"bus\"), &eventBusProps{\n\teventBusName: jsii.String(\"MyCustomEventBus\"),\n})\n\nbus.archive(jsii.String(\"MyArchive\"), &baseArchiveProps{\n\tarchiveName: jsii.String(\"MyCustomEventBusArchive\"),\n\tdescription: jsii.String(\"MyCustomerEventBus Archive\"),\n\teventPattern: &eventPattern{\n\t\taccount: []*string{\n\t\t\t*stack.of(this).account,\n\t\t},\n\t},\n\tretention: duration.days(jsii.Number(365)),\n})",
893 "version": "1"
894 },
895 "$": {
896 "source": "const bus = new events.EventBus(this, 'bus', {\n eventBusName: 'MyCustomEventBus'\n});\n\nbus.archive('MyArchive', {\n archiveName: 'MyCustomEventBusArchive',\n description: 'MyCustomerEventBus Archive',\n eventPattern: {\n account: [Stack.of(this).account],\n },\n retention: Duration.days(365),\n});",
897 "version": "0"
898 }
899 },
900 "location": {
901 "api": {
902 "api": "type",
903 "fqn": "@aws-cdk/aws-events.BaseArchiveProps"
904 },
905 "field": {
906 "field": "example"
907 }
908 },
909 "didCompile": true,
910 "fqnsReferenced": [
911 "@aws-cdk/aws-events.BaseArchiveProps",
912 "@aws-cdk/aws-events.EventBus",
913 "@aws-cdk/aws-events.EventBusProps",
914 "@aws-cdk/aws-events.EventPattern",
915 "@aws-cdk/core.Duration",
916 "@aws-cdk/core.Duration#days",
917 "@aws-cdk/core.Stack#account",
918 "@aws-cdk/core.Stack#of",
919 "constructs.Construct",
920 "constructs.IConstruct"
921 ],
922 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as events from '@aws-cdk/aws-events';\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as ecs from '@aws-cdk/aws-ecs';\nimport * as iam from '@aws-cdk/aws-iam';\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 bus = new events.EventBus(this, 'bus', {\n eventBusName: 'MyCustomEventBus'\n});\n\nbus.archive('MyArchive', {\n archiveName: 'MyCustomEventBusArchive',\n description: 'MyCustomerEventBus Archive',\n eventPattern: {\n account: [Stack.of(this).account],\n },\n retention: Duration.days(365),\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
923 "syntaxKindCounter": {
924 "8": 1,
925 "10": 5,
926 "75": 16,
927 "104": 2,
928 "192": 1,
929 "193": 3,
930 "194": 5,
931 "196": 3,
932 "197": 1,
933 "225": 1,
934 "226": 1,
935 "242": 1,
936 "243": 1,
937 "281": 6
938 },
939 "fqnsFingerprint": "8a370448c8850f9d3bf4b97e19e578ded327b3a3770acbff3aee6834ce814a3f"
940 },
941 "755a55b11e05b3fd795c0f9254821138adba078aa0fb1beda431140c5c52b70a": {
942 "translations": {
943 "python": {
944 "source": "# The code below shows an example of how to instantiate this type.\n# The values are placeholders you should change.\nimport aws_cdk.aws_events as events\n\ncfn_api_destination = events.CfnApiDestination(self, \"MyCfnApiDestination\",\n connection_arn=\"connectionArn\",\n http_method=\"httpMethod\",\n invocation_endpoint=\"invocationEndpoint\",\n\n # the properties below are optional\n description=\"description\",\n invocation_rate_limit_per_second=123,\n name=\"name\"\n)",
945 "version": "2"
946 },
947 "csharp": {
948 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nusing Amazon.CDK.AWS.Events;\n\nCfnApiDestination cfnApiDestination = new CfnApiDestination(this, \"MyCfnApiDestination\", new CfnApiDestinationProps {\n ConnectionArn = \"connectionArn\",\n HttpMethod = \"httpMethod\",\n InvocationEndpoint = \"invocationEndpoint\",\n\n // the properties below are optional\n Description = \"description\",\n InvocationRateLimitPerSecond = 123,\n Name = \"name\"\n});",
949 "version": "1"
950 },
951 "java": {
952 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport software.amazon.awscdk.services.events.*;\n\nCfnApiDestination cfnApiDestination = CfnApiDestination.Builder.create(this, \"MyCfnApiDestination\")\n .connectionArn(\"connectionArn\")\n .httpMethod(\"httpMethod\")\n .invocationEndpoint(\"invocationEndpoint\")\n\n // the properties below are optional\n .description(\"description\")\n .invocationRateLimitPerSecond(123)\n .name(\"name\")\n .build();",
953 "version": "1"
954 },
955 "go": {
956 "source": "import events \"github.com/aws-samples/dummy/awscdkawsevents\"\ncfnApiDestination := events.NewCfnApiDestination(this, jsii.String(\"MyCfnApiDestination\"), &cfnApiDestinationProps{\n\tconnectionArn: jsii.String(\"connectionArn\"),\n\thttpMethod: jsii.String(\"httpMethod\"),\n\tinvocationEndpoint: jsii.String(\"invocationEndpoint\"),\n\n\t// the properties below are optional\n\tdescription: jsii.String(\"description\"),\n\tinvocationRateLimitPerSecond: jsii.Number(123),\n\tname: jsii.String(\"name\"),\n})",
957 "version": "1"
958 },
959 "$": {
960 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as events from '@aws-cdk/aws-events';\nconst cfnApiDestination = new events.CfnApiDestination(this, 'MyCfnApiDestination', {\n connectionArn: 'connectionArn',\n httpMethod: 'httpMethod',\n invocationEndpoint: 'invocationEndpoint',\n\n // the properties below are optional\n description: 'description',\n invocationRateLimitPerSecond: 123,\n name: 'name',\n});",
961 "version": "0"
962 }
963 },
964 "location": {
965 "api": {
966 "api": "type",
967 "fqn": "@aws-cdk/aws-events.CfnApiDestination"
968 },
969 "field": {
970 "field": "example"
971 }
972 },
973 "didCompile": true,
974 "fqnsReferenced": [
975 "@aws-cdk/aws-events.CfnApiDestination",
976 "@aws-cdk/aws-events.CfnApiDestinationProps",
977 "@aws-cdk/core.Construct"
978 ],
979 "fullSource":