aws-cdk-lib 2.208.0__py3-none-any.whl → 2.209.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of aws-cdk-lib might be problematic. Click here for more details.
- aws_cdk/__init__.py +31 -3
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.208.0.jsii.tgz → aws-cdk-lib@2.209.0.jsii.tgz} +0 -0
- aws_cdk/aws_bedrock/__init__.py +36 -30
- aws_cdk/aws_ec2/__init__.py +5 -5
- aws_cdk/aws_ecs/__init__.py +1436 -49
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +27 -15
- aws_cdk/aws_lambda/__init__.py +76 -67
- aws_cdk/aws_rds/__init__.py +6 -0
- aws_cdk/aws_route53/__init__.py +97 -41
- aws_cdk/cloud_assembly_schema/__init__.py +28 -2
- aws_cdk/custom_resources/__init__.py +1 -1
- {aws_cdk_lib-2.208.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/METADATA +2 -2
- {aws_cdk_lib-2.208.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/RECORD +18 -18
- {aws_cdk_lib-2.208.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.208.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.208.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.208.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/top_level.txt +0 -0
aws_cdk/aws_ecs/__init__.py
CHANGED
|
@@ -2118,6 +2118,41 @@ Amazon ECS supports native blue/green deployments that allow you to deploy new v
|
|
|
2118
2118
|
|
|
2119
2119
|
[Amazon ECS blue/green deployments](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-blue-green.html)
|
|
2120
2120
|
|
|
2121
|
+
### Using Fargate L2 constructs for Blue/Green Feature
|
|
2122
|
+
|
|
2123
|
+
```python
|
|
2124
|
+
import aws_cdk.aws_lambda as lambda_
|
|
2125
|
+
|
|
2126
|
+
# cluster: ecs.Cluster
|
|
2127
|
+
# task_definition: ecs.TaskDefinition
|
|
2128
|
+
# lambda_hook: lambda.Function
|
|
2129
|
+
# blue_target_group: elbv2.ApplicationTargetGroup
|
|
2130
|
+
# green_target_group: elbv2.ApplicationTargetGroup
|
|
2131
|
+
# prod_listener_rule: elbv2.ApplicationListenerRule
|
|
2132
|
+
|
|
2133
|
+
|
|
2134
|
+
service = ecs.FargateService(self, "Service",
|
|
2135
|
+
cluster=cluster,
|
|
2136
|
+
task_definition=task_definition,
|
|
2137
|
+
deployment_strategy=ecs.DeploymentStrategy.BLUE_GREEN
|
|
2138
|
+
)
|
|
2139
|
+
|
|
2140
|
+
service.add_lifecycle_hook(ecs.DeploymentLifecycleLambdaTarget(lambda_hook, "PreScaleHook",
|
|
2141
|
+
lifecycle_stages=[ecs.DeploymentLifecycleStage.PRE_SCALE_UP]
|
|
2142
|
+
))
|
|
2143
|
+
|
|
2144
|
+
target = service.load_balancer_target(ecs.LoadBalancerTargetOptions(
|
|
2145
|
+
container_name="nginx",
|
|
2146
|
+
container_port=80,
|
|
2147
|
+
protocol=ecs.Protocol.TCP
|
|
2148
|
+
), ecs.AlternateTarget("AlternateTarget",
|
|
2149
|
+
alternate_target_group=green_target_group,
|
|
2150
|
+
production_listener=ecs.ListenerRuleConfiguration.application_listener_rule(prod_listener_rule)
|
|
2151
|
+
))
|
|
2152
|
+
|
|
2153
|
+
target.attach_to_application_target_group(blue_target_group)
|
|
2154
|
+
```
|
|
2155
|
+
|
|
2121
2156
|
### Using Escape Hatches for Blue/Green Features
|
|
2122
2157
|
|
|
2123
2158
|
The new blue/green deployment features are added to CloudFormation but not yet available in the CDK L2 constructs, you can use escape hatches to access them through the L1 (CfnService) construct.
|
|
@@ -2338,6 +2373,7 @@ from ..aws_elasticloadbalancingv2 import (
|
|
|
2338
2373
|
AddApplicationTargetsProps as _AddApplicationTargetsProps_76c7d190,
|
|
2339
2374
|
AddNetworkTargetsProps as _AddNetworkTargetsProps_ce6bdf17,
|
|
2340
2375
|
ApplicationListener as _ApplicationListener_e0620bf5,
|
|
2376
|
+
ApplicationListenerRule as _ApplicationListenerRule_f93ff606,
|
|
2341
2377
|
ApplicationProtocol as _ApplicationProtocol_aa5e9f29,
|
|
2342
2378
|
ApplicationProtocolVersion as _ApplicationProtocolVersion_dddfe47b,
|
|
2343
2379
|
ApplicationTargetGroup as _ApplicationTargetGroup_906fe365,
|
|
@@ -2346,6 +2382,7 @@ from ..aws_elasticloadbalancingv2 import (
|
|
|
2346
2382
|
IApplicationTargetGroup as _IApplicationTargetGroup_57799827,
|
|
2347
2383
|
INetworkLoadBalancerTarget as _INetworkLoadBalancerTarget_688b169f,
|
|
2348
2384
|
INetworkTargetGroup as _INetworkTargetGroup_abca2df7,
|
|
2385
|
+
ITargetGroup as _ITargetGroup_83c6f8c4,
|
|
2349
2386
|
ListenerCondition as _ListenerCondition_e8416430,
|
|
2350
2387
|
LoadBalancerTargetProps as _LoadBalancerTargetProps_4c30a73c,
|
|
2351
2388
|
NetworkListener as _NetworkListener_539c17bf,
|
|
@@ -2359,6 +2396,7 @@ from ..aws_iam import (
|
|
|
2359
2396
|
PolicyStatement as _PolicyStatement_0fe33853,
|
|
2360
2397
|
)
|
|
2361
2398
|
from ..aws_kms import IKey as _IKey_5f11635f
|
|
2399
|
+
from ..aws_lambda import IFunction as _IFunction_6adb0ab8
|
|
2362
2400
|
from ..aws_logs import (
|
|
2363
2401
|
ILogGroup as _ILogGroup_3c4fa718, RetentionDays as _RetentionDays_070f99f0
|
|
2364
2402
|
)
|
|
@@ -3286,6 +3324,305 @@ class AlarmBehavior(enum.Enum):
|
|
|
3286
3324
|
'''
|
|
3287
3325
|
|
|
3288
3326
|
|
|
3327
|
+
@jsii.data_type(
|
|
3328
|
+
jsii_type="aws-cdk-lib.aws_ecs.AlternateTargetConfig",
|
|
3329
|
+
jsii_struct_bases=[],
|
|
3330
|
+
name_mapping={
|
|
3331
|
+
"alternate_target_group_arn": "alternateTargetGroupArn",
|
|
3332
|
+
"role_arn": "roleArn",
|
|
3333
|
+
"production_listener_rule": "productionListenerRule",
|
|
3334
|
+
"test_listener_rule": "testListenerRule",
|
|
3335
|
+
},
|
|
3336
|
+
)
|
|
3337
|
+
class AlternateTargetConfig:
|
|
3338
|
+
def __init__(
|
|
3339
|
+
self,
|
|
3340
|
+
*,
|
|
3341
|
+
alternate_target_group_arn: builtins.str,
|
|
3342
|
+
role_arn: builtins.str,
|
|
3343
|
+
production_listener_rule: typing.Optional[builtins.str] = None,
|
|
3344
|
+
test_listener_rule: typing.Optional[builtins.str] = None,
|
|
3345
|
+
) -> None:
|
|
3346
|
+
'''Configuration returned by AlternateTargetConfiguration.bind().
|
|
3347
|
+
|
|
3348
|
+
:param alternate_target_group_arn: The ARN of the alternate target group.
|
|
3349
|
+
:param role_arn: The IAM role ARN for the configuration. Default: - a new role will be created
|
|
3350
|
+
:param production_listener_rule: The production listener rule ARN (ALB) or listener ARN (NLB). Default: - none
|
|
3351
|
+
:param test_listener_rule: The test listener rule ARN (ALB) or listener ARN (NLB). Default: - none
|
|
3352
|
+
|
|
3353
|
+
:exampleMetadata: fixture=_generated
|
|
3354
|
+
|
|
3355
|
+
Example::
|
|
3356
|
+
|
|
3357
|
+
# The code below shows an example of how to instantiate this type.
|
|
3358
|
+
# The values are placeholders you should change.
|
|
3359
|
+
from aws_cdk import aws_ecs as ecs
|
|
3360
|
+
|
|
3361
|
+
alternate_target_config = ecs.AlternateTargetConfig(
|
|
3362
|
+
alternate_target_group_arn="alternateTargetGroupArn",
|
|
3363
|
+
role_arn="roleArn",
|
|
3364
|
+
|
|
3365
|
+
# the properties below are optional
|
|
3366
|
+
production_listener_rule="productionListenerRule",
|
|
3367
|
+
test_listener_rule="testListenerRule"
|
|
3368
|
+
)
|
|
3369
|
+
'''
|
|
3370
|
+
if __debug__:
|
|
3371
|
+
type_hints = typing.get_type_hints(_typecheckingstub__792a358f64361d957b07e1ed7f1116dd993837c77bffc674ebb1385615159cd7)
|
|
3372
|
+
check_type(argname="argument alternate_target_group_arn", value=alternate_target_group_arn, expected_type=type_hints["alternate_target_group_arn"])
|
|
3373
|
+
check_type(argname="argument role_arn", value=role_arn, expected_type=type_hints["role_arn"])
|
|
3374
|
+
check_type(argname="argument production_listener_rule", value=production_listener_rule, expected_type=type_hints["production_listener_rule"])
|
|
3375
|
+
check_type(argname="argument test_listener_rule", value=test_listener_rule, expected_type=type_hints["test_listener_rule"])
|
|
3376
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
3377
|
+
"alternate_target_group_arn": alternate_target_group_arn,
|
|
3378
|
+
"role_arn": role_arn,
|
|
3379
|
+
}
|
|
3380
|
+
if production_listener_rule is not None:
|
|
3381
|
+
self._values["production_listener_rule"] = production_listener_rule
|
|
3382
|
+
if test_listener_rule is not None:
|
|
3383
|
+
self._values["test_listener_rule"] = test_listener_rule
|
|
3384
|
+
|
|
3385
|
+
@builtins.property
|
|
3386
|
+
def alternate_target_group_arn(self) -> builtins.str:
|
|
3387
|
+
'''The ARN of the alternate target group.'''
|
|
3388
|
+
result = self._values.get("alternate_target_group_arn")
|
|
3389
|
+
assert result is not None, "Required property 'alternate_target_group_arn' is missing"
|
|
3390
|
+
return typing.cast(builtins.str, result)
|
|
3391
|
+
|
|
3392
|
+
@builtins.property
|
|
3393
|
+
def role_arn(self) -> builtins.str:
|
|
3394
|
+
'''The IAM role ARN for the configuration.
|
|
3395
|
+
|
|
3396
|
+
:default: - a new role will be created
|
|
3397
|
+
'''
|
|
3398
|
+
result = self._values.get("role_arn")
|
|
3399
|
+
assert result is not None, "Required property 'role_arn' is missing"
|
|
3400
|
+
return typing.cast(builtins.str, result)
|
|
3401
|
+
|
|
3402
|
+
@builtins.property
|
|
3403
|
+
def production_listener_rule(self) -> typing.Optional[builtins.str]:
|
|
3404
|
+
'''The production listener rule ARN (ALB) or listener ARN (NLB).
|
|
3405
|
+
|
|
3406
|
+
:default: - none
|
|
3407
|
+
'''
|
|
3408
|
+
result = self._values.get("production_listener_rule")
|
|
3409
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
3410
|
+
|
|
3411
|
+
@builtins.property
|
|
3412
|
+
def test_listener_rule(self) -> typing.Optional[builtins.str]:
|
|
3413
|
+
'''The test listener rule ARN (ALB) or listener ARN (NLB).
|
|
3414
|
+
|
|
3415
|
+
:default: - none
|
|
3416
|
+
'''
|
|
3417
|
+
result = self._values.get("test_listener_rule")
|
|
3418
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
3419
|
+
|
|
3420
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
3421
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
3422
|
+
|
|
3423
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
3424
|
+
return not (rhs == self)
|
|
3425
|
+
|
|
3426
|
+
def __repr__(self) -> str:
|
|
3427
|
+
return "AlternateTargetConfig(%s)" % ", ".join(
|
|
3428
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
3429
|
+
)
|
|
3430
|
+
|
|
3431
|
+
|
|
3432
|
+
@jsii.data_type(
|
|
3433
|
+
jsii_type="aws-cdk-lib.aws_ecs.AlternateTargetOptions",
|
|
3434
|
+
jsii_struct_bases=[],
|
|
3435
|
+
name_mapping={"role": "role", "test_listener": "testListener"},
|
|
3436
|
+
)
|
|
3437
|
+
class AlternateTargetOptions:
|
|
3438
|
+
def __init__(
|
|
3439
|
+
self,
|
|
3440
|
+
*,
|
|
3441
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
3442
|
+
test_listener: typing.Optional["ListenerRuleConfiguration"] = None,
|
|
3443
|
+
) -> None:
|
|
3444
|
+
'''Options for AlternateTarget configuration.
|
|
3445
|
+
|
|
3446
|
+
:param role: The IAM role for the configuration. Default: - a new role will be created
|
|
3447
|
+
:param test_listener: The test listener configuration. Default: - none
|
|
3448
|
+
|
|
3449
|
+
:exampleMetadata: fixture=_generated
|
|
3450
|
+
|
|
3451
|
+
Example::
|
|
3452
|
+
|
|
3453
|
+
# The code below shows an example of how to instantiate this type.
|
|
3454
|
+
# The values are placeholders you should change.
|
|
3455
|
+
from aws_cdk import aws_ecs as ecs
|
|
3456
|
+
from aws_cdk import aws_iam as iam
|
|
3457
|
+
|
|
3458
|
+
# listener_rule_configuration: ecs.ListenerRuleConfiguration
|
|
3459
|
+
# role: iam.Role
|
|
3460
|
+
|
|
3461
|
+
alternate_target_options = ecs.AlternateTargetOptions(
|
|
3462
|
+
role=role,
|
|
3463
|
+
test_listener=listener_rule_configuration
|
|
3464
|
+
)
|
|
3465
|
+
'''
|
|
3466
|
+
if __debug__:
|
|
3467
|
+
type_hints = typing.get_type_hints(_typecheckingstub__419cc917bedbbd0a41ca044bcc54720f5a35bdc4f2dca6e11ae40da3ed05758d)
|
|
3468
|
+
check_type(argname="argument role", value=role, expected_type=type_hints["role"])
|
|
3469
|
+
check_type(argname="argument test_listener", value=test_listener, expected_type=type_hints["test_listener"])
|
|
3470
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
3471
|
+
if role is not None:
|
|
3472
|
+
self._values["role"] = role
|
|
3473
|
+
if test_listener is not None:
|
|
3474
|
+
self._values["test_listener"] = test_listener
|
|
3475
|
+
|
|
3476
|
+
@builtins.property
|
|
3477
|
+
def role(self) -> typing.Optional[_IRole_235f5d8e]:
|
|
3478
|
+
'''The IAM role for the configuration.
|
|
3479
|
+
|
|
3480
|
+
:default: - a new role will be created
|
|
3481
|
+
'''
|
|
3482
|
+
result = self._values.get("role")
|
|
3483
|
+
return typing.cast(typing.Optional[_IRole_235f5d8e], result)
|
|
3484
|
+
|
|
3485
|
+
@builtins.property
|
|
3486
|
+
def test_listener(self) -> typing.Optional["ListenerRuleConfiguration"]:
|
|
3487
|
+
'''The test listener configuration.
|
|
3488
|
+
|
|
3489
|
+
:default: - none
|
|
3490
|
+
'''
|
|
3491
|
+
result = self._values.get("test_listener")
|
|
3492
|
+
return typing.cast(typing.Optional["ListenerRuleConfiguration"], result)
|
|
3493
|
+
|
|
3494
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
3495
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
3496
|
+
|
|
3497
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
3498
|
+
return not (rhs == self)
|
|
3499
|
+
|
|
3500
|
+
def __repr__(self) -> str:
|
|
3501
|
+
return "AlternateTargetOptions(%s)" % ", ".join(
|
|
3502
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
3503
|
+
)
|
|
3504
|
+
|
|
3505
|
+
|
|
3506
|
+
@jsii.data_type(
|
|
3507
|
+
jsii_type="aws-cdk-lib.aws_ecs.AlternateTargetProps",
|
|
3508
|
+
jsii_struct_bases=[AlternateTargetOptions],
|
|
3509
|
+
name_mapping={
|
|
3510
|
+
"role": "role",
|
|
3511
|
+
"test_listener": "testListener",
|
|
3512
|
+
"alternate_target_group": "alternateTargetGroup",
|
|
3513
|
+
"production_listener": "productionListener",
|
|
3514
|
+
},
|
|
3515
|
+
)
|
|
3516
|
+
class AlternateTargetProps(AlternateTargetOptions):
|
|
3517
|
+
def __init__(
|
|
3518
|
+
self,
|
|
3519
|
+
*,
|
|
3520
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
3521
|
+
test_listener: typing.Optional["ListenerRuleConfiguration"] = None,
|
|
3522
|
+
alternate_target_group: _ITargetGroup_83c6f8c4,
|
|
3523
|
+
production_listener: "ListenerRuleConfiguration",
|
|
3524
|
+
) -> None:
|
|
3525
|
+
'''Properties for AlternateTarget configuration.
|
|
3526
|
+
|
|
3527
|
+
:param role: The IAM role for the configuration. Default: - a new role will be created
|
|
3528
|
+
:param test_listener: The test listener configuration. Default: - none
|
|
3529
|
+
:param alternate_target_group: The alternate target group.
|
|
3530
|
+
:param production_listener: The production listener rule ARN (ALB) or listener ARN (NLB).
|
|
3531
|
+
|
|
3532
|
+
:exampleMetadata: infused
|
|
3533
|
+
|
|
3534
|
+
Example::
|
|
3535
|
+
|
|
3536
|
+
import aws_cdk.aws_lambda as lambda_
|
|
3537
|
+
|
|
3538
|
+
# cluster: ecs.Cluster
|
|
3539
|
+
# task_definition: ecs.TaskDefinition
|
|
3540
|
+
# lambda_hook: lambda.Function
|
|
3541
|
+
# blue_target_group: elbv2.ApplicationTargetGroup
|
|
3542
|
+
# green_target_group: elbv2.ApplicationTargetGroup
|
|
3543
|
+
# prod_listener_rule: elbv2.ApplicationListenerRule
|
|
3544
|
+
|
|
3545
|
+
|
|
3546
|
+
service = ecs.FargateService(self, "Service",
|
|
3547
|
+
cluster=cluster,
|
|
3548
|
+
task_definition=task_definition,
|
|
3549
|
+
deployment_strategy=ecs.DeploymentStrategy.BLUE_GREEN
|
|
3550
|
+
)
|
|
3551
|
+
|
|
3552
|
+
service.add_lifecycle_hook(ecs.DeploymentLifecycleLambdaTarget(lambda_hook, "PreScaleHook",
|
|
3553
|
+
lifecycle_stages=[ecs.DeploymentLifecycleStage.PRE_SCALE_UP]
|
|
3554
|
+
))
|
|
3555
|
+
|
|
3556
|
+
target = service.load_balancer_target(ecs.LoadBalancerTargetOptions(
|
|
3557
|
+
container_name="nginx",
|
|
3558
|
+
container_port=80,
|
|
3559
|
+
protocol=ecs.Protocol.TCP
|
|
3560
|
+
), ecs.AlternateTarget("AlternateTarget",
|
|
3561
|
+
alternate_target_group=green_target_group,
|
|
3562
|
+
production_listener=ecs.ListenerRuleConfiguration.application_listener_rule(prod_listener_rule)
|
|
3563
|
+
))
|
|
3564
|
+
|
|
3565
|
+
target.attach_to_application_target_group(blue_target_group)
|
|
3566
|
+
'''
|
|
3567
|
+
if __debug__:
|
|
3568
|
+
type_hints = typing.get_type_hints(_typecheckingstub__308a285b9e7be7ba49d4d78caf88537a973f5504d7b7519fb1fe4ab1c987b690)
|
|
3569
|
+
check_type(argname="argument role", value=role, expected_type=type_hints["role"])
|
|
3570
|
+
check_type(argname="argument test_listener", value=test_listener, expected_type=type_hints["test_listener"])
|
|
3571
|
+
check_type(argname="argument alternate_target_group", value=alternate_target_group, expected_type=type_hints["alternate_target_group"])
|
|
3572
|
+
check_type(argname="argument production_listener", value=production_listener, expected_type=type_hints["production_listener"])
|
|
3573
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
3574
|
+
"alternate_target_group": alternate_target_group,
|
|
3575
|
+
"production_listener": production_listener,
|
|
3576
|
+
}
|
|
3577
|
+
if role is not None:
|
|
3578
|
+
self._values["role"] = role
|
|
3579
|
+
if test_listener is not None:
|
|
3580
|
+
self._values["test_listener"] = test_listener
|
|
3581
|
+
|
|
3582
|
+
@builtins.property
|
|
3583
|
+
def role(self) -> typing.Optional[_IRole_235f5d8e]:
|
|
3584
|
+
'''The IAM role for the configuration.
|
|
3585
|
+
|
|
3586
|
+
:default: - a new role will be created
|
|
3587
|
+
'''
|
|
3588
|
+
result = self._values.get("role")
|
|
3589
|
+
return typing.cast(typing.Optional[_IRole_235f5d8e], result)
|
|
3590
|
+
|
|
3591
|
+
@builtins.property
|
|
3592
|
+
def test_listener(self) -> typing.Optional["ListenerRuleConfiguration"]:
|
|
3593
|
+
'''The test listener configuration.
|
|
3594
|
+
|
|
3595
|
+
:default: - none
|
|
3596
|
+
'''
|
|
3597
|
+
result = self._values.get("test_listener")
|
|
3598
|
+
return typing.cast(typing.Optional["ListenerRuleConfiguration"], result)
|
|
3599
|
+
|
|
3600
|
+
@builtins.property
|
|
3601
|
+
def alternate_target_group(self) -> _ITargetGroup_83c6f8c4:
|
|
3602
|
+
'''The alternate target group.'''
|
|
3603
|
+
result = self._values.get("alternate_target_group")
|
|
3604
|
+
assert result is not None, "Required property 'alternate_target_group' is missing"
|
|
3605
|
+
return typing.cast(_ITargetGroup_83c6f8c4, result)
|
|
3606
|
+
|
|
3607
|
+
@builtins.property
|
|
3608
|
+
def production_listener(self) -> "ListenerRuleConfiguration":
|
|
3609
|
+
'''The production listener rule ARN (ALB) or listener ARN (NLB).'''
|
|
3610
|
+
result = self._values.get("production_listener")
|
|
3611
|
+
assert result is not None, "Required property 'production_listener' is missing"
|
|
3612
|
+
return typing.cast("ListenerRuleConfiguration", result)
|
|
3613
|
+
|
|
3614
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
3615
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
3616
|
+
|
|
3617
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
3618
|
+
return not (rhs == self)
|
|
3619
|
+
|
|
3620
|
+
def __repr__(self) -> str:
|
|
3621
|
+
return "AlternateTargetProps(%s)" % ", ".join(
|
|
3622
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
3623
|
+
)
|
|
3624
|
+
|
|
3625
|
+
|
|
3289
3626
|
@jsii.enum(jsii_type="aws-cdk-lib.aws_ecs.AmiHardwareType")
|
|
3290
3627
|
class AmiHardwareType(enum.Enum):
|
|
3291
3628
|
'''The ECS-optimized AMI variant to use.
|
|
@@ -5097,15 +5434,18 @@ class BaseMountPoint:
|
|
|
5097
5434
|
jsii_struct_bases=[],
|
|
5098
5435
|
name_mapping={
|
|
5099
5436
|
"cluster": "cluster",
|
|
5437
|
+
"bake_time": "bakeTime",
|
|
5100
5438
|
"capacity_provider_strategies": "capacityProviderStrategies",
|
|
5101
5439
|
"circuit_breaker": "circuitBreaker",
|
|
5102
5440
|
"cloud_map_options": "cloudMapOptions",
|
|
5103
5441
|
"deployment_alarms": "deploymentAlarms",
|
|
5104
5442
|
"deployment_controller": "deploymentController",
|
|
5443
|
+
"deployment_strategy": "deploymentStrategy",
|
|
5105
5444
|
"desired_count": "desiredCount",
|
|
5106
5445
|
"enable_ecs_managed_tags": "enableECSManagedTags",
|
|
5107
5446
|
"enable_execute_command": "enableExecuteCommand",
|
|
5108
5447
|
"health_check_grace_period": "healthCheckGracePeriod",
|
|
5448
|
+
"lifecycle_hooks": "lifecycleHooks",
|
|
5109
5449
|
"max_healthy_percent": "maxHealthyPercent",
|
|
5110
5450
|
"min_healthy_percent": "minHealthyPercent",
|
|
5111
5451
|
"propagate_tags": "propagateTags",
|
|
@@ -5120,15 +5460,18 @@ class BaseServiceOptions:
|
|
|
5120
5460
|
self,
|
|
5121
5461
|
*,
|
|
5122
5462
|
cluster: "ICluster",
|
|
5463
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
5123
5464
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union["CapacityProviderStrategy", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
5124
5465
|
circuit_breaker: typing.Optional[typing.Union["DeploymentCircuitBreaker", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
5125
5466
|
cloud_map_options: typing.Optional[typing.Union["CloudMapOptions", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
5126
5467
|
deployment_alarms: typing.Optional[typing.Union["DeploymentAlarmConfig", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
5127
5468
|
deployment_controller: typing.Optional[typing.Union["DeploymentController", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
5469
|
+
deployment_strategy: typing.Optional["DeploymentStrategy"] = None,
|
|
5128
5470
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
5129
5471
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
5130
5472
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
5131
5473
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
5474
|
+
lifecycle_hooks: typing.Optional[typing.Sequence["IDeploymentLifecycleHookTarget"]] = None,
|
|
5132
5475
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
5133
5476
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
5134
5477
|
propagate_tags: typing.Optional["PropagatedTagSource"] = None,
|
|
@@ -5140,15 +5483,18 @@ class BaseServiceOptions:
|
|
|
5140
5483
|
'''The properties for the base Ec2Service or FargateService service.
|
|
5141
5484
|
|
|
5142
5485
|
:param cluster: The name of the cluster that hosts the service.
|
|
5486
|
+
:param bake_time: bake time minutes for service. Default: - none
|
|
5143
5487
|
:param capacity_provider_strategies: A list of Capacity Provider strategies used to place a service. Default: - undefined
|
|
5144
5488
|
:param circuit_breaker: Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly enabled. Default: - disabled
|
|
5145
5489
|
:param cloud_map_options: The options for configuring an Amazon ECS service to use service discovery. Default: - AWS Cloud Map service discovery is not enabled.
|
|
5146
5490
|
:param deployment_alarms: The alarm(s) to monitor during deployment, and behavior to apply if at least one enters a state of alarm during the deployment or bake time. Default: - No alarms will be monitored during deployment.
|
|
5147
5491
|
:param deployment_controller: Specifies which deployment controller to use for the service. For more information, see `Amazon ECS Deployment Types <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html>`_ Default: - Rolling update (ECS)
|
|
5492
|
+
:param deployment_strategy: The deployment strategy to use for the service. Default: ROLLING
|
|
5148
5493
|
:param desired_count: The desired number of instantiations of the task definition to keep running on the service. Default: - When creating the service, default is 1; when updating the service, default uses the current task number.
|
|
5149
5494
|
:param enable_ecs_managed_tags: Specifies whether to enable Amazon ECS managed tags for the tasks within the service. For more information, see `Tagging Your Amazon ECS Resources <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html>`_ Default: false
|
|
5150
5495
|
:param enable_execute_command: Whether to enable the ability to execute into a container. Default: - undefined
|
|
5151
5496
|
:param health_check_grace_period: The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started. Default: - defaults to 60 seconds if at least one load balancer is in-use and it is not already set
|
|
5497
|
+
:param lifecycle_hooks: The lifecycle hooks to execute during deployment stages. Default: - none;
|
|
5152
5498
|
:param max_healthy_percent: The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment. Default: - 100 if daemon, otherwise 200
|
|
5153
5499
|
:param min_healthy_percent: The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment. Default: - 0 if daemon, otherwise 50
|
|
5154
5500
|
:param propagate_tags: Specifies whether to propagate the tags from the task definition or the service to the tasks in the service. Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE Default: PropagatedTagSource.NONE
|
|
@@ -5171,6 +5517,7 @@ class BaseServiceOptions:
|
|
|
5171
5517
|
|
|
5172
5518
|
# cluster: ecs.Cluster
|
|
5173
5519
|
# container_definition: ecs.ContainerDefinition
|
|
5520
|
+
# deployment_lifecycle_hook_target: ecs.IDeploymentLifecycleHookTarget
|
|
5174
5521
|
# key: kms.Key
|
|
5175
5522
|
# log_driver: ecs.LogDriver
|
|
5176
5523
|
# namespace: servicediscovery.INamespace
|
|
@@ -5182,6 +5529,7 @@ class BaseServiceOptions:
|
|
|
5182
5529
|
cluster=cluster,
|
|
5183
5530
|
|
|
5184
5531
|
# the properties below are optional
|
|
5532
|
+
bake_time=cdk.Duration.minutes(30),
|
|
5185
5533
|
capacity_provider_strategies=[ecs.CapacityProviderStrategy(
|
|
5186
5534
|
capacity_provider="capacityProvider",
|
|
5187
5535
|
|
|
@@ -5211,10 +5559,12 @@ class BaseServiceOptions:
|
|
|
5211
5559
|
deployment_controller=ecs.DeploymentController(
|
|
5212
5560
|
type=ecs.DeploymentControllerType.ECS
|
|
5213
5561
|
),
|
|
5562
|
+
deployment_strategy=ecs.DeploymentStrategy.ROLLING,
|
|
5214
5563
|
desired_count=123,
|
|
5215
5564
|
enable_eCSManaged_tags=False,
|
|
5216
5565
|
enable_execute_command=False,
|
|
5217
5566
|
health_check_grace_period=cdk.Duration.minutes(30),
|
|
5567
|
+
lifecycle_hooks=[deployment_lifecycle_hook_target],
|
|
5218
5568
|
max_healthy_percent=123,
|
|
5219
5569
|
min_healthy_percent=123,
|
|
5220
5570
|
propagate_tags=ecs.PropagatedTagSource.SERVICE,
|
|
@@ -5256,15 +5606,18 @@ class BaseServiceOptions:
|
|
|
5256
5606
|
if __debug__:
|
|
5257
5607
|
type_hints = typing.get_type_hints(_typecheckingstub__c2e0ba28c74987301a54b0d197b791a6a94084b5f40d15304ffabf113b3f7daa)
|
|
5258
5608
|
check_type(argname="argument cluster", value=cluster, expected_type=type_hints["cluster"])
|
|
5609
|
+
check_type(argname="argument bake_time", value=bake_time, expected_type=type_hints["bake_time"])
|
|
5259
5610
|
check_type(argname="argument capacity_provider_strategies", value=capacity_provider_strategies, expected_type=type_hints["capacity_provider_strategies"])
|
|
5260
5611
|
check_type(argname="argument circuit_breaker", value=circuit_breaker, expected_type=type_hints["circuit_breaker"])
|
|
5261
5612
|
check_type(argname="argument cloud_map_options", value=cloud_map_options, expected_type=type_hints["cloud_map_options"])
|
|
5262
5613
|
check_type(argname="argument deployment_alarms", value=deployment_alarms, expected_type=type_hints["deployment_alarms"])
|
|
5263
5614
|
check_type(argname="argument deployment_controller", value=deployment_controller, expected_type=type_hints["deployment_controller"])
|
|
5615
|
+
check_type(argname="argument deployment_strategy", value=deployment_strategy, expected_type=type_hints["deployment_strategy"])
|
|
5264
5616
|
check_type(argname="argument desired_count", value=desired_count, expected_type=type_hints["desired_count"])
|
|
5265
5617
|
check_type(argname="argument enable_ecs_managed_tags", value=enable_ecs_managed_tags, expected_type=type_hints["enable_ecs_managed_tags"])
|
|
5266
5618
|
check_type(argname="argument enable_execute_command", value=enable_execute_command, expected_type=type_hints["enable_execute_command"])
|
|
5267
5619
|
check_type(argname="argument health_check_grace_period", value=health_check_grace_period, expected_type=type_hints["health_check_grace_period"])
|
|
5620
|
+
check_type(argname="argument lifecycle_hooks", value=lifecycle_hooks, expected_type=type_hints["lifecycle_hooks"])
|
|
5268
5621
|
check_type(argname="argument max_healthy_percent", value=max_healthy_percent, expected_type=type_hints["max_healthy_percent"])
|
|
5269
5622
|
check_type(argname="argument min_healthy_percent", value=min_healthy_percent, expected_type=type_hints["min_healthy_percent"])
|
|
5270
5623
|
check_type(argname="argument propagate_tags", value=propagate_tags, expected_type=type_hints["propagate_tags"])
|
|
@@ -5275,6 +5628,8 @@ class BaseServiceOptions:
|
|
|
5275
5628
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
5276
5629
|
"cluster": cluster,
|
|
5277
5630
|
}
|
|
5631
|
+
if bake_time is not None:
|
|
5632
|
+
self._values["bake_time"] = bake_time
|
|
5278
5633
|
if capacity_provider_strategies is not None:
|
|
5279
5634
|
self._values["capacity_provider_strategies"] = capacity_provider_strategies
|
|
5280
5635
|
if circuit_breaker is not None:
|
|
@@ -5285,6 +5640,8 @@ class BaseServiceOptions:
|
|
|
5285
5640
|
self._values["deployment_alarms"] = deployment_alarms
|
|
5286
5641
|
if deployment_controller is not None:
|
|
5287
5642
|
self._values["deployment_controller"] = deployment_controller
|
|
5643
|
+
if deployment_strategy is not None:
|
|
5644
|
+
self._values["deployment_strategy"] = deployment_strategy
|
|
5288
5645
|
if desired_count is not None:
|
|
5289
5646
|
self._values["desired_count"] = desired_count
|
|
5290
5647
|
if enable_ecs_managed_tags is not None:
|
|
@@ -5293,6 +5650,8 @@ class BaseServiceOptions:
|
|
|
5293
5650
|
self._values["enable_execute_command"] = enable_execute_command
|
|
5294
5651
|
if health_check_grace_period is not None:
|
|
5295
5652
|
self._values["health_check_grace_period"] = health_check_grace_period
|
|
5653
|
+
if lifecycle_hooks is not None:
|
|
5654
|
+
self._values["lifecycle_hooks"] = lifecycle_hooks
|
|
5296
5655
|
if max_healthy_percent is not None:
|
|
5297
5656
|
self._values["max_healthy_percent"] = max_healthy_percent
|
|
5298
5657
|
if min_healthy_percent is not None:
|
|
@@ -5315,6 +5674,15 @@ class BaseServiceOptions:
|
|
|
5315
5674
|
assert result is not None, "Required property 'cluster' is missing"
|
|
5316
5675
|
return typing.cast("ICluster", result)
|
|
5317
5676
|
|
|
5677
|
+
@builtins.property
|
|
5678
|
+
def bake_time(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
5679
|
+
'''bake time minutes for service.
|
|
5680
|
+
|
|
5681
|
+
:default: - none
|
|
5682
|
+
'''
|
|
5683
|
+
result = self._values.get("bake_time")
|
|
5684
|
+
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
5685
|
+
|
|
5318
5686
|
@builtins.property
|
|
5319
5687
|
def capacity_provider_strategies(
|
|
5320
5688
|
self,
|
|
@@ -5368,6 +5736,15 @@ class BaseServiceOptions:
|
|
|
5368
5736
|
result = self._values.get("deployment_controller")
|
|
5369
5737
|
return typing.cast(typing.Optional["DeploymentController"], result)
|
|
5370
5738
|
|
|
5739
|
+
@builtins.property
|
|
5740
|
+
def deployment_strategy(self) -> typing.Optional["DeploymentStrategy"]:
|
|
5741
|
+
'''The deployment strategy to use for the service.
|
|
5742
|
+
|
|
5743
|
+
:default: ROLLING
|
|
5744
|
+
'''
|
|
5745
|
+
result = self._values.get("deployment_strategy")
|
|
5746
|
+
return typing.cast(typing.Optional["DeploymentStrategy"], result)
|
|
5747
|
+
|
|
5371
5748
|
@builtins.property
|
|
5372
5749
|
def desired_count(self) -> typing.Optional[jsii.Number]:
|
|
5373
5750
|
'''The desired number of instantiations of the task definition to keep running on the service.
|
|
@@ -5410,6 +5787,17 @@ class BaseServiceOptions:
|
|
|
5410
5787
|
result = self._values.get("health_check_grace_period")
|
|
5411
5788
|
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
5412
5789
|
|
|
5790
|
+
@builtins.property
|
|
5791
|
+
def lifecycle_hooks(
|
|
5792
|
+
self,
|
|
5793
|
+
) -> typing.Optional[typing.List["IDeploymentLifecycleHookTarget"]]:
|
|
5794
|
+
'''The lifecycle hooks to execute during deployment stages.
|
|
5795
|
+
|
|
5796
|
+
:default: - none;
|
|
5797
|
+
'''
|
|
5798
|
+
result = self._values.get("lifecycle_hooks")
|
|
5799
|
+
return typing.cast(typing.Optional[typing.List["IDeploymentLifecycleHookTarget"]], result)
|
|
5800
|
+
|
|
5413
5801
|
@builtins.property
|
|
5414
5802
|
def max_healthy_percent(self) -> typing.Optional[jsii.Number]:
|
|
5415
5803
|
'''The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
|
|
@@ -5500,15 +5888,18 @@ class BaseServiceOptions:
|
|
|
5500
5888
|
jsii_struct_bases=[BaseServiceOptions],
|
|
5501
5889
|
name_mapping={
|
|
5502
5890
|
"cluster": "cluster",
|
|
5891
|
+
"bake_time": "bakeTime",
|
|
5503
5892
|
"capacity_provider_strategies": "capacityProviderStrategies",
|
|
5504
5893
|
"circuit_breaker": "circuitBreaker",
|
|
5505
5894
|
"cloud_map_options": "cloudMapOptions",
|
|
5506
5895
|
"deployment_alarms": "deploymentAlarms",
|
|
5507
5896
|
"deployment_controller": "deploymentController",
|
|
5897
|
+
"deployment_strategy": "deploymentStrategy",
|
|
5508
5898
|
"desired_count": "desiredCount",
|
|
5509
5899
|
"enable_ecs_managed_tags": "enableECSManagedTags",
|
|
5510
5900
|
"enable_execute_command": "enableExecuteCommand",
|
|
5511
5901
|
"health_check_grace_period": "healthCheckGracePeriod",
|
|
5902
|
+
"lifecycle_hooks": "lifecycleHooks",
|
|
5512
5903
|
"max_healthy_percent": "maxHealthyPercent",
|
|
5513
5904
|
"min_healthy_percent": "minHealthyPercent",
|
|
5514
5905
|
"propagate_tags": "propagateTags",
|
|
@@ -5524,15 +5915,18 @@ class BaseServiceProps(BaseServiceOptions):
|
|
|
5524
5915
|
self,
|
|
5525
5916
|
*,
|
|
5526
5917
|
cluster: "ICluster",
|
|
5918
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
5527
5919
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union["CapacityProviderStrategy", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
5528
5920
|
circuit_breaker: typing.Optional[typing.Union["DeploymentCircuitBreaker", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
5529
5921
|
cloud_map_options: typing.Optional[typing.Union["CloudMapOptions", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
5530
5922
|
deployment_alarms: typing.Optional[typing.Union["DeploymentAlarmConfig", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
5531
5923
|
deployment_controller: typing.Optional[typing.Union["DeploymentController", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
5924
|
+
deployment_strategy: typing.Optional["DeploymentStrategy"] = None,
|
|
5532
5925
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
5533
5926
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
5534
5927
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
5535
5928
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
5929
|
+
lifecycle_hooks: typing.Optional[typing.Sequence["IDeploymentLifecycleHookTarget"]] = None,
|
|
5536
5930
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
5537
5931
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
5538
5932
|
propagate_tags: typing.Optional["PropagatedTagSource"] = None,
|
|
@@ -5545,15 +5939,18 @@ class BaseServiceProps(BaseServiceOptions):
|
|
|
5545
5939
|
'''Complete base service properties that are required to be supplied by the implementation of the BaseService class.
|
|
5546
5940
|
|
|
5547
5941
|
:param cluster: The name of the cluster that hosts the service.
|
|
5942
|
+
:param bake_time: bake time minutes for service. Default: - none
|
|
5548
5943
|
:param capacity_provider_strategies: A list of Capacity Provider strategies used to place a service. Default: - undefined
|
|
5549
5944
|
:param circuit_breaker: Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly enabled. Default: - disabled
|
|
5550
5945
|
:param cloud_map_options: The options for configuring an Amazon ECS service to use service discovery. Default: - AWS Cloud Map service discovery is not enabled.
|
|
5551
5946
|
:param deployment_alarms: The alarm(s) to monitor during deployment, and behavior to apply if at least one enters a state of alarm during the deployment or bake time. Default: - No alarms will be monitored during deployment.
|
|
5552
5947
|
:param deployment_controller: Specifies which deployment controller to use for the service. For more information, see `Amazon ECS Deployment Types <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html>`_ Default: - Rolling update (ECS)
|
|
5948
|
+
:param deployment_strategy: The deployment strategy to use for the service. Default: ROLLING
|
|
5553
5949
|
:param desired_count: The desired number of instantiations of the task definition to keep running on the service. Default: - When creating the service, default is 1; when updating the service, default uses the current task number.
|
|
5554
5950
|
:param enable_ecs_managed_tags: Specifies whether to enable Amazon ECS managed tags for the tasks within the service. For more information, see `Tagging Your Amazon ECS Resources <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html>`_ Default: false
|
|
5555
5951
|
:param enable_execute_command: Whether to enable the ability to execute into a container. Default: - undefined
|
|
5556
5952
|
:param health_check_grace_period: The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started. Default: - defaults to 60 seconds if at least one load balancer is in-use and it is not already set
|
|
5953
|
+
:param lifecycle_hooks: The lifecycle hooks to execute during deployment stages. Default: - none;
|
|
5557
5954
|
:param max_healthy_percent: The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment. Default: - 100 if daemon, otherwise 200
|
|
5558
5955
|
:param min_healthy_percent: The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment. Default: - 0 if daemon, otherwise 50
|
|
5559
5956
|
:param propagate_tags: Specifies whether to propagate the tags from the task definition or the service to the tasks in the service. Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE Default: PropagatedTagSource.NONE
|
|
@@ -5577,6 +5974,7 @@ class BaseServiceProps(BaseServiceOptions):
|
|
|
5577
5974
|
|
|
5578
5975
|
# cluster: ecs.Cluster
|
|
5579
5976
|
# container_definition: ecs.ContainerDefinition
|
|
5977
|
+
# deployment_lifecycle_hook_target: ecs.IDeploymentLifecycleHookTarget
|
|
5580
5978
|
# key: kms.Key
|
|
5581
5979
|
# log_driver: ecs.LogDriver
|
|
5582
5980
|
# namespace: servicediscovery.INamespace
|
|
@@ -5589,6 +5987,7 @@ class BaseServiceProps(BaseServiceOptions):
|
|
|
5589
5987
|
launch_type=ecs.LaunchType.EC2,
|
|
5590
5988
|
|
|
5591
5989
|
# the properties below are optional
|
|
5990
|
+
bake_time=cdk.Duration.minutes(30),
|
|
5592
5991
|
capacity_provider_strategies=[ecs.CapacityProviderStrategy(
|
|
5593
5992
|
capacity_provider="capacityProvider",
|
|
5594
5993
|
|
|
@@ -5618,10 +6017,12 @@ class BaseServiceProps(BaseServiceOptions):
|
|
|
5618
6017
|
deployment_controller=ecs.DeploymentController(
|
|
5619
6018
|
type=ecs.DeploymentControllerType.ECS
|
|
5620
6019
|
),
|
|
6020
|
+
deployment_strategy=ecs.DeploymentStrategy.ROLLING,
|
|
5621
6021
|
desired_count=123,
|
|
5622
6022
|
enable_eCSManaged_tags=False,
|
|
5623
6023
|
enable_execute_command=False,
|
|
5624
6024
|
health_check_grace_period=cdk.Duration.minutes(30),
|
|
6025
|
+
lifecycle_hooks=[deployment_lifecycle_hook_target],
|
|
5625
6026
|
max_healthy_percent=123,
|
|
5626
6027
|
min_healthy_percent=123,
|
|
5627
6028
|
propagate_tags=ecs.PropagatedTagSource.SERVICE,
|
|
@@ -5663,15 +6064,18 @@ class BaseServiceProps(BaseServiceOptions):
|
|
|
5663
6064
|
if __debug__:
|
|
5664
6065
|
type_hints = typing.get_type_hints(_typecheckingstub__3ecfd95265b873c2042a9d5cb8465a48f9e325e2271c18461e2b266333563d84)
|
|
5665
6066
|
check_type(argname="argument cluster", value=cluster, expected_type=type_hints["cluster"])
|
|
6067
|
+
check_type(argname="argument bake_time", value=bake_time, expected_type=type_hints["bake_time"])
|
|
5666
6068
|
check_type(argname="argument capacity_provider_strategies", value=capacity_provider_strategies, expected_type=type_hints["capacity_provider_strategies"])
|
|
5667
6069
|
check_type(argname="argument circuit_breaker", value=circuit_breaker, expected_type=type_hints["circuit_breaker"])
|
|
5668
6070
|
check_type(argname="argument cloud_map_options", value=cloud_map_options, expected_type=type_hints["cloud_map_options"])
|
|
5669
6071
|
check_type(argname="argument deployment_alarms", value=deployment_alarms, expected_type=type_hints["deployment_alarms"])
|
|
5670
6072
|
check_type(argname="argument deployment_controller", value=deployment_controller, expected_type=type_hints["deployment_controller"])
|
|
6073
|
+
check_type(argname="argument deployment_strategy", value=deployment_strategy, expected_type=type_hints["deployment_strategy"])
|
|
5671
6074
|
check_type(argname="argument desired_count", value=desired_count, expected_type=type_hints["desired_count"])
|
|
5672
6075
|
check_type(argname="argument enable_ecs_managed_tags", value=enable_ecs_managed_tags, expected_type=type_hints["enable_ecs_managed_tags"])
|
|
5673
6076
|
check_type(argname="argument enable_execute_command", value=enable_execute_command, expected_type=type_hints["enable_execute_command"])
|
|
5674
6077
|
check_type(argname="argument health_check_grace_period", value=health_check_grace_period, expected_type=type_hints["health_check_grace_period"])
|
|
6078
|
+
check_type(argname="argument lifecycle_hooks", value=lifecycle_hooks, expected_type=type_hints["lifecycle_hooks"])
|
|
5675
6079
|
check_type(argname="argument max_healthy_percent", value=max_healthy_percent, expected_type=type_hints["max_healthy_percent"])
|
|
5676
6080
|
check_type(argname="argument min_healthy_percent", value=min_healthy_percent, expected_type=type_hints["min_healthy_percent"])
|
|
5677
6081
|
check_type(argname="argument propagate_tags", value=propagate_tags, expected_type=type_hints["propagate_tags"])
|
|
@@ -5684,6 +6088,8 @@ class BaseServiceProps(BaseServiceOptions):
|
|
|
5684
6088
|
"cluster": cluster,
|
|
5685
6089
|
"launch_type": launch_type,
|
|
5686
6090
|
}
|
|
6091
|
+
if bake_time is not None:
|
|
6092
|
+
self._values["bake_time"] = bake_time
|
|
5687
6093
|
if capacity_provider_strategies is not None:
|
|
5688
6094
|
self._values["capacity_provider_strategies"] = capacity_provider_strategies
|
|
5689
6095
|
if circuit_breaker is not None:
|
|
@@ -5694,6 +6100,8 @@ class BaseServiceProps(BaseServiceOptions):
|
|
|
5694
6100
|
self._values["deployment_alarms"] = deployment_alarms
|
|
5695
6101
|
if deployment_controller is not None:
|
|
5696
6102
|
self._values["deployment_controller"] = deployment_controller
|
|
6103
|
+
if deployment_strategy is not None:
|
|
6104
|
+
self._values["deployment_strategy"] = deployment_strategy
|
|
5697
6105
|
if desired_count is not None:
|
|
5698
6106
|
self._values["desired_count"] = desired_count
|
|
5699
6107
|
if enable_ecs_managed_tags is not None:
|
|
@@ -5702,6 +6110,8 @@ class BaseServiceProps(BaseServiceOptions):
|
|
|
5702
6110
|
self._values["enable_execute_command"] = enable_execute_command
|
|
5703
6111
|
if health_check_grace_period is not None:
|
|
5704
6112
|
self._values["health_check_grace_period"] = health_check_grace_period
|
|
6113
|
+
if lifecycle_hooks is not None:
|
|
6114
|
+
self._values["lifecycle_hooks"] = lifecycle_hooks
|
|
5705
6115
|
if max_healthy_percent is not None:
|
|
5706
6116
|
self._values["max_healthy_percent"] = max_healthy_percent
|
|
5707
6117
|
if min_healthy_percent is not None:
|
|
@@ -5724,6 +6134,15 @@ class BaseServiceProps(BaseServiceOptions):
|
|
|
5724
6134
|
assert result is not None, "Required property 'cluster' is missing"
|
|
5725
6135
|
return typing.cast("ICluster", result)
|
|
5726
6136
|
|
|
6137
|
+
@builtins.property
|
|
6138
|
+
def bake_time(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
6139
|
+
'''bake time minutes for service.
|
|
6140
|
+
|
|
6141
|
+
:default: - none
|
|
6142
|
+
'''
|
|
6143
|
+
result = self._values.get("bake_time")
|
|
6144
|
+
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
6145
|
+
|
|
5727
6146
|
@builtins.property
|
|
5728
6147
|
def capacity_provider_strategies(
|
|
5729
6148
|
self,
|
|
@@ -5777,6 +6196,15 @@ class BaseServiceProps(BaseServiceOptions):
|
|
|
5777
6196
|
result = self._values.get("deployment_controller")
|
|
5778
6197
|
return typing.cast(typing.Optional["DeploymentController"], result)
|
|
5779
6198
|
|
|
6199
|
+
@builtins.property
|
|
6200
|
+
def deployment_strategy(self) -> typing.Optional["DeploymentStrategy"]:
|
|
6201
|
+
'''The deployment strategy to use for the service.
|
|
6202
|
+
|
|
6203
|
+
:default: ROLLING
|
|
6204
|
+
'''
|
|
6205
|
+
result = self._values.get("deployment_strategy")
|
|
6206
|
+
return typing.cast(typing.Optional["DeploymentStrategy"], result)
|
|
6207
|
+
|
|
5780
6208
|
@builtins.property
|
|
5781
6209
|
def desired_count(self) -> typing.Optional[jsii.Number]:
|
|
5782
6210
|
'''The desired number of instantiations of the task definition to keep running on the service.
|
|
@@ -5819,6 +6247,17 @@ class BaseServiceProps(BaseServiceOptions):
|
|
|
5819
6247
|
result = self._values.get("health_check_grace_period")
|
|
5820
6248
|
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
5821
6249
|
|
|
6250
|
+
@builtins.property
|
|
6251
|
+
def lifecycle_hooks(
|
|
6252
|
+
self,
|
|
6253
|
+
) -> typing.Optional[typing.List["IDeploymentLifecycleHookTarget"]]:
|
|
6254
|
+
'''The lifecycle hooks to execute during deployment stages.
|
|
6255
|
+
|
|
6256
|
+
:default: - none;
|
|
6257
|
+
'''
|
|
6258
|
+
result = self._values.get("lifecycle_hooks")
|
|
6259
|
+
return typing.cast(typing.Optional[typing.List["IDeploymentLifecycleHookTarget"]], result)
|
|
6260
|
+
|
|
5822
6261
|
@builtins.property
|
|
5823
6262
|
def max_healthy_percent(self) -> typing.Optional[jsii.Number]:
|
|
5824
6263
|
'''The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
|
|
@@ -24421,6 +24860,287 @@ class DeploymentControllerType(enum.Enum):
|
|
|
24421
24860
|
'''The external (EXTERNAL) deployment type enables you to use any third-party deployment controller.'''
|
|
24422
24861
|
|
|
24423
24862
|
|
|
24863
|
+
@jsii.data_type(
|
|
24864
|
+
jsii_type="aws-cdk-lib.aws_ecs.DeploymentLifecycleHookTargetConfig",
|
|
24865
|
+
jsii_struct_bases=[],
|
|
24866
|
+
name_mapping={
|
|
24867
|
+
"lifecycle_stages": "lifecycleStages",
|
|
24868
|
+
"target_arn": "targetArn",
|
|
24869
|
+
"role": "role",
|
|
24870
|
+
},
|
|
24871
|
+
)
|
|
24872
|
+
class DeploymentLifecycleHookTargetConfig:
|
|
24873
|
+
def __init__(
|
|
24874
|
+
self,
|
|
24875
|
+
*,
|
|
24876
|
+
lifecycle_stages: typing.Sequence["DeploymentLifecycleStage"],
|
|
24877
|
+
target_arn: builtins.str,
|
|
24878
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
24879
|
+
) -> None:
|
|
24880
|
+
'''Configuration for a deployment lifecycle hook target.
|
|
24881
|
+
|
|
24882
|
+
:param lifecycle_stages: The lifecycle stages when this hook should be executed.
|
|
24883
|
+
:param target_arn: The ARN of the target resource.
|
|
24884
|
+
:param role: The IAM role that grants permissions to invoke the target. Default: - a role will be created automatically
|
|
24885
|
+
|
|
24886
|
+
:exampleMetadata: fixture=_generated
|
|
24887
|
+
|
|
24888
|
+
Example::
|
|
24889
|
+
|
|
24890
|
+
# The code below shows an example of how to instantiate this type.
|
|
24891
|
+
# The values are placeholders you should change.
|
|
24892
|
+
from aws_cdk import aws_ecs as ecs
|
|
24893
|
+
from aws_cdk import aws_iam as iam
|
|
24894
|
+
|
|
24895
|
+
# role: iam.Role
|
|
24896
|
+
|
|
24897
|
+
deployment_lifecycle_hook_target_config = ecs.DeploymentLifecycleHookTargetConfig(
|
|
24898
|
+
lifecycle_stages=[ecs.DeploymentLifecycleStage.RECONCILE_SERVICE],
|
|
24899
|
+
target_arn="targetArn",
|
|
24900
|
+
|
|
24901
|
+
# the properties below are optional
|
|
24902
|
+
role=role
|
|
24903
|
+
)
|
|
24904
|
+
'''
|
|
24905
|
+
if __debug__:
|
|
24906
|
+
type_hints = typing.get_type_hints(_typecheckingstub__58b105a4a38be4fd4e5d81c3d78a7d0fc4d3120086f0f1235d58be7e964bf172)
|
|
24907
|
+
check_type(argname="argument lifecycle_stages", value=lifecycle_stages, expected_type=type_hints["lifecycle_stages"])
|
|
24908
|
+
check_type(argname="argument target_arn", value=target_arn, expected_type=type_hints["target_arn"])
|
|
24909
|
+
check_type(argname="argument role", value=role, expected_type=type_hints["role"])
|
|
24910
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
24911
|
+
"lifecycle_stages": lifecycle_stages,
|
|
24912
|
+
"target_arn": target_arn,
|
|
24913
|
+
}
|
|
24914
|
+
if role is not None:
|
|
24915
|
+
self._values["role"] = role
|
|
24916
|
+
|
|
24917
|
+
@builtins.property
|
|
24918
|
+
def lifecycle_stages(self) -> typing.List["DeploymentLifecycleStage"]:
|
|
24919
|
+
'''The lifecycle stages when this hook should be executed.'''
|
|
24920
|
+
result = self._values.get("lifecycle_stages")
|
|
24921
|
+
assert result is not None, "Required property 'lifecycle_stages' is missing"
|
|
24922
|
+
return typing.cast(typing.List["DeploymentLifecycleStage"], result)
|
|
24923
|
+
|
|
24924
|
+
@builtins.property
|
|
24925
|
+
def target_arn(self) -> builtins.str:
|
|
24926
|
+
'''The ARN of the target resource.'''
|
|
24927
|
+
result = self._values.get("target_arn")
|
|
24928
|
+
assert result is not None, "Required property 'target_arn' is missing"
|
|
24929
|
+
return typing.cast(builtins.str, result)
|
|
24930
|
+
|
|
24931
|
+
@builtins.property
|
|
24932
|
+
def role(self) -> typing.Optional[_IRole_235f5d8e]:
|
|
24933
|
+
'''The IAM role that grants permissions to invoke the target.
|
|
24934
|
+
|
|
24935
|
+
:default: - a role will be created automatically
|
|
24936
|
+
'''
|
|
24937
|
+
result = self._values.get("role")
|
|
24938
|
+
return typing.cast(typing.Optional[_IRole_235f5d8e], result)
|
|
24939
|
+
|
|
24940
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
24941
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
24942
|
+
|
|
24943
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
24944
|
+
return not (rhs == self)
|
|
24945
|
+
|
|
24946
|
+
def __repr__(self) -> str:
|
|
24947
|
+
return "DeploymentLifecycleHookTargetConfig(%s)" % ", ".join(
|
|
24948
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
24949
|
+
)
|
|
24950
|
+
|
|
24951
|
+
|
|
24952
|
+
@jsii.data_type(
|
|
24953
|
+
jsii_type="aws-cdk-lib.aws_ecs.DeploymentLifecycleLambdaTargetProps",
|
|
24954
|
+
jsii_struct_bases=[],
|
|
24955
|
+
name_mapping={"lifecycle_stages": "lifecycleStages", "role": "role"},
|
|
24956
|
+
)
|
|
24957
|
+
class DeploymentLifecycleLambdaTargetProps:
|
|
24958
|
+
def __init__(
|
|
24959
|
+
self,
|
|
24960
|
+
*,
|
|
24961
|
+
lifecycle_stages: typing.Sequence["DeploymentLifecycleStage"],
|
|
24962
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
24963
|
+
) -> None:
|
|
24964
|
+
'''Configuration for a lambda deployment lifecycle hook.
|
|
24965
|
+
|
|
24966
|
+
:param lifecycle_stages: The lifecycle stages when this hook should be executed.
|
|
24967
|
+
:param role: The IAM role that grants permissions to invoke the lambda target. Default: - A unique role will be generated for this lambda function.
|
|
24968
|
+
|
|
24969
|
+
:exampleMetadata: infused
|
|
24970
|
+
|
|
24971
|
+
Example::
|
|
24972
|
+
|
|
24973
|
+
import aws_cdk.aws_lambda as lambda_
|
|
24974
|
+
|
|
24975
|
+
# cluster: ecs.Cluster
|
|
24976
|
+
# task_definition: ecs.TaskDefinition
|
|
24977
|
+
# lambda_hook: lambda.Function
|
|
24978
|
+
# blue_target_group: elbv2.ApplicationTargetGroup
|
|
24979
|
+
# green_target_group: elbv2.ApplicationTargetGroup
|
|
24980
|
+
# prod_listener_rule: elbv2.ApplicationListenerRule
|
|
24981
|
+
|
|
24982
|
+
|
|
24983
|
+
service = ecs.FargateService(self, "Service",
|
|
24984
|
+
cluster=cluster,
|
|
24985
|
+
task_definition=task_definition,
|
|
24986
|
+
deployment_strategy=ecs.DeploymentStrategy.BLUE_GREEN
|
|
24987
|
+
)
|
|
24988
|
+
|
|
24989
|
+
service.add_lifecycle_hook(ecs.DeploymentLifecycleLambdaTarget(lambda_hook, "PreScaleHook",
|
|
24990
|
+
lifecycle_stages=[ecs.DeploymentLifecycleStage.PRE_SCALE_UP]
|
|
24991
|
+
))
|
|
24992
|
+
|
|
24993
|
+
target = service.load_balancer_target(ecs.LoadBalancerTargetOptions(
|
|
24994
|
+
container_name="nginx",
|
|
24995
|
+
container_port=80,
|
|
24996
|
+
protocol=ecs.Protocol.TCP
|
|
24997
|
+
), ecs.AlternateTarget("AlternateTarget",
|
|
24998
|
+
alternate_target_group=green_target_group,
|
|
24999
|
+
production_listener=ecs.ListenerRuleConfiguration.application_listener_rule(prod_listener_rule)
|
|
25000
|
+
))
|
|
25001
|
+
|
|
25002
|
+
target.attach_to_application_target_group(blue_target_group)
|
|
25003
|
+
'''
|
|
25004
|
+
if __debug__:
|
|
25005
|
+
type_hints = typing.get_type_hints(_typecheckingstub__e812b4c257c9817fdc66c09cfbc9ed6c2dae75feb52fdb91c33339837dbb883c)
|
|
25006
|
+
check_type(argname="argument lifecycle_stages", value=lifecycle_stages, expected_type=type_hints["lifecycle_stages"])
|
|
25007
|
+
check_type(argname="argument role", value=role, expected_type=type_hints["role"])
|
|
25008
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
25009
|
+
"lifecycle_stages": lifecycle_stages,
|
|
25010
|
+
}
|
|
25011
|
+
if role is not None:
|
|
25012
|
+
self._values["role"] = role
|
|
25013
|
+
|
|
25014
|
+
@builtins.property
|
|
25015
|
+
def lifecycle_stages(self) -> typing.List["DeploymentLifecycleStage"]:
|
|
25016
|
+
'''The lifecycle stages when this hook should be executed.'''
|
|
25017
|
+
result = self._values.get("lifecycle_stages")
|
|
25018
|
+
assert result is not None, "Required property 'lifecycle_stages' is missing"
|
|
25019
|
+
return typing.cast(typing.List["DeploymentLifecycleStage"], result)
|
|
25020
|
+
|
|
25021
|
+
@builtins.property
|
|
25022
|
+
def role(self) -> typing.Optional[_IRole_235f5d8e]:
|
|
25023
|
+
'''The IAM role that grants permissions to invoke the lambda target.
|
|
25024
|
+
|
|
25025
|
+
:default: - A unique role will be generated for this lambda function.
|
|
25026
|
+
'''
|
|
25027
|
+
result = self._values.get("role")
|
|
25028
|
+
return typing.cast(typing.Optional[_IRole_235f5d8e], result)
|
|
25029
|
+
|
|
25030
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
25031
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
25032
|
+
|
|
25033
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
25034
|
+
return not (rhs == self)
|
|
25035
|
+
|
|
25036
|
+
def __repr__(self) -> str:
|
|
25037
|
+
return "DeploymentLifecycleLambdaTargetProps(%s)" % ", ".join(
|
|
25038
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
25039
|
+
)
|
|
25040
|
+
|
|
25041
|
+
|
|
25042
|
+
@jsii.enum(jsii_type="aws-cdk-lib.aws_ecs.DeploymentLifecycleStage")
|
|
25043
|
+
class DeploymentLifecycleStage(enum.Enum):
|
|
25044
|
+
'''Deployment lifecycle stages where hooks can be executed.
|
|
25045
|
+
|
|
25046
|
+
:exampleMetadata: infused
|
|
25047
|
+
|
|
25048
|
+
Example::
|
|
25049
|
+
|
|
25050
|
+
import aws_cdk.aws_lambda as lambda_
|
|
25051
|
+
|
|
25052
|
+
# cluster: ecs.Cluster
|
|
25053
|
+
# task_definition: ecs.TaskDefinition
|
|
25054
|
+
# lambda_hook: lambda.Function
|
|
25055
|
+
# blue_target_group: elbv2.ApplicationTargetGroup
|
|
25056
|
+
# green_target_group: elbv2.ApplicationTargetGroup
|
|
25057
|
+
# prod_listener_rule: elbv2.ApplicationListenerRule
|
|
25058
|
+
|
|
25059
|
+
|
|
25060
|
+
service = ecs.FargateService(self, "Service",
|
|
25061
|
+
cluster=cluster,
|
|
25062
|
+
task_definition=task_definition,
|
|
25063
|
+
deployment_strategy=ecs.DeploymentStrategy.BLUE_GREEN
|
|
25064
|
+
)
|
|
25065
|
+
|
|
25066
|
+
service.add_lifecycle_hook(ecs.DeploymentLifecycleLambdaTarget(lambda_hook, "PreScaleHook",
|
|
25067
|
+
lifecycle_stages=[ecs.DeploymentLifecycleStage.PRE_SCALE_UP]
|
|
25068
|
+
))
|
|
25069
|
+
|
|
25070
|
+
target = service.load_balancer_target(ecs.LoadBalancerTargetOptions(
|
|
25071
|
+
container_name="nginx",
|
|
25072
|
+
container_port=80,
|
|
25073
|
+
protocol=ecs.Protocol.TCP
|
|
25074
|
+
), ecs.AlternateTarget("AlternateTarget",
|
|
25075
|
+
alternate_target_group=green_target_group,
|
|
25076
|
+
production_listener=ecs.ListenerRuleConfiguration.application_listener_rule(prod_listener_rule)
|
|
25077
|
+
))
|
|
25078
|
+
|
|
25079
|
+
target.attach_to_application_target_group(blue_target_group)
|
|
25080
|
+
'''
|
|
25081
|
+
|
|
25082
|
+
RECONCILE_SERVICE = "RECONCILE_SERVICE"
|
|
25083
|
+
'''Execute during service reconciliation.'''
|
|
25084
|
+
PRE_SCALE_UP = "PRE_SCALE_UP"
|
|
25085
|
+
'''Execute before scaling up tasks.'''
|
|
25086
|
+
POST_SCALE_UP = "POST_SCALE_UP"
|
|
25087
|
+
'''Execute after scaling up tasks.'''
|
|
25088
|
+
TEST_TRAFFIC_SHIFT = "TEST_TRAFFIC_SHIFT"
|
|
25089
|
+
'''Execute during test traffic shift.'''
|
|
25090
|
+
POST_TEST_TRAFFIC_SHIFT = "POST_TEST_TRAFFIC_SHIFT"
|
|
25091
|
+
'''Execute after test traffic shift.'''
|
|
25092
|
+
PRODUCTION_TRAFFIC_SHIFT = "PRODUCTION_TRAFFIC_SHIFT"
|
|
25093
|
+
'''Execute during production traffic shift.'''
|
|
25094
|
+
POST_PRODUCTION_TRAFFIC_SHIFT = "POST_PRODUCTION_TRAFFIC_SHIFT"
|
|
25095
|
+
'''Execute after production traffic shift.'''
|
|
25096
|
+
|
|
25097
|
+
|
|
25098
|
+
@jsii.enum(jsii_type="aws-cdk-lib.aws_ecs.DeploymentStrategy")
|
|
25099
|
+
class DeploymentStrategy(enum.Enum):
|
|
25100
|
+
'''The deployment stratergy to use for ECS controller.
|
|
25101
|
+
|
|
25102
|
+
:exampleMetadata: infused
|
|
25103
|
+
|
|
25104
|
+
Example::
|
|
25105
|
+
|
|
25106
|
+
import aws_cdk.aws_lambda as lambda_
|
|
25107
|
+
|
|
25108
|
+
# cluster: ecs.Cluster
|
|
25109
|
+
# task_definition: ecs.TaskDefinition
|
|
25110
|
+
# lambda_hook: lambda.Function
|
|
25111
|
+
# blue_target_group: elbv2.ApplicationTargetGroup
|
|
25112
|
+
# green_target_group: elbv2.ApplicationTargetGroup
|
|
25113
|
+
# prod_listener_rule: elbv2.ApplicationListenerRule
|
|
25114
|
+
|
|
25115
|
+
|
|
25116
|
+
service = ecs.FargateService(self, "Service",
|
|
25117
|
+
cluster=cluster,
|
|
25118
|
+
task_definition=task_definition,
|
|
25119
|
+
deployment_strategy=ecs.DeploymentStrategy.BLUE_GREEN
|
|
25120
|
+
)
|
|
25121
|
+
|
|
25122
|
+
service.add_lifecycle_hook(ecs.DeploymentLifecycleLambdaTarget(lambda_hook, "PreScaleHook",
|
|
25123
|
+
lifecycle_stages=[ecs.DeploymentLifecycleStage.PRE_SCALE_UP]
|
|
25124
|
+
))
|
|
25125
|
+
|
|
25126
|
+
target = service.load_balancer_target(ecs.LoadBalancerTargetOptions(
|
|
25127
|
+
container_name="nginx",
|
|
25128
|
+
container_port=80,
|
|
25129
|
+
protocol=ecs.Protocol.TCP
|
|
25130
|
+
), ecs.AlternateTarget("AlternateTarget",
|
|
25131
|
+
alternate_target_group=green_target_group,
|
|
25132
|
+
production_listener=ecs.ListenerRuleConfiguration.application_listener_rule(prod_listener_rule)
|
|
25133
|
+
))
|
|
25134
|
+
|
|
25135
|
+
target.attach_to_application_target_group(blue_target_group)
|
|
25136
|
+
'''
|
|
25137
|
+
|
|
25138
|
+
ROLLING = "ROLLING"
|
|
25139
|
+
'''Rolling update deployment.'''
|
|
25140
|
+
BLUE_GREEN = "BLUE_GREEN"
|
|
25141
|
+
'''Blue/green deployment.'''
|
|
25142
|
+
|
|
25143
|
+
|
|
24424
25144
|
@jsii.data_type(
|
|
24425
25145
|
jsii_type="aws-cdk-lib.aws_ecs.Device",
|
|
24426
25146
|
jsii_struct_bases=[],
|
|
@@ -25023,15 +25743,18 @@ class Ec2ServiceAttributes:
|
|
|
25023
25743
|
jsii_struct_bases=[BaseServiceOptions],
|
|
25024
25744
|
name_mapping={
|
|
25025
25745
|
"cluster": "cluster",
|
|
25746
|
+
"bake_time": "bakeTime",
|
|
25026
25747
|
"capacity_provider_strategies": "capacityProviderStrategies",
|
|
25027
25748
|
"circuit_breaker": "circuitBreaker",
|
|
25028
25749
|
"cloud_map_options": "cloudMapOptions",
|
|
25029
25750
|
"deployment_alarms": "deploymentAlarms",
|
|
25030
25751
|
"deployment_controller": "deploymentController",
|
|
25752
|
+
"deployment_strategy": "deploymentStrategy",
|
|
25031
25753
|
"desired_count": "desiredCount",
|
|
25032
25754
|
"enable_ecs_managed_tags": "enableECSManagedTags",
|
|
25033
25755
|
"enable_execute_command": "enableExecuteCommand",
|
|
25034
25756
|
"health_check_grace_period": "healthCheckGracePeriod",
|
|
25757
|
+
"lifecycle_hooks": "lifecycleHooks",
|
|
25035
25758
|
"max_healthy_percent": "maxHealthyPercent",
|
|
25036
25759
|
"min_healthy_percent": "minHealthyPercent",
|
|
25037
25760
|
"propagate_tags": "propagateTags",
|
|
@@ -25054,15 +25777,18 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
25054
25777
|
self,
|
|
25055
25778
|
*,
|
|
25056
25779
|
cluster: "ICluster",
|
|
25780
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
25057
25781
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
25058
25782
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
25059
25783
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
25060
25784
|
deployment_alarms: typing.Optional[typing.Union["DeploymentAlarmConfig", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
25061
25785
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
25786
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
25062
25787
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
25063
25788
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
25064
25789
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
25065
25790
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
25791
|
+
lifecycle_hooks: typing.Optional[typing.Sequence["IDeploymentLifecycleHookTarget"]] = None,
|
|
25066
25792
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
25067
25793
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
25068
25794
|
propagate_tags: typing.Optional["PropagatedTagSource"] = None,
|
|
@@ -25082,15 +25808,18 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
25082
25808
|
'''The properties for defining a service using the EC2 launch type.
|
|
25083
25809
|
|
|
25084
25810
|
:param cluster: The name of the cluster that hosts the service.
|
|
25811
|
+
:param bake_time: bake time minutes for service. Default: - none
|
|
25085
25812
|
:param capacity_provider_strategies: A list of Capacity Provider strategies used to place a service. Default: - undefined
|
|
25086
25813
|
:param circuit_breaker: Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly enabled. Default: - disabled
|
|
25087
25814
|
:param cloud_map_options: The options for configuring an Amazon ECS service to use service discovery. Default: - AWS Cloud Map service discovery is not enabled.
|
|
25088
25815
|
:param deployment_alarms: The alarm(s) to monitor during deployment, and behavior to apply if at least one enters a state of alarm during the deployment or bake time. Default: - No alarms will be monitored during deployment.
|
|
25089
25816
|
:param deployment_controller: Specifies which deployment controller to use for the service. For more information, see `Amazon ECS Deployment Types <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html>`_ Default: - Rolling update (ECS)
|
|
25817
|
+
:param deployment_strategy: The deployment strategy to use for the service. Default: ROLLING
|
|
25090
25818
|
:param desired_count: The desired number of instantiations of the task definition to keep running on the service. Default: - When creating the service, default is 1; when updating the service, default uses the current task number.
|
|
25091
25819
|
:param enable_ecs_managed_tags: Specifies whether to enable Amazon ECS managed tags for the tasks within the service. For more information, see `Tagging Your Amazon ECS Resources <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html>`_ Default: false
|
|
25092
25820
|
:param enable_execute_command: Whether to enable the ability to execute into a container. Default: - undefined
|
|
25093
25821
|
:param health_check_grace_period: The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started. Default: - defaults to 60 seconds if at least one load balancer is in-use and it is not already set
|
|
25822
|
+
:param lifecycle_hooks: The lifecycle hooks to execute during deployment stages. Default: - none;
|
|
25094
25823
|
:param max_healthy_percent: The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment. Default: - 100 if daemon, otherwise 200
|
|
25095
25824
|
:param min_healthy_percent: The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment. Default: - 0 if daemon, otherwise 50
|
|
25096
25825
|
:param propagate_tags: Specifies whether to propagate the tags from the task definition or the service to the tasks in the service. Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE Default: PropagatedTagSource.NONE
|
|
@@ -25152,15 +25881,18 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
25152
25881
|
if __debug__:
|
|
25153
25882
|
type_hints = typing.get_type_hints(_typecheckingstub__95634258086aa3448fbdfd9896017a2cbeb858f382deb61186bb9e22b1ccd366)
|
|
25154
25883
|
check_type(argname="argument cluster", value=cluster, expected_type=type_hints["cluster"])
|
|
25884
|
+
check_type(argname="argument bake_time", value=bake_time, expected_type=type_hints["bake_time"])
|
|
25155
25885
|
check_type(argname="argument capacity_provider_strategies", value=capacity_provider_strategies, expected_type=type_hints["capacity_provider_strategies"])
|
|
25156
25886
|
check_type(argname="argument circuit_breaker", value=circuit_breaker, expected_type=type_hints["circuit_breaker"])
|
|
25157
25887
|
check_type(argname="argument cloud_map_options", value=cloud_map_options, expected_type=type_hints["cloud_map_options"])
|
|
25158
25888
|
check_type(argname="argument deployment_alarms", value=deployment_alarms, expected_type=type_hints["deployment_alarms"])
|
|
25159
25889
|
check_type(argname="argument deployment_controller", value=deployment_controller, expected_type=type_hints["deployment_controller"])
|
|
25890
|
+
check_type(argname="argument deployment_strategy", value=deployment_strategy, expected_type=type_hints["deployment_strategy"])
|
|
25160
25891
|
check_type(argname="argument desired_count", value=desired_count, expected_type=type_hints["desired_count"])
|
|
25161
25892
|
check_type(argname="argument enable_ecs_managed_tags", value=enable_ecs_managed_tags, expected_type=type_hints["enable_ecs_managed_tags"])
|
|
25162
25893
|
check_type(argname="argument enable_execute_command", value=enable_execute_command, expected_type=type_hints["enable_execute_command"])
|
|
25163
25894
|
check_type(argname="argument health_check_grace_period", value=health_check_grace_period, expected_type=type_hints["health_check_grace_period"])
|
|
25895
|
+
check_type(argname="argument lifecycle_hooks", value=lifecycle_hooks, expected_type=type_hints["lifecycle_hooks"])
|
|
25164
25896
|
check_type(argname="argument max_healthy_percent", value=max_healthy_percent, expected_type=type_hints["max_healthy_percent"])
|
|
25165
25897
|
check_type(argname="argument min_healthy_percent", value=min_healthy_percent, expected_type=type_hints["min_healthy_percent"])
|
|
25166
25898
|
check_type(argname="argument propagate_tags", value=propagate_tags, expected_type=type_hints["propagate_tags"])
|
|
@@ -25180,6 +25912,8 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
25180
25912
|
"cluster": cluster,
|
|
25181
25913
|
"task_definition": task_definition,
|
|
25182
25914
|
}
|
|
25915
|
+
if bake_time is not None:
|
|
25916
|
+
self._values["bake_time"] = bake_time
|
|
25183
25917
|
if capacity_provider_strategies is not None:
|
|
25184
25918
|
self._values["capacity_provider_strategies"] = capacity_provider_strategies
|
|
25185
25919
|
if circuit_breaker is not None:
|
|
@@ -25190,6 +25924,8 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
25190
25924
|
self._values["deployment_alarms"] = deployment_alarms
|
|
25191
25925
|
if deployment_controller is not None:
|
|
25192
25926
|
self._values["deployment_controller"] = deployment_controller
|
|
25927
|
+
if deployment_strategy is not None:
|
|
25928
|
+
self._values["deployment_strategy"] = deployment_strategy
|
|
25193
25929
|
if desired_count is not None:
|
|
25194
25930
|
self._values["desired_count"] = desired_count
|
|
25195
25931
|
if enable_ecs_managed_tags is not None:
|
|
@@ -25198,6 +25934,8 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
25198
25934
|
self._values["enable_execute_command"] = enable_execute_command
|
|
25199
25935
|
if health_check_grace_period is not None:
|
|
25200
25936
|
self._values["health_check_grace_period"] = health_check_grace_period
|
|
25937
|
+
if lifecycle_hooks is not None:
|
|
25938
|
+
self._values["lifecycle_hooks"] = lifecycle_hooks
|
|
25201
25939
|
if max_healthy_percent is not None:
|
|
25202
25940
|
self._values["max_healthy_percent"] = max_healthy_percent
|
|
25203
25941
|
if min_healthy_percent is not None:
|
|
@@ -25234,6 +25972,15 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
25234
25972
|
assert result is not None, "Required property 'cluster' is missing"
|
|
25235
25973
|
return typing.cast("ICluster", result)
|
|
25236
25974
|
|
|
25975
|
+
@builtins.property
|
|
25976
|
+
def bake_time(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
25977
|
+
'''bake time minutes for service.
|
|
25978
|
+
|
|
25979
|
+
:default: - none
|
|
25980
|
+
'''
|
|
25981
|
+
result = self._values.get("bake_time")
|
|
25982
|
+
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
25983
|
+
|
|
25237
25984
|
@builtins.property
|
|
25238
25985
|
def capacity_provider_strategies(
|
|
25239
25986
|
self,
|
|
@@ -25287,6 +26034,15 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
25287
26034
|
result = self._values.get("deployment_controller")
|
|
25288
26035
|
return typing.cast(typing.Optional[DeploymentController], result)
|
|
25289
26036
|
|
|
26037
|
+
@builtins.property
|
|
26038
|
+
def deployment_strategy(self) -> typing.Optional[DeploymentStrategy]:
|
|
26039
|
+
'''The deployment strategy to use for the service.
|
|
26040
|
+
|
|
26041
|
+
:default: ROLLING
|
|
26042
|
+
'''
|
|
26043
|
+
result = self._values.get("deployment_strategy")
|
|
26044
|
+
return typing.cast(typing.Optional[DeploymentStrategy], result)
|
|
26045
|
+
|
|
25290
26046
|
@builtins.property
|
|
25291
26047
|
def desired_count(self) -> typing.Optional[jsii.Number]:
|
|
25292
26048
|
'''The desired number of instantiations of the task definition to keep running on the service.
|
|
@@ -25329,6 +26085,17 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
25329
26085
|
result = self._values.get("health_check_grace_period")
|
|
25330
26086
|
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
25331
26087
|
|
|
26088
|
+
@builtins.property
|
|
26089
|
+
def lifecycle_hooks(
|
|
26090
|
+
self,
|
|
26091
|
+
) -> typing.Optional[typing.List["IDeploymentLifecycleHookTarget"]]:
|
|
26092
|
+
'''The lifecycle hooks to execute during deployment stages.
|
|
26093
|
+
|
|
26094
|
+
:default: - none;
|
|
26095
|
+
'''
|
|
26096
|
+
result = self._values.get("lifecycle_hooks")
|
|
26097
|
+
return typing.cast(typing.Optional[typing.List["IDeploymentLifecycleHookTarget"]], result)
|
|
26098
|
+
|
|
25332
26099
|
@builtins.property
|
|
25333
26100
|
def max_healthy_percent(self) -> typing.Optional[jsii.Number]:
|
|
25334
26101
|
'''The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
|
|
@@ -27044,15 +27811,18 @@ class ExternalServiceAttributes:
|
|
|
27044
27811
|
jsii_struct_bases=[BaseServiceOptions],
|
|
27045
27812
|
name_mapping={
|
|
27046
27813
|
"cluster": "cluster",
|
|
27814
|
+
"bake_time": "bakeTime",
|
|
27047
27815
|
"capacity_provider_strategies": "capacityProviderStrategies",
|
|
27048
27816
|
"circuit_breaker": "circuitBreaker",
|
|
27049
27817
|
"cloud_map_options": "cloudMapOptions",
|
|
27050
27818
|
"deployment_alarms": "deploymentAlarms",
|
|
27051
27819
|
"deployment_controller": "deploymentController",
|
|
27820
|
+
"deployment_strategy": "deploymentStrategy",
|
|
27052
27821
|
"desired_count": "desiredCount",
|
|
27053
27822
|
"enable_ecs_managed_tags": "enableECSManagedTags",
|
|
27054
27823
|
"enable_execute_command": "enableExecuteCommand",
|
|
27055
27824
|
"health_check_grace_period": "healthCheckGracePeriod",
|
|
27825
|
+
"lifecycle_hooks": "lifecycleHooks",
|
|
27056
27826
|
"max_healthy_percent": "maxHealthyPercent",
|
|
27057
27827
|
"min_healthy_percent": "minHealthyPercent",
|
|
27058
27828
|
"propagate_tags": "propagateTags",
|
|
@@ -27070,15 +27840,18 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27070
27840
|
self,
|
|
27071
27841
|
*,
|
|
27072
27842
|
cluster: "ICluster",
|
|
27843
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
27073
27844
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
27074
27845
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
27075
27846
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
27076
27847
|
deployment_alarms: typing.Optional[typing.Union["DeploymentAlarmConfig", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
27077
27848
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
27849
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
27078
27850
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
27079
27851
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
27080
27852
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
27081
27853
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
27854
|
+
lifecycle_hooks: typing.Optional[typing.Sequence["IDeploymentLifecycleHookTarget"]] = None,
|
|
27082
27855
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
27083
27856
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
27084
27857
|
propagate_tags: typing.Optional["PropagatedTagSource"] = None,
|
|
@@ -27093,15 +27866,18 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27093
27866
|
'''The properties for defining a service using the External launch type.
|
|
27094
27867
|
|
|
27095
27868
|
:param cluster: The name of the cluster that hosts the service.
|
|
27869
|
+
:param bake_time: bake time minutes for service. Default: - none
|
|
27096
27870
|
:param capacity_provider_strategies: A list of Capacity Provider strategies used to place a service. Default: - undefined
|
|
27097
27871
|
:param circuit_breaker: Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly enabled. Default: - disabled
|
|
27098
27872
|
:param cloud_map_options: The options for configuring an Amazon ECS service to use service discovery. Default: - AWS Cloud Map service discovery is not enabled.
|
|
27099
27873
|
:param deployment_alarms: The alarm(s) to monitor during deployment, and behavior to apply if at least one enters a state of alarm during the deployment or bake time. Default: - No alarms will be monitored during deployment.
|
|
27100
27874
|
:param deployment_controller: Specifies which deployment controller to use for the service. For more information, see `Amazon ECS Deployment Types <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html>`_ Default: - Rolling update (ECS)
|
|
27875
|
+
:param deployment_strategy: The deployment strategy to use for the service. Default: ROLLING
|
|
27101
27876
|
:param desired_count: The desired number of instantiations of the task definition to keep running on the service. Default: - When creating the service, default is 1; when updating the service, default uses the current task number.
|
|
27102
27877
|
:param enable_ecs_managed_tags: Specifies whether to enable Amazon ECS managed tags for the tasks within the service. For more information, see `Tagging Your Amazon ECS Resources <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html>`_ Default: false
|
|
27103
27878
|
:param enable_execute_command: Whether to enable the ability to execute into a container. Default: - undefined
|
|
27104
27879
|
:param health_check_grace_period: The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started. Default: - defaults to 60 seconds if at least one load balancer is in-use and it is not already set
|
|
27880
|
+
:param lifecycle_hooks: The lifecycle hooks to execute during deployment stages. Default: - none;
|
|
27105
27881
|
:param max_healthy_percent: The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment. Default: - 100 if daemon, otherwise 200
|
|
27106
27882
|
:param min_healthy_percent: The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment. Default: - 0 if daemon, otherwise 50
|
|
27107
27883
|
:param propagate_tags: Specifies whether to propagate the tags from the task definition or the service to the tasks in the service. Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE Default: PropagatedTagSource.NONE
|
|
@@ -27146,15 +27922,18 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27146
27922
|
if __debug__:
|
|
27147
27923
|
type_hints = typing.get_type_hints(_typecheckingstub__3cc413964caae89bfcfbcabff8356ffe5c054f46824be99731a77b64ec052a8a)
|
|
27148
27924
|
check_type(argname="argument cluster", value=cluster, expected_type=type_hints["cluster"])
|
|
27925
|
+
check_type(argname="argument bake_time", value=bake_time, expected_type=type_hints["bake_time"])
|
|
27149
27926
|
check_type(argname="argument capacity_provider_strategies", value=capacity_provider_strategies, expected_type=type_hints["capacity_provider_strategies"])
|
|
27150
27927
|
check_type(argname="argument circuit_breaker", value=circuit_breaker, expected_type=type_hints["circuit_breaker"])
|
|
27151
27928
|
check_type(argname="argument cloud_map_options", value=cloud_map_options, expected_type=type_hints["cloud_map_options"])
|
|
27152
27929
|
check_type(argname="argument deployment_alarms", value=deployment_alarms, expected_type=type_hints["deployment_alarms"])
|
|
27153
27930
|
check_type(argname="argument deployment_controller", value=deployment_controller, expected_type=type_hints["deployment_controller"])
|
|
27931
|
+
check_type(argname="argument deployment_strategy", value=deployment_strategy, expected_type=type_hints["deployment_strategy"])
|
|
27154
27932
|
check_type(argname="argument desired_count", value=desired_count, expected_type=type_hints["desired_count"])
|
|
27155
27933
|
check_type(argname="argument enable_ecs_managed_tags", value=enable_ecs_managed_tags, expected_type=type_hints["enable_ecs_managed_tags"])
|
|
27156
27934
|
check_type(argname="argument enable_execute_command", value=enable_execute_command, expected_type=type_hints["enable_execute_command"])
|
|
27157
27935
|
check_type(argname="argument health_check_grace_period", value=health_check_grace_period, expected_type=type_hints["health_check_grace_period"])
|
|
27936
|
+
check_type(argname="argument lifecycle_hooks", value=lifecycle_hooks, expected_type=type_hints["lifecycle_hooks"])
|
|
27158
27937
|
check_type(argname="argument max_healthy_percent", value=max_healthy_percent, expected_type=type_hints["max_healthy_percent"])
|
|
27159
27938
|
check_type(argname="argument min_healthy_percent", value=min_healthy_percent, expected_type=type_hints["min_healthy_percent"])
|
|
27160
27939
|
check_type(argname="argument propagate_tags", value=propagate_tags, expected_type=type_hints["propagate_tags"])
|
|
@@ -27169,6 +27948,8 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27169
27948
|
"cluster": cluster,
|
|
27170
27949
|
"task_definition": task_definition,
|
|
27171
27950
|
}
|
|
27951
|
+
if bake_time is not None:
|
|
27952
|
+
self._values["bake_time"] = bake_time
|
|
27172
27953
|
if capacity_provider_strategies is not None:
|
|
27173
27954
|
self._values["capacity_provider_strategies"] = capacity_provider_strategies
|
|
27174
27955
|
if circuit_breaker is not None:
|
|
@@ -27179,6 +27960,8 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27179
27960
|
self._values["deployment_alarms"] = deployment_alarms
|
|
27180
27961
|
if deployment_controller is not None:
|
|
27181
27962
|
self._values["deployment_controller"] = deployment_controller
|
|
27963
|
+
if deployment_strategy is not None:
|
|
27964
|
+
self._values["deployment_strategy"] = deployment_strategy
|
|
27182
27965
|
if desired_count is not None:
|
|
27183
27966
|
self._values["desired_count"] = desired_count
|
|
27184
27967
|
if enable_ecs_managed_tags is not None:
|
|
@@ -27187,6 +27970,8 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27187
27970
|
self._values["enable_execute_command"] = enable_execute_command
|
|
27188
27971
|
if health_check_grace_period is not None:
|
|
27189
27972
|
self._values["health_check_grace_period"] = health_check_grace_period
|
|
27973
|
+
if lifecycle_hooks is not None:
|
|
27974
|
+
self._values["lifecycle_hooks"] = lifecycle_hooks
|
|
27190
27975
|
if max_healthy_percent is not None:
|
|
27191
27976
|
self._values["max_healthy_percent"] = max_healthy_percent
|
|
27192
27977
|
if min_healthy_percent is not None:
|
|
@@ -27213,6 +27998,15 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27213
27998
|
assert result is not None, "Required property 'cluster' is missing"
|
|
27214
27999
|
return typing.cast("ICluster", result)
|
|
27215
28000
|
|
|
28001
|
+
@builtins.property
|
|
28002
|
+
def bake_time(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
28003
|
+
'''bake time minutes for service.
|
|
28004
|
+
|
|
28005
|
+
:default: - none
|
|
28006
|
+
'''
|
|
28007
|
+
result = self._values.get("bake_time")
|
|
28008
|
+
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
28009
|
+
|
|
27216
28010
|
@builtins.property
|
|
27217
28011
|
def capacity_provider_strategies(
|
|
27218
28012
|
self,
|
|
@@ -27266,6 +28060,15 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27266
28060
|
result = self._values.get("deployment_controller")
|
|
27267
28061
|
return typing.cast(typing.Optional[DeploymentController], result)
|
|
27268
28062
|
|
|
28063
|
+
@builtins.property
|
|
28064
|
+
def deployment_strategy(self) -> typing.Optional[DeploymentStrategy]:
|
|
28065
|
+
'''The deployment strategy to use for the service.
|
|
28066
|
+
|
|
28067
|
+
:default: ROLLING
|
|
28068
|
+
'''
|
|
28069
|
+
result = self._values.get("deployment_strategy")
|
|
28070
|
+
return typing.cast(typing.Optional[DeploymentStrategy], result)
|
|
28071
|
+
|
|
27269
28072
|
@builtins.property
|
|
27270
28073
|
def desired_count(self) -> typing.Optional[jsii.Number]:
|
|
27271
28074
|
'''The desired number of instantiations of the task definition to keep running on the service.
|
|
@@ -27308,6 +28111,17 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27308
28111
|
result = self._values.get("health_check_grace_period")
|
|
27309
28112
|
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
27310
28113
|
|
|
28114
|
+
@builtins.property
|
|
28115
|
+
def lifecycle_hooks(
|
|
28116
|
+
self,
|
|
28117
|
+
) -> typing.Optional[typing.List["IDeploymentLifecycleHookTarget"]]:
|
|
28118
|
+
'''The lifecycle hooks to execute during deployment stages.
|
|
28119
|
+
|
|
28120
|
+
:default: - none;
|
|
28121
|
+
'''
|
|
28122
|
+
result = self._values.get("lifecycle_hooks")
|
|
28123
|
+
return typing.cast(typing.Optional[typing.List["IDeploymentLifecycleHookTarget"]], result)
|
|
28124
|
+
|
|
27311
28125
|
@builtins.property
|
|
27312
28126
|
def max_healthy_percent(self) -> typing.Optional[jsii.Number]:
|
|
27313
28127
|
'''The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
|
|
@@ -27888,15 +28702,18 @@ class FargateServiceAttributes:
|
|
|
27888
28702
|
jsii_struct_bases=[BaseServiceOptions],
|
|
27889
28703
|
name_mapping={
|
|
27890
28704
|
"cluster": "cluster",
|
|
28705
|
+
"bake_time": "bakeTime",
|
|
27891
28706
|
"capacity_provider_strategies": "capacityProviderStrategies",
|
|
27892
28707
|
"circuit_breaker": "circuitBreaker",
|
|
27893
28708
|
"cloud_map_options": "cloudMapOptions",
|
|
27894
28709
|
"deployment_alarms": "deploymentAlarms",
|
|
27895
28710
|
"deployment_controller": "deploymentController",
|
|
28711
|
+
"deployment_strategy": "deploymentStrategy",
|
|
27896
28712
|
"desired_count": "desiredCount",
|
|
27897
28713
|
"enable_ecs_managed_tags": "enableECSManagedTags",
|
|
27898
28714
|
"enable_execute_command": "enableExecuteCommand",
|
|
27899
28715
|
"health_check_grace_period": "healthCheckGracePeriod",
|
|
28716
|
+
"lifecycle_hooks": "lifecycleHooks",
|
|
27900
28717
|
"max_healthy_percent": "maxHealthyPercent",
|
|
27901
28718
|
"min_healthy_percent": "minHealthyPercent",
|
|
27902
28719
|
"propagate_tags": "propagateTags",
|
|
@@ -27917,15 +28734,18 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
27917
28734
|
self,
|
|
27918
28735
|
*,
|
|
27919
28736
|
cluster: "ICluster",
|
|
28737
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
27920
28738
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
27921
28739
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
27922
28740
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
27923
28741
|
deployment_alarms: typing.Optional[typing.Union["DeploymentAlarmConfig", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
27924
28742
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
28743
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
27925
28744
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
27926
28745
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
27927
28746
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
27928
28747
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
28748
|
+
lifecycle_hooks: typing.Optional[typing.Sequence["IDeploymentLifecycleHookTarget"]] = None,
|
|
27929
28749
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
27930
28750
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
27931
28751
|
propagate_tags: typing.Optional["PropagatedTagSource"] = None,
|
|
@@ -27943,15 +28763,18 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
27943
28763
|
'''The properties for defining a service using the Fargate launch type.
|
|
27944
28764
|
|
|
27945
28765
|
:param cluster: The name of the cluster that hosts the service.
|
|
28766
|
+
:param bake_time: bake time minutes for service. Default: - none
|
|
27946
28767
|
:param capacity_provider_strategies: A list of Capacity Provider strategies used to place a service. Default: - undefined
|
|
27947
28768
|
:param circuit_breaker: Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly enabled. Default: - disabled
|
|
27948
28769
|
:param cloud_map_options: The options for configuring an Amazon ECS service to use service discovery. Default: - AWS Cloud Map service discovery is not enabled.
|
|
27949
28770
|
:param deployment_alarms: The alarm(s) to monitor during deployment, and behavior to apply if at least one enters a state of alarm during the deployment or bake time. Default: - No alarms will be monitored during deployment.
|
|
27950
28771
|
:param deployment_controller: Specifies which deployment controller to use for the service. For more information, see `Amazon ECS Deployment Types <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html>`_ Default: - Rolling update (ECS)
|
|
28772
|
+
:param deployment_strategy: The deployment strategy to use for the service. Default: ROLLING
|
|
27951
28773
|
:param desired_count: The desired number of instantiations of the task definition to keep running on the service. Default: - When creating the service, default is 1; when updating the service, default uses the current task number.
|
|
27952
28774
|
:param enable_ecs_managed_tags: Specifies whether to enable Amazon ECS managed tags for the tasks within the service. For more information, see `Tagging Your Amazon ECS Resources <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html>`_ Default: false
|
|
27953
28775
|
:param enable_execute_command: Whether to enable the ability to execute into a container. Default: - undefined
|
|
27954
28776
|
:param health_check_grace_period: The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started. Default: - defaults to 60 seconds if at least one load balancer is in-use and it is not already set
|
|
28777
|
+
:param lifecycle_hooks: The lifecycle hooks to execute during deployment stages. Default: - none;
|
|
27955
28778
|
:param max_healthy_percent: The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment. Default: - 100 if daemon, otherwise 200
|
|
27956
28779
|
:param min_healthy_percent: The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment. Default: - 0 if daemon, otherwise 50
|
|
27957
28780
|
:param propagate_tags: Specifies whether to propagate the tags from the task definition or the service to the tasks in the service. Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE Default: PropagatedTagSource.NONE
|
|
@@ -28014,15 +28837,18 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
28014
28837
|
if __debug__:
|
|
28015
28838
|
type_hints = typing.get_type_hints(_typecheckingstub__8290283f61f3e2d289b7e7f81cad1a5d1e9ed9dbc07ccce2b57604682a42ded7)
|
|
28016
28839
|
check_type(argname="argument cluster", value=cluster, expected_type=type_hints["cluster"])
|
|
28840
|
+
check_type(argname="argument bake_time", value=bake_time, expected_type=type_hints["bake_time"])
|
|
28017
28841
|
check_type(argname="argument capacity_provider_strategies", value=capacity_provider_strategies, expected_type=type_hints["capacity_provider_strategies"])
|
|
28018
28842
|
check_type(argname="argument circuit_breaker", value=circuit_breaker, expected_type=type_hints["circuit_breaker"])
|
|
28019
28843
|
check_type(argname="argument cloud_map_options", value=cloud_map_options, expected_type=type_hints["cloud_map_options"])
|
|
28020
28844
|
check_type(argname="argument deployment_alarms", value=deployment_alarms, expected_type=type_hints["deployment_alarms"])
|
|
28021
28845
|
check_type(argname="argument deployment_controller", value=deployment_controller, expected_type=type_hints["deployment_controller"])
|
|
28846
|
+
check_type(argname="argument deployment_strategy", value=deployment_strategy, expected_type=type_hints["deployment_strategy"])
|
|
28022
28847
|
check_type(argname="argument desired_count", value=desired_count, expected_type=type_hints["desired_count"])
|
|
28023
28848
|
check_type(argname="argument enable_ecs_managed_tags", value=enable_ecs_managed_tags, expected_type=type_hints["enable_ecs_managed_tags"])
|
|
28024
28849
|
check_type(argname="argument enable_execute_command", value=enable_execute_command, expected_type=type_hints["enable_execute_command"])
|
|
28025
28850
|
check_type(argname="argument health_check_grace_period", value=health_check_grace_period, expected_type=type_hints["health_check_grace_period"])
|
|
28851
|
+
check_type(argname="argument lifecycle_hooks", value=lifecycle_hooks, expected_type=type_hints["lifecycle_hooks"])
|
|
28026
28852
|
check_type(argname="argument max_healthy_percent", value=max_healthy_percent, expected_type=type_hints["max_healthy_percent"])
|
|
28027
28853
|
check_type(argname="argument min_healthy_percent", value=min_healthy_percent, expected_type=type_hints["min_healthy_percent"])
|
|
28028
28854
|
check_type(argname="argument propagate_tags", value=propagate_tags, expected_type=type_hints["propagate_tags"])
|
|
@@ -28040,6 +28866,8 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
28040
28866
|
"cluster": cluster,
|
|
28041
28867
|
"task_definition": task_definition,
|
|
28042
28868
|
}
|
|
28869
|
+
if bake_time is not None:
|
|
28870
|
+
self._values["bake_time"] = bake_time
|
|
28043
28871
|
if capacity_provider_strategies is not None:
|
|
28044
28872
|
self._values["capacity_provider_strategies"] = capacity_provider_strategies
|
|
28045
28873
|
if circuit_breaker is not None:
|
|
@@ -28050,6 +28878,8 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
28050
28878
|
self._values["deployment_alarms"] = deployment_alarms
|
|
28051
28879
|
if deployment_controller is not None:
|
|
28052
28880
|
self._values["deployment_controller"] = deployment_controller
|
|
28881
|
+
if deployment_strategy is not None:
|
|
28882
|
+
self._values["deployment_strategy"] = deployment_strategy
|
|
28053
28883
|
if desired_count is not None:
|
|
28054
28884
|
self._values["desired_count"] = desired_count
|
|
28055
28885
|
if enable_ecs_managed_tags is not None:
|
|
@@ -28058,6 +28888,8 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
28058
28888
|
self._values["enable_execute_command"] = enable_execute_command
|
|
28059
28889
|
if health_check_grace_period is not None:
|
|
28060
28890
|
self._values["health_check_grace_period"] = health_check_grace_period
|
|
28891
|
+
if lifecycle_hooks is not None:
|
|
28892
|
+
self._values["lifecycle_hooks"] = lifecycle_hooks
|
|
28061
28893
|
if max_healthy_percent is not None:
|
|
28062
28894
|
self._values["max_healthy_percent"] = max_healthy_percent
|
|
28063
28895
|
if min_healthy_percent is not None:
|
|
@@ -28090,6 +28922,15 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
28090
28922
|
assert result is not None, "Required property 'cluster' is missing"
|
|
28091
28923
|
return typing.cast("ICluster", result)
|
|
28092
28924
|
|
|
28925
|
+
@builtins.property
|
|
28926
|
+
def bake_time(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
28927
|
+
'''bake time minutes for service.
|
|
28928
|
+
|
|
28929
|
+
:default: - none
|
|
28930
|
+
'''
|
|
28931
|
+
result = self._values.get("bake_time")
|
|
28932
|
+
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
28933
|
+
|
|
28093
28934
|
@builtins.property
|
|
28094
28935
|
def capacity_provider_strategies(
|
|
28095
28936
|
self,
|
|
@@ -28143,6 +28984,15 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
28143
28984
|
result = self._values.get("deployment_controller")
|
|
28144
28985
|
return typing.cast(typing.Optional[DeploymentController], result)
|
|
28145
28986
|
|
|
28987
|
+
@builtins.property
|
|
28988
|
+
def deployment_strategy(self) -> typing.Optional[DeploymentStrategy]:
|
|
28989
|
+
'''The deployment strategy to use for the service.
|
|
28990
|
+
|
|
28991
|
+
:default: ROLLING
|
|
28992
|
+
'''
|
|
28993
|
+
result = self._values.get("deployment_strategy")
|
|
28994
|
+
return typing.cast(typing.Optional[DeploymentStrategy], result)
|
|
28995
|
+
|
|
28146
28996
|
@builtins.property
|
|
28147
28997
|
def desired_count(self) -> typing.Optional[jsii.Number]:
|
|
28148
28998
|
'''The desired number of instantiations of the task definition to keep running on the service.
|
|
@@ -28185,6 +29035,17 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
28185
29035
|
result = self._values.get("health_check_grace_period")
|
|
28186
29036
|
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
28187
29037
|
|
|
29038
|
+
@builtins.property
|
|
29039
|
+
def lifecycle_hooks(
|
|
29040
|
+
self,
|
|
29041
|
+
) -> typing.Optional[typing.List["IDeploymentLifecycleHookTarget"]]:
|
|
29042
|
+
'''The lifecycle hooks to execute during deployment stages.
|
|
29043
|
+
|
|
29044
|
+
:default: - none;
|
|
29045
|
+
'''
|
|
29046
|
+
result = self._values.get("lifecycle_hooks")
|
|
29047
|
+
return typing.cast(typing.Optional[typing.List["IDeploymentLifecycleHookTarget"]], result)
|
|
29048
|
+
|
|
28188
29049
|
@builtins.property
|
|
28189
29050
|
def max_healthy_percent(self) -> typing.Optional[jsii.Number]:
|
|
28190
29051
|
'''The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
|
|
@@ -31828,6 +32689,43 @@ class Host:
|
|
|
31828
32689
|
)
|
|
31829
32690
|
|
|
31830
32691
|
|
|
32692
|
+
@jsii.interface(jsii_type="aws-cdk-lib.aws_ecs.IAlternateTarget")
|
|
32693
|
+
class IAlternateTarget(typing_extensions.Protocol):
|
|
32694
|
+
'''Interface for configuring alternate target groups for blue/green deployments.'''
|
|
32695
|
+
|
|
32696
|
+
@jsii.member(jsii_name="bind")
|
|
32697
|
+
def bind(self, scope: _constructs_77d1e7e8.IConstruct) -> AlternateTargetConfig:
|
|
32698
|
+
'''Bind this configuration to a service.
|
|
32699
|
+
|
|
32700
|
+
:param scope: The construct scope.
|
|
32701
|
+
|
|
32702
|
+
:return: The configuration to apply to the service
|
|
32703
|
+
'''
|
|
32704
|
+
...
|
|
32705
|
+
|
|
32706
|
+
|
|
32707
|
+
class _IAlternateTargetProxy:
|
|
32708
|
+
'''Interface for configuring alternate target groups for blue/green deployments.'''
|
|
32709
|
+
|
|
32710
|
+
__jsii_type__: typing.ClassVar[str] = "aws-cdk-lib.aws_ecs.IAlternateTarget"
|
|
32711
|
+
|
|
32712
|
+
@jsii.member(jsii_name="bind")
|
|
32713
|
+
def bind(self, scope: _constructs_77d1e7e8.IConstruct) -> AlternateTargetConfig:
|
|
32714
|
+
'''Bind this configuration to a service.
|
|
32715
|
+
|
|
32716
|
+
:param scope: The construct scope.
|
|
32717
|
+
|
|
32718
|
+
:return: The configuration to apply to the service
|
|
32719
|
+
'''
|
|
32720
|
+
if __debug__:
|
|
32721
|
+
type_hints = typing.get_type_hints(_typecheckingstub__1f10764be69e962209020c3a7e772567f1cbc3d3673cf209506562511ce9cd0a)
|
|
32722
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
32723
|
+
return typing.cast(AlternateTargetConfig, jsii.invoke(self, "bind", [scope]))
|
|
32724
|
+
|
|
32725
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
|
|
32726
|
+
typing.cast(typing.Any, IAlternateTarget).__jsii_proxy_class__ = lambda : _IAlternateTargetProxy
|
|
32727
|
+
|
|
32728
|
+
|
|
31831
32729
|
@jsii.interface(jsii_type="aws-cdk-lib.aws_ecs.ICluster")
|
|
31832
32730
|
class ICluster(_IResource_c80c4260, typing_extensions.Protocol):
|
|
31833
32731
|
'''A regional grouping of one or more container instances on which you can run tasks and services.'''
|
|
@@ -31956,6 +32854,45 @@ class _IClusterProxy(
|
|
|
31956
32854
|
typing.cast(typing.Any, ICluster).__jsii_proxy_class__ = lambda : _IClusterProxy
|
|
31957
32855
|
|
|
31958
32856
|
|
|
32857
|
+
@jsii.interface(jsii_type="aws-cdk-lib.aws_ecs.IDeploymentLifecycleHookTarget")
|
|
32858
|
+
class IDeploymentLifecycleHookTarget(typing_extensions.Protocol):
|
|
32859
|
+
'''Interface for deployment lifecycle hook targets.'''
|
|
32860
|
+
|
|
32861
|
+
@jsii.member(jsii_name="bind")
|
|
32862
|
+
def bind(
|
|
32863
|
+
self,
|
|
32864
|
+
scope: _constructs_77d1e7e8.IConstruct,
|
|
32865
|
+
) -> DeploymentLifecycleHookTargetConfig:
|
|
32866
|
+
'''Bind this target to a deployment lifecycle hook.
|
|
32867
|
+
|
|
32868
|
+
:param scope: The construct scope.
|
|
32869
|
+
'''
|
|
32870
|
+
...
|
|
32871
|
+
|
|
32872
|
+
|
|
32873
|
+
class _IDeploymentLifecycleHookTargetProxy:
|
|
32874
|
+
'''Interface for deployment lifecycle hook targets.'''
|
|
32875
|
+
|
|
32876
|
+
__jsii_type__: typing.ClassVar[str] = "aws-cdk-lib.aws_ecs.IDeploymentLifecycleHookTarget"
|
|
32877
|
+
|
|
32878
|
+
@jsii.member(jsii_name="bind")
|
|
32879
|
+
def bind(
|
|
32880
|
+
self,
|
|
32881
|
+
scope: _constructs_77d1e7e8.IConstruct,
|
|
32882
|
+
) -> DeploymentLifecycleHookTargetConfig:
|
|
32883
|
+
'''Bind this target to a deployment lifecycle hook.
|
|
32884
|
+
|
|
32885
|
+
:param scope: The construct scope.
|
|
32886
|
+
'''
|
|
32887
|
+
if __debug__:
|
|
32888
|
+
type_hints = typing.get_type_hints(_typecheckingstub__1cdcc51dc61399e62078243a225e42fd6901317236efebe039a9e3b36834d4b7)
|
|
32889
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
32890
|
+
return typing.cast(DeploymentLifecycleHookTargetConfig, jsii.invoke(self, "bind", [scope]))
|
|
32891
|
+
|
|
32892
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
|
|
32893
|
+
typing.cast(typing.Any, IDeploymentLifecycleHookTarget).__jsii_proxy_class__ = lambda : _IDeploymentLifecycleHookTargetProxy
|
|
32894
|
+
|
|
32895
|
+
|
|
31959
32896
|
@jsii.interface(jsii_type="aws-cdk-lib.aws_ecs.IEcsLoadBalancerTarget")
|
|
31960
32897
|
class IEcsLoadBalancerTarget(
|
|
31961
32898
|
_IApplicationLoadBalancerTarget_fabf9003,
|
|
@@ -33030,6 +33967,89 @@ class _ListenerConfigProxy(ListenerConfig):
|
|
|
33030
33967
|
typing.cast(typing.Any, ListenerConfig).__jsii_proxy_class__ = lambda : _ListenerConfigProxy
|
|
33031
33968
|
|
|
33032
33969
|
|
|
33970
|
+
class ListenerRuleConfiguration(
|
|
33971
|
+
metaclass=jsii.JSIIAbstractClass,
|
|
33972
|
+
jsii_type="aws-cdk-lib.aws_ecs.ListenerRuleConfiguration",
|
|
33973
|
+
):
|
|
33974
|
+
'''Represents a listener configuration for advanced load balancer settings.
|
|
33975
|
+
|
|
33976
|
+
:exampleMetadata: infused
|
|
33977
|
+
|
|
33978
|
+
Example::
|
|
33979
|
+
|
|
33980
|
+
import aws_cdk.aws_lambda as lambda_
|
|
33981
|
+
|
|
33982
|
+
# cluster: ecs.Cluster
|
|
33983
|
+
# task_definition: ecs.TaskDefinition
|
|
33984
|
+
# lambda_hook: lambda.Function
|
|
33985
|
+
# blue_target_group: elbv2.ApplicationTargetGroup
|
|
33986
|
+
# green_target_group: elbv2.ApplicationTargetGroup
|
|
33987
|
+
# prod_listener_rule: elbv2.ApplicationListenerRule
|
|
33988
|
+
|
|
33989
|
+
|
|
33990
|
+
service = ecs.FargateService(self, "Service",
|
|
33991
|
+
cluster=cluster,
|
|
33992
|
+
task_definition=task_definition,
|
|
33993
|
+
deployment_strategy=ecs.DeploymentStrategy.BLUE_GREEN
|
|
33994
|
+
)
|
|
33995
|
+
|
|
33996
|
+
service.add_lifecycle_hook(ecs.DeploymentLifecycleLambdaTarget(lambda_hook, "PreScaleHook",
|
|
33997
|
+
lifecycle_stages=[ecs.DeploymentLifecycleStage.PRE_SCALE_UP]
|
|
33998
|
+
))
|
|
33999
|
+
|
|
34000
|
+
target = service.load_balancer_target(ecs.LoadBalancerTargetOptions(
|
|
34001
|
+
container_name="nginx",
|
|
34002
|
+
container_port=80,
|
|
34003
|
+
protocol=ecs.Protocol.TCP
|
|
34004
|
+
), ecs.AlternateTarget("AlternateTarget",
|
|
34005
|
+
alternate_target_group=green_target_group,
|
|
34006
|
+
production_listener=ecs.ListenerRuleConfiguration.application_listener_rule(prod_listener_rule)
|
|
34007
|
+
))
|
|
34008
|
+
|
|
34009
|
+
target.attach_to_application_target_group(blue_target_group)
|
|
34010
|
+
'''
|
|
34011
|
+
|
|
34012
|
+
def __init__(self) -> None:
|
|
34013
|
+
jsii.create(self.__class__, self, [])
|
|
34014
|
+
|
|
34015
|
+
@jsii.member(jsii_name="applicationListenerRule")
|
|
34016
|
+
@builtins.classmethod
|
|
34017
|
+
def application_listener_rule(
|
|
34018
|
+
cls,
|
|
34019
|
+
rule: _ApplicationListenerRule_f93ff606,
|
|
34020
|
+
) -> "ListenerRuleConfiguration":
|
|
34021
|
+
'''Use an Application Load Balancer listener rule.
|
|
34022
|
+
|
|
34023
|
+
:param rule: -
|
|
34024
|
+
'''
|
|
34025
|
+
if __debug__:
|
|
34026
|
+
type_hints = typing.get_type_hints(_typecheckingstub__e4bdbe1ec0e220912f9ff8b7769875a4eebd5168734b702329f9d4600ecdb318)
|
|
34027
|
+
check_type(argname="argument rule", value=rule, expected_type=type_hints["rule"])
|
|
34028
|
+
return typing.cast("ListenerRuleConfiguration", jsii.sinvoke(cls, "applicationListenerRule", [rule]))
|
|
34029
|
+
|
|
34030
|
+
@jsii.member(jsii_name="networkListener")
|
|
34031
|
+
@builtins.classmethod
|
|
34032
|
+
def network_listener(
|
|
34033
|
+
cls,
|
|
34034
|
+
listener: _NetworkListener_539c17bf,
|
|
34035
|
+
) -> "ListenerRuleConfiguration":
|
|
34036
|
+
'''Use a Network Load Balancer listener.
|
|
34037
|
+
|
|
34038
|
+
:param listener: -
|
|
34039
|
+
'''
|
|
34040
|
+
if __debug__:
|
|
34041
|
+
type_hints = typing.get_type_hints(_typecheckingstub__c964a7ba26c195318cd3937b823b36facecf4120aeb9196876feb206f6f9855a)
|
|
34042
|
+
check_type(argname="argument listener", value=listener, expected_type=type_hints["listener"])
|
|
34043
|
+
return typing.cast("ListenerRuleConfiguration", jsii.sinvoke(cls, "networkListener", [listener]))
|
|
34044
|
+
|
|
34045
|
+
|
|
34046
|
+
class _ListenerRuleConfigurationProxy(ListenerRuleConfiguration):
|
|
34047
|
+
pass
|
|
34048
|
+
|
|
34049
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
|
|
34050
|
+
typing.cast(typing.Any, ListenerRuleConfiguration).__jsii_proxy_class__ = lambda : _ListenerRuleConfigurationProxy
|
|
34051
|
+
|
|
34052
|
+
|
|
33033
34053
|
@jsii.data_type(
|
|
33034
34054
|
jsii_type="aws-cdk-lib.aws_ecs.LoadBalancerTargetOptions",
|
|
33035
34055
|
jsii_struct_bases=[],
|
|
@@ -34716,34 +35736,36 @@ class Protocol(enum.Enum):
|
|
|
34716
35736
|
|
|
34717
35737
|
Example::
|
|
34718
35738
|
|
|
34719
|
-
|
|
35739
|
+
import aws_cdk.aws_lambda as lambda_
|
|
35740
|
+
|
|
34720
35741
|
# cluster: ecs.Cluster
|
|
35742
|
+
# task_definition: ecs.TaskDefinition
|
|
35743
|
+
# lambda_hook: lambda.Function
|
|
35744
|
+
# blue_target_group: elbv2.ApplicationTargetGroup
|
|
35745
|
+
# green_target_group: elbv2.ApplicationTargetGroup
|
|
35746
|
+
# prod_listener_rule: elbv2.ApplicationListenerRule
|
|
34721
35747
|
|
|
34722
35748
|
|
|
34723
|
-
|
|
34724
|
-
|
|
34725
|
-
|
|
34726
|
-
|
|
35749
|
+
service = ecs.FargateService(self, "Service",
|
|
35750
|
+
cluster=cluster,
|
|
35751
|
+
task_definition=task_definition,
|
|
35752
|
+
deployment_strategy=ecs.DeploymentStrategy.BLUE_GREEN
|
|
34727
35753
|
)
|
|
34728
35754
|
|
|
34729
|
-
|
|
34730
|
-
|
|
34731
|
-
|
|
35755
|
+
service.add_lifecycle_hook(ecs.DeploymentLifecycleLambdaTarget(lambda_hook, "PreScaleHook",
|
|
35756
|
+
lifecycle_stages=[ecs.DeploymentLifecycleStage.PRE_SCALE_UP]
|
|
35757
|
+
))
|
|
35758
|
+
|
|
35759
|
+
target = service.load_balancer_target(ecs.LoadBalancerTargetOptions(
|
|
35760
|
+
container_name="nginx",
|
|
35761
|
+
container_port=80,
|
|
34732
35762
|
protocol=ecs.Protocol.TCP
|
|
34733
|
-
)
|
|
35763
|
+
), ecs.AlternateTarget("AlternateTarget",
|
|
35764
|
+
alternate_target_group=green_target_group,
|
|
35765
|
+
production_listener=ecs.ListenerRuleConfiguration.application_listener_rule(prod_listener_rule)
|
|
35766
|
+
))
|
|
34734
35767
|
|
|
34735
|
-
|
|
34736
|
-
cluster=cluster,
|
|
34737
|
-
task_definition=task_definition,
|
|
34738
|
-
min_healthy_percent=100,
|
|
34739
|
-
cloud_map_options=ecs.CloudMapOptions(
|
|
34740
|
-
# Create SRV records - useful for bridge networking
|
|
34741
|
-
dns_record_type=cloudmap.DnsRecordType.SRV,
|
|
34742
|
-
# Targets port TCP port 7600 `specificContainer`
|
|
34743
|
-
container=specific_container,
|
|
34744
|
-
container_port=7600
|
|
34745
|
-
)
|
|
34746
|
-
)
|
|
35768
|
+
target.attach_to_application_target_group(blue_target_group)
|
|
34747
35769
|
'''
|
|
34748
35770
|
|
|
34749
35771
|
TCP = "TCP"
|
|
@@ -40004,6 +41026,89 @@ class WindowsOptimizedVersion(enum.Enum):
|
|
|
40004
41026
|
SERVER_2016 = "SERVER_2016"
|
|
40005
41027
|
|
|
40006
41028
|
|
|
41029
|
+
@jsii.implements(IAlternateTarget)
|
|
41030
|
+
class AlternateTarget(
|
|
41031
|
+
metaclass=jsii.JSIIMeta,
|
|
41032
|
+
jsii_type="aws-cdk-lib.aws_ecs.AlternateTarget",
|
|
41033
|
+
):
|
|
41034
|
+
'''Configuration for alternate target groups used in blue/green deployments with load balancers.
|
|
41035
|
+
|
|
41036
|
+
:exampleMetadata: infused
|
|
41037
|
+
|
|
41038
|
+
Example::
|
|
41039
|
+
|
|
41040
|
+
import aws_cdk.aws_lambda as lambda_
|
|
41041
|
+
|
|
41042
|
+
# cluster: ecs.Cluster
|
|
41043
|
+
# task_definition: ecs.TaskDefinition
|
|
41044
|
+
# lambda_hook: lambda.Function
|
|
41045
|
+
# blue_target_group: elbv2.ApplicationTargetGroup
|
|
41046
|
+
# green_target_group: elbv2.ApplicationTargetGroup
|
|
41047
|
+
# prod_listener_rule: elbv2.ApplicationListenerRule
|
|
41048
|
+
|
|
41049
|
+
|
|
41050
|
+
service = ecs.FargateService(self, "Service",
|
|
41051
|
+
cluster=cluster,
|
|
41052
|
+
task_definition=task_definition,
|
|
41053
|
+
deployment_strategy=ecs.DeploymentStrategy.BLUE_GREEN
|
|
41054
|
+
)
|
|
41055
|
+
|
|
41056
|
+
service.add_lifecycle_hook(ecs.DeploymentLifecycleLambdaTarget(lambda_hook, "PreScaleHook",
|
|
41057
|
+
lifecycle_stages=[ecs.DeploymentLifecycleStage.PRE_SCALE_UP]
|
|
41058
|
+
))
|
|
41059
|
+
|
|
41060
|
+
target = service.load_balancer_target(ecs.LoadBalancerTargetOptions(
|
|
41061
|
+
container_name="nginx",
|
|
41062
|
+
container_port=80,
|
|
41063
|
+
protocol=ecs.Protocol.TCP
|
|
41064
|
+
), ecs.AlternateTarget("AlternateTarget",
|
|
41065
|
+
alternate_target_group=green_target_group,
|
|
41066
|
+
production_listener=ecs.ListenerRuleConfiguration.application_listener_rule(prod_listener_rule)
|
|
41067
|
+
))
|
|
41068
|
+
|
|
41069
|
+
target.attach_to_application_target_group(blue_target_group)
|
|
41070
|
+
'''
|
|
41071
|
+
|
|
41072
|
+
def __init__(
|
|
41073
|
+
self,
|
|
41074
|
+
id: builtins.str,
|
|
41075
|
+
*,
|
|
41076
|
+
alternate_target_group: _ITargetGroup_83c6f8c4,
|
|
41077
|
+
production_listener: ListenerRuleConfiguration,
|
|
41078
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
41079
|
+
test_listener: typing.Optional[ListenerRuleConfiguration] = None,
|
|
41080
|
+
) -> None:
|
|
41081
|
+
'''
|
|
41082
|
+
:param id: -
|
|
41083
|
+
:param alternate_target_group: The alternate target group.
|
|
41084
|
+
:param production_listener: The production listener rule ARN (ALB) or listener ARN (NLB).
|
|
41085
|
+
:param role: The IAM role for the configuration. Default: - a new role will be created
|
|
41086
|
+
:param test_listener: The test listener configuration. Default: - none
|
|
41087
|
+
'''
|
|
41088
|
+
if __debug__:
|
|
41089
|
+
type_hints = typing.get_type_hints(_typecheckingstub__aa25b044df0e4eef1817fd07bd799a88800df4e6bd79f283ca2657cfee9e4b29)
|
|
41090
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
41091
|
+
props = AlternateTargetProps(
|
|
41092
|
+
alternate_target_group=alternate_target_group,
|
|
41093
|
+
production_listener=production_listener,
|
|
41094
|
+
role=role,
|
|
41095
|
+
test_listener=test_listener,
|
|
41096
|
+
)
|
|
41097
|
+
|
|
41098
|
+
jsii.create(self.__class__, self, [id, props])
|
|
41099
|
+
|
|
41100
|
+
@jsii.member(jsii_name="bind")
|
|
41101
|
+
def bind(self, scope: _constructs_77d1e7e8.IConstruct) -> AlternateTargetConfig:
|
|
41102
|
+
'''Bind this configuration to a service.
|
|
41103
|
+
|
|
41104
|
+
:param scope: -
|
|
41105
|
+
'''
|
|
41106
|
+
if __debug__:
|
|
41107
|
+
type_hints = typing.get_type_hints(_typecheckingstub__147067753bcb82b7fc98e3b04dd99ea91c99dac8aec50a2f7076d3593aced862)
|
|
41108
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
41109
|
+
return typing.cast(AlternateTargetConfig, jsii.invoke(self, "bind", [scope]))
|
|
41110
|
+
|
|
41111
|
+
|
|
40007
41112
|
class AppMeshProxyConfiguration(
|
|
40008
41113
|
ProxyConfiguration,
|
|
40009
41114
|
metaclass=jsii.JSIIMeta,
|
|
@@ -41281,6 +42386,94 @@ class DeploymentAlarmConfig(DeploymentAlarmOptions):
|
|
|
41281
42386
|
)
|
|
41282
42387
|
|
|
41283
42388
|
|
|
42389
|
+
@jsii.implements(IDeploymentLifecycleHookTarget)
|
|
42390
|
+
class DeploymentLifecycleLambdaTarget(
|
|
42391
|
+
metaclass=jsii.JSIIMeta,
|
|
42392
|
+
jsii_type="aws-cdk-lib.aws_ecs.DeploymentLifecycleLambdaTarget",
|
|
42393
|
+
):
|
|
42394
|
+
'''Use an AWS Lambda function as a deployment lifecycle hook target.
|
|
42395
|
+
|
|
42396
|
+
:exampleMetadata: infused
|
|
42397
|
+
|
|
42398
|
+
Example::
|
|
42399
|
+
|
|
42400
|
+
import aws_cdk.aws_lambda as lambda_
|
|
42401
|
+
|
|
42402
|
+
# cluster: ecs.Cluster
|
|
42403
|
+
# task_definition: ecs.TaskDefinition
|
|
42404
|
+
# lambda_hook: lambda.Function
|
|
42405
|
+
# blue_target_group: elbv2.ApplicationTargetGroup
|
|
42406
|
+
# green_target_group: elbv2.ApplicationTargetGroup
|
|
42407
|
+
# prod_listener_rule: elbv2.ApplicationListenerRule
|
|
42408
|
+
|
|
42409
|
+
|
|
42410
|
+
service = ecs.FargateService(self, "Service",
|
|
42411
|
+
cluster=cluster,
|
|
42412
|
+
task_definition=task_definition,
|
|
42413
|
+
deployment_strategy=ecs.DeploymentStrategy.BLUE_GREEN
|
|
42414
|
+
)
|
|
42415
|
+
|
|
42416
|
+
service.add_lifecycle_hook(ecs.DeploymentLifecycleLambdaTarget(lambda_hook, "PreScaleHook",
|
|
42417
|
+
lifecycle_stages=[ecs.DeploymentLifecycleStage.PRE_SCALE_UP]
|
|
42418
|
+
))
|
|
42419
|
+
|
|
42420
|
+
target = service.load_balancer_target(ecs.LoadBalancerTargetOptions(
|
|
42421
|
+
container_name="nginx",
|
|
42422
|
+
container_port=80,
|
|
42423
|
+
protocol=ecs.Protocol.TCP
|
|
42424
|
+
), ecs.AlternateTarget("AlternateTarget",
|
|
42425
|
+
alternate_target_group=green_target_group,
|
|
42426
|
+
production_listener=ecs.ListenerRuleConfiguration.application_listener_rule(prod_listener_rule)
|
|
42427
|
+
))
|
|
42428
|
+
|
|
42429
|
+
target.attach_to_application_target_group(blue_target_group)
|
|
42430
|
+
'''
|
|
42431
|
+
|
|
42432
|
+
def __init__(
|
|
42433
|
+
self,
|
|
42434
|
+
handler: _IFunction_6adb0ab8,
|
|
42435
|
+
id: builtins.str,
|
|
42436
|
+
*,
|
|
42437
|
+
lifecycle_stages: typing.Sequence[DeploymentLifecycleStage],
|
|
42438
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
42439
|
+
) -> None:
|
|
42440
|
+
'''
|
|
42441
|
+
:param handler: -
|
|
42442
|
+
:param id: -
|
|
42443
|
+
:param lifecycle_stages: The lifecycle stages when this hook should be executed.
|
|
42444
|
+
:param role: The IAM role that grants permissions to invoke the lambda target. Default: - A unique role will be generated for this lambda function.
|
|
42445
|
+
'''
|
|
42446
|
+
if __debug__:
|
|
42447
|
+
type_hints = typing.get_type_hints(_typecheckingstub__bddcf05621152ce6e8fd520b5a7bb98f63b4f5805beda123da1f9f542d66294e)
|
|
42448
|
+
check_type(argname="argument handler", value=handler, expected_type=type_hints["handler"])
|
|
42449
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
42450
|
+
props = DeploymentLifecycleLambdaTargetProps(
|
|
42451
|
+
lifecycle_stages=lifecycle_stages, role=role
|
|
42452
|
+
)
|
|
42453
|
+
|
|
42454
|
+
jsii.create(self.__class__, self, [handler, id, props])
|
|
42455
|
+
|
|
42456
|
+
@jsii.member(jsii_name="bind")
|
|
42457
|
+
def bind(
|
|
42458
|
+
self,
|
|
42459
|
+
scope: _constructs_77d1e7e8.IConstruct,
|
|
42460
|
+
) -> DeploymentLifecycleHookTargetConfig:
|
|
42461
|
+
'''Bind this target to a deployment lifecycle hook.
|
|
42462
|
+
|
|
42463
|
+
:param scope: -
|
|
42464
|
+
'''
|
|
42465
|
+
if __debug__:
|
|
42466
|
+
type_hints = typing.get_type_hints(_typecheckingstub__c6510372e5e0e0b1114c294538138af0f03ebd70441a76bddd8496eca40f2fe8)
|
|
42467
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
42468
|
+
return typing.cast(DeploymentLifecycleHookTargetConfig, jsii.invoke(self, "bind", [scope]))
|
|
42469
|
+
|
|
42470
|
+
@builtins.property
|
|
42471
|
+
@jsii.member(jsii_name="role")
|
|
42472
|
+
def role(self) -> _IRole_235f5d8e:
|
|
42473
|
+
'''The IAM role for the deployment lifecycle hook target.'''
|
|
42474
|
+
return typing.cast(_IRole_235f5d8e, jsii.get(self, "role"))
|
|
42475
|
+
|
|
42476
|
+
|
|
41284
42477
|
class FireLensLogDriver(
|
|
41285
42478
|
LogDriver,
|
|
41286
42479
|
metaclass=jsii.JSIIMeta,
|
|
@@ -41966,6 +43159,17 @@ class BaseService(
|
|
|
41966
43159
|
check_type(argname="argument service_arn", value=service_arn, expected_type=type_hints["service_arn"])
|
|
41967
43160
|
return typing.cast(IBaseService, jsii.sinvoke(cls, "fromServiceArnWithCluster", [scope, id, service_arn]))
|
|
41968
43161
|
|
|
43162
|
+
@jsii.member(jsii_name="addLifecycleHook")
|
|
43163
|
+
def add_lifecycle_hook(self, target: IDeploymentLifecycleHookTarget) -> None:
|
|
43164
|
+
'''Add a deployment lifecycle hook target.
|
|
43165
|
+
|
|
43166
|
+
:param target: The lifecycle hook target to add.
|
|
43167
|
+
'''
|
|
43168
|
+
if __debug__:
|
|
43169
|
+
type_hints = typing.get_type_hints(_typecheckingstub__480743d611a768bf60af18dc6a08c65385351ccd86b4290955b74d1541662389)
|
|
43170
|
+
check_type(argname="argument target", value=target, expected_type=type_hints["target"])
|
|
43171
|
+
return typing.cast(None, jsii.invoke(self, "addLifecycleHook", [target]))
|
|
43172
|
+
|
|
41969
43173
|
@jsii.member(jsii_name="addVolume")
|
|
41970
43174
|
def add_volume(self, volume: ServiceManagedVolume) -> None:
|
|
41971
43175
|
'''Adds a volume to the Service.
|
|
@@ -42173,13 +43377,19 @@ class BaseService(
|
|
|
42173
43377
|
|
|
42174
43378
|
return typing.cast(None, jsii.invoke(self, "enableServiceConnect", [config]))
|
|
42175
43379
|
|
|
43380
|
+
@jsii.member(jsii_name="isUsingECSDeploymentController")
|
|
43381
|
+
def is_using_ecs_deployment_controller(self) -> builtins.bool:
|
|
43382
|
+
'''Checks if the service is using the ECS deployment controller.
|
|
43383
|
+
|
|
43384
|
+
:return: true if the service is using the ECS deployment controller or if no deployment controller is specified (defaults to ECS)
|
|
43385
|
+
'''
|
|
43386
|
+
return typing.cast(builtins.bool, jsii.invoke(self, "isUsingECSDeploymentController", []))
|
|
43387
|
+
|
|
42176
43388
|
@jsii.member(jsii_name="loadBalancerTarget")
|
|
42177
43389
|
def load_balancer_target(
|
|
42178
43390
|
self,
|
|
42179
|
-
|
|
42180
|
-
|
|
42181
|
-
container_port: typing.Optional[jsii.Number] = None,
|
|
42182
|
-
protocol: typing.Optional[Protocol] = None,
|
|
43391
|
+
options: typing.Union[LoadBalancerTargetOptions, typing.Dict[builtins.str, typing.Any]],
|
|
43392
|
+
alternate_options: typing.Optional[IAlternateTarget] = None,
|
|
42183
43393
|
) -> IEcsLoadBalancerTarget:
|
|
42184
43394
|
'''Return a load balancing target for a specific container and port.
|
|
42185
43395
|
|
|
@@ -42190,9 +43400,8 @@ class BaseService(
|
|
|
42190
43400
|
Use the return value of this function where you would normally use a load balancer
|
|
42191
43401
|
target, instead of the ``Service`` object itself.
|
|
42192
43402
|
|
|
42193
|
-
:param
|
|
42194
|
-
:param
|
|
42195
|
-
:param protocol: The protocol used for the port mapping. Only applicable when using application load balancers. Default: Protocol.TCP
|
|
43403
|
+
:param options: -
|
|
43404
|
+
:param alternate_options: -
|
|
42196
43405
|
|
|
42197
43406
|
Example::
|
|
42198
43407
|
|
|
@@ -42207,13 +43416,11 @@ class BaseService(
|
|
|
42207
43416
|
)]
|
|
42208
43417
|
)
|
|
42209
43418
|
'''
|
|
42210
|
-
|
|
42211
|
-
|
|
42212
|
-
|
|
42213
|
-
|
|
42214
|
-
)
|
|
42215
|
-
|
|
42216
|
-
return typing.cast(IEcsLoadBalancerTarget, jsii.invoke(self, "loadBalancerTarget", [options]))
|
|
43419
|
+
if __debug__:
|
|
43420
|
+
type_hints = typing.get_type_hints(_typecheckingstub__1326df14b5ec04898722ff6a20f7c785c16a07195cce2a207d19792a2ccec402)
|
|
43421
|
+
check_type(argname="argument options", value=options, expected_type=type_hints["options"])
|
|
43422
|
+
check_type(argname="argument alternate_options", value=alternate_options, expected_type=type_hints["alternate_options"])
|
|
43423
|
+
return typing.cast(IEcsLoadBalancerTarget, jsii.invoke(self, "loadBalancerTarget", [options, alternate_options]))
|
|
42217
43424
|
|
|
42218
43425
|
@jsii.member(jsii_name="metric")
|
|
42219
43426
|
def metric(
|
|
@@ -42586,15 +43793,18 @@ class Ec2Service(
|
|
|
42586
43793
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
42587
43794
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
42588
43795
|
cluster: ICluster,
|
|
43796
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
42589
43797
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
42590
43798
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
42591
43799
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
42592
43800
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
42593
43801
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
43802
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
42594
43803
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
42595
43804
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
42596
43805
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
42597
43806
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
43807
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
42598
43808
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
42599
43809
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
42600
43810
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -42616,15 +43826,18 @@ class Ec2Service(
|
|
|
42616
43826
|
:param security_groups: The security groups to associate with the service. If you do not specify a security group, a new security group is created. This property is only used for tasks that use the awsvpc network mode. Default: - A new security group is created.
|
|
42617
43827
|
:param vpc_subnets: The subnets to associate with the service. This property is only used for tasks that use the awsvpc network mode. Default: - Public subnets if ``assignPublicIp`` is set, otherwise the first available one of Private, Isolated, Public, in that order.
|
|
42618
43828
|
:param cluster: The name of the cluster that hosts the service.
|
|
43829
|
+
:param bake_time: bake time minutes for service. Default: - none
|
|
42619
43830
|
:param capacity_provider_strategies: A list of Capacity Provider strategies used to place a service. Default: - undefined
|
|
42620
43831
|
:param circuit_breaker: Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly enabled. Default: - disabled
|
|
42621
43832
|
:param cloud_map_options: The options for configuring an Amazon ECS service to use service discovery. Default: - AWS Cloud Map service discovery is not enabled.
|
|
42622
43833
|
:param deployment_alarms: The alarm(s) to monitor during deployment, and behavior to apply if at least one enters a state of alarm during the deployment or bake time. Default: - No alarms will be monitored during deployment.
|
|
42623
43834
|
:param deployment_controller: Specifies which deployment controller to use for the service. For more information, see `Amazon ECS Deployment Types <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html>`_ Default: - Rolling update (ECS)
|
|
43835
|
+
:param deployment_strategy: The deployment strategy to use for the service. Default: ROLLING
|
|
42624
43836
|
:param desired_count: The desired number of instantiations of the task definition to keep running on the service. Default: - When creating the service, default is 1; when updating the service, default uses the current task number.
|
|
42625
43837
|
:param enable_ecs_managed_tags: Specifies whether to enable Amazon ECS managed tags for the tasks within the service. For more information, see `Tagging Your Amazon ECS Resources <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html>`_ Default: false
|
|
42626
43838
|
:param enable_execute_command: Whether to enable the ability to execute into a container. Default: - undefined
|
|
42627
43839
|
:param health_check_grace_period: The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started. Default: - defaults to 60 seconds if at least one load balancer is in-use and it is not already set
|
|
43840
|
+
:param lifecycle_hooks: The lifecycle hooks to execute during deployment stages. Default: - none;
|
|
42628
43841
|
:param max_healthy_percent: The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment. Default: - 100 if daemon, otherwise 200
|
|
42629
43842
|
:param min_healthy_percent: The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment. Default: - 0 if daemon, otherwise 50
|
|
42630
43843
|
:param propagate_tags: Specifies whether to propagate the tags from the task definition or the service to the tasks in the service. Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE Default: PropagatedTagSource.NONE
|
|
@@ -42647,15 +43860,18 @@ class Ec2Service(
|
|
|
42647
43860
|
security_groups=security_groups,
|
|
42648
43861
|
vpc_subnets=vpc_subnets,
|
|
42649
43862
|
cluster=cluster,
|
|
43863
|
+
bake_time=bake_time,
|
|
42650
43864
|
capacity_provider_strategies=capacity_provider_strategies,
|
|
42651
43865
|
circuit_breaker=circuit_breaker,
|
|
42652
43866
|
cloud_map_options=cloud_map_options,
|
|
42653
43867
|
deployment_alarms=deployment_alarms,
|
|
42654
43868
|
deployment_controller=deployment_controller,
|
|
43869
|
+
deployment_strategy=deployment_strategy,
|
|
42655
43870
|
desired_count=desired_count,
|
|
42656
43871
|
enable_ecs_managed_tags=enable_ecs_managed_tags,
|
|
42657
43872
|
enable_execute_command=enable_execute_command,
|
|
42658
43873
|
health_check_grace_period=health_check_grace_period,
|
|
43874
|
+
lifecycle_hooks=lifecycle_hooks,
|
|
42659
43875
|
max_healthy_percent=max_healthy_percent,
|
|
42660
43876
|
min_healthy_percent=min_healthy_percent,
|
|
42661
43877
|
propagate_tags=propagate_tags,
|
|
@@ -43084,15 +44300,18 @@ class ExternalService(
|
|
|
43084
44300
|
daemon: typing.Optional[builtins.bool] = None,
|
|
43085
44301
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
43086
44302
|
cluster: ICluster,
|
|
44303
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
43087
44304
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
43088
44305
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
43089
44306
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
43090
44307
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
43091
44308
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
44309
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
43092
44310
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
43093
44311
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
43094
44312
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
43095
44313
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
44314
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
43096
44315
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
43097
44316
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
43098
44317
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -43109,15 +44328,18 @@ class ExternalService(
|
|
|
43109
44328
|
:param daemon: By default, service use REPLICA scheduling strategy, this parameter enable DAEMON scheduling strategy. If true, the service scheduler deploys exactly one task on each container instance in your cluster. When you are using this strategy, do not specify a desired number of tasks or any task placement strategies. Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy. Default: false
|
|
43110
44329
|
:param security_groups: The security groups to associate with the service. If you do not specify a security group, a new security group is created. Default: - A new security group is created.
|
|
43111
44330
|
:param cluster: The name of the cluster that hosts the service.
|
|
44331
|
+
:param bake_time: bake time minutes for service. Default: - none
|
|
43112
44332
|
:param capacity_provider_strategies: A list of Capacity Provider strategies used to place a service. Default: - undefined
|
|
43113
44333
|
:param circuit_breaker: Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly enabled. Default: - disabled
|
|
43114
44334
|
:param cloud_map_options: The options for configuring an Amazon ECS service to use service discovery. Default: - AWS Cloud Map service discovery is not enabled.
|
|
43115
44335
|
:param deployment_alarms: The alarm(s) to monitor during deployment, and behavior to apply if at least one enters a state of alarm during the deployment or bake time. Default: - No alarms will be monitored during deployment.
|
|
43116
44336
|
:param deployment_controller: Specifies which deployment controller to use for the service. For more information, see `Amazon ECS Deployment Types <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html>`_ Default: - Rolling update (ECS)
|
|
44337
|
+
:param deployment_strategy: The deployment strategy to use for the service. Default: ROLLING
|
|
43117
44338
|
:param desired_count: The desired number of instantiations of the task definition to keep running on the service. Default: - When creating the service, default is 1; when updating the service, default uses the current task number.
|
|
43118
44339
|
:param enable_ecs_managed_tags: Specifies whether to enable Amazon ECS managed tags for the tasks within the service. For more information, see `Tagging Your Amazon ECS Resources <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html>`_ Default: false
|
|
43119
44340
|
:param enable_execute_command: Whether to enable the ability to execute into a container. Default: - undefined
|
|
43120
44341
|
:param health_check_grace_period: The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started. Default: - defaults to 60 seconds if at least one load balancer is in-use and it is not already set
|
|
44342
|
+
:param lifecycle_hooks: The lifecycle hooks to execute during deployment stages. Default: - none;
|
|
43121
44343
|
:param max_healthy_percent: The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment. Default: - 100 if daemon, otherwise 200
|
|
43122
44344
|
:param min_healthy_percent: The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment. Default: - 0 if daemon, otherwise 50
|
|
43123
44345
|
:param propagate_tags: Specifies whether to propagate the tags from the task definition or the service to the tasks in the service. Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE Default: PropagatedTagSource.NONE
|
|
@@ -43135,15 +44357,18 @@ class ExternalService(
|
|
|
43135
44357
|
daemon=daemon,
|
|
43136
44358
|
security_groups=security_groups,
|
|
43137
44359
|
cluster=cluster,
|
|
44360
|
+
bake_time=bake_time,
|
|
43138
44361
|
capacity_provider_strategies=capacity_provider_strategies,
|
|
43139
44362
|
circuit_breaker=circuit_breaker,
|
|
43140
44363
|
cloud_map_options=cloud_map_options,
|
|
43141
44364
|
deployment_alarms=deployment_alarms,
|
|
43142
44365
|
deployment_controller=deployment_controller,
|
|
44366
|
+
deployment_strategy=deployment_strategy,
|
|
43143
44367
|
desired_count=desired_count,
|
|
43144
44368
|
enable_ecs_managed_tags=enable_ecs_managed_tags,
|
|
43145
44369
|
enable_execute_command=enable_execute_command,
|
|
43146
44370
|
health_check_grace_period=health_check_grace_period,
|
|
44371
|
+
lifecycle_hooks=lifecycle_hooks,
|
|
43147
44372
|
max_healthy_percent=max_healthy_percent,
|
|
43148
44373
|
min_healthy_percent=min_healthy_percent,
|
|
43149
44374
|
propagate_tags=propagate_tags,
|
|
@@ -43317,24 +44542,19 @@ class ExternalService(
|
|
|
43317
44542
|
@jsii.member(jsii_name="loadBalancerTarget")
|
|
43318
44543
|
def load_balancer_target(
|
|
43319
44544
|
self,
|
|
43320
|
-
|
|
43321
|
-
|
|
43322
|
-
container_port: typing.Optional[jsii.Number] = None,
|
|
43323
|
-
protocol: typing.Optional[Protocol] = None,
|
|
44545
|
+
_options: typing.Union[LoadBalancerTargetOptions, typing.Dict[builtins.str, typing.Any]],
|
|
44546
|
+
_alternate_options: typing.Optional[IAlternateTarget] = None,
|
|
43324
44547
|
) -> IEcsLoadBalancerTarget:
|
|
43325
44548
|
'''Overridden method to throw error as ``loadBalancerTarget`` is not supported for external service.
|
|
43326
44549
|
|
|
43327
|
-
:param
|
|
43328
|
-
:param
|
|
43329
|
-
:param protocol: The protocol used for the port mapping. Only applicable when using application load balancers. Default: Protocol.TCP
|
|
44550
|
+
:param _options: -
|
|
44551
|
+
:param _alternate_options: -
|
|
43330
44552
|
'''
|
|
43331
|
-
|
|
43332
|
-
|
|
43333
|
-
|
|
43334
|
-
|
|
43335
|
-
)
|
|
43336
|
-
|
|
43337
|
-
return typing.cast(IEcsLoadBalancerTarget, jsii.invoke(self, "loadBalancerTarget", [_options]))
|
|
44553
|
+
if __debug__:
|
|
44554
|
+
type_hints = typing.get_type_hints(_typecheckingstub__4cd24799babe0f9419c370222cff02dd9c784b1fd9b652c186a1701c0874337d)
|
|
44555
|
+
check_type(argname="argument _options", value=_options, expected_type=type_hints["_options"])
|
|
44556
|
+
check_type(argname="argument _alternate_options", value=_alternate_options, expected_type=type_hints["_alternate_options"])
|
|
44557
|
+
return typing.cast(IEcsLoadBalancerTarget, jsii.invoke(self, "loadBalancerTarget", [_options, _alternate_options]))
|
|
43338
44558
|
|
|
43339
44559
|
@jsii.member(jsii_name="registerLoadBalancerTargets")
|
|
43340
44560
|
def register_load_balancer_targets(self, *_targets: EcsTarget) -> None:
|
|
@@ -43552,15 +44772,18 @@ class FargateService(
|
|
|
43552
44772
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
43553
44773
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
43554
44774
|
cluster: ICluster,
|
|
44775
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
43555
44776
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
43556
44777
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
43557
44778
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
43558
44779
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
43559
44780
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
44781
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
43560
44782
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
43561
44783
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
43562
44784
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
43563
44785
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
44786
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
43564
44787
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
43565
44788
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
43566
44789
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -43580,15 +44803,18 @@ class FargateService(
|
|
|
43580
44803
|
:param security_groups: The security groups to associate with the service. If you do not specify a security group, a new security group is created. Default: - A new security group is created.
|
|
43581
44804
|
:param vpc_subnets: The subnets to associate with the service. Default: - Public subnets if ``assignPublicIp`` is set, otherwise the first available one of Private, Isolated, Public, in that order.
|
|
43582
44805
|
:param cluster: The name of the cluster that hosts the service.
|
|
44806
|
+
:param bake_time: bake time minutes for service. Default: - none
|
|
43583
44807
|
:param capacity_provider_strategies: A list of Capacity Provider strategies used to place a service. Default: - undefined
|
|
43584
44808
|
:param circuit_breaker: Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly enabled. Default: - disabled
|
|
43585
44809
|
:param cloud_map_options: The options for configuring an Amazon ECS service to use service discovery. Default: - AWS Cloud Map service discovery is not enabled.
|
|
43586
44810
|
:param deployment_alarms: The alarm(s) to monitor during deployment, and behavior to apply if at least one enters a state of alarm during the deployment or bake time. Default: - No alarms will be monitored during deployment.
|
|
43587
44811
|
:param deployment_controller: Specifies which deployment controller to use for the service. For more information, see `Amazon ECS Deployment Types <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html>`_ Default: - Rolling update (ECS)
|
|
44812
|
+
:param deployment_strategy: The deployment strategy to use for the service. Default: ROLLING
|
|
43588
44813
|
:param desired_count: The desired number of instantiations of the task definition to keep running on the service. Default: - When creating the service, default is 1; when updating the service, default uses the current task number.
|
|
43589
44814
|
:param enable_ecs_managed_tags: Specifies whether to enable Amazon ECS managed tags for the tasks within the service. For more information, see `Tagging Your Amazon ECS Resources <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html>`_ Default: false
|
|
43590
44815
|
:param enable_execute_command: Whether to enable the ability to execute into a container. Default: - undefined
|
|
43591
44816
|
:param health_check_grace_period: The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started. Default: - defaults to 60 seconds if at least one load balancer is in-use and it is not already set
|
|
44817
|
+
:param lifecycle_hooks: The lifecycle hooks to execute during deployment stages. Default: - none;
|
|
43592
44818
|
:param max_healthy_percent: The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment. Default: - 100 if daemon, otherwise 200
|
|
43593
44819
|
:param min_healthy_percent: The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment. Default: - 0 if daemon, otherwise 50
|
|
43594
44820
|
:param propagate_tags: Specifies whether to propagate the tags from the task definition or the service to the tasks in the service. Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE Default: PropagatedTagSource.NONE
|
|
@@ -43609,15 +44835,18 @@ class FargateService(
|
|
|
43609
44835
|
security_groups=security_groups,
|
|
43610
44836
|
vpc_subnets=vpc_subnets,
|
|
43611
44837
|
cluster=cluster,
|
|
44838
|
+
bake_time=bake_time,
|
|
43612
44839
|
capacity_provider_strategies=capacity_provider_strategies,
|
|
43613
44840
|
circuit_breaker=circuit_breaker,
|
|
43614
44841
|
cloud_map_options=cloud_map_options,
|
|
43615
44842
|
deployment_alarms=deployment_alarms,
|
|
43616
44843
|
deployment_controller=deployment_controller,
|
|
44844
|
+
deployment_strategy=deployment_strategy,
|
|
43617
44845
|
desired_count=desired_count,
|
|
43618
44846
|
enable_ecs_managed_tags=enable_ecs_managed_tags,
|
|
43619
44847
|
enable_execute_command=enable_execute_command,
|
|
43620
44848
|
health_check_grace_period=health_check_grace_period,
|
|
44849
|
+
lifecycle_hooks=lifecycle_hooks,
|
|
43621
44850
|
max_healthy_percent=max_healthy_percent,
|
|
43622
44851
|
min_healthy_percent=min_healthy_percent,
|
|
43623
44852
|
propagate_tags=propagate_tags,
|
|
@@ -43889,6 +45118,10 @@ __all__ = [
|
|
|
43889
45118
|
"AddAutoScalingGroupCapacityOptions",
|
|
43890
45119
|
"AddCapacityOptions",
|
|
43891
45120
|
"AlarmBehavior",
|
|
45121
|
+
"AlternateTarget",
|
|
45122
|
+
"AlternateTargetConfig",
|
|
45123
|
+
"AlternateTargetOptions",
|
|
45124
|
+
"AlternateTargetProps",
|
|
43892
45125
|
"AmiHardwareType",
|
|
43893
45126
|
"AppMeshProxyConfiguration",
|
|
43894
45127
|
"AppMeshProxyConfigurationConfigProps",
|
|
@@ -43957,6 +45190,11 @@ __all__ = [
|
|
|
43957
45190
|
"DeploymentCircuitBreaker",
|
|
43958
45191
|
"DeploymentController",
|
|
43959
45192
|
"DeploymentControllerType",
|
|
45193
|
+
"DeploymentLifecycleHookTargetConfig",
|
|
45194
|
+
"DeploymentLifecycleLambdaTarget",
|
|
45195
|
+
"DeploymentLifecycleLambdaTargetProps",
|
|
45196
|
+
"DeploymentLifecycleStage",
|
|
45197
|
+
"DeploymentStrategy",
|
|
43960
45198
|
"Device",
|
|
43961
45199
|
"DevicePermission",
|
|
43962
45200
|
"DockerVolumeConfiguration",
|
|
@@ -44013,8 +45251,10 @@ __all__ = [
|
|
|
44013
45251
|
"GenericLogDriverProps",
|
|
44014
45252
|
"HealthCheck",
|
|
44015
45253
|
"Host",
|
|
45254
|
+
"IAlternateTarget",
|
|
44016
45255
|
"IBaseService",
|
|
44017
45256
|
"ICluster",
|
|
45257
|
+
"IDeploymentLifecycleHookTarget",
|
|
44018
45258
|
"IEc2Service",
|
|
44019
45259
|
"IEc2TaskDefinition",
|
|
44020
45260
|
"IEcsLoadBalancerTarget",
|
|
@@ -44035,6 +45275,7 @@ __all__ = [
|
|
|
44035
45275
|
"LinuxParameters",
|
|
44036
45276
|
"LinuxParametersProps",
|
|
44037
45277
|
"ListenerConfig",
|
|
45278
|
+
"ListenerRuleConfiguration",
|
|
44038
45279
|
"LoadBalancerTargetOptions",
|
|
44039
45280
|
"LogDriver",
|
|
44040
45281
|
"LogDriverConfig",
|
|
@@ -44146,6 +45387,34 @@ def _typecheckingstub__64f2d9b3495e3be78346f77d5ad90928968c8ce230e670b6279dc67ad
|
|
|
44146
45387
|
"""Type checking stubs"""
|
|
44147
45388
|
pass
|
|
44148
45389
|
|
|
45390
|
+
def _typecheckingstub__792a358f64361d957b07e1ed7f1116dd993837c77bffc674ebb1385615159cd7(
|
|
45391
|
+
*,
|
|
45392
|
+
alternate_target_group_arn: builtins.str,
|
|
45393
|
+
role_arn: builtins.str,
|
|
45394
|
+
production_listener_rule: typing.Optional[builtins.str] = None,
|
|
45395
|
+
test_listener_rule: typing.Optional[builtins.str] = None,
|
|
45396
|
+
) -> None:
|
|
45397
|
+
"""Type checking stubs"""
|
|
45398
|
+
pass
|
|
45399
|
+
|
|
45400
|
+
def _typecheckingstub__419cc917bedbbd0a41ca044bcc54720f5a35bdc4f2dca6e11ae40da3ed05758d(
|
|
45401
|
+
*,
|
|
45402
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
45403
|
+
test_listener: typing.Optional[ListenerRuleConfiguration] = None,
|
|
45404
|
+
) -> None:
|
|
45405
|
+
"""Type checking stubs"""
|
|
45406
|
+
pass
|
|
45407
|
+
|
|
45408
|
+
def _typecheckingstub__308a285b9e7be7ba49d4d78caf88537a973f5504d7b7519fb1fe4ab1c987b690(
|
|
45409
|
+
*,
|
|
45410
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
45411
|
+
test_listener: typing.Optional[ListenerRuleConfiguration] = None,
|
|
45412
|
+
alternate_target_group: _ITargetGroup_83c6f8c4,
|
|
45413
|
+
production_listener: ListenerRuleConfiguration,
|
|
45414
|
+
) -> None:
|
|
45415
|
+
"""Type checking stubs"""
|
|
45416
|
+
pass
|
|
45417
|
+
|
|
44149
45418
|
def _typecheckingstub__0405fe235aadd4430faf2b963e8de52a23bd867724c74f1f76995c5f208aa3e6(
|
|
44150
45419
|
*,
|
|
44151
45420
|
container_name: builtins.str,
|
|
@@ -44306,15 +45575,18 @@ def _typecheckingstub__47c51bc38319f21956164fb0fbe2257a72cb1269d763f8a2bf334788b
|
|
|
44306
45575
|
def _typecheckingstub__c2e0ba28c74987301a54b0d197b791a6a94084b5f40d15304ffabf113b3f7daa(
|
|
44307
45576
|
*,
|
|
44308
45577
|
cluster: ICluster,
|
|
45578
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
44309
45579
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
44310
45580
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
44311
45581
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
44312
45582
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
44313
45583
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
45584
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
44314
45585
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
44315
45586
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
44316
45587
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
44317
45588
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
45589
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
44318
45590
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
44319
45591
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
44320
45592
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -44329,15 +45601,18 @@ def _typecheckingstub__c2e0ba28c74987301a54b0d197b791a6a94084b5f40d15304ffabf113
|
|
|
44329
45601
|
def _typecheckingstub__3ecfd95265b873c2042a9d5cb8465a48f9e325e2271c18461e2b266333563d84(
|
|
44330
45602
|
*,
|
|
44331
45603
|
cluster: ICluster,
|
|
45604
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
44332
45605
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
44333
45606
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
44334
45607
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
44335
45608
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
44336
45609
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
45610
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
44337
45611
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
44338
45612
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
44339
45613
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
44340
45614
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
45615
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
44341
45616
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
44342
45617
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
44343
45618
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -46311,6 +47586,23 @@ def _typecheckingstub__919598d1dc3ec32befe4a81bbf3a26a387685443884de6cb597180866
|
|
|
46311
47586
|
"""Type checking stubs"""
|
|
46312
47587
|
pass
|
|
46313
47588
|
|
|
47589
|
+
def _typecheckingstub__58b105a4a38be4fd4e5d81c3d78a7d0fc4d3120086f0f1235d58be7e964bf172(
|
|
47590
|
+
*,
|
|
47591
|
+
lifecycle_stages: typing.Sequence[DeploymentLifecycleStage],
|
|
47592
|
+
target_arn: builtins.str,
|
|
47593
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
47594
|
+
) -> None:
|
|
47595
|
+
"""Type checking stubs"""
|
|
47596
|
+
pass
|
|
47597
|
+
|
|
47598
|
+
def _typecheckingstub__e812b4c257c9817fdc66c09cfbc9ed6c2dae75feb52fdb91c33339837dbb883c(
|
|
47599
|
+
*,
|
|
47600
|
+
lifecycle_stages: typing.Sequence[DeploymentLifecycleStage],
|
|
47601
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
47602
|
+
) -> None:
|
|
47603
|
+
"""Type checking stubs"""
|
|
47604
|
+
pass
|
|
47605
|
+
|
|
46314
47606
|
def _typecheckingstub__9cd1dbc2946a0873c593d44d008c4c102f3994a3cd94676ec1816b39d1b46931(
|
|
46315
47607
|
*,
|
|
46316
47608
|
host_path: builtins.str,
|
|
@@ -46389,15 +47681,18 @@ def _typecheckingstub__ec9bd820dae60c0be34ffc5a5dd28bccc87947dc35dff1502ce12b80a
|
|
|
46389
47681
|
def _typecheckingstub__95634258086aa3448fbdfd9896017a2cbeb858f382deb61186bb9e22b1ccd366(
|
|
46390
47682
|
*,
|
|
46391
47683
|
cluster: ICluster,
|
|
47684
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
46392
47685
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
46393
47686
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46394
47687
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46395
47688
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46396
47689
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
47690
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
46397
47691
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
46398
47692
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
46399
47693
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
46400
47694
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
47695
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
46401
47696
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
46402
47697
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
46403
47698
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -46592,15 +47887,18 @@ def _typecheckingstub__bb8d7316afb3715109dfb05d3b7460700437fb0490a0e47180a1c5ef5
|
|
|
46592
47887
|
def _typecheckingstub__3cc413964caae89bfcfbcabff8356ffe5c054f46824be99731a77b64ec052a8a(
|
|
46593
47888
|
*,
|
|
46594
47889
|
cluster: ICluster,
|
|
47890
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
46595
47891
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
46596
47892
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46597
47893
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46598
47894
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46599
47895
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
47896
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
46600
47897
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
46601
47898
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
46602
47899
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
46603
47900
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
47901
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
46604
47902
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
46605
47903
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
46606
47904
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -46650,15 +47948,18 @@ def _typecheckingstub__85c0463354cc6d5a3da5daace0570a015f941bfeb87bb282346c1e2be
|
|
|
46650
47948
|
def _typecheckingstub__8290283f61f3e2d289b7e7f81cad1a5d1e9ed9dbc07ccce2b57604682a42ded7(
|
|
46651
47949
|
*,
|
|
46652
47950
|
cluster: ICluster,
|
|
47951
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
46653
47952
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
46654
47953
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46655
47954
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46656
47955
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46657
47956
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
47957
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
46658
47958
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
46659
47959
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
46660
47960
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
46661
47961
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
47962
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
46662
47963
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
46663
47964
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
46664
47965
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -46939,6 +48240,18 @@ def _typecheckingstub__0275aca574e1acd41af17b3acaa1528dd0890542d27aeee65489bbd55
|
|
|
46939
48240
|
"""Type checking stubs"""
|
|
46940
48241
|
pass
|
|
46941
48242
|
|
|
48243
|
+
def _typecheckingstub__1f10764be69e962209020c3a7e772567f1cbc3d3673cf209506562511ce9cd0a(
|
|
48244
|
+
scope: _constructs_77d1e7e8.IConstruct,
|
|
48245
|
+
) -> None:
|
|
48246
|
+
"""Type checking stubs"""
|
|
48247
|
+
pass
|
|
48248
|
+
|
|
48249
|
+
def _typecheckingstub__1cdcc51dc61399e62078243a225e42fd6901317236efebe039a9e3b36834d4b7(
|
|
48250
|
+
scope: _constructs_77d1e7e8.IConstruct,
|
|
48251
|
+
) -> None:
|
|
48252
|
+
"""Type checking stubs"""
|
|
48253
|
+
pass
|
|
48254
|
+
|
|
46942
48255
|
def _typecheckingstub__11773db60f5e0800c7efe817fcc41dcf7af2f8e010e72471c80e23766e96c5ab(
|
|
46943
48256
|
task_definition: TaskDefinition,
|
|
46944
48257
|
) -> None:
|
|
@@ -47066,6 +48379,18 @@ def _typecheckingstub__ef0bdf65f82e85f94b1db5a37b900ed9f46429089cbcb4c8d29b283f3
|
|
|
47066
48379
|
"""Type checking stubs"""
|
|
47067
48380
|
pass
|
|
47068
48381
|
|
|
48382
|
+
def _typecheckingstub__e4bdbe1ec0e220912f9ff8b7769875a4eebd5168734b702329f9d4600ecdb318(
|
|
48383
|
+
rule: _ApplicationListenerRule_f93ff606,
|
|
48384
|
+
) -> None:
|
|
48385
|
+
"""Type checking stubs"""
|
|
48386
|
+
pass
|
|
48387
|
+
|
|
48388
|
+
def _typecheckingstub__c964a7ba26c195318cd3937b823b36facecf4120aeb9196876feb206f6f9855a(
|
|
48389
|
+
listener: _NetworkListener_539c17bf,
|
|
48390
|
+
) -> None:
|
|
48391
|
+
"""Type checking stubs"""
|
|
48392
|
+
pass
|
|
48393
|
+
|
|
47069
48394
|
def _typecheckingstub__5499166a691d3d9b788ba4a9808f921437da0987c4c4733332600e4e584bf30f(
|
|
47070
48395
|
*,
|
|
47071
48396
|
container_name: builtins.str,
|
|
@@ -47816,6 +49141,23 @@ def _typecheckingstub__8874c61d65168e60874c9191682af53d5d88352dbfe615fd842f45b2b
|
|
|
47816
49141
|
"""Type checking stubs"""
|
|
47817
49142
|
pass
|
|
47818
49143
|
|
|
49144
|
+
def _typecheckingstub__aa25b044df0e4eef1817fd07bd799a88800df4e6bd79f283ca2657cfee9e4b29(
|
|
49145
|
+
id: builtins.str,
|
|
49146
|
+
*,
|
|
49147
|
+
alternate_target_group: _ITargetGroup_83c6f8c4,
|
|
49148
|
+
production_listener: ListenerRuleConfiguration,
|
|
49149
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
49150
|
+
test_listener: typing.Optional[ListenerRuleConfiguration] = None,
|
|
49151
|
+
) -> None:
|
|
49152
|
+
"""Type checking stubs"""
|
|
49153
|
+
pass
|
|
49154
|
+
|
|
49155
|
+
def _typecheckingstub__147067753bcb82b7fc98e3b04dd99ea91c99dac8aec50a2f7076d3593aced862(
|
|
49156
|
+
scope: _constructs_77d1e7e8.IConstruct,
|
|
49157
|
+
) -> None:
|
|
49158
|
+
"""Type checking stubs"""
|
|
49159
|
+
pass
|
|
49160
|
+
|
|
47819
49161
|
def _typecheckingstub__6aeeebc397e1073be671305f45ff0de1478d4d043824a139c5e52661f7868baf(
|
|
47820
49162
|
_scope: _constructs_77d1e7e8.Construct,
|
|
47821
49163
|
_task_definition: TaskDefinition,
|
|
@@ -48035,6 +49377,22 @@ def _typecheckingstub__3407e1eace0b05ee1ef50b2d7263c1462cbbc2df7bfe6d22826f0f94f
|
|
|
48035
49377
|
"""Type checking stubs"""
|
|
48036
49378
|
pass
|
|
48037
49379
|
|
|
49380
|
+
def _typecheckingstub__bddcf05621152ce6e8fd520b5a7bb98f63b4f5805beda123da1f9f542d66294e(
|
|
49381
|
+
handler: _IFunction_6adb0ab8,
|
|
49382
|
+
id: builtins.str,
|
|
49383
|
+
*,
|
|
49384
|
+
lifecycle_stages: typing.Sequence[DeploymentLifecycleStage],
|
|
49385
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
49386
|
+
) -> None:
|
|
49387
|
+
"""Type checking stubs"""
|
|
49388
|
+
pass
|
|
49389
|
+
|
|
49390
|
+
def _typecheckingstub__c6510372e5e0e0b1114c294538138af0f03ebd70441a76bddd8496eca40f2fe8(
|
|
49391
|
+
scope: _constructs_77d1e7e8.IConstruct,
|
|
49392
|
+
) -> None:
|
|
49393
|
+
"""Type checking stubs"""
|
|
49394
|
+
pass
|
|
49395
|
+
|
|
48038
49396
|
def _typecheckingstub__0f3b91860780f56b42f6ab26d1855c0db28e15ef0dc9bcb868556324ed95a96b(
|
|
48039
49397
|
_scope: _constructs_77d1e7e8.Construct,
|
|
48040
49398
|
_container_definition: ContainerDefinition,
|
|
@@ -48095,6 +49453,12 @@ def _typecheckingstub__3cd0743b65b66534a274ff34e46f82cd780216193c08611a3b4e166e2
|
|
|
48095
49453
|
"""Type checking stubs"""
|
|
48096
49454
|
pass
|
|
48097
49455
|
|
|
49456
|
+
def _typecheckingstub__480743d611a768bf60af18dc6a08c65385351ccd86b4290955b74d1541662389(
|
|
49457
|
+
target: IDeploymentLifecycleHookTarget,
|
|
49458
|
+
) -> None:
|
|
49459
|
+
"""Type checking stubs"""
|
|
49460
|
+
pass
|
|
49461
|
+
|
|
48098
49462
|
def _typecheckingstub__e086e1f25717ea297fd9f530033e3685af15b9de3deb30fa9b228c05f8b0bcdc(
|
|
48099
49463
|
volume: ServiceManagedVolume,
|
|
48100
49464
|
) -> None:
|
|
@@ -48136,6 +49500,13 @@ def _typecheckingstub__027c7741168086e6dc84ce3b453e99740a28a87dabd7b69b28195c0b3
|
|
|
48136
49500
|
"""Type checking stubs"""
|
|
48137
49501
|
pass
|
|
48138
49502
|
|
|
49503
|
+
def _typecheckingstub__1326df14b5ec04898722ff6a20f7c785c16a07195cce2a207d19792a2ccec402(
|
|
49504
|
+
options: typing.Union[LoadBalancerTargetOptions, typing.Dict[builtins.str, typing.Any]],
|
|
49505
|
+
alternate_options: typing.Optional[IAlternateTarget] = None,
|
|
49506
|
+
) -> None:
|
|
49507
|
+
"""Type checking stubs"""
|
|
49508
|
+
pass
|
|
49509
|
+
|
|
48139
49510
|
def _typecheckingstub__fb3b6cd83a49e029a6aab0309e4bf6a856a09b82a0d6752ebc4b8057753a9902(
|
|
48140
49511
|
metric_name: builtins.str,
|
|
48141
49512
|
*,
|
|
@@ -48204,15 +49575,18 @@ def _typecheckingstub__1e578461670bd6cdf856f914534e1feff8905e31d33cd7aea2b9f5151
|
|
|
48204
49575
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
48205
49576
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48206
49577
|
cluster: ICluster,
|
|
49578
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
48207
49579
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
48208
49580
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48209
49581
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48210
49582
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48211
49583
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
49584
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
48212
49585
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
48213
49586
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
48214
49587
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
48215
49588
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
49589
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
48216
49590
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
48217
49591
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
48218
49592
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -48354,15 +49728,18 @@ def _typecheckingstub__6ceef4de126cbb6bd6f379ba0b53be2fb61c35761f50685b5d228c682
|
|
|
48354
49728
|
daemon: typing.Optional[builtins.bool] = None,
|
|
48355
49729
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
48356
49730
|
cluster: ICluster,
|
|
49731
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
48357
49732
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
48358
49733
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48359
49734
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48360
49735
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48361
49736
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
49737
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
48362
49738
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
48363
49739
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
48364
49740
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
48365
49741
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
49742
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
48366
49743
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
48367
49744
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
48368
49745
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -48408,6 +49785,13 @@ def _typecheckingstub__6a882b6874d4ad85f277f48ab87544e61c1ded22af9e05c1fc5cf0aea
|
|
|
48408
49785
|
"""Type checking stubs"""
|
|
48409
49786
|
pass
|
|
48410
49787
|
|
|
49788
|
+
def _typecheckingstub__4cd24799babe0f9419c370222cff02dd9c784b1fd9b652c186a1701c0874337d(
|
|
49789
|
+
_options: typing.Union[LoadBalancerTargetOptions, typing.Dict[builtins.str, typing.Any]],
|
|
49790
|
+
_alternate_options: typing.Optional[IAlternateTarget] = None,
|
|
49791
|
+
) -> None:
|
|
49792
|
+
"""Type checking stubs"""
|
|
49793
|
+
pass
|
|
49794
|
+
|
|
48411
49795
|
def _typecheckingstub__8c04543cf19a902fa2afce6445c2c60d81551c375dc4a44e88bef45930d140e4(
|
|
48412
49796
|
*_targets: EcsTarget,
|
|
48413
49797
|
) -> None:
|
|
@@ -48460,15 +49844,18 @@ def _typecheckingstub__0ddac6b19472d00f74c1777e699ce5b239dc49e62ff4ab4674c917bbe
|
|
|
48460
49844
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
48461
49845
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48462
49846
|
cluster: ICluster,
|
|
49847
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
48463
49848
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
48464
49849
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48465
49850
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48466
49851
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48467
49852
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
49853
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
48468
49854
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
48469
49855
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
48470
49856
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
48471
49857
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
49858
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
48472
49859
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
48473
49860
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
48474
49861
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|