must-cdk 0.0.7__tar.gz → 0.0.9__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.7
3
+ Version: 0.0.9
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.7",
8
+ "version": "0.0.9",
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.7.jsii.tgz"
29
+ "must-cdk@0.0.9.jsii.tgz"
30
30
  ],
31
31
  "must_cdk": [
32
32
  "py.typed"
@@ -275,9 +275,8 @@ class ApiGatewayToLambdaProps:
275
275
  name_mapping={
276
276
  "max_capacity": "maxCapacity",
277
277
  "min_capacity": "minCapacity",
278
- "target_cpu_utilization_percent": "targetCpuUtilizationPercent",
279
- "scale_in_cooldown_sec": "scaleInCooldownSec",
280
- "scale_out_cooldown_sec": "scaleOutCooldownSec",
278
+ "cpu_scale": "cpuScale",
279
+ "memory_scale": "memoryScale",
281
280
  },
282
281
  )
283
282
  class AutoScalingProps:
@@ -286,66 +285,168 @@ class AutoScalingProps:
286
285
  *,
287
286
  max_capacity: jsii.Number,
288
287
  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,
288
+ cpu_scale: typing.Optional[typing.Union[_aws_cdk_aws_ecs_ceddda9d.CpuUtilizationScalingProps, typing.Dict[builtins.str, typing.Any]]] = None,
289
+ memory_scale: typing.Optional[typing.Union[_aws_cdk_aws_ecs_ceddda9d.MemoryUtilizationScalingProps, typing.Dict[builtins.str, typing.Any]]] = None,
292
290
  ) -> None:
