UNPKG

155 kBJSONView Raw
1{
2 "version": "2",
3 "toolVersion": "1.67.0",
4 "snippets": {
5 "11456e209c91165a7990453b66a26e73b2e291e1f8498a57dd5a6a4b74cd97fa": {
6 "translations": {
7 "python": {
8 "source": "topic = sns.Topic(self, \"Topic\",\n display_name=\"Customer subscription topic\"\n)",
9 "version": "2"
10 },
11 "csharp": {
12 "source": "Topic topic = new Topic(this, \"Topic\", new TopicProps {\n DisplayName = \"Customer subscription topic\"\n});",
13 "version": "1"
14 },
15 "java": {
16 "source": "Topic topic = Topic.Builder.create(this, \"Topic\")\n .displayName(\"Customer subscription topic\")\n .build();",
17 "version": "1"
18 },
19 "go": {
20 "source": "topic := sns.NewTopic(this, jsii.String(\"Topic\"), &topicProps{\n\tdisplayName: jsii.String(\"Customer subscription topic\"),\n})",
21 "version": "1"
22 },
23 "$": {
24 "source": "const topic = new sns.Topic(this, 'Topic', {\n displayName: 'Customer subscription topic',\n});",
25 "version": "0"
26 }
27 },
28 "location": {
29 "api": {
30 "api": "moduleReadme",
31 "moduleFqn": "@aws-cdk/aws-sns"
32 },
33 "field": {
34 "field": "markdown",
35 "line": 16
36 }
37 },
38 "didCompile": true,
39 "fqnsReferenced": [
40 "@aws-cdk/aws-sns.Topic",
41 "@aws-cdk/aws-sns.TopicProps",
42 "constructs.Construct"
43 ],
44 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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 topic = new sns.Topic(this, 'Topic', {\n displayName: 'Customer subscription topic',\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
45 "syntaxKindCounter": {
46 "10": 2,
47 "75": 4,
48 "104": 1,
49 "193": 1,
50 "194": 1,
51 "197": 1,
52 "225": 1,
53 "242": 1,
54 "243": 1,
55 "281": 1
56 },
57 "fqnsFingerprint": "c20fbd9a1b205c0f56879cb61a464afca81e8da74f8f2d6ce80b343365b776c5"
58 },
59 "63ea91479ea8eee3b4ae4e3d7442ae0bb6cdd57a67a6d6076e3ff174b66fbb9e": {
60 "translations": {
61 "python": {
62 "source": "topic = sns.Topic(self, \"Topic\",\n content_based_deduplication=True,\n display_name=\"Customer subscription topic\",\n fifo=True,\n topic_name=\"customerTopic\"\n)",
63 "version": "2"
64 },
65 "csharp": {
66 "source": "Topic topic = new Topic(this, \"Topic\", new TopicProps {\n ContentBasedDeduplication = true,\n DisplayName = \"Customer subscription topic\",\n Fifo = true,\n TopicName = \"customerTopic\"\n});",
67 "version": "1"
68 },
69 "java": {
70 "source": "Topic topic = Topic.Builder.create(this, \"Topic\")\n .contentBasedDeduplication(true)\n .displayName(\"Customer subscription topic\")\n .fifo(true)\n .topicName(\"customerTopic\")\n .build();",
71 "version": "1"
72 },
73 "go": {
74 "source": "topic := sns.NewTopic(this, jsii.String(\"Topic\"), &topicProps{\n\tcontentBasedDeduplication: jsii.Boolean(true),\n\tdisplayName: jsii.String(\"Customer subscription topic\"),\n\tfifo: jsii.Boolean(true),\n\ttopicName: jsii.String(\"customerTopic\"),\n})",
75 "version": "1"
76 },
77 "$": {
78 "source": "const topic = new sns.Topic(this, 'Topic', {\n contentBasedDeduplication: true,\n displayName: 'Customer subscription topic',\n fifo: true,\n topicName: 'customerTopic',\n});",
79 "version": "0"
80 }
81 },
82 "location": {
83 "api": {
84 "api": "moduleReadme",
85 "moduleFqn": "@aws-cdk/aws-sns"
86 },
87 "field": {
88 "field": "markdown",
89 "line": 24
90 }
91 },
92 "didCompile": true,
93 "fqnsReferenced": [
94 "@aws-cdk/aws-sns.Topic",
95 "@aws-cdk/aws-sns.TopicProps",
96 "constructs.Construct"
97 ],
98 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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 topic = new sns.Topic(this, 'Topic', {\n contentBasedDeduplication: true,\n displayName: 'Customer subscription topic',\n fifo: true,\n topicName: 'customerTopic',\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
99 "syntaxKindCounter": {
100 "10": 3,
101 "75": 7,
102 "104": 1,
103 "106": 2,
104 "193": 1,
105 "194": 1,
106 "197": 1,
107 "225": 1,
108 "242": 1,
109 "243": 1,
110 "281": 4
111 },
112 "fqnsFingerprint": "c20fbd9a1b205c0f56879cb61a464afca81e8da74f8f2d6ce80b343365b776c5"
113 },
114 "863f6bbdab734ea82c0e1e4cb0494383a9c3a95ffa62e7355b1a8e1199091878": {
115 "translations": {
116 "python": {
117 "source": "my_topic = sns.Topic(self, \"MyTopic\")\n\nmy_topic.add_subscription(subscriptions.UrlSubscription(\"https://foobar.com/\"))",
118 "version": "2"
119 },
120 "csharp": {
121 "source": "Topic myTopic = new Topic(this, \"MyTopic\");\n\nmyTopic.AddSubscription(new UrlSubscription(\"https://foobar.com/\"));",
122 "version": "1"
123 },
124 "java": {
125 "source": "Topic myTopic = new Topic(this, \"MyTopic\");\n\nmyTopic.addSubscription(new UrlSubscription(\"https://foobar.com/\"));",
126 "version": "1"
127 },
128 "go": {
129 "source": "myTopic := sns.NewTopic(this, jsii.String(\"MyTopic\"))\n\nmyTopic.addSubscription(subscriptions.NewUrlSubscription(jsii.String(\"https://foobar.com/\")))",
130 "version": "1"
131 },
132 "$": {
133 "source": "const myTopic = new sns.Topic(this, 'MyTopic');\n\nmyTopic.addSubscription(new subscriptions.UrlSubscription('https://foobar.com/'));",
134 "version": "0"
135 }
136 },
137 "location": {
138 "api": {
139 "api": "moduleReadme",
140 "moduleFqn": "@aws-cdk/aws-sns"
141 },
142 "field": {
143 "field": "markdown",
144 "line": 44
145 }
146 },
147 "didCompile": true,
148 "fqnsReferenced": [
149 "@aws-cdk/aws-sns-subscriptions.UrlSubscription",
150 "@aws-cdk/aws-sns.ITopicSubscription",
151 "@aws-cdk/aws-sns.Topic",
152 "@aws-cdk/aws-sns.TopicBase#addSubscription",
153 "constructs.Construct"
154 ],
155 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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 myTopic = new sns.Topic(this, 'MyTopic');\n\nmyTopic.addSubscription(new subscriptions.UrlSubscription('https://foobar.com/'));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
156 "syntaxKindCounter": {
157 "10": 2,
158 "75": 7,
159 "104": 1,
160 "194": 3,
161 "196": 1,
162 "197": 2,
163 "225": 1,
164 "226": 1,
165 "242": 1,
166 "243": 1
167 },
168 "fqnsFingerprint": "ff638095bad2d85bc46b14046c2e2854d61ab42f794b081409b46fc794c664f5"
169 },
170 "53fffb34c72a3672456f47381144f288c91679a869222644449ebd5174bc9653": {
171 "translations": {
172 "python": {
173 "source": "# queue: sqs.Queue\n\nmy_topic = sns.Topic(self, \"MyTopic\")\n\nmy_topic.add_subscription(subscriptions.SqsSubscription(queue))",
174 "version": "2"
175 },
176 "csharp": {
177 "source": "Queue queue;\n\nTopic myTopic = new Topic(this, \"MyTopic\");\n\nmyTopic.AddSubscription(new SqsSubscription(queue));",
178 "version": "1"
179 },
180 "java": {
181 "source": "Queue queue;\n\nTopic myTopic = new Topic(this, \"MyTopic\");\n\nmyTopic.addSubscription(new SqsSubscription(queue));",
182 "version": "1"
183 },
184 "go": {
185 "source": "var queue queue\n\nmyTopic := sns.NewTopic(this, jsii.String(\"MyTopic\"))\n\nmyTopic.addSubscription(subscriptions.NewSqsSubscription(queue))",
186 "version": "1"
187 },
188 "$": {
189 "source": "declare const queue: sqs.Queue;\nconst myTopic = new sns.Topic(this, 'MyTopic');\n\nmyTopic.addSubscription(new subscriptions.SqsSubscription(queue));",
190 "version": "0"
191 }
192 },
193 "location": {
194 "api": {
195 "api": "moduleReadme",
196 "moduleFqn": "@aws-cdk/aws-sns"
197 },
198 "field": {
199 "field": "markdown",
200 "line": 52
201 }
202 },
203 "didCompile": true,
204 "fqnsReferenced": [
205 "@aws-cdk/aws-sns-subscriptions.SqsSubscription",
206 "@aws-cdk/aws-sns.ITopicSubscription",
207 "@aws-cdk/aws-sns.Topic",
208 "@aws-cdk/aws-sns.TopicBase#addSubscription",
209 "@aws-cdk/aws-sqs.IQueue",
210 "constructs.Construct"
211 ],
212 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const queue: sqs.Queue;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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\nconst myTopic = new sns.Topic(this, 'MyTopic');\n\nmyTopic.addSubscription(new subscriptions.SqsSubscription(queue));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
213 "syntaxKindCounter": {
214 "10": 1,
215 "75": 11,
216 "104": 1,
217 "130": 1,
218 "153": 1,
219 "169": 1,
220 "194": 3,
221 "196": 1,
222 "197": 2,
223 "225": 2,
224 "226": 1,
225 "242": 2,
226 "243": 2,
227 "290": 1
228 },
229 "fqnsFingerprint": "7d14c477cdbc0daf3505924691be98650177106e430bb34a6c3de5a35e271977"
230 },
231 "f9b8ca442f7f2acf42e482100100b83c099ae2770a741ca7186809001ce49f23": {
232 "translations": {
233 "python": {
234 "source": "import aws_cdk.aws_lambda as lambda_\n# fn: lambda.Function\n\n\nmy_topic = sns.Topic(self, \"MyTopic\")\n\n# Lambda should receive only message matching the following conditions on attributes:\n# color: 'red' or 'orange' or begins with 'bl'\n# size: anything but 'small' or 'medium'\n# price: between 100 and 200 or greater than 300\n# store: attribute must be present\nmy_topic.add_subscription(subscriptions.LambdaSubscription(fn,\n filter_policy={\n \"color\": sns.SubscriptionFilter.string_filter(\n allowlist=[\"red\", \"orange\"],\n match_prefixes=[\"bl\"]\n ),\n \"size\": sns.SubscriptionFilter.string_filter(\n denylist=[\"small\", \"medium\"]\n ),\n \"price\": sns.SubscriptionFilter.numeric_filter(\n between=sns.BetweenCondition(start=100, stop=200),\n greater_than=300\n ),\n \"store\": sns.SubscriptionFilter.exists_filter()\n }\n))",
235 "version": "2"
236 },
237 "csharp": {
238 "source": "using Amazon.CDK.AWS.Lambda;\nFunction fn;\n\n\nTopic myTopic = new Topic(this, \"MyTopic\");\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.AddSubscription(new LambdaSubscription(fn, new LambdaSubscriptionProps {\n FilterPolicy = new Dictionary<string, SubscriptionFilter> {\n { \"color\", SubscriptionFilter.StringFilter(new StringConditions {\n Allowlist = new [] { \"red\", \"orange\" },\n MatchPrefixes = new [] { \"bl\" }\n }) },\n { \"size\", SubscriptionFilter.StringFilter(new StringConditions {\n Denylist = new [] { \"small\", \"medium\" }\n }) },\n { \"price\", SubscriptionFilter.NumericFilter(new NumericConditions {\n Between = new BetweenCondition { Start = 100, Stop = 200 },\n GreaterThan = 300\n }) },\n { \"store\", SubscriptionFilter.ExistsFilter() }\n }\n}));",
239 "version": "1"
240 },
241 "java": {
242 "source": "import software.amazon.awscdk.services.lambda.*;\nFunction fn;\n\n\nTopic myTopic = new Topic(this, \"MyTopic\");\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(LambdaSubscription.Builder.create(fn)\n .filterPolicy(Map.of(\n \"color\", SubscriptionFilter.stringFilter(StringConditions.builder()\n .allowlist(List.of(\"red\", \"orange\"))\n .matchPrefixes(List.of(\"bl\"))\n .build()),\n \"size\", SubscriptionFilter.stringFilter(StringConditions.builder()\n .denylist(List.of(\"small\", \"medium\"))\n .build()),\n \"price\", SubscriptionFilter.numericFilter(NumericConditions.builder()\n .between(BetweenCondition.builder().start(100).stop(200).build())\n .greaterThan(300)\n .build()),\n \"store\", SubscriptionFilter.existsFilter()))\n .build());",
243 "version": "1"
244 },
245 "go": {
246 "source": "import lambda \"github.com/aws-samples/dummy/awscdkawslambda\"\nvar fn function\n\n\nmyTopic := sns.NewTopic(this, jsii.String(\"MyTopic\"))\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(subscriptions.NewLambdaSubscription(fn, &lambdaSubscriptionProps{\n\tfilterPolicy: map[string]subscriptionFilter{\n\t\t\"color\": sns.*subscriptionFilter.stringFilter(&StringConditions{\n\t\t\t\"allowlist\": []*string{\n\t\t\t\tjsii.String(\"red\"),\n\t\t\t\tjsii.String(\"orange\"),\n\t\t\t},\n\t\t\t\"matchPrefixes\": []*string{\n\t\t\t\tjsii.String(\"bl\"),\n\t\t\t},\n\t\t}),\n\t\t\"size\": sns.*subscriptionFilter.stringFilter(&StringConditions{\n\t\t\t\"denylist\": []*string{\n\t\t\t\tjsii.String(\"small\"),\n\t\t\t\tjsii.String(\"medium\"),\n\t\t\t},\n\t\t}),\n\t\t\"price\": sns.*subscriptionFilter.numericFilter(&NumericConditions{\n\t\t\t\"between\": &BetweenCondition{\n\t\t\t\t\"start\": jsii.Number(100),\n\t\t\t\t\"stop\": jsii.Number(200),\n\t\t\t},\n\t\t\t\"greaterThan\": jsii.Number(300),\n\t\t}),\n\t\t\"store\": sns.*subscriptionFilter.existsFilter(),\n\t},\n}))",
247 "version": "1"
248 },
249 "$": {
250 "source": "import * as lambda from '@aws-cdk/aws-lambda';\n\nconst myTopic = new sns.Topic(this, 'MyTopic');\ndeclare const fn: lambda.Function;\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(new subscriptions.LambdaSubscription(fn, {\n filterPolicy: {\n color: sns.SubscriptionFilter.stringFilter({\n allowlist: ['red', 'orange'],\n matchPrefixes: ['bl'],\n }),\n size: sns.SubscriptionFilter.stringFilter({\n denylist: ['small', 'medium'],\n }),\n price: sns.SubscriptionFilter.numericFilter({\n between: { start: 100, stop: 200 },\n greaterThan: 300,\n }),\n store: sns.SubscriptionFilter.existsFilter(),\n },\n}));",
251 "version": "0"
252 }
253 },
254 "location": {
255 "api": {
256 "api": "moduleReadme",
257 "moduleFqn": "@aws-cdk/aws-sns"
258 },
259 "field": {
260 "field": "markdown",
261 "line": 68
262 }
263 },
264 "didCompile": true,
265 "fqnsReferenced": [
266 "@aws-cdk/aws-lambda.IFunction",
267 "@aws-cdk/aws-sns-subscriptions.LambdaSubscription",
268 "@aws-cdk/aws-sns-subscriptions.LambdaSubscriptionProps",
269 "@aws-cdk/aws-sns.BetweenCondition",
270 "@aws-cdk/aws-sns.ITopicSubscription",
271 "@aws-cdk/aws-sns.NumericConditions",
272 "@aws-cdk/aws-sns.StringConditions",
273 "@aws-cdk/aws-sns.SubscriptionFilter",
274 "@aws-cdk/aws-sns.SubscriptionFilter#existsFilter",
275 "@aws-cdk/aws-sns.SubscriptionFilter#numericFilter",
276 "@aws-cdk/aws-sns.SubscriptionFilter#stringFilter",
277 "@aws-cdk/aws-sns.Topic",
278 "@aws-cdk/aws-sns.TopicBase#addSubscription",
279 "constructs.Construct"
280 ],
281 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport * as lambda from '@aws-cdk/aws-lambda';\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 { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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 myTopic = new sns.Topic(this, 'MyTopic');\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(new subscriptions.LambdaSubscription(fn, {\n filterPolicy: {\n color: sns.SubscriptionFilter.stringFilter({\n allowlist: ['red', 'orange'],\n matchPrefixes: ['bl'],\n }),\n size: sns.SubscriptionFilter.stringFilter({\n denylist: ['small', 'medium'],\n }),\n price: sns.SubscriptionFilter.numericFilter({\n between: { start: 100, stop: 200 },\n greaterThan: 300,\n }),\n store: sns.SubscriptionFilter.existsFilter(),\n },\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
282 "syntaxKindCounter": {
283 "8": 3,
284 "10": 7,
285 "75": 36,
286 "104": 1,
287 "130": 1,
288 "153": 1,
289 "169": 1,
290 "192": 3,
291 "193": 6,
292 "194": 11,
293 "196": 5,
294 "197": 2,
295 "225": 2,
296 "226": 1,
297 "242": 2,
298 "243": 2,
299 "254": 1,
300 "255": 1,
301 "256": 1,
302 "281": 12,
303 "290": 1
304 },
305 "fqnsFingerprint": "8c7bb70023359406a1af025ccc8fbedda44119aa7e8437c102325097a1e294e1"
306 },
307 "663b42d337578ca889e690c8e13095007958c79706c3e738f83e3fd0dda84c2a": {
308 "translations": {
309 "python": {
310 "source": "from aws_cdk.aws_kinesisfirehose import DeliveryStream\n# stream: DeliveryStream\n\n\ntopic = sns.Topic(self, \"Topic\")\n\nsns.Subscription(self, \"Subscription\",\n topic=topic,\n endpoint=stream.delivery_stream_arn,\n protocol=sns.SubscriptionProtocol.FIREHOSE,\n subscription_role_arn=\"SAMPLE_ARN\"\n)",
311 "version": "2"
312 },
313 "csharp": {
314 "source": "using Amazon.CDK.AWS.KinesisFirehose;\nDeliveryStream stream;\n\n\nTopic topic = new Topic(this, \"Topic\");\n\nnew Subscription(this, \"Subscription\", new SubscriptionProps {\n Topic = topic,\n Endpoint = stream.DeliveryStreamArn,\n Protocol = SubscriptionProtocol.FIREHOSE,\n SubscriptionRoleArn = \"SAMPLE_ARN\"\n});",
315 "version": "1"
316 },
317 "java": {
318 "source": "import software.amazon.awscdk.services.kinesisfirehose.DeliveryStream;\nDeliveryStream stream;\n\n\nTopic topic = new Topic(this, \"Topic\");\n\nSubscription.Builder.create(this, \"Subscription\")\n .topic(topic)\n .endpoint(stream.getDeliveryStreamArn())\n .protocol(SubscriptionProtocol.FIREHOSE)\n .subscriptionRoleArn(\"SAMPLE_ARN\")\n .build();",
319 "version": "1"
320 },
321 "go": {
322 "source": "import \"github.com/aws-samples/dummy/awscdkawskinesisfirehose\"\nvar stream deliveryStream\n\n\ntopic := sns.NewTopic(this, jsii.String(\"Topic\"))\n\nsns.NewSubscription(this, jsii.String(\"Subscription\"), &subscriptionProps{\n\ttopic: topic,\n\tendpoint: stream.deliveryStreamArn,\n\tprotocol: sns.subscriptionProtocol_FIREHOSE,\n\tsubscriptionRoleArn: jsii.String(\"SAMPLE_ARN\"),\n})",
323 "version": "1"
324 },
325 "$": {
326 "source": "import { DeliveryStream } from '@aws-cdk/aws-kinesisfirehose';\n\nconst topic = new sns.Topic(this, 'Topic');\ndeclare const stream: DeliveryStream;\n\nnew sns.Subscription(this, 'Subscription', {\n topic,\n endpoint: stream.deliveryStreamArn,\n protocol: sns.SubscriptionProtocol.FIREHOSE,\n subscriptionRoleArn: \"SAMPLE_ARN\", //role with permissions to send messages to a firehose delivery stream\n});",
327 "version": "0"
328 }
329 },
330 "location": {
331 "api": {
332 "api": "moduleReadme",
333 "moduleFqn": "@aws-cdk/aws-sns"
334 },
335 "field": {
336 "field": "markdown",
337 "line": 99
338 }
339 },
340 "didCompile": true,
341 "fqnsReferenced": [
342 "@aws-cdk/aws-kinesisfirehose.DeliveryStream#deliveryStreamArn",
343 "@aws-cdk/aws-sns.ITopic",
344 "@aws-cdk/aws-sns.Subscription",
345 "@aws-cdk/aws-sns.SubscriptionProps",
346 "@aws-cdk/aws-sns.SubscriptionProtocol",
347 "@aws-cdk/aws-sns.SubscriptionProtocol#FIREHOSE",
348 "@aws-cdk/aws-sns.Topic",
349 "constructs.Construct"
350 ],
351 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport { DeliveryStream } from '@aws-cdk/aws-kinesisfirehose';\ndeclare const stream: DeliveryStream;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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');\n\nnew sns.Subscription(this, 'Subscription', {\n topic,\n endpoint: stream.deliveryStreamArn,\n protocol: sns.SubscriptionProtocol.FIREHOSE,\n subscriptionRoleArn: \"SAMPLE_ARN\", //role with permissions to send messages to a firehose delivery stream\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
352 "syntaxKindCounter": {
353 "10": 4,
354 "75": 17,
355 "104": 2,
356 "130": 1,
357 "169": 1,
358 "193": 1,
359 "194": 5,
360 "197": 2,
361 "225": 2,
362 "226": 1,
363 "242": 2,
364 "243": 2,
365 "254": 1,
366 "255": 1,
367 "257": 1,
368 "258": 1,
369 "281": 3,
370 "282": 1,
371 "290": 1
372 },
373 "fqnsFingerprint": "0b01253a8661d373574601f65574702fd651ca8b920f52dff8c1d705984f2b65"
374 },
375 "4eb6072d96f57bac71f5664991456cbbaf004874c9647d81686760e3259dc71c": {
376 "translations": {
377 "python": {
378 "source": "topic = sns.Topic(self, \"Topic\")\ndl_queue = sqs.Queue(self, \"DeadLetterQueue\",\n queue_name=\"MySubscription_DLQ\",\n retention_period=Duration.days(14)\n)\n\nsns.Subscription(self, \"Subscription\",\n endpoint=\"endpoint\",\n protocol=sns.SubscriptionProtocol.LAMBDA,\n topic=topic,\n dead_letter_queue=dl_queue\n)",
379 "version": "2"
380 },
381 "csharp": {
382 "source": "Topic topic = new Topic(this, \"Topic\");\nQueue dlQueue = new Queue(this, \"DeadLetterQueue\", new QueueProps {\n QueueName = \"MySubscription_DLQ\",\n RetentionPeriod = Duration.Days(14)\n});\n\nnew Subscription(this, \"Subscription\", new SubscriptionProps {\n Endpoint = \"endpoint\",\n Protocol = SubscriptionProtocol.LAMBDA,\n Topic = topic,\n DeadLetterQueue = dlQueue\n});",
383 "version": "1"
384 },
385 "java": {
386 "source": "Topic topic = new Topic(this, \"Topic\");\nQueue dlQueue = Queue.Builder.create(this, \"DeadLetterQueue\")\n .queueName(\"MySubscription_DLQ\")\n .retentionPeriod(Duration.days(14))\n .build();\n\nSubscription.Builder.create(this, \"Subscription\")\n .endpoint(\"endpoint\")\n .protocol(SubscriptionProtocol.LAMBDA)\n .topic(topic)\n .deadLetterQueue(dlQueue)\n .build();",
387 "version": "1"
388 },
389 "go": {
390 "source": "topic := sns.NewTopic(this, jsii.String(\"Topic\"))\ndlQueue := sqs.NewQueue(this, jsii.String(\"DeadLetterQueue\"), &queueProps{\n\tqueueName: jsii.String(\"MySubscription_DLQ\"),\n\tretentionPeriod: *awscdkcore.Duration.days(jsii.Number(14)),\n})\n\nsns.NewSubscription(this, jsii.String(\"Subscription\"), &subscriptionProps{\n\tendpoint: jsii.String(\"endpoint\"),\n\tprotocol: sns.subscriptionProtocol_LAMBDA,\n\ttopic: topic,\n\tdeadLetterQueue: dlQueue,\n})",
391 "version": "1"
392 },
393 "$": {
394 "source": "const topic = new sns.Topic(this, 'Topic');\nconst dlQueue = new sqs.Queue(this, 'DeadLetterQueue', {\n queueName: 'MySubscription_DLQ',\n retentionPeriod: Duration.days(14),\n});\n\nnew sns.Subscription(this, 'Subscription', {\n endpoint: 'endpoint',\n protocol: sns.SubscriptionProtocol.LAMBDA,\n topic,\n deadLetterQueue: dlQueue,\n});",
395 "version": "0"
396 }
397 },
398 "location": {
399 "api": {
400 "api": "moduleReadme",
401 "moduleFqn": "@aws-cdk/aws-sns"
402 },
403 "field": {
404 "field": "markdown",
405 "line": 120
406 }
407 },
408 "didCompile": true,
409 "fqnsReferenced": [
410 "@aws-cdk/aws-sns.ITopic",
411 "@aws-cdk/aws-sns.Subscription",
412 "@aws-cdk/aws-sns.SubscriptionProps",
413 "@aws-cdk/aws-sns.SubscriptionProtocol",
414 "@aws-cdk/aws-sns.SubscriptionProtocol#LAMBDA",
415 "@aws-cdk/aws-sns.Topic",
416 "@aws-cdk/aws-sqs.IQueue",
417 "@aws-cdk/aws-sqs.Queue",
418 "@aws-cdk/aws-sqs.QueueProps",
419 "@aws-cdk/core.Duration",
420 "@aws-cdk/core.Duration#days",
421 "constructs.Construct"
422 ],
423 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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 topic = new sns.Topic(this, 'Topic');\nconst dlQueue = new sqs.Queue(this, 'DeadLetterQueue', {\n queueName: 'MySubscription_DLQ',\n retentionPeriod: Duration.days(14),\n});\n\nnew sns.Subscription(this, 'Subscription', {\n endpoint: 'endpoint',\n protocol: sns.SubscriptionProtocol.LAMBDA,\n topic,\n deadLetterQueue: dlQueue,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
424 "syntaxKindCounter": {
425 "8": 1,
426 "10": 5,
427 "75": 20,
428 "104": 3,
429 "193": 2,
430 "194": 6,
431 "196": 1,
432 "197": 3,
433 "225": 2,
434 "226": 1,
435 "242": 2,
436 "243": 2,
437 "281": 5,
438 "282": 1
439 },
440 "fqnsFingerprint": "bf6a82b2f37cb473bbdcbe5571602bdd7cdbf8307901132df881d48c87be9f7f"
441 },
442 "263458834c4bfb9e84808fc4d88292cfcf09e3d5ff8fd5007eb9a8992cba025d": {
443 "translations": {
444 "python": {
445 "source": "import aws_cdk.aws_codecommit as codecommit\nimport aws_cdk.aws_events_targets as targets\n\n# repo: codecommit.Repository\n\nmy_topic = sns.Topic(self, \"Topic\")\n\nrepo.on_commit(\"OnCommit\",\n target=targets.SnsTopic(my_topic)\n)",
446 "version": "2"
447 },
448 "csharp": {
449 "source": "using Amazon.CDK.AWS.CodeCommit;\nusing Amazon.CDK.AWS.Events.Targets;\n\nRepository repo;\n\nTopic myTopic = new Topic(this, \"Topic\");\n\nrepo.OnCommit(\"OnCommit\", new OnCommitOptions {\n Target = new SnsTopic(myTopic)\n});",
450 "version": "1"
451 },
452 "java": {
453 "source": "import software.amazon.awscdk.services.codecommit.*;\nimport software.amazon.awscdk.services.events.targets.*;\n\nRepository repo;\n\nTopic myTopic = new Topic(this, \"Topic\");\n\nrepo.onCommit(\"OnCommit\", OnCommitOptions.builder()\n .target(new SnsTopic(myTopic))\n .build());",
454 "version": "1"
455 },
456 "go": {
457 "source": "import codecommit \"github.com/aws-samples/dummy/awscdkawscodecommit\"\nimport targets \"github.com/aws-samples/dummy/awscdkawseventstargets\"\n\nvar repo repository\n\nmyTopic := sns.NewTopic(this, jsii.String(\"Topic\"))\n\nrepo.onCommit(jsii.String(\"OnCommit\"), &onCommitOptions{\n\ttarget: targets.NewSnsTopic(myTopic),\n})",
458 "version": "1"
459 },
460 "$": {
461 "source": "import * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as targets from '@aws-cdk/aws-events-targets';\n\ndeclare const repo: codecommit.Repository;\nconst myTopic = new sns.Topic(this, 'Topic');\n\nrepo.onCommit('OnCommit', {\n target: new targets.SnsTopic(myTopic),\n});",
462 "version": "0"
463 }
464 },
465 "location": {
466 "api": {
467 "api": "moduleReadme",
468 "moduleFqn": "@aws-cdk/aws-sns"
469 },
470 "field": {
471 "field": "markdown",
472 "line": 141
473 }
474 },
475 "didCompile": true,
476 "fqnsReferenced": [
477 "@aws-cdk/aws-codecommit.OnCommitOptions",
478 "@aws-cdk/aws-events-targets.SnsTopic",
479 "@aws-cdk/aws-events.IRuleTarget",
480 "@aws-cdk/aws-sns.ITopic",
481 "@aws-cdk/aws-sns.Topic",
482 "constructs.Construct"
483 ],
484 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as targets from '@aws-cdk/aws-events-targets';\n\ndeclare const repo: codecommit.Repository;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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\nconst myTopic = new sns.Topic(this, 'Topic');\n\nrepo.onCommit('OnCommit', {\n target: new targets.SnsTopic(myTopic),\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
485 "syntaxKindCounter": {
486 "10": 4,
487 "75": 14,
488 "104": 1,
489 "130": 1,
490 "153": 1,
491 "169": 1,
492 "193": 1,
493 "194": 3,
494 "196": 1,
495 "197": 2,
496 "225": 2,
497 "226": 1,
498 "242": 2,
499 "243": 2,
500 "254": 2,
501 "255": 2,
502 "256": 2,
503 "281": 1,
504 "290": 1
505 },
506 "fqnsFingerprint": "b0f15f7648edb6158b0c96c1be8a5cae594d22de77428f5db9ed553112b3e74e"
507 },
508 "ab0ca3f16c539c8b1f51f84e971979e2c8afeac6dd97c3bcab47de9fefe54522": {
509 "translations": {
510 "python": {
511 "source": "topic = sns.Topic(self, \"Topic\")\ntopic_policy = sns.TopicPolicy(self, \"TopicPolicy\",\n topics=[topic]\n)\n\ntopic_policy.document.add_statements(iam.PolicyStatement(\n actions=[\"sns:Subscribe\"],\n principals=[iam.AnyPrincipal()],\n resources=[topic.topic_arn]\n))",
512 "version": "2"
513 },
514 "csharp": {
515 "source": "Topic topic = new Topic(this, \"Topic\");\nTopicPolicy topicPolicy = new TopicPolicy(this, \"TopicPolicy\", new TopicPolicyProps {\n Topics = new [] { topic }\n});\n\ntopicPolicy.Document.AddStatements(new PolicyStatement(new PolicyStatementProps {\n Actions = new [] { \"sns:Subscribe\" },\n Principals = new [] { new AnyPrincipal() },\n Resources = new [] { topic.TopicArn }\n}));",
516 "version": "1"
517 },
518 "java": {
519 "source": "Topic topic = new Topic(this, \"Topic\");\nTopicPolicy topicPolicy = TopicPolicy.Builder.create(this, \"TopicPolicy\")\n .topics(List.of(topic))\n .build();\n\ntopicPolicy.document.addStatements(PolicyStatement.Builder.create()\n .actions(List.of(\"sns:Subscribe\"))\n .principals(List.of(new AnyPrincipal()))\n .resources(List.of(topic.getTopicArn()))\n .build());",
520 "version": "1"
521 },
522 "go": {
523 "source": "topic := sns.NewTopic(this, jsii.String(\"Topic\"))\ntopicPolicy := sns.NewTopicPolicy(this, jsii.String(\"TopicPolicy\"), &topicPolicyProps{\n\ttopics: []iTopic{\n\t\ttopic,\n\t},\n})\n\ntopicPolicy.document.addStatements(iam.NewPolicyStatement(&policyStatementProps{\n\tactions: []*string{\n\t\tjsii.String(\"sns:Subscribe\"),\n\t},\n\tprincipals: []iPrincipal{\n\t\tiam.NewAnyPrincipal(),\n\t},\n\tresources: []*string{\n\t\ttopic.topicArn,\n\t},\n}))",
524 "version": "1"
525 },
526 "$": {
527 "source": "const topic = new sns.Topic(this, 'Topic');\nconst topicPolicy = new sns.TopicPolicy(this, 'TopicPolicy', {\n topics: [topic],\n});\n\ntopicPolicy.document.addStatements(new iam.PolicyStatement({\n actions: [\"sns:Subscribe\"],\n principals: [new iam.AnyPrincipal()],\n resources: [topic.topicArn],\n}));",
528 "version": "0"
529 }
530 },
531 "location": {
532 "api": {
533 "api": "moduleReadme",
534 "moduleFqn": "@aws-cdk/aws-sns"
535 },
536 "field": {
537 "field": "markdown",
538 "line": 162
539 }
540 },
541 "didCompile": true,
542 "fqnsReferenced": [
543 "@aws-cdk/aws-iam.AnyPrincipal",
544 "@aws-cdk/aws-iam.PolicyDocument#addStatements",
545 "@aws-cdk/aws-iam.PolicyStatement",
546 "@aws-cdk/aws-iam.PolicyStatementProps",
547 "@aws-cdk/aws-sns.Topic",
548 "@aws-cdk/aws-sns.Topic#topicArn",
549 "@aws-cdk/aws-sns.TopicPolicy",
550 "@aws-cdk/aws-sns.TopicPolicy#document",
551 "@aws-cdk/aws-sns.TopicPolicyProps",
552 "constructs.Construct"
553 ],
554 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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 topic = new sns.Topic(this, 'Topic');\nconst topicPolicy = new sns.TopicPolicy(this, 'TopicPolicy', {\n topics: [topic],\n});\n\ntopicPolicy.document.addStatements(new iam.PolicyStatement({\n actions: [\"sns:Subscribe\"],\n principals: [new iam.AnyPrincipal()],\n resources: [topic.topicArn],\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
555 "syntaxKindCounter": {
556 "10": 3,
557 "75": 20,
558 "104": 2,
559 "192": 4,
560 "193": 2,
561 "194": 7,
562 "196": 1,
563 "197": 4,
564 "225": 2,
565 "226": 1,
566 "242": 2,
567 "243": 2,
568 "281": 4
569 },
570 "fqnsFingerprint": "65af37bccb6a0832b946357f9d68912dd1f4e51f6b657f47f25621cebe5f13ec"
571 },
572 "840c208a299d65d82962b6a99b0303133dba1cecc5e1d145d4e11052e8917a54": {
573 "translations": {
574 "python": {
575 "source": "topic = sns.Topic(self, \"Topic\")\npolicy_document = iam.PolicyDocument(\n assign_sids=True,\n statements=[\n iam.PolicyStatement(\n actions=[\"sns:Subscribe\"],\n principals=[iam.AnyPrincipal()],\n resources=[topic.topic_arn]\n )\n ]\n)\n\ntopic_policy = sns.TopicPolicy(self, \"Policy\",\n topics=[topic],\n policy_document=policy_document\n)",
576 "version": "2"
577 },
578 "csharp": {
579 "source": "Topic topic = new Topic(this, \"Topic\");\nPolicyDocument policyDocument = new PolicyDocument(new PolicyDocumentProps {\n AssignSids = true,\n Statements = new [] {\n new PolicyStatement(new PolicyStatementProps {\n Actions = new [] { \"sns:Subscribe\" },\n Principals = new [] { new AnyPrincipal() },\n Resources = new [] { topic.TopicArn }\n }) }\n});\n\nTopicPolicy topicPolicy = new TopicPolicy(this, \"Policy\", new TopicPolicyProps {\n Topics = new [] { topic },\n PolicyDocument = policyDocument\n});",
580 "version": "1"
581 },
582 "java": {
583 "source": "Topic topic = new Topic(this, \"Topic\");\nPolicyDocument policyDocument = PolicyDocument.Builder.create()\n .assignSids(true)\n .statements(List.of(\n PolicyStatement.Builder.create()\n .actions(List.of(\"sns:Subscribe\"))\n .principals(List.of(new AnyPrincipal()))\n .resources(List.of(topic.getTopicArn()))\n .build()))\n .build();\n\nTopicPolicy topicPolicy = TopicPolicy.Builder.create(this, \"Policy\")\n .topics(List.of(topic))\n .policyDocument(policyDocument)\n .build();",
584 "version": "1"
585 },
586 "go": {
587 "source": "topic := sns.NewTopic(this, jsii.String(\"Topic\"))\npolicyDocument := iam.NewPolicyDocument(&policyDocumentProps{\n\tassignSids: jsii.Boolean(true),\n\tstatements: []policyStatement{\n\t\tiam.NewPolicyStatement(&policyStatementProps{\n\t\t\tactions: []*string{\n\t\t\t\tjsii.String(\"sns:Subscribe\"),\n\t\t\t},\n\t\t\tprincipals: []iPrincipal{\n\t\t\t\tiam.NewAnyPrincipal(),\n\t\t\t},\n\t\t\tresources: []*string{\n\t\t\t\ttopic.topicArn,\n\t\t\t},\n\t\t}),\n\t},\n})\n\ntopicPolicy := sns.NewTopicPolicy(this, jsii.String(\"Policy\"), &topicPolicyProps{\n\ttopics: []iTopic{\n\t\ttopic,\n\t},\n\tpolicyDocument: policyDocument,\n})",
588 "version": "1"
589 },
590 "$": {
591 "source": "const topic = new sns.Topic(this, 'Topic');\nconst policyDocument = new iam.PolicyDocument({\n assignSids: true,\n statements: [\n new iam.PolicyStatement({\n actions: [\"sns:Subscribe\"],\n principals: [new iam.AnyPrincipal()],\n resources: [topic.topicArn],\n }),\n ],\n});\n\nconst topicPolicy = new sns.TopicPolicy(this, 'Policy', {\n topics: [topic],\n policyDocument,\n});",
592 "version": "0"
593 }
594 },
595 "location": {
596 "api": {
597 "api": "moduleReadme",
598 "moduleFqn": "@aws-cdk/aws-sns"
599 },
600 "field": {
601 "field": "markdown",
602 "line": 177
603 }
604 },
605 "didCompile": true,
606 "fqnsReferenced": [
607 "@aws-cdk/aws-iam.AnyPrincipal",
608 "@aws-cdk/aws-iam.PolicyDocument",
609 "@aws-cdk/aws-iam.PolicyDocumentProps",
610 "@aws-cdk/aws-iam.PolicyStatement",
611 "@aws-cdk/aws-iam.PolicyStatementProps",
612 "@aws-cdk/aws-sns.Topic",
613 "@aws-cdk/aws-sns.Topic#topicArn",
614 "@aws-cdk/aws-sns.TopicPolicy",
615 "@aws-cdk/aws-sns.TopicPolicyProps",
616 "constructs.Construct"
617 ],
618 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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 topic = new sns.Topic(this, 'Topic');\nconst policyDocument = new iam.PolicyDocument({\n assignSids: true,\n statements: [\n new iam.PolicyStatement({\n actions: [\"sns:Subscribe\"],\n principals: [new iam.AnyPrincipal()],\n resources: [topic.topicArn],\n }),\n ],\n});\n\nconst topicPolicy = new sns.TopicPolicy(this, 'Policy', {\n topics: [topic],\n policyDocument,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
619 "syntaxKindCounter": {
620 "10": 3,
621 "75": 23,
622 "104": 2,
623 "106": 1,
624 "192": 5,
625 "193": 3,
626 "194": 6,
627 "197": 5,
628 "225": 3,
629 "242": 3,
630 "243": 3,
631 "281": 6,
632 "282": 1
633 },
634 "fqnsFingerprint": "ea288e80c9d9ef4e14d6de08f30b72c5e0562e3130bbb30c06630834452d0050"
635 },
636 "8f158853734d0a55d516a8361eb0be7f186b4f6b0cf0f055cc4a070a5a422111": {
637 "translations": {
638 "python": {
639 "source": "import aws_cdk.aws_lambda as lambda_\n# fn: lambda.Function\n\n\nmy_topic = sns.Topic(self, \"MyTopic\")\n\n# Lambda should receive only message matching the following conditions on attributes:\n# color: 'red' or 'orange' or begins with 'bl'\n# size: anything but 'small' or 'medium'\n# price: between 100 and 200 or greater than 300\n# store: attribute must be present\nmy_topic.add_subscription(subscriptions.LambdaSubscription(fn,\n filter_policy={\n \"color\": sns.SubscriptionFilter.string_filter(\n allowlist=[\"red\", \"orange\"],\n match_prefixes=[\"bl\"]\n ),\n \"size\": sns.SubscriptionFilter.string_filter(\n denylist=[\"small\", \"medium\"]\n ),\n \"price\": sns.SubscriptionFilter.numeric_filter(\n between=sns.BetweenCondition(start=100, stop=200),\n greater_than=300\n ),\n \"store\": sns.SubscriptionFilter.exists_filter()\n }\n))",
640 "version": "2"
641 },
642 "csharp": {
643 "source": "using Amazon.CDK.AWS.Lambda;\nFunction fn;\n\n\nTopic myTopic = new Topic(this, \"MyTopic\");\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.AddSubscription(new LambdaSubscription(fn, new LambdaSubscriptionProps {\n FilterPolicy = new Dictionary<string, SubscriptionFilter> {\n { \"color\", SubscriptionFilter.StringFilter(new StringConditions {\n Allowlist = new [] { \"red\", \"orange\" },\n MatchPrefixes = new [] { \"bl\" }\n }) },\n { \"size\", SubscriptionFilter.StringFilter(new StringConditions {\n Denylist = new [] { \"small\", \"medium\" }\n }) },\n { \"price\", SubscriptionFilter.NumericFilter(new NumericConditions {\n Between = new BetweenCondition { Start = 100, Stop = 200 },\n GreaterThan = 300\n }) },\n { \"store\", SubscriptionFilter.ExistsFilter() }\n }\n}));",
644 "version": "1"
645 },
646 "java": {
647 "source": "import software.amazon.awscdk.services.lambda.*;\nFunction fn;\n\n\nTopic myTopic = new Topic(this, \"MyTopic\");\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(LambdaSubscription.Builder.create(fn)\n .filterPolicy(Map.of(\n \"color\", SubscriptionFilter.stringFilter(StringConditions.builder()\n .allowlist(List.of(\"red\", \"orange\"))\n .matchPrefixes(List.of(\"bl\"))\n .build()),\n \"size\", SubscriptionFilter.stringFilter(StringConditions.builder()\n .denylist(List.of(\"small\", \"medium\"))\n .build()),\n \"price\", SubscriptionFilter.numericFilter(NumericConditions.builder()\n .between(BetweenCondition.builder().start(100).stop(200).build())\n .greaterThan(300)\n .build()),\n \"store\", SubscriptionFilter.existsFilter()))\n .build());",
648 "version": "1"
649 },
650 "go": {
651 "source": "import lambda \"github.com/aws-samples/dummy/awscdkawslambda\"\nvar fn function\n\n\nmyTopic := sns.NewTopic(this, jsii.String(\"MyTopic\"))\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(subscriptions.NewLambdaSubscription(fn, &lambdaSubscriptionProps{\n\tfilterPolicy: map[string]subscriptionFilter{\n\t\t\"color\": sns.*subscriptionFilter.stringFilter(&StringConditions{\n\t\t\t\"allowlist\": []*string{\n\t\t\t\tjsii.String(\"red\"),\n\t\t\t\tjsii.String(\"orange\"),\n\t\t\t},\n\t\t\t\"matchPrefixes\": []*string{\n\t\t\t\tjsii.String(\"bl\"),\n\t\t\t},\n\t\t}),\n\t\t\"size\": sns.*subscriptionFilter.stringFilter(&StringConditions{\n\t\t\t\"denylist\": []*string{\n\t\t\t\tjsii.String(\"small\"),\n\t\t\t\tjsii.String(\"medium\"),\n\t\t\t},\n\t\t}),\n\t\t\"price\": sns.*subscriptionFilter.numericFilter(&NumericConditions{\n\t\t\t\"between\": &BetweenCondition{\n\t\t\t\t\"start\": jsii.Number(100),\n\t\t\t\t\"stop\": jsii.Number(200),\n\t\t\t},\n\t\t\t\"greaterThan\": jsii.Number(300),\n\t\t}),\n\t\t\"store\": sns.*subscriptionFilter.existsFilter(),\n\t},\n}))",
652 "version": "1"
653 },
654 "$": {
655 "source": "import * as lambda from '@aws-cdk/aws-lambda';\n\nconst myTopic = new sns.Topic(this, 'MyTopic');\ndeclare const fn: lambda.Function;\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(new subscriptions.LambdaSubscription(fn, {\n filterPolicy: {\n color: sns.SubscriptionFilter.stringFilter({\n allowlist: ['red', 'orange'],\n matchPrefixes: ['bl'],\n }),\n size: sns.SubscriptionFilter.stringFilter({\n denylist: ['small', 'medium'],\n }),\n price: sns.SubscriptionFilter.numericFilter({\n between: { start: 100, stop: 200 },\n greaterThan: 300,\n }),\n store: sns.SubscriptionFilter.existsFilter(),\n },\n}));",
656 "version": "0"
657 }
658 },
659 "location": {
660 "api": {
661 "api": "type",
662 "fqn": "@aws-cdk/aws-sns.BetweenCondition"
663 },
664 "field": {
665 "field": "example"
666 }
667 },
668 "didCompile": true,
669 "fqnsReferenced": [
670 "@aws-cdk/aws-lambda.IFunction",
671 "@aws-cdk/aws-sns-subscriptions.LambdaSubscription",
672 "@aws-cdk/aws-sns-subscriptions.LambdaSubscriptionProps",
673 "@aws-cdk/aws-sns.BetweenCondition",
674 "@aws-cdk/aws-sns.ITopicSubscription",
675 "@aws-cdk/aws-sns.NumericConditions",
676 "@aws-cdk/aws-sns.StringConditions",
677 "@aws-cdk/aws-sns.SubscriptionFilter",
678 "@aws-cdk/aws-sns.SubscriptionFilter#existsFilter",
679 "@aws-cdk/aws-sns.SubscriptionFilter#numericFilter",
680 "@aws-cdk/aws-sns.SubscriptionFilter#stringFilter",
681 "@aws-cdk/aws-sns.Topic",
682 "@aws-cdk/aws-sns.TopicBase#addSubscription",
683 "constructs.Construct"
684 ],
685 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport * as lambda from '@aws-cdk/aws-lambda';\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 { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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 myTopic = new sns.Topic(this, 'MyTopic');\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(new subscriptions.LambdaSubscription(fn, {\n filterPolicy: {\n color: sns.SubscriptionFilter.stringFilter({\n allowlist: ['red', 'orange'],\n matchPrefixes: ['bl'],\n }),\n size: sns.SubscriptionFilter.stringFilter({\n denylist: ['small', 'medium'],\n }),\n price: sns.SubscriptionFilter.numericFilter({\n between: { start: 100, stop: 200 },\n greaterThan: 300,\n }),\n store: sns.SubscriptionFilter.existsFilter(),\n },\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
686 "syntaxKindCounter": {
687 "8": 3,
688 "10": 7,
689 "75": 36,
690 "104": 1,
691 "130": 1,
692 "153": 1,
693 "169": 1,
694 "192": 3,
695 "193": 6,
696 "194": 11,
697 "196": 5,
698 "197": 2,
699 "225": 2,
700 "226": 1,
701 "242": 2,
702 "243": 2,
703 "254": 1,
704 "255": 1,
705 "256": 1,
706 "281": 12,
707 "290": 1
708 },
709 "fqnsFingerprint": "8c7bb70023359406a1af025ccc8fbedda44119aa7e8437c102325097a1e294e1"
710 },
711 "8b11f476311dfc6947b14f38739b7898e0b6f195b91bc79b48db14f72eaa02b1": {
712 "translations": {
713 "python": {
714 "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_sns as sns\n\n# delivery_policy: Any\n# filter_policy: Any\n# redrive_policy: Any\n\ncfn_subscription = sns.CfnSubscription(self, \"MyCfnSubscription\",\n protocol=\"protocol\",\n topic_arn=\"topicArn\",\n\n # the properties below are optional\n delivery_policy=delivery_policy,\n endpoint=\"endpoint\",\n filter_policy=filter_policy,\n raw_message_delivery=False,\n redrive_policy=redrive_policy,\n region=\"region\",\n subscription_role_arn=\"subscriptionRoleArn\"\n)",
715 "version": "2"
716 },
717 "csharp": {
718 "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.SNS;\n\nvar deliveryPolicy;\nvar filterPolicy;\nvar redrivePolicy;\n\nCfnSubscription cfnSubscription = new CfnSubscription(this, \"MyCfnSubscription\", new CfnSubscriptionProps {\n Protocol = \"protocol\",\n TopicArn = \"topicArn\",\n\n // the properties below are optional\n DeliveryPolicy = deliveryPolicy,\n Endpoint = \"endpoint\",\n FilterPolicy = filterPolicy,\n RawMessageDelivery = false,\n RedrivePolicy = redrivePolicy,\n Region = \"region\",\n SubscriptionRoleArn = \"subscriptionRoleArn\"\n});",
719 "version": "1"
720 },
721 "java": {
722 "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.sns.*;\n\nObject deliveryPolicy;\nObject filterPolicy;\nObject redrivePolicy;\n\nCfnSubscription cfnSubscription = CfnSubscription.Builder.create(this, \"MyCfnSubscription\")\n .protocol(\"protocol\")\n .topicArn(\"topicArn\")\n\n // the properties below are optional\n .deliveryPolicy(deliveryPolicy)\n .endpoint(\"endpoint\")\n .filterPolicy(filterPolicy)\n .rawMessageDelivery(false)\n .redrivePolicy(redrivePolicy)\n .region(\"region\")\n .subscriptionRoleArn(\"subscriptionRoleArn\")\n .build();",
723 "version": "1"
724 },
725 "go": {
726 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport sns \"github.com/aws-samples/dummy/awscdkawssns\"\n\nvar deliveryPolicy interface{}\nvar filterPolicy interface{}\nvar redrivePolicy interface{}\n\ncfnSubscription := sns.NewCfnSubscription(this, jsii.String(\"MyCfnSubscription\"), &cfnSubscriptionProps{\n\tprotocol: jsii.String(\"protocol\"),\n\ttopicArn: jsii.String(\"topicArn\"),\n\n\t// the properties below are optional\n\tdeliveryPolicy: deliveryPolicy,\n\tendpoint: jsii.String(\"endpoint\"),\n\tfilterPolicy: filterPolicy,\n\trawMessageDelivery: jsii.Boolean(false),\n\tredrivePolicy: redrivePolicy,\n\tregion: jsii.String(\"region\"),\n\tsubscriptionRoleArn: jsii.String(\"subscriptionRoleArn\"),\n})",
727 "version": "1"
728 },
729 "$": {
730 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as sns from '@aws-cdk/aws-sns';\n\ndeclare const deliveryPolicy: any;\ndeclare const filterPolicy: any;\ndeclare const redrivePolicy: any;\nconst cfnSubscription = new sns.CfnSubscription(this, 'MyCfnSubscription', {\n protocol: 'protocol',\n topicArn: 'topicArn',\n\n // the properties below are optional\n deliveryPolicy: deliveryPolicy,\n endpoint: 'endpoint',\n filterPolicy: filterPolicy,\n rawMessageDelivery: false,\n redrivePolicy: redrivePolicy,\n region: 'region',\n subscriptionRoleArn: 'subscriptionRoleArn',\n});",
731 "version": "0"
732 }
733 },
734 "location": {
735 "api": {
736 "api": "type",
737 "fqn": "@aws-cdk/aws-sns.CfnSubscription"
738 },
739 "field": {
740 "field": "example"
741 }
742 },
743 "didCompile": true,
744 "fqnsReferenced": [
745 "@aws-cdk/aws-sns.CfnSubscription",
746 "@aws-cdk/aws-sns.CfnSubscriptionProps",
747 "@aws-cdk/core.Construct"
748 ],
749 "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 sns from '@aws-cdk/aws-sns';\n\ndeclare const deliveryPolicy: any;\ndeclare const filterPolicy: any;\ndeclare const redrivePolicy: any;\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 cfnSubscription = new sns.CfnSubscription(this, 'MyCfnSubscription', {\n protocol: 'protocol',\n topicArn: 'topicArn',\n\n // the properties below are optional\n deliveryPolicy: deliveryPolicy,\n endpoint: 'endpoint',\n filterPolicy: filterPolicy,\n rawMessageDelivery: false,\n redrivePolicy: redrivePolicy,\n region: 'region',\n subscriptionRoleArn: 'subscriptionRoleArn',\n});\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
750 "syntaxKindCounter": {
751 "10": 7,
752 "75": 19,
753 "91": 1,
754 "104": 1,
755 "125": 3,
756 "130": 3,
757 "193": 1,
758 "194": 1,
759 "197": 1,
760 "225": 4,
761 "242": 4,
762 "243": 4,
763 "254": 1,
764 "255": 1,
765 "256": 1,
766 "281": 9,
767 "290": 1
768 },
769 "fqnsFingerprint": "412fb2a2da4198622e5424be1402c2cf4f9138f3096d0e002c91bc1e56e794c3"
770 },
771 "8922eea58e18d5faf8adefb7ccb0657db2d4e1d6a5a29c1e588135a9f4f07387": {
772 "translations": {
773 "python": {
774 "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_sns as sns\n\n# delivery_policy: Any\n# filter_policy: Any\n# redrive_policy: Any\n\ncfn_subscription_props = sns.CfnSubscriptionProps(\n protocol=\"protocol\",\n topic_arn=\"topicArn\",\n\n # the properties below are optional\n delivery_policy=delivery_policy,\n endpoint=\"endpoint\",\n filter_policy=filter_policy,\n raw_message_delivery=False,\n redrive_policy=redrive_policy,\n region=\"region\",\n subscription_role_arn=\"subscriptionRoleArn\"\n)",
775 "version": "2"
776 },
777 "csharp": {
778 "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.SNS;\n\nvar deliveryPolicy;\nvar filterPolicy;\nvar redrivePolicy;\n\nCfnSubscriptionProps cfnSubscriptionProps = new CfnSubscriptionProps {\n Protocol = \"protocol\",\n TopicArn = \"topicArn\",\n\n // the properties below are optional\n DeliveryPolicy = deliveryPolicy,\n Endpoint = \"endpoint\",\n FilterPolicy = filterPolicy,\n RawMessageDelivery = false,\n RedrivePolicy = redrivePolicy,\n Region = \"region\",\n SubscriptionRoleArn = \"subscriptionRoleArn\"\n};",
779 "version": "1"
780 },
781 "java": {
782 "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.sns.*;\n\nObject deliveryPolicy;\nObject filterPolicy;\nObject redrivePolicy;\n\nCfnSubscriptionProps cfnSubscriptionProps = CfnSubscriptionProps.builder()\n .protocol(\"protocol\")\n .topicArn(\"topicArn\")\n\n // the properties below are optional\n .deliveryPolicy(deliveryPolicy)\n .endpoint(\"endpoint\")\n .filterPolicy(filterPolicy)\n .rawMessageDelivery(false)\n .redrivePolicy(redrivePolicy)\n .region(\"region\")\n .subscriptionRoleArn(\"subscriptionRoleArn\")\n .build();",
783 "version": "1"
784 },
785 "go": {
786 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport sns \"github.com/aws-samples/dummy/awscdkawssns\"\n\nvar deliveryPolicy interface{}\nvar filterPolicy interface{}\nvar redrivePolicy interface{}\n\ncfnSubscriptionProps := &cfnSubscriptionProps{\n\tprotocol: jsii.String(\"protocol\"),\n\ttopicArn: jsii.String(\"topicArn\"),\n\n\t// the properties below are optional\n\tdeliveryPolicy: deliveryPolicy,\n\tendpoint: jsii.String(\"endpoint\"),\n\tfilterPolicy: filterPolicy,\n\trawMessageDelivery: jsii.Boolean(false),\n\tredrivePolicy: redrivePolicy,\n\tregion: jsii.String(\"region\"),\n\tsubscriptionRoleArn: jsii.String(\"subscriptionRoleArn\"),\n}",
787 "version": "1"
788 },
789 "$": {
790 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as sns from '@aws-cdk/aws-sns';\n\ndeclare const deliveryPolicy: any;\ndeclare const filterPolicy: any;\ndeclare const redrivePolicy: any;\nconst cfnSubscriptionProps: sns.CfnSubscriptionProps = {\n protocol: 'protocol',\n topicArn: 'topicArn',\n\n // the properties below are optional\n deliveryPolicy: deliveryPolicy,\n endpoint: 'endpoint',\n filterPolicy: filterPolicy,\n rawMessageDelivery: false,\n redrivePolicy: redrivePolicy,\n region: 'region',\n subscriptionRoleArn: 'subscriptionRoleArn',\n};",
791 "version": "0"
792 }
793 },
794 "location": {
795 "api": {
796 "api": "type",
797 "fqn": "@aws-cdk/aws-sns.CfnSubscriptionProps"
798 },
799 "field": {
800 "field": "example"
801 }
802 },
803 "didCompile": true,
804 "fqnsReferenced": [
805 "@aws-cdk/aws-sns.CfnSubscriptionProps"
806 ],
807 "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 sns from '@aws-cdk/aws-sns';\n\ndeclare const deliveryPolicy: any;\ndeclare const filterPolicy: any;\ndeclare const redrivePolicy: any;\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 cfnSubscriptionProps: sns.CfnSubscriptionProps = {\n protocol: 'protocol',\n topicArn: 'topicArn',\n\n // the properties below are optional\n deliveryPolicy: deliveryPolicy,\n endpoint: 'endpoint',\n filterPolicy: filterPolicy,\n rawMessageDelivery: false,\n redrivePolicy: redrivePolicy,\n region: 'region',\n subscriptionRoleArn: 'subscriptionRoleArn',\n};\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
808 "syntaxKindCounter": {
809 "10": 6,
810 "75": 19,
811 "91": 1,
812 "125": 3,
813 "130": 3,
814 "153": 1,
815 "169": 1,
816 "193": 1,
817 "225": 4,
818 "242": 4,
819 "243": 4,
820 "254": 1,
821 "255": 1,
822 "256": 1,
823 "281": 9,
824 "290": 1
825 },
826 "fqnsFingerprint": "0a13e824ec91c89df7f0a1235b67c52a7c3a8bcf1973e3bd99048f3b444e55fb"
827 },
828 "616b09eb8d710556b2cdef6d6106103bc40baf4c51984eec4c2d44bb326a5f9f": {
829 "translations": {
830 "python": {
831 "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_sns as sns\n\ncfn_topic = sns.CfnTopic(self, \"MyCfnTopic\",\n content_based_deduplication=False,\n display_name=\"displayName\",\n fifo_topic=False,\n kms_master_key_id=\"kmsMasterKeyId\",\n subscription=[sns.CfnTopic.SubscriptionProperty(\n endpoint=\"endpoint\",\n protocol=\"protocol\"\n )],\n tags=[CfnTag(\n key=\"key\",\n value=\"value\"\n )],\n topic_name=\"topicName\"\n)",
832 "version": "2"
833 },
834 "csharp": {
835 "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.SNS;\n\nCfnTopic cfnTopic = new CfnTopic(this, \"MyCfnTopic\", new CfnTopicProps {\n ContentBasedDeduplication = false,\n DisplayName = \"displayName\",\n FifoTopic = false,\n KmsMasterKeyId = \"kmsMasterKeyId\",\n Subscription = new [] { new SubscriptionProperty {\n Endpoint = \"endpoint\",\n Protocol = \"protocol\"\n } },\n Tags = new [] { new CfnTag {\n Key = \"key\",\n Value = \"value\"\n } },\n TopicName = \"topicName\"\n});",
836 "version": "1"
837 },
838 "java": {
839 "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.sns.*;\n\nCfnTopic cfnTopic = CfnTopic.Builder.create(this, \"MyCfnTopic\")\n .contentBasedDeduplication(false)\n .displayName(\"displayName\")\n .fifoTopic(false)\n .kmsMasterKeyId(\"kmsMasterKeyId\")\n .subscription(List.of(SubscriptionProperty.builder()\n .endpoint(\"endpoint\")\n .protocol(\"protocol\")\n .build()))\n .tags(List.of(CfnTag.builder()\n .key(\"key\")\n .value(\"value\")\n .build()))\n .topicName(\"topicName\")\n .build();",
840 "version": "1"
841 },
842 "go": {
843 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport sns \"github.com/aws-samples/dummy/awscdkawssns\"\n\ncfnTopic := sns.NewCfnTopic(this, jsii.String(\"MyCfnTopic\"), &cfnTopicProps{\n\tcontentBasedDeduplication: jsii.Boolean(false),\n\tdisplayName: jsii.String(\"displayName\"),\n\tfifoTopic: jsii.Boolean(false),\n\tkmsMasterKeyId: jsii.String(\"kmsMasterKeyId\"),\n\tsubscription: []interface{}{\n\t\t&subscriptionProperty{\n\t\t\tendpoint: jsii.String(\"endpoint\"),\n\t\t\tprotocol: jsii.String(\"protocol\"),\n\t\t},\n\t},\n\ttags: []cfnTag{\n\t\t&cfnTag{\n\t\t\tkey: jsii.String(\"key\"),\n\t\t\tvalue: jsii.String(\"value\"),\n\t\t},\n\t},\n\ttopicName: jsii.String(\"topicName\"),\n})",
844 "version": "1"
845 },
846 "$": {
847 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as sns from '@aws-cdk/aws-sns';\nconst cfnTopic = new sns.CfnTopic(this, 'MyCfnTopic', /* all optional props */ {\n contentBasedDeduplication: false,\n displayName: 'displayName',\n fifoTopic: false,\n kmsMasterKeyId: 'kmsMasterKeyId',\n subscription: [{\n endpoint: 'endpoint',\n protocol: 'protocol',\n }],\n tags: [{\n key: 'key',\n value: 'value',\n }],\n topicName: 'topicName',\n});",
848 "version": "0"
849 }
850 },
851 "location": {
852 "api": {
853 "api": "type",
854 "fqn": "@aws-cdk/aws-sns.CfnTopic"
855 },
856 "field": {
857 "field": "example"
858 }
859 },
860 "didCompile": true,
861 "fqnsReferenced": [
862 "@aws-cdk/aws-sns.CfnTopic",
863 "@aws-cdk/aws-sns.CfnTopicProps",
864 "@aws-cdk/core.Construct"
865 ],
866 "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 sns from '@aws-cdk/aws-sns';\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 cfnTopic = new sns.CfnTopic(this, 'MyCfnTopic', /* all optional props */ {\n contentBasedDeduplication: false,\n displayName: 'displayName',\n fifoTopic: false,\n kmsMasterKeyId: 'kmsMasterKeyId',\n subscription: [{\n endpoint: 'endpoint',\n protocol: 'protocol',\n }],\n tags: [{\n key: 'key',\n value: 'value',\n }],\n topicName: 'topicName',\n});\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
867 "syntaxKindCounter": {
868 "10": 9,
869 "75": 15,
870 "91": 2,
871 "104": 1,
872 "192": 2,
873 "193": 3,
874 "194": 1,
875 "197": 1,
876 "225": 1,
877 "242": 1,
878 "243": 1,
879 "254": 1,
880 "255": 1,
881 "256": 1,
882 "281": 11,
883 "290": 1
884 },
885 "fqnsFingerprint": "2226a271c628386f6b8f7e477a45a7a8c4e020cd51dee5c84c97b8d5b609556f"
886 },
887 "5715c90f5ace1fc60d1cea17a1948602e77c943631758eeaa82b54043760f927": {
888 "translations": {
889 "python": {
890 "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_sns as sns\n\nsubscription_property = sns.CfnTopic.SubscriptionProperty(\n endpoint=\"endpoint\",\n protocol=\"protocol\"\n)",
891 "version": "2"
892 },
893 "csharp": {
894 "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.SNS;\n\nSubscriptionProperty subscriptionProperty = new SubscriptionProperty {\n Endpoint = \"endpoint\",\n Protocol = \"protocol\"\n};",
895 "version": "1"
896 },
897 "java": {
898 "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.sns.*;\n\nSubscriptionProperty subscriptionProperty = SubscriptionProperty.builder()\n .endpoint(\"endpoint\")\n .protocol(\"protocol\")\n .build();",
899 "version": "1"
900 },
901 "go": {
902 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport sns \"github.com/aws-samples/dummy/awscdkawssns\"\n\nsubscriptionProperty := &subscriptionProperty{\n\tendpoint: jsii.String(\"endpoint\"),\n\tprotocol: jsii.String(\"protocol\"),\n}",
903 "version": "1"
904 },
905 "$": {
906 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as sns from '@aws-cdk/aws-sns';\nconst subscriptionProperty: sns.CfnTopic.SubscriptionProperty = {\n endpoint: 'endpoint',\n protocol: 'protocol',\n};",
907 "version": "0"
908 }
909 },
910 "location": {
911 "api": {
912 "api": "type",
913 "fqn": "@aws-cdk/aws-sns.CfnTopic.SubscriptionProperty"
914 },
915 "field": {
916 "field": "example"
917 }
918 },
919 "didCompile": true,
920 "fqnsReferenced": [
921 "@aws-cdk/aws-sns.CfnTopic.SubscriptionProperty"
922 ],
923 "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 sns from '@aws-cdk/aws-sns';\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 subscriptionProperty: sns.CfnTopic.SubscriptionProperty = {\n endpoint: 'endpoint',\n protocol: 'protocol',\n};\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
924 "syntaxKindCounter": {
925 "10": 3,
926 "75": 7,
927 "153": 2,
928 "169": 1,
929 "193": 1,
930 "225": 1,
931 "242": 1,
932 "243": 1,
933 "254": 1,
934 "255": 1,
935 "256": 1,
936 "281": 2,
937 "290": 1
938 },
939 "fqnsFingerprint": "8af81c3bf8d5ffac05cd1da0c0541e1d99ea4b71808441d800c80104fb26b9a3"
940 },
941 "26be30d930c405ce2afd6b29232a98229d88ba293ff210cfca88943e34c7adfe": {
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_sns as sns\n\n# policy_document: Any\n\ncfn_topic_policy = sns.CfnTopicPolicy(self, \"MyCfnTopicPolicy\",\n policy_document=policy_document,\n topics=[\"topics\"]\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.SNS;\n\nvar policyDocument;\n\nCfnTopicPolicy cfnTopicPolicy = new CfnTopicPolicy(this, \"MyCfnTopicPolicy\", new CfnTopicPolicyProps {\n PolicyDocument = policyDocument,\n Topics = new [] { \"topics\" }\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.sns.*;\n\nObject policyDocument;\n\nCfnTopicPolicy cfnTopicPolicy = CfnTopicPolicy.Builder.create(this, \"MyCfnTopicPolicy\")\n .policyDocument(policyDocument)\n .topics(List.of(\"topics\"))\n .build();",
953 "version": "1"
954 },
955 "go": {
956 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport sns \"github.com/aws-samples/dummy/awscdkawssns\"\n\nvar policyDocument interface{}\n\ncfnTopicPolicy := sns.NewCfnTopicPolicy(this, jsii.String(\"MyCfnTopicPolicy\"), &cfnTopicPolicyProps{\n\tpolicyDocument: policyDocument,\n\ttopics: []*string{\n\t\tjsii.String(\"topics\"),\n\t},\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 sns from '@aws-cdk/aws-sns';\n\ndeclare const policyDocument: any;\nconst cfnTopicPolicy = new sns.CfnTopicPolicy(this, 'MyCfnTopicPolicy', {\n policyDocument: policyDocument,\n topics: ['topics'],\n});",
961 "version": "0"
962 }
963 },
964 "location": {
965 "api": {
966 "api": "type",
967 "fqn": "@aws-cdk/aws-sns.CfnTopicPolicy"
968 },
969 "field": {
970 "field": "example"
971 }
972 },
973 "didCompile": true,
974 "fqnsReferenced": [
975 "@aws-cdk/aws-sns.CfnTopicPolicy",
976 "@aws-cdk/aws-sns.CfnTopicPolicyProps",
977 "@aws-cdk/core.Construct"
978 ],
979 "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 sns from '@aws-cdk/aws-sns';\n\ndeclare const policyDocument: any;\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 cfnTopicPolicy = new sns.CfnTopicPolicy(this, 'MyCfnTopicPolicy', {\n policyDocument: policyDocument,\n topics: ['topics'],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
980 "syntaxKindCounter": {
981 "10": 3,
982 "75": 8,
983 "104": 1,
984 "125": 1,
985 "130": 1,
986 "192": 1,
987 "193": 1,
988 "194": 1,
989 "197": 1,
990 "225": 2,
991 "242": 2,
992 "243": 2,
993 "254": 1,
994 "255": 1,
995 "256": 1,
996 "281": 2,
997 "290": 1
998 },
999 "fqnsFingerprint": "e1b86f18f8ffcd1924e32cf39238d6e9f38c7960282f9bb9f4112f7172b4efaf"
1000 },
1001 "eaeb499176806eddece67163efe69d11606caa1aeffd6b928ab3338101b8c2bc": {
1002 "translations": {
1003 "python": {
1004 "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_sns as sns\n\n# policy_document: Any\n\ncfn_topic_policy_props = sns.CfnTopicPolicyProps(\n policy_document=policy_document,\n topics=[\"topics\"]\n)",
1005 "version": "2"
1006 },
1007 "csharp": {
1008 "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.SNS;\n\nvar policyDocument;\n\nCfnTopicPolicyProps cfnTopicPolicyProps = new CfnTopicPolicyProps {\n PolicyDocument = policyDocument,\n Topics = new [] { \"topics\" }\n};",
1009 "version": "1"
1010 },
1011 "java": {
1012 "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.sns.*;\n\nObject policyDocument;\n\nCfnTopicPolicyProps cfnTopicPolicyProps = CfnTopicPolicyProps.builder()\n .policyDocument(policyDocument)\n .topics(List.of(\"topics\"))\n .build();",
1013 "version": "1"
1014 },
1015 "go": {
1016 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport sns \"github.com/aws-samples/dummy/awscdkawssns\"\n\nvar policyDocument interface{}\n\ncfnTopicPolicyProps := &cfnTopicPolicyProps{\n\tpolicyDocument: policyDocument,\n\ttopics: []*string{\n\t\tjsii.String(\"topics\"),\n\t},\n}",
1017 "version": "1"
1018 },
1019 "$": {
1020 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as sns from '@aws-cdk/aws-sns';\n\ndeclare const policyDocument: any;\nconst cfnTopicPolicyProps: sns.CfnTopicPolicyProps = {\n policyDocument: policyDocument,\n topics: ['topics'],\n};",
1021 "version": "0"
1022 }
1023 },
1024 "location": {
1025 "api": {
1026 "api": "type",
1027 "fqn": "@aws-cdk/aws-sns.CfnTopicPolicyProps"
1028 },
1029 "field": {
1030 "field": "example"
1031 }
1032 },
1033 "didCompile": true,
1034 "fqnsReferenced": [
1035 "@aws-cdk/aws-sns.CfnTopicPolicyProps"
1036 ],
1037 "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 sns from '@aws-cdk/aws-sns';\n\ndeclare const policyDocument: any;\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 cfnTopicPolicyProps: sns.CfnTopicPolicyProps = {\n policyDocument: policyDocument,\n topics: ['topics'],\n};\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
1038 "syntaxKindCounter": {
1039 "10": 2,
1040 "75": 8,
1041 "125": 1,
1042 "130": 1,
1043 "153": 1,
1044 "169": 1,
1045 "192": 1,
1046 "193": 1,
1047 "225": 2,
1048 "242": 2,
1049 "243": 2,
1050 "254": 1,
1051 "255": 1,
1052 "256": 1,
1053 "281": 2,
1054 "290": 1
1055 },
1056 "fqnsFingerprint": "0f5812ef22b64abc46ad91a6eb1a595bbb302f9cc270e7729ac8553fbae96172"
1057 },
1058 "1d76b5ad9ecbccb622f01fdb73440518afd31772f8f507dd3f53a4c12db37aae": {
1059 "translations": {
1060 "python": {
1061 "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_sns as sns\n\ncfn_topic_props = sns.CfnTopicProps(\n content_based_deduplication=False,\n display_name=\"displayName\",\n fifo_topic=False,\n kms_master_key_id=\"kmsMasterKeyId\",\n subscription=[sns.CfnTopic.SubscriptionProperty(\n endpoint=\"endpoint\",\n protocol=\"protocol\"\n )],\n tags=[CfnTag(\n key=\"key\",\n value=\"value\"\n )],\n topic_name=\"topicName\"\n)",
1062 "version": "2"
1063 },
1064 "csharp": {
1065 "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.SNS;\n\nCfnTopicProps cfnTopicProps = new CfnTopicProps {\n ContentBasedDeduplication = false,\n DisplayName = \"displayName\",\n FifoTopic = false,\n KmsMasterKeyId = \"kmsMasterKeyId\",\n Subscription = new [] { new SubscriptionProperty {\n Endpoint = \"endpoint\",\n Protocol = \"protocol\"\n } },\n Tags = new [] { new CfnTag {\n Key = \"key\",\n Value = \"value\"\n } },\n TopicName = \"topicName\"\n};",
1066 "version": "1"
1067 },
1068 "java": {
1069 "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.sns.*;\n\nCfnTopicProps cfnTopicProps = CfnTopicProps.builder()\n .contentBasedDeduplication(false)\n .displayName(\"displayName\")\n .fifoTopic(false)\n .kmsMasterKeyId(\"kmsMasterKeyId\")\n .subscription(List.of(SubscriptionProperty.builder()\n .endpoint(\"endpoint\")\n .protocol(\"protocol\")\n .build()))\n .tags(List.of(CfnTag.builder()\n .key(\"key\")\n .value(\"value\")\n .build()))\n .topicName(\"topicName\")\n .build();",
1070 "version": "1"
1071 },
1072 "go": {
1073 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport sns \"github.com/aws-samples/dummy/awscdkawssns\"\n\ncfnTopicProps := &cfnTopicProps{\n\tcontentBasedDeduplication: jsii.Boolean(false),\n\tdisplayName: jsii.String(\"displayName\"),\n\tfifoTopic: jsii.Boolean(false),\n\tkmsMasterKeyId: jsii.String(\"kmsMasterKeyId\"),\n\tsubscription: []interface{}{\n\t\t&subscriptionProperty{\n\t\t\tendpoint: jsii.String(\"endpoint\"),\n\t\t\tprotocol: jsii.String(\"protocol\"),\n\t\t},\n\t},\n\ttags: []cfnTag{\n\t\t&cfnTag{\n\t\t\tkey: jsii.String(\"key\"),\n\t\t\tvalue: jsii.String(\"value\"),\n\t\t},\n\t},\n\ttopicName: jsii.String(\"topicName\"),\n}",
1074 "version": "1"
1075 },
1076 "$": {
1077 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as sns from '@aws-cdk/aws-sns';\nconst cfnTopicProps: sns.CfnTopicProps = {\n contentBasedDeduplication: false,\n displayName: 'displayName',\n fifoTopic: false,\n kmsMasterKeyId: 'kmsMasterKeyId',\n subscription: [{\n endpoint: 'endpoint',\n protocol: 'protocol',\n }],\n tags: [{\n key: 'key',\n value: 'value',\n }],\n topicName: 'topicName',\n};",
1078 "version": "0"
1079 }
1080 },
1081 "location": {
1082 "api": {
1083 "api": "type",
1084 "fqn": "@aws-cdk/aws-sns.CfnTopicProps"
1085 },
1086 "field": {
1087 "field": "example"
1088 }
1089 },
1090 "didCompile": true,
1091 "fqnsReferenced": [
1092 "@aws-cdk/aws-sns.CfnTopicProps"
1093 ],
1094 "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 sns from '@aws-cdk/aws-sns';\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 cfnTopicProps: sns.CfnTopicProps = {\n contentBasedDeduplication: false,\n displayName: 'displayName',\n fifoTopic: false,\n kmsMasterKeyId: 'kmsMasterKeyId',\n subscription: [{\n endpoint: 'endpoint',\n protocol: 'protocol',\n }],\n tags: [{\n key: 'key',\n value: 'value',\n }],\n topicName: 'topicName',\n};\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
1095 "syntaxKindCounter": {
1096 "10": 8,
1097 "75": 15,
1098 "91": 2,
1099 "153": 1,
1100 "169": 1,
1101 "192": 2,
1102 "193": 3,
1103 "225": 1,
1104 "242": 1,
1105 "243": 1,
1106 "254": 1,
1107 "255": 1,
1108 "256": 1,
1109 "281": 11,
1110 "290": 1
1111 },
1112 "fqnsFingerprint": "663df7037874abd83fe7d453f9e0518a19a3bf93b6514a33dd03b2af201e4ba9"
1113 },
1114 "522037a7b5219b1d22d1989898cf6a471412dda8b9c7aefb5a70435aeffe9595": {
1115 "translations": {
1116 "python": {
1117 "source": "import aws_cdk.aws_lambda as lambda_\n# fn: lambda.Function\n\n\nmy_topic = sns.Topic(self, \"MyTopic\")\n\n# Lambda should receive only message matching the following conditions on attributes:\n# color: 'red' or 'orange' or begins with 'bl'\n# size: anything but 'small' or 'medium'\n# price: between 100 and 200 or greater than 300\n# store: attribute must be present\nmy_topic.add_subscription(subscriptions.LambdaSubscription(fn,\n filter_policy={\n \"color\": sns.SubscriptionFilter.string_filter(\n allowlist=[\"red\", \"orange\"],\n match_prefixes=[\"bl\"]\n ),\n \"size\": sns.SubscriptionFilter.string_filter(\n denylist=[\"small\", \"medium\"]\n ),\n \"price\": sns.SubscriptionFilter.numeric_filter(\n between=sns.BetweenCondition(start=100, stop=200),\n greater_than=300\n ),\n \"store\": sns.SubscriptionFilter.exists_filter()\n }\n))",
1118 "version": "2"
1119 },
1120 "csharp": {
1121 "source": "using Amazon.CDK.AWS.Lambda;\nFunction fn;\n\n\nTopic myTopic = new Topic(this, \"MyTopic\");\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.AddSubscription(new LambdaSubscription(fn, new LambdaSubscriptionProps {\n FilterPolicy = new Dictionary<string, SubscriptionFilter> {\n { \"color\", SubscriptionFilter.StringFilter(new StringConditions {\n Allowlist = new [] { \"red\", \"orange\" },\n MatchPrefixes = new [] { \"bl\" }\n }) },\n { \"size\", SubscriptionFilter.StringFilter(new StringConditions {\n Denylist = new [] { \"small\", \"medium\" }\n }) },\n { \"price\", SubscriptionFilter.NumericFilter(new NumericConditions {\n Between = new BetweenCondition { Start = 100, Stop = 200 },\n GreaterThan = 300\n }) },\n { \"store\", SubscriptionFilter.ExistsFilter() }\n }\n}));",
1122 "version": "1"
1123 },
1124 "java": {
1125 "source": "import software.amazon.awscdk.services.lambda.*;\nFunction fn;\n\n\nTopic myTopic = new Topic(this, \"MyTopic\");\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(LambdaSubscription.Builder.create(fn)\n .filterPolicy(Map.of(\n \"color\", SubscriptionFilter.stringFilter(StringConditions.builder()\n .allowlist(List.of(\"red\", \"orange\"))\n .matchPrefixes(List.of(\"bl\"))\n .build()),\n \"size\", SubscriptionFilter.stringFilter(StringConditions.builder()\n .denylist(List.of(\"small\", \"medium\"))\n .build()),\n \"price\", SubscriptionFilter.numericFilter(NumericConditions.builder()\n .between(BetweenCondition.builder().start(100).stop(200).build())\n .greaterThan(300)\n .build()),\n \"store\", SubscriptionFilter.existsFilter()))\n .build());",
1126 "version": "1"
1127 },
1128 "go": {
1129 "source": "import lambda \"github.com/aws-samples/dummy/awscdkawslambda\"\nvar fn function\n\n\nmyTopic := sns.NewTopic(this, jsii.String(\"MyTopic\"))\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(subscriptions.NewLambdaSubscription(fn, &lambdaSubscriptionProps{\n\tfilterPolicy: map[string]subscriptionFilter{\n\t\t\"color\": sns.*subscriptionFilter.stringFilter(&StringConditions{\n\t\t\t\"allowlist\": []*string{\n\t\t\t\tjsii.String(\"red\"),\n\t\t\t\tjsii.String(\"orange\"),\n\t\t\t},\n\t\t\t\"matchPrefixes\": []*string{\n\t\t\t\tjsii.String(\"bl\"),\n\t\t\t},\n\t\t}),\n\t\t\"size\": sns.*subscriptionFilter.stringFilter(&StringConditions{\n\t\t\t\"denylist\": []*string{\n\t\t\t\tjsii.String(\"small\"),\n\t\t\t\tjsii.String(\"medium\"),\n\t\t\t},\n\t\t}),\n\t\t\"price\": sns.*subscriptionFilter.numericFilter(&NumericConditions{\n\t\t\t\"between\": &BetweenCondition{\n\t\t\t\t\"start\": jsii.Number(100),\n\t\t\t\t\"stop\": jsii.Number(200),\n\t\t\t},\n\t\t\t\"greaterThan\": jsii.Number(300),\n\t\t}),\n\t\t\"store\": sns.*subscriptionFilter.existsFilter(),\n\t},\n}))",
1130 "version": "1"
1131 },
1132 "$": {
1133 "source": "import * as lambda from '@aws-cdk/aws-lambda';\n\nconst myTopic = new sns.Topic(this, 'MyTopic');\ndeclare const fn: lambda.Function;\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(new subscriptions.LambdaSubscription(fn, {\n filterPolicy: {\n color: sns.SubscriptionFilter.stringFilter({\n allowlist: ['red', 'orange'],\n matchPrefixes: ['bl'],\n }),\n size: sns.SubscriptionFilter.stringFilter({\n denylist: ['small', 'medium'],\n }),\n price: sns.SubscriptionFilter.numericFilter({\n between: { start: 100, stop: 200 },\n greaterThan: 300,\n }),\n store: sns.SubscriptionFilter.existsFilter(),\n },\n}));",
1134 "version": "0"
1135 }
1136 },
1137 "location": {
1138 "api": {
1139 "api": "type",
1140 "fqn": "@aws-cdk/aws-sns.NumericConditions"
1141 },
1142 "field": {
1143 "field": "example"
1144 }
1145 },
1146 "didCompile": true,
1147 "fqnsReferenced": [
1148 "@aws-cdk/aws-lambda.IFunction",
1149 "@aws-cdk/aws-sns-subscriptions.LambdaSubscription",
1150 "@aws-cdk/aws-sns-subscriptions.LambdaSubscriptionProps",
1151 "@aws-cdk/aws-sns.BetweenCondition",
1152 "@aws-cdk/aws-sns.ITopicSubscription",
1153 "@aws-cdk/aws-sns.NumericConditions",
1154 "@aws-cdk/aws-sns.StringConditions",
1155 "@aws-cdk/aws-sns.SubscriptionFilter",
1156 "@aws-cdk/aws-sns.SubscriptionFilter#existsFilter",
1157 "@aws-cdk/aws-sns.SubscriptionFilter#numericFilter",
1158 "@aws-cdk/aws-sns.SubscriptionFilter#stringFilter",
1159 "@aws-cdk/aws-sns.Topic",
1160 "@aws-cdk/aws-sns.TopicBase#addSubscription",
1161 "constructs.Construct"
1162 ],
1163 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport * as lambda from '@aws-cdk/aws-lambda';\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 { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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 myTopic = new sns.Topic(this, 'MyTopic');\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(new subscriptions.LambdaSubscription(fn, {\n filterPolicy: {\n color: sns.SubscriptionFilter.stringFilter({\n allowlist: ['red', 'orange'],\n matchPrefixes: ['bl'],\n }),\n size: sns.SubscriptionFilter.stringFilter({\n denylist: ['small', 'medium'],\n }),\n price: sns.SubscriptionFilter.numericFilter({\n between: { start: 100, stop: 200 },\n greaterThan: 300,\n }),\n store: sns.SubscriptionFilter.existsFilter(),\n },\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
1164 "syntaxKindCounter": {
1165 "8": 3,
1166 "10": 7,
1167 "75": 36,
1168 "104": 1,
1169 "130": 1,
1170 "153": 1,
1171 "169": 1,
1172 "192": 3,
1173 "193": 6,
1174 "194": 11,
1175 "196": 5,
1176 "197": 2,
1177 "225": 2,
1178 "226": 1,
1179 "242": 2,
1180 "243": 2,
1181 "254": 1,
1182 "255": 1,
1183 "256": 1,
1184 "281": 12,
1185 "290": 1
1186 },
1187 "fqnsFingerprint": "8c7bb70023359406a1af025ccc8fbedda44119aa7e8437c102325097a1e294e1"
1188 },
1189 "87cde21a762c40c2eee8026fa61d60f94443b85f721a562633fb47cfb0fe5be3": {
1190 "translations": {
1191 "python": {
1192 "source": "import aws_cdk.aws_lambda as lambda_\n# fn: lambda.Function\n\n\nmy_topic = sns.Topic(self, \"MyTopic\")\n\n# Lambda should receive only message matching the following conditions on attributes:\n# color: 'red' or 'orange' or begins with 'bl'\n# size: anything but 'small' or 'medium'\n# price: between 100 and 200 or greater than 300\n# store: attribute must be present\nmy_topic.add_subscription(subscriptions.LambdaSubscription(fn,\n filter_policy={\n \"color\": sns.SubscriptionFilter.string_filter(\n allowlist=[\"red\", \"orange\"],\n match_prefixes=[\"bl\"]\n ),\n \"size\": sns.SubscriptionFilter.string_filter(\n denylist=[\"small\", \"medium\"]\n ),\n \"price\": sns.SubscriptionFilter.numeric_filter(\n between=sns.BetweenCondition(start=100, stop=200),\n greater_than=300\n ),\n \"store\": sns.SubscriptionFilter.exists_filter()\n }\n))",
1193 "version": "2"
1194 },
1195 "csharp": {
1196 "source": "using Amazon.CDK.AWS.Lambda;\nFunction fn;\n\n\nTopic myTopic = new Topic(this, \"MyTopic\");\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.AddSubscription(new LambdaSubscription(fn, new LambdaSubscriptionProps {\n FilterPolicy = new Dictionary<string, SubscriptionFilter> {\n { \"color\", SubscriptionFilter.StringFilter(new StringConditions {\n Allowlist = new [] { \"red\", \"orange\" },\n MatchPrefixes = new [] { \"bl\" }\n }) },\n { \"size\", SubscriptionFilter.StringFilter(new StringConditions {\n Denylist = new [] { \"small\", \"medium\" }\n }) },\n { \"price\", SubscriptionFilter.NumericFilter(new NumericConditions {\n Between = new BetweenCondition { Start = 100, Stop = 200 },\n GreaterThan = 300\n }) },\n { \"store\", SubscriptionFilter.ExistsFilter() }\n }\n}));",
1197 "version": "1"
1198 },
1199 "java": {
1200 "source": "import software.amazon.awscdk.services.lambda.*;\nFunction fn;\n\n\nTopic myTopic = new Topic(this, \"MyTopic\");\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(LambdaSubscription.Builder.create(fn)\n .filterPolicy(Map.of(\n \"color\", SubscriptionFilter.stringFilter(StringConditions.builder()\n .allowlist(List.of(\"red\", \"orange\"))\n .matchPrefixes(List.of(\"bl\"))\n .build()),\n \"size\", SubscriptionFilter.stringFilter(StringConditions.builder()\n .denylist(List.of(\"small\", \"medium\"))\n .build()),\n \"price\", SubscriptionFilter.numericFilter(NumericConditions.builder()\n .between(BetweenCondition.builder().start(100).stop(200).build())\n .greaterThan(300)\n .build()),\n \"store\", SubscriptionFilter.existsFilter()))\n .build());",
1201 "version": "1"
1202 },
1203 "go": {
1204 "source": "import lambda \"github.com/aws-samples/dummy/awscdkawslambda\"\nvar fn function\n\n\nmyTopic := sns.NewTopic(this, jsii.String(\"MyTopic\"))\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(subscriptions.NewLambdaSubscription(fn, &lambdaSubscriptionProps{\n\tfilterPolicy: map[string]subscriptionFilter{\n\t\t\"color\": sns.*subscriptionFilter.stringFilter(&StringConditions{\n\t\t\t\"allowlist\": []*string{\n\t\t\t\tjsii.String(\"red\"),\n\t\t\t\tjsii.String(\"orange\"),\n\t\t\t},\n\t\t\t\"matchPrefixes\": []*string{\n\t\t\t\tjsii.String(\"bl\"),\n\t\t\t},\n\t\t}),\n\t\t\"size\": sns.*subscriptionFilter.stringFilter(&StringConditions{\n\t\t\t\"denylist\": []*string{\n\t\t\t\tjsii.String(\"small\"),\n\t\t\t\tjsii.String(\"medium\"),\n\t\t\t},\n\t\t}),\n\t\t\"price\": sns.*subscriptionFilter.numericFilter(&NumericConditions{\n\t\t\t\"between\": &BetweenCondition{\n\t\t\t\t\"start\": jsii.Number(100),\n\t\t\t\t\"stop\": jsii.Number(200),\n\t\t\t},\n\t\t\t\"greaterThan\": jsii.Number(300),\n\t\t}),\n\t\t\"store\": sns.*subscriptionFilter.existsFilter(),\n\t},\n}))",
1205 "version": "1"
1206 },
1207 "$": {
1208 "source": "import * as lambda from '@aws-cdk/aws-lambda';\n\nconst myTopic = new sns.Topic(this, 'MyTopic');\ndeclare const fn: lambda.Function;\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(new subscriptions.LambdaSubscription(fn, {\n filterPolicy: {\n color: sns.SubscriptionFilter.stringFilter({\n allowlist: ['red', 'orange'],\n matchPrefixes: ['bl'],\n }),\n size: sns.SubscriptionFilter.stringFilter({\n denylist: ['small', 'medium'],\n }),\n price: sns.SubscriptionFilter.numericFilter({\n between: { start: 100, stop: 200 },\n greaterThan: 300,\n }),\n store: sns.SubscriptionFilter.existsFilter(),\n },\n}));",
1209 "version": "0"
1210 }
1211 },
1212 "location": {
1213 "api": {
1214 "api": "type",
1215 "fqn": "@aws-cdk/aws-sns.StringConditions"
1216 },
1217 "field": {
1218 "field": "example"
1219 }
1220 },
1221 "didCompile": true,
1222 "fqnsReferenced": [
1223 "@aws-cdk/aws-lambda.IFunction",
1224 "@aws-cdk/aws-sns-subscriptions.LambdaSubscription",
1225 "@aws-cdk/aws-sns-subscriptions.LambdaSubscriptionProps",
1226 "@aws-cdk/aws-sns.BetweenCondition",
1227 "@aws-cdk/aws-sns.ITopicSubscription",
1228 "@aws-cdk/aws-sns.NumericConditions",
1229 "@aws-cdk/aws-sns.StringConditions",
1230 "@aws-cdk/aws-sns.SubscriptionFilter",
1231 "@aws-cdk/aws-sns.SubscriptionFilter#existsFilter",
1232 "@aws-cdk/aws-sns.SubscriptionFilter#numericFilter",
1233 "@aws-cdk/aws-sns.SubscriptionFilter#stringFilter",
1234 "@aws-cdk/aws-sns.Topic",
1235 "@aws-cdk/aws-sns.TopicBase#addSubscription",
1236 "constructs.Construct"
1237 ],
1238 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport * as lambda from '@aws-cdk/aws-lambda';\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 { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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 myTopic = new sns.Topic(this, 'MyTopic');\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(new subscriptions.LambdaSubscription(fn, {\n filterPolicy: {\n color: sns.SubscriptionFilter.stringFilter({\n allowlist: ['red', 'orange'],\n matchPrefixes: ['bl'],\n }),\n size: sns.SubscriptionFilter.stringFilter({\n denylist: ['small', 'medium'],\n }),\n price: sns.SubscriptionFilter.numericFilter({\n between: { start: 100, stop: 200 },\n greaterThan: 300,\n }),\n store: sns.SubscriptionFilter.existsFilter(),\n },\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
1239 "syntaxKindCounter": {
1240 "8": 3,
1241 "10": 7,
1242 "75": 36,
1243 "104": 1,
1244 "130": 1,
1245 "153": 1,
1246 "169": 1,
1247 "192": 3,
1248 "193": 6,
1249 "194": 11,
1250 "196": 5,
1251 "197": 2,
1252 "225": 2,
1253 "226": 1,
1254 "242": 2,
1255 "243": 2,
1256 "254": 1,
1257 "255": 1,
1258 "256": 1,
1259 "281": 12,
1260 "290": 1
1261 },
1262 "fqnsFingerprint": "8c7bb70023359406a1af025ccc8fbedda44119aa7e8437c102325097a1e294e1"
1263 },
1264 "09da8fc9b5f91845f94248af9bc77e880a8333c8e1f006aaccaa6b8b0f0abe0f": {
1265 "translations": {
1266 "python": {
1267 "source": "from aws_cdk.aws_kinesisfirehose import DeliveryStream\n# stream: DeliveryStream\n\n\ntopic = sns.Topic(self, \"Topic\")\n\nsns.Subscription(self, \"Subscription\",\n topic=topic,\n endpoint=stream.delivery_stream_arn,\n protocol=sns.SubscriptionProtocol.FIREHOSE,\n subscription_role_arn=\"SAMPLE_ARN\"\n)",
1268 "version": "2"
1269 },
1270 "csharp": {
1271 "source": "using Amazon.CDK.AWS.KinesisFirehose;\nDeliveryStream stream;\n\n\nTopic topic = new Topic(this, \"Topic\");\n\nnew Subscription(this, \"Subscription\", new SubscriptionProps {\n Topic = topic,\n Endpoint = stream.DeliveryStreamArn,\n Protocol = SubscriptionProtocol.FIREHOSE,\n SubscriptionRoleArn = \"SAMPLE_ARN\"\n});",
1272 "version": "1"
1273 },
1274 "java": {
1275 "source": "import software.amazon.awscdk.services.kinesisfirehose.DeliveryStream;\nDeliveryStream stream;\n\n\nTopic topic = new Topic(this, \"Topic\");\n\nSubscription.Builder.create(this, \"Subscription\")\n .topic(topic)\n .endpoint(stream.getDeliveryStreamArn())\n .protocol(SubscriptionProtocol.FIREHOSE)\n .subscriptionRoleArn(\"SAMPLE_ARN\")\n .build();",
1276 "version": "1"
1277 },
1278 "go": {
1279 "source": "import \"github.com/aws-samples/dummy/awscdkawskinesisfirehose\"\nvar stream deliveryStream\n\n\ntopic := sns.NewTopic(this, jsii.String(\"Topic\"))\n\nsns.NewSubscription(this, jsii.String(\"Subscription\"), &subscriptionProps{\n\ttopic: topic,\n\tendpoint: stream.deliveryStreamArn,\n\tprotocol: sns.subscriptionProtocol_FIREHOSE,\n\tsubscriptionRoleArn: jsii.String(\"SAMPLE_ARN\"),\n})",
1280 "version": "1"
1281 },
1282 "$": {
1283 "source": "import { DeliveryStream } from '@aws-cdk/aws-kinesisfirehose';\n\nconst topic = new sns.Topic(this, 'Topic');\ndeclare const stream: DeliveryStream;\n\nnew sns.Subscription(this, 'Subscription', {\n topic,\n endpoint: stream.deliveryStreamArn,\n protocol: sns.SubscriptionProtocol.FIREHOSE,\n subscriptionRoleArn: \"SAMPLE_ARN\", //role with permissions to send messages to a firehose delivery stream\n});",
1284 "version": "0"
1285 }
1286 },
1287 "location": {
1288 "api": {
1289 "api": "type",
1290 "fqn": "@aws-cdk/aws-sns.Subscription"
1291 },
1292 "field": {
1293 "field": "example"
1294 }
1295 },
1296 "didCompile": true,
1297 "fqnsReferenced": [
1298 "@aws-cdk/aws-kinesisfirehose.DeliveryStream#deliveryStreamArn",
1299 "@aws-cdk/aws-sns.ITopic",
1300 "@aws-cdk/aws-sns.Subscription",
1301 "@aws-cdk/aws-sns.SubscriptionProps",
1302 "@aws-cdk/aws-sns.SubscriptionProtocol",
1303 "@aws-cdk/aws-sns.SubscriptionProtocol#FIREHOSE",
1304 "@aws-cdk/aws-sns.Topic",
1305 "constructs.Construct"
1306 ],
1307 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport { DeliveryStream } from '@aws-cdk/aws-kinesisfirehose';\ndeclare const stream: DeliveryStream;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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');\n\nnew sns.Subscription(this, 'Subscription', {\n topic,\n endpoint: stream.deliveryStreamArn,\n protocol: sns.SubscriptionProtocol.FIREHOSE,\n subscriptionRoleArn: \"SAMPLE_ARN\", //role with permissions to send messages to a firehose delivery stream\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
1308 "syntaxKindCounter": {
1309 "10": 4,
1310 "75": 17,
1311 "104": 2,
1312 "130": 1,
1313 "169": 1,
1314 "193": 1,
1315 "194": 5,
1316 "197": 2,
1317 "225": 2,
1318 "226": 1,
1319 "242": 2,
1320 "243": 2,
1321 "254": 1,
1322 "255": 1,
1323 "257": 1,
1324 "258": 1,
1325 "281": 3,
1326 "282": 1,
1327 "290": 1
1328 },
1329 "fqnsFingerprint": "0b01253a8661d373574601f65574702fd651ca8b920f52dff8c1d705984f2b65"
1330 },
1331 "7c8d1a93047c3e3f44226fdd5051ed9e3e8aeaf651eaf54bba37b17a05b83cec": {
1332 "translations": {
1333 "python": {
1334 "source": "import aws_cdk.aws_lambda as lambda_\n# fn: lambda.Function\n\n\nmy_topic = sns.Topic(self, \"MyTopic\")\n\n# Lambda should receive only message matching the following conditions on attributes:\n# color: 'red' or 'orange' or begins with 'bl'\n# size: anything but 'small' or 'medium'\n# price: between 100 and 200 or greater than 300\n# store: attribute must be present\nmy_topic.add_subscription(subscriptions.LambdaSubscription(fn,\n filter_policy={\n \"color\": sns.SubscriptionFilter.string_filter(\n allowlist=[\"red\", \"orange\"],\n match_prefixes=[\"bl\"]\n ),\n \"size\": sns.SubscriptionFilter.string_filter(\n denylist=[\"small\", \"medium\"]\n ),\n \"price\": sns.SubscriptionFilter.numeric_filter(\n between=sns.BetweenCondition(start=100, stop=200),\n greater_than=300\n ),\n \"store\": sns.SubscriptionFilter.exists_filter()\n }\n))",
1335 "version": "2"
1336 },
1337 "csharp": {
1338 "source": "using Amazon.CDK.AWS.Lambda;\nFunction fn;\n\n\nTopic myTopic = new Topic(this, \"MyTopic\");\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.AddSubscription(new LambdaSubscription(fn, new LambdaSubscriptionProps {\n FilterPolicy = new Dictionary<string, SubscriptionFilter> {\n { \"color\", SubscriptionFilter.StringFilter(new StringConditions {\n Allowlist = new [] { \"red\", \"orange\" },\n MatchPrefixes = new [] { \"bl\" }\n }) },\n { \"size\", SubscriptionFilter.StringFilter(new StringConditions {\n Denylist = new [] { \"small\", \"medium\" }\n }) },\n { \"price\", SubscriptionFilter.NumericFilter(new NumericConditions {\n Between = new BetweenCondition { Start = 100, Stop = 200 },\n GreaterThan = 300\n }) },\n { \"store\", SubscriptionFilter.ExistsFilter() }\n }\n}));",
1339 "version": "1"
1340 },
1341 "java": {
1342 "source": "import software.amazon.awscdk.services.lambda.*;\nFunction fn;\n\n\nTopic myTopic = new Topic(this, \"MyTopic\");\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(LambdaSubscription.Builder.create(fn)\n .filterPolicy(Map.of(\n \"color\", SubscriptionFilter.stringFilter(StringConditions.builder()\n .allowlist(List.of(\"red\", \"orange\"))\n .matchPrefixes(List.of(\"bl\"))\n .build()),\n \"size\", SubscriptionFilter.stringFilter(StringConditions.builder()\n .denylist(List.of(\"small\", \"medium\"))\n .build()),\n \"price\", SubscriptionFilter.numericFilter(NumericConditions.builder()\n .between(BetweenCondition.builder().start(100).stop(200).build())\n .greaterThan(300)\n .build()),\n \"store\", SubscriptionFilter.existsFilter()))\n .build());",
1343 "version": "1"
1344 },
1345 "go": {
1346 "source": "import lambda \"github.com/aws-samples/dummy/awscdkawslambda\"\nvar fn function\n\n\nmyTopic := sns.NewTopic(this, jsii.String(\"MyTopic\"))\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(subscriptions.NewLambdaSubscription(fn, &lambdaSubscriptionProps{\n\tfilterPolicy: map[string]subscriptionFilter{\n\t\t\"color\": sns.*subscriptionFilter.stringFilter(&StringConditions{\n\t\t\t\"allowlist\": []*string{\n\t\t\t\tjsii.String(\"red\"),\n\t\t\t\tjsii.String(\"orange\"),\n\t\t\t},\n\t\t\t\"matchPrefixes\": []*string{\n\t\t\t\tjsii.String(\"bl\"),\n\t\t\t},\n\t\t}),\n\t\t\"size\": sns.*subscriptionFilter.stringFilter(&StringConditions{\n\t\t\t\"denylist\": []*string{\n\t\t\t\tjsii.String(\"small\"),\n\t\t\t\tjsii.String(\"medium\"),\n\t\t\t},\n\t\t}),\n\t\t\"price\": sns.*subscriptionFilter.numericFilter(&NumericConditions{\n\t\t\t\"between\": &BetweenCondition{\n\t\t\t\t\"start\": jsii.Number(100),\n\t\t\t\t\"stop\": jsii.Number(200),\n\t\t\t},\n\t\t\t\"greaterThan\": jsii.Number(300),\n\t\t}),\n\t\t\"store\": sns.*subscriptionFilter.existsFilter(),\n\t},\n}))",
1347 "version": "1"
1348 },
1349 "$": {
1350 "source": "import * as lambda from '@aws-cdk/aws-lambda';\n\nconst myTopic = new sns.Topic(this, 'MyTopic');\ndeclare const fn: lambda.Function;\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(new subscriptions.LambdaSubscription(fn, {\n filterPolicy: {\n color: sns.SubscriptionFilter.stringFilter({\n allowlist: ['red', 'orange'],\n matchPrefixes: ['bl'],\n }),\n size: sns.SubscriptionFilter.stringFilter({\n denylist: ['small', 'medium'],\n }),\n price: sns.SubscriptionFilter.numericFilter({\n between: { start: 100, stop: 200 },\n greaterThan: 300,\n }),\n store: sns.SubscriptionFilter.existsFilter(),\n },\n}));",
1351 "version": "0"
1352 }
1353 },
1354 "location": {
1355 "api": {
1356 "api": "type",
1357 "fqn": "@aws-cdk/aws-sns.SubscriptionFilter"
1358 },
1359 "field": {
1360 "field": "example"
1361 }
1362 },
1363 "didCompile": true,
1364 "fqnsReferenced": [
1365 "@aws-cdk/aws-lambda.IFunction",
1366 "@aws-cdk/aws-sns-subscriptions.LambdaSubscription",
1367 "@aws-cdk/aws-sns-subscriptions.LambdaSubscriptionProps",
1368 "@aws-cdk/aws-sns.BetweenCondition",
1369 "@aws-cdk/aws-sns.ITopicSubscription",
1370 "@aws-cdk/aws-sns.NumericConditions",
1371 "@aws-cdk/aws-sns.StringConditions",
1372 "@aws-cdk/aws-sns.SubscriptionFilter",
1373 "@aws-cdk/aws-sns.SubscriptionFilter#existsFilter",
1374 "@aws-cdk/aws-sns.SubscriptionFilter#numericFilter",
1375 "@aws-cdk/aws-sns.SubscriptionFilter#stringFilter",
1376 "@aws-cdk/aws-sns.Topic",
1377 "@aws-cdk/aws-sns.TopicBase#addSubscription",
1378 "constructs.Construct"
1379 ],
1380 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport * as lambda from '@aws-cdk/aws-lambda';\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 { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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 myTopic = new sns.Topic(this, 'MyTopic');\n\n// Lambda should receive only message matching the following conditions on attributes:\n// color: 'red' or 'orange' or begins with 'bl'\n// size: anything but 'small' or 'medium'\n// price: between 100 and 200 or greater than 300\n// store: attribute must be present\nmyTopic.addSubscription(new subscriptions.LambdaSubscription(fn, {\n filterPolicy: {\n color: sns.SubscriptionFilter.stringFilter({\n allowlist: ['red', 'orange'],\n matchPrefixes: ['bl'],\n }),\n size: sns.SubscriptionFilter.stringFilter({\n denylist: ['small', 'medium'],\n }),\n price: sns.SubscriptionFilter.numericFilter({\n between: { start: 100, stop: 200 },\n greaterThan: 300,\n }),\n store: sns.SubscriptionFilter.existsFilter(),\n },\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
1381 "syntaxKindCounter": {
1382 "8": 3,
1383 "10": 7,
1384 "75": 36,
1385 "104": 1,
1386 "130": 1,
1387 "153": 1,
1388 "169": 1,
1389 "192": 3,
1390 "193": 6,
1391 "194": 11,
1392 "196": 5,
1393 "197": 2,
1394 "225": 2,
1395 "226": 1,
1396 "242": 2,
1397 "243": 2,
1398 "254": 1,
1399 "255": 1,
1400 "256": 1,
1401 "281": 12,
1402 "290": 1
1403 },
1404 "fqnsFingerprint": "8c7bb70023359406a1af025ccc8fbedda44119aa7e8437c102325097a1e294e1"
1405 },
1406 "fe01f78b8e401d26f80d8bec16a6e2d05dcc2cddb6f66c2108c542121687d02f": {
1407 "translations": {
1408 "python": {
1409 "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_sns as sns\nimport aws_cdk.aws_sqs as sqs\n\n# queue: sqs.Queue\n# subscription_filter: sns.SubscriptionFilter\n\nsubscription_options = sns.SubscriptionOptions(\n endpoint=\"endpoint\",\n protocol=sns.SubscriptionProtocol.HTTP,\n\n # the properties below are optional\n dead_letter_queue=queue,\n filter_policy={\n \"filter_policy_key\": subscription_filter\n },\n raw_message_delivery=False,\n region=\"region\",\n subscription_role_arn=\"subscriptionRoleArn\"\n)",
1410 "version": "2"
1411 },
1412 "csharp": {
1413 "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.SNS;\nusing Amazon.CDK.AWS.SQS;\n\nQueue queue;\nSubscriptionFilter subscriptionFilter;\n\nSubscriptionOptions subscriptionOptions = new SubscriptionOptions {\n Endpoint = \"endpoint\",\n Protocol = SubscriptionProtocol.HTTP,\n\n // the properties below are optional\n DeadLetterQueue = queue,\n FilterPolicy = new Dictionary<string, SubscriptionFilter> {\n { \"filterPolicyKey\", subscriptionFilter }\n },\n RawMessageDelivery = false,\n Region = \"region\",\n SubscriptionRoleArn = \"subscriptionRoleArn\"\n};",
1414 "version": "1"
1415 },
1416 "java": {
1417 "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.sns.*;\nimport software.amazon.awscdk.services.sqs.*;\n\nQueue queue;\nSubscriptionFilter subscriptionFilter;\n\nSubscriptionOptions subscriptionOptions = SubscriptionOptions.builder()\n .endpoint(\"endpoint\")\n .protocol(SubscriptionProtocol.HTTP)\n\n // the properties below are optional\n .deadLetterQueue(queue)\n .filterPolicy(Map.of(\n \"filterPolicyKey\", subscriptionFilter))\n .rawMessageDelivery(false)\n .region(\"region\")\n .subscriptionRoleArn(\"subscriptionRoleArn\")\n .build();",
1418 "version": "1"
1419 },
1420 "go": {
1421 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport sns \"github.com/aws-samples/dummy/awscdkawssns\"\nimport sqs \"github.com/aws-samples/dummy/awscdkawssqs\"\n\nvar queue queue\nvar subscriptionFilter subscriptionFilter\n\nsubscriptionOptions := &subscriptionOptions{\n\tendpoint: jsii.String(\"endpoint\"),\n\tprotocol: sns.subscriptionProtocol_HTTP,\n\n\t// the properties below are optional\n\tdeadLetterQueue: queue,\n\tfilterPolicy: map[string]*subscriptionFilter{\n\t\t\"filterPolicyKey\": subscriptionFilter,\n\t},\n\trawMessageDelivery: jsii.Boolean(false),\n\tregion: jsii.String(\"region\"),\n\tsubscriptionRoleArn: jsii.String(\"subscriptionRoleArn\"),\n}",
1422 "version": "1"
1423 },
1424 "$": {
1425 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\n\ndeclare const queue: sqs.Queue;\ndeclare const subscriptionFilter: sns.SubscriptionFilter;\nconst subscriptionOptions: sns.SubscriptionOptions = {\n endpoint: 'endpoint',\n protocol: sns.SubscriptionProtocol.HTTP,\n\n // the properties below are optional\n deadLetterQueue: queue,\n filterPolicy: {\n filterPolicyKey: subscriptionFilter,\n },\n rawMessageDelivery: false,\n region: 'region',\n subscriptionRoleArn: 'subscriptionRoleArn',\n};",
1426 "version": "0"
1427 }
1428 },
1429 "location": {
1430 "api": {
1431 "api": "type",
1432 "fqn": "@aws-cdk/aws-sns.SubscriptionOptions"
1433 },
1434 "field": {
1435 "field": "example"
1436 }
1437 },
1438 "didCompile": true,
1439 "fqnsReferenced": [
1440 "@aws-cdk/aws-sns.SubscriptionFilter",
1441 "@aws-cdk/aws-sns.SubscriptionOptions",
1442 "@aws-cdk/aws-sns.SubscriptionProtocol",
1443 "@aws-cdk/aws-sns.SubscriptionProtocol#HTTP",
1444 "@aws-cdk/aws-sqs.IQueue"
1445 ],
1446 "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 sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\n\ndeclare const queue: sqs.Queue;\ndeclare const subscriptionFilter: sns.SubscriptionFilter;\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 subscriptionOptions: sns.SubscriptionOptions = {\n endpoint: 'endpoint',\n protocol: sns.SubscriptionProtocol.HTTP,\n\n // the properties below are optional\n deadLetterQueue: queue,\n filterPolicy: {\n filterPolicyKey: subscriptionFilter,\n },\n rawMessageDelivery: false,\n region: 'region',\n subscriptionRoleArn: 'subscriptionRoleArn',\n};\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
1447 "syntaxKindCounter": {
1448 "10": 5,
1449 "75": 24,
1450 "91": 1,
1451 "130": 2,
1452 "153": 3,
1453 "169": 3,
1454 "193": 2,
1455 "194": 2,
1456 "225": 3,
1457 "242": 3,
1458 "243": 3,
1459 "254": 2,
1460 "255": 2,
1461 "256": 2,
1462 "281": 8,
1463 "290": 1
1464 },
1465 "fqnsFingerprint": "45ce2a6218260d9da0d91c3745ea9217ce97314a4cd5e8422bd3d0c2cb9b1ed0"
1466 },
1467 "b95b03008d544a3f5caada734c9413bd883f21b44d38f7fd00a6b07931e45f0c": {
1468 "translations": {
1469 "python": {
1470 "source": "from aws_cdk.aws_kinesisfirehose import DeliveryStream\n# stream: DeliveryStream\n\n\ntopic = sns.Topic(self, \"Topic\")\n\nsns.Subscription(self, \"Subscription\",\n topic=topic,\n endpoint=stream.delivery_stream_arn,\n protocol=sns.SubscriptionProtocol.FIREHOSE,\n subscription_role_arn=\"SAMPLE_ARN\"\n)",
1471 "version": "2"
1472 },
1473 "csharp": {
1474 "source": "using Amazon.CDK.AWS.KinesisFirehose;\nDeliveryStream stream;\n\n\nTopic topic = new Topic(this, \"Topic\");\n\nnew Subscription(this, \"Subscription\", new SubscriptionProps {\n Topic = topic,\n Endpoint = stream.DeliveryStreamArn,\n Protocol = SubscriptionProtocol.FIREHOSE,\n SubscriptionRoleArn = \"SAMPLE_ARN\"\n});",
1475 "version": "1"
1476 },
1477 "java": {
1478 "source": "import software.amazon.awscdk.services.kinesisfirehose.DeliveryStream;\nDeliveryStream stream;\n\n\nTopic topic = new Topic(this, \"Topic\");\n\nSubscription.Builder.create(this, \"Subscription\")\n .topic(topic)\n .endpoint(stream.getDeliveryStreamArn())\n .protocol(SubscriptionProtocol.FIREHOSE)\n .subscriptionRoleArn(\"SAMPLE_ARN\")\n .build();",
1479 "version": "1"
1480 },
1481 "go": {
1482 "source": "import \"github.com/aws-samples/dummy/awscdkawskinesisfirehose\"\nvar stream deliveryStream\n\n\ntopic := sns.NewTopic(this, jsii.String(\"Topic\"))\n\nsns.NewSubscription(this, jsii.String(\"Subscription\"), &subscriptionProps{\n\ttopic: topic,\n\tendpoint: stream.deliveryStreamArn,\n\tprotocol: sns.subscriptionProtocol_FIREHOSE,\n\tsubscriptionRoleArn: jsii.String(\"SAMPLE_ARN\"),\n})",
1483 "version": "1"
1484 },
1485 "$": {
1486 "source": "import { DeliveryStream } from '@aws-cdk/aws-kinesisfirehose';\n\nconst topic = new sns.Topic(this, 'Topic');\ndeclare const stream: DeliveryStream;\n\nnew sns.Subscription(this, 'Subscription', {\n topic,\n endpoint: stream.deliveryStreamArn,\n protocol: sns.SubscriptionProtocol.FIREHOSE,\n subscriptionRoleArn: \"SAMPLE_ARN\", //role with permissions to send messages to a firehose delivery stream\n});",
1487 "version": "0"
1488 }
1489 },
1490 "location": {
1491 "api": {
1492 "api": "type",
1493 "fqn": "@aws-cdk/aws-sns.SubscriptionProps"
1494 },
1495 "field": {
1496 "field": "example"
1497 }
1498 },
1499 "didCompile": true,
1500 "fqnsReferenced": [
1501 "@aws-cdk/aws-kinesisfirehose.DeliveryStream#deliveryStreamArn",
1502 "@aws-cdk/aws-sns.ITopic",
1503 "@aws-cdk/aws-sns.Subscription",
1504 "@aws-cdk/aws-sns.SubscriptionProps",
1505 "@aws-cdk/aws-sns.SubscriptionProtocol",
1506 "@aws-cdk/aws-sns.SubscriptionProtocol#FIREHOSE",
1507 "@aws-cdk/aws-sns.Topic",
1508 "constructs.Construct"
1509 ],
1510 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport { DeliveryStream } from '@aws-cdk/aws-kinesisfirehose';\ndeclare const stream: DeliveryStream;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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');\n\nnew sns.Subscription(this, 'Subscription', {\n topic,\n endpoint: stream.deliveryStreamArn,\n protocol: sns.SubscriptionProtocol.FIREHOSE,\n subscriptionRoleArn: \"SAMPLE_ARN\", //role with permissions to send messages to a firehose delivery stream\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
1511 "syntaxKindCounter": {
1512 "10": 4,
1513 "75": 17,
1514 "104": 2,
1515 "130": 1,
1516 "169": 1,
1517 "193": 1,
1518 "194": 5,
1519 "197": 2,
1520 "225": 2,
1521 "226": 1,
1522 "242": 2,
1523 "243": 2,
1524 "254": 1,
1525 "255": 1,
1526 "257": 1,
1527 "258": 1,
1528 "281": 3,
1529 "282": 1,
1530 "290": 1
1531 },
1532 "fqnsFingerprint": "0b01253a8661d373574601f65574702fd651ca8b920f52dff8c1d705984f2b65"
1533 },
1534 "8a47b04cd03548c188fecc312f27a6c1b8f49d0946a631b32e88b353440db0c7": {
1535 "translations": {
1536 "python": {
1537 "source": "from aws_cdk.aws_kinesisfirehose import DeliveryStream\n# stream: DeliveryStream\n\n\ntopic = sns.Topic(self, \"Topic\")\n\nsns.Subscription(self, \"Subscription\",\n topic=topic,\n endpoint=stream.delivery_stream_arn,\n protocol=sns.SubscriptionProtocol.FIREHOSE,\n subscription_role_arn=\"SAMPLE_ARN\"\n)",
1538 "version": "2"
1539 },
1540 "csharp": {
1541 "source": "using Amazon.CDK.AWS.KinesisFirehose;\nDeliveryStream stream;\n\n\nTopic topic = new Topic(this, \"Topic\");\n\nnew Subscription(this, \"Subscription\", new SubscriptionProps {\n Topic = topic,\n Endpoint = stream.DeliveryStreamArn,\n Protocol = SubscriptionProtocol.FIREHOSE,\n SubscriptionRoleArn = \"SAMPLE_ARN\"\n});",
1542 "version": "1"
1543 },
1544 "java": {
1545 "source": "import software.amazon.awscdk.services.kinesisfirehose.DeliveryStream;\nDeliveryStream stream;\n\n\nTopic topic = new Topic(this, \"Topic\");\n\nSubscription.Builder.create(this, \"Subscription\")\n .topic(topic)\n .endpoint(stream.getDeliveryStreamArn())\n .protocol(SubscriptionProtocol.FIREHOSE)\n .subscriptionRoleArn(\"SAMPLE_ARN\")\n .build();",
1546 "version": "1"
1547 },
1548 "go": {
1549 "source": "import \"github.com/aws-samples/dummy/awscdkawskinesisfirehose\"\nvar stream deliveryStream\n\n\ntopic := sns.NewTopic(this, jsii.String(\"Topic\"))\n\nsns.NewSubscription(this, jsii.String(\"Subscription\"), &subscriptionProps{\n\ttopic: topic,\n\tendpoint: stream.deliveryStreamArn,\n\tprotocol: sns.subscriptionProtocol_FIREHOSE,\n\tsubscriptionRoleArn: jsii.String(\"SAMPLE_ARN\"),\n})",
1550 "version": "1"
1551 },
1552 "$": {
1553 "source": "import { DeliveryStream } from '@aws-cdk/aws-kinesisfirehose';\n\nconst topic = new sns.Topic(this, 'Topic');\ndeclare const stream: DeliveryStream;\n\nnew sns.Subscription(this, 'Subscription', {\n topic,\n endpoint: stream.deliveryStreamArn,\n protocol: sns.SubscriptionProtocol.FIREHOSE,\n subscriptionRoleArn: \"SAMPLE_ARN\", //role with permissions to send messages to a firehose delivery stream\n});",
1554 "version": "0"
1555 }
1556 },
1557 "location": {
1558 "api": {
1559 "api": "type",
1560 "fqn": "@aws-cdk/aws-sns.SubscriptionProtocol"
1561 },
1562 "field": {
1563 "field": "example"
1564 }
1565 },
1566 "didCompile": true,
1567 "fqnsReferenced": [
1568 "@aws-cdk/aws-kinesisfirehose.DeliveryStream#deliveryStreamArn",
1569 "@aws-cdk/aws-sns.ITopic",
1570 "@aws-cdk/aws-sns.Subscription",
1571 "@aws-cdk/aws-sns.SubscriptionProps",
1572 "@aws-cdk/aws-sns.SubscriptionProtocol",
1573 "@aws-cdk/aws-sns.SubscriptionProtocol#FIREHOSE",
1574 "@aws-cdk/aws-sns.Topic",
1575 "constructs.Construct"
1576 ],
1577 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport { DeliveryStream } from '@aws-cdk/aws-kinesisfirehose';\ndeclare const stream: DeliveryStream;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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');\n\nnew sns.Subscription(this, 'Subscription', {\n topic,\n endpoint: stream.deliveryStreamArn,\n protocol: sns.SubscriptionProtocol.FIREHOSE,\n subscriptionRoleArn: \"SAMPLE_ARN\", //role with permissions to send messages to a firehose delivery stream\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
1578 "syntaxKindCounter": {
1579 "10": 4,
1580 "75": 17,
1581 "104": 2,
1582 "130": 1,
1583 "169": 1,
1584 "193": 1,
1585 "194": 5,
1586 "197": 2,
1587 "225": 2,
1588 "226": 1,
1589 "242": 2,
1590 "243": 2,
1591 "254": 1,
1592 "255": 1,
1593 "257": 1,
1594 "258": 1,
1595 "281": 3,
1596 "282": 1,
1597 "290": 1
1598 },
1599 "fqnsFingerprint": "0b01253a8661d373574601f65574702fd651ca8b920f52dff8c1d705984f2b65"
1600 },
1601 "ef8aae1571848313c7844ae99697b761cfaee50d4a6c2bfa64ccd9fbccb06460": {
1602 "translations": {
1603 "python": {
1604 "source": "import aws_cdk.aws_sns as sns\n\n\ntopic = sns.Topic(self, \"MyTopic\")\n\ntopic_rule = iot.TopicRule(self, \"TopicRule\",\n sql=iot.IotSql.from_string_as_ver20160323(\"SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'\"),\n actions=[\n actions.SnsTopicAction(topic,\n message_format=actions.SnsActionMessageFormat.JSON\n )\n ]\n)",
1605 "version": "2"
1606 },
1607 "csharp": {
1608 "source": "using Amazon.CDK.AWS.SNS;\n\n\nTopic topic = new Topic(this, \"MyTopic\");\n\nTopicRule topicRule = new TopicRule(this, \"TopicRule\", new TopicRuleProps {\n Sql = IotSql.FromStringAsVer20160323(\"SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'\"),\n Actions = new [] {\n new SnsTopicAction(topic, new SnsTopicActionProps {\n MessageFormat = SnsActionMessageFormat.JSON\n }) }\n});",
1609 "version": "1"
1610 },
1611 "java": {
1612 "source": "import software.amazon.awscdk.services.sns.*;\n\n\nTopic topic = new Topic(this, \"MyTopic\");\n\nTopicRule topicRule = TopicRule.Builder.create(this, \"TopicRule\")\n .sql(IotSql.fromStringAsVer20160323(\"SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'\"))\n .actions(List.of(\n SnsTopicAction.Builder.create(topic)\n .messageFormat(SnsActionMessageFormat.JSON)\n .build()))\n .build();",
1613 "version": "1"
1614 },
1615 "go": {
1616 "source": "import sns \"github.com/aws-samples/dummy/awscdkawssns\"\n\n\ntopic := sns.NewTopic(this, jsii.String(\"MyTopic\"))\n\ntopicRule := iot.NewTopicRule(this, jsii.String(\"TopicRule\"), &topicRuleProps{\n\tsql: iot.iotSql.fromStringAsVer20160323(jsii.String(\"SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'\")),\n\tactions: []iAction{\n\t\tactions.NewSnsTopicAction(topic, &snsTopicActionProps{\n\t\t\tmessageFormat: actions.snsActionMessageFormat_JSON,\n\t\t}),\n\t},\n})",
1617 "version": "1"
1618 },
1619 "$": {
1620 "source": "import * as sns from '@aws-cdk/aws-sns';\n\nconst topic = new sns.Topic(this, 'MyTopic');\n\nconst topicRule = new iot.TopicRule(this, 'TopicRule', {\n sql: iot.IotSql.fromStringAsVer20160323(\n \"SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'\",\n ),\n actions: [\n new actions.SnsTopicAction(topic, {\n messageFormat: actions.SnsActionMessageFormat.JSON, // optional property, default is SnsActionMessageFormat.RAW\n }),\n ],\n});",
1621 "version": "0"
1622 }
1623 },
1624 "location": {
1625 "api": {
1626 "api": "type",
1627 "fqn": "@aws-cdk/aws-sns.Topic"
1628 },
1629 "field": {
1630 "field": "example"
1631 }
1632 },
1633 "didCompile": true,
1634 "fqnsReferenced": [
1635 "@aws-cdk/aws-iot-actions.SnsActionMessageFormat",
1636 "@aws-cdk/aws-iot-actions.SnsActionMessageFormat#JSON",
1637 "@aws-cdk/aws-iot-actions.SnsTopicAction",
1638 "@aws-cdk/aws-iot-actions.SnsTopicActionProps",
1639 "@aws-cdk/aws-iot.IotSql",
1640 "@aws-cdk/aws-iot.IotSql#fromStringAsVer20160323",
1641 "@aws-cdk/aws-iot.TopicRule",
1642 "@aws-cdk/aws-iot.TopicRuleProps",
1643 "@aws-cdk/aws-sns.ITopic",
1644 "@aws-cdk/aws-sns.Topic",
1645 "constructs.Construct"
1646 ],
1647 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport * as sns from '@aws-cdk/aws-sns';\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Stack } from '@aws-cdk/core';\nimport { Construct } from 'constructs';\nimport * as actions from '@aws-cdk/aws-iot-actions';\nimport * as iot from '@aws-cdk/aws-iot';\nimport * as lambda from '@aws-cdk/aws-lambda';\nimport * as s3 from '@aws-cdk/aws-s3';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst topic = new sns.Topic(this, 'MyTopic');\n\nconst topicRule = new iot.TopicRule(this, 'TopicRule', {\n sql: iot.IotSql.fromStringAsVer20160323(\n \"SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'\",\n ),\n actions: [\n new actions.SnsTopicAction(topic, {\n messageFormat: actions.SnsActionMessageFormat.JSON, // optional property, default is SnsActionMessageFormat.RAW\n }),\n ],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}",
1648 "syntaxKindCounter": {
1649 "10": 4,
1650 "75": 19,
1651 "104": 2,
1652 "192": 1,
1653 "193": 2,
1654 "194": 7,
1655 "196": 1,
1656 "197": 3,
1657 "225": 2,
1658 "242": 2,
1659 "243": 2,
1660 "254": 1,
1661 "255": 1,
1662 "256": 1,
1663 "281": 3,
1664 "290": 1
1665 },
1666 "fqnsFingerprint": "4b7f9712f452d7c7c0c7e45c68e8624ee26089f14ea4699c07cd3dee9fa189ee"
1667 },
1668 "cffcb206eeb9af5570b62f2e08be9399643de07090b6e884fcb893aacfb6d634": {
1669 "translations": {
1670 "python": {
1671 "source": "topic = sns.Topic(self, \"Topic\")\ntopic_policy = sns.TopicPolicy(self, \"TopicPolicy\",\n topics=[topic]\n)\n\ntopic_policy.document.add_statements(iam.PolicyStatement(\n actions=[\"sns:Subscribe\"],\n principals=[iam.AnyPrincipal()],\n resources=[topic.topic_arn]\n))",
1672 "version": "2"
1673 },
1674 "csharp": {
1675 "source": "Topic topic = new Topic(this, \"Topic\");\nTopicPolicy topicPolicy = new TopicPolicy(this, \"TopicPolicy\", new TopicPolicyProps {\n Topics = new [] { topic }\n});\n\ntopicPolicy.Document.AddStatements(new PolicyStatement(new PolicyStatementProps {\n Actions = new [] { \"sns:Subscribe\" },\n Principals = new [] { new AnyPrincipal() },\n Resources = new [] { topic.TopicArn }\n}));",
1676 "version": "1"
1677 },
1678 "java": {
1679 "source": "Topic topic = new Topic(this, \"Topic\");\nTopicPolicy topicPolicy = TopicPolicy.Builder.create(this, \"TopicPolicy\")\n .topics(List.of(topic))\n .build();\n\ntopicPolicy.document.addStatements(PolicyStatement.Builder.create()\n .actions(List.of(\"sns:Subscribe\"))\n .principals(List.of(new AnyPrincipal()))\n .resources(List.of(topic.getTopicArn()))\n .build());",
1680 "version": "1"
1681 },
1682 "go": {
1683 "source": "topic := sns.NewTopic(this, jsii.String(\"Topic\"))\ntopicPolicy := sns.NewTopicPolicy(this, jsii.String(\"TopicPolicy\"), &topicPolicyProps{\n\ttopics: []iTopic{\n\t\ttopic,\n\t},\n})\n\ntopicPolicy.document.addStatements(iam.NewPolicyStatement(&policyStatementProps{\n\tactions: []*string{\n\t\tjsii.String(\"sns:Subscribe\"),\n\t},\n\tprincipals: []iPrincipal{\n\t\tiam.NewAnyPrincipal(),\n\t},\n\tresources: []*string{\n\t\ttopic.topicArn,\n\t},\n}))",
1684 "version": "1"
1685 },
1686 "$": {
1687 "source": "const topic = new sns.Topic(this, 'Topic');\nconst topicPolicy = new sns.TopicPolicy(this, 'TopicPolicy', {\n topics: [topic],\n});\n\ntopicPolicy.document.addStatements(new iam.PolicyStatement({\n actions: [\"sns:Subscribe\"],\n principals: [new iam.AnyPrincipal()],\n resources: [topic.topicArn],\n}));",
1688 "version": "0"
1689 }
1690 },
1691 "location": {
1692 "api": {
1693 "api": "type",
1694 "fqn": "@aws-cdk/aws-sns.TopicPolicy"
1695 },
1696 "field": {
1697 "field": "example"
1698 }
1699 },
1700 "didCompile": true,
1701 "fqnsReferenced": [
1702 "@aws-cdk/aws-iam.AnyPrincipal",
1703 "@aws-cdk/aws-iam.PolicyDocument#addStatements",
1704 "@aws-cdk/aws-iam.PolicyStatement",
1705 "@aws-cdk/aws-iam.PolicyStatementProps",
1706 "@aws-cdk/aws-sns.Topic",
1707 "@aws-cdk/aws-sns.Topic#topicArn",
1708 "@aws-cdk/aws-sns.TopicPolicy",
1709 "@aws-cdk/aws-sns.TopicPolicy#document",
1710 "@aws-cdk/aws-sns.TopicPolicyProps",
1711 "constructs.Construct"
1712 ],
1713 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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 topic = new sns.Topic(this, 'Topic');\nconst topicPolicy = new sns.TopicPolicy(this, 'TopicPolicy', {\n topics: [topic],\n});\n\ntopicPolicy.document.addStatements(new iam.PolicyStatement({\n actions: [\"sns:Subscribe\"],\n principals: [new iam.AnyPrincipal()],\n resources: [topic.topicArn],\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
1714 "syntaxKindCounter": {
1715 "10": 3,
1716 "75": 20,
1717 "104": 2,
1718 "192": 4,
1719 "193": 2,
1720 "194": 7,
1721 "196": 1,
1722 "197": 4,
1723 "225": 2,
1724 "226": 1,
1725 "242": 2,
1726 "243": 2,
1727 "281": 4
1728 },
1729 "fqnsFingerprint": "65af37bccb6a0832b946357f9d68912dd1f4e51f6b657f47f25621cebe5f13ec"
1730 },
1731 "037362824fb58a2acf09cb0ac1166f4f75af549395f90c395135dd177ac3c717": {
1732 "translations": {
1733 "python": {
1734 "source": "topic = sns.Topic(self, \"Topic\")\ntopic_policy = sns.TopicPolicy(self, \"TopicPolicy\",\n topics=[topic]\n)\n\ntopic_policy.document.add_statements(iam.PolicyStatement(\n actions=[\"sns:Subscribe\"],\n principals=[iam.AnyPrincipal()],\n resources=[topic.topic_arn]\n))",
1735 "version": "2"
1736 },
1737 "csharp": {
1738 "source": "Topic topic = new Topic(this, \"Topic\");\nTopicPolicy topicPolicy = new TopicPolicy(this, \"TopicPolicy\", new TopicPolicyProps {\n Topics = new [] { topic }\n});\n\ntopicPolicy.Document.AddStatements(new PolicyStatement(new PolicyStatementProps {\n Actions = new [] { \"sns:Subscribe\" },\n Principals = new [] { new AnyPrincipal() },\n Resources = new [] { topic.TopicArn }\n}));",
1739 "version": "1"
1740 },
1741 "java": {
1742 "source": "Topic topic = new Topic(this, \"Topic\");\nTopicPolicy topicPolicy = TopicPolicy.Builder.create(this, \"TopicPolicy\")\n .topics(List.of(topic))\n .build();\n\ntopicPolicy.document.addStatements(PolicyStatement.Builder.create()\n .actions(List.of(\"sns:Subscribe\"))\n .principals(List.of(new AnyPrincipal()))\n .resources(List.of(topic.getTopicArn()))\n .build());",
1743 "version": "1"
1744 },
1745 "go": {
1746 "source": "topic := sns.NewTopic(this, jsii.String(\"Topic\"))\ntopicPolicy := sns.NewTopicPolicy(this, jsii.String(\"TopicPolicy\"), &topicPolicyProps{\n\ttopics: []iTopic{\n\t\ttopic,\n\t},\n})\n\ntopicPolicy.document.addStatements(iam.NewPolicyStatement(&policyStatementProps{\n\tactions: []*string{\n\t\tjsii.String(\"sns:Subscribe\"),\n\t},\n\tprincipals: []iPrincipal{\n\t\tiam.NewAnyPrincipal(),\n\t},\n\tresources: []*string{\n\t\ttopic.topicArn,\n\t},\n}))",
1747 "version": "1"
1748 },
1749 "$": {
1750 "source": "const topic = new sns.Topic(this, 'Topic');\nconst topicPolicy = new sns.TopicPolicy(this, 'TopicPolicy', {\n topics: [topic],\n});\n\ntopicPolicy.document.addStatements(new iam.PolicyStatement({\n actions: [\"sns:Subscribe\"],\n principals: [new iam.AnyPrincipal()],\n resources: [topic.topicArn],\n}));",
1751 "version": "0"
1752 }
1753 },
1754 "location": {
1755 "api": {
1756 "api": "type",
1757 "fqn": "@aws-cdk/aws-sns.TopicPolicyProps"
1758 },
1759 "field": {
1760 "field": "example"
1761 }
1762 },
1763 "didCompile": true,
1764 "fqnsReferenced": [
1765 "@aws-cdk/aws-iam.AnyPrincipal",
1766 "@aws-cdk/aws-iam.PolicyDocument#addStatements",
1767 "@aws-cdk/aws-iam.PolicyStatement",
1768 "@aws-cdk/aws-iam.PolicyStatementProps",
1769 "@aws-cdk/aws-sns.Topic",
1770 "@aws-cdk/aws-sns.Topic#topicArn",
1771 "@aws-cdk/aws-sns.TopicPolicy",
1772 "@aws-cdk/aws-sns.TopicPolicy#document",
1773 "@aws-cdk/aws-sns.TopicPolicyProps",
1774 "constructs.Construct"
1775 ],
1776 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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 topic = new sns.Topic(this, 'Topic');\nconst topicPolicy = new sns.TopicPolicy(this, 'TopicPolicy', {\n topics: [topic],\n});\n\ntopicPolicy.document.addStatements(new iam.PolicyStatement({\n actions: [\"sns:Subscribe\"],\n principals: [new iam.AnyPrincipal()],\n resources: [topic.topicArn],\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
1777 "syntaxKindCounter": {
1778 "10": 3,
1779 "75": 20,
1780 "104": 2,
1781 "192": 4,
1782 "193": 2,
1783 "194": 7,
1784 "196": 1,
1785 "197": 4,
1786 "225": 2,
1787 "226": 1,
1788 "242": 2,
1789 "243": 2,
1790 "281": 4
1791 },
1792 "fqnsFingerprint": "65af37bccb6a0832b946357f9d68912dd1f4e51f6b657f47f25621cebe5f13ec"
1793 },
1794 "a14856be58ad3cc8b9d69dbfdbbf42a27de76de17b39e0df5982f483f652aed3": {
1795 "translations": {
1796 "python": {
1797 "source": "topic = sns.Topic(self, \"Topic\",\n display_name=\"Customer subscription topic\"\n)",
1798 "version": "2"
1799 },
1800 "csharp": {
1801 "source": "Topic topic = new Topic(this, \"Topic\", new TopicProps {\n DisplayName = \"Customer subscription topic\"\n});",
1802 "version": "1"
1803 },
1804 "java": {
1805 "source": "Topic topic = Topic.Builder.create(this, \"Topic\")\n .displayName(\"Customer subscription topic\")\n .build();",
1806 "version": "1"
1807 },
1808 "go": {
1809 "source": "topic := sns.NewTopic(this, jsii.String(\"Topic\"), &topicProps{\n\tdisplayName: jsii.String(\"Customer subscription topic\"),\n})",
1810 "version": "1"
1811 },
1812 "$": {
1813 "source": "const topic = new sns.Topic(this, 'Topic', {\n displayName: 'Customer subscription topic',\n});",
1814 "version": "0"
1815 }
1816 },
1817 "location": {
1818 "api": {
1819 "api": "type",
1820 "fqn": "@aws-cdk/aws-sns.TopicProps"
1821 },
1822 "field": {
1823 "field": "example"
1824 }
1825 },
1826 "didCompile": true,
1827 "fqnsReferenced": [
1828 "@aws-cdk/aws-sns.Topic",
1829 "@aws-cdk/aws-sns.TopicProps",
1830 "constructs.Construct"
1831 ],
1832 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as subscriptions from '@aws-cdk/aws-sns-subscriptions';\nimport * as iam from '@aws-cdk/aws-iam';\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 topic = new sns.Topic(this, 'Topic', {\n displayName: 'Customer subscription topic',\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
1833 "syntaxKindCounter": {
1834 "10": 2,
1835 "75": 4,
1836 "104": 1,
1837 "193": 1,
1838 "194": 1,
1839 "197": 1,
1840 "225": 1,
1841 "242": 1,
1842 "243": 1,
1843 "281": 1
1844 },
1845 "fqnsFingerprint": "c20fbd9a1b205c0f56879cb61a464afca81e8da74f8f2d6ce80b343365b776c5"
1846 },
1847 "af71c8d5e831a834acf2842fabcdd8fb2df8b0f48648fc61b617c3e1eccb0136": {
1848 "translations": {
1849 "python": {
1850 "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_sns as sns\nimport aws_cdk.aws_sqs as sqs\nimport aws_cdk.core as cdk\n\n# construct: cdk.Construct\n# queue: sqs.Queue\n# subscription_filter: sns.SubscriptionFilter\n\ntopic_subscription_config = sns.TopicSubscriptionConfig(\n endpoint=\"endpoint\",\n protocol=sns.SubscriptionProtocol.HTTP,\n subscriber_id=\"subscriberId\",\n\n # the properties below are optional\n dead_letter_queue=queue,\n filter_policy={\n \"filter_policy_key\": subscription_filter\n },\n raw_message_delivery=False,\n region=\"region\",\n subscriber_scope=construct,\n subscription_role_arn=\"subscriptionRoleArn\"\n)",
1851 "version": "2"
1852 },
1853 "csharp": {
1854 "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.SNS;\nusing Amazon.CDK.AWS.SQS;\nusing Amazon.CDK;\n\nConstruct construct;\nQueue queue;\nSubscriptionFilter subscriptionFilter;\nTopicSubscriptionConfig topicSubscriptionConfig = new TopicSubscriptionConfig {\n Endpoint = \"endpoint\",\n Protocol = SubscriptionProtocol.HTTP,\n SubscriberId = \"subscriberId\",\n\n // the properties below are optional\n DeadLetterQueue = queue,\n FilterPolicy = new Dictionary<string, SubscriptionFilter> {\n { \"filterPolicyKey\", subscriptionFilter }\n },\n RawMessageDelivery = false,\n Region = \"region\",\n SubscriberScope = construct,\n SubscriptionRoleArn = \"subscriptionRoleArn\"\n};",
1855 "version": "1"
1856 },
1857 "java": {
1858 "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.sns.*;\nimport software.amazon.awscdk.services.sqs.*;\nimport software.amazon.awscdk.core.*;\n\nConstruct construct;\nQueue queue;\nSubscriptionFilter subscriptionFilter;\n\nTopicSubscriptionConfig topicSubscriptionConfig = TopicSubscriptionConfig.builder()\n .endpoint(\"endpoint\")\n .protocol(SubscriptionProtocol.HTTP)\n .subscriberId(\"subscriberId\")\n\n // the properties below are optional\n .deadLetterQueue(queue)\n .filterPolicy(Map.of(\n \"filterPolicyKey\", subscriptionFilter))\n .rawMessageDelivery(false)\n .region(\"region\")\n .subscriberScope(construct)\n .subscriptionRoleArn(\"subscriptionRoleArn\")\n .build();",
1859 "version": "1"
1860 },
1861 "go": {
1862 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport sns \"github.com/aws-samples/dummy/awscdkawssns\"\nimport sqs \"github.com/aws-samples/dummy/awscdkawssqs\"\nimport cdk \"github.com/aws-samples/dummy/awscdkcore\"\n\nvar construct construct\nvar queue queue\nvar subscriptionFilter subscriptionFilter\n\ntopicSubscriptionConfig := &topicSubscriptionConfig{\n\tendpoint: jsii.String(\"endpoint\"),\n\tprotocol: sns.subscriptionProtocol_HTTP,\n\tsubscriberId: jsii.String(\"subscriberId\"),\n\n\t// the properties below are optional\n\tdeadLetterQueue: queue,\n\tfilterPolicy: map[string]*subscriptionFilter{\n\t\t\"filterPolicyKey\": subscriptionFilter,\n\t},\n\trawMessageDelivery: jsii.Boolean(false),\n\tregion: jsii.String(\"region\"),\n\tsubscriberScope: construct,\n\tsubscriptionRoleArn: jsii.String(\"subscriptionRoleArn\"),\n}",
1863 "version": "1"
1864 },
1865 "$": {
1866 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as cdk from '@aws-cdk/core';\n\ndeclare const construct: cdk.Construct;\ndeclare const queue: sqs.Queue;\ndeclare const subscriptionFilter: sns.SubscriptionFilter;\nconst topicSubscriptionConfig: sns.TopicSubscriptionConfig = {\n endpoint: 'endpoint',\n protocol: sns.SubscriptionProtocol.HTTP,\n subscriberId: 'subscriberId',\n\n // the properties below are optional\n deadLetterQueue: queue,\n filterPolicy: {\n filterPolicyKey: subscriptionFilter,\n },\n rawMessageDelivery: false,\n region: 'region',\n subscriberScope: construct,\n subscriptionRoleArn: 'subscriptionRoleArn',\n};",
1867 "version": "0"
1868 }
1869 },
1870 "location": {
1871 "api": {
1872 "api": "type",
1873 "fqn": "@aws-cdk/aws-sns.TopicSubscriptionConfig"
1874 },
1875 "field": {
1876 "field": "example"
1877 }
1878 },
1879 "didCompile": true,
1880 "fqnsReferenced": [
1881 "@aws-cdk/aws-sns.SubscriptionFilter",
1882 "@aws-cdk/aws-sns.SubscriptionProtocol",
1883 "@aws-cdk/aws-sns.SubscriptionProtocol#HTTP",
1884 "@aws-cdk/aws-sns.TopicSubscriptionConfig",
1885 "@aws-cdk/aws-sqs.IQueue",
1886 "@aws-cdk/core.Construct"
1887 ],
1888 "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 sns from '@aws-cdk/aws-sns';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as cdk from '@aws-cdk/core';\n\ndeclare const construct: cdk.Construct;\ndeclare const queue: sqs.Queue;\ndeclare const subscriptionFilter: sns.SubscriptionFilter;\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 topicSubscriptionConfig: sns.TopicSubscriptionConfig = {\n endpoint: 'endpoint',\n protocol: sns.SubscriptionProtocol.HTTP,\n subscriberId: 'subscriberId',\n\n // the properties below are optional\n deadLetterQueue: queue,\n filterPolicy: {\n filterPolicyKey: subscriptionFilter,\n },\n rawMessageDelivery: false,\n region: 'region',\n subscriberScope: construct,\n subscriptionRoleArn: 'subscriptionRoleArn',\n};\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
1889 "syntaxKindCounter": {
1890 "10": 7,
1891 "75": 31,
1892 "91": 1,
1893 "130": 3,
1894 "153": 4,
1895 "169": 4,
1896 "193": 2,
1897 "194": 2,
1898 "225": 4,
1899 "242": 4,
1900 "243": 4,
1901 "254": 3,
1902 "255": 3,
1903 "256": 3,
1904 "281": 10,
1905 "290": 1
1906 },
1907 "fqnsFingerprint": "d3f4cd12a17a9c70fecd92b6e4d3c19ef5cdaea81c4c1c85822e67425caceece"
1908 }
1909 }
1910}
\No newline at end of file