@aws-solutions-constructs/aws-iot-sqs 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +233 -25
- package/README.md +4 -3
- package/lib/index.d.ts +7 -7
- package/lib/index.js +3 -2
- package/package.json +7 -7
- package/test/integ.custom-max-receive-count.d.ts +1 -1
- package/test/integ.custom-max-receive-count.expected.json +1 -1
- package/test/integ.custom-max-receive-count.js +2 -2
- package/test/integ.dead-letter-queue-off.d.ts +1 -1
- package/test/integ.dead-letter-queue-off.expected.json +1 -1
- package/test/integ.dead-letter-queue-off.js +2 -2
- package/test/integ.default-arguments.d.ts +1 -1
- package/test/integ.default-arguments.expected.json +1 -1
- package/test/integ.default-arguments.js +2 -2
- package/test/integ.existing-queue.d.ts +1 -1
- package/test/integ.existing-queue.expected.json +1 -1
- package/test/integ.existing-queue.js +2 -2
- package/test/integ.use-kms-key-props.d.ts +1 -1
- package/test/integ.use-kms-key-props.expected.json +1 -1
- package/test/integ.use-kms-key-props.js +2 -2
- package/test/integ.use-queue-props.d.ts +1 -1
- package/test/integ.use-queue-props.expected.json +1 -1
- package/test/integ.use-queue-props.js +2 -2
- package/test/integ.with-existing-key.d.ts +1 -1
- package/test/integ.with-existing-key.expected.json +1 -1
- package/test/integ.with-existing-key.js +2 -2
- package/test/integ.without-create-kms-key.d.ts +1 -1
- package/test/integ.without-create-kms-key.expected.json +1 -1
- package/test/integ.without-create-kms-key.js +2 -2
- package/test/iot-sqs.test.d.ts +1 -1
- package/test/iot-sqs.test.js +2 -2
package/.jsii
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"url": "https://aws.amazon.com"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@aws-solutions-constructs/core": "2.
|
|
12
|
-
"aws-cdk-lib": "^2.
|
|
11
|
+
"@aws-solutions-constructs/core": "2.1.0",
|
|
12
|
+
"aws-cdk-lib": "^2.4.0",
|
|
13
13
|
"constructs": "^10.0.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencyClosure": {
|
|
@@ -52,6 +52,19 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
|
+
"aws-cdk-lib.assertions": {
|
|
56
|
+
"targets": {
|
|
57
|
+
"dotnet": {
|
|
58
|
+
"namespace": "Amazon.CDK.Assertions"
|
|
59
|
+
},
|
|
60
|
+
"java": {
|
|
61
|
+
"package": "software.amazon.awscdk.assertions"
|
|
62
|
+
},
|
|
63
|
+
"python": {
|
|
64
|
+
"module": "aws_cdk.assertions"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
55
68
|
"aws-cdk-lib.assets": {
|
|
56
69
|
"targets": {
|
|
57
70
|
"dotnet": {
|
|
@@ -117,6 +130,19 @@
|
|
|
117
130
|
}
|
|
118
131
|
}
|
|
119
132
|
},
|
|
133
|
+
"aws-cdk-lib.aws_amplifyuibuilder": {
|
|
134
|
+
"targets": {
|
|
135
|
+
"dotnet": {
|
|
136
|
+
"namespace": "Amazon.CDK.AWS.AmplifyUIBuilder"
|
|
137
|
+
},
|
|
138
|
+
"java": {
|
|
139
|
+
"package": "software.amazon.awscdk.services.amplifyuibuilder"
|
|
140
|
+
},
|
|
141
|
+
"python": {
|
|
142
|
+
"module": "aws_cdk.aws_amplifyuibuilder"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
120
146
|
"aws-cdk-lib.aws_apigateway": {
|
|
121
147
|
"targets": {
|
|
122
148
|
"dotnet": {
|
|
@@ -250,7 +276,7 @@
|
|
|
250
276
|
"aws-cdk-lib.aws_appsync": {
|
|
251
277
|
"targets": {
|
|
252
278
|
"dotnet": {
|
|
253
|
-
"namespace": "Amazon.CDK.AWS.
|
|
279
|
+
"namespace": "Amazon.CDK.AWS.AppSync"
|
|
254
280
|
},
|
|
255
281
|
"java": {
|
|
256
282
|
"package": "software.amazon.awscdk.services.appsync"
|
|
@@ -260,6 +286,19 @@
|
|
|
260
286
|
}
|
|
261
287
|
}
|
|
262
288
|
},
|
|
289
|
+
"aws-cdk-lib.aws_aps": {
|
|
290
|
+
"targets": {
|
|
291
|
+
"dotnet": {
|
|
292
|
+
"namespace": "Amazon.CDK.AWS.APS"
|
|
293
|
+
},
|
|
294
|
+
"java": {
|
|
295
|
+
"package": "software.amazon.awscdk.services.aps"
|
|
296
|
+
},
|
|
297
|
+
"python": {
|
|
298
|
+
"module": "aws_cdk.aws_aps"
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
},
|
|
263
302
|
"aws-cdk-lib.aws_athena": {
|
|
264
303
|
"targets": {
|
|
265
304
|
"dotnet": {
|
|
@@ -1119,6 +1158,19 @@
|
|
|
1119
1158
|
}
|
|
1120
1159
|
}
|
|
1121
1160
|
},
|
|
1161
|
+
"aws-cdk-lib.aws_evidently": {
|
|
1162
|
+
"targets": {
|
|
1163
|
+
"dotnet": {
|
|
1164
|
+
"namespace": "Amazon.CDK.AWS.Evidently"
|
|
1165
|
+
},
|
|
1166
|
+
"java": {
|
|
1167
|
+
"package": "software.amazon.awscdk.services.evidently"
|
|
1168
|
+
},
|
|
1169
|
+
"python": {
|
|
1170
|
+
"module": "aws_cdk.aws_evidently"
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1122
1174
|
"aws-cdk-lib.aws_finspace": {
|
|
1123
1175
|
"targets": {
|
|
1124
1176
|
"dotnet": {
|
|
@@ -1288,6 +1340,19 @@
|
|
|
1288
1340
|
}
|
|
1289
1341
|
}
|
|
1290
1342
|
},
|
|
1343
|
+
"aws-cdk-lib.aws_healthlake": {
|
|
1344
|
+
"targets": {
|
|
1345
|
+
"dotnet": {
|
|
1346
|
+
"namespace": "Amazon.CDK.AWS.HealthLake"
|
|
1347
|
+
},
|
|
1348
|
+
"java": {
|
|
1349
|
+
"package": "software.amazon.awscdk.services.healthlake"
|
|
1350
|
+
},
|
|
1351
|
+
"python": {
|
|
1352
|
+
"module": "aws_cdk.aws_healthlake"
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1291
1356
|
"aws-cdk-lib.aws_iam": {
|
|
1292
1357
|
"targets": {
|
|
1293
1358
|
"dotnet": {
|
|
@@ -1587,6 +1652,19 @@
|
|
|
1587
1652
|
}
|
|
1588
1653
|
}
|
|
1589
1654
|
},
|
|
1655
|
+
"aws-cdk-lib.aws_lex": {
|
|
1656
|
+
"targets": {
|
|
1657
|
+
"dotnet": {
|
|
1658
|
+
"namespace": "Amazon.CDK.AWS.Lex"
|
|
1659
|
+
},
|
|
1660
|
+
"java": {
|
|
1661
|
+
"package": "software.amazon.awscdk.services.lex"
|
|
1662
|
+
},
|
|
1663
|
+
"python": {
|
|
1664
|
+
"module": "aws_cdk.aws_lex"
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
},
|
|
1590
1668
|
"aws-cdk-lib.aws_licensemanager": {
|
|
1591
1669
|
"targets": {
|
|
1592
1670
|
"dotnet": {
|
|
@@ -1600,6 +1678,19 @@
|
|
|
1600
1678
|
}
|
|
1601
1679
|
}
|
|
1602
1680
|
},
|
|
1681
|
+
"aws-cdk-lib.aws_lightsail": {
|
|
1682
|
+
"targets": {
|
|
1683
|
+
"dotnet": {
|
|
1684
|
+
"namespace": "Amazon.CDK.AWS.Lightsail"
|
|
1685
|
+
},
|
|
1686
|
+
"java": {
|
|
1687
|
+
"package": "software.amazon.awscdk.services.lightsail"
|
|
1688
|
+
},
|
|
1689
|
+
"python": {
|
|
1690
|
+
"module": "aws_cdk.aws_lightsail"
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
},
|
|
1603
1694
|
"aws-cdk-lib.aws_location": {
|
|
1604
1695
|
"targets": {
|
|
1605
1696
|
"dotnet": {
|
|
@@ -1769,10 +1860,23 @@
|
|
|
1769
1860
|
}
|
|
1770
1861
|
}
|
|
1771
1862
|
},
|
|
1863
|
+
"aws-cdk-lib.aws_memorydb": {
|
|
1864
|
+
"targets": {
|
|
1865
|
+
"dotnet": {
|
|
1866
|
+
"namespace": "Amazon.CDK.AWS.MemoryDB"
|
|
1867
|
+
},
|
|
1868
|
+
"java": {
|
|
1869
|
+
"package": "software.amazon.awscdk.services.memorydb"
|
|
1870
|
+
},
|
|
1871
|
+
"python": {
|
|
1872
|
+
"module": "aws_cdk.aws_memorydb"
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
},
|
|
1772
1876
|
"aws-cdk-lib.aws_msk": {
|
|
1773
1877
|
"targets": {
|
|
1774
1878
|
"dotnet": {
|
|
1775
|
-
"namespace": "Amazon.CDK.AWS.
|
|
1879
|
+
"namespace": "Amazon.CDK.AWS.MSK"
|
|
1776
1880
|
},
|
|
1777
1881
|
"java": {
|
|
1778
1882
|
"package": "software.amazon.awscdk.services.msk"
|
|
@@ -1847,6 +1951,19 @@
|
|
|
1847
1951
|
}
|
|
1848
1952
|
}
|
|
1849
1953
|
},
|
|
1954
|
+
"aws-cdk-lib.aws_opensearchservice": {
|
|
1955
|
+
"targets": {
|
|
1956
|
+
"dotnet": {
|
|
1957
|
+
"namespace": "Amazon.CDK.AWS.OpenSearchService"
|
|
1958
|
+
},
|
|
1959
|
+
"java": {
|
|
1960
|
+
"package": "software.amazon.awscdk.services.opensearchservice"
|
|
1961
|
+
},
|
|
1962
|
+
"python": {
|
|
1963
|
+
"module": "aws_cdk.aws_opensearchservice"
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1966
|
+
},
|
|
1850
1967
|
"aws-cdk-lib.aws_opsworks": {
|
|
1851
1968
|
"targets": {
|
|
1852
1969
|
"dotnet": {
|
|
@@ -1873,6 +1990,19 @@
|
|
|
1873
1990
|
}
|
|
1874
1991
|
}
|
|
1875
1992
|
},
|
|
1993
|
+
"aws-cdk-lib.aws_panorama": {
|
|
1994
|
+
"targets": {
|
|
1995
|
+
"dotnet": {
|
|
1996
|
+
"namespace": "Amazon.CDK.AWS.Panorama"
|
|
1997
|
+
},
|
|
1998
|
+
"java": {
|
|
1999
|
+
"package": "software.amazon.awscdk.services.panorama"
|
|
2000
|
+
},
|
|
2001
|
+
"python": {
|
|
2002
|
+
"module": "aws_cdk.aws_panorama"
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
},
|
|
1876
2006
|
"aws-cdk-lib.aws_pinpoint": {
|
|
1877
2007
|
"targets": {
|
|
1878
2008
|
"dotnet": {
|
|
@@ -1964,6 +2094,45 @@
|
|
|
1964
2094
|
}
|
|
1965
2095
|
}
|
|
1966
2096
|
},
|
|
2097
|
+
"aws-cdk-lib.aws_refactorspaces": {
|
|
2098
|
+
"targets": {
|
|
2099
|
+
"dotnet": {
|
|
2100
|
+
"namespace": "Amazon.CDK.AWS.RefactorSpaces"
|
|
2101
|
+
},
|
|
2102
|
+
"java": {
|
|
2103
|
+
"package": "software.amazon.awscdk.services.refactorspaces"
|
|
2104
|
+
},
|
|
2105
|
+
"python": {
|
|
2106
|
+
"module": "aws_cdk.aws_refactorspaces"
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
},
|
|
2110
|
+
"aws-cdk-lib.aws_rekognition": {
|
|
2111
|
+
"targets": {
|
|
2112
|
+
"dotnet": {
|
|
2113
|
+
"namespace": "Amazon.CDK.AWS.Rekognition"
|
|
2114
|
+
},
|
|
2115
|
+
"java": {
|
|
2116
|
+
"package": "software.amazon.awscdk.services.rekognition"
|
|
2117
|
+
},
|
|
2118
|
+
"python": {
|
|
2119
|
+
"module": "aws_cdk.aws_rekognition"
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
},
|
|
2123
|
+
"aws-cdk-lib.aws_resiliencehub": {
|
|
2124
|
+
"targets": {
|
|
2125
|
+
"dotnet": {
|
|
2126
|
+
"namespace": "Amazon.CDK.AWS.ResilienceHub"
|
|
2127
|
+
},
|
|
2128
|
+
"java": {
|
|
2129
|
+
"package": "software.amazon.awscdk.services.resiliencehub"
|
|
2130
|
+
},
|
|
2131
|
+
"python": {
|
|
2132
|
+
"module": "aws_cdk.aws_resiliencehub"
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
},
|
|
1967
2136
|
"aws-cdk-lib.aws_resourcegroups": {
|
|
1968
2137
|
"targets": {
|
|
1969
2138
|
"dotnet": {
|
|
@@ -2068,6 +2237,19 @@
|
|
|
2068
2237
|
}
|
|
2069
2238
|
}
|
|
2070
2239
|
},
|
|
2240
|
+
"aws-cdk-lib.aws_rum": {
|
|
2241
|
+
"targets": {
|
|
2242
|
+
"dotnet": {
|
|
2243
|
+
"namespace": "Amazon.CDK.AWS.RUM"
|
|
2244
|
+
},
|
|
2245
|
+
"java": {
|
|
2246
|
+
"package": "software.amazon.awscdk.services.rum"
|
|
2247
|
+
},
|
|
2248
|
+
"python": {
|
|
2249
|
+
"module": "aws_cdk.aws_rum"
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
},
|
|
2071
2253
|
"aws-cdk-lib.aws_s3": {
|
|
2072
2254
|
"targets": {
|
|
2073
2255
|
"dotnet": {
|
|
@@ -2484,6 +2666,19 @@
|
|
|
2484
2666
|
}
|
|
2485
2667
|
}
|
|
2486
2668
|
},
|
|
2669
|
+
"aws-cdk-lib.aws_wisdom": {
|
|
2670
|
+
"targets": {
|
|
2671
|
+
"dotnet": {
|
|
2672
|
+
"namespace": "Amazon.CDK.AWS.Wisdom"
|
|
2673
|
+
},
|
|
2674
|
+
"java": {
|
|
2675
|
+
"package": "software.amazon.awscdk.services.wisdom"
|
|
2676
|
+
},
|
|
2677
|
+
"python": {
|
|
2678
|
+
"module": "aws_cdk.aws_wisdom"
|
|
2679
|
+
}
|
|
2680
|
+
}
|
|
2681
|
+
},
|
|
2487
2682
|
"aws-cdk-lib.aws_workspaces": {
|
|
2488
2683
|
"targets": {
|
|
2489
2684
|
"dotnet": {
|
|
@@ -2588,6 +2783,19 @@
|
|
|
2588
2783
|
}
|
|
2589
2784
|
}
|
|
2590
2785
|
},
|
|
2786
|
+
"aws-cdk-lib.lambda_layer_node_proxy_agent": {
|
|
2787
|
+
"targets": {
|
|
2788
|
+
"dotnet": {
|
|
2789
|
+
"namespace": "Amazon.CDK.LambdaLayer.NodeProxyAgent"
|
|
2790
|
+
},
|
|
2791
|
+
"java": {
|
|
2792
|
+
"package": "software.amazon.awscdk.lambda.layer.node.proxy.agent"
|
|
2793
|
+
},
|
|
2794
|
+
"python": {
|
|
2795
|
+
"module": "aws_cdk.lambda_layer_node_proxy_agent"
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
},
|
|
2591
2799
|
"aws-cdk-lib.pipelines": {
|
|
2592
2800
|
"targets": {
|
|
2593
2801
|
"dotnet": {
|
|
@@ -2669,7 +2877,7 @@
|
|
|
2669
2877
|
},
|
|
2670
2878
|
"description": "CDK Constructs for AWS IoT to AWS SQS integration",
|
|
2671
2879
|
"homepage": "https://github.com/awslabs/aws-solutions-constructs.git",
|
|
2672
|
-
"jsiiVersion": "1.
|
|
2880
|
+
"jsiiVersion": "1.52.1 (build 5ccc8f6)",
|
|
2673
2881
|
"license": "Apache-2.0",
|
|
2674
2882
|
"metadata": {
|
|
2675
2883
|
"jsii": {
|
|
@@ -2680,7 +2888,7 @@
|
|
|
2680
2888
|
},
|
|
2681
2889
|
"name": "@aws-solutions-constructs/aws-iot-sqs",
|
|
2682
2890
|
"readme": {
|
|
2683
|
-
"markdown": "# aws-iot-sqs module\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> All classes are under active development and subject to non-backward compatible changes or removal in any\n> future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.\n> This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.\n\n---\n<!--END STABILITY BANNER-->\n\n| **Reference Documentation**:| <span style=\"font-weight: normal\">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|\n|:-------------|:-------------|\n<div style=\"height:8px\"></div>\n\n| **Language** | **Package** |\n|:-------------|-----------------|\n| Python|`aws_solutions_constructs.aws_iot_sqs`|\n| Typescript|`@aws-solutions-constructs/aws-iot-sqs`|\n| Java|`software.amazon.awsconstructs.services.iotsqs`|\n\nThis AWS Solutions Construct implements an AWS IoT MQTT topic rule and an AWS SQS Queue pattern.\n\nHere is a minimal deployable pattern definition in Typescript:\n\n``` typescript\nconst { IotToSqsProps, IotToSqs } from '@aws-solutions-constructs/aws-iot-sqs';\n\nconst props: IotToSqsProps = {\n iotTopicRuleProps: {\n topicRulePayload: {\n ruleDisabled: false,\n description: \"Testing the IotToSqs Pattern\",\n sql: \"SELECT * FROM 'iot/sqs/#'\",\n actions: []\n }\n }\n};\n\nnew IotToSqs(this, 'test-iot-sqs-integration', props);\n```\n\n## Initializer\n\n``` text\nnew IotToSqs(scope: Construct, id: string, props: IotToSqsProps);\n```\n\n_Parameters_\n\n* scope [`Construct`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_core.Construct.html)\n* id `string`\n* props [`IotToSqsProps`](#pattern-construct-props)\n\n## Pattern Construct Props\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n|existingQueueObj?|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-sqs.Queue.html)|Existing instance of SQS queue object, providing both this and `queueProps` will cause an error.|\n|queueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-sqs.QueueProps.html)|User provided props to override the default props for the SQS queue.|\n|deadLetterQueueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-sqs.QueueProps.html)|Optional user provided properties for the dead letter queue.|\n|deployDeadLetterQueue?|`boolean`|Whether to deploy a secondary queue to be used as a dead letter queue. Default `true`.|\n|maxReceiveCount?|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue. Required field if `deployDeadLetterQueue`=`true`.|\n|enableEncryptionWithCustomerManagedKey?|`boolean`|Use a KMS Key, either managed by this CDK app, or imported. If importing an encryption key, it must be specified in the `encryptionKey` property for this construct.|\n|encryptionKey?|[`kms.Key`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-kms.Key.html)|An optional, imported encryption key to encrypt the SQS queue.|\n|encryptionKeyProps?|[`kms.KeyProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-kms.KeyProps.html)|Optional user-provided props to override the default props for the encryption key.|\n
|
|
2891
|
+
"markdown": "# aws-iot-sqs module\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> All classes are under active development and subject to non-backward compatible changes or removal in any\n> future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.\n> This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.\n\n---\n<!--END STABILITY BANNER-->\n\n| **Reference Documentation**:| <span style=\"font-weight: normal\">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|\n|:-------------|:-------------|\n<div style=\"height:8px\"></div>\n\n| **Language** | **Package** |\n|:-------------|-----------------|\n| Python|`aws_solutions_constructs.aws_iot_sqs`|\n| Typescript|`@aws-solutions-constructs/aws-iot-sqs`|\n| Java|`software.amazon.awsconstructs.services.iotsqs`|\n\nThis AWS Solutions Construct implements an AWS IoT MQTT topic rule and an AWS SQS Queue pattern.\n\nHere is a minimal deployable pattern definition in Typescript:\n\n``` typescript\nconst { IotToSqsProps, IotToSqs } from '@aws-solutions-constructs/aws-iot-sqs';\n\nconst props: IotToSqsProps = {\n iotTopicRuleProps: {\n topicRulePayload: {\n ruleDisabled: false,\n description: \"Testing the IotToSqs Pattern\",\n sql: \"SELECT * FROM 'iot/sqs/#'\",\n actions: []\n }\n }\n};\n\nnew IotToSqs(this, 'test-iot-sqs-integration', props);\n```\n\n## Initializer\n\n``` text\nnew IotToSqs(scope: Construct, id: string, props: IotToSqsProps);\n```\n\n_Parameters_\n\n* scope [`Construct`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_core.Construct.html)\n* id `string`\n* props [`IotToSqsProps`](#pattern-construct-props)\n\n## Pattern Construct Props\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n|iotTopicRuleProps|[`iot.CfnTopicRuleProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-iot.CfnTopicRuleProps.html)|User provided CfnTopicRuleProps to override the defaults|\n|existingQueueObj?|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-sqs.Queue.html)|Existing instance of SQS queue object, providing both this and `queueProps` will cause an error.|\n|queueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-sqs.QueueProps.html)|User provided props to override the default props for the SQS queue.|\n|deadLetterQueueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-sqs.QueueProps.html)|Optional user provided properties for the dead letter queue.|\n|deployDeadLetterQueue?|`boolean`|Whether to deploy a secondary queue to be used as a dead letter queue. Default `true`.|\n|maxReceiveCount?|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue. Required field if `deployDeadLetterQueue`=`true`.|\n|enableEncryptionWithCustomerManagedKey?|`boolean`|Use a KMS Key, either managed by this CDK app, or imported. If importing an encryption key, it must be specified in the `encryptionKey` property for this construct.|\n|encryptionKey?|[`kms.Key`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-kms.Key.html)|An optional, imported encryption key to encrypt the SQS queue.|\n|encryptionKeyProps?|[`kms.KeyProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-kms.KeyProps.html)|Optional user-provided props to override the default props for the encryption key.|\n\n\n## Pattern Properties\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n|encryptionKey?|[`kms.Key`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-kms.Key.html)|Returns an instance of `kms.Key` used for the SQS queue.|\n|iotActionsRole|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-iam.Role.html)|Returns an instance of `iam.Role` created by the construct, which allows IoT to publish messages to the SQS Queue|\n|sqsQueue|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-sqs.Queue.html)|Returns an instance of `sqs.Queue` created by the construct|\n|deadLetterQueue?|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-sqs.Queue.html)|Returns an instance of the dead-letter SQS queue created by the pattern.|\n|iotTopicRule|[`iot.CfnTopicRule`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-iot.CfnTopicRule.html)|Returns an instance of `iot.CfnTopicRule` created by the construct|\n\n## Default settings\n\nOut of the box implementation of the Construct without any override will set the following defaults:\n\n### Amazon IoT Rule\n* Configure an IoT Rule to send messages to the SQS Queue\n\n### Amazon IAM Role\n* Configure least privilege access IAM role for Amazon IoT to be able to publish messages to the SQS Queue\n\n### Amazon SQS Queue\n* Deploy a dead-letter queue for the source queue.\n* Enable server-side encryption for the source queue using a customer-managed AWS KMS key.\n* Enforce encryption of data in transit.\n\n## Architecture\n\n\n***\n© Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved."
|
|
2684
2892
|
},
|
|
2685
2893
|
"repository": {
|
|
2686
2894
|
"directory": "source/patterns/@aws-solutions-constructs/aws-iot-sqs",
|
|
@@ -2724,7 +2932,7 @@
|
|
|
2724
2932
|
},
|
|
2725
2933
|
"locationInModule": {
|
|
2726
2934
|
"filename": "lib/index.ts",
|
|
2727
|
-
"line":
|
|
2935
|
+
"line": 103
|
|
2728
2936
|
},
|
|
2729
2937
|
"parameters": [
|
|
2730
2938
|
{
|
|
@@ -2759,7 +2967,7 @@
|
|
|
2759
2967
|
"kind": "class",
|
|
2760
2968
|
"locationInModule": {
|
|
2761
2969
|
"filename": "lib/index.ts",
|
|
2762
|
-
"line":
|
|
2970
|
+
"line": 89
|
|
2763
2971
|
},
|
|
2764
2972
|
"name": "IotToSqs",
|
|
2765
2973
|
"properties": [
|
|
@@ -2767,7 +2975,7 @@
|
|
|
2767
2975
|
"immutable": true,
|
|
2768
2976
|
"locationInModule": {
|
|
2769
2977
|
"filename": "lib/index.ts",
|
|
2770
|
-
"line":
|
|
2978
|
+
"line": 93
|
|
2771
2979
|
},
|
|
2772
2980
|
"name": "iotActionsRole",
|
|
2773
2981
|
"type": {
|
|
@@ -2778,7 +2986,7 @@
|
|
|
2778
2986
|
"immutable": true,
|
|
2779
2987
|
"locationInModule": {
|
|
2780
2988
|
"filename": "lib/index.ts",
|
|
2781
|
-
"line":
|
|
2989
|
+
"line": 94
|
|
2782
2990
|
},
|
|
2783
2991
|
"name": "iotTopicRule",
|
|
2784
2992
|
"type": {
|
|
@@ -2789,7 +2997,7 @@
|
|
|
2789
2997
|
"immutable": true,
|
|
2790
2998
|
"locationInModule": {
|
|
2791
2999
|
"filename": "lib/index.ts",
|
|
2792
|
-
"line":
|
|
3000
|
+
"line": 90
|
|
2793
3001
|
},
|
|
2794
3002
|
"name": "sqsQueue",
|
|
2795
3003
|
"type": {
|
|
@@ -2800,7 +3008,7 @@
|
|
|
2800
3008
|
"immutable": true,
|
|
2801
3009
|
"locationInModule": {
|
|
2802
3010
|
"filename": "lib/index.ts",
|
|
2803
|
-
"line":
|
|
3011
|
+
"line": 91
|
|
2804
3012
|
},
|
|
2805
3013
|
"name": "deadLetterQueue",
|
|
2806
3014
|
"optional": true,
|
|
@@ -2812,7 +3020,7 @@
|
|
|
2812
3020
|
"immutable": true,
|
|
2813
3021
|
"locationInModule": {
|
|
2814
3022
|
"filename": "lib/index.ts",
|
|
2815
|
-
"line":
|
|
3023
|
+
"line": 92
|
|
2816
3024
|
},
|
|
2817
3025
|
"name": "encryptionKey",
|
|
2818
3026
|
"optional": true,
|
|
@@ -2835,7 +3043,7 @@
|
|
|
2835
3043
|
"kind": "interface",
|
|
2836
3044
|
"locationInModule": {
|
|
2837
3045
|
"filename": "lib/index.ts",
|
|
2838
|
-
"line":
|
|
3046
|
+
"line": 25
|
|
2839
3047
|
},
|
|
2840
3048
|
"name": "IotToSqsProps",
|
|
2841
3049
|
"properties": [
|
|
@@ -2848,7 +3056,7 @@
|
|
|
2848
3056
|
"immutable": true,
|
|
2849
3057
|
"locationInModule": {
|
|
2850
3058
|
"filename": "lib/index.ts",
|
|
2851
|
-
"line":
|
|
3059
|
+
"line": 31
|
|
2852
3060
|
},
|
|
2853
3061
|
"name": "iotTopicRuleProps",
|
|
2854
3062
|
"type": {
|
|
@@ -2864,7 +3072,7 @@
|
|
|
2864
3072
|
"immutable": true,
|
|
2865
3073
|
"locationInModule": {
|
|
2866
3074
|
"filename": "lib/index.ts",
|
|
2867
|
-
"line":
|
|
3075
|
+
"line": 50
|
|
2868
3076
|
},
|
|
2869
3077
|
"name": "deadLetterQueueProps",
|
|
2870
3078
|
"optional": true,
|
|
@@ -2881,7 +3089,7 @@
|
|
|
2881
3089
|
"immutable": true,
|
|
2882
3090
|
"locationInModule": {
|
|
2883
3091
|
"filename": "lib/index.ts",
|
|
2884
|
-
"line":
|
|
3092
|
+
"line": 57
|
|
2885
3093
|
},
|
|
2886
3094
|
"name": "deployDeadLetterQueue",
|
|
2887
3095
|
"optional": true,
|
|
@@ -2899,7 +3107,7 @@
|
|
|
2899
3107
|
"immutable": true,
|
|
2900
3108
|
"locationInModule": {
|
|
2901
3109
|
"filename": "lib/index.ts",
|
|
2902
|
-
"line":
|
|
3110
|
+
"line": 72
|
|
2903
3111
|
},
|
|
2904
3112
|
"name": "enableEncryptionWithCustomerManagedKey",
|
|
2905
3113
|
"optional": true,
|
|
@@ -2916,7 +3124,7 @@
|
|
|
2916
3124
|
"immutable": true,
|
|
2917
3125
|
"locationInModule": {
|
|
2918
3126
|
"filename": "lib/index.ts",
|
|
2919
|
-
"line":
|
|
3127
|
+
"line": 79
|
|
2920
3128
|
},
|
|
2921
3129
|
"name": "encryptionKey",
|
|
2922
3130
|
"optional": true,
|
|
@@ -2933,7 +3141,7 @@
|
|
|
2933
3141
|
"immutable": true,
|
|
2934
3142
|
"locationInModule": {
|
|
2935
3143
|
"filename": "lib/index.ts",
|
|
2936
|
-
"line":
|
|
3144
|
+
"line": 86
|
|
2937
3145
|
},
|
|
2938
3146
|
"name": "encryptionKeyProps",
|
|
2939
3147
|
"optional": true,
|
|
@@ -2950,7 +3158,7 @@
|
|
|
2950
3158
|
"immutable": true,
|
|
2951
3159
|
"locationInModule": {
|
|
2952
3160
|
"filename": "lib/index.ts",
|
|
2953
|
-
"line":
|
|
3161
|
+
"line": 37
|
|
2954
3162
|
},
|
|
2955
3163
|
"name": "existingQueueObj",
|
|
2956
3164
|
"optional": true,
|
|
@@ -2967,7 +3175,7 @@
|
|
|
2967
3175
|
"immutable": true,
|
|
2968
3176
|
"locationInModule": {
|
|
2969
3177
|
"filename": "lib/index.ts",
|
|
2970
|
-
"line":
|
|
3178
|
+
"line": 64
|
|
2971
3179
|
},
|
|
2972
3180
|
"name": "maxReceiveCount",
|
|
2973
3181
|
"optional": true,
|
|
@@ -2984,7 +3192,7 @@
|
|
|
2984
3192
|
"immutable": true,
|
|
2985
3193
|
"locationInModule": {
|
|
2986
3194
|
"filename": "lib/index.ts",
|
|
2987
|
-
"line":
|
|
3195
|
+
"line": 43
|
|
2988
3196
|
},
|
|
2989
3197
|
"name": "queueProps",
|
|
2990
3198
|
"optional": true,
|
|
@@ -2996,6 +3204,6 @@
|
|
|
2996
3204
|
"symbolId": "lib/index:IotToSqsProps"
|
|
2997
3205
|
}
|
|
2998
3206
|
},
|
|
2999
|
-
"version": "2.
|
|
3000
|
-
"fingerprint": "
|
|
3207
|
+
"version": "2.1.0",
|
|
3208
|
+
"fingerprint": "HnRz3j8R7Oy2x0EKSJ8n1cpKocjYYVND9amfJr7Mp7E="
|
|
3001
3209
|
}
|
package/README.md
CHANGED
|
@@ -59,6 +59,7 @@ _Parameters_
|
|
|
59
59
|
|
|
60
60
|
| **Name** | **Type** | **Description** |
|
|
61
61
|
|:-------------|:----------------|-----------------|
|
|
62
|
+
|iotTopicRuleProps|[`iot.CfnTopicRuleProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-iot.CfnTopicRuleProps.html)|User provided CfnTopicRuleProps to override the defaults|
|
|
62
63
|
|existingQueueObj?|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-sqs.Queue.html)|Existing instance of SQS queue object, providing both this and `queueProps` will cause an error.|
|
|
63
64
|
|queueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-sqs.QueueProps.html)|User provided props to override the default props for the SQS queue.|
|
|
64
65
|
|deadLetterQueueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-sqs.QueueProps.html)|Optional user provided properties for the dead letter queue.|
|
|
@@ -67,7 +68,7 @@ _Parameters_
|
|
|
67
68
|
|enableEncryptionWithCustomerManagedKey?|`boolean`|Use a KMS Key, either managed by this CDK app, or imported. If importing an encryption key, it must be specified in the `encryptionKey` property for this construct.|
|
|
68
69
|
|encryptionKey?|[`kms.Key`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-kms.Key.html)|An optional, imported encryption key to encrypt the SQS queue.|
|
|
69
70
|
|encryptionKeyProps?|[`kms.KeyProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-kms.KeyProps.html)|Optional user-provided props to override the default props for the encryption key.|
|
|
70
|
-
|
|
71
|
+
|
|
71
72
|
|
|
72
73
|
## Pattern Properties
|
|
73
74
|
|
|
@@ -90,9 +91,9 @@ Out of the box implementation of the Construct without any override will set the
|
|
|
90
91
|
* Configure least privilege access IAM role for Amazon IoT to be able to publish messages to the SQS Queue
|
|
91
92
|
|
|
92
93
|
### Amazon SQS Queue
|
|
93
|
-
* Deploy a dead-letter queue for the source queue.
|
|
94
|
+
* Deploy a dead-letter queue for the source queue.
|
|
94
95
|
* Enable server-side encryption for the source queue using a customer-managed AWS KMS key.
|
|
95
|
-
* Enforce encryption of data in transit.
|
|
96
|
+
* Enforce encryption of data in transit.
|
|
96
97
|
|
|
97
98
|
## Architecture
|
|
98
99
|

|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
|
|
5
5
|
* with the License. A copy of the License is located at
|
|
@@ -19,6 +19,12 @@ import { Construct } from 'constructs';
|
|
|
19
19
|
* @summary The properties for the IotToSqs class.
|
|
20
20
|
*/
|
|
21
21
|
export interface IotToSqsProps {
|
|
22
|
+
/**
|
|
23
|
+
* User provided CfnTopicRuleProps to override the defaults.
|
|
24
|
+
*
|
|
25
|
+
* @default - None
|
|
26
|
+
*/
|
|
27
|
+
readonly iotTopicRuleProps: iot.CfnTopicRuleProps;
|
|
22
28
|
/**
|
|
23
29
|
* Existing instance of SQS queue object, providing both this and queueProps will cause an error.
|
|
24
30
|
*
|
|
@@ -70,12 +76,6 @@ export interface IotToSqsProps {
|
|
|
70
76
|
* @default - Default props are used.
|
|
71
77
|
*/
|
|
72
78
|
readonly encryptionKeyProps?: kms.KeyProps;
|
|
73
|
-
/**
|
|
74
|
-
* User provided CfnTopicRuleProps to override the defaults.
|
|
75
|
-
*
|
|
76
|
-
* @default - None
|
|
77
|
-
*/
|
|
78
|
-
readonly iotTopicRuleProps: iot.CfnTopicRuleProps;
|
|
79
79
|
}
|
|
80
80
|
export declare class IotToSqs extends Construct {
|
|
81
81
|
readonly sqsQueue: sqs.Queue;
|
package/lib/index.js
CHANGED
|
@@ -6,6 +6,7 @@ const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
|
|
6
6
|
const iot = require("aws-cdk-lib/aws-iot");
|
|
7
7
|
const iam = require("aws-cdk-lib/aws-iam");
|
|
8
8
|
const defaults = require("@aws-solutions-constructs/core");
|
|
9
|
+
// Note: To ensure CDKv2 compatibility, keep the import statement for Construct separate
|
|
9
10
|
const constructs_1 = require("constructs");
|
|
10
11
|
class IotToSqs extends constructs_1.Construct {
|
|
11
12
|
/**
|
|
@@ -63,5 +64,5 @@ class IotToSqs extends constructs_1.Construct {
|
|
|
63
64
|
}
|
|
64
65
|
exports.IotToSqs = IotToSqs;
|
|
65
66
|
_a = JSII_RTTI_SYMBOL_1;
|
|
66
|
-
IotToSqs[_a] = { fqn: "@aws-solutions-constructs/aws-iot-sqs.IotToSqs", version: "2.
|
|
67
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
67
|
+
IotToSqs[_a] = { fqn: "@aws-solutions-constructs/aws-iot-sqs.IotToSqs", version: "2.1.0" };
|
|
68
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQWNBLDJDQUEyQztBQUUzQywyQ0FBMkM7QUFDM0MsMkRBQTJEO0FBQzNELHdGQUF3RjtBQUN4RiwyQ0FBdUM7QUE4QnZDLE1BQWEsUUFBUyxTQUFRLHNCQUFTOzs7Ozs7OztJQVFyQyxZQUFZLEtBQWdCLEVBQUUsRUFBVSxFQUFFLEtBQW9CO1FBQzVELEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDakIsUUFBUSxDQUFDLFVBQVUsQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUUzQiw2Q0FBNkM7UUFDN0MsSUFBSSxDQUFDLGVBQWUsR0FBRyxRQUFRLENBQUMsb0JBQW9CLENBQUMsSUFBSSxFQUFFO1lBQ3pELGdCQUFnQixFQUFFLEtBQUssQ0FB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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuZXhwb3J0IGludGVyZmFjZSBJb3RUb1Nxc1Byb3BzIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICByZWFkb25seSBpb3RUb3BpY1J1bGVQcm9wczogaW90LkNmblRvcGljUnVsZVByb3BzO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgcmVhZG9ubHkgZXhpc3RpbmdRdWV1ZU9iaj86IHNxcy5RdWV1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICByZWFkb25seSBxdWV1ZVByb3BzPzogc3FzLlF1ZXVlUHJvcHM7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICByZWFkb25seSBkZWFkTGV0dGVyUXVldWVQcm9wcz86IHNxcy5RdWV1ZVByb3BzO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgcmVhZG9ubHkgZGVwbG95RGVhZExldHRlclF1ZXVlPzogYm9vbGVhbjtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gIHJlYWRvbmx5IG1heFJlY2VpdmVDb3VudD86IG51bWJlcjtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgcmVhZG9ubHkgZW5hYmxlRW5jcnlwdGlvbldpdGhDdXN0b21lck1hbmFnZWRLZXk/OiBib29sZWFuO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gIHJlYWRvbmx5IGVuY3J5cHRpb25LZXk/OiBrbXMuS2V5O1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgcmVhZG9ubHkgZW5jcnlwdGlvbktleVByb3BzPzoga21zLktleVByb3BzO1xufVxuXG5leHBvcnQgY2xhc3MgSW90VG9TcXMgZXh0ZW5kcyBDb25zdHJ1Y3Qge1xuICBwdWJsaWMgcmVhZG9ubHkgc3FzUXVldWU6IHNxcy5RdWV1ZTtcbiAgcHVibGljIHJlYWRvbmx5IGRlYWRMZXR0ZXJRdWV1ZT86IHNxcy5EZWFkTGV0dGVyUXVldWU7XG4gIHB1YmxpYyByZWFkb25seSBlbmNyeXB0aW9uS2V5Pzoga21zLklLZXk7XG4gIHB1YmxpYyByZWFkb25seSBpb3RBY3Rpb25zUm9sZTogaWFtLlJvbGU7XG4gIHB1YmxpYyByZWFkb25seSBpb3RUb3BpY1J1bGU6IGlvdC5DZm5Ub3BpY1J1bGU7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICBjb25zdHJ1Y3RvcihzY29wZTogQ29uc3RydWN0LCBpZDogc3RyaW5nLCBwcm9wczogSW90VG9TcXNQcm9wcykge1xuICAgIHN1cGVyKHNjb3BlLCBpZCk7XG4gICAgZGVmYXVsdHMuQ2hlY2tQcm9wcyhwcm9wcyk7XG5cbiAgICAvLyBTZXR1cCB0aGUgZGVhZCBsZXR0ZXIgcXVldWUsIGlmIGFwcGxpY2FibGVcbiAgICB0aGlzLmRlYWRMZXR0ZXJRdWV1ZSA9IGRlZmF1bHRzLmJ1aWxkRGVhZExldHRlclF1ZXVlKHRoaXMsIHtcbiAgICAgIGV4aXN0aW5nUXVldWVPYmo6IHByb3BzLmV4aXN0aW5nUXVldWVPYmosXG4gICAgICBkZXBsb3lEZWFkTGV0dGVyUXVldWU6IHByb3BzLmRlcGxveURlYWRMZXR0ZXJRdWV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