293
- '''Configuration for ECS service autoscaling.
291
+ '''Configuration for ECS service auto-scaling.
294
292
 
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.
293
+ :param max_capacity: Maximum number of tasks to run.
294
+ :param min_capacity: Minimum number of tasks to run.
295
+ :param cpu_scale: Scale task based on CPU utilization.
296
+ :param memory_scale: Scale task based on memory utilization.
300
297
  '''
298
+ if isinstance(cpu_scale, dict):
299
+ cpu_scale = _aws_cdk_aws_ecs_ceddda9d.CpuUtilizationScalingProps(**cpu_scale)
300
+ if isinstance(memory_scale, dict):
301
+ memory_scale = _aws_cdk_aws_ecs_ceddda9d.MemoryUtilizationScalingProps(**memory_scale)
301
302
  if __debug__:
302
303
  type_hints = typing.get_type_hints(_typecheckingstub__d0ea30b15daf73de785b4991457443ee0ca220224fbd08155a17d86c67413930)
303
304
  check_type(argname="argument max_capacity", value=max_capacity, expected_type=type_hints["max_capacity"])
304
305
  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"])
306
+ check_type(argname="argument cpu_scale", value=cpu_scale, expected_type=type_hints["cpu_scale"])
307
+ check_type(argname="argument memory_scale", value=memory_scale, expected_type=type_hints["memory_scale"])
308
308
  self._values: typing.Dict[builtins.str, typing.Any] = {
309
309
  "max_capacity": max_capacity,
310
310
  "min_capacity": min_capacity,
311
- "target_cpu_utilization_percent": target_cpu_utilization_percent,
312
311
  }
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
312
+ if cpu_scale is not None:
313
+ self._values["cpu_scale"] = cpu_scale
314
+ if memory_scale is not None:
315
+ self._values["memory_scale"] = memory_scale
317
316
 
318
317
  @builtins.property
319
318
  def max_capacity(self) -> jsii.Number:
320
- '''Maximum number of tasks.'''
319
+ '''Maximum number of tasks to run.'''
321
320
  result = self._values.get("max_capacity")
322
321
  assert result is not None, "Required property 'max_capacity' is missing"
323
322
  return typing.cast(jsii.Number, result)
324
323
 
325
324
  @builtins.property
326
325
  def min_capacity(self) -> jsii.Number:
327
- '''Minimum number of tasks.'''
326
+ '''Minimum number of tasks to run.'''
328
327
  result = self._values.get("min_capacity")
329
328
  assert result is not None, "Required property 'min_capacity' is missing"
330
329
  return typing.cast(jsii.Number, result)
331
330
 
332
331
  @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"
332
+ def cpu_scale(
333
+ self,
334
+ ) -> typing.Optional[_aws_cdk_aws_ecs_ceddda9d.CpuUtilizationScalingProps]:
335
+ '''Scale task based on CPU utilization.'''
336
+ result = self._values.get("cpu_scale")
337
+ return typing.cast(typing.Optional[_aws_cdk_aws_ecs_ceddda9d.CpuUtilizationScalingProps], result)
338
+
339
+ @builtins.property
340
+ def memory_scale(
341
+ self,
342
+ ) -> typing.Optional[_aws_cdk_aws_ecs_ceddda9d.MemoryUtilizationScalingProps]:
343
+ '''Scale task based on memory utilization.'''
344
+ result = self._values.get("memory_scale")
345
+ return typing.cast(typing.Optional[_aws_cdk_aws_ecs_ceddda9d.MemoryUtilizationScalingProps], result)
346
+
347
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
348
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
349
+
350
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
351
+ return not (rhs == self)
352
+
353
+ def __repr__(self) -> str:
354
+ return "AutoScalingProps(%s)" % ", ".join(
355
+ k + "=" + repr(v) for k, v in self._values.items()
356
+ )
357
+
358
+
359
+ @jsii.data_type(
360
+ jsii_type="must-cdk.ContainerProps",
361
+ jsii_struct_bases=[],
362
+ name_mapping={
363
+ "alb_listener_container_port": "albListenerContainerPort",
364
+ "container_port": "containerPort",
365
+ "image": "image",
366
+ "health_check": "healthCheck",
367
+ "memory_limit": "memoryLimit",
368
+ "memory_reservation": "memoryReservation",
369
+ },
370
+ )
371
+ class ContainerProps:
372
+ def __init__(
373
+ self,
374
+ *,
375
+ alb_listener_container_port: jsii.Number,
376
+ container_port: jsii.Number,
377
+ image: _aws_cdk_aws_ecs_ceddda9d.ContainerImage,
378
+ health_check: typing.Optional[typing.Union[_aws_cdk_aws_ecs_ceddda9d.HealthCheck, typing.Dict[builtins.str, typing.Any]]] = None,
379
+ memory_limit: typing.Optional[jsii.Number] = None,
380
+ memory_reservation: typing.Optional[jsii.Number] = None,
381
+ ) -> None:
382
+ '''Configuration for the ECS Fargate task definition and container.
383
+
384
+ :param alb_listener_container_port: The port number the container listens on.
385
+ :param container_port: The port number the container listens on.
386
+ :param image: Container image to deploy.
387
+ :param health_check: Optional container health check configuration.
388
+ :param memory_limit: Hard memory limit in MiB for the task (default: 2048).
389
+ :param memory_reservation: Soft memory reservation in MiB for the container (default: 1024).
390
+ '''
391
+ if isinstance(health_check, dict):
392
+ health_check = _aws_cdk_aws_ecs_ceddda9d.HealthCheck(**health_check)
393
+ if __debug__:
394
+ type_hints = typing.get_type_hints(_typecheckingstub__54ea2679bab87dfe8eb538ebc455f8d93200c1beb37ad6e093fa52678f8ac1fc)
395
+ check_type(argname="argument alb_listener_container_port", value=alb_listener_container_port, expected_type=type_hints["alb_listener_container_port"])
396
+ check_type(argname="argument container_port", value=container_port, expected_type=type_hints["container_port"])
397
+ check_type(argname="argument image", value=image, expected_type=type_hints["image"])
398
+ check_type(argname="argument health_check", value=health_check, expected_type=type_hints["health_check"])
399
+ check_type(argname="argument memory_limit", value=memory_limit, expected_type=type_hints["memory_limit"])
400
+ check_type(argname="argument memory_reservation", value=memory_reservation, expected_type=type_hints["memory_reservation"])
401
+ self._values: typing.Dict[builtins.str, typing.Any] = {
402
+ "alb_listener_container_port": alb_listener_container_port,
403
+ "container_port": container_port,
404
+ "image": image,
405
+ }
406
+ if health_check is not None:
407
+ self._values["health_check"] = health_check
408
+ if memory_limit is not None:
409
+ self._values["memory_limit"] = memory_limit
410
+ if memory_reservation is not None:
411
+ self._values["memory_reservation"] = memory_reservation
412
+
413
+ @builtins.property
414
+ def alb_listener_container_port(self) -> jsii.Number:
415
+ '''The port number the container listens on.'''
416
+ result = self._values.get("alb_listener_container_port")
417
+ assert result is not None, "Required property 'alb_listener_container_port' is missing"
418
+ return typing.cast(jsii.Number, result)
419
+
420
+ @builtins.property
421
+ def container_port(self) -> jsii.Number:
422
+ '''The port number the container listens on.'''
423
+ result = self._values.get("container_port")
424
+ assert result is not None, "Required property 'container_port' is missing"
337
425
  return typing.cast(jsii.Number, result)
338
426
 
339
427
  @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")
428
+ def image(self) -> _aws_cdk_aws_ecs_ceddda9d.ContainerImage:
429
+ '''Container image to deploy.'''
430
+ result = self._values.get("image")
431
+ assert result is not None, "Required property 'image' is missing"
432
+ return typing.cast(_aws_cdk_aws_ecs_ceddda9d.ContainerImage, result)
433
+
434
+ @builtins.property
435
+ def health_check(self) -> typing.Optional[_aws_cdk_aws_ecs_ceddda9d.HealthCheck]:
436
+ '''Optional container health check configuration.'''
437
+ result = self._values.get("health_check")
438
+ return typing.cast(typing.Optional[_aws_cdk_aws_ecs_ceddda9d.HealthCheck], result)
439
+
440
+ @builtins.property
441
+ def memory_limit(self) -> typing.Optional[jsii.Number]:
442
+ '''Hard memory limit in MiB for the task (default: 2048).'''
443
+ result = self._values.get("memory_limit")
343
444
  return typing.cast(typing.Optional[jsii.Number], result)
344
445
 
345
446
  @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")
447
+ def memory_reservation(self) -> typing.Optional[jsii.Number]:
448
+ '''Soft memory reservation in MiB for the container (default: 1024).'''
449
+ result = self._values.get("memory_reservation")
349
450
  return typing.cast(typing.Optional[jsii.Number], result)
350
451
 
351
452
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
@@ -355,7 +456,7 @@ class AutoScalingProps:
355
456
  return not (rhs == self)
356
457
 
357
458
  def __repr__(self) -> str:
358
- return "AutoScalingProps(%s)" % ", ".join(
459
+ return "ContainerProps(%s)" % ", ".join(
359
460
  k + "=" + repr(v) for k, v in self._values.items()
360
461
  )
361
462
 
@@ -370,46 +471,52 @@ class EcsCodeDeploy(
370
471
  scope: _constructs_77d1e7e8.Construct,
371
472
  id: builtins.str,
372
473
  *,
373
- certificate_arn: builtins.str,
374
474
  cluster: _aws_cdk_aws_ecs_ceddda9d.ICluster,
375
- container_port: jsii.Number,
475
+ containers: typing.Sequence[typing.Union[ContainerProps, typing.Dict[builtins.str, typing.Any]]],
376
476
  environment: builtins.str,
377
- image_uri: builtins.str,
378
477
  service_name: builtins.str,
478
+ task_exec_role: _aws_cdk_aws_iam_ceddda9d.IRole,
479
+ task_role: _aws_cdk_aws_iam_ceddda9d.IRole,
379
480
  vpc: _aws_cdk_aws_ec2_ceddda9d.IVpc,
380
481
  auto_scaling: typing.Optional[typing.Union[AutoScalingProps, typing.Dict[builtins.str, typing.Any]]] = None,
482
+ certificates: typing.Optional[typing.Sequence[_aws_cdk_aws_certificatemanager_ceddda9d.ICertificate]] = None,
381
483
  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,
484
+ memory_limit: typing.Optional[jsii.Number] = None,
485
+ task_cpu: typing.Optional[jsii.Number] = None,
383
486
  ) -> None:
384
487
  '''
