UNPKG

157 kBJSONView Raw
1{
2 "version": "2",
3 "toolVersion": "1.71.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 "df5ff388d7556c118627a97f3873c9f149de83a6d3bff29ccc663a73b0b1f6e6": {
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\n# data_protection_policy: Any\n\ncfn_topic = sns.CfnTopic(self, \"MyCfnTopic\",\n content_based_deduplication=False,\n data_protection_policy=data_protection_policy,\n display_name=\"displayName\",\n fifo_topic=False,\n kms_master_key_id=\"kmsMasterKeyId\",\n signature_version=\"signatureVersion\",\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\nvar dataProtectionPolicy;\n\nCfnTopic cfnTopic = new CfnTopic(this, \"MyCfnTopic\", new CfnTopicProps {\n ContentBasedDeduplication = false,\n DataProtectionPolicy = dataProtectionPolicy,\n DisplayName = \"displayName\",\n FifoTopic = false,\n KmsMasterKeyId = \"kmsMasterKeyId\",\n SignatureVersion = \"signatureVersion\",\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\nObject dataProtectionPolicy;\n\nCfnTopic cfnTopic = CfnTopic.Builder.create(this, \"MyCfnTopic\")\n .contentBasedDeduplication(false)\n .dataProtectionPolicy(dataProtectionPolicy)\n .displayName(\"displayName\")\n .fifoTopic(false)\n .kmsMasterKeyId(\"kmsMasterKeyId\")\n .signatureVersion(\"signatureVersion\")\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\nvar dataProtectionPolicy interface{}\n\ncfnTopic := sns.NewCfnTopic(this, jsii.String(\"MyCfnTopic\"), &cfnTopicProps{\n\tcontentBasedDeduplication: jsii.Boolean(false),\n\tdataProtectionPolicy: dataProtectionPolicy,\n\tdisplayName: jsii.String(\"displayName\"),\n\tfifoTopic: jsii.Boolean(false),\n\tkmsMasterKeyId: jsii.String(\"kmsMasterKeyId\"),\n\tsignatureVersion: jsii.String(\"signatureVersion\"),\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';\n\ndeclare const dataProtectionPolicy: any;\nconst cfnTopic = new sns.CfnTopic(this, 'MyCfnTopic', /* all optional props */ {\n contentBasedDeduplication: false,\n dataProtectionPolicy: dataProtectionPolicy,\n displayName: 'displayName',\n fifoTopic: false,\n kmsMasterKeyId: 'kmsMasterKeyId',\n signatureVersion: 'signatureVersion',\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\ndeclare const dataProtectionPolicy: 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 cfnTopic = new sns.CfnTopic(this, 'MyCfnTopic', /* all optional props */ {\n contentBasedDeduplication: false,\n dataProtectionPolicy: dataProtectionPolicy,\n displayName: 'displayName',\n fifoTopic: false,\n kmsMasterKeyId: 'kmsMasterKeyId',\n signatureVersion: 'signatureVersion',\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": 10,
869 "75": 19,
870 "91": 2,
871 "104": 1,
872 "125": 1,
873 "130": 1,
874 "192": 2,
875 "193": 3,
876 "194": 1,
877 "197": 1,
878 "225": 2,
879 "242": 2,
880 "243": 2,
881 "254": 1,
882 "255": 1,
883 "256": 1,
884 "281": 13,
885 "290": 1
886 },
887 "fqnsFingerprint": "c6e813f68fc8feb1d20428654d3188fef1c8489306246607dfae761ad93a9301"
888 },
889 "5715c90f5ace1fc60d1cea17a1948602e77c943631758eeaa82b54043760f927": {
890 "translations": {
891 "python": {
892 "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)",
893 "version": "2"
894 },
895 "csharp": {
896 "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};",
897 "version": "1"
898 },
899 "java": {
900 "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();",
901 "version": "1"
902 },
903 "go": {
904 "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}",
905 "version": "1"
906 },
907 "$": {
908 "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};",
909 "version": "0"
910 }
911 },
912 "location": {
913 "api": {
914 "api": "type",
915 "fqn": "@aws-cdk/aws-sns.CfnTopic.SubscriptionProperty"
916 },
917 "field": {
918 "field": "example"
919 }
920 },
921 "didCompile": true,
922 "fqnsReferenced": [
923 "@aws-cdk/aws-sns.CfnTopic.SubscriptionProperty"
924 ],
925 "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} }",
926 "syntaxKindCounter": {
927 "10": 3,
928 "75": 7,
929 "153": 2,
930 "169": 1,
931 "193": 1,
932 "225": 1,
933 "242": 1,
934 "243": 1,
935 "254": 1,
936 "255": 1,
937 "256": 1,
938 "281": 2,
939 "290": 1
940 },
941 "fqnsFingerprint": "8af81c3bf8d5ffac05cd1da0c0541e1d99ea4b71808441d800c80104fb26b9a3"
942 },
943 "26be30d930c405ce2afd6b29232a98229d88ba293ff210cfca88943e34c7adfe": {
944 "translations": {
945 "python": {
946 "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)",
947 "version": "2"
948 },
949 "csharp": {
950 "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});",
951 "version": "1"
952 },
953 "java": {
954 "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();",
955 "version": "1"
956 },
957 "go": {
958 "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})",
959 "version": "1"
960 },
961 "$": {
962 "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});",
963 "version": "0"
964 }
965 },
966 "location": {
967 "api": {
968 "api": "type",
969 "fqn": "@aws-cdk/aws-sns.CfnTopicPolicy"
970 },
971 "field": {
972 "field": "example"
973 }
974 },
975 "didCompile": true,
976 "fqnsReferenced": [
977 "@aws-cdk/aws-sns.CfnTopicPolicy",
978 "@aws-cdk/aws-sns.CfnTopicPolicyProps",
979 "@aws-cdk/core.Construct"
980 ],
981 "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} }",
982 "syntaxKindCounter": {
983 "10": 3,
984 "75": 8,
985 "104": 1,
986 "125": 1,
987 "130": 1,
988 "192": 1,
989 "193": 1,
990 "194": 1,
991 "197": 1,
992 "225": 2,
993 "242": 2,
994 "243": 2,
995 "254": 1,
996 "255": 1,
997 "256": 1,
998 "281": 2,
999 "290": 1
1000 },
1001 "fqnsFingerprint": "e1b86f18f8ffcd1924e32cf39238d6e9f38c7960282f9bb9f4112f7172b4efaf"
1002 },
1003 "eaeb499176806eddece67163efe69d11606caa1aeffd6b928ab3338101b8c2bc": {
1004 "translations": {
1005 "python": {
1006 "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)",
1007 "version": "2"
1008 },
1009 "csharp": {
1010 "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};",
1011 "version": "1"
1012 },
1013 "java": {
1014 "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();",
1015 "version": "1"
1016 },
1017 "go": {
1018 "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}",
1019 "version": "1"
1020 },
1021 "$": {
1022 "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};",
1023 "version": "0"
1024 }
1025 },
1026 "location": {
1027 "api": {
1028 "api": "type",
1029 "fqn": "@aws-cdk/aws-sns.CfnTopicPolicyProps"
1030 },
1031 "field": {
1032 "field": "example"
1033 }
1034 },
1035 "didCompile": true,
1036 "fqnsReferenced": [
1037 "@aws-cdk/aws-sns.CfnTopicPolicyProps"
1038 ],
1039 "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} }",
1040 "syntaxKindCounter": {
1041 "10": 2,
1042 "75": 8,
1043 "125": 1,
1044 "130": 1,
1045 "153": 1,
1046 "169": 1,
1047 "192": 1,
1048 "193": 1,
1049 "225": 2,
1050 "242": 2,
1051 "243": 2,
1052 "254": 1,
1053 "255": 1,
1054 "256": 1,
1055 "281": 2,
1056 "290": 1
1057 },
1058 "fqnsFingerprint": "0f5812ef22b64abc46ad91a6eb1a595bbb302f9cc270e7729ac8553fbae96172"
1059 },
1060 "93629fad6b6ebacc1fa037da85675f6a4d94dd86377a45f64463be776ab4585b": {
1061 "translations": {
1062 "python": {
1063 "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# data_protection_policy: Any\n\ncfn_topic_props = sns.CfnTopicProps(\n content_based_deduplication=False,\n data_protection_policy=data_protection_policy,\n display_name=\"displayName\",\n fifo_topic=False,\n kms_master_key_id=\"kmsMasterKeyId\",\n signature_version=\"signatureVersion\",\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)",
1064 "version": "2"
1065 },
1066 "csharp": {
1067 "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 dataProtectionPolicy;\n\nCfnTopicProps cfnTopicProps = new CfnTopicProps {\n ContentBasedDeduplication = false,\n DataProtectionPolicy = dataProtectionPolicy,\n DisplayName = \"displayName\",\n FifoTopic = false,\n KmsMasterKeyId = \"kmsMasterKeyId\",\n SignatureVersion = \"signatureVersion\",\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};",
1068 "version": "1"
1069 },
1070 "java": {
1071 "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 dataProtectionPolicy;\n\nCfnTopicProps cfnTopicProps = CfnTopicProps.builder()\n .contentBasedDeduplication(false)\n .dataProtectionPolicy(dataProtectionPolicy)\n .displayName(\"displayName\")\n .fifoTopic(false)\n .kmsMasterKeyId(\"kmsMasterKeyId\")\n .signatureVersion(\"signatureVersion\")\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();",
1072 "version": "1"
1073 },
1074 "go": {
1075 "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 dataProtectionPolicy interface{}\n\ncfnTopicProps := &cfnTopicProps{\n\tcontentBasedDeduplication: jsii.Boolean(false),\n\tdataProtectionPolicy: dataProtectionPolicy,\n\tdisplayName: jsii.String(\"displayName\"),\n\tfifoTopic: jsii.Boolean(false),\n\tkmsMasterKeyId: jsii.String(\"kmsMasterKeyId\"),\n\tsignatureVersion: jsii.String(\"signatureVersion\"),\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}",
1076 "version": "1"
1077 },
1078 "$": {
1079 "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 dataProtectionPolicy: any;\nconst cfnTopicProps: sns.CfnTopicProps = {\n contentBasedDeduplication: false,\n dataProtectionPolicy: dataProtectionPolicy,\n displayName: 'displayName',\n fifoTopic: false,\n kmsMasterKeyId: 'kmsMasterKeyId',\n signatureVersion: 'signatureVersion',\n subscription: [{\n endpoint: 'endpoint',\n protocol: 'protocol',\n }],\n tags: [{\n key: 'key',\n value: 'value',\n }],\n topicName: 'topicName',\n};",
1080 "version": "0"
1081 }
1082 },
1083 "location": {
1084 "api": {
1085 "api": "type",
1086 "fqn": "@aws-cdk/aws-sns.CfnTopicProps"
1087 },
1088 "field": {
1089 "field": "example"
1090 }
1091 },
1092 "didCompile": true,
1093 "fqnsReferenced": [
1094 "@aws-cdk/aws-sns.CfnTopicProps"
1095 ],
1096 "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 dataProtectionPolicy: 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 cfnTopicProps: sns.CfnTopicProps = {\n contentBasedDeduplication: false,\n dataProtectionPolicy: dataProtectionPolicy,\n displayName: 'displayName',\n fifoTopic: false,\n kmsMasterKeyId: 'kmsMasterKeyId',\n signatureVersion: 'signatureVersion',\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} }",
1097 "syntaxKindCounter": {
1098 "10": 9,
1099 "75": 19,
1100 "91": 2,
1101 "125": 1,
1102 "130": 1,
1103 "153": 1,
1104 "169": 1,
1105 "192": 2,
1106 "193": 3,
1107 "225": 2,
1108 "242": 2,
1109 "243": 2,
1110 "254": 1,
1111 "255": 1,
1112 "256": 1,
1113 "281": 13,
1114 "290": 1
1115 },
1116 "fqnsFingerprint": "260a28119a58313dc16e84ee81f6ee5815b1acdf84fe670533d001c05f3de183"
1117 },
1118 "522037a7b5219b1d22d1989898cf6a471412dda8b9c7aefb5a70435aeffe9595": {
1119 "translations": {
1120 "python": {
1121 "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))",
1122 "version": "2"
1123 },
1124 "csharp": {
1125 "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}));",
1126 "version": "1"
1127 },
1128 "java": {
1129 "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());",
1130 "version": "1"
1131 },
1132 "go": {
1133 "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}))",
1134 "version": "1"
1135 },
1136 "$": {
1137 "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}));",
1138 "version": "0"
1139 }
1140 },
1141 "location": {
1142 "api": {
1143 "api": "type",
1144 "fqn": "@aws-cdk/aws-sns.NumericConditions"
1145 },
1146 "field": {
1147 "field": "example"
1148 }
1149 },
1150 "didCompile": true,
1151 "fqnsReferenced": [
1152 "@aws-cdk/aws-lambda.IFunction",
1153 "@aws-cdk/aws-sns-subscriptions.LambdaSubscription",
1154 "@aws-cdk/aws-sns-subscriptions.LambdaSubscriptionProps",
1155 "@aws-cdk/aws-sns.BetweenCondition",
1156 "@aws-cdk/aws-sns.ITopicSubscription",
1157 "@aws-cdk/aws-sns.NumericConditions",
1158 "@aws-cdk/aws-sns.StringConditions",
1159 "@aws-cdk/aws-sns.SubscriptionFilter",
1160 "@aws-cdk/aws-sns.SubscriptionFilter#existsFilter",
1161 "@aws-cdk/aws-sns.SubscriptionFilter#numericFilter",
1162 "@aws-cdk/aws-sns.SubscriptionFilter#stringFilter",
1163 "@aws-cdk/aws-sns.Topic",
1164 "@aws-cdk/aws-sns.TopicBase#addSubscription",
1165 "constructs.Construct"
1166 ],
1167 "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",
1168 "syntaxKindCounter": {
1169 "8": 3,
1170 "10": 7,
1171 "75": 36,
1172 "104": 1,
1173 "130": 1,
1174 "153": 1,
1175 "169": 1,
1176 "192": 3,
1177 "193": 6,
1178 "194": 11,
1179 "196": 5,
1180 "197": 2,
1181 "225": 2,
1182 "226": 1,
1183 "242": 2,
1184 "243": 2,
1185 "254": 1,
1186 "255": 1,
1187 "256": 1,
1188 "281": 12,
1189 "290": 1
1190 },
1191 "fqnsFingerprint": "8c7bb70023359406a1af025ccc8fbedda44119aa7e8437c102325097a1e294e1"
1192 },
1193 "87cde21a762c40c2eee8026fa61d60f94443b85f721a562633fb47cfb0fe5be3": {
1194 "translations": {
1195 "python": {
1196 "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))",
1197 "version": "2"
1198 },
1199 "csharp": {
1200 "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}));",
1201 "version": "1"
1202 },
1203 "java": {
1204 "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());",
1205 "version": "1"
1206 },
1207 "go": {
1208 "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}))",
1209 "version": "1"
1210 },
1211 "$": {
1212 "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}));",
1213 "version": "0"
1214 }
1215 },
1216 "location": {
1217 "api": {
1218 "api": "type",
1219 "fqn": "@aws-cdk/aws-sns.StringConditions"
1220 },
1221 "field": {
1222 "field": "example"
1223 }
1224 },
1225 "didCompile": true,
1226 "fqnsReferenced": [
1227 "@aws-cdk/aws-lambda.IFunction",
1228 "@aws-cdk/aws-sns-subscriptions.LambdaSubscription",
1229 "@aws-cdk/aws-sns-subscriptions.LambdaSubscriptionProps",
1230 "@aws-cdk/aws-sns.BetweenCondition",
1231 "@aws-cdk/aws-sns.ITopicSubscription",
1232 "@aws-cdk/aws-sns.NumericConditions",
1233 "@aws-cdk/aws-sns.StringConditions",
1234 "@aws-cdk/aws-sns.SubscriptionFilter",
1235 "@aws-cdk/aws-sns.SubscriptionFilter#existsFilter",
1236 "@aws-cdk/aws-sns.SubscriptionFilter#numericFilter",
1237 "@aws-cdk/aws-sns.SubscriptionFilter#stringFilter",
1238 "@aws-cdk/aws-sns.Topic",
1239 "@aws-cdk/aws-sns.TopicBase#addSubscription",
1240 "constructs.Construct"
1241 ],
1242 "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",
1243 "syntaxKindCounter": {
1244 "8": 3,
1245 "10": 7,
1246 "75": 36,
1247 "104": 1,
1248 "130": 1,
1249 "153": 1,
1250 "169": 1,
1251 "192": 3,
1252 "193": 6,
1253 "194": 11,
1254 "196": 5,
1255 "197": 2,
1256 "225": 2,
1257 "226": 1,
1258 "242": 2,
1259 "243": 2,
1260 "254": 1,
1261 "255": 1,
1262 "256": 1,
1263 "281": 12,
1264 "290": 1
1265 },
1266 "fqnsFingerprint": "8c7bb70023359406a1af025ccc8fbedda44119aa7e8437c102325097a1e294e1"
1267 },
1268 "09da8fc9b5f91845f94248af9bc77e880a8333c8e1f006aaccaa6b8b0f0abe0f": {
1269 "translations": {
1270 "python": {
1271 "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)",
1272 "version": "2"
1273 },
1274 "csharp": {
1275 "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});",
1276 "version": "1"
1277 },
1278 "java": {
1279 "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();",
1280 "version": "1"
1281 },
1282 "go": {
1283 "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})",
1284 "version": "1"
1285 },
1286 "$": {
1287 "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});",
1288 "version": "0"
1289 }
1290 },
1291 "location": {
1292 "api": {
1293 "api": "type",
1294 "fqn": "@aws-cdk/aws-sns.Subscription"
1295 },
1296 "field": {
1297 "field": "example"
1298 }
1299 },
1300 "didCompile": true,
1301 "fqnsReferenced": [
1302 "@aws-cdk/aws-kinesisfirehose.DeliveryStream#deliveryStreamArn",
1303 "@aws-cdk/aws-sns.ITopic",
1304 "@aws-cdk/aws-sns.Subscription",
1305 "@aws-cdk/aws-sns.SubscriptionProps",
1306 "@aws-cdk/aws-sns.SubscriptionProtocol",
1307 "@aws-cdk/aws-sns.SubscriptionProtocol#FIREHOSE",
1308 "@aws-cdk/aws-sns.Topic",
1309 "constructs.Construct"
1310 ],
1311 "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",
1312 "syntaxKindCounter": {
1313 "10": 4,
1314 "75": 17,
1315 "104": 2,
1316 "130": 1,
1317 "169": 1,
1318 "193": 1,
1319 "194": 5,
1320 "197": 2,
1321 "225": 2,
1322 "226": 1,
1323 "242": 2,
1324 "243": 2,
1325 "254": 1,
1326 "255": 1,
1327 "257": 1,
1328 "258": 1,
1329 "281": 3,
1330 "282": 1,
1331 "290": 1
1332 },
1333 "fqnsFingerprint": "0b01253a8661d373574601f65574702fd651ca8b920f52dff8c1d705984f2b65"
1334 },
1335 "7c8d1a93047c3e3f44226fdd5051ed9e3e8aeaf651eaf54bba37b17a05b83cec": {
1336 "translations": {
1337 "python": {
1338 "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))",
1339 "version": "2"
1340 },
1341 "csharp": {
1342 "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}));",
1343 "version": "1"
1344 },
1345 "java": {
1346 "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());",
1347 "version": "1"
1348 },
1349 "go": {
1350 "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}))",
1351 "version": "1"
1352 },
1353 "$": {
1354 "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}));",
1355 "version": "0"
1356 }
1357 },
1358 "location": {
1359 "api": {
1360 "api": "type",
1361 "fqn": "@aws-cdk/aws-sns.SubscriptionFilter"
1362 },
1363 "field": {
1364 "field": "example"
1365 }
1366 },
1367 "didCompile": true,
1368 "fqnsReferenced": [
1369 "@aws-cdk/aws-lambda.IFunction",
1370 "@aws-cdk/aws-sns-subscriptions.LambdaSubscription",
1371 "@aws-cdk/aws-sns-subscriptions.LambdaSubscriptionProps",
1372 "@aws-cdk/aws-sns.BetweenCondition",
1373 "@aws-cdk/aws-sns.ITopicSubscription",
1374 "@aws-cdk/aws-sns.NumericConditions",
1375 "@aws-cdk/aws-sns.StringConditions",
1376 "@aws-cdk/aws-sns.SubscriptionFilter",
1377 "@aws-cdk/aws-sns.SubscriptionFilter#existsFilter",
1378 "@aws-cdk/aws-sns.SubscriptionFilter#numericFilter",
1379 "@aws-cdk/aws-sns.SubscriptionFilter#stringFilter",
1380 "@aws-cdk/aws-sns.Topic",
1381 "@aws-cdk/aws-sns.TopicBase#addSubscription",
1382 "constructs.Construct"
1383 ],
1384 "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",
1385 "syntaxKindCounter": {
1386 "8": 3,
1387 "10": 7,
1388 "75": 36,
1389 "104": 1,
1390 "130": 1,
1391 "153": 1,
1392 "169": 1,
1393 "192": 3,
1394 "193": 6,
1395 "194": 11,
1396 "196": 5,
1397 "197": 2,
1398 "225": 2,
1399 "226": 1,
1400 "242": 2,
1401 "243": 2,
1402 "254": 1,
1403 "255": 1,
1404 "256": 1,
1405 "281": 12,
1406 "290": 1
1407 },
1408 "fqnsFingerprint": "8c7bb70023359406a1af025ccc8fbedda44119aa7e8437c102325097a1e294e1"
1409 },
1410 "fe01f78b8e401d26f80d8bec16a6e2d05dcc2cddb6f66c2108c542121687d02f": {
1411 "translations": {
1412 "python": {
1413 "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)",
1414 "version": "2"
1415 },
1416 "csharp": {
1417 "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};",
1418 "version": "1"
1419 },
1420 "java": {
1421 "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();",
1422 "version": "1"
1423 },
1424 "go": {
1425 "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}",
1426 "version": "1"
1427 },
1428 "$": {
1429 "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};",
1430 "version": "0"
1431 }
1432 },
1433 "location": {
1434 "api": {
1435 "api": "type",
1436 "fqn": "@aws-cdk/aws-sns.SubscriptionOptions"
1437 },
1438 "field": {
1439 "field": "example"
1440 }
1441 },
1442 "didCompile": true,
1443 "fqnsReferenced": [
1444 "@aws-cdk/aws-sns.SubscriptionFilter",
1445 "@aws-cdk/aws-sns.SubscriptionOptions",
1446 "@aws-cdk/aws-sns.SubscriptionProtocol",
1447 "@aws-cdk/aws-sns.SubscriptionProtocol#HTTP",
1448 "@aws-cdk/aws-sqs.IQueue"
1449 ],
1450 "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} }",
1451 "syntaxKindCounter": {
1452 "10": 5,
1453 "75": 24,
1454 "91": 1,
1455 "130": 2,
1456 "153": 3,
1457 "169": 3,
1458 "193": 2,
1459 "194": 2,
1460 "225": 3,
1461 "242": 3,
1462 "243": 3,
1463 "254": 2,
1464 "255": 2,
1465 "256": 2,
1466 "281": 8,
1467 "290": 1
1468 },
1469 "fqnsFingerprint": "45ce2a6218260d9da0d91c3745ea9217ce97314a4cd5e8422bd3d0c2cb9b1ed0"
1470 },
1471 "b95b03008d544a3f5caada734c9413bd883f21b44d38f7fd00a6b07931e45f0c": {
1472 "translations": {
1473 "python": {
1474 "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)",
1475 "version": "2"
1476 },
1477 "csharp": {
1478 "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});",
1479 "version": "1"
1480 },
1481 "java": {
1482 "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();",
1483 "version": "1"
1484 },
1485 "go": {
1486 "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})",
1487 "version": "1"
1488 },
1489 "$": {
1490 "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});",
1491 "version": "0"
1492 }
1493 },
1494 "location": {
1495 "api": {
1496 "api": "type",
1497 "fqn": "@aws-cdk/aws-sns.SubscriptionProps"
1498 },
1499 "field": {
1500 "field": "example"
1501 }
1502 },
1503 "didCompile": true,
1504 "fqnsReferenced": [
1505 "@aws-cdk/aws-kinesisfirehose.DeliveryStream#deliveryStreamArn",
1506 "@aws-cdk/aws-sns.ITopic",
1507 "@aws-cdk/aws-sns.Subscription",
1508 "@aws-cdk/aws-sns.SubscriptionProps",
1509 "@aws-cdk/aws-sns.SubscriptionProtocol",
1510 "@aws-cdk/aws-sns.SubscriptionProtocol#FIREHOSE",
1511 "@aws-cdk/aws-sns.Topic",
1512 "constructs.Construct"
1513 ],
1514 "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",
1515 "syntaxKindCounter": {
1516 "10": 4,
1517 "75": 17,
1518 "104": 2,
1519 "130": 1,
1520 "169": 1,
1521 "193": 1,
1522 "194": 5,
1523 "197": 2,
1524 "225": 2,
1525 "226": 1,
1526 "242": 2,
1527 "243": 2,
1528 "254": 1,
1529 "255": 1,
1530 "257": 1,
1531 "258": 1,
1532 "281": 3,
1533 "282": 1,
1534 "290": 1
1535 },
1536 "fqnsFingerprint": "0b01253a8661d373574601f65574702fd651ca8b920f52dff8c1d705984f2b65"
1537 },
1538 "8a47b04cd03548c188fecc312f27a6c1b8f49d0946a631b32e88b353440db0c7": {
1539 "translations": {
1540 "python": {
1541 "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)",
1542 "version": "2"
1543 },
1544 "csharp": {
1545 "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});",
1546 "version": "1"
1547 },
1548 "java": {
1549 "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();",
1550 "version": "1"
1551 },
1552 "go": {
1553 "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})",
1554 "version": "1"
1555 },
1556 "$": {
1557 "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});",
1558 "version": "0"
1559 }
1560 },
1561 "location": {
1562 "api": {
1563 "api": "type",
1564 "fqn": "@aws-cdk/aws-sns.SubscriptionProtocol"
1565 },
1566 "field": {
1567 "field": "example"
1568 }
1569 },
1570 "didCompile": true,
1571 "fqnsReferenced": [
1572 "@aws-cdk/aws-kinesisfirehose.DeliveryStream#deliveryStreamArn",
1573 "@aws-cdk/aws-sns.ITopic",
1574 "@aws-cdk/aws-sns.Subscription",
1575 "@aws-cdk/aws-sns.SubscriptionProps",
1576 "@aws-cdk/aws-sns.SubscriptionProtocol",
1577 "@aws-cdk/aws-sns.SubscriptionProtocol#FIREHOSE",
1578 "@aws-cdk/aws-sns.Topic",
1579 "constructs.Construct"
1580 ],
1581 "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",
1582 "syntaxKindCounter": {
1583 "10": 4,
1584 "75": 17,
1585 "104": 2,
1586 "130": 1,
1587 "169": 1,
1588 "193": 1,
1589 "194": 5,
1590 "197": 2,
1591 "225": 2,
1592 "226": 1,
1593 "242": 2,
1594 "243": 2,
1595 "254": 1,
1596 "255": 1,
1597 "257": 1,
1598 "258": 1,
1599 "281": 3,
1600 "282": 1,
1601 "290": 1
1602 },
1603 "fqnsFingerprint": "0b01253a8661d373574601f65574702fd651ca8b920f52dff8c1d705984f2b65"
1604 },
1605 "ef8aae1571848313c7844ae99697b761cfaee50d4a6c2bfa64ccd9fbccb06460": {
1606 "translations": {
1607 "python": {
1608 "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)",
1609 "version": "2"
1610 },
1611 "csharp": {
1612 "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});",
1613 "version": "1"
1614 },
1615 "java": {
1616 "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();",
1617 "version": "1"
1618 },
1619 "go": {
1620 "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})",
1621 "version": "1"
1622 },
1623 "$": {
1624 "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});",
1625 "version": "0"
1626 }
1627 },
1628 "location": {
1629 "api": {
1630 "api": "type",
1631 "fqn": "@aws-cdk/aws-sns.Topic"
1632 },
1633 "field": {
1634 "field": "example"
1635 }
1636 },
1637 "didCompile": true,
1638 "fqnsReferenced": [
1639 "@aws-cdk/aws-iot-actions.SnsActionMessageFormat",
1640 "@aws-cdk/aws-iot-actions.SnsActionMessageFormat#JSON",
1641 "@aws-cdk/aws-iot-actions.SnsTopicAction",
1642 "@aws-cdk/aws-iot-actions.SnsTopicActionProps",
1643 "@aws-cdk/aws-iot.IotSql",
1644 "@aws-cdk/aws-iot.IotSql#fromStringAsVer20160323",
1645 "@aws-cdk/aws-iot.TopicRule",
1646 "@aws-cdk/aws-iot.TopicRuleProps",
1647 "@aws-cdk/aws-sns.ITopic",
1648 "@aws-cdk/aws-sns.Topic",
1649 "constructs.Construct"
1650 ],
1651 "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}",
1652 "syntaxKindCounter": {
1653 "10": 4,
1654 "75": 19,
1655 "104": 2,
1656 "192": 1,
1657 "193": 2,
1658 "194": 7,
1659 "196": 1,
1660 "197": 3,
1661 "225": 2,
1662 "242": 2,
1663 "243": 2,
1664 "254": 1,
1665 "255": 1,
1666 "256": 1,
1667 "281": 3,
1668 "290": 1
1669 },
1670 "fqnsFingerprint": "37d0ddf32790ba41b6a279a6d862cf4621a75087d542ce68e46599971e213955"
1671 },
1672 "cffcb206eeb9af5570b62f2e08be9399643de07090b6e884fcb893aacfb6d634": {
1673 "translations": {
1674 "python": {
1675 "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))",
1676 "version": "2"
1677 },
1678 "csharp": {
1679 "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}));",
1680 "version": "1"
1681 },
1682 "java": {
1683 "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());",
1684 "version": "1"
1685 },
1686 "go": {
1687 "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}))",
1688 "version": "1"
1689 },
1690 "$": {
1691 "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}));",
1692 "version": "0"
1693 }
1694 },
1695 "location": {
1696 "api": {
1697 "api": "type",
1698 "fqn": "@aws-cdk/aws-sns.TopicPolicy"
1699 },
1700 "field": {
1701 "field": "example"
1702 }
1703 },
1704 "didCompile": true,
1705 "fqnsReferenced": [
1706 "@aws-cdk/aws-iam.AnyPrincipal",
1707 "@aws-cdk/aws-iam.PolicyDocument#addStatements",
1708 "@aws-cdk/aws-iam.PolicyStatement",
1709 "@aws-cdk/aws-iam.PolicyStatementProps",
1710 "@aws-cdk/aws-sns.Topic",
1711 "@aws-cdk/aws-sns.Topic#topicArn",
1712 "@aws-cdk/aws-sns.TopicPolicy",
1713 "@aws-cdk/aws-sns.TopicPolicy#document",
1714 "@aws-cdk/aws-sns.TopicPolicyProps",
1715 "constructs.Construct"
1716 ],
1717 "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",
1718 "syntaxKindCounter": {
1719 "10": 3,
1720 "75": 20,
1721 "104": 2,
1722 "192": 4,
1723 "193": 2,
1724 "194": 7,
1725 "196": 1,
1726 "197": 4,
1727 "225": 2,
1728 "226": 1,
1729 "242": 2,
1730 "243": 2,
1731 "281": 4
1732 },
1733 "fqnsFingerprint": "65af37bccb6a0832b946357f9d68912dd1f4e51f6b657f47f25621cebe5f13ec"
1734 },
1735 "037362824fb58a2acf09cb0ac1166f4f75af549395f90c395135dd177ac3c717": {
1736 "translations": {
1737 "python": {
1738 "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))",
1739 "version": "2"
1740 },
1741 "csharp": {
1742 "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}));",
1743 "version": "1"
1744 },
1745 "java": {
1746 "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());",
1747 "version": "1"
1748 },
1749 "go": {
1750 "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}))",
1751 "version": "1"
1752 },
1753 "$": {
1754 "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}));",
1755 "version": "0"
1756 }
1757 },
1758 "location": {
1759 "api": {
1760 "api": "type",
1761 "fqn": "@aws-cdk/aws-sns.TopicPolicyProps"
1762 },
1763 "field": {
1764 "field": "example"
1765 }
1766 },
1767 "didCompile": true,
1768 "fqnsReferenced": [
1769 "@aws-cdk/aws-iam.AnyPrincipal",
1770 "@aws-cdk/aws-iam.PolicyDocument#addStatements",
1771 "@aws-cdk/aws-iam.PolicyStatement",
1772 "@aws-cdk/aws-iam.PolicyStatementProps",
1773 "@aws-cdk/aws-sns.Topic",
1774 "@aws-cdk/aws-sns.Topic#topicArn",
1775 "@aws-cdk/aws-sns.TopicPolicy",
1776 "@aws-cdk/aws-sns.TopicPolicy#document",
1777 "@aws-cdk/aws-sns.TopicPolicyProps",
1778 "constructs.Construct"
1779 ],
1780 "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",
1781 "syntaxKindCounter": {
1782 "10": 3,
1783 "75": 20,
1784 "104": 2,
1785 "192": 4,
1786 "193": 2,
1787 "194": 7,
1788 "196": 1,
1789 "197": 4,
1790 "225": 2,
1791 "226": 1,
1792 "242": 2,
1793 "243": 2,
1794 "281": 4
1795 },
1796 "fqnsFingerprint": "65af37bccb6a0832b946357f9d68912dd1f4e51f6b657f47f25621cebe5f13ec"
1797 },
1798 "a14856be58ad3cc8b9d69dbfdbbf42a27de76de17b39e0df5982f483f652aed3": {
1799 "translations": {
1800 "python": {
1801 "source": "topic = sns.Topic(self, \"Topic\",\n display_name=\"Customer subscription topic\"\n)",
1802 "version": "2"
1803 },
1804 "csharp": {
1805 "source": "Topic topic = new Topic(this, \"Topic\", new TopicProps {\n DisplayName = \"Customer subscription topic\"\n});",
1806 "version": "1"
1807 },
1808 "java": {
1809 "source": "Topic topic = Topic.Builder.create(this, \"Topic\")\n .displayName(\"Customer subscription topic\")\n .build();",
1810 "version": "1"
1811 },
1812 "go": {
1813 "source": "topic := sns.NewTopic(this, jsii.String(\"Topic\"), &topicProps{\n\tdisplayName: jsii.String(\"Customer subscription topic\"),\n})",
1814 "version": "1"
1815 },
1816 "$": {
1817 "source": "const topic = new sns.Topic(this, 'Topic', {\n displayName: 'Customer subscription topic',\n});",
1818 "version": "0"
1819 }
1820 },
1821 "location": {
1822 "api": {
1823 "api": "type",
1824 "fqn": "@aws-cdk/aws-sns.TopicProps"
1825 },
1826 "field": {
1827 "field": "example"
1828 }
1829 },
1830 "didCompile": true,
1831 "fqnsReferenced": [
1832 "@aws-cdk/aws-sns.Topic",
1833 "@aws-cdk/aws-sns.TopicProps",
1834 "constructs.Construct"
1835 ],
1836 "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",
1837 "syntaxKindCounter": {
1838 "10": 2,
1839 "75": 4,
1840 "104": 1,
1841 "193": 1,
1842 "194": 1,
1843 "197": 1,
1844 "225": 1,
1845 "242": 1,
1846 "243": 1,
1847 "281": 1
1848 },
1849 "fqnsFingerprint": "c20fbd9a1b205c0f56879cb61a464afca81e8da74f8f2d6ce80b343365b776c5"
1850 },
1851 "af71c8d5e831a834acf2842fabcdd8fb2df8b0f48648fc61b617c3e1eccb0136": {
1852 "translations": {
1853 "python": {
1854 "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)",
1855 "version": "2"
1856 },
1857 "csharp": {
1858 "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};",
1859 "version": "1"
1860 },
1861 "java": {
1862 "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();",
1863 "version": "1"
1864 },
1865 "go": {
1866 "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}",
1867 "version": "1"
1868 },
1869 "$": {
1870 "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};",
1871 "version": "0"
1872 }
1873 },
1874 "location": {
1875 "api": {
1876 "api": "type",
1877 "fqn": "@aws-cdk/aws-sns.TopicSubscriptionConfig"
1878 },
1879 "field": {
1880 "field": "example"
1881 }
1882 },
1883 "didCompile": true,
1884 "fqnsReferenced": [
1885 "@aws-cdk/aws-sns.SubscriptionFilter",
1886 "@aws-cdk/aws-sns.SubscriptionProtocol",
1887 "@aws-cdk/aws-sns.SubscriptionProtocol#HTTP",
1888 "@aws-cdk/aws-sns.TopicSubscriptionConfig",
1889 "@aws-cdk/aws-sqs.IQueue",
1890 "@aws-cdk/core.Construct"
1891 ],
1892 "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} }",
1893 "syntaxKindCounter": {
1894 "10": 7,
1895 "75": 31,
1896 "91": 1,
1897 "130": 3,
1898 "153": 4,
1899 "169": 4,
1900 "193": 2,
1901 "194": 2,
1902 "225": 4,
1903 "242": 4,
1904 "243": 4,
1905 "254": 3,
1906 "255": 3,
1907 "256": 3,
1908 "281": 10,
1909 "290": 1
1910 },
1911 "fqnsFingerprint": "d3f4cd12a17a9c70fecd92b6e4d3c19ef5cdaea81c4c1c85822e67425caceece"
1912 }
1913 }
1914}
\No newline at end of file