{"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, '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});\n/// !hide\n// Code snippet ended before !hide marker above\n} }","syntaxKindCounter":{"10":8,"75":20,"91":1,"104":1,"125":3,"130":3,"193":1,"194":1,"197":1,"225":4,"242":4,"243":4,"254":1,"255":1,"256":1,"281":10,"290":1},"fqnsFingerprint":"2c872ef4ee1eb5d4dbbeeebeefa9944b98a7984772302256402dd84e4598a7fa"},"c863a1466e5cc475f77fc580529eb6642361c34ecbd995fb9e65d0e22138a965":{"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_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    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 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    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\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        .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\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\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 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  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.CfnSubscriptionProps"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-sns.CfnSubscriptionProps"],"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  filterPolicyScope: 'filterPolicyScope',\n  rawMessageDelivery: false,\n  redrivePolicy: redrivePolicy,\n  region: 'region',\n  subscriptionRoleArn: 'subscriptionRoleArn',\n};\n/// !hide\n// Code snippet ended before !hide marker above\n} }","syntaxKindCounter":{"10":7,"75":20,"91":1,"125":3,"130":3,"153":1,"169":1,"193":1,"225":4,"242":4,"243":4,"254":1,"255":1,"256":1,"281":10,"290":1},"fqnsFingerprint":"6203a15768f901b3f72bc0ee95a1c8eba58881b223e133623c649605779935d2"},"018a80ae01a2ecd9a79f9aa514150c076a79e8bd7408eb471524cac98cf13a84":{"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# 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    tracing_config=\"tracingConfig\"\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 dataProtectionPolicy;\n\nvar 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    TracingConfig = \"tracingConfig\"\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 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        .tracingConfig(\"tracingConfig\")\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 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\tTracingConfig: jsii.String(\"tracingConfig\"),\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 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  tracingConfig: 'tracingConfig',\n});","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-sns.CfnTopic"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-sns.CfnTopic","@aws-cdk/aws-sns.CfnTopicProps","@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 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  tracingConfig: 'tracingConfig',\n});\n/// !hide\n// Code snippet ended before !hide marker above\n} }","syntaxKindCounter":{"10":11,"75":20,"91":2,"104":1,"125":1,"130":1,"192":2,"193":3,"194":1,"197":1,"225":2,"242":2,"243":2,"254":1,"255":1,"256":1,"281":14,"290":1},"fqnsFingerprint":"7c69ae9de97db8547a8f2fc444d88b0ef67a5bed3ac0cf70148213c97c2dbd13"},"5715c90f5ace1fc60d1cea17a1948602e77c943631758eeaa82b54043760f927":{"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\nsubscription_property = sns.CfnTopic.SubscriptionProperty(\n    endpoint=\"endpoint\",\n    protocol=\"protocol\"\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 subscriptionProperty = new SubscriptionProperty {\n    Endpoint = \"endpoint\",\n    Protocol = \"protocol\"\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\nSubscriptionProperty subscriptionProperty = SubscriptionProperty.builder()\n        .endpoint(\"endpoint\")\n        .protocol(\"protocol\")\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\nsubscriptionProperty := &SubscriptionProperty{\n\tEndpoint: jsii.String(\"endpoint\"),\n\tProtocol: jsii.String(\"protocol\"),\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';\nconst subscriptionProperty: sns.CfnTopic.SubscriptionProperty = {\n  endpoint: 'endpoint',\n  protocol: 'protocol',\n};","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-sns.CfnTopic.SubscriptionProperty"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-sns.CfnTopic.SubscriptionProperty"],"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} }","syntaxKindCounter":{"10":3,"75":7,"153":2,"169":1,"193":1,"225":1,"242":1,"243":1,"254":1,"255":1,"256":1,"281":2,"290":1},"fqnsFingerprint":"8af81c3bf8d5ffac05cd1da0c0541e1d99ea4b71808441d800c80104fb26b9a3"},"26be30d930c405ce2afd6b29232a98229d88ba293ff210cfca88943e34c7adfe":{"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# policy_document: Any\n\ncfn_topic_policy = sns.CfnTopicPolicy(self, \"MyCfnTopicPolicy\",\n    policy_document=policy_document,\n    topics=[\"topics\"]\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 policyDocument;\n\nvar cfnTopicPolicy = new CfnTopicPolicy(this, \"MyCfnTopicPolicy\", new CfnTopicPolicyProps {\n    PolicyDocument = policyDocument,\n    Topics = new [] { \"topics\" }\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 policyDocument;\n\nCfnTopicPolicy cfnTopicPolicy = CfnTopicPolicy.Builder.create(this, \"MyCfnTopicPolicy\")\n        .policyDocument(policyDocument)\n        .topics(List.of(\"topics\"))\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 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})","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 policyDocument: any;\nconst cfnTopicPolicy = new sns.CfnTopicPolicy(this, 'MyCfnTopicPolicy', {\n  policyDocument: policyDocument,\n  topics: ['topics'],\n});","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-sns.CfnTopicPolicy"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-sns.CfnTopicPolicy","@aws-cdk/aws-sns.CfnTopicPolicyProps","@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 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} }","syntaxKindCounter":{"10":3,"75":8,"104":1,"125":1,"130":1,"192":1,"193":1,"194":1,"197":1,"225":2,"242":2,"243":2,"254":1,"255":1,"256":1,"281":2,"290":1},"fqnsFingerprint":"e1b86f18f8ffcd1924e32cf39238d6e9f38c7960282f9bb9f4112f7172b4efaf"},"eaeb499176806eddece67163efe69d11606caa1aeffd6b928ab3338101b8c2bc":{"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# policy_document: Any\n\ncfn_topic_policy_props = sns.CfnTopicPolicyProps(\n    policy_document=policy_document,\n    topics=[\"topics\"]\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 policyDocument;\n\nvar cfnTopicPolicyProps = new CfnTopicPolicyProps {\n    PolicyDocument = policyDocument,\n    Topics = new [] { \"topics\" }\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 policyDocument;\n\nCfnTopicPolicyProps cfnTopicPolicyProps = CfnTopicPolicyProps.builder()\n        .policyDocument(policyDocument)\n        .topics(List.of(\"topics\"))\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 policyDocument interface{}\n\ncfnTopicPolicyProps := &CfnTopicPolicyProps{\n\tPolicyDocument: policyDocument,\n\tTopics: []*string{\n\t\tjsii.String(\"topics\"),\n\t},\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 policyDocument: any;\nconst cfnTopicPolicyProps: sns.CfnTopicPolicyProps = {\n  policyDocument: policyDocument,\n  topics: ['topics'],\n};","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-sns.CfnTopicPolicyProps"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-sns.CfnTopicPolicyProps"],"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} }","syntaxKindCounter":{"10":2,"75":8,"125":1,"130":1,"153":1,"169":1,"192":1,"193":1,"225":2,"242":2,"243":2,"254":1,"255":1,"256":1,"281":2,"290":1},"fqnsFingerprint":"0f5812ef22b64abc46ad91a6eb1a595bbb302f9cc270e7729ac8553fbae96172"},"03522cc4cac41cc2609c7177aa4115cb40cce26c80fcd94bb83d77d8b952a6aa":{"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# 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    tracing_config=\"tracingConfig\"\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 dataProtectionPolicy;\n\nvar 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    TracingConfig = \"tracingConfig\"\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 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        .tracingConfig(\"tracingConfig\")\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 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\tTracingConfig: jsii.String(\"tracingConfig\"),\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 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  tracingConfig: 'tracingConfig',\n};","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-sns.CfnTopicProps"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-sns.CfnTopicProps"],"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  tracingConfig: 'tracingConfig',\n};\n/// !hide\n// Code snippet ended before !hide marker above\n} }","syntaxKindCounter":{"10":10,"75":20,"91":2,"125":1,"130":1,"153":1,"169":1,"192":2,"193":3,"225":2,"242":2,"243":2,"254":1,"255":1,"256":1,"281":14,"290":1},"fqnsFingerprint":"84e1e0219e7db7bacdc8fbd5493015d45197350be93fd94c8beb74e875ba06d7"},"522037a7b5219b1d22d1989898cf6a471412dda8b9c7aefb5a70435aeffe9595":{"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.NumericConditions"},"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"},"87cde21a762c40c2eee8026fa61d60f94443b85f721a562633fb47cfb0fe5be3":{"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.StringConditions"},"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"},"09da8fc9b5f91845f94248af9bc77e880a8333c8e1f006aaccaa6b8b0f0abe0f":{"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":"type","fqn":"@aws-cdk/aws-sns.Subscription"},"field":{"field":"example"}},"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"},"7c8d1a93047c3e3f44226fdd5051ed9e3e8aeaf651eaf54bba37b17a05b83cec":{"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.SubscriptionFilter"},"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"},"fe01f78b8e401d26f80d8bec16a6e2d05dcc2cddb6f66c2108c542121687d02f":{"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\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)","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;\nusing Amazon.CDK.AWS.SQS;\n\nQueue queue;\nSubscriptionFilter subscriptionFilter;\n\nvar 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};","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.*;\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();","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\"\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}","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';\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};","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-sns.SubscriptionOptions"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-sns.SubscriptionFilter","@aws-cdk/aws-sns.SubscriptionOptions","@aws-cdk/aws-sns.SubscriptionProtocol","@aws-cdk/aws-sns.SubscriptionProtocol#HTTP","@aws-cdk/aws-sqs.IQueue"],"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} }","syntaxKindCounter":{"10":5,"75":24,"91":1,"130":2,"153":3,"169":3,"193":2,"194":2,"225":3,"242":3,"243":3,"254":2,"255":2,"256":2,"281":8,"290":1},"fqnsFingerprint":"45ce2a6218260d9da0d91c3745ea9217ce97314a4cd5e8422bd3d0c2cb9b1ed0"},"b95b03008d544a3f5caada734c9413bd883f21b44d38f7fd00a6b07931e45f0c":{"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":"type","fqn":"@aws-cdk/aws-sns.SubscriptionProps"},"field":{"field":"example"}},"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"},"8a47b04cd03548c188fecc312f27a6c1b8f49d0946a631b32e88b353440db0c7":{"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":"type","fqn":"@aws-cdk/aws-sns.SubscriptionProtocol"},"field":{"field":"example"}},"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"},"ef8aae1571848313c7844ae99697b761cfaee50d4a6c2bfa64ccd9fbccb06460":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.SNS;\n\n\nvar topic = new Topic(this, \"MyTopic\");\n\nvar 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});","version":"1"},"java":{"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();","version":"1"},"go":{"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})","version":"1"},"$":{"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});","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-sns.Topic"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-iot-actions.SnsActionMessageFormat","@aws-cdk/aws-iot-actions.SnsActionMessageFormat#JSON","@aws-cdk/aws-iot-actions.SnsTopicAction","@aws-cdk/aws-iot-actions.SnsTopicActionProps","@aws-cdk/aws-iot.IotSql","@aws-cdk/aws-iot.IotSql#fromStringAsVer20160323","@aws-cdk/aws-iot.TopicRule","@aws-cdk/aws-iot.TopicRuleProps","@aws-cdk/aws-sns.ITopic","@aws-cdk/aws-sns.Topic","constructs.Construct"],"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}","syntaxKindCounter":{"10":4,"75":19,"104":2,"192":1,"193":2,"194":7,"196":1,"197":3,"225":2,"242":2,"243":2,"254":1,"255":1,"256":1,"281":3,"290":1},"fqnsFingerprint":"774839cdcebc61a5f2fd02171eb92df16e4872fd0c8ffa0121c1f8062292d6b9"},"cffcb206eeb9af5570b62f2e08be9399643de07090b6e884fcb893aacfb6d634":{"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":"type","fqn":"@aws-cdk/aws-sns.TopicPolicy"},"field":{"field":"example"}},"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"},"037362824fb58a2acf09cb0ac1166f4f75af549395f90c395135dd177ac3c717":{"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":"type","fqn":"@aws-cdk/aws-sns.TopicPolicyProps"},"field":{"field":"example"}},"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"},"a14856be58ad3cc8b9d69dbfdbbf42a27de76de17b39e0df5982f483f652aed3":{"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":"type","fqn":"@aws-cdk/aws-sns.TopicProps"},"field":{"field":"example"}},"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"},"af71c8d5e831a834acf2842fabcdd8fb2df8b0f48648fc61b617c3e1eccb0136":{"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\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)","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;\nusing Amazon.CDK.AWS.SQS;\nusing Amazon.CDK;\n\nConstruct construct;\nQueue queue;\nSubscriptionFilter subscriptionFilter;\nvar 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};","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.*;\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();","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\"\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}","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';\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};","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-sns.TopicSubscriptionConfig"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-sns.SubscriptionFilter","@aws-cdk/aws-sns.SubscriptionProtocol","@aws-cdk/aws-sns.SubscriptionProtocol#HTTP","@aws-cdk/aws-sns.TopicSubscriptionConfig","@aws-cdk/aws-sqs.IQueue","@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';\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} }","syntaxKindCounter":{"10":7,"75":31,"91":1,"130":3,"153":4,"169":4,"193":2,"194":2,"225":4,"242":4,"243":4,"254":3,"255":3,"256":3,"281":10,"290":1},"fqnsFingerprint":"d3f4cd12a17a9c70fecd92b6e4d3c19ef5cdaea81c4c1c85822e67425caceece"}}}