385
488
  :param scope: -
386
489
  :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:
490
+ :param cluster: ECS Cluster where the service will run.
491
+ :param containers: Configuration related to the task definition and container.
492
+ :param environment: Environment name (e.g., dev, prod) for tagging and naming.
493
+ :param service_name: Base name used for resources like log groups, roles, services, etc.
494
+ :param task_exec_role: Task execution role for the ECS task.
495
+ :param task_role: Task role for the ECS task.
496
+ :param vpc: VPC in which to deploy ECS and ALB resources.
497
+ :param auto_scaling: Optional auto-scaling configuration.
498
+ :param certificates: Optional ACM certificates for HTTPS termination.
499
+ :param enable_public_load_balancer: Whether the load balancer should be internet-facing (default: false).
500
+ :param memory_limit:
501
+ :param task_cpu: CPU units for the task (default: 1024).
397
502
  '''
398
503
  if __debug__:
399
504
  type_hints = typing.get_type_hints(_typecheckingstub__19ac4f77d3bba1391929b87d2d23b70fe61e21aa6809f43ed4283d6ecf350909)
400
505
  check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
401
506
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
402
507
  props = EcsCodeDeployProps(
403
- certificate_arn=certificate_arn,
404
508
  cluster=cluster,
405
- container_port=container_port,
509
+ containers=containers,
406
510
  environment=environment,
407
- image_uri=image_uri,
408
511
  service_name=service_name,
512
+ task_exec_role=task_exec_role,
513
+ task_role=task_role,
409
514
  vpc=vpc,
410
515
  auto_scaling=auto_scaling,
516
+ certificates=certificates,
411
517
  enable_public_load_balancer=enable_public_load_balancer,
412
- health_check=health_check,
518
+ memory_limit=memory_limit,
519
+ task_cpu=task_cpu,
413
520
  )
414
521
 
415
522
  jsii.create(self.__class__, self, [scope, id, props])
@@ -427,149 +534,176 @@ class EcsCodeDeploy(
427
534
  return typing.cast(_aws_cdk_aws_ecs_ceddda9d.FargateService, jsii.get(self, "service"))
428
535
 
429
536
  @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]
537
+ @jsii.member(jsii_name="taskDef")
538
+ def task_def(self) -> _aws_cdk_aws_ecs_ceddda9d.TaskDefinition:
539
+ return typing.cast(_aws_cdk_aws_ecs_ceddda9d.TaskDefinition, jsii.get(self, "taskDef"))
440
540
 
441
541
 
442
542
  @jsii.data_type(
443
543
  jsii_type="must-cdk.EcsCodeDeployProps",
444
544
  jsii_struct_bases=[],
445
545
  name_mapping={
446
- "certificate_arn": "certificateArn",
447
546
  "cluster": "cluster",
448
- "container_port": "containerPort",
547
+ "containers": "containers",
449
548
  "environment": "environment",
450
- "image_uri": "imageUri",
451
549
  "service_name": "serviceName",
550
+ "task_exec_role": "taskExecRole",
551
+ "task_role": "taskRole",
452
552
  "vpc": "vpc",
453
553
  "auto_scaling": "autoScaling",
554
+ "certificates": "certificates",
454
555
  "enable_public_load_balancer": "enablePublicLoadBalancer",
455
- "health_check": "healthCheck",
556
+ "memory_limit": "memoryLimit",
557
+ "task_cpu": "taskCPU",
456
558
  },
457
559
  )
458
560
  class EcsCodeDeployProps:
459
561
  def __init__(
460
562
  self,
461
563
  *,
462
- certificate_arn: builtins.str,
463
564
  cluster: _aws_cdk_aws_ecs_ceddda9d.ICluster,
464
- container_port: jsii.Number,
565
+ containers: typing.Sequence[typing.Union[ContainerProps, typing.Dict[builtins.str, typing.Any]]],
465
566
  environment: builtins.str,
466
- image_uri: builtins.str,
467
567
  service_name: builtins.str,
568
+ task_exec_role: _aws_cdk_aws_iam_ceddda9d.IRole,
569
+ task_role: _aws_cdk_aws_iam_ceddda9d.IRole,
468
570
  vpc: _aws_cdk_aws_ec2_ceddda9d.IVpc,
469
571
  auto_scaling: typing.Optional[typing.Union[AutoScalingProps, typing.Dict[builtins.str, typing.Any]]] = None,
572
+ certificates: typing.Optional[typing.Sequence[_aws_cdk_aws_certificatemanager_ceddda9d.ICertificate]] = None,
470
573
  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,
574
+ memory_limit: typing.Optional[jsii.Number] = None,
575
+ task_cpu: typing.Optional[jsii.Number] = None,
472
576
  ) -> 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:
577
+ '''Properties for the EcsCodeDeploy construct.
578
+
579
+ :param cluster: ECS Cluster where the service will run.
580
+ :param containers: Configuration related to the task definition and container.
581
+ :param environment: Environment name (e.g., dev, prod) for tagging and naming.
582
+ :param service_name: Base name used for resources like log groups, roles, services, etc.
583
+ :param task_exec_role: Task execution role for the ECS task.
584
+ :param task_role: Task role for the ECS task.
585
+ :param vpc: VPC in which to deploy ECS and ALB resources.
586
+ :param auto_scaling: Optional auto-scaling configuration.
587
+ :param certificates: Optional ACM certificates for HTTPS termination.
588
+ :param enable_public_load_balancer: Whether the load balancer should be internet-facing (default: false).
589
+ :param memory_limit:
590
+ :param task_cpu: CPU units for the task (default: 1024).
484
591
  '''
485
592
  if isinstance(auto_scaling, dict):
486
593
  auto_scaling = AutoScalingProps(**auto_scaling)
487
- if isinstance(health_check, dict):
488
- health_check = _aws_cdk_aws_ecs_ceddda9d.HealthCheck(**health_check)
489
594
  if __debug__:
490
595
  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
596
  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"])
597
+ check_type(argname="argument containers", value=containers, expected_type=type_hints["containers"])
494
598
  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
599
  check_type(argname="argument service_name", value=service_name, expected_type=type_hints["service_name"])
600
+ check_type(argname="argument task_exec_role", value=task_exec_role, expected_type=type_hints["task_exec_role"])
601
+ check_type(argname="argument task_role", value=task_role, expected_type=type_hints["task_role"])
497
602
  check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
498
603
  check_type(argname="argument auto_scaling", value=auto_scaling, expected_type=type_hints["auto_scaling"])
604
+ check_type(argname="argument certificates", value=certificates, expected_type=type_hints["certificates"])
499
605
  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"])
606
+ check_type(argname="argument memory_limit", value=memory_limit, expected_type=type_hints["memory_limit"])
607
+ check_type(argname="argument task_cpu", value=task_cpu, expected_type=type_hints["task_cpu"])
501
608
  self._values: typing.Dict[builtins.str, typing.Any] = {
502
- "certificate_arn": certificate_arn,
503
609
  "cluster": cluster,
504
- "container_port": container_port,
610
+ "containers": containers,
505
611
  "environment": environment,
506
- "image_uri": image_uri,
507
612
  "service_name": service_name,
613
+ "task_exec_role": task_exec_role,
614
+ "task_role": task_role,
508
615
  "vpc": vpc,
509
616
  }
510
617
  if auto_scaling is not None:
511
618
  self._values["auto_scaling"] = auto_scaling
619
+ if certificates is not None:
620
+ self._values["certificates"] = certificates
512
621
  if enable_public_load_balancer is not None:
513
622
  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)
623
+ if memory_limit is not None:
624
+ self._values["memory_limit"] = memory_limit
625
+ if task_cpu is not None:
626
+ self._values["task_cpu"] = task_cpu
522
627
 
523
628
  @builtins.property
524
629
  def cluster(self) -> _aws_cdk_aws_ecs_ceddda9d.ICluster:
630
+ '''ECS Cluster where the service will run.'''
525
631
  result = self._values.get("cluster")
526
632
  assert result is not None, "Required property 'cluster' is missing"
527
633
  return typing.cast(_aws_cdk_aws_ecs_ceddda9d.ICluster, result)
528
634
 
529
635
  @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)
636
+ def containers(self) -> typing.List[ContainerProps]:
637
+ '''Configuration related to the task definition and container.'''
638
+ result = self._values.get("containers")
639
+ assert result is not None, "Required property 'containers' is missing"
640
+ return typing.cast(typing.List[ContainerProps], result)
534
641
 
535
642
  @builtins.property
536
643
  def environment(self) -> builtins.str:
644
+ '''Environment name (e.g., dev, prod) for tagging and naming.'''
537
645
  result = self._values.get("environment")
538
646
  assert result is not None, "Required property 'environment' is missing"
539
647
  return typing.cast(builtins.str, result)
540
648
 
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
649
  @builtins.property
548
650
  def service_name(self) -> builtins.str:
651
+ '''Base name used for resources like log groups, roles, services, etc.'''
549
652
  result = self._values.get("service_name")
550
653
  assert result is not None, "Required property 'service_name' is missing"
551
654
  return typing.cast(builtins.str, result)
552
655
 
656
+ @builtins.property
657
+ def task_exec_role(self) -> _aws_cdk_aws_iam_ceddda9d.IRole:
658
+ '''Task execution role for the ECS task.'''
659
+ result = self._values.get("task_exec_role")
660
+ assert result is not None, "Required property 'task_exec_role' is missing"
661
+ return typing.cast(_aws_cdk_aws_iam_ceddda9d.IRole, result)
662
+
663
+ @builtins.property
664
+ def task_role(self) -> _aws_cdk_aws_iam_ceddda9d.IRole:
665
+ '''Task role for the ECS task.'''
666
+ result = self._values.get("task_role")
667
+ assert result is not None, "Required property 'task_role' is missing"
668
+ return typing.cast(_aws_cdk_aws_iam_ceddda9d.IRole, result)
669
+
553
670
  @builtins.property
554
671
  def vpc(self) -> _aws_cdk_aws_ec2_ceddda9d.IVpc:
672
+ '''VPC in which to deploy ECS and ALB resources.'''
555
673
  result = self._values.get("vpc")
556
674
  assert result is not None, "Required property 'vpc' is missing"
557
675
  return typing.cast(_aws_cdk_aws_ec2_ceddda9d.IVpc, result)
558
676
 
559
677
  @builtins.property
560
678
  def auto_scaling(self) -> typing.Optional[AutoScalingProps]:
679
+ '''Optional auto-scaling configuration.'''
561
680
  result = self._values.get("auto_scaling")
562
681
  return typing.cast(typing.Optional[AutoScalingProps], result)
563
682
 
683
+ @builtins.property
684
+ def certificates(
685
+ self,
686
+ ) -> typing.Optional[typing.List[_aws_cdk_aws_certificatemanager_ceddda9d.ICertificate]]:
687
+ '''Optional ACM certificates for HTTPS termination.'''
688
+ result = self._values.get("certificates")
689
+ return typing.cast(typing.Optional[typing.List[_aws_cdk_aws_certificatemanager_ceddda9d.ICertificate]], result)
690
+
564
691
  @builtins.property
565
692
  def enable_public_load_balancer(self) -> typing.Optional[builtins.bool]:
693
+ '''Whether the load balancer should be internet-facing (default: false).'''
566
694
  result = self._values.get("enable_public_load_balancer")
567
695
  return typing.cast(typing.Optional[builtins.bool], result)
568
696
 
569
697
  @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)
698
+ def memory_limit(self) -> typing.Optional[jsii.Number]:
699
+ result = self._values.get("memory_limit")
700
+ return typing.cast(typing.Optional[jsii.Number], result)
701
+
702
+ @builtins.property
703
+ def task_cpu(self) -> typing.Optional[jsii.Number]:
704
+ '''CPU units for the task (default: 1024).'''
705
+ result = self._values.get("task_cpu")
706
+ return typing.cast(typing.Optional[jsii.Number], result)
573
707
 
574
708
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
575
709
  return isinstance(rhs, self.__class__) and rhs._values == self._values
@@ -811,6 +945,7 @@ __all__ = [
811
945
  "ApiGatewayToLambdaCustomDomain",
812
946
  "ApiGatewayToLambdaProps",
813
947
  "AutoScalingProps",
948
+ "ContainerProps",
814
949
  "EcsCodeDeploy",
815
950
  "EcsCodeDeployProps",
816
951
  "WebsocketApiGatewayToLambdaCustomDomain",
@@ -851,9 +986,20 @@ def _typecheckingstub__d0ea30b15daf73de785b4991457443ee0ca220224fbd08155a17d86c6
851
986
  *,
852
987
  max_capacity: jsii.Number,
853
988
  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,
989
+ cpu_scale: typing.Optional[typing.Union[_aws_cdk_aws_ecs_ceddda9d.CpuUtilizationScalingProps, typing.Dict[builtins.str, typing.Any]]] = None,
990
+ memory_scale: typing.Optional[typing.Union[_aws_cdk_aws_ecs_ceddda9d.MemoryUtilizationScalingProps, typing.Dict[builtins.str, typing.Any]]] = None,
991
+ ) -> None:
992
+ """Type checking stubs"""
993
+ pass
994
+
995
+ def _typecheckingstub__54ea2679bab87dfe8eb538ebc455f8d93200c1beb37ad6e093fa52678f8ac1fc(
996
+ *,
997
+ alb_listener_container_port: jsii.Number,
998
+ container_port: jsii.Number,
999
+ image: _aws_cdk_aws_ecs_ceddda9d.ContainerImage,
1000
+ health_check: typing.Optional[typing.Union[_aws_cdk_aws_ecs_ceddda9d.HealthCheck, typing.Dict[builtins.str, typing.Any]]] = None,
1001
+ memory_limit: typing.Optional[jsii.Number] = None,
1002
+ memory_reservation: typing.Optional[jsii.Number] = None,
857
1003
  ) -> None:
858
1004
  """Type checking stubs"""
859
1005
  pass
@@ -862,38 +1008,36 @@ def _typecheckingstub__19ac4f77d3bba1391929b87d2d23b70fe61e21aa6809f43ed4283d6ec
862
1008
  scope: _constructs_77d1e7e8.Construct,
863
1009
  id: builtins.str,
864
1010
  *,
865
- certificate_arn: builtins.str,
866
1011
  cluster: _aws_cdk_aws_ecs_ceddda9d.ICluster,
867
- container_port: jsii.Number,
1012
+ containers: typing.Sequence[typing.Union[ContainerProps, typing.Dict[builtins.str, typing.Any]]],
868
1013
  environment: builtins.str,
869
- image_uri: builtins.str,
870
1014
  service_name: builtins.str,
1015
+ task_exec_role: _aws_cdk_aws_iam_ceddda9d.IRole,
1016
+ task_role: _aws_cdk_aws_iam_ceddda9d.IRole,
871
1017
  vpc: _aws_cdk_aws_ec2_ceddda9d.IVpc,
872
1018
  auto_scaling: typing.Optional[typing.Union[AutoScalingProps, typing.Dict[builtins.str, typing.Any]]] = None,
1019
+ certificates: typing.Optional[typing.Sequence[_aws_cdk_aws_certificatemanager_ceddda9d.ICertificate]] = None,
873
1020
  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,
1021
+ memory_limit: typing.Optional[jsii.Number] = None,
1022
+ task_cpu: typing.Optional[jsii.Number] = None,
881
1023
  ) -> None:
882
1024
  """Type checking stubs"""
883
1025
  pass
884
1026
 
885
1027
  def _typecheckingstub__0e1edfc306738ea99e0bd03a55876d7f75a063970dd3103fc1bbb766dff014b1(
886
1028
  *,
887
- certificate_arn: builtins.str,
888
1029
  cluster: _aws_cdk_aws_ecs_ceddda9d.ICluster,
889
- container_port: jsii.Number,
1030
+ containers: typing.Sequence[typing.Union[ContainerProps, typing.Dict[builtins.str, typing.Any]]],
890
1031
  environment: builtins.str,
891
- image_uri: builtins.str,
892
1032
  service_name: builtins.str,
1033
+ task_exec_role: _aws_cdk_aws_iam_ceddda9d.IRole,
1034
+ task_role: _aws_cdk_aws_iam_ceddda9d.IRole,
893
1035
  vpc: _aws_cdk_aws_ec2_ceddda9d.IVpc,
894
1036
  auto_scaling: typing.Optional[typing.Union[AutoScalingProps, typing.Dict[builtins.str, typing.Any]]] = None,
1037
+ certificates: typing.Optional[typing.Sequence[_aws_cdk_aws_certificatemanager_ceddda9d.ICertificate]] = None,
895
1038
  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,
1039
+ memory_limit: typing.Optional[jsii.Number] = None,
1040
+ task_cpu: typing.Optional[jsii.Number] = None,
897
1041
  ) -> None:
898
1042
  """Type checking stubs"""
899
1043
  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.7", __name__[0:-6], "must-cdk@0.0.7.jsii.tgz"
35
+ "must-cdk", "0.0.9", __name__[0:-6], "must-cdk@0.0.9.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.7
3
+ Version: 0.0.9
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.7.jsii.tgz
14
+ src/must_cdk/_jsii/must-cdk@0.0.9.jsii.tgz
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes