must-cdk 0.0.7__py3-none-any.whl → 0.0.9__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 +271 -127
- must_cdk/_jsii/__init__.py +1 -1
- must_cdk/_jsii/must-cdk@0.0.9.jsii.tgz +0 -0
- {must_cdk-0.0.7.dist-info → must_cdk-0.0.9.dist-info}/METADATA +1 -1
- must_cdk-0.0.9.dist-info/RECORD +9 -0
- must_cdk/_jsii/must-cdk@0.0.7.jsii.tgz +0 -0
- must_cdk-0.0.7.dist-info/RECORD +0 -9
- {must_cdk-0.0.7.dist-info → must_cdk-0.0.9.dist-info}/LICENSE +0 -0
- {must_cdk-0.0.7.dist-info → must_cdk-0.0.9.dist-info}/WHEEL +0 -0
- {must_cdk-0.0.7.dist-info → must_cdk-0.0.9.dist-info}/top_level.txt +0 -0
must_cdk/__init__.py
CHANGED
@@ -275,9 +275,8 @@ class ApiGatewayToLambdaProps:
|
|
275
275
|
name_mapping={
|
276
276
|
"max_capacity": "maxCapacity",
|
277
277
|
"min_capacity": "minCapacity",
|
278
|
-
"
|
279
|
-
"
|
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
|
-
|
290
|
-
|
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
|
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
|
298
|
-
:param
|
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
|
306
|
-
check_type(argname="argument
|
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
|
314
|
-
self._values["
|
315
|
-
if
|
316
|
-
self._values["
|
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
|
334
|
-
|
335
|
-
|
336
|
-
|
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
|
341
|
-
'''
|
342
|
-
result = self._values.get("
|
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
|
347
|
-
'''
|
348
|
-
result = self._values.get("
|
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 "
|
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
|
-
|
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
|
-
|
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
|
388
|
-
:param
|
389
|
-
:param
|
390
|
-
:param
|
391
|
-
:param
|
392
|
-
:param
|
393
|
-
:param vpc:
|
394
|
-
:param auto_scaling:
|
395
|
-
:param
|
396
|
-
:param
|
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
|
-
|
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
|
-
|
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="
|
431
|
-
def
|
432
|
-
return typing.cast(
|
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
|
-
"
|
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
|
-
"
|
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
|
-
|
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
|
-
|
574
|
+
memory_limit: typing.Optional[jsii.Number] = None,
|
575
|
+
task_cpu: typing.Optional[jsii.Number] = None,
|
472
576
|
) -> None:
|
473
|
-
'''
|
474
|
-
|
475
|
-
:param cluster:
|
476
|
-
:param
|
477
|
-
:param environment:
|
478
|
-
:param
|
479
|
-
:param
|
480
|
-
:param
|
481
|
-
:param
|
482
|
-
:param
|
483
|
-
:param
|
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
|
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
|
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
|
-
"
|
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
|
515
|
-
self._values["
|
516
|
-
|
517
|
-
|
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
|
531
|
-
|
532
|
-
|
533
|
-
|
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
|
571
|
-
result = self._values.get("
|
572
|
-
return typing.cast(typing.Optional[
|
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
|
-
|
855
|
-
|
856
|
-
|
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
|
-
|
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
|
-
|
875
|
-
|
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
|
-
|
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
|
-
|
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
|
must_cdk/_jsii/__init__.py
CHANGED
Binary file
|
@@ -0,0 +1,9 @@
|
|
1
|
+
must_cdk/__init__.py,sha256=TAUyyyvgdJTiUBeoFcBz2eaKSIbVLCHBbfZnOrR80fA,53859
|
2
|
+
must_cdk/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
3
|
+
must_cdk/_jsii/__init__.py,sha256=IHz_nKI_sBm69hGz72z70pKB6WoPfg7GhcNc9lQbsbg,1427
|
4
|
+
must_cdk/_jsii/must-cdk@0.0.9.jsii.tgz,sha256=RQC5RbqiOfUAEJWPCN-jOd-4EI0_iklSZNu6ZjmKIaQ,270774
|
5
|
+
must_cdk-0.0.9.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
6
|
+
must_cdk-0.0.9.dist-info/METADATA,sha256=F-dH03rumvr4EwgJ7Zclh7RsCWWPXDSGCVNRJt-y1OY,1040
|
7
|
+
must_cdk-0.0.9.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
8
|
+
must_cdk-0.0.9.dist-info/top_level.txt,sha256=xm4unKYFXnjqQyemg16SUHfrXIb5XMbfUC_3xNsFyjc,9
|
9
|
+
must_cdk-0.0.9.dist-info/RECORD,,
|
Binary file
|
must_cdk-0.0.7.dist-info/RECORD
DELETED
@@ -1,9 +0,0 @@
|
|
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,,
|
File without changes
|
File without changes
|
File without changes
|