aws-solutions-constructs.aws-apigatewayv2websocket-sqs 2.63.0__py3-none-any.whl
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.
- aws_solutions_constructs/aws_apigatewayv2websocket_sqs/__init__.py +615 -0
- aws_solutions_constructs/aws_apigatewayv2websocket_sqs/_jsii/__init__.py +32 -0
- aws_solutions_constructs/aws_apigatewayv2websocket_sqs/_jsii/aws-apigatewayv2websocket-sqs@2.63.0.jsii.tgz +0 -0
- aws_solutions_constructs/aws_apigatewayv2websocket_sqs/py.typed +1 -0
- aws_solutions_constructs.aws_apigatewayv2websocket_sqs-2.63.0.dist-info/LICENSE +73 -0
- aws_solutions_constructs.aws_apigatewayv2websocket_sqs-2.63.0.dist-info/METADATA +178 -0
- aws_solutions_constructs.aws_apigatewayv2websocket_sqs-2.63.0.dist-info/RECORD +9 -0
- aws_solutions_constructs.aws_apigatewayv2websocket_sqs-2.63.0.dist-info/WHEEL +5 -0
- aws_solutions_constructs.aws_apigatewayv2websocket_sqs-2.63.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,615 @@
|
|
1
|
+
r'''
|
2
|
+
# aws-apigatewayv2websocket-sqs module
|
3
|
+
|
4
|
+
<!--BEGIN STABILITY BANNER-->---
|
5
|
+
|
6
|
+
|
7
|
+

|
8
|
+
|
9
|
+
---
|
10
|
+
<!--END STABILITY BANNER-->
|
11
|
+
|
12
|
+
| **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
|
13
|
+
|:-------------|:-------------|
|
14
|
+
|
15
|
+
<div style="height:8px"></div>
|
16
|
+
|
17
|
+
| **Language** | **Package** |
|
18
|
+
|:-------------|-----------------|
|
19
|
+
| Python|`aws_solutions_constructs.aws_apigatewayv2websocket_sqs`|
|
20
|
+
| Typescript|`@aws-solutions-constructs/aws-apigatewayv2websocket-sqs`|
|
21
|
+
| Java|`software.amazon.awsconstructs.services.apigatewayv2websocketsqs`|
|
22
|
+
|
23
|
+
## Overview
|
24
|
+
|
25
|
+
This AWS Solutions Construct implements an Amazon API Gateway WebSocket connected to an Amazon SQS queue pattern.
|
26
|
+
|
27
|
+
Here is a minimal deployable pattern definition:
|
28
|
+
|
29
|
+
Typescript
|
30
|
+
|
31
|
+
```python
|
32
|
+
import { Construct } from "constructs";
|
33
|
+
import { Stack, StackProps } from "aws-cdk-lib";
|
34
|
+
import {
|
35
|
+
ApiGatewayV2WebSocketToSqs,
|
36
|
+
ApiGatewayV2WebSocketToSqsProps,
|
37
|
+
} from "@aws-solutions-constructs/aws-apigatewayv2websocket-sqs";
|
38
|
+
import { WebSocketLambdaAuthorizer } from 'aws-cdk-lib/aws-apigatewayv2-authorizers';
|
39
|
+
|
40
|
+
const authorizer = new WebSocketLambdaAuthorizer('Authorizer', authHandler);
|
41
|
+
|
42
|
+
new ApiGateApiGatewayV2WebSocketToSqswayToSqs(this, "ApiGatewayV2WebSocketToSqsPattern", {
|
43
|
+
webSocketApiProps: {
|
44
|
+
connectRouteOptions: {
|
45
|
+
integration: new WebSocketLambdaIntegration("ConnectIntegration", connectLambda),
|
46
|
+
authorizer: authorizer,
|
47
|
+
},
|
48
|
+
disconnectRouteOptions: {
|
49
|
+
integration: new WebSocketLambdaIntegration("DisconnectIntegration", disconnectLambda),
|
50
|
+
},
|
51
|
+
},
|
52
|
+
createDefaultRoute: true
|
53
|
+
});
|
54
|
+
```
|
55
|
+
|
56
|
+
Python
|
57
|
+
|
58
|
+
```python
|
59
|
+
from aws_solutions_constructs.aws_apigateway_sqs import ApiGatewayV2WebSocketToSqs
|
60
|
+
from aws_cdk.aws_apigatewayv2_authorizers import WebSocketLambdaAuthorizer
|
61
|
+
from aws_cdk import Stack
|
62
|
+
from constructs import Construct
|
63
|
+
|
64
|
+
authorizer = WebSocketLambdaAuthorizer("Authorizer", auth_handler)
|
65
|
+
|
66
|
+
ApiGatewayV2WebSocketToSqs(self, 'ApiGatewayV2WebSocketToSqsPattern',
|
67
|
+
connect_route_options=apigwv2.WebSocketRouteOptions(
|
68
|
+
integration=WebSocketLambdaIntegration("ConnectIntegration", connect_lambda),
|
69
|
+
authorizer=authorizer
|
70
|
+
),
|
71
|
+
disconnect_route_options=apigwv2.WebSocketRouteOptions(
|
72
|
+
integration=WebSocketLambdaIntegration("DisConnectIntegration", disconnect_lambda),
|
73
|
+
),
|
74
|
+
create_default_route=True
|
75
|
+
)
|
76
|
+
```
|
77
|
+
|
78
|
+
Java
|
79
|
+
|
80
|
+
```java
|
81
|
+
import software.constructs.Construct;
|
82
|
+
|
83
|
+
import software.amazon.awscdk.Stack;
|
84
|
+
import software.amazon.awscdk.StackProps;
|
85
|
+
import software.amazon.awscdk.aws_apigatewayv2_authorizers.*;
|
86
|
+
import software.amazon.awscdk.aws_apigatewayv2_integrations.*;
|
87
|
+
import software.amazon.awsconstructs.services.apigatewaysqs.*;
|
88
|
+
|
89
|
+
new ApiGatewayV2WebSocketToSqs(this, "ApiGatewayV2WebSocketToSqsPattern", new ApiGatewayV2WebSocketToSqsProps.Builder()
|
90
|
+
.webSocketApiProps(new WebSocketApiProps.Builder()
|
91
|
+
.connectRouteOptions(new WebSocketRouteOptions.builder()
|
92
|
+
.integration(new WebSocketLambdaIntegration("ConnectIntegration", connect_lambda)))
|
93
|
+
.disconnectRouteOptions(new WebSocketRouteOptions.builder()
|
94
|
+
.integration(new WebSocketLambdaIntegration("DisConnectIntegration", disconnect_lambda)))
|
95
|
+
.createDefaultRoute(true)
|
96
|
+
.build());
|
97
|
+
```
|
98
|
+
|
99
|
+
## Pattern Construct Props
|
100
|
+
|
101
|
+
| **Name** | **Type** | **Description** |
|
102
|
+
|:-------------|:----------------|-----------------|
|
103
|
+
|existingWebSocketApi?|[`apigwv2.WebSocketApi`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.WebSocketApi.html)|Optional API Gateway WebSocket instance. Providing both existingWebSocketApi and webSocketApiProps will cause an error.|
|
104
|
+
|webSocketApiProps?|[`apigwv2.WebSocketApiProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.WebSocketApiProps.html)|Optional user-provided props to override the default props for the API Gateway. Providing both existingWebSocketApi and webSocketApiProps will cause an error.|
|
105
|
+
|queueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|Optional user-provided props to override the default props for the queue. Providing both existingQueueObj and queueProps will cause an error.|
|
106
|
+
|existingQueueObj?|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Optional existing instance of SQS Queue. Providing both existingQueueObj and queueProps will cause an error.|
|
107
|
+
|deployDeadLetterQueue?|`boolean`|Whether to deploy a secondary queue to be used as a dead letter queue. Defaults to `true`.|
|
108
|
+
|deadLetterQueueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|Optional properties to use for creating dead letter queue. Note that if you are creating a FIFO Queue, the dead letter queue should also be FIFO.|
|
109
|
+
|maxReceiveCount|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue.|
|
110
|
+
|createDefaultRoute?|`boolean`|Whether to create a default route. At least one of createDefaultRoute or customRouteName must be provided. If set to true, then it will use the value supplied with `defaultRouteRequestTemplate`.|
|
111
|
+
|defaultRouteRequestTemplate?|`{ [contentType: string]: string }`|Optional user provided API Gateway Request Template for the default route and/ or customRoute (if customRouteName is provided). This property will only be used if createDefaultRoute is `true`. If createDefaultRoute is `true` and this property is not provided, the construct will create the default route with the following VTL mapping `"Action=SendMessage&MessageGroupId=$input.path('$.MessageGroupId')&MessageDeduplicationId=$context.requestId&MessageAttribute.1.Name=connectionId&MessageAttribute.1.Value.StringValue=$context.connectionId&MessageAttribute.1.Value.DataType=String&MessageAttribute.2.Name=requestId&MessageAttribute.2.Value.StringValue=$context.requestId&MessageAttribute.2.Value.DataType=String&MessageBody=$util.urlEncode($input.json($util.escapeJavaScript('$').replaceAll(\"\\\\'\",\"'\")))"`.|
|
112
|
+
|defaultIamAuthorization?|`boolean`|Add IAM authorization to the $connect path by default. Only set this to false if: 1) If plan to provide an authorizer with the `$connect` route; or 2) The API should be open (no authorization) (AWS recommends against deploying unprotected APIs). If an authorizer is specified in connectRouteOptions, this parameter is ignored and no default IAM authorizer will be created. |
|
113
|
+
|customRouteName?|`string`|The name of the route that will be sent through WebSocketApiProps.routeSelectionExpression when invoking the WebSocket endpoint. At least one of createDefaultRoute or customRouteName must be provided. |
|
114
|
+
|
115
|
+
## Pattern Properties
|
116
|
+
|
117
|
+
| **Name** | **Type** | **Description** |
|
118
|
+
|:-------------|:----------------|-----------------|
|
119
|
+
|webSocketApi|[`apigwv2.WebSocketApi`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.WebSocketApi.html)|Returns an instance of the API Gateway WebSocket API created by the pattern.|
|
120
|
+
|apiGatewayRole|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for API Gateway.|
|
121
|
+
|webSocketStage|[`apigwv2.WebSocketStage`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.WebSocketStage.html)|Returns an instance of the WebSocketStage created by the construct.|
|
122
|
+
|apiGatewayLogGroup|[`logs.LogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroup.html)|Returns an instance of the LogGroup created by the construct for API Gateway access logging to CloudWatch.|
|
123
|
+
|sqsQueue|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of the SQS queue created by the pattern.|
|
124
|
+
|deadLetterQueue?|[`sqs.DeadLetterQueue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.DeadLetterQueue.html)|Returns an instance of the DeadLetterQueue created by the pattern.|
|
125
|
+
|
126
|
+
## Default settings
|
127
|
+
|
128
|
+
Out of the box implementation of the Construct without any override will set the following defaults:
|
129
|
+
|
130
|
+
### Amazon API Gateway
|
131
|
+
|
132
|
+
* Deploy a WebSocket endpoint
|
133
|
+
* Enable CloudWatch logging for API Gateway
|
134
|
+
* Configure least privilege access IAM role for API Gateway
|
135
|
+
* Enable X-Ray Tracing
|
136
|
+
|
137
|
+
### Amazon SQS Queue
|
138
|
+
|
139
|
+
* Deploy SQS dead-letter queue for the source SQS Queue
|
140
|
+
* Enable server-side encryption for source SQS Queue using AWS Managed KMS Key
|
141
|
+
* Enforce encryption of data in transit
|
142
|
+
|
143
|
+
## Architecture
|
144
|
+
|
145
|
+

|
146
|
+
|
147
|
+
---
|
148
|
+
|
149
|
+
|
150
|
+
© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
151
|
+
'''
|
152
|
+
from pkgutil import extend_path
|
153
|
+
__path__ = extend_path(__path__, __name__)
|
154
|
+
|
155
|
+
import abc
|
156
|
+
import builtins
|
157
|
+
import datetime
|
158
|
+
import enum
|
159
|
+
import typing
|
160
|
+
|
161
|
+
import jsii
|
162
|
+
import publication
|
163
|
+
import typing_extensions
|
164
|
+
|
165
|
+
from typeguard import check_type
|
166
|
+
|
167
|
+
from ._jsii import *
|
168
|
+
|
169
|
+
import aws_cdk.aws_apigatewayv2 as _aws_cdk_aws_apigatewayv2_ceddda9d
|
170
|
+
import aws_cdk.aws_iam as _aws_cdk_aws_iam_ceddda9d
|
171
|
+
import aws_cdk.aws_kms as _aws_cdk_aws_kms_ceddda9d
|
172
|
+
import aws_cdk.aws_logs as _aws_cdk_aws_logs_ceddda9d
|
173
|
+
import aws_cdk.aws_sqs as _aws_cdk_aws_sqs_ceddda9d
|
174
|
+
import constructs as _constructs_77d1e7e8
|
175
|
+
|
176
|
+
|
177
|
+
class ApiGatewayV2WebSocketToSqs(
|
178
|
+
_constructs_77d1e7e8.Construct,
|
179
|
+
metaclass=jsii.JSIIMeta,
|
180
|
+
jsii_type="@aws-solutions-constructs/aws-apigatewayv2websocket-sqs.ApiGatewayV2WebSocketToSqs",
|
181
|
+
):
|
182
|
+
def __init__(
|
183
|
+
self,
|
184
|
+
scope: _constructs_77d1e7e8.Construct,
|
185
|
+
id: builtins.str,
|
186
|
+
*,
|
187
|
+
create_default_route: typing.Optional[builtins.bool] = None,
|
188
|
+
custom_route_name: typing.Optional[builtins.str] = None,
|
189
|
+
dead_letter_queue_props: typing.Optional[typing.Union[_aws_cdk_aws_sqs_ceddda9d.QueueProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
190
|
+
default_iam_authorization: typing.Optional[builtins.bool] = None,
|
191
|
+
default_route_request_template: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
192
|
+
deploy_dead_letter_queue: typing.Optional[builtins.bool] = None,
|
193
|
+
enable_encryption_with_customer_managed_key: typing.Optional[builtins.bool] = None,
|
194
|
+
encryption_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.Key] = None,
|
195
|
+
encryption_key_props: typing.Optional[typing.Union[_aws_cdk_aws_kms_ceddda9d.KeyProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
196
|
+
existing_queue_obj: typing.Optional[_aws_cdk_aws_sqs_ceddda9d.Queue] = None,
|
197
|
+
existing_web_socket_api: typing.Optional[_aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketApi] = None,
|
198
|
+
log_group_props: typing.Optional[typing.Union[_aws_cdk_aws_logs_ceddda9d.LogGroupProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
199
|
+
max_receive_count: typing.Optional[jsii.Number] = None,
|
200
|
+
queue_props: typing.Optional[typing.Union[_aws_cdk_aws_sqs_ceddda9d.QueueProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
201
|
+
web_socket_api_props: typing.Optional[typing.Union[_aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketApiProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
202
|
+
) -> None:
|
203
|
+
'''
|
204
|
+
:param scope: -
|
205
|
+
:param id: -
|
206
|
+
:param create_default_route: Whether to create a $default route. If set to true, then it will use the value supplied with ``defaultRouteRequestTemplate``. At least one of createDefaultRoute or customRouteName must be provided. Default: - false.
|
207
|
+
:param custom_route_name: The name of the route that will be sent through WebSocketApiProps.routeSelectionExpression when invoking the WebSocket endpoint. At least one of createDefaultRoute or customRouteName must be provided. Default: - None
|
208
|
+
:param dead_letter_queue_props: Optional user provided properties for the dead letter queue. Default: - Default props are used
|
209
|
+
:param default_iam_authorization: Add IAM authorization to the $connect path by default. Only set this to false if: 1) If plan to provide an authorizer with the ``$connect`` route; or 2) The API should be open (no authorization) (AWS recommends against deploying unprotected APIs). If an authorizer is specified in connectRouteOptions, this parameter is ignored and no default IAM authorizer will be created Default: - true
|
210
|
+
:param default_route_request_template: Optional user provided API Gateway Request Template for the $default route or customRoute (if customRouteName is provided). Default: - construct will create and assign a template with default settings to send messages to Queue.
|
211
|
+
:param deploy_dead_letter_queue: Whether to deploy a secondary queue to be used as a dead letter queue. Default: - required field.
|
212
|
+
:param enable_encryption_with_customer_managed_key: If no key is provided, this flag determines whether the queue is encrypted with a new CMK or an AWS managed key. This flag is ignored if any of the following are defined: queueProps.encryptionMasterKey, encryptionKey or encryptionKeyProps. Default: - False if queueProps.encryptionMasterKey, encryptionKey, and encryptionKeyProps are all undefined.
|
213
|
+
:param encryption_key: An optional, imported encryption key to encrypt the SQS Queue with. Default: - None
|
214
|
+
:param encryption_key_props: Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with. Default: - None
|
215
|
+
:param existing_queue_obj: Existing instance of SQS queue object, providing both this and queueProps will cause an error.
|
216
|
+
:param existing_web_socket_api: Existing instance of WebSocket API object, providing both this and webSocketApiProps will cause an error. Default: - None
|
217
|
+
:param log_group_props: Optional user-provided props to override the default props for the log group. Default: - Default props are used
|
218
|
+
:param max_receive_count: The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue. Default: - required only if deployDeadLetterQueue = true.
|
219
|
+
:param queue_props: User provided props to override the default props for the SQS queue. Default: - Default props are used
|
220
|
+
:param web_socket_api_props: Optional user-provided props to override the default props for the API Gateway. Default: - Default properties are used.
|
221
|
+
'''
|
222
|
+
if __debug__:
|
223
|
+
type_hints = typing.get_type_hints(_typecheckingstub__f37fa6f73e46f6d9868a3a3fba942695c1871f3e14ca3f0c156d343212d4393e)
|
224
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
225
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
226
|
+
props = ApiGatewayV2WebSocketToSqsProps(
|
227
|
+
create_default_route=create_default_route,
|
228
|
+
custom_route_name=custom_route_name,
|
229
|
+
dead_letter_queue_props=dead_letter_queue_props,
|
230
|
+
default_iam_authorization=default_iam_authorization,
|
231
|
+
default_route_request_template=default_route_request_template,
|
232
|
+
deploy_dead_letter_queue=deploy_dead_letter_queue,
|
233
|
+
enable_encryption_with_customer_managed_key=enable_encryption_with_customer_managed_key,
|
234
|
+
encryption_key=encryption_key,
|
235
|
+
encryption_key_props=encryption_key_props,
|
236
|
+
existing_queue_obj=existing_queue_obj,
|
237
|
+
existing_web_socket_api=existing_web_socket_api,
|
238
|
+
log_group_props=log_group_props,
|
239
|
+
max_receive_count=max_receive_count,
|
240
|
+
queue_props=queue_props,
|
241
|
+
web_socket_api_props=web_socket_api_props,
|
242
|
+
)
|
243
|
+
|
244
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
245
|
+
|
246
|
+
@builtins.property
|
247
|
+
@jsii.member(jsii_name="apiGatewayLogGroup")
|
248
|
+
def api_gateway_log_group(self) -> _aws_cdk_aws_logs_ceddda9d.LogGroup:
|
249
|
+
return typing.cast(_aws_cdk_aws_logs_ceddda9d.LogGroup, jsii.get(self, "apiGatewayLogGroup"))
|
250
|
+
|
251
|
+
@builtins.property
|
252
|
+
@jsii.member(jsii_name="apiGatewayRole")
|
253
|
+
def api_gateway_role(self) -> _aws_cdk_aws_iam_ceddda9d.Role:
|
254
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.Role, jsii.get(self, "apiGatewayRole"))
|
255
|
+
|
256
|
+
@builtins.property
|
257
|
+
@jsii.member(jsii_name="sqsQueue")
|
258
|
+
def sqs_queue(self) -> _aws_cdk_aws_sqs_ceddda9d.Queue:
|
259
|
+
return typing.cast(_aws_cdk_aws_sqs_ceddda9d.Queue, jsii.get(self, "sqsQueue"))
|
260
|
+
|
261
|
+
@builtins.property
|
262
|
+
@jsii.member(jsii_name="webSocketApi")
|
263
|
+
def web_socket_api(self) -> _aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketApi:
|
264
|
+
return typing.cast(_aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketApi, jsii.get(self, "webSocketApi"))
|
265
|
+
|
266
|
+
@builtins.property
|
267
|
+
@jsii.member(jsii_name="webSocketStage")
|
268
|
+
def web_socket_stage(self) -> _aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketStage:
|
269
|
+
return typing.cast(_aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketStage, jsii.get(self, "webSocketStage"))
|
270
|
+
|
271
|
+
@builtins.property
|
272
|
+
@jsii.member(jsii_name="deadLetterQueue")
|
273
|
+
def dead_letter_queue(
|
274
|
+
self,
|
275
|
+
) -> typing.Optional[_aws_cdk_aws_sqs_ceddda9d.DeadLetterQueue]:
|
276
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_sqs_ceddda9d.DeadLetterQueue], jsii.get(self, "deadLetterQueue"))
|
277
|
+
|
278
|
+
|
279
|
+
@jsii.data_type(
|
280
|
+
jsii_type="@aws-solutions-constructs/aws-apigatewayv2websocket-sqs.ApiGatewayV2WebSocketToSqsProps",
|
281
|
+
jsii_struct_bases=[],
|
282
|
+
name_mapping={
|
283
|
+
"create_default_route": "createDefaultRoute",
|
284
|
+
"custom_route_name": "customRouteName",
|
285
|
+
"dead_letter_queue_props": "deadLetterQueueProps",
|
286
|
+
"default_iam_authorization": "defaultIamAuthorization",
|
287
|
+
"default_route_request_template": "defaultRouteRequestTemplate",
|
288
|
+
"deploy_dead_letter_queue": "deployDeadLetterQueue",
|
289
|
+
"enable_encryption_with_customer_managed_key": "enableEncryptionWithCustomerManagedKey",
|
290
|
+
"encryption_key": "encryptionKey",
|
291
|
+
"encryption_key_props": "encryptionKeyProps",
|
292
|
+
"existing_queue_obj": "existingQueueObj",
|
293
|
+
"existing_web_socket_api": "existingWebSocketApi",
|
294
|
+
"log_group_props": "logGroupProps",
|
295
|
+
"max_receive_count": "maxReceiveCount",
|
296
|
+
"queue_props": "queueProps",
|
297
|
+
"web_socket_api_props": "webSocketApiProps",
|
298
|
+
},
|
299
|
+
)
|
300
|
+
class ApiGatewayV2WebSocketToSqsProps:
|
301
|
+
def __init__(
|
302
|
+
self,
|
303
|
+
*,
|
304
|
+
create_default_route: typing.Optional[builtins.bool] = None,
|
305
|
+
custom_route_name: typing.Optional[builtins.str] = None,
|
306
|
+
dead_letter_queue_props: typing.Optional[typing.Union[_aws_cdk_aws_sqs_ceddda9d.QueueProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
307
|
+
default_iam_authorization: typing.Optional[builtins.bool] = None,
|
308
|
+
default_route_request_template: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
309
|
+
deploy_dead_letter_queue: typing.Optional[builtins.bool] = None,
|
310
|
+
enable_encryption_with_customer_managed_key: typing.Optional[builtins.bool] = None,
|
311
|
+
encryption_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.Key] = None,
|
312
|
+
encryption_key_props: typing.Optional[typing.Union[_aws_cdk_aws_kms_ceddda9d.KeyProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
313
|
+
existing_queue_obj: typing.Optional[_aws_cdk_aws_sqs_ceddda9d.Queue] = None,
|
314
|
+
existing_web_socket_api: typing.Optional[_aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketApi] = None,
|
315
|
+
log_group_props: typing.Optional[typing.Union[_aws_cdk_aws_logs_ceddda9d.LogGroupProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
316
|
+
max_receive_count: typing.Optional[jsii.Number] = None,
|
317
|
+
queue_props: typing.Optional[typing.Union[_aws_cdk_aws_sqs_ceddda9d.QueueProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
318
|
+
web_socket_api_props: typing.Optional[typing.Union[_aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketApiProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
319
|
+
) -> None:
|
320
|
+
'''
|
321
|
+
:param create_default_route: Whether to create a $default route. If set to true, then it will use the value supplied with ``defaultRouteRequestTemplate``. At least one of createDefaultRoute or customRouteName must be provided. Default: - false.
|
322
|
+
:param custom_route_name: The name of the route that will be sent through WebSocketApiProps.routeSelectionExpression when invoking the WebSocket endpoint. At least one of createDefaultRoute or customRouteName must be provided. Default: - None
|
323
|
+
:param dead_letter_queue_props: Optional user provided properties for the dead letter queue. Default: - Default props are used
|
324
|
+
:param default_iam_authorization: Add IAM authorization to the $connect path by default. Only set this to false if: 1) If plan to provide an authorizer with the ``$connect`` route; or 2) The API should be open (no authorization) (AWS recommends against deploying unprotected APIs). If an authorizer is specified in connectRouteOptions, this parameter is ignored and no default IAM authorizer will be created Default: - true
|
325
|
+
:param default_route_request_template: Optional user provided API Gateway Request Template for the $default route or customRoute (if customRouteName is provided). Default: - construct will create and assign a template with default settings to send messages to Queue.
|
326
|
+
:param deploy_dead_letter_queue: Whether to deploy a secondary queue to be used as a dead letter queue. Default: - required field.
|
327
|
+
:param enable_encryption_with_customer_managed_key: If no key is provided, this flag determines whether the queue is encrypted with a new CMK or an AWS managed key. This flag is ignored if any of the following are defined: queueProps.encryptionMasterKey, encryptionKey or encryptionKeyProps. Default: - False if queueProps.encryptionMasterKey, encryptionKey, and encryptionKeyProps are all undefined.
|
328
|
+
:param encryption_key: An optional, imported encryption key to encrypt the SQS Queue with. Default: - None
|
329
|
+
:param encryption_key_props: Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with. Default: - None
|
330
|
+
:param existing_queue_obj: Existing instance of SQS queue object, providing both this and queueProps will cause an error.
|
331
|
+
:param existing_web_socket_api: Existing instance of WebSocket API object, providing both this and webSocketApiProps will cause an error. Default: - None
|
332
|
+
:param log_group_props: Optional user-provided props to override the default props for the log group. Default: - Default props are used
|
333
|
+
:param max_receive_count: The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue. Default: - required only if deployDeadLetterQueue = true.
|
334
|
+
:param queue_props: User provided props to override the default props for the SQS queue. Default: - Default props are used
|
335
|
+
:param web_socket_api_props: Optional user-provided props to override the default props for the API Gateway. Default: - Default properties are used.
|
336
|
+
|
337
|
+
:summary: The properties for the ApiGatewayV2WebSocketToSqs class.
|
338
|
+
'''
|
339
|
+
if isinstance(dead_letter_queue_props, dict):
|
340
|
+
dead_letter_queue_props = _aws_cdk_aws_sqs_ceddda9d.QueueProps(**dead_letter_queue_props)
|
341
|
+
if isinstance(encryption_key_props, dict):
|
342
|
+
encryption_key_props = _aws_cdk_aws_kms_ceddda9d.KeyProps(**encryption_key_props)
|
343
|
+
if isinstance(log_group_props, dict):
|
344
|
+
log_group_props = _aws_cdk_aws_logs_ceddda9d.LogGroupProps(**log_group_props)
|
345
|
+
if isinstance(queue_props, dict):
|
346
|
+
queue_props = _aws_cdk_aws_sqs_ceddda9d.QueueProps(**queue_props)
|
347
|
+
if isinstance(web_socket_api_props, dict):
|
348
|
+
web_socket_api_props = _aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketApiProps(**web_socket_api_props)
|
349
|
+
if __debug__:
|
350
|
+
type_hints = typing.get_type_hints(_typecheckingstub__b07a17aaa5507b1179984f079be450d3b362ed1531e33a497ba2c57b2236c6f7)
|
351
|
+
check_type(argname="argument create_default_route", value=create_default_route, expected_type=type_hints["create_default_route"])
|
352
|
+
check_type(argname="argument custom_route_name", value=custom_route_name, expected_type=type_hints["custom_route_name"])
|
353
|
+
check_type(argname="argument dead_letter_queue_props", value=dead_letter_queue_props, expected_type=type_hints["dead_letter_queue_props"])
|
354
|
+
check_type(argname="argument default_iam_authorization", value=default_iam_authorization, expected_type=type_hints["default_iam_authorization"])
|
355
|
+
check_type(argname="argument default_route_request_template", value=default_route_request_template, expected_type=type_hints["default_route_request_template"])
|
356
|
+
check_type(argname="argument deploy_dead_letter_queue", value=deploy_dead_letter_queue, expected_type=type_hints["deploy_dead_letter_queue"])
|
357
|
+
check_type(argname="argument enable_encryption_with_customer_managed_key", value=enable_encryption_with_customer_managed_key, expected_type=type_hints["enable_encryption_with_customer_managed_key"])
|
358
|
+
check_type(argname="argument encryption_key", value=encryption_key, expected_type=type_hints["encryption_key"])
|
359
|
+
check_type(argname="argument encryption_key_props", value=encryption_key_props, expected_type=type_hints["encryption_key_props"])
|
360
|
+
check_type(argname="argument existing_queue_obj", value=existing_queue_obj, expected_type=type_hints["existing_queue_obj"])
|
361
|
+
check_type(argname="argument existing_web_socket_api", value=existing_web_socket_api, expected_type=type_hints["existing_web_socket_api"])
|
362
|
+
check_type(argname="argument log_group_props", value=log_group_props, expected_type=type_hints["log_group_props"])
|
363
|
+
check_type(argname="argument max_receive_count", value=max_receive_count, expected_type=type_hints["max_receive_count"])
|
364
|
+
check_type(argname="argument queue_props", value=queue_props, expected_type=type_hints["queue_props"])
|
365
|
+
check_type(argname="argument web_socket_api_props", value=web_socket_api_props, expected_type=type_hints["web_socket_api_props"])
|
366
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
367
|
+
if create_default_route is not None:
|
368
|
+
self._values["create_default_route"] = create_default_route
|
369
|
+
if custom_route_name is not None:
|
370
|
+
self._values["custom_route_name"] = custom_route_name
|
371
|
+
if dead_letter_queue_props is not None:
|
372
|
+
self._values["dead_letter_queue_props"] = dead_letter_queue_props
|
373
|
+
if default_iam_authorization is not None:
|
374
|
+
self._values["default_iam_authorization"] = default_iam_authorization
|
375
|
+
if default_route_request_template is not None:
|
376
|
+
self._values["default_route_request_template"] = default_route_request_template
|
377
|
+
if deploy_dead_letter_queue is not None:
|
378
|
+
self._values["deploy_dead_letter_queue"] = deploy_dead_letter_queue
|
379
|
+
if enable_encryption_with_customer_managed_key is not None:
|
380
|
+
self._values["enable_encryption_with_customer_managed_key"] = enable_encryption_with_customer_managed_key
|
381
|
+
if encryption_key is not None:
|
382
|
+
self._values["encryption_key"] = encryption_key
|
383
|
+
if encryption_key_props is not None:
|
384
|
+
self._values["encryption_key_props"] = encryption_key_props
|
385
|
+
if existing_queue_obj is not None:
|
386
|
+
self._values["existing_queue_obj"] = existing_queue_obj
|
387
|
+
if existing_web_socket_api is not None:
|
388
|
+
self._values["existing_web_socket_api"] = existing_web_socket_api
|
389
|
+
if log_group_props is not None:
|
390
|
+
self._values["log_group_props"] = log_group_props
|
391
|
+
if max_receive_count is not None:
|
392
|
+
self._values["max_receive_count"] = max_receive_count
|
393
|
+
if queue_props is not None:
|
394
|
+
self._values["queue_props"] = queue_props
|
395
|
+
if web_socket_api_props is not None:
|
396
|
+
self._values["web_socket_api_props"] = web_socket_api_props
|
397
|
+
|
398
|
+
@builtins.property
|
399
|
+
def create_default_route(self) -> typing.Optional[builtins.bool]:
|
400
|
+
'''Whether to create a $default route.
|
401
|
+
|
402
|
+
If set to true, then it will use the value supplied with ``defaultRouteRequestTemplate``.
|
403
|
+
At least one of createDefaultRoute or customRouteName must be provided.
|
404
|
+
|
405
|
+
:default: - false.
|
406
|
+
'''
|
407
|
+
result = self._values.get("create_default_route")
|
408
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
409
|
+
|
410
|
+
@builtins.property
|
411
|
+
def custom_route_name(self) -> typing.Optional[builtins.str]:
|
412
|
+
'''The name of the route that will be sent through WebSocketApiProps.routeSelectionExpression when invoking the WebSocket endpoint. At least one of createDefaultRoute or customRouteName must be provided.
|
413
|
+
|
414
|
+
:default: - None
|
415
|
+
'''
|
416
|
+
result = self._values.get("custom_route_name")
|
417
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
418
|
+
|
419
|
+
@builtins.property
|
420
|
+
def dead_letter_queue_props(
|
421
|
+
self,
|
422
|
+
) -> typing.Optional[_aws_cdk_aws_sqs_ceddda9d.QueueProps]:
|
423
|
+
'''Optional user provided properties for the dead letter queue.
|
424
|
+
|
425
|
+
:default: - Default props are used
|
426
|
+
'''
|
427
|
+
result = self._values.get("dead_letter_queue_props")
|
428
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_sqs_ceddda9d.QueueProps], result)
|
429
|
+
|
430
|
+
@builtins.property
|
431
|
+
def default_iam_authorization(self) -> typing.Optional[builtins.bool]:
|
432
|
+
'''Add IAM authorization to the $connect path by default.
|
433
|
+
|
434
|
+
Only set this to false if: 1) If plan to provide an authorizer with
|
435
|
+
the ``$connect`` route; or 2) The API should be open (no authorization) (AWS recommends against deploying unprotected APIs).
|
436
|
+
|
437
|
+
If an authorizer is specified in connectRouteOptions, this parameter is ignored and no default IAM authorizer will be created
|
438
|
+
|
439
|
+
:default: - true
|
440
|
+
'''
|
441
|
+
result = self._values.get("default_iam_authorization")
|
442
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
443
|
+
|
444
|
+
@builtins.property
|
445
|
+
def default_route_request_template(
|
446
|
+
self,
|
447
|
+
) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
|
448
|
+
'''Optional user provided API Gateway Request Template for the $default route or customRoute (if customRouteName is provided).
|
449
|
+
|
450
|
+
:default: - construct will create and assign a template with default settings to send messages to Queue.
|
451
|
+
'''
|
452
|
+
result = self._values.get("default_route_request_template")
|
453
|
+
return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
|
454
|
+
|
455
|
+
@builtins.property
|
456
|
+
def deploy_dead_letter_queue(self) -> typing.Optional[builtins.bool]:
|
457
|
+
'''Whether to deploy a secondary queue to be used as a dead letter queue.
|
458
|
+
|
459
|
+
:default: - required field.
|
460
|
+
'''
|
461
|
+
result = self._values.get("deploy_dead_letter_queue")
|
462
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
463
|
+
|
464
|
+
@builtins.property
|
465
|
+
def enable_encryption_with_customer_managed_key(
|
466
|
+
self,
|
467
|
+
) -> typing.Optional[builtins.bool]:
|
468
|
+
'''If no key is provided, this flag determines whether the queue is encrypted with a new CMK or an AWS managed key.
|
469
|
+
|
470
|
+
This flag is ignored if any of the following are defined: queueProps.encryptionMasterKey, encryptionKey or encryptionKeyProps.
|
471
|
+
|
472
|
+
:default: - False if queueProps.encryptionMasterKey, encryptionKey, and encryptionKeyProps are all undefined.
|
473
|
+
'''
|
474
|
+
result = self._values.get("enable_encryption_with_customer_managed_key")
|
475
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
476
|
+
|
477
|
+
@builtins.property
|
478
|
+
def encryption_key(self) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.Key]:
|
479
|
+
'''An optional, imported encryption key to encrypt the SQS Queue with.
|
480
|
+
|
481
|
+
:default: - None
|
482
|
+
'''
|
483
|
+
result = self._values.get("encryption_key")
|
484
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_kms_ceddda9d.Key], result)
|
485
|
+
|
486
|
+
@builtins.property
|
487
|
+
def encryption_key_props(
|
488
|
+
self,
|
489
|
+
) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.KeyProps]:
|
490
|
+
'''Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with.
|
491
|
+
|
492
|
+
:default: - None
|
493
|
+
'''
|
494
|
+
result = self._values.get("encryption_key_props")
|
495
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_kms_ceddda9d.KeyProps], result)
|
496
|
+
|
497
|
+
@builtins.property
|
498
|
+
def existing_queue_obj(self) -> typing.Optional[_aws_cdk_aws_sqs_ceddda9d.Queue]:
|
499
|
+
'''Existing instance of SQS queue object, providing both this and queueProps will cause an error.'''
|
500
|
+
result = self._values.get("existing_queue_obj")
|
501
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_sqs_ceddda9d.Queue], result)
|
502
|
+
|
503
|
+
@builtins.property
|
504
|
+
def existing_web_socket_api(
|
505
|
+
self,
|
506
|
+
) -> typing.Optional[_aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketApi]:
|
507
|
+
'''Existing instance of WebSocket API object, providing both this and webSocketApiProps will cause an error.
|
508
|
+
|
509
|
+
:default: - None
|
510
|
+
'''
|
511
|
+
result = self._values.get("existing_web_socket_api")
|
512
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketApi], result)
|
513
|
+
|
514
|
+
@builtins.property
|
515
|
+
def log_group_props(
|
516
|
+
self,
|
517
|
+
) -> typing.Optional[_aws_cdk_aws_logs_ceddda9d.LogGroupProps]:
|
518
|
+
'''Optional user-provided props to override the default props for the log group.
|
519
|
+
|
520
|
+
:default: - Default props are used
|
521
|
+
'''
|
522
|
+
result = self._values.get("log_group_props")
|
523
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_logs_ceddda9d.LogGroupProps], result)
|
524
|
+
|
525
|
+
@builtins.property
|
526
|
+
def max_receive_count(self) -> typing.Optional[jsii.Number]:
|
527
|
+
'''The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue.
|
528
|
+
|
529
|
+
:default: - required only if deployDeadLetterQueue = true.
|
530
|
+
'''
|
531
|
+
result = self._values.get("max_receive_count")
|
532
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
533
|
+
|
534
|
+
@builtins.property
|
535
|
+
def queue_props(self) -> typing.Optional[_aws_cdk_aws_sqs_ceddda9d.QueueProps]:
|
536
|
+
'''User provided props to override the default props for the SQS queue.
|
537
|
+
|
538
|
+
:default: - Default props are used
|
539
|
+
'''
|
540
|
+
result = self._values.get("queue_props")
|
541
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_sqs_ceddda9d.QueueProps], result)
|
542
|
+
|
543
|
+
@builtins.property
|
544
|
+
def web_socket_api_props(
|
545
|
+
self,
|
546
|
+
) -> typing.Optional[_aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketApiProps]:
|
547
|
+
'''Optional user-provided props to override the default props for the API Gateway.
|
548
|
+
|
549
|
+
:default: - Default properties are used.
|
550
|
+
'''
|
551
|
+
result = self._values.get("web_socket_api_props")
|
552
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketApiProps], result)
|
553
|
+
|
554
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
555
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
556
|
+
|
557
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
558
|
+
return not (rhs == self)
|
559
|
+
|
560
|
+
def __repr__(self) -> str:
|
561
|
+
return "ApiGatewayV2WebSocketToSqsProps(%s)" % ", ".join(
|
562
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
563
|
+
)
|
564
|
+
|
565
|
+
|
566
|
+
__all__ = [
|
567
|
+
"ApiGatewayV2WebSocketToSqs",
|
568
|
+
"ApiGatewayV2WebSocketToSqsProps",
|
569
|
+
]
|
570
|
+
|
571
|
+
publication.publish()
|
572
|
+
|
573
|
+
def _typecheckingstub__f37fa6f73e46f6d9868a3a3fba942695c1871f3e14ca3f0c156d343212d4393e(
|
574
|
+
scope: _constructs_77d1e7e8.Construct,
|
575
|
+
id: builtins.str,
|
576
|
+
*,
|
577
|
+
create_default_route: typing.Optional[builtins.bool] = None,
|
578
|
+
custom_route_name: typing.Optional[builtins.str] = None,
|
579
|
+
dead_letter_queue_props: typing.Optional[typing.Union[_aws_cdk_aws_sqs_ceddda9d.QueueProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
580
|
+
default_iam_authorization: typing.Optional[builtins.bool] = None,
|
581
|
+
default_route_request_template: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
582
|
+
deploy_dead_letter_queue: typing.Optional[builtins.bool] = None,
|
583
|
+
enable_encryption_with_customer_managed_key: typing.Optional[builtins.bool] = None,
|
584
|
+
encryption_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.Key] = None,
|
585
|
+
encryption_key_props: typing.Optional[typing.Union[_aws_cdk_aws_kms_ceddda9d.KeyProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
586
|
+
existing_queue_obj: typing.Optional[_aws_cdk_aws_sqs_ceddda9d.Queue] = None,
|
587
|
+
existing_web_socket_api: typing.Optional[_aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketApi] = None,
|
588
|
+
log_group_props: typing.Optional[typing.Union[_aws_cdk_aws_logs_ceddda9d.LogGroupProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
589
|
+
max_receive_count: typing.Optional[jsii.Number] = None,
|
590
|
+
queue_props: typing.Optional[typing.Union[_aws_cdk_aws_sqs_ceddda9d.QueueProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
591
|
+
web_socket_api_props: typing.Optional[typing.Union[_aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketApiProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
592
|
+
) -> None:
|
593
|
+
"""Type checking stubs"""
|
594
|
+
pass
|
595
|
+
|
596
|
+
def _typecheckingstub__b07a17aaa5507b1179984f079be450d3b362ed1531e33a497ba2c57b2236c6f7(
|
597
|
+
*,
|
598
|
+
create_default_route: typing.Optional[builtins.bool] = None,
|
599
|
+
custom_route_name: typing.Optional[builtins.str] = None,
|
600
|
+
dead_letter_queue_props: typing.Optional[typing.Union[_aws_cdk_aws_sqs_ceddda9d.QueueProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
601
|
+
default_iam_authorization: typing.Optional[builtins.bool] = None,
|
602
|
+
default_route_request_template: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
603
|
+
deploy_dead_letter_queue: typing.Optional[builtins.bool] = None,
|
604
|
+
enable_encryption_with_customer_managed_key: typing.Optional[builtins.bool] = None,
|
605
|
+
encryption_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.Key] = None,
|
606
|
+
encryption_key_props: typing.Optional[typing.Union[_aws_cdk_aws_kms_ceddda9d.KeyProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
607
|
+
existing_queue_obj: typing.Optional[_aws_cdk_aws_sqs_ceddda9d.Queue] = None,
|
608
|
+
existing_web_socket_api: typing.Optional[_aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketApi] = None,
|
609
|
+
log_group_props: typing.Optional[typing.Union[_aws_cdk_aws_logs_ceddda9d.LogGroupProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
610
|
+
max_receive_count: typing.Optional[jsii.Number] = None,
|
611
|
+
queue_props: typing.Optional[typing.Union[_aws_cdk_aws_sqs_ceddda9d.QueueProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
612
|
+
web_socket_api_props: typing.Optional[typing.Union[_aws_cdk_aws_apigatewayv2_ceddda9d.WebSocketApiProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
613
|
+
) -> None:
|
614
|
+
"""Type checking stubs"""
|
615
|
+
pass
|
@@ -0,0 +1,32 @@
|
|
1
|
+
from pkgutil import extend_path
|
2
|
+
__path__ = extend_path(__path__, __name__)
|
3
|
+
|
4
|
+
import abc
|
5
|
+
import builtins
|
6
|
+
import datetime
|
7
|
+
import enum
|
8
|
+
import typing
|
9
|
+
|
10
|
+
import jsii
|
11
|
+
import publication
|
12
|
+
import typing_extensions
|
13
|
+
|
14
|
+
from typeguard import check_type
|
15
|
+
|
16
|
+
import aws_cdk._jsii
|
17
|
+
import aws_cdk.integ_tests_alpha._jsii
|
18
|
+
import aws_solutions_constructs.core._jsii
|
19
|
+
import constructs._jsii
|
20
|
+
|
21
|
+
__jsii_assembly__ = jsii.JSIIAssembly.load(
|
22
|
+
"@aws-solutions-constructs/aws-apigatewayv2websocket-sqs",
|
23
|
+
"2.63.0",
|
24
|
+
__name__[0:-6],
|
25
|
+
"aws-apigatewayv2websocket-sqs@2.63.0.jsii.tgz",
|
26
|
+
)
|
27
|
+
|
28
|
+
__all__ = [
|
29
|
+
"__jsii_assembly__",
|
30
|
+
]
|
31
|
+
|
32
|
+
publication.publish()
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,73 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
10
|
+
|
11
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
12
|
+
|
13
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
14
|
+
|
15
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
16
|
+
|
17
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
18
|
+
|
19
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
20
|
+
|
21
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
22
|
+
|
23
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
24
|
+
|
25
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
26
|
+
|
27
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
28
|
+
|
29
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
30
|
+
|
31
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
32
|
+
|
33
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
34
|
+
|
35
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
36
|
+
|
37
|
+
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
38
|
+
|
39
|
+
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
40
|
+
|
41
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
42
|
+
|
43
|
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
44
|
+
|
45
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
46
|
+
|
47
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
48
|
+
|
49
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
50
|
+
|
51
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
52
|
+
|
53
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
54
|
+
|
55
|
+
END OF TERMS AND CONDITIONS
|
56
|
+
|
57
|
+
APPENDIX: How to apply the Apache License to your work.
|
58
|
+
|
59
|
+
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
60
|
+
|
61
|
+
Copyright [yyyy] [name of copyright owner]
|
62
|
+
|
63
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
64
|
+
you may not use this file except in compliance with the License.
|
65
|
+
You may obtain a copy of the License at
|
66
|
+
|
67
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
68
|
+
|
69
|
+
Unless required by applicable law or agreed to in writing, software
|
70
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
71
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
72
|
+
See the License for the specific language governing permissions and
|
73
|
+
limitations under the License.
|
@@ -0,0 +1,178 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: aws-solutions-constructs.aws-apigatewayv2websocket-sqs
|
3
|
+
Version: 2.63.0
|
4
|
+
Summary: CDK constructs for defining an interaction between an AWS Lambda function and an Amazon S3 bucket.
|
5
|
+
Home-page: https://github.com/awslabs/aws-solutions-constructs.git
|
6
|
+
Author: Amazon Web Services
|
7
|
+
License: Apache-2.0
|
8
|
+
Project-URL: Source, https://github.com/awslabs/aws-solutions-constructs.git
|
9
|
+
Classifier: Intended Audience :: Developers
|
10
|
+
Classifier: Operating System :: OS Independent
|
11
|
+
Classifier: Programming Language :: JavaScript
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
17
|
+
Classifier: Typing :: Typed
|
18
|
+
Classifier: License :: OSI Approved
|
19
|
+
Requires-Python: ~=3.8
|
20
|
+
Description-Content-Type: text/markdown
|
21
|
+
License-File: LICENSE
|
22
|
+
Requires-Dist: aws-cdk-lib ==2.149.0
|
23
|
+
Requires-Dist: aws-cdk.integ-tests-alpha ==2.149.0.a0
|
24
|
+
Requires-Dist: aws-solutions-constructs.core ==2.63.0
|
25
|
+
Requires-Dist: constructs <11.0.0,>=10.0.0
|
26
|
+
Requires-Dist: jsii <2.0.0,>=1.101.0
|
27
|
+
Requires-Dist: publication >=0.0.3
|
28
|
+
Requires-Dist: typeguard ~=2.13.3
|
29
|
+
|
30
|
+
# aws-apigatewayv2websocket-sqs module
|
31
|
+
|
32
|
+
<!--BEGIN STABILITY BANNER-->---
|
33
|
+
|
34
|
+
|
35
|
+

|
36
|
+
|
37
|
+
---
|
38
|
+
<!--END STABILITY BANNER-->
|
39
|
+
|
40
|
+
| **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
|
41
|
+
|:-------------|:-------------|
|
42
|
+
|
43
|
+
<div style="height:8px"></div>
|
44
|
+
|
45
|
+
| **Language** | **Package** |
|
46
|
+
|:-------------|-----------------|
|
47
|
+
| Python|`aws_solutions_constructs.aws_apigatewayv2websocket_sqs`|
|
48
|
+
| Typescript|`@aws-solutions-constructs/aws-apigatewayv2websocket-sqs`|
|
49
|
+
| Java|`software.amazon.awsconstructs.services.apigatewayv2websocketsqs`|
|
50
|
+
|
51
|
+
## Overview
|
52
|
+
|
53
|
+
This AWS Solutions Construct implements an Amazon API Gateway WebSocket connected to an Amazon SQS queue pattern.
|
54
|
+
|
55
|
+
Here is a minimal deployable pattern definition:
|
56
|
+
|
57
|
+
Typescript
|
58
|
+
|
59
|
+
```python
|
60
|
+
import { Construct } from "constructs";
|
61
|
+
import { Stack, StackProps } from "aws-cdk-lib";
|
62
|
+
import {
|
63
|
+
ApiGatewayV2WebSocketToSqs,
|
64
|
+
ApiGatewayV2WebSocketToSqsProps,
|
65
|
+
} from "@aws-solutions-constructs/aws-apigatewayv2websocket-sqs";
|
66
|
+
import { WebSocketLambdaAuthorizer } from 'aws-cdk-lib/aws-apigatewayv2-authorizers';
|
67
|
+
|
68
|
+
const authorizer = new WebSocketLambdaAuthorizer('Authorizer', authHandler);
|
69
|
+
|
70
|
+
new ApiGateApiGatewayV2WebSocketToSqswayToSqs(this, "ApiGatewayV2WebSocketToSqsPattern", {
|
71
|
+
webSocketApiProps: {
|
72
|
+
connectRouteOptions: {
|
73
|
+
integration: new WebSocketLambdaIntegration("ConnectIntegration", connectLambda),
|
74
|
+
authorizer: authorizer,
|
75
|
+
},
|
76
|
+
disconnectRouteOptions: {
|
77
|
+
integration: new WebSocketLambdaIntegration("DisconnectIntegration", disconnectLambda),
|
78
|
+
},
|
79
|
+
},
|
80
|
+
createDefaultRoute: true
|
81
|
+
});
|
82
|
+
```
|
83
|
+
|
84
|
+
Python
|
85
|
+
|
86
|
+
```python
|
87
|
+
from aws_solutions_constructs.aws_apigateway_sqs import ApiGatewayV2WebSocketToSqs
|
88
|
+
from aws_cdk.aws_apigatewayv2_authorizers import WebSocketLambdaAuthorizer
|
89
|
+
from aws_cdk import Stack
|
90
|
+
from constructs import Construct
|
91
|
+
|
92
|
+
authorizer = WebSocketLambdaAuthorizer("Authorizer", auth_handler)
|
93
|
+
|
94
|
+
ApiGatewayV2WebSocketToSqs(self, 'ApiGatewayV2WebSocketToSqsPattern',
|
95
|
+
connect_route_options=apigwv2.WebSocketRouteOptions(
|
96
|
+
integration=WebSocketLambdaIntegration("ConnectIntegration", connect_lambda),
|
97
|
+
authorizer=authorizer
|
98
|
+
),
|
99
|
+
disconnect_route_options=apigwv2.WebSocketRouteOptions(
|
100
|
+
integration=WebSocketLambdaIntegration("DisConnectIntegration", disconnect_lambda),
|
101
|
+
),
|
102
|
+
create_default_route=True
|
103
|
+
)
|
104
|
+
```
|
105
|
+
|
106
|
+
Java
|
107
|
+
|
108
|
+
```java
|
109
|
+
import software.constructs.Construct;
|
110
|
+
|
111
|
+
import software.amazon.awscdk.Stack;
|
112
|
+
import software.amazon.awscdk.StackProps;
|
113
|
+
import software.amazon.awscdk.aws_apigatewayv2_authorizers.*;
|
114
|
+
import software.amazon.awscdk.aws_apigatewayv2_integrations.*;
|
115
|
+
import software.amazon.awsconstructs.services.apigatewaysqs.*;
|
116
|
+
|
117
|
+
new ApiGatewayV2WebSocketToSqs(this, "ApiGatewayV2WebSocketToSqsPattern", new ApiGatewayV2WebSocketToSqsProps.Builder()
|
118
|
+
.webSocketApiProps(new WebSocketApiProps.Builder()
|
119
|
+
.connectRouteOptions(new WebSocketRouteOptions.builder()
|
120
|
+
.integration(new WebSocketLambdaIntegration("ConnectIntegration", connect_lambda)))
|
121
|
+
.disconnectRouteOptions(new WebSocketRouteOptions.builder()
|
122
|
+
.integration(new WebSocketLambdaIntegration("DisConnectIntegration", disconnect_lambda)))
|
123
|
+
.createDefaultRoute(true)
|
124
|
+
.build());
|
125
|
+
```
|
126
|
+
|
127
|
+
## Pattern Construct Props
|
128
|
+
|
129
|
+
| **Name** | **Type** | **Description** |
|
130
|
+
|:-------------|:----------------|-----------------|
|
131
|
+
|existingWebSocketApi?|[`apigwv2.WebSocketApi`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.WebSocketApi.html)|Optional API Gateway WebSocket instance. Providing both existingWebSocketApi and webSocketApiProps will cause an error.|
|
132
|
+
|webSocketApiProps?|[`apigwv2.WebSocketApiProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.WebSocketApiProps.html)|Optional user-provided props to override the default props for the API Gateway. Providing both existingWebSocketApi and webSocketApiProps will cause an error.|
|
133
|
+
|queueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|Optional user-provided props to override the default props for the queue. Providing both existingQueueObj and queueProps will cause an error.|
|
134
|
+
|existingQueueObj?|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Optional existing instance of SQS Queue. Providing both existingQueueObj and queueProps will cause an error.|
|
135
|
+
|deployDeadLetterQueue?|`boolean`|Whether to deploy a secondary queue to be used as a dead letter queue. Defaults to `true`.|
|
136
|
+
|deadLetterQueueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|Optional properties to use for creating dead letter queue. Note that if you are creating a FIFO Queue, the dead letter queue should also be FIFO.|
|
137
|
+
|maxReceiveCount|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue.|
|
138
|
+
|createDefaultRoute?|`boolean`|Whether to create a default route. At least one of createDefaultRoute or customRouteName must be provided. If set to true, then it will use the value supplied with `defaultRouteRequestTemplate`.|
|
139
|
+
|defaultRouteRequestTemplate?|`{ [contentType: string]: string }`|Optional user provided API Gateway Request Template for the default route and/ or customRoute (if customRouteName is provided). This property will only be used if createDefaultRoute is `true`. If createDefaultRoute is `true` and this property is not provided, the construct will create the default route with the following VTL mapping `"Action=SendMessage&MessageGroupId=$input.path('$.MessageGroupId')&MessageDeduplicationId=$context.requestId&MessageAttribute.1.Name=connectionId&MessageAttribute.1.Value.StringValue=$context.connectionId&MessageAttribute.1.Value.DataType=String&MessageAttribute.2.Name=requestId&MessageAttribute.2.Value.StringValue=$context.requestId&MessageAttribute.2.Value.DataType=String&MessageBody=$util.urlEncode($input.json($util.escapeJavaScript('$').replaceAll(\"\\\\'\",\"'\")))"`.|
|
140
|
+
|defaultIamAuthorization?|`boolean`|Add IAM authorization to the $connect path by default. Only set this to false if: 1) If plan to provide an authorizer with the `$connect` route; or 2) The API should be open (no authorization) (AWS recommends against deploying unprotected APIs). If an authorizer is specified in connectRouteOptions, this parameter is ignored and no default IAM authorizer will be created. |
|
141
|
+
|customRouteName?|`string`|The name of the route that will be sent through WebSocketApiProps.routeSelectionExpression when invoking the WebSocket endpoint. At least one of createDefaultRoute or customRouteName must be provided. |
|
142
|
+
|
143
|
+
## Pattern Properties
|
144
|
+
|
145
|
+
| **Name** | **Type** | **Description** |
|
146
|
+
|:-------------|:----------------|-----------------|
|
147
|
+
|webSocketApi|[`apigwv2.WebSocketApi`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.WebSocketApi.html)|Returns an instance of the API Gateway WebSocket API created by the pattern.|
|
148
|
+
|apiGatewayRole|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for API Gateway.|
|
149
|
+
|webSocketStage|[`apigwv2.WebSocketStage`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.WebSocketStage.html)|Returns an instance of the WebSocketStage created by the construct.|
|
150
|
+
|apiGatewayLogGroup|[`logs.LogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroup.html)|Returns an instance of the LogGroup created by the construct for API Gateway access logging to CloudWatch.|
|
151
|
+
|sqsQueue|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of the SQS queue created by the pattern.|
|
152
|
+
|deadLetterQueue?|[`sqs.DeadLetterQueue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.DeadLetterQueue.html)|Returns an instance of the DeadLetterQueue created by the pattern.|
|
153
|
+
|
154
|
+
## Default settings
|
155
|
+
|
156
|
+
Out of the box implementation of the Construct without any override will set the following defaults:
|
157
|
+
|
158
|
+
### Amazon API Gateway
|
159
|
+
|
160
|
+
* Deploy a WebSocket endpoint
|
161
|
+
* Enable CloudWatch logging for API Gateway
|
162
|
+
* Configure least privilege access IAM role for API Gateway
|
163
|
+
* Enable X-Ray Tracing
|
164
|
+
|
165
|
+
### Amazon SQS Queue
|
166
|
+
|
167
|
+
* Deploy SQS dead-letter queue for the source SQS Queue
|
168
|
+
* Enable server-side encryption for source SQS Queue using AWS Managed KMS Key
|
169
|
+
* Enforce encryption of data in transit
|
170
|
+
|
171
|
+
## Architecture
|
172
|
+
|
173
|
+

|
174
|
+
|
175
|
+
---
|
176
|
+
|
177
|
+
|
178
|
+
© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
@@ -0,0 +1,9 @@
|
|
1
|
+
aws_solutions_constructs/aws_apigatewayv2websocket_sqs/__init__.py,sha256=f75atSECKSKZ5wQcNQk2xLpz_-qy3SFx-mOWObfQX-0,39160
|
2
|
+
aws_solutions_constructs/aws_apigatewayv2websocket_sqs/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
3
|
+
aws_solutions_constructs/aws_apigatewayv2websocket_sqs/_jsii/__init__.py,sha256=mnV4PomE65npOKwg3UXtivfN1EQMSuBVzLQyBlTXs18,624
|
4
|
+
aws_solutions_constructs/aws_apigatewayv2websocket_sqs/_jsii/aws-apigatewayv2websocket-sqs@2.63.0.jsii.tgz,sha256=xzhIrAcJ3qtdzn278-LfmY5wI4wAvnKvRVRmeQasAYc,194336
|
5
|
+
aws_solutions_constructs.aws_apigatewayv2websocket_sqs-2.63.0.dist-info/LICENSE,sha256=wnT4A3LZDAEpNzcPDh8VCH0i4wjvmLJ86l3A0tCINmw,10279
|
6
|
+
aws_solutions_constructs.aws_apigatewayv2websocket_sqs-2.63.0.dist-info/METADATA,sha256=kB88XPbINtogfhI1UvzDYa64rxrxYuF8qI0uoxD7i2I,10280
|
7
|
+
aws_solutions_constructs.aws_apigatewayv2websocket_sqs-2.63.0.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
|
8
|
+
aws_solutions_constructs.aws_apigatewayv2websocket_sqs-2.63.0.dist-info/top_level.txt,sha256=hi3us_KW7V1ocfOqVsNq1o3w552jCEgu_KsCckqYWsg,25
|
9
|
+
aws_solutions_constructs.aws_apigatewayv2websocket_sqs-2.63.0.dist-info/RECORD,,
|
@@ -0,0 +1 @@
|
|
1
|
+
aws_solutions_constructs
|