must-cdk 0.0.6__tar.gz → 0.0.7__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: must-cdk
3
- Version: 0.0.6
3
+ Version: 0.0.7
4
4
  Summary: must-cdk
5
5
  Home-page: https://github.com/globalmsq/must-cdk.git
6
6
  Author: Must Admin<admin-mufin@users.noreply.github.com>
@@ -5,7 +5,7 @@ kwargs = json.loads(
5
5
  """
6
6
  {
7
7
  "name": "must-cdk",
8
- "version": "0.0.6",
8
+ "version": "0.0.7",
9
9
  "description": "must-cdk",
10
10
  "license": "Apache-2.0",
11
11
  "url": "https://github.com/globalmsq/must-cdk.git",
@@ -26,7 +26,7 @@ kwargs = json.loads(
26
26
  ],
27
27
  "package_data": {
28
28
  "must_cdk._jsii": [
29
- "must-cdk@0.0.6.jsii.tgz"
29
+ "must-cdk@0.0.7.jsii.tgz"
30
30
  ],
31
31
  "must_cdk": [
32
32
  "py.typed"
@@ -0,0 +1,927 @@
1
+ r'''
2
+ # Must CDK for common pattern
3
+ '''
4
+ from pkgutil import extend_path
5
+ __path__ = extend_path(__path__, __name__)
6
+
7
+ import abc
8
+ import builtins
9
+ import datetime
10
+ import enum
11
+ import typing
12
+
13
+ import jsii
14
+ import publication
15
+ import typing_extensions
16
+
17
+ import typeguard
18
+ from importlib.metadata import version as _metadata_package_version
19
+ TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
20
+
21
+ def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
22
+ if TYPEGUARD_MAJOR_VERSION <= 2:
23
+ return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
24
+ else:
25
+ if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
26
+ pass
27
+ else:
28
+ if TYPEGUARD_MAJOR_VERSION == 3:
29
+ typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
30
+ typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
31
+ else:
32
+ typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
33
+
34
+ from ._jsii import *
35
+
36
+ import aws_cdk.aws_apigateway as _aws_cdk_aws_apigateway_ceddda9d
37
+ import aws_cdk.aws_certificatemanager as _aws_cdk_aws_certificatemanager_ceddda9d
38
+ import aws_cdk.aws_ec2 as _aws_cdk_aws_ec2_ceddda9d
39
+ import aws_cdk.aws_ecs as _aws_cdk_aws_ecs_ceddda9d
40
+ import aws_cdk.aws_elasticloadbalancingv2 as _aws_cdk_aws_elasticloadbalancingv2_ceddda9d
41
+ import aws_cdk.aws_iam as _aws_cdk_aws_iam_ceddda9d
42
+ import aws_cdk.aws_lambda as _aws_cdk_aws_lambda_ceddda9d
43
+ import aws_cdk.aws_logs as _aws_cdk_aws_logs_ceddda9d
44
+ import aws_cdk.aws_route53 as _aws_cdk_aws_route53_ceddda9d
45
+ import constructs as _constructs_77d1e7e8
46
+
47
+
48
+ class ApiGatewayToLambdaCustomDomain(
49
+ _constructs_77d1e7e8.Construct,
50
+ metaclass=jsii.JSIIMeta,
51
+ jsii_type="must-cdk.ApiGatewayToLambdaCustomDomain",
52
+ ):
53
+ '''
54
+ :summary: The ApiGatewayToLambda class.
55
+ '''
56
+
57
+ def __init__(
58
+ self,
59
+ scope: _constructs_77d1e7e8.Construct,
60
+ id: builtins.str,
61
+ *,
62
+ api_gateway_props: typing.Any = None,
63
+ create_usage_plan: typing.Optional[builtins.bool] = None,
64
+ custom_domain_name: typing.Optional[builtins.str] = None,
65
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
66
+ hosted_zone: typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone] = None,
67
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
68
+ log_group_props: typing.Optional[typing.Union[_aws_cdk_aws_logs_ceddda9d.LogGroupProps, typing.Dict[builtins.str, typing.Any]]] = None,
69
+ ) -> None:
70
+ '''
71
+ :param scope: - represents the scope for all the resources.
72
+ :param id: - this is a a scope-unique id.
73
+ :param api_gateway_props: Optional user-provided props to override the default props for the API.
74
+ :param create_usage_plan: Whether to create a Usage Plan attached to the API. Must be true if apiGatewayProps.defaultMethodOptions.apiKeyRequired is true
75
+ :param custom_domain_name: Optional custom domain name for API Gateway, an ACM cert will also created. Default: - no custom domain
76
+ :param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
77
+ :param hosted_zone: Optional Route53 hosted zone to create alias record for the custom domain. Default: - no Route53 alias record created
78
+ :param lambda_function_props: User provided props to override the default props for the Lambda function.
79
+ :param log_group_props:
80
+ '''
81
+ if __debug__:
82
+ type_hints = typing.get_type_hints(_typecheckingstub__d7036b176aa7b446813bdbc7672055bba27972db6a947684b57c6f8f02e0f9b6)
83
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
84
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
85
+ props = ApiGatewayToLambdaProps(
86
+ api_gateway_props=api_gateway_props,
87
+ create_usage_plan=create_usage_plan,
88
+ custom_domain_name=custom_domain_name,
89
+ existing_lambda_obj=existing_lambda_obj,
90
+ hosted_zone=hosted_zone,
91
+ lambda_function_props=lambda_function_props,
92
+ log_group_props=log_group_props,
93
+ )
94
+
95
+ jsii.create(self.__class__, self, [scope, id, props])
96
+
97
+ @builtins.property
98
+ @jsii.member(jsii_name="apiGateway")
99
+ def api_gateway(self) -> _aws_cdk_aws_apigateway_ceddda9d.RestApi:
100
+ return typing.cast(_aws_cdk_aws_apigateway_ceddda9d.RestApi, jsii.get(self, "apiGateway"))
101
+
102
+ @builtins.property
103
+ @jsii.member(jsii_name="apiGatewayLogGroup")
104
+ def api_gateway_log_group(self) -> _aws_cdk_aws_logs_ceddda9d.LogGroup:
105
+ return typing.cast(_aws_cdk_aws_logs_ceddda9d.LogGroup, jsii.get(self, "apiGatewayLogGroup"))
106
+
107
+ @builtins.property
108
+ @jsii.member(jsii_name="lambdaFunction")
109
+ def lambda_function(self) -> _aws_cdk_aws_lambda_ceddda9d.Function:
110
+ return typing.cast(_aws_cdk_aws_lambda_ceddda9d.Function, jsii.get(self, "lambdaFunction"))
111
+
112
+ @builtins.property
113
+ @jsii.member(jsii_name="apiGatewayCloudWatchRole")
114
+ def api_gateway_cloud_watch_role(
115
+ self,
116
+ ) -> typing.Optional[_aws_cdk_aws_iam_ceddda9d.Role]:
117
+ return typing.cast(typing.Optional[_aws_cdk_aws_iam_ceddda9d.Role], jsii.get(self, "apiGatewayCloudWatchRole"))
118
+
119
+ @builtins.property
120
+ @jsii.member(jsii_name="aRecord")
121
+ def a_record(self) -> typing.Optional[_aws_cdk_aws_route53_ceddda9d.ARecord]:
122
+ return typing.cast(typing.Optional[_aws_cdk_aws_route53_ceddda9d.ARecord], jsii.get(self, "aRecord"))
123
+
124
+ @builtins.property
125
+ @jsii.member(jsii_name="certificate")
126
+ def certificate(
127
+ self,
128
+ ) -> typing.Optional[_aws_cdk_aws_certificatemanager_ceddda9d.Certificate]:
129
+ return typing.cast(typing.Optional[_aws_cdk_aws_certificatemanager_ceddda9d.Certificate], jsii.get(self, "certificate"))
130
+
131
+ @builtins.property
132
+ @jsii.member(jsii_name="domain")
133
+ def domain(self) -> typing.Optional[_aws_cdk_aws_apigateway_ceddda9d.DomainName]:
134
+ return typing.cast(typing.Optional[_aws_cdk_aws_apigateway_ceddda9d.DomainName], jsii.get(self, "domain"))
135
+
136
+
137
+ @jsii.data_type(
138
+ jsii_type="must-cdk.ApiGatewayToLambdaProps",
139
+ jsii_struct_bases=[],
140
+ name_mapping={
141
+ "api_gateway_props": "apiGatewayProps",
142
+ "create_usage_plan": "createUsagePlan",
143
+ "custom_domain_name": "customDomainName",
144
+ "existing_lambda_obj": "existingLambdaObj",
145
+ "hosted_zone": "hostedZone",
146
+ "lambda_function_props": "lambdaFunctionProps",
147
+ "log_group_props": "logGroupProps",
148
+ },
149
+ )
150
+ class ApiGatewayToLambdaProps:
151
+ def __init__(
152
+ self,
153
+ *,
154
+ api_gateway_props: typing.Any = None,
155
+ create_usage_plan: typing.Optional[builtins.bool] = None,
156
+ custom_domain_name: typing.Optional[builtins.str] = None,
157
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
158
+ hosted_zone: typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone] = None,
159
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
160
+ log_group_props: typing.Optional[typing.Union[_aws_cdk_aws_logs_ceddda9d.LogGroupProps, typing.Dict[builtins.str, typing.Any]]] = None,
161
+ ) -> None:
162
+ '''
163
+ :param api_gateway_props: Optional user-provided props to override the default props for the API.
164
+ :param create_usage_plan: Whether to create a Usage Plan attached to the API. Must be true if apiGatewayProps.defaultMethodOptions.apiKeyRequired is true
165
+ :param custom_domain_name: Optional custom domain name for API Gateway, an ACM cert will also created. Default: - no custom domain
166
+ :param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
167
+ :param hosted_zone: Optional Route53 hosted zone to create alias record for the custom domain. Default: - no Route53 alias record created
168
+ :param lambda_function_props: User provided props to override the default props for the Lambda function.
169
+ :param log_group_props:
170
+ '''
171
+ if isinstance(lambda_function_props, dict):
172
+ lambda_function_props = _aws_cdk_aws_lambda_ceddda9d.FunctionProps(**lambda_function_props)
173
+ if isinstance(log_group_props, dict):
174
+ log_group_props = _aws_cdk_aws_logs_ceddda9d.LogGroupProps(**log_group_props)
175
+ if __debug__:
176
+ type_hints = typing.get_type_hints(_typecheckingstub__7c51143b7da8fc50ffd3240aae88642c332f9ccc1136e275abf9d1065df7ea17)
177
+ check_type(argname="argument api_gateway_props", value=api_gateway_props, expected_type=type_hints["api_gateway_props"])
178
+ check_type(argname="argument create_usage_plan", value=create_usage_plan, expected_type=type_hints["create_usage_plan"])
179
+ check_type(argname="argument custom_domain_name", value=custom_domain_name, expected_type=type_hints["custom_domain_name"])
180
+ check_type(argname="argument existing_lambda_obj", value=existing_lambda_obj, expected_type=type_hints["existing_lambda_obj"])
181
+ check_type(argname="argument hosted_zone", value=hosted_zone, expected_type=type_hints["hosted_zone"])
182
+ check_type(argname="argument lambda_function_props", value=lambda_function_props, expected_type=type_hints["lambda_function_props"])
183
+ check_type(argname="argument log_group_props", value=log_group_props, expected_type=type_hints["log_group_props"])
184
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
185
+ if api_gateway_props is not None:
186
+ self._values["api_gateway_props"] = api_gateway_props
187
+ if create_usage_plan is not None:
188
+ self._values["create_usage_plan"] = create_usage_plan
189
+ if custom_domain_name is not None:
190
+ self._values["custom_domain_name"] = custom_domain_name
191
+ if existing_lambda_obj is not None:
192
+ self._values["existing_lambda_obj"] = existing_lambda_obj
193
+ if hosted_zone is not None:
194
+ self._values["hosted_zone"] = hosted_zone
195
+ if lambda_function_props is not None:
196
+ self._values["lambda_function_props"] = lambda_function_props
197
+ if log_group_props is not None:
198
+ self._values["log_group_props"] = log_group_props
199
+
200
+ @builtins.property
201
+ def api_gateway_props(self) -> typing.Any:
202
+ '''Optional user-provided props to override the default props for the API.'''
203
+ result = self._values.get("api_gateway_props")
204
+ return typing.cast(typing.Any, result)
205
+
206
+ @builtins.property
207
+ def create_usage_plan(self) -> typing.Optional[builtins.bool]:
208
+ '''Whether to create a Usage Plan attached to the API.
209
+
210
+ Must be true if
211
+ apiGatewayProps.defaultMethodOptions.apiKeyRequired is true
212
+ '''
213
+ result = self._values.get("create_usage_plan")
214
+ return typing.cast(typing.Optional[builtins.bool], result)
215
+
216
+ @builtins.property
217
+ def custom_domain_name(self) -> typing.Optional[builtins.str]:
218
+ '''Optional custom domain name for API Gateway, an ACM cert will also created.
219
+
220
+ :default: - no custom domain
221
+ '''
222
+ result = self._values.get("custom_domain_name")
223
+ return typing.cast(typing.Optional[builtins.str], result)
224
+
225
+ @builtins.property
226
+ def existing_lambda_obj(
227
+ self,
228
+ ) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function]:
229
+ '''Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error.
230
+
231
+ :default: - None
232
+ '''
233
+ result = self._values.get("existing_lambda_obj")
234
+ return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function], result)
235
+
236
+ @builtins.property
237
+ def hosted_zone(self) -> typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone]:
238
+ '''Optional Route53 hosted zone to create alias record for the custom domain.
239
+
240
+ :default: - no Route53 alias record created
241
+ '''
242
+ result = self._values.get("hosted_zone")
243
+ return typing.cast(typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone], result)
244
+
245
+ @builtins.property
246
+ def lambda_function_props(
247
+ self,
248
+ ) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.FunctionProps]:
249
+ '''User provided props to override the default props for the Lambda function.'''
250
+ result = self._values.get("lambda_function_props")
251
+ return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.FunctionProps], result)
252
+
253
+ @builtins.property
254
+ def log_group_props(
255
+ self,
256
+ ) -> typing.Optional[_aws_cdk_aws_logs_ceddda9d.LogGroupProps]:
257
+ result = self._values.get("log_group_props")
258
+ return typing.cast(typing.Optional[_aws_cdk_aws_logs_ceddda9d.LogGroupProps], result)
259
+
260
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
261
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
262
+
263
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
264
+ return not (rhs == self)
265
+
266
+ def __repr__(self) -> str:
267
+ return "ApiGatewayToLambdaProps(%s)" % ", ".join(
268
+ k + "=" + repr(v) for k, v in self._values.items()
269
+ )
270
+
271
+
272
+ @jsii.data_type(
273
+ jsii_type="must-cdk.AutoScalingProps",
274
+ jsii_struct_bases=[],
275
+ name_mapping={
276
+ "max_capacity": "maxCapacity",
277
+ "min_capacity": "minCapacity",
278
+ "target_cpu_utilization_percent": "targetCpuUtilizationPercent",
279
+ "scale_in_cooldown_sec": "scaleInCooldownSec",
280
+ "scale_out_cooldown_sec": "scaleOutCooldownSec",
281
+ },
282
+ )
283
+ class AutoScalingProps:
284
+ def __init__(
285
+ self,
286
+ *,
287
+ max_capacity: jsii.Number,
288
+ min_capacity: jsii.Number,
289
+ target_cpu_utilization_percent: jsii.Number,
290
+ scale_in_cooldown_sec: typing.Optional[jsii.Number] = None,
291
+ scale_out_cooldown_sec: typing.Optional[jsii.Number] = None,
292
+ ) -> None:
293
+ '''Configuration for ECS service autoscaling.
294
+
295
+ :param max_capacity: Maximum number of tasks.
296
+ :param min_capacity: Minimum number of tasks.
297
+ :param target_cpu_utilization_percent: Target CPU utilization percentage.
298
+ :param scale_in_cooldown_sec: Cooldown time in seconds after scale-in.
299
+ :param scale_out_cooldown_sec: Cooldown time in seconds after scale-out.
300
+ '''
301
+ if __debug__:
302
+ type_hints = typing.get_type_hints(_typecheckingstub__d0ea30b15daf73de785b4991457443ee0ca220224fbd08155a17d86c67413930)
303
+ check_type(argname="argument max_capacity", value=max_capacity, expected_type=type_hints["max_capacity"])
304
+ check_type(argname="argument min_capacity", value=min_capacity, expected_type=type_hints["min_capacity"])
305
+ check_type(argname="argument target_cpu_utilization_percent", value=target_cpu_utilization_percent, expected_type=type_hints["target_cpu_utilization_percent"])
306
+ check_type(argname="argument scale_in_cooldown_sec", value=scale_in_cooldown_sec, expected_type=type_hints["scale_in_cooldown_sec"])
307
+ check_type(argname="argument scale_out_cooldown_sec", value=scale_out_cooldown_sec, expected_type=type_hints["scale_out_cooldown_sec"])
308
+ self._values: typing.Dict[builtins.str, typing.Any] = {
309
+ "max_capacity": max_capacity,
310
+ "min_capacity": min_capacity,
311
+ "target_cpu_utilization_percent": target_cpu_utilization_percent,
312
+ }
313
+ if scale_in_cooldown_sec is not None:
314
+ self._values["scale_in_cooldown_sec"] = scale_in_cooldown_sec
315
+ if scale_out_cooldown_sec is not None:
316
+ self._values["scale_out_cooldown_sec"] = scale_out_cooldown_sec
317
+
318
+ @builtins.property
319
+ def max_capacity(self) -> jsii.Number:
320
+ '''Maximum number of tasks.'''
321
+ result = self._values.get("max_capacity")
322
+ assert result is not None, "Required property 'max_capacity' is missing"
323
+ return typing.cast(jsii.Number, result)
324
+
325
+ @builtins.property
326
+ def min_capacity(self) -> jsii.Number:
327
+ '''Minimum number of tasks.'''
328
+ result = self._values.get("min_capacity")
329
+ assert result is not None, "Required property 'min_capacity' is missing"
330
+ return typing.cast(jsii.Number, result)
331
+
332
+ @builtins.property
333
+ def target_cpu_utilization_percent(self) -> jsii.Number:
334
+ '''Target CPU utilization percentage.'''
335
+ result = self._values.get("target_cpu_utilization_percent")
336
+ assert result is not None, "Required property 'target_cpu_utilization_percent' is missing"
337
+ return typing.cast(jsii.Number, result)
338
+
339
+ @builtins.property
340
+ def scale_in_cooldown_sec(self) -> typing.Optional[jsii.Number]:
341
+ '''Cooldown time in seconds after scale-in.'''
342
+ result = self._values.get("scale_in_cooldown_sec")
343
+ return typing.cast(typing.Optional[jsii.Number], result)
344
+
345
+ @builtins.property
346
+ def scale_out_cooldown_sec(self) -> typing.Optional[jsii.Number]:
347
+ '''Cooldown time in seconds after scale-out.'''
348
+ result = self._values.get("scale_out_cooldown_sec")
349
+ return typing.cast(typing.Optional[jsii.Number], result)
350
+
351
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
352
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
353
+
354
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
355
+ return not (rhs == self)
356
+
357
+ def __repr__(self) -> str:
358
+ return "AutoScalingProps(%s)" % ", ".join(
359
+ k + "=" + repr(v) for k, v in self._values.items()
360
+ )
361
+
362
+
363
+ class EcsCodeDeploy(
364
+ _constructs_77d1e7e8.Construct,
365
+ metaclass=jsii.JSIIMeta,
366
+ jsii_type="must-cdk.EcsCodeDeploy",
367
+ ):
368
+ def __init__(
369
+ self,
370
+ scope: _constructs_77d1e7e8.Construct,
371
+ id: builtins.str,
372
+ *,
373
+ certificate_arn: builtins.str,
374
+ cluster: _aws_cdk_aws_ecs_ceddda9d.ICluster,
375
+ container_port: jsii.Number,
376
+ environment: builtins.str,
377
+ image_uri: builtins.str,
378
+ service_name: builtins.str,
379
+ vpc: _aws_cdk_aws_ec2_ceddda9d.IVpc,
380
+ auto_scaling: typing.Optional[typing.Union[AutoScalingProps, typing.Dict[builtins.str, typing.Any]]] = None,
381
+ enable_public_load_balancer: typing.Optional[builtins.bool] = None,
382
+ health_check: typing.Optional[typing.Union[_aws_cdk_aws_ecs_ceddda9d.HealthCheck, typing.Dict[builtins.str, typing.Any]]] = None,
383
+ ) -> None:
384
+ '''
385
+ :param scope: -
386
+ :param id: -
387
+ :param certificate_arn:
388
+ :param cluster:
389
+ :param container_port:
390
+ :param environment:
391
+ :param image_uri:
392
+ :param service_name:
393
+ :param vpc:
394
+ :param auto_scaling:
395
+ :param enable_public_load_balancer:
396
+ :param health_check:
397
+ '''
398
+ if __debug__:
399
+ type_hints = typing.get_type_hints(_typecheckingstub__19ac4f77d3bba1391929b87d2d23b70fe61e21aa6809f43ed4283d6ecf350909)
400
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
401
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
402
+ props = EcsCodeDeployProps(
403
+ certificate_arn=certificate_arn,
404
+ cluster=cluster,
405
+ container_port=container_port,
406
+ environment=environment,
407
+ image_uri=image_uri,
408
+ service_name=service_name,
409
+ vpc=vpc,
410
+ auto_scaling=auto_scaling,
411
+ enable_public_load_balancer=enable_public_load_balancer,
412
+ health_check=health_check,
413
+ )
414
+
415
+ jsii.create(self.__class__, self, [scope, id, props])
416
+
417
+ @builtins.property
418
+ @jsii.member(jsii_name="loadBalancer")
419
+ def load_balancer(
420
+ self,
421
+ ) -> _aws_cdk_aws_elasticloadbalancingv2_ceddda9d.ApplicationLoadBalancer:
422
+ return typing.cast(_aws_cdk_aws_elasticloadbalancingv2_ceddda9d.ApplicationLoadBalancer, jsii.get(self, "loadBalancer"))
423
+
424
+ @builtins.property
425
+ @jsii.member(jsii_name="service")
426
+ def service(self) -> _aws_cdk_aws_ecs_ceddda9d.FargateService:
427
+ return typing.cast(_aws_cdk_aws_ecs_ceddda9d.FargateService, jsii.get(self, "service"))
428
+
429
+ @builtins.property
430
+ @jsii.member(jsii_name="taskRole")
431
+ def task_role(self) -> _aws_cdk_aws_iam_ceddda9d.Role:
432
+ return typing.cast(_aws_cdk_aws_iam_ceddda9d.Role, jsii.get(self, "taskRole"))
433
+
434
+ @task_role.setter
435
+ def task_role(self, value: _aws_cdk_aws_iam_ceddda9d.Role) -> None:
436
+ if __debug__:
437
+ type_hints = typing.get_type_hints(_typecheckingstub__60923688f982908f977f559dbd1295485a3b0547df3c45291a862130dede0c3e)
438
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
439
+ jsii.set(self, "taskRole", value) # pyright: ignore[reportArgumentType]
440
+
441
+
442
+ @jsii.data_type(
443
+ jsii_type="must-cdk.EcsCodeDeployProps",
444
+ jsii_struct_bases=[],
445
+ name_mapping={
446
+ "certificate_arn": "certificateArn",
447
+ "cluster": "cluster",
448
+ "container_port": "containerPort",
449
+ "environment": "environment",
450
+ "image_uri": "imageUri",
451
+ "service_name": "serviceName",
452
+ "vpc": "vpc",
453
+ "auto_scaling": "autoScaling",
454
+ "enable_public_load_balancer": "enablePublicLoadBalancer",
455
+ "health_check": "healthCheck",
456
+ },
457
+ )
458
+ class EcsCodeDeployProps:
459
+ def __init__(
460
+ self,
461
+ *,
462
+ certificate_arn: builtins.str,
463
+ cluster: _aws_cdk_aws_ecs_ceddda9d.ICluster,
464
+ container_port: jsii.Number,
465
+ environment: builtins.str,
466
+ image_uri: builtins.str,
467
+ service_name: builtins.str,
468
+ vpc: _aws_cdk_aws_ec2_ceddda9d.IVpc,
469
+ auto_scaling: typing.Optional[typing.Union[AutoScalingProps, typing.Dict[builtins.str, typing.Any]]] = None,
470
+ enable_public_load_balancer: typing.Optional[builtins.bool] = None,
471
+ health_check: typing.Optional[typing.Union[_aws_cdk_aws_ecs_ceddda9d.HealthCheck, typing.Dict[builtins.str, typing.Any]]] = None,
472
+ ) -> None:
473
+ '''
474
+ :param certificate_arn:
475
+ :param cluster:
476
+ :param container_port:
477
+ :param environment:
478
+ :param image_uri:
479
+ :param service_name:
480
+ :param vpc:
481
+ :param auto_scaling:
482
+ :param enable_public_load_balancer:
483
+ :param health_check:
484
+ '''
485
+ if isinstance(auto_scaling, dict):
486
+ auto_scaling = AutoScalingProps(**auto_scaling)
487
+ if isinstance(health_check, dict):
488
+ health_check = _aws_cdk_aws_ecs_ceddda9d.HealthCheck(**health_check)
489
+ if __debug__:
490
+ type_hints = typing.get_type_hints(_typecheckingstub__0e1edfc306738ea99e0bd03a55876d7f75a063970dd3103fc1bbb766dff014b1)
491
+ check_type(argname="argument certificate_arn", value=certificate_arn, expected_type=type_hints["certificate_arn"])
492
+ check_type(argname="argument cluster", value=cluster, expected_type=type_hints["cluster"])
493
+ check_type(argname="argument container_port", value=container_port, expected_type=type_hints["container_port"])
494
+ check_type(argname="argument environment", value=environment, expected_type=type_hints["environment"])
495
+ check_type(argname="argument image_uri", value=image_uri, expected_type=type_hints["image_uri"])
496
+ check_type(argname="argument service_name", value=service_name, expected_type=type_hints["service_name"])
497
+ check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
498
+ check_type(argname="argument auto_scaling", value=auto_scaling, expected_type=type_hints["auto_scaling"])
499
+ check_type(argname="argument enable_public_load_balancer", value=enable_public_load_balancer, expected_type=type_hints["enable_public_load_balancer"])
500
+ check_type(argname="argument health_check", value=health_check, expected_type=type_hints["health_check"])
501
+ self._values: typing.Dict[builtins.str, typing.Any] = {
502
+ "certificate_arn": certificate_arn,
503
+ "cluster": cluster,
504
+ "container_port": container_port,
505
+ "environment": environment,
506
+ "image_uri": image_uri,
507
+ "service_name": service_name,
508
+ "vpc": vpc,
509
+ }
510
+ if auto_scaling is not None:
511
+ self._values["auto_scaling"] = auto_scaling
512
+ if enable_public_load_balancer is not None:
513
+ self._values["enable_public_load_balancer"] = enable_public_load_balancer
514
+ if health_check is not None:
515
+ self._values["health_check"] = health_check
516
+
517
+ @builtins.property
518
+ def certificate_arn(self) -> builtins.str:
519
+ result = self._values.get("certificate_arn")
520
+ assert result is not None, "Required property 'certificate_arn' is missing"
521
+ return typing.cast(builtins.str, result)
522
+
523
+ @builtins.property
524
+ def cluster(self) -> _aws_cdk_aws_ecs_ceddda9d.ICluster:
525
+ result = self._values.get("cluster")
526
+ assert result is not None, "Required property 'cluster' is missing"
527
+ return typing.cast(_aws_cdk_aws_ecs_ceddda9d.ICluster, result)
528
+
529
+ @builtins.property
530
+ def container_port(self) -> jsii.Number:
531
+ result = self._values.get("container_port")
532
+ assert result is not None, "Required property 'container_port' is missing"
533
+ return typing.cast(jsii.Number, result)
534
+
535
+ @builtins.property
536
+ def environment(self) -> builtins.str:
537
+ result = self._values.get("environment")
538
+ assert result is not None, "Required property 'environment' is missing"
539
+ return typing.cast(builtins.str, result)
540
+
541
+ @builtins.property
542
+ def image_uri(self) -> builtins.str:
543
+ result = self._values.get("image_uri")
544
+ assert result is not None, "Required property 'image_uri' is missing"
545
+ return typing.cast(builtins.str, result)
546
+
547
+ @builtins.property
548
+ def service_name(self) -> builtins.str:
549
+ result = self._values.get("service_name")
550
+ assert result is not None, "Required property 'service_name' is missing"
551
+ return typing.cast(builtins.str, result)
552
+
553
+ @builtins.property
554
+ def vpc(self) -> _aws_cdk_aws_ec2_ceddda9d.IVpc:
555
+ result = self._values.get("vpc")
556
+ assert result is not None, "Required property 'vpc' is missing"
557
+ return typing.cast(_aws_cdk_aws_ec2_ceddda9d.IVpc, result)
558
+
559
+ @builtins.property
560
+ def auto_scaling(self) -> typing.Optional[AutoScalingProps]:
561
+ result = self._values.get("auto_scaling")
562
+ return typing.cast(typing.Optional[AutoScalingProps], result)
563
+
564
+ @builtins.property
565
+ def enable_public_load_balancer(self) -> typing.Optional[builtins.bool]:
566
+ result = self._values.get("enable_public_load_balancer")
567
+ return typing.cast(typing.Optional[builtins.bool], result)
568
+
569
+ @builtins.property
570
+ def health_check(self) -> typing.Optional[_aws_cdk_aws_ecs_ceddda9d.HealthCheck]:
571
+ result = self._values.get("health_check")
572
+ return typing.cast(typing.Optional[_aws_cdk_aws_ecs_ceddda9d.HealthCheck], result)
573
+
574
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
575
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
576
+
577
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
578
+ return not (rhs == self)
579
+
580
+ def __repr__(self) -> str:
581
+ return "EcsCodeDeployProps(%s)" % ", ".join(
582
+ k + "=" + repr(v) for k, v in self._values.items()
583
+ )
584
+
585
+
586
+ class WebsocketApiGatewayToLambdaCustomDomain(
587
+ _constructs_77d1e7e8.Construct,
588
+ metaclass=jsii.JSIIMeta,
589
+ jsii_type="must-cdk.WebsocketApiGatewayToLambdaCustomDomain",
590
+ ):
591
+ '''
592
+ :summary: The ApiGatewayToLambda class.
593
+ '''
594
+
595
+ def __init__(
596
+ self,
597
+ scope: _constructs_77d1e7e8.Construct,
598
+ id: builtins.str,
599
+ *,
600
+ api_gateway_props: typing.Any = None,
601
+ create_usage_plan: typing.Optional[builtins.bool] = None,
602
+ custom_domain_name: typing.Optional[builtins.str] = None,
603
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
604
+ hosted_zone: typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone] = None,
605
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
606
+ log_group_props: typing.Optional[typing.Union[_aws_cdk_aws_logs_ceddda9d.LogGroupProps, typing.Dict[builtins.str, typing.Any]]] = None,
607
+ ) -> None:
608
+ '''
609
+ :param scope: - represents the scope for all the resources.
610
+ :param id: - this is a a scope-unique id.
611
+ :param api_gateway_props: Optional user-provided props to override the default props for the API.
612
+ :param create_usage_plan: Whether to create a Usage Plan attached to the API. Must be true if apiGatewayProps.defaultMethodOptions.apiKeyRequired is true
613
+ :param custom_domain_name: Optional custom domain name for API Gateway, an ACM cert will also created. Default: - no custom domain
614
+ :param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
615
+ :param hosted_zone: Optional Route53 hosted zone to create alias record for the custom domain. Default: - no Route53 alias record created
616
+ :param lambda_function_props: User provided props to override the default props for the Lambda function.
617
+ :param log_group_props:
618
+ '''
619
+ if __debug__:
620
+ type_hints = typing.get_type_hints(_typecheckingstub__448d9aeeae459df879203fad12fb34ff1b12039929f0a465891bedcfc130f38c)
621
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
622
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
623
+ props = WebsocketApiGatewayToLambdaProps(
624
+ api_gateway_props=api_gateway_props,
625
+ create_usage_plan=create_usage_plan,
626
+ custom_domain_name=custom_domain_name,
627
+ existing_lambda_obj=existing_lambda_obj,
628
+ hosted_zone=hosted_zone,
629
+ lambda_function_props=lambda_function_props,
630
+ log_group_props=log_group_props,
631
+ )
632
+
633
+ jsii.create(self.__class__, self, [scope, id, props])
634
+
635
+ @builtins.property
636
+ @jsii.member(jsii_name="apiGateway")
637
+ def api_gateway(self) -> _aws_cdk_aws_apigateway_ceddda9d.RestApi:
638
+ return typing.cast(_aws_cdk_aws_apigateway_ceddda9d.RestApi, jsii.get(self, "apiGateway"))
639
+
640
+ @builtins.property
641
+ @jsii.member(jsii_name="apiGatewayLogGroup")
642
+ def api_gateway_log_group(self) -> _aws_cdk_aws_logs_ceddda9d.LogGroup:
643
+ return typing.cast(_aws_cdk_aws_logs_ceddda9d.LogGroup, jsii.get(self, "apiGatewayLogGroup"))
644
+
645
+ @builtins.property
646
+ @jsii.member(jsii_name="lambdaFunction")
647
+ def lambda_function(self) -> _aws_cdk_aws_lambda_ceddda9d.Function:
648
+ return typing.cast(_aws_cdk_aws_lambda_ceddda9d.Function, jsii.get(self, "lambdaFunction"))
649
+
650
+ @builtins.property
651
+ @jsii.member(jsii_name="apiGatewayCloudWatchRole")
652
+ def api_gateway_cloud_watch_role(
653
+ self,
654
+ ) -> typing.Optional[_aws_cdk_aws_iam_ceddda9d.Role]:
655
+ return typing.cast(typing.Optional[_aws_cdk_aws_iam_ceddda9d.Role], jsii.get(self, "apiGatewayCloudWatchRole"))
656
+
657
+ @builtins.property
658
+ @jsii.member(jsii_name="aRecord")
659
+ def a_record(self) -> typing.Optional[_aws_cdk_aws_route53_ceddda9d.ARecord]:
660
+ return typing.cast(typing.Optional[_aws_cdk_aws_route53_ceddda9d.ARecord], jsii.get(self, "aRecord"))
661
+
662
+ @builtins.property
663
+ @jsii.member(jsii_name="certificate")
664
+ def certificate(
665
+ self,
666
+ ) -> typing.Optional[_aws_cdk_aws_certificatemanager_ceddda9d.Certificate]:
667
+ return typing.cast(typing.Optional[_aws_cdk_aws_certificatemanager_ceddda9d.Certificate], jsii.get(self, "certificate"))
668
+
669
+ @builtins.property
670
+ @jsii.member(jsii_name="domain")
671
+ def domain(self) -> typing.Optional[_aws_cdk_aws_apigateway_ceddda9d.DomainName]:
672
+ return typing.cast(typing.Optional[_aws_cdk_aws_apigateway_ceddda9d.DomainName], jsii.get(self, "domain"))
673
+
674
+
675
+ @jsii.data_type(
676
+ jsii_type="must-cdk.WebsocketApiGatewayToLambdaProps",
677
+ jsii_struct_bases=[],
678
+ name_mapping={
679
+ "api_gateway_props": "apiGatewayProps",
680
+ "create_usage_plan": "createUsagePlan",
681
+ "custom_domain_name": "customDomainName",
682
+ "existing_lambda_obj": "existingLambdaObj",
683
+ "hosted_zone": "hostedZone",
684
+ "lambda_function_props": "lambdaFunctionProps",
685
+ "log_group_props": "logGroupProps",
686
+ },
687
+ )
688
+ class WebsocketApiGatewayToLambdaProps:
689
+ def __init__(
690
+ self,
691
+ *,
692
+ api_gateway_props: typing.Any = None,
693
+ create_usage_plan: typing.Optional[builtins.bool] = None,
694
+ custom_domain_name: typing.Optional[builtins.str] = None,
695
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
696
+ hosted_zone: typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone] = None,
697
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
698
+ log_group_props: typing.Optional[typing.Union[_aws_cdk_aws_logs_ceddda9d.LogGroupProps, typing.Dict[builtins.str, typing.Any]]] = None,
699
+ ) -> None:
700
+ '''
701
+ :param api_gateway_props: Optional user-provided props to override the default props for the API.
702
+ :param create_usage_plan: Whether to create a Usage Plan attached to the API. Must be true if apiGatewayProps.defaultMethodOptions.apiKeyRequired is true
703
+ :param custom_domain_name: Optional custom domain name for API Gateway, an ACM cert will also created. Default: - no custom domain
704
+ :param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
705
+ :param hosted_zone: Optional Route53 hosted zone to create alias record for the custom domain. Default: - no Route53 alias record created
706
+ :param lambda_function_props: User provided props to override the default props for the Lambda function.
707
+ :param log_group_props:
708
+ '''
709
+ if isinstance(lambda_function_props, dict):
710
+ lambda_function_props = _aws_cdk_aws_lambda_ceddda9d.FunctionProps(**lambda_function_props)
711
+ if isinstance(log_group_props, dict):
712
+ log_group_props = _aws_cdk_aws_logs_ceddda9d.LogGroupProps(**log_group_props)
713
+ if __debug__:
714
+ type_hints = typing.get_type_hints(_typecheckingstub__109c686be15dfacf97f31b8340ac53463b8369382aaf60b63405ca329516af4d)
715
+ check_type(argname="argument api_gateway_props", value=api_gateway_props, expected_type=type_hints["api_gateway_props"])
716
+ check_type(argname="argument create_usage_plan", value=create_usage_plan, expected_type=type_hints["create_usage_plan"])
717
+ check_type(argname="argument custom_domain_name", value=custom_domain_name, expected_type=type_hints["custom_domain_name"])
718
+ check_type(argname="argument existing_lambda_obj", value=existing_lambda_obj, expected_type=type_hints["existing_lambda_obj"])
719
+ check_type(argname="argument hosted_zone", value=hosted_zone, expected_type=type_hints["hosted_zone"])
720
+ check_type(argname="argument lambda_function_props", value=lambda_function_props, expected_type=type_hints["lambda_function_props"])
721
+ check_type(argname="argument log_group_props", value=log_group_props, expected_type=type_hints["log_group_props"])
722
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
723
+ if api_gateway_props is not None:
724
+ self._values["api_gateway_props"] = api_gateway_props
725
+ if create_usage_plan is not None:
726
+ self._values["create_usage_plan"] = create_usage_plan
727
+ if custom_domain_name is not None:
728
+ self._values["custom_domain_name"] = custom_domain_name
729
+ if existing_lambda_obj is not None:
730
+ self._values["existing_lambda_obj"] = existing_lambda_obj
731
+ if hosted_zone is not None:
732
+ self._values["hosted_zone"] = hosted_zone
733
+ if lambda_function_props is not None:
734
+ self._values["lambda_function_props"] = lambda_function_props
735
+ if log_group_props is not None:
736
+ self._values["log_group_props"] = log_group_props
737
+
738
+ @builtins.property
739
+ def api_gateway_props(self) -> typing.Any:
740
+ '''Optional user-provided props to override the default props for the API.'''
741
+ result = self._values.get("api_gateway_props")
742
+ return typing.cast(typing.Any, result)
743
+
744
+ @builtins.property
745
+ def create_usage_plan(self) -> typing.Optional[builtins.bool]:
746
+ '''Whether to create a Usage Plan attached to the API.
747
+
748
+ Must be true if
749
+ apiGatewayProps.defaultMethodOptions.apiKeyRequired is true
750
+ '''
751
+ result = self._values.get("create_usage_plan")
752
+ return typing.cast(typing.Optional[builtins.bool], result)
753
+
754
+ @builtins.property
755
+ def custom_domain_name(self) -> typing.Optional[builtins.str]:
756
+ '''Optional custom domain name for API Gateway, an ACM cert will also created.
757
+
758
+ :default: - no custom domain
759
+ '''
760
+ result = self._values.get("custom_domain_name")
761
+ return typing.cast(typing.Optional[builtins.str], result)
762
+
763
+ @builtins.property
764
+ def existing_lambda_obj(
765
+ self,
766
+ ) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function]:
767
+ '''Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error.
768
+
769
+ :default: - None
770
+ '''
771
+ result = self._values.get("existing_lambda_obj")
772
+ return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function], result)
773
+
774
+ @builtins.property
775
+ def hosted_zone(self) -> typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone]:
776
+ '''Optional Route53 hosted zone to create alias record for the custom domain.
777
+
778
+ :default: - no Route53 alias record created
779
+ '''
780
+ result = self._values.get("hosted_zone")
781
+ return typing.cast(typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone], result)
782
+
783
+ @builtins.property
784
+ def lambda_function_props(
785
+ self,
786
+ ) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.FunctionProps]:
787
+ '''User provided props to override the default props for the Lambda function.'''
788
+ result = self._values.get("lambda_function_props")
789
+ return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.FunctionProps], result)
790
+
791
+ @builtins.property
792
+ def log_group_props(
793
+ self,
794
+ ) -> typing.Optional[_aws_cdk_aws_logs_ceddda9d.LogGroupProps]:
795
+ result = self._values.get("log_group_props")
796
+ return typing.cast(typing.Optional[_aws_cdk_aws_logs_ceddda9d.LogGroupProps], result)
797
+
798
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
799
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
800
+
801
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
802
+ return not (rhs == self)
803
+
804
+ def __repr__(self) -> str:
805
+ return "WebsocketApiGatewayToLambdaProps(%s)" % ", ".join(
806
+ k + "=" + repr(v) for k, v in self._values.items()
807
+ )
808
+
809
+
810
+ __all__ = [
811
+ "ApiGatewayToLambdaCustomDomain",
812
+ "ApiGatewayToLambdaProps",
813
+ "AutoScalingProps",
814
+ "EcsCodeDeploy",
815
+ "EcsCodeDeployProps",
816
+ "WebsocketApiGatewayToLambdaCustomDomain",
817
+ "WebsocketApiGatewayToLambdaProps",
818
+ ]
819
+
820
+ publication.publish()
821
+
822
+ def _typecheckingstub__d7036b176aa7b446813bdbc7672055bba27972db6a947684b57c6f8f02e0f9b6(
823
+ scope: _constructs_77d1e7e8.Construct,
824
+ id: builtins.str,
825
+ *,
826
+ api_gateway_props: typing.Any = None,
827
+ create_usage_plan: typing.Optional[builtins.bool] = None,
828
+ custom_domain_name: typing.Optional[builtins.str] = None,
829
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
830
+ hosted_zone: typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone] = None,
831
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
832
+ log_group_props: typing.Optional[typing.Union[_aws_cdk_aws_logs_ceddda9d.LogGroupProps, typing.Dict[builtins.str, typing.Any]]] = None,
833
+ ) -> None:
834
+ """Type checking stubs"""
835
+ pass
836
+
837
+ def _typecheckingstub__7c51143b7da8fc50ffd3240aae88642c332f9ccc1136e275abf9d1065df7ea17(
838
+ *,
839
+ api_gateway_props: typing.Any = None,
840
+ create_usage_plan: typing.Optional[builtins.bool] = None,
841
+ custom_domain_name: typing.Optional[builtins.str] = None,
842
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
843
+ hosted_zone: typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone] = None,
844
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
845
+ log_group_props: typing.Optional[typing.Union[_aws_cdk_aws_logs_ceddda9d.LogGroupProps, typing.Dict[builtins.str, typing.Any]]] = None,
846
+ ) -> None:
847
+ """Type checking stubs"""
848
+ pass
849
+
850
+ def _typecheckingstub__d0ea30b15daf73de785b4991457443ee0ca220224fbd08155a17d86c67413930(
851
+ *,
852
+ max_capacity: jsii.Number,
853
+ min_capacity: jsii.Number,
854
+ target_cpu_utilization_percent: jsii.Number,
855
+ scale_in_cooldown_sec: typing.Optional[jsii.Number] = None,
856
+ scale_out_cooldown_sec: typing.Optional[jsii.Number] = None,
857
+ ) -> None:
858
+ """Type checking stubs"""
859
+ pass
860
+
861
+ def _typecheckingstub__19ac4f77d3bba1391929b87d2d23b70fe61e21aa6809f43ed4283d6ecf350909(
862
+ scope: _constructs_77d1e7e8.Construct,
863
+ id: builtins.str,
864
+ *,
865
+ certificate_arn: builtins.str,
866
+ cluster: _aws_cdk_aws_ecs_ceddda9d.ICluster,
867
+ container_port: jsii.Number,
868
+ environment: builtins.str,
869
+ image_uri: builtins.str,
870
+ service_name: builtins.str,
871
+ vpc: _aws_cdk_aws_ec2_ceddda9d.IVpc,
872
+ auto_scaling: typing.Optional[typing.Union[AutoScalingProps, typing.Dict[builtins.str, typing.Any]]] = None,
873
+ enable_public_load_balancer: typing.Optional[builtins.bool] = None,
874
+ health_check: typing.Optional[typing.Union[_aws_cdk_aws_ecs_ceddda9d.HealthCheck, typing.Dict[builtins.str, typing.Any]]] = None,
875
+ ) -> None:
876
+ """Type checking stubs"""
877
+ pass
878
+
879
+ def _typecheckingstub__60923688f982908f977f559dbd1295485a3b0547df3c45291a862130dede0c3e(
880
+ value: _aws_cdk_aws_iam_ceddda9d.Role,
881
+ ) -> None:
882
+ """Type checking stubs"""
883
+ pass
884
+
885
+ def _typecheckingstub__0e1edfc306738ea99e0bd03a55876d7f75a063970dd3103fc1bbb766dff014b1(
886
+ *,
887
+ certificate_arn: builtins.str,
888
+ cluster: _aws_cdk_aws_ecs_ceddda9d.ICluster,
889
+ container_port: jsii.Number,
890
+ environment: builtins.str,
891
+ image_uri: builtins.str,
892
+ service_name: builtins.str,
893
+ vpc: _aws_cdk_aws_ec2_ceddda9d.IVpc,
894
+ auto_scaling: typing.Optional[typing.Union[AutoScalingProps, typing.Dict[builtins.str, typing.Any]]] = None,
895
+ enable_public_load_balancer: typing.Optional[builtins.bool] = None,
896
+ health_check: typing.Optional[typing.Union[_aws_cdk_aws_ecs_ceddda9d.HealthCheck, typing.Dict[builtins.str, typing.Any]]] = None,
897
+ ) -> None:
898
+ """Type checking stubs"""
899
+ pass
900
+
901
+ def _typecheckingstub__448d9aeeae459df879203fad12fb34ff1b12039929f0a465891bedcfc130f38c(
902
+ scope: _constructs_77d1e7e8.Construct,
903
+ id: builtins.str,
904
+ *,
905
+ api_gateway_props: typing.Any = None,
906
+ create_usage_plan: typing.Optional[builtins.bool] = None,
907
+ custom_domain_name: typing.Optional[builtins.str] = None,
908
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
909
+ hosted_zone: typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone] = None,
910
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
911
+ log_group_props: typing.Optional[typing.Union[_aws_cdk_aws_logs_ceddda9d.LogGroupProps, typing.Dict[builtins.str, typing.Any]]] = None,
912
+ ) -> None:
913
+ """Type checking stubs"""
914
+ pass
915
+
916
+ def _typecheckingstub__109c686be15dfacf97f31b8340ac53463b8369382aaf60b63405ca329516af4d(
917
+ *,
918
+ api_gateway_props: typing.Any = None,
919
+ create_usage_plan: typing.Optional[builtins.bool] = None,
920
+ custom_domain_name: typing.Optional[builtins.str] = None,
921
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
922
+ hosted_zone: typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone] = None,
923
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
924
+ log_group_props: typing.Optional[typing.Union[_aws_cdk_aws_logs_ceddda9d.LogGroupProps, typing.Dict[builtins.str, typing.Any]]] = None,
925
+ ) -> None:
926
+ """Type checking stubs"""
927
+ pass
@@ -32,7 +32,7 @@ import aws_cdk._jsii
32
32
  import constructs._jsii
33
33
 
34
34
  __jsii_assembly__ = jsii.JSIIAssembly.load(
35
- "must-cdk", "0.0.6", __name__[0:-6], "must-cdk@0.0.6.jsii.tgz"
35
+ "must-cdk", "0.0.7", __name__[0:-6], "must-cdk@0.0.7.jsii.tgz"
36
36
  )
37
37
 
38
38
  __all__ = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: must-cdk
3
- Version: 0.0.6
3
+ Version: 0.0.7
4
4
  Summary: must-cdk
5
5
  Home-page: https://github.com/globalmsq/must-cdk.git
6
6
  Author: Must Admin<admin-mufin@users.noreply.github.com>
@@ -11,4 +11,4 @@ src/must_cdk.egg-info/dependency_links.txt
11
11
  src/must_cdk.egg-info/requires.txt
12
12
  src/must_cdk.egg-info/top_level.txt
13
13
  src/must_cdk/_jsii/__init__.py
14
- src/must_cdk/_jsii/must-cdk@0.0.6.jsii.tgz
14
+ src/must_cdk/_jsii/must-cdk@0.0.7.jsii.tgz
@@ -1,302 +0,0 @@
1
- r'''
2
- # Must CDK for common pattern
3
- '''
4
- from pkgutil import extend_path
5
- __path__ = extend_path(__path__, __name__)
6
-
7
- import abc
8
- import builtins
9
- import datetime
10
- import enum
11
- import typing
12
-
13
- import jsii
14
- import publication
15
- import typing_extensions
16
-
17
- import typeguard
18
- from importlib.metadata import version as _metadata_package_version
19
- TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
20
-
21
- def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
22
- if TYPEGUARD_MAJOR_VERSION <= 2:
23
- return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
24
- else:
25
- if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
26
- pass
27
- else:
28
- if TYPEGUARD_MAJOR_VERSION == 3:
29
- typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
30
- typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
31
- else:
32
- typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
33
-
34
- from ._jsii import *
35
-
36
- import aws_cdk.aws_apigateway as _aws_cdk_aws_apigateway_ceddda9d
37
- import aws_cdk.aws_certificatemanager as _aws_cdk_aws_certificatemanager_ceddda9d
38
- import aws_cdk.aws_iam as _aws_cdk_aws_iam_ceddda9d
39
- import aws_cdk.aws_lambda as _aws_cdk_aws_lambda_ceddda9d
40
- import aws_cdk.aws_logs as _aws_cdk_aws_logs_ceddda9d
41
- import aws_cdk.aws_route53 as _aws_cdk_aws_route53_ceddda9d
42
- import constructs as _constructs_77d1e7e8
43
-
44
-
45
- class ApiGatewayToLambdaCustomDomain(
46
- _constructs_77d1e7e8.Construct,
47
- metaclass=jsii.JSIIMeta,
48
- jsii_type="must-cdk.ApiGatewayToLambdaCustomDomain",
49
- ):
50
- '''
51
- :summary: The ApiGatewayToLambda class.
52
- '''
53
-
54
- def __init__(
55
- self,
56
- scope: _constructs_77d1e7e8.Construct,
57
- id: builtins.str,
58
- *,
59
- api_gateway_props: typing.Any = None,
60
- create_usage_plan: typing.Optional[builtins.bool] = None,
61
- custom_domain_name: typing.Optional[builtins.str] = None,
62
- existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
63
- hosted_zone: typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone] = None,
64
- lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
65
- log_group_props: typing.Optional[typing.Union[_aws_cdk_aws_logs_ceddda9d.LogGroupProps, typing.Dict[builtins.str, typing.Any]]] = None,
66
- ) -> None:
67
- '''
68
- :param scope: - represents the scope for all the resources.
69
- :param id: - this is a a scope-unique id.
70
- :param api_gateway_props: Optional user-provided props to override the default props for the API.
71
- :param create_usage_plan: Whether to create a Usage Plan attached to the API. Must be true if apiGatewayProps.defaultMethodOptions.apiKeyRequired is true
72
- :param custom_domain_name: Optional custom domain name for API Gateway, an ACM cert will also created. Default: - no custom domain
73
- :param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
74
- :param hosted_zone: Optional Route53 hosted zone to create alias record for the custom domain. Default: - no Route53 alias record created
75
- :param lambda_function_props: User provided props to override the default props for the Lambda function.
76
- :param log_group_props:
77
- '''
78
- if __debug__:
79
- type_hints = typing.get_type_hints(_typecheckingstub__d7036b176aa7b446813bdbc7672055bba27972db6a947684b57c6f8f02e0f9b6)
80
- check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
81
- check_type(argname="argument id", value=id, expected_type=type_hints["id"])
82
- props = ApiGatewayToLambdaProps(
83
- api_gateway_props=api_gateway_props,
84
- create_usage_plan=create_usage_plan,
85
- custom_domain_name=custom_domain_name,
86
- existing_lambda_obj=existing_lambda_obj,
87
- hosted_zone=hosted_zone,
88
- lambda_function_props=lambda_function_props,
89
- log_group_props=log_group_props,
90
- )
91
-
92
- jsii.create(self.__class__, self, [scope, id, props])
93
-
94
- @builtins.property
95
- @jsii.member(jsii_name="apiGateway")
96
- def api_gateway(self) -> _aws_cdk_aws_apigateway_ceddda9d.RestApi:
97
- return typing.cast(_aws_cdk_aws_apigateway_ceddda9d.RestApi, jsii.get(self, "apiGateway"))
98
-
99
- @builtins.property
100
- @jsii.member(jsii_name="apiGatewayLogGroup")
101
- def api_gateway_log_group(self) -> _aws_cdk_aws_logs_ceddda9d.LogGroup:
102
- return typing.cast(_aws_cdk_aws_logs_ceddda9d.LogGroup, jsii.get(self, "apiGatewayLogGroup"))
103
-
104
- @builtins.property
105
- @jsii.member(jsii_name="lambdaFunction")
106
- def lambda_function(self) -> _aws_cdk_aws_lambda_ceddda9d.Function:
107
- return typing.cast(_aws_cdk_aws_lambda_ceddda9d.Function, jsii.get(self, "lambdaFunction"))
108
-
109
- @builtins.property
110
- @jsii.member(jsii_name="apiGatewayCloudWatchRole")
111
- def api_gateway_cloud_watch_role(
112
- self,
113
- ) -> typing.Optional[_aws_cdk_aws_iam_ceddda9d.Role]:
114
- return typing.cast(typing.Optional[_aws_cdk_aws_iam_ceddda9d.Role], jsii.get(self, "apiGatewayCloudWatchRole"))
115
-
116
- @builtins.property
117
- @jsii.member(jsii_name="aRecord")
118
- def a_record(self) -> typing.Optional[_aws_cdk_aws_route53_ceddda9d.ARecord]:
119
- return typing.cast(typing.Optional[_aws_cdk_aws_route53_ceddda9d.ARecord], jsii.get(self, "aRecord"))
120
-
121
- @builtins.property
122
- @jsii.member(jsii_name="certificate")
123
- def certificate(
124
- self,
125
- ) -> typing.Optional[_aws_cdk_aws_certificatemanager_ceddda9d.Certificate]:
126
- return typing.cast(typing.Optional[_aws_cdk_aws_certificatemanager_ceddda9d.Certificate], jsii.get(self, "certificate"))
127
-
128
- @builtins.property
129
- @jsii.member(jsii_name="domain")
130
- def domain(self) -> typing.Optional[_aws_cdk_aws_apigateway_ceddda9d.DomainName]:
131
- return typing.cast(typing.Optional[_aws_cdk_aws_apigateway_ceddda9d.DomainName], jsii.get(self, "domain"))
132
-
133
-
134
- @jsii.data_type(
135
- jsii_type="must-cdk.ApiGatewayToLambdaProps",
136
- jsii_struct_bases=[],
137
- name_mapping={
138
- "api_gateway_props": "apiGatewayProps",
139
- "create_usage_plan": "createUsagePlan",
140
- "custom_domain_name": "customDomainName",
141
- "existing_lambda_obj": "existingLambdaObj",
142
- "hosted_zone": "hostedZone",
143
- "lambda_function_props": "lambdaFunctionProps",
144
- "log_group_props": "logGroupProps",
145
- },
146
- )
147
- class ApiGatewayToLambdaProps:
148
- def __init__(
149
- self,
150
- *,
151
- api_gateway_props: typing.Any = None,
152
- create_usage_plan: typing.Optional[builtins.bool] = None,
153
- custom_domain_name: typing.Optional[builtins.str] = None,
154
- existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
155
- hosted_zone: typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone] = None,
156
- lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
157
- log_group_props: typing.Optional[typing.Union[_aws_cdk_aws_logs_ceddda9d.LogGroupProps, typing.Dict[builtins.str, typing.Any]]] = None,
158
- ) -> None:
159
- '''
160
- :param api_gateway_props: Optional user-provided props to override the default props for the API.
161
- :param create_usage_plan: Whether to create a Usage Plan attached to the API. Must be true if apiGatewayProps.defaultMethodOptions.apiKeyRequired is true
162
- :param custom_domain_name: Optional custom domain name for API Gateway, an ACM cert will also created. Default: - no custom domain
163
- :param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
164
- :param hosted_zone: Optional Route53 hosted zone to create alias record for the custom domain. Default: - no Route53 alias record created
165
- :param lambda_function_props: User provided props to override the default props for the Lambda function.
166
- :param log_group_props:
167
- '''
168
- if isinstance(lambda_function_props, dict):
169
- lambda_function_props = _aws_cdk_aws_lambda_ceddda9d.FunctionProps(**lambda_function_props)
170
- if isinstance(log_group_props, dict):
171
- log_group_props = _aws_cdk_aws_logs_ceddda9d.LogGroupProps(**log_group_props)
172
- if __debug__:
173
- type_hints = typing.get_type_hints(_typecheckingstub__7c51143b7da8fc50ffd3240aae88642c332f9ccc1136e275abf9d1065df7ea17)
174
- check_type(argname="argument api_gateway_props", value=api_gateway_props, expected_type=type_hints["api_gateway_props"])
175
- check_type(argname="argument create_usage_plan", value=create_usage_plan, expected_type=type_hints["create_usage_plan"])
176
- check_type(argname="argument custom_domain_name", value=custom_domain_name, expected_type=type_hints["custom_domain_name"])
177
- check_type(argname="argument existing_lambda_obj", value=existing_lambda_obj, expected_type=type_hints["existing_lambda_obj"])
178
- check_type(argname="argument hosted_zone", value=hosted_zone, expected_type=type_hints["hosted_zone"])
179
- check_type(argname="argument lambda_function_props", value=lambda_function_props, expected_type=type_hints["lambda_function_props"])
180
- check_type(argname="argument log_group_props", value=log_group_props, expected_type=type_hints["log_group_props"])
181
- self._values: typing.Dict[builtins.str, typing.Any] = {}
182
- if api_gateway_props is not None:
183
- self._values["api_gateway_props"] = api_gateway_props
184
- if create_usage_plan is not None:
185
- self._values["create_usage_plan"] = create_usage_plan
186
- if custom_domain_name is not None:
187
- self._values["custom_domain_name"] = custom_domain_name
188
- if existing_lambda_obj is not None:
189
- self._values["existing_lambda_obj"] = existing_lambda_obj
190
- if hosted_zone is not None:
191
- self._values["hosted_zone"] = hosted_zone
192
- if lambda_function_props is not None:
193
- self._values["lambda_function_props"] = lambda_function_props
194
- if log_group_props is not None:
195
- self._values["log_group_props"] = log_group_props
196
-
197
- @builtins.property
198
- def api_gateway_props(self) -> typing.Any:
199
- '''Optional user-provided props to override the default props for the API.'''
200
- result = self._values.get("api_gateway_props")
201
- return typing.cast(typing.Any, result)
202
-
203
- @builtins.property
204
- def create_usage_plan(self) -> typing.Optional[builtins.bool]:
205
- '''Whether to create a Usage Plan attached to the API.
206
-
207
- Must be true if
208
- apiGatewayProps.defaultMethodOptions.apiKeyRequired is true
209
- '''
210
- result = self._values.get("create_usage_plan")
211
- return typing.cast(typing.Optional[builtins.bool], result)
212
-
213
- @builtins.property
214
- def custom_domain_name(self) -> typing.Optional[builtins.str]:
215
- '''Optional custom domain name for API Gateway, an ACM cert will also created.
216
-
217
- :default: - no custom domain
218
- '''
219
- result = self._values.get("custom_domain_name")
220
- return typing.cast(typing.Optional[builtins.str], result)
221
-
222
- @builtins.property
223
- def existing_lambda_obj(
224
- self,
225
- ) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function]:
226
- '''Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error.
227
-
228
- :default: - None
229
- '''
230
- result = self._values.get("existing_lambda_obj")
231
- return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function], result)
232
-
233
- @builtins.property
234
- def hosted_zone(self) -> typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone]:
235
- '''Optional Route53 hosted zone to create alias record for the custom domain.
236
-
237
- :default: - no Route53 alias record created
238
- '''
239
- result = self._values.get("hosted_zone")
240
- return typing.cast(typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone], result)
241
-
242
- @builtins.property
243
- def lambda_function_props(
244
- self,
245
- ) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.FunctionProps]:
246
- '''User provided props to override the default props for the Lambda function.'''
247
- result = self._values.get("lambda_function_props")
248
- return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.FunctionProps], result)
249
-
250
- @builtins.property
251
- def log_group_props(
252
- self,
253
- ) -> typing.Optional[_aws_cdk_aws_logs_ceddda9d.LogGroupProps]:
254
- result = self._values.get("log_group_props")
255
- return typing.cast(typing.Optional[_aws_cdk_aws_logs_ceddda9d.LogGroupProps], result)
256
-
257
- def __eq__(self, rhs: typing.Any) -> builtins.bool:
258
- return isinstance(rhs, self.__class__) and rhs._values == self._values
259
-
260
- def __ne__(self, rhs: typing.Any) -> builtins.bool:
261
- return not (rhs == self)
262
-
263
- def __repr__(self) -> str:
264
- return "ApiGatewayToLambdaProps(%s)" % ", ".join(
265
- k + "=" + repr(v) for k, v in self._values.items()
266
- )
267
-
268
-
269
- __all__ = [
270
- "ApiGatewayToLambdaCustomDomain",
271
- "ApiGatewayToLambdaProps",
272
- ]
273
-
274
- publication.publish()
275
-
276
- def _typecheckingstub__d7036b176aa7b446813bdbc7672055bba27972db6a947684b57c6f8f02e0f9b6(
277
- scope: _constructs_77d1e7e8.Construct,
278
- id: builtins.str,
279
- *,
280
- api_gateway_props: typing.Any = None,
281
- create_usage_plan: typing.Optional[builtins.bool] = None,
282
- custom_domain_name: typing.Optional[builtins.str] = None,
283
- existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
284
- hosted_zone: typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone] = None,
285
- lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
286
- log_group_props: typing.Optional[typing.Union[_aws_cdk_aws_logs_ceddda9d.LogGroupProps, typing.Dict[builtins.str, typing.Any]]] = None,
287
- ) -> None:
288
- """Type checking stubs"""
289
- pass
290
-
291
- def _typecheckingstub__7c51143b7da8fc50ffd3240aae88642c332f9ccc1136e275abf9d1065df7ea17(
292
- *,
293
- api_gateway_props: typing.Any = None,
294
- create_usage_plan: typing.Optional[builtins.bool] = None,
295
- custom_domain_name: typing.Optional[builtins.str] = None,
296
- existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
297
- hosted_zone: typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone] = None,
298
- lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
299
- log_group_props: typing.Optional[typing.Union[_aws_cdk_aws_logs_ceddda9d.LogGroupProps, typing.Dict[builtins.str, typing.Any]]] = None,
300
- ) -> None:
301
- """Type checking stubs"""
302
- pass
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes