@aws-cdk/aws-sns
Version:
The CDK Construct Library for AWS::SNS
1 lines • 139 kB
JSON
{"version":"2","toolVersion":"1.84.0","snippets":{"11456e209c91165a7990453b66a26e73b2e291e1f8498a57dd5a6a4b74cd97fa":{"translations":{"python":{"source":"topic = sns.Topic(self, \"Topic\",\n display_name=\"Customer subscription topic\"\n)","version":"2"},"csharp":{"source":"var topic = new Topic(this, \"Topic\", new TopicProps {\n DisplayName = \"Customer subscription topic\"\n});","version":"1"},"java":{"source":"Topic topic = Topic.Builder.create(this, \"Topic\")\n .displayName(\"Customer subscription topic\")\n .build();","version":"1"},"go":{"source":"topic := sns.NewTopic(this, jsii.String(\"Topic\"), &TopicProps{\n\tDisplayName: jsii.String(\"Customer subscription topic\"),\n})","version":"1"},"$":{"source":"const topic = new sns.Topic(this, 'Topic', {\n displayName: 'Customer subscription topic',\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-sns"},"field":{"field":"markdown","line":21}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-sns.Topic","@aws-cdk/aws-sns.TopicProps","constructs.Construct"],"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","syntaxKindCounter":{"10":2,"75":4,"104":1,"193":1,"194":1,"197":1,"225":1,"242":1,"243":1,"281":1},"fqnsFingerprint":"c20fbd9a1b205c0f56879cb61a464afca81e8da74f8f2d6ce80b343365b776c5"},"63ea91479ea8eee3b4ae4e3d7442ae0bb6cdd57a67a6d6076e3ff174b66fbb9e":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"var topic = new Topic(this, \"Topic\", new TopicProps {\n ContentBasedDeduplication = true,\n DisplayName = \"Customer subscription topic\",\n Fifo = true,\n TopicName = \"customerTopic\"\n});","version":"1"},"java":{"source":"Topic topic = Topic.Builder.create(this, \"Topic\")\n .contentBasedDeduplication(true)\n .displayName(\"Customer subscription topic\")\n .fifo(true)\n .topicName(\"customerTopic\")\n .build();","version":"1"},"go":{"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})","version":"1"},"$":{"source":"const topic = new sns.Topic(this, 'Topic', {\n contentBasedDeduplication: true,\n displayName: 'Customer subscription topic',\n fifo: true,\n topicName: 'customerTopic',\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-sns"},"field":{"field":"markdown","line":29}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-sns.Topic","@aws-cdk/aws-sns.TopicProps","constructs.Construct"],"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","syntaxKindCounter":{"10":3,"75":7,"104":1,"106":2,"193":1,"194":1,"197":1,"225":1,"242":1,"243":1,"281":4},"fqnsFingerprint":"c20fbd9a1b205c0f56879cb61a464afca81e8da74f8f2d6ce80b343365b776c5"},"863f6bbdab734ea82c0e1e4cb0494383a9c3a95ffa62e7355b1a8e1199091878":{"translations":{"python":{"source":"my_topic = sns.Topic(self, \"MyTopic\")\n\nmy_topic.add_subscription(subscriptions.UrlSubscription(\"https://foobar.com/\"))","version":"2"},"csharp":{"source":"var myTopic = new Topic(this, \"MyTopic\");\n\nmyTopic.AddSubscription(new UrlSubscription(\"https://foobar.com/\"));","version":"1"},"java":{"source":"Topic myTopic = new Topic(this, \"MyTopic\");\n\nmyTopic.addSubscription(new UrlSubscription(\"https://foobar.com/\"));","version":"1"},"go":{"source":"myTopic := sns.NewTopic(this, jsii.String(\"MyTopic\"))\n\nmyTopic.AddSubscription(subscriptions.NewUrlSubscription(jsii.String(\"https://foobar.com/\")))","version":"1"},"$":{"source":"const myTopic = new sns.Topic(this, 'MyTopic');\n\nmyTopic.addSubscription(new subscriptions.UrlSubscription('https://foobar.com/'));","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-sns"},"field":{"field":"markdown","line":49}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-sns-subscriptions.UrlSubscription","@aws-cdk/aws-sns.ITopicSubscription","@aws-cdk/aws-sns.Topic","@aws-cdk/aws-sns.TopicBase#addSubscription","constructs.Construct"],"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","syntaxKindCounter":{"10":2,"75":7,"104":1,"194":3,"196":1,"197":2,"225":1,"226":1,"242":1,"243":1},"fqnsFingerprint":"ff638095bad2d85bc46b14046c2e2854d61ab42f794b081409b46fc794c664f5"},"53fffb34c72a3672456f47381144f288c91679a869222644449ebd5174bc9653":{"translations":{"python":{"source":"# queue: sqs.Queue\n\nmy_topic = sns.Topic(self, \"MyTopic\")\n\nmy_topic.add_subscription(subscriptions.SqsSubscription(queue))","version":"2"},"csharp":{"source":"Queue queue;\n\nvar myTopic = new Topic(this, \"MyTopic\");\n\nmyTopic.AddSubscription(new SqsSubscription(queue));","version":"1"},"java":{"source":"Queue queue;\n\nTopic myTopic = new Topic(this, \"MyTopic\");\n\nmyTopic.addSubscription(new SqsSubscription(queue));","version":"1"},"go":{"source":"var queue queue\n\nmyTopic := sns.NewTopic(this, jsii.String(\"MyTopic\"))\n\nmyTopic.AddSubscription(subscriptions.NewSqsSubscription(queue))","version":"1"},"$":{"source":"declare const queue: sqs.Queue;\nconst myTopic = new sns.Topic(this, 'MyTopic');\n\nmyTopic.addSubscription(new subscriptions.SqsSubscription(queue));","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-sns"},"field":{"field":"markdown","line":57}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-sns-subscriptions.SqsSubscription","@aws-cdk/aws-sns.ITopicSubscription","@aws-cdk/aws-sns.Topic","@aws-cdk/aws-sns.TopicBase#addSubscription","@aws-cdk/aws-sqs.IQueue","constructs.Construct"],"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","syntaxKindCounter":{"10":1,"75":11,"104":1,"130":1,"153":1,"169":1,"194":3,"196":1,"197":2,"225":2,"226":1,"242":2,"243":2,"290":1},"fqnsFingerprint":"7d14c477cdbc0daf3505924691be98650177106e430bb34a6c3de5a35e271977"},"f9b8ca442f7f2acf42e482100100b83c099ae2770a741ca7186809001ce49f23":{"translations":{"python":{"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))","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.Lambda;\nFunction fn;\n\n\nvar 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}));","version":"1"},"java":{"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());","version":"1"},"go":{"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}))","version":"1"},"$":{"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}));","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-sns"},"field":{"field":"markdown","line":73}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-lambda.IFunction","@aws-cdk/aws-sns-subscriptions.LambdaSubscription","@aws-cdk/aws-sns-subscriptions.LambdaSubscriptionProps","@aws-cdk/aws-sns.BetweenCondition","@aws-cdk/aws-sns.ITopicSubscription","@aws-cdk/aws-sns.NumericConditions","@aws-cdk/aws-sns.StringConditions","@aws-cdk/aws-sns.SubscriptionFilter","@aws-cdk/aws-sns.SubscriptionFilter#existsFilter","@aws-cdk/aws-sns.SubscriptionFilter#numericFilter","@aws-cdk/aws-sns.SubscriptionFilter#stringFilter","@aws-cdk/aws-sns.Topic","@aws-cdk/aws-sns.TopicBase#addSubscription","constructs.Construct"],"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","syntaxKindCounter":{"8":3,"10":7,"75":36,"104":1,"130":1,"153":1,"169":1,"192":3,"193":6,"194":11,"196":5,"197":2,"225":2,"226":1,"242":2,"243":2,"254":1,"255":1,"256":1,"281":12,"290":1},"fqnsFingerprint":"8c7bb70023359406a1af025ccc8fbedda44119aa7e8437c102325097a1e294e1"},"663b42d337578ca889e690c8e13095007958c79706c3e738f83e3fd0dda84c2a":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.KinesisFirehose;\nDeliveryStream stream;\n\n\nvar 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});","version":"1"},"java":{"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();","version":"1"},"go":{"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})","version":"1"},"$":{"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});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-sns"},"field":{"field":"markdown","line":104}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kinesisfirehose.DeliveryStream#deliveryStreamArn","@aws-cdk/aws-sns.ITopic","@aws-cdk/aws-sns.Subscription","@aws-cdk/aws-sns.SubscriptionProps","@aws-cdk/aws-sns.SubscriptionProtocol","@aws-cdk/aws-sns.SubscriptionProtocol#FIREHOSE","@aws-cdk/aws-sns.Topic","constructs.Construct"],"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","syntaxKindCounter":{"10":4,"75":17,"104":2,"130":1,"169":1,"193":1,"194":5,"197":2,"225":2,"226":1,"242":2,"243":2,"254":1,"255":1,"257":1,"258":1,"281":3,"282":1,"290":1},"fqnsFingerprint":"0b01253a8661d373574601f65574702fd651ca8b920f52dff8c1d705984f2b65"},"4eb6072d96f57bac71f5664991456cbbaf004874c9647d81686760e3259dc71c":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"var topic = new Topic(this, \"Topic\");\nvar 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});","version":"1"},"java":{"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();","version":"1"},"go":{"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})","version":"1"},"$":{"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});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-sns"},"field":{"field":"markdown","line":125}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-sns.ITopic","@aws-cdk/aws-sns.Subscription","@aws-cdk/aws-sns.SubscriptionProps","@aws-cdk/aws-sns.SubscriptionProtocol","@aws-cdk/aws-sns.SubscriptionProtocol#LAMBDA","@aws-cdk/aws-sns.Topic","@aws-cdk/aws-sqs.IQueue","@aws-cdk/aws-sqs.Queue","@aws-cdk/aws-sqs.QueueProps","@aws-cdk/core.Duration","@aws-cdk/core.Duration#days","constructs.Construct"],"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","syntaxKindCounter":{"8":1,"10":5,"75":20,"104":3,"193":2,"194":6,"196":1,"197":3,"225":2,"226":1,"242":2,"243":2,"281":5,"282":1},"fqnsFingerprint":"bf6a82b2f37cb473bbdcbe5571602bdd7cdbf8307901132df881d48c87be9f7f"},"263458834c4bfb9e84808fc4d88292cfcf09e3d5ff8fd5007eb9a8992cba025d":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.CodeCommit;\nusing Amazon.CDK.AWS.Events.Targets;\n\nRepository repo;\n\nvar myTopic = new Topic(this, \"Topic\");\n\nrepo.OnCommit(\"OnCommit\", new OnCommitOptions {\n Target = new SnsTopic(myTopic)\n});","version":"1"},"java":{"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());","version":"1"},"go":{"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})","version":"1"},"$":{"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});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-sns"},"field":{"field":"markdown","line":146}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-codecommit.OnCommitOptions","@aws-cdk/aws-events-targets.SnsTopic","@aws-cdk/aws-events.IRuleTarget","@aws-cdk/aws-sns.ITopic","@aws-cdk/aws-sns.Topic","constructs.Construct"],"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","syntaxKindCounter":{"10":4,"75":14,"104":1,"130":1,"153":1,"169":1,"193":1,"194":3,"196":1,"197":2,"225":2,"226":1,"242":2,"243":2,"254":2,"255":2,"256":2,"281":1,"290":1},"fqnsFingerprint":"b0f15f7648edb6158b0c96c1be8a5cae594d22de77428f5db9ed553112b3e74e"},"ab0ca3f16c539c8b1f51f84e971979e2c8afeac6dd97c3bcab47de9fefe54522":{"translations":{"python":{"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))","version":"2"},"csharp":{"source":"var topic = new Topic(this, \"Topic\");\nvar 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}));","version":"1"},"java":{"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());","version":"1"},"go":{"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}))","version":"1"},"$":{"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}));","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-sns"},"field":{"field":"markdown","line":167}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-iam.AnyPrincipal","@aws-cdk/aws-iam.PolicyDocument#addStatements","@aws-cdk/aws-iam.PolicyStatement","@aws-cdk/aws-iam.PolicyStatementProps","@aws-cdk/aws-sns.Topic","@aws-cdk/aws-sns.Topic#topicArn","@aws-cdk/aws-sns.TopicPolicy","@aws-cdk/aws-sns.TopicPolicy#document","@aws-cdk/aws-sns.TopicPolicyProps","constructs.Construct"],"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","syntaxKindCounter":{"10":3,"75":20,"104":2,"192":4,"193":2,"194":7,"196":1,"197":4,"225":2,"226":1,"242":2,"243":2,"281":4},"fqnsFingerprint":"65af37bccb6a0832b946357f9d68912dd1f4e51f6b657f47f25621cebe5f13ec"},"840c208a299d65d82962b6a99b0303133dba1cecc5e1d145d4e11052e8917a54":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"var topic = new Topic(this, \"Topic\");\nvar 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\nvar topicPolicy = new TopicPolicy(this, \"Policy\", new TopicPolicyProps {\n Topics = new [] { topic },\n PolicyDocument = policyDocument\n});","version":"1"},"java":{"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();","version":"1"},"go":{"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})","version":"1"},"$":{"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});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-sns"},"field":{"field":"markdown","line":182}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-iam.AnyPrincipal","@aws-cdk/aws-iam.PolicyDocument","@aws-cdk/aws-iam.PolicyDocumentProps","@aws-cdk/aws-iam.PolicyStatement","@aws-cdk/aws-iam.PolicyStatementProps","@aws-cdk/aws-sns.Topic","@aws-cdk/aws-sns.Topic#topicArn","@aws-cdk/aws-sns.TopicPolicy","@aws-cdk/aws-sns.TopicPolicyProps","constructs.Construct"],"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","syntaxKindCounter":{"10":3,"75":23,"104":2,"106":1,"192":5,"193":3,"194":6,"197":5,"225":3,"242":3,"243":3,"281":6,"282":1},"fqnsFingerprint":"ea288e80c9d9ef4e14d6de08f30b72c5e0562e3130bbb30c06630834452d0050"},"8f158853734d0a55d516a8361eb0be7f186b4f6b0cf0f055cc4a070a5a422111":{"translations":{"python":{"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))","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.Lambda;\nFunction fn;\n\n\nvar 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}));","version":"1"},"java":{"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());","version":"1"},"go":{"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}))","version":"1"},"$":{"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}));","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-sns.BetweenCondition"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-lambda.IFunction","@aws-cdk/aws-sns-subscriptions.LambdaSubscription","@aws-cdk/aws-sns-subscriptions.LambdaSubscriptionProps","@aws-cdk/aws-sns.BetweenCondition","@aws-cdk/aws-sns.ITopicSubscription","@aws-cdk/aws-sns.NumericConditions","@aws-cdk/aws-sns.StringConditions","@aws-cdk/aws-sns.SubscriptionFilter","@aws-cdk/aws-sns.SubscriptionFilter#existsFilter","@aws-cdk/aws-sns.SubscriptionFilter#numericFilter","@aws-cdk/aws-sns.SubscriptionFilter#stringFilter","@aws-cdk/aws-sns.Topic","@aws-cdk/aws-sns.TopicBase#addSubscription","constructs.Construct"],"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","syntaxKindCounter":{"8":3,"10":7,"75":36,"104":1,"130":1,"153":1,"169":1,"192":3,"193":6,"194":11,"196":5,"197":2,"225":2,"226":1,"242":2,"243":2,"254":1,"255":1,"256":1,"281":12,"290":1},"fqnsFingerprint":"8c7bb70023359406a1af025ccc8fbedda44119aa7e8437c102325097a1e294e1"},"734e38efb945b228d71561ed4be52c61934d9e5fe3595755a3bfb2c15a544510":{"translations":{"python":{"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 filter_policy_scope=\"filterPolicyScope\",\n raw_message_delivery=False,\n redrive_policy=redrive_policy,\n region=\"region\",\n subscription_role_arn=\"subscriptionRoleArn\"\n)","version":"2"},"csharp":{"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\nvar 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 FilterPolicyScope = \"filterPolicyScope\",\n RawMessageDelivery = false,\n RedrivePolicy = redrivePolicy,\n Region = \"region\",\n SubscriptionRoleArn = \"subscriptionRoleArn\"\n});","version":"1"},"java":{"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 .filterPolicyScope(\"filterPolicyScope\")\n .rawMessageDelivery(false)\n .redrivePolicy(redrivePolicy)\n .region(\"region\")\n .subscriptionRoleArn(\"subscriptionRoleArn\")\n .build();","version":"1"},"go":{"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\tFilterPolicyScope: jsii.String(\"filterPolicyScope\"),\n\tRawMessageDelivery: jsii.Boolean(false),\n\tRedrivePolicy: redrivePolicy,\n\tRegion: jsii.String(\"region\"),\n\tSubscriptionRoleArn: jsii.String(\"subscriptionRoleArn\"),\n})","version":"1"},"$":{"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 filterPolicyScope: 'filterPolicyScope',\n rawMessageDelivery: false,\n redrivePolicy: redrivePolicy,\n region: 'region',\n subscriptionRoleArn: 'subscriptionRoleArn',\n});","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-sns.CfnSubscription"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-sns.CfnSubscription","@aws-cdk/aws-sns.CfnSubscriptionProps","@aws-cdk/core.Construct"],"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, 'M