must-cdk 0.0.5__py3-none-any.whl → 0.0.7__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.
must_cdk/__init__.py CHANGED
@@ -35,6 +35,9 @@ from ._jsii import *
35
35
 
36
36
  import aws_cdk.aws_apigateway as _aws_cdk_aws_apigateway_ceddda9d
37
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
38
41
  import aws_cdk.aws_iam as _aws_cdk_aws_iam_ceddda9d
39
42
  import aws_cdk.aws_lambda as _aws_cdk_aws_lambda_ceddda9d
40
43
  import aws_cdk.aws_logs as _aws_cdk_aws_logs_ceddda9d
@@ -42,10 +45,10 @@ import aws_cdk.aws_route53 as _aws_cdk_aws_route53_ceddda9d
42
45
  import constructs as _constructs_77d1e7e8
43
46
 
44
47
 
45
- class ApiGatewayToLambda(
48
+ class ApiGatewayToLambdaCustomDomain(
46
49
  _constructs_77d1e7e8.Construct,
47
50
  metaclass=jsii.JSIIMeta,
48
- jsii_type="must-cdk.ApiGatewayToLambda",
51
+ jsii_type="must-cdk.ApiGatewayToLambdaCustomDomain",
49
52
  ):
50
53
  '''
51
54
  :summary: The ApiGatewayToLambda class.
@@ -76,7 +79,7 @@ class ApiGatewayToLambda(
76
79
  :param log_group_props:
77
80
  '''
78
81
  if __debug__:
79
- type_hints = typing.get_type_hints(_typecheckingstub__88385340a9ac0a3d345bb5f8b9e0334655a117a97d92f90c383b720f4bbd4824)
82
+ type_hints = typing.get_type_hints(_typecheckingstub__d7036b176aa7b446813bdbc7672055bba27972db6a947684b57c6f8f02e0f9b6)
80
83
  check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
81
84
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
82
85
  props = ApiGatewayToLambdaProps(
@@ -266,14 +269,557 @@ class ApiGatewayToLambdaProps:
266
269
  )
267
270
 
268
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
+
269
810
  __all__ = [
270
- "ApiGatewayToLambda",
811
+ "ApiGatewayToLambdaCustomDomain",
271
812
  "ApiGatewayToLambdaProps",
813
+ "AutoScalingProps",
814
+ "EcsCodeDeploy",
815
+ "EcsCodeDeployProps",
816
+ "WebsocketApiGatewayToLambdaCustomDomain",
817
+ "WebsocketApiGatewayToLambdaProps",
272
818
  ]
273
819
 
274
820
  publication.publish()
275
821
 
276
- def _typecheckingstub__88385340a9ac0a3d345bb5f8b9e0334655a117a97d92f90c383b720f4bbd4824(
822
+ def _typecheckingstub__d7036b176aa7b446813bdbc7672055bba27972db6a947684b57c6f8f02e0f9b6(
277
823
  scope: _constructs_77d1e7e8.Construct,
278
824
  id: builtins.str,
279
825
  *,
@@ -300,3 +846,82 @@ def _typecheckingstub__7c51143b7da8fc50ffd3240aae88642c332f9ccc1136e275abf9d1065
300
846
  ) -> None:
301
847
  """Type checking stubs"""
302
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.5", __name__[0:-6], "must-cdk@0.0.5.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__ = [
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: must-cdk
3
- Version: 0.0.5
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>
@@ -0,0 +1,9 @@
1
+ must_cdk/__init__.py,sha256=Vr5-hlH0pStuugnHfcmPGswsAsPR7Qq0-5ly1gU_Zw8,45370
2
+ must_cdk/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
+ must_cdk/_jsii/__init__.py,sha256=rmBzY32LMUfTu6epCg7MZsj7WSydE35KmBZdCihEjTk,1427
4
+ must_cdk/_jsii/must-cdk@0.0.7.jsii.tgz,sha256=CPtkLSsfw1HM-ztd07Yz5l_qI4cV_UVBnv557mIGNv4,480139
5
+ must_cdk-0.0.7.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
6
+ must_cdk-0.0.7.dist-info/METADATA,sha256=stt7CpOE0VcIxUVDsToPny-gyZ39adH-FgfbMhyiK9o,1040
7
+ must_cdk-0.0.7.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
8
+ must_cdk-0.0.7.dist-info/top_level.txt,sha256=xm4unKYFXnjqQyemg16SUHfrXIb5XMbfUC_3xNsFyjc,9
9
+ must_cdk-0.0.7.dist-info/RECORD,,
Binary file
@@ -1,9 +0,0 @@
1
- must_cdk/__init__.py,sha256=VE6ncdqF8pCEL96-zrUp7s7aHa-wRMyLxkXiPe6h3-U,15210
2
- must_cdk/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
- must_cdk/_jsii/__init__.py,sha256=NmjR4_YA1eUx4Tj574vqTWCFJGSy3VPEJ3aTNsKZszk,1427
4
- must_cdk/_jsii/must-cdk@0.0.5.jsii.tgz,sha256=FzP5bUc80MlCTy2ML1ZMIPVZehFTLy2wd6AKetmyLGg,467792
5
- must_cdk-0.0.5.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
6
- must_cdk-0.0.5.dist-info/METADATA,sha256=4-WJg6IJnjiXtFujk1oOn79zdop_A2QIFgePNzU07vM,1040
7
- must_cdk-0.0.5.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
8
- must_cdk-0.0.5.dist-info/top_level.txt,sha256=xm4unKYFXnjqQyemg16SUHfrXIb5XMbfUC_3xNsFyjc,9
9
- must_cdk-0.0.5.dist-info/RECORD,,