aws-cdk-lib 2.207.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.207.0.jsii.tgz → aws-cdk-lib@2.209.0.jsii.tgz} +0 -0
- aws_cdk/aws_aiops/__init__.py +16 -12
- aws_cdk/aws_amazonmq/__init__.py +8 -18
- aws_cdk/aws_appstream/__init__.py +36 -4
- aws_cdk/aws_bedrock/__init__.py +227 -102
- aws_cdk/aws_certificatemanager/__init__.py +45 -0
- aws_cdk/aws_cloudfront/__init__.py +12 -2
- aws_cdk/aws_connect/__init__.py +107 -3
- aws_cdk/aws_customerprofiles/__init__.py +27 -22
- aws_cdk/aws_docdb/__init__.py +5 -3
- aws_cdk/aws_ec2/__init__.py +58 -16
- aws_cdk/aws_ecs/__init__.py +1554 -78
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +27 -15
- aws_cdk/aws_events/__init__.py +142 -0
- aws_cdk/aws_gamelift/__init__.py +2 -2
- aws_cdk/aws_guardduty/__init__.py +86 -0
- aws_cdk/aws_kinesisfirehose/__init__.py +377 -4
- aws_cdk/aws_lambda/__init__.py +76 -67
- aws_cdk/aws_logs/__init__.py +53 -4
- aws_cdk/aws_mediapackagev2/__init__.py +881 -0
- aws_cdk/aws_omics/__init__.py +13 -10
- aws_cdk/aws_quicksight/__init__.py +111 -4
- aws_cdk/aws_rds/__init__.py +214 -10
- aws_cdk/aws_route53/__init__.py +97 -41
- aws_cdk/aws_s3/__init__.py +775 -5
- aws_cdk/aws_s3express/__init__.py +61 -3
- aws_cdk/aws_s3tables/__init__.py +254 -0
- aws_cdk/aws_sagemaker/__init__.py +524 -137
- aws_cdk/aws_ssm/__init__.py +48 -0
- aws_cdk/aws_transfer/__init__.py +49 -0
- aws_cdk/aws_wisdom/__init__.py +1185 -100
- aws_cdk/cloud_assembly_schema/__init__.py +28 -2
- aws_cdk/custom_resources/__init__.py +1 -1
- {aws_cdk_lib-2.207.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/METADATA +2 -2
- {aws_cdk_lib-2.207.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/RECORD +41 -41
- {aws_cdk_lib-2.207.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.207.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.207.0.dist-info → aws_cdk_lib-2.209.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.207.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.
|
|
@@ -9239,11 +9678,14 @@ class CfnService(
|
|
|
9239
9678
|
role_arn: typing.Optional[builtins.str] = None,
|
|
9240
9679
|
test_listener_rule: typing.Optional[builtins.str] = None,
|
|
9241
9680
|
) -> None:
|
|
9242
|
-
'''
|
|
9243
|
-
|
|
9244
|
-
|
|
9245
|
-
|
|
9246
|
-
:param
|
|
9681
|
+
'''The advanced settings for a load balancer used in blue/green deployments.
|
|
9682
|
+
|
|
9683
|
+
Specify the alternate target group, listener rules, and IAM role required for traffic shifting during blue/green deployments. For more information, see `Required resources for Amazon ECS blue/green deployments <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/blue-green-deployment-implementation.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
|
|
9684
|
+
|
|
9685
|
+
:param alternate_target_group_arn: The Amazon Resource Name (ARN) of the alternate target group for Amazon ECS blue/green deployments.
|
|
9686
|
+
:param production_listener_rule: The Amazon Resource Name (ARN) that that identifies the production listener rule (in the case of an Application Load Balancer) or listener (in the case for an Network Load Balancer) for routing production traffic.
|
|
9687
|
+
:param role_arn: The Amazon Resource Name (ARN) of the IAM role that grants Amazon ECS permission to call the Elastic Load Balancing APIs for you.
|
|
9688
|
+
:param test_listener_rule: The Amazon Resource Name (ARN) that identifies ) that identifies the test listener rule (in the case of an Application Load Balancer) or listener (in the case for an Network Load Balancer) for routing test traffic.
|
|
9247
9689
|
|
|
9248
9690
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-advancedconfiguration.html
|
|
9249
9691
|
:exampleMetadata: fixture=_generated
|
|
@@ -9281,7 +9723,8 @@ class CfnService(
|
|
|
9281
9723
|
|
|
9282
9724
|
@builtins.property
|
|
9283
9725
|
def alternate_target_group_arn(self) -> builtins.str:
|
|
9284
|
-
'''
|
|
9726
|
+
'''The Amazon Resource Name (ARN) of the alternate target group for Amazon ECS blue/green deployments.
|
|
9727
|
+
|
|
9285
9728
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-advancedconfiguration.html#cfn-ecs-service-advancedconfiguration-alternatetargetgrouparn
|
|
9286
9729
|
'''
|
|
9287
9730
|
result = self._values.get("alternate_target_group_arn")
|
|
@@ -9290,7 +9733,8 @@ class CfnService(
|
|
|
9290
9733
|
|
|
9291
9734
|
@builtins.property
|
|
9292
9735
|
def production_listener_rule(self) -> typing.Optional[builtins.str]:
|
|
9293
|
-
'''
|
|
9736
|
+
'''The Amazon Resource Name (ARN) that that identifies the production listener rule (in the case of an Application Load Balancer) or listener (in the case for an Network Load Balancer) for routing production traffic.
|
|
9737
|
+
|
|
9294
9738
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-advancedconfiguration.html#cfn-ecs-service-advancedconfiguration-productionlistenerrule
|
|
9295
9739
|
'''
|
|
9296
9740
|
result = self._values.get("production_listener_rule")
|
|
@@ -9298,7 +9742,8 @@ class CfnService(
|
|
|
9298
9742
|
|
|
9299
9743
|
@builtins.property
|
|
9300
9744
|
def role_arn(self) -> typing.Optional[builtins.str]:
|
|
9301
|
-
'''
|
|
9745
|
+
'''The Amazon Resource Name (ARN) of the IAM role that grants Amazon ECS permission to call the Elastic Load Balancing APIs for you.
|
|
9746
|
+
|
|
9302
9747
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-advancedconfiguration.html#cfn-ecs-service-advancedconfiguration-rolearn
|
|
9303
9748
|
'''
|
|
9304
9749
|
result = self._values.get("role_arn")
|
|
@@ -9306,7 +9751,8 @@ class CfnService(
|
|
|
9306
9751
|
|
|
9307
9752
|
@builtins.property
|
|
9308
9753
|
def test_listener_rule(self) -> typing.Optional[builtins.str]:
|
|
9309
|
-
'''
|
|
9754
|
+
'''The Amazon Resource Name (ARN) that identifies ) that identifies the test listener rule (in the case of an Application Load Balancer) or listener (in the case for an Network Load Balancer) for routing test traffic.
|
|
9755
|
+
|
|
9310
9756
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-advancedconfiguration.html#cfn-ecs-service-advancedconfiguration-testlistenerrule
|
|
9311
9757
|
'''
|
|
9312
9758
|
result = self._values.get("test_listener_rule")
|
|
@@ -9741,12 +10187,12 @@ class CfnService(
|
|
|
9741
10187
|
'''Optional deployment parameters that control how many tasks run during a deployment and the ordering of stopping and starting tasks.
|
|
9742
10188
|
|
|
9743
10189
|
:param alarms: Information about the CloudWatch alarms.
|
|
9744
|
-
:param bake_time_in_minutes:
|
|
10190
|
+
:param bake_time_in_minutes: The duration when both blue and green service revisions are running simultaneously after the production traffic has shifted. The following rules apply when you don't specify a value: - For rolling deployments, the value is set to 3 hours (180 minutes). - When you use an external deployment controller ( ``EXTERNAL`` ), or the CodeDeploy blue/green deployment controller ( ``CODE_DEPLOY`` ), the value is set to 3 hours (180 minutes). - For all other cases, the value is set to 36 hours (2160 minutes).
|
|
9745
10191
|
:param deployment_circuit_breaker: .. epigraph:: The deployment circuit breaker can only be used for services using the rolling update ( ``ECS`` ) deployment type. The *deployment circuit breaker* determines whether a service deployment will fail if the service can't reach a steady state. If you use the deployment circuit breaker, a service deployment will transition to a failed state and stop launching new tasks. If you use the rollback option, when a service deployment fails, the service is rolled back to the last deployment that completed successfully. For more information, see `Rolling update <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-ecs.html>`_ in the *Amazon Elastic Container Service Developer Guide*
|
|
9746
|
-
:param lifecycle_hooks:
|
|
10192
|
+
:param lifecycle_hooks: An array of deployment lifecycle hook objects to run custom logic at specific stages of the deployment lifecycle.
|
|
9747
10193
|
:param maximum_percent: If a service is using the rolling update ( ``ECS`` ) deployment type, the ``maximumPercent`` parameter represents an upper limit on the number of your service's tasks that are allowed in the ``RUNNING`` or ``PENDING`` state during a deployment, as a percentage of the ``desiredCount`` (rounded down to the nearest integer). This parameter enables you to define the deployment batch size. For example, if your service is using the ``REPLICA`` service scheduler and has a ``desiredCount`` of four tasks and a ``maximumPercent`` value of 200%, the scheduler may start four new tasks before stopping the four older tasks (provided that the cluster resources required to do this are available). The default ``maximumPercent`` value for a service using the ``REPLICA`` service scheduler is 200%. The Amazon ECS scheduler uses this parameter to replace unhealthy tasks by starting replacement tasks first and then stopping the unhealthy tasks, as long as cluster resources for starting replacement tasks are available. For more information about how the scheduler replaces unhealthy tasks, see `Amazon ECS services <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html>`_ . If a service is using either the blue/green ( ``CODE_DEPLOY`` ) or ``EXTERNAL`` deployment types, and tasks in the service use the EC2 launch type, the *maximum percent* value is set to the default value. The *maximum percent* value is used to define the upper limit on the number of the tasks in the service that remain in the ``RUNNING`` state while the container instances are in the ``DRAINING`` state. .. epigraph:: You can't specify a custom ``maximumPercent`` value for a service that uses either the blue/green ( ``CODE_DEPLOY`` ) or ``EXTERNAL`` deployment types and has tasks that use the EC2 launch type. If the service uses either the blue/green ( ``CODE_DEPLOY`` ) or ``EXTERNAL`` deployment types, and the tasks in the service use the Fargate launch type, the maximum percent value is not used. The value is still returned when describing your service.
|
|
9748
10194
|
:param minimum_healthy_percent: If a service is using the rolling update ( ``ECS`` ) deployment type, the ``minimumHealthyPercent`` represents a lower limit on the number of your service's tasks that must remain in the ``RUNNING`` state during a deployment, as a percentage of the ``desiredCount`` (rounded up to the nearest integer). This parameter enables you to deploy without using additional cluster capacity. For example, if your service has a ``desiredCount`` of four tasks and a ``minimumHealthyPercent`` of 50%, the service scheduler may stop two existing tasks to free up cluster capacity before starting two new tasks. If any tasks are unhealthy and if ``maximumPercent`` doesn't allow the Amazon ECS scheduler to start replacement tasks, the scheduler stops the unhealthy tasks one-by-one — using the ``minimumHealthyPercent`` as a constraint — to clear up capacity to launch replacement tasks. For more information about how the scheduler replaces unhealthy tasks, see `Amazon ECS services <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html>`_ . For services that *do not* use a load balancer, the following should be noted: - A service is considered healthy if all essential containers within the tasks in the service pass their health checks. - If a task has no essential containers with a health check defined, the service scheduler will wait for 40 seconds after a task reaches a ``RUNNING`` state before the task is counted towards the minimum healthy percent total. - If a task has one or more essential containers with a health check defined, the service scheduler will wait for the task to reach a healthy status before counting it towards the minimum healthy percent total. A task is considered healthy when all essential containers within the task have passed their health checks. The amount of time the service scheduler can wait for is determined by the container health check settings. For services that *do* use a load balancer, the following should be noted: - If a task has no essential containers with a health check defined, the service scheduler will wait for the load balancer target group health check to return a healthy status before counting the task towards the minimum healthy percent total. - If a task has an essential container with a health check defined, the service scheduler will wait for both the task to reach a healthy status and the load balancer target group health check to return a healthy status before counting the task towards the minimum healthy percent total. The default value for a replica service for ``minimumHealthyPercent`` is 100%. The default ``minimumHealthyPercent`` value for a service using the ``DAEMON`` service schedule is 0% for the AWS CLI , the AWS SDKs, and the APIs and 50% for the AWS Management Console. The minimum number of healthy tasks during a deployment is the ``desiredCount`` multiplied by the ``minimumHealthyPercent`` /100, rounded up to the nearest integer value. If a service is using either the blue/green ( ``CODE_DEPLOY`` ) or ``EXTERNAL`` deployment types and is running tasks that use the EC2 launch type, the *minimum healthy percent* value is set to the default value. The *minimum healthy percent* value is used to define the lower limit on the number of the tasks in the service that remain in the ``RUNNING`` state while the container instances are in the ``DRAINING`` state. .. epigraph:: You can't specify a custom ``minimumHealthyPercent`` value for a service that uses either the blue/green ( ``CODE_DEPLOY`` ) or ``EXTERNAL`` deployment types and has tasks that use the EC2 launch type. If a service is using either the blue/green ( ``CODE_DEPLOY`` ) or ``EXTERNAL`` deployment types and is running tasks that use the Fargate launch type, the minimum healthy percent value is not used, although it is returned when describing your service.
|
|
9749
|
-
:param strategy:
|
|
10195
|
+
:param strategy: The deployment strategy for the service. Choose from these valid values:. - ``ROLLING`` - When you create a service which uses the rolling update ( ``ROLLING`` ) deployment strategy, the Amazon ECS service scheduler replaces the currently running tasks with new tasks. The number of tasks that Amazon ECS adds or removes from the service during a rolling update is controlled by the service deployment configuration. - ``BLUE_GREEN`` - A blue/green deployment strategy ( ``BLUE_GREEN`` ) is a release methodology that reduces downtime and risk by running two identical production environments called blue and green. With Amazon ECS blue/green deployments, you can validate new service revisions before directing production traffic to them. This approach provides a safer way to deploy changes with the ability to quickly roll back if needed.
|
|
9750
10196
|
|
|
9751
10197
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-deploymentconfiguration.html
|
|
9752
10198
|
:exampleMetadata: fixture=_generated
|
|
@@ -9816,7 +10262,14 @@ class CfnService(
|
|
|
9816
10262
|
|
|
9817
10263
|
@builtins.property
|
|
9818
10264
|
def bake_time_in_minutes(self) -> typing.Optional[jsii.Number]:
|
|
9819
|
-
'''
|
|
10265
|
+
'''The duration when both blue and green service revisions are running simultaneously after the production traffic has shifted.
|
|
10266
|
+
|
|
10267
|
+
The following rules apply when you don't specify a value:
|
|
10268
|
+
|
|
10269
|
+
- For rolling deployments, the value is set to 3 hours (180 minutes).
|
|
10270
|
+
- When you use an external deployment controller ( ``EXTERNAL`` ), or the CodeDeploy blue/green deployment controller ( ``CODE_DEPLOY`` ), the value is set to 3 hours (180 minutes).
|
|
10271
|
+
- For all other cases, the value is set to 36 hours (2160 minutes).
|
|
10272
|
+
|
|
9820
10273
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-deploymentconfiguration.html#cfn-ecs-service-deploymentconfiguration-baketimeinminutes
|
|
9821
10274
|
'''
|
|
9822
10275
|
result = self._values.get("bake_time_in_minutes")
|
|
@@ -9841,7 +10294,8 @@ class CfnService(
|
|
|
9841
10294
|
def lifecycle_hooks(
|
|
9842
10295
|
self,
|
|
9843
10296
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnService.DeploymentLifecycleHookProperty"]]]]:
|
|
9844
|
-
'''
|
|
10297
|
+
'''An array of deployment lifecycle hook objects to run custom logic at specific stages of the deployment lifecycle.
|
|
10298
|
+
|
|
9845
10299
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-deploymentconfiguration.html#cfn-ecs-service-deploymentconfiguration-lifecyclehooks
|
|
9846
10300
|
'''
|
|
9847
10301
|
result = self._values.get("lifecycle_hooks")
|
|
@@ -9904,7 +10358,11 @@ class CfnService(
|
|
|
9904
10358
|
|
|
9905
10359
|
@builtins.property
|
|
9906
10360
|
def strategy(self) -> typing.Optional[builtins.str]:
|
|
9907
|
-
'''
|
|
10361
|
+
'''The deployment strategy for the service. Choose from these valid values:.
|
|
10362
|
+
|
|
10363
|
+
- ``ROLLING`` - When you create a service which uses the rolling update ( ``ROLLING`` ) deployment strategy, the Amazon ECS service scheduler replaces the currently running tasks with new tasks. The number of tasks that Amazon ECS adds or removes from the service during a rolling update is controlled by the service deployment configuration.
|
|
10364
|
+
- ``BLUE_GREEN`` - A blue/green deployment strategy ( ``BLUE_GREEN`` ) is a release methodology that reduces downtime and risk by running two identical production environments called blue and green. With Amazon ECS blue/green deployments, you can validate new service revisions before directing production traffic to them. This approach provides a safer way to deploy changes with the ability to quickly roll back if needed.
|
|
10365
|
+
|
|
9908
10366
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-deploymentconfiguration.html#cfn-ecs-service-deploymentconfiguration-strategy
|
|
9909
10367
|
'''
|
|
9910
10368
|
result = self._values.get("strategy")
|
|
@@ -10035,10 +10493,15 @@ class CfnService(
|
|
|
10035
10493
|
lifecycle_stages: typing.Sequence[builtins.str],
|
|
10036
10494
|
role_arn: builtins.str,
|
|
10037
10495
|
) -> None:
|
|
10038
|
-
'''
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10496
|
+
'''A deployment lifecycle hook runs custom logic at specific stages of the deployment process.
|
|
10497
|
+
|
|
10498
|
+
Currently, you can use Lambda functions as hook targets.
|
|
10499
|
+
|
|
10500
|
+
For more information, see `Lifecycle hooks for Amazon ECS service deployments <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-lifecycle-hooks.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
|
|
10501
|
+
|
|
10502
|
+
:param hook_target_arn: The Amazon Resource Name (ARN) of the hook target. Currently, only Lambda function ARNs are supported. You must provide this parameter when configuring a deployment lifecycle hook.
|
|
10503
|
+
:param lifecycle_stages: The lifecycle stages at which to run the hook. Choose from these valid values:. - RECONCILE_SERVICE The reconciliation stage that only happens when you start a new service deployment with more than 1 service revision in an ACTIVE state. You can use a lifecycle hook for this stage. - PRE_SCALE_UP The green service revision has not started. The blue service revision is handling 100% of the production traffic. There is no test traffic. You can use a lifecycle hook for this stage. - POST_SCALE_UP The green service revision has started. The blue service revision is handling 100% of the production traffic. There is no test traffic. You can use a lifecycle hook for this stage. - TEST_TRAFFIC_SHIFT The blue and green service revisions are running. The blue service revision handles 100% of the production traffic. The green service revision is migrating from 0% to 100% of test traffic. You can use a lifecycle hook for this stage. - POST_TEST_TRAFFIC_SHIFT The test traffic shift is complete. The green service revision handles 100% of the test traffic. You can use a lifecycle hook for this stage. - PRODUCTION_TRAFFIC_SHIFT Production traffic is shifting to the green service revision. The green service revision is migrating from 0% to 100% of production traffic. You can use a lifecycle hook for this stage. - POST_PRODUCTION_TRAFFIC_SHIFT The production traffic shift is complete. You can use a lifecycle hook for this stage. You must provide this parameter when configuring a deployment lifecycle hook.
|
|
10504
|
+
:param role_arn: The Amazon Resource Name (ARN) of the IAM role that grants Amazon ECS permission to call Lambda functions on your behalf. For more information, see `Permissions required for Lambda functions in Amazon ECS blue/green deployments <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/blue-green-permissions.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
|
|
10042
10505
|
|
|
10043
10506
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-deploymentlifecyclehook.html
|
|
10044
10507
|
:exampleMetadata: fixture=_generated
|
|
@@ -10068,7 +10531,10 @@ class CfnService(
|
|
|
10068
10531
|
|
|
10069
10532
|
@builtins.property
|
|
10070
10533
|
def hook_target_arn(self) -> builtins.str:
|
|
10071
|
-
'''
|
|
10534
|
+
'''The Amazon Resource Name (ARN) of the hook target. Currently, only Lambda function ARNs are supported.
|
|
10535
|
+
|
|
10536
|
+
You must provide this parameter when configuring a deployment lifecycle hook.
|
|
10537
|
+
|
|
10072
10538
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-deploymentlifecyclehook.html#cfn-ecs-service-deploymentlifecyclehook-hooktargetarn
|
|
10073
10539
|
'''
|
|
10074
10540
|
result = self._values.get("hook_target_arn")
|
|
@@ -10077,7 +10543,52 @@ class CfnService(
|
|
|
10077
10543
|
|
|
10078
10544
|
@builtins.property
|
|
10079
10545
|
def lifecycle_stages(self) -> typing.List[builtins.str]:
|
|
10080
|
-
'''
|
|
10546
|
+
'''The lifecycle stages at which to run the hook. Choose from these valid values:.
|
|
10547
|
+
|
|
10548
|
+
- RECONCILE_SERVICE
|
|
10549
|
+
|
|
10550
|
+
The reconciliation stage that only happens when you start a new service deployment with more than 1 service revision in an ACTIVE state.
|
|
10551
|
+
|
|
10552
|
+
You can use a lifecycle hook for this stage.
|
|
10553
|
+
|
|
10554
|
+
- PRE_SCALE_UP
|
|
10555
|
+
|
|
10556
|
+
The green service revision has not started. The blue service revision is handling 100% of the production traffic. There is no test traffic.
|
|
10557
|
+
|
|
10558
|
+
You can use a lifecycle hook for this stage.
|
|
10559
|
+
|
|
10560
|
+
- POST_SCALE_UP
|
|
10561
|
+
|
|
10562
|
+
The green service revision has started. The blue service revision is handling 100% of the production traffic. There is no test traffic.
|
|
10563
|
+
|
|
10564
|
+
You can use a lifecycle hook for this stage.
|
|
10565
|
+
|
|
10566
|
+
- TEST_TRAFFIC_SHIFT
|
|
10567
|
+
|
|
10568
|
+
The blue and green service revisions are running. The blue service revision handles 100% of the production traffic. The green service revision is migrating from 0% to 100% of test traffic.
|
|
10569
|
+
|
|
10570
|
+
You can use a lifecycle hook for this stage.
|
|
10571
|
+
|
|
10572
|
+
- POST_TEST_TRAFFIC_SHIFT
|
|
10573
|
+
|
|
10574
|
+
The test traffic shift is complete. The green service revision handles 100% of the test traffic.
|
|
10575
|
+
|
|
10576
|
+
You can use a lifecycle hook for this stage.
|
|
10577
|
+
|
|
10578
|
+
- PRODUCTION_TRAFFIC_SHIFT
|
|
10579
|
+
|
|
10580
|
+
Production traffic is shifting to the green service revision. The green service revision is migrating from 0% to 100% of production traffic.
|
|
10581
|
+
|
|
10582
|
+
You can use a lifecycle hook for this stage.
|
|
10583
|
+
|
|
10584
|
+
- POST_PRODUCTION_TRAFFIC_SHIFT
|
|
10585
|
+
|
|
10586
|
+
The production traffic shift is complete.
|
|
10587
|
+
|
|
10588
|
+
You can use a lifecycle hook for this stage.
|
|
10589
|
+
|
|
10590
|
+
You must provide this parameter when configuring a deployment lifecycle hook.
|
|
10591
|
+
|
|
10081
10592
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-deploymentlifecyclehook.html#cfn-ecs-service-deploymentlifecyclehook-lifecyclestages
|
|
10082
10593
|
'''
|
|
10083
10594
|
result = self._values.get("lifecycle_stages")
|
|
@@ -10086,7 +10597,10 @@ class CfnService(
|
|
|
10086
10597
|
|
|
10087
10598
|
@builtins.property
|
|
10088
10599
|
def role_arn(self) -> builtins.str:
|
|
10089
|
-
'''
|
|
10600
|
+
'''The Amazon Resource Name (ARN) of the IAM role that grants Amazon ECS permission to call Lambda functions on your behalf.
|
|
10601
|
+
|
|
10602
|
+
For more information, see `Permissions required for Lambda functions in Amazon ECS blue/green deployments <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/blue-green-permissions.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
|
|
10603
|
+
|
|
10090
10604
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-deploymentlifecyclehook.html#cfn-ecs-service-deploymentlifecyclehook-rolearn
|
|
10091
10605
|
'''
|
|
10092
10606
|
result = self._values.get("role_arn")
|
|
@@ -10230,7 +10744,7 @@ class CfnService(
|
|
|
10230
10744
|
|
|
10231
10745
|
Services with tasks that use the ``awsvpc`` network mode (for example, those with the Fargate launch type) only support Application Load Balancers and Network Load Balancers. Classic Load Balancers are not supported. Also, when you create any target groups for these services, you must choose ``ip`` as the target type, not ``instance`` . Tasks that use the ``awsvpc`` network mode are associated with an elastic network interface, not an Amazon EC2 instance.
|
|
10232
10746
|
|
|
10233
|
-
:param advanced_configuration:
|
|
10747
|
+
:param advanced_configuration: The advanced settings for the load balancer used in blue/green deployments. Specify the alternate target group, listener rules, and IAM role required for traffic shifting during blue/green deployments.
|
|
10234
10748
|
:param container_name: The name of the container (as it appears in a container definition) to associate with the load balancer. You need to specify the container name when configuring the target group for an Amazon ECS load balancer.
|
|
10235
10749
|
:param container_port: The port on the container to associate with the load balancer. This port must correspond to a ``containerPort`` in the task definition the tasks in the service are using. For tasks that use the EC2 launch type, the container instance they're launched on must allow ingress traffic on the ``hostPort`` of the port mapping.
|
|
10236
10750
|
:param load_balancer_name: The name of the load balancer to associate with the Amazon ECS service or task set. If you are using an Application Load Balancer or a Network Load Balancer the load balancer name parameter should be omitted.
|
|
@@ -10283,7 +10797,10 @@ class CfnService(
|
|
|
10283
10797
|
def advanced_configuration(
|
|
10284
10798
|
self,
|
|
10285
10799
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnService.AdvancedConfigurationProperty"]]:
|
|
10286
|
-
'''
|
|
10800
|
+
'''The advanced settings for the load balancer used in blue/green deployments.
|
|
10801
|
+
|
|
10802
|
+
Specify the alternate target group, listener rules, and IAM role required for traffic shifting during blue/green deployments.
|
|
10803
|
+
|
|
10287
10804
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-loadbalancer.html#cfn-ecs-service-loadbalancer-advancedconfiguration
|
|
10288
10805
|
'''
|
|
10289
10806
|
result = self._values.get("advanced_configuration")
|
|
@@ -10902,7 +11419,7 @@ class CfnService(
|
|
|
10902
11419
|
|
|
10903
11420
|
:param port: The listening port number for the Service Connect proxy. This port is available inside of all of the tasks within the same namespace. To avoid changing your applications in client Amazon ECS services, set this to the same port that the client application uses by default. For more information, see `Service Connect <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
|
|
10904
11421
|
:param dns_name: The ``dnsName`` is the name that you use in the applications of client tasks to connect to this service. The name must be a valid DNS name but doesn't need to be fully-qualified. The name can include up to 127 characters. The name can include lowercase letters, numbers, underscores (_), hyphens (-), and periods (.). The name can't start with a hyphen. If this parameter isn't specified, the default value of ``discoveryName.namespace`` is used. If the ``discoveryName`` isn't specified, the port mapping name from the task definition is used in ``portName.namespace`` . To avoid changing your applications in client Amazon ECS services, set this to the same name that the client application uses by default. For example, a few common names are ``database`` , ``db`` , or the lowercase name of a database, such as ``mysql`` or ``redis`` . For more information, see `Service Connect <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
|
|
10905
|
-
:param test_traffic_rules:
|
|
11422
|
+
:param test_traffic_rules: The configuration for test traffic routing rules used during blue/green deployments with Amazon ECS Service Connect. This allows you to route a portion of traffic to the new service revision of your service for testing before shifting all production traffic.
|
|
10906
11423
|
|
|
10907
11424
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-serviceconnectclientalias.html
|
|
10908
11425
|
:exampleMetadata: fixture=_generated
|
|
@@ -10976,7 +11493,10 @@ class CfnService(
|
|
|
10976
11493
|
def test_traffic_rules(
|
|
10977
11494
|
self,
|
|
10978
11495
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnService.ServiceConnectTestTrafficRulesProperty"]]:
|
|
10979
|
-
'''
|
|
11496
|
+
'''The configuration for test traffic routing rules used during blue/green deployments with Amazon ECS Service Connect.
|
|
11497
|
+
|
|
11498
|
+
This allows you to route a portion of traffic to the new service revision of your service for testing before shifting all production traffic.
|
|
11499
|
+
|
|
10980
11500
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-serviceconnectclientalias.html#cfn-ecs-service-serviceconnectclientalias-testtrafficrules
|
|
10981
11501
|
'''
|
|
10982
11502
|
result = self._values.get("test_traffic_rules")
|
|
@@ -11502,8 +12022,13 @@ class CfnService(
|
|
|
11502
12022
|
*,
|
|
11503
12023
|
header: typing.Union[_IResolvable_da3f097b, typing.Union["CfnService.ServiceConnectTestTrafficRulesHeaderProperty", typing.Dict[builtins.str, typing.Any]]],
|
|
11504
12024
|
) -> None:
|
|
11505
|
-
'''
|
|
11506
|
-
|
|
12025
|
+
'''The test traffic routing configuration for Amazon ECS blue/green deployments.
|
|
12026
|
+
|
|
12027
|
+
This configuration allows you to define rules for routing specific traffic to the new service revision during the deployment process, allowing for safe testing before full production traffic shift.
|
|
12028
|
+
|
|
12029
|
+
For more information, see `Service Connect for Amazon ECS blue/green deployments <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect-blue-green.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
|
|
12030
|
+
|
|
12031
|
+
:param header: The HTTP header-based routing rules that determine which requests should be routed to the new service version during blue/green deployment testing. These rules provide fine-grained control over test traffic routing based on request headers.
|
|
11507
12032
|
|
|
11508
12033
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-serviceconnecttesttrafficrules.html
|
|
11509
12034
|
:exampleMetadata: fixture=_generated
|
|
@@ -11536,7 +12061,10 @@ class CfnService(
|
|
|
11536
12061
|
def header(
|
|
11537
12062
|
self,
|
|
11538
12063
|
) -> typing.Union[_IResolvable_da3f097b, "CfnService.ServiceConnectTestTrafficRulesHeaderProperty"]:
|
|
11539
|
-
'''
|
|
12064
|
+
'''The HTTP header-based routing rules that determine which requests should be routed to the new service version during blue/green deployment testing.
|
|
12065
|
+
|
|
12066
|
+
These rules provide fine-grained control over test traffic routing based on request headers.
|
|
12067
|
+
|
|
11540
12068
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-serviceconnecttesttrafficrules.html#cfn-ecs-service-serviceconnecttesttrafficrules-header
|
|
11541
12069
|
'''
|
|
11542
12070
|
result = self._values.get("header")
|
|
@@ -24332,6 +24860,287 @@ class DeploymentControllerType(enum.Enum):
|
|
|
24332
24860
|
'''The external (EXTERNAL) deployment type enables you to use any third-party deployment controller.'''
|
|
24333
24861
|
|
|
24334
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
|
+
|
|
24335
25144
|
@jsii.data_type(
|
|
24336
25145
|
jsii_type="aws-cdk-lib.aws_ecs.Device",
|
|
24337
25146
|
jsii_struct_bases=[],
|
|
@@ -24934,15 +25743,18 @@ class Ec2ServiceAttributes:
|
|
|
24934
25743
|
jsii_struct_bases=[BaseServiceOptions],
|
|
24935
25744
|
name_mapping={
|
|
24936
25745
|
"cluster": "cluster",
|
|
25746
|
+
"bake_time": "bakeTime",
|
|
24937
25747
|
"capacity_provider_strategies": "capacityProviderStrategies",
|
|
24938
25748
|
"circuit_breaker": "circuitBreaker",
|
|
24939
25749
|
"cloud_map_options": "cloudMapOptions",
|
|
24940
25750
|
"deployment_alarms": "deploymentAlarms",
|
|
24941
25751
|
"deployment_controller": "deploymentController",
|
|
25752
|
+
"deployment_strategy": "deploymentStrategy",
|
|
24942
25753
|
"desired_count": "desiredCount",
|
|
24943
25754
|
"enable_ecs_managed_tags": "enableECSManagedTags",
|
|
24944
25755
|
"enable_execute_command": "enableExecuteCommand",
|
|
24945
25756
|
"health_check_grace_period": "healthCheckGracePeriod",
|
|
25757
|
+
"lifecycle_hooks": "lifecycleHooks",
|
|
24946
25758
|
"max_healthy_percent": "maxHealthyPercent",
|
|
24947
25759
|
"min_healthy_percent": "minHealthyPercent",
|
|
24948
25760
|
"propagate_tags": "propagateTags",
|
|
@@ -24965,15 +25777,18 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
24965
25777
|
self,
|
|
24966
25778
|
*,
|
|
24967
25779
|
cluster: "ICluster",
|
|
25780
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
24968
25781
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
24969
25782
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
24970
25783
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
24971
25784
|
deployment_alarms: typing.Optional[typing.Union["DeploymentAlarmConfig", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
24972
25785
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
25786
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
24973
25787
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
24974
25788
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
24975
25789
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
24976
25790
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
25791
|
+
lifecycle_hooks: typing.Optional[typing.Sequence["IDeploymentLifecycleHookTarget"]] = None,
|
|
24977
25792
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
24978
25793
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
24979
25794
|
propagate_tags: typing.Optional["PropagatedTagSource"] = None,
|
|
@@ -24993,15 +25808,18 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
24993
25808
|
'''The properties for defining a service using the EC2 launch type.
|
|
24994
25809
|
|
|
24995
25810
|
:param cluster: The name of the cluster that hosts the service.
|
|
25811
|
+
:param bake_time: bake time minutes for service. Default: - none
|
|
24996
25812
|
:param capacity_provider_strategies: A list of Capacity Provider strategies used to place a service. Default: - undefined
|
|
24997
25813
|
:param circuit_breaker: Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly enabled. Default: - disabled
|
|
24998
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.
|
|
24999
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.
|
|
25000
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
|
|
25001
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.
|
|
25002
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
|
|
25003
25820
|
:param enable_execute_command: Whether to enable the ability to execute into a container. Default: - undefined
|
|
25004
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;
|
|
25005
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
|
|
25006
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
|
|
25007
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
|
|
@@ -25063,15 +25881,18 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
25063
25881
|
if __debug__:
|
|
25064
25882
|
type_hints = typing.get_type_hints(_typecheckingstub__95634258086aa3448fbdfd9896017a2cbeb858f382deb61186bb9e22b1ccd366)
|
|
25065
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"])
|
|
25066
25885
|
check_type(argname="argument capacity_provider_strategies", value=capacity_provider_strategies, expected_type=type_hints["capacity_provider_strategies"])
|
|
25067
25886
|
check_type(argname="argument circuit_breaker", value=circuit_breaker, expected_type=type_hints["circuit_breaker"])
|
|
25068
25887
|
check_type(argname="argument cloud_map_options", value=cloud_map_options, expected_type=type_hints["cloud_map_options"])
|
|
25069
25888
|
check_type(argname="argument deployment_alarms", value=deployment_alarms, expected_type=type_hints["deployment_alarms"])
|
|
25070
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"])
|
|
25071
25891
|
check_type(argname="argument desired_count", value=desired_count, expected_type=type_hints["desired_count"])
|
|
25072
25892
|
check_type(argname="argument enable_ecs_managed_tags", value=enable_ecs_managed_tags, expected_type=type_hints["enable_ecs_managed_tags"])
|
|
25073
25893
|
check_type(argname="argument enable_execute_command", value=enable_execute_command, expected_type=type_hints["enable_execute_command"])
|
|
25074
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"])
|
|
25075
25896
|
check_type(argname="argument max_healthy_percent", value=max_healthy_percent, expected_type=type_hints["max_healthy_percent"])
|
|
25076
25897
|
check_type(argname="argument min_healthy_percent", value=min_healthy_percent, expected_type=type_hints["min_healthy_percent"])
|
|
25077
25898
|
check_type(argname="argument propagate_tags", value=propagate_tags, expected_type=type_hints["propagate_tags"])
|
|
@@ -25091,6 +25912,8 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
25091
25912
|
"cluster": cluster,
|
|
25092
25913
|
"task_definition": task_definition,
|
|
25093
25914
|
}
|
|
25915
|
+
if bake_time is not None:
|
|
25916
|
+
self._values["bake_time"] = bake_time
|
|
25094
25917
|
if capacity_provider_strategies is not None:
|
|
25095
25918
|
self._values["capacity_provider_strategies"] = capacity_provider_strategies
|
|
25096
25919
|
if circuit_breaker is not None:
|
|
@@ -25101,6 +25924,8 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
25101
25924
|
self._values["deployment_alarms"] = deployment_alarms
|
|
25102
25925
|
if deployment_controller is not None:
|
|
25103
25926
|
self._values["deployment_controller"] = deployment_controller
|
|
25927
|
+
if deployment_strategy is not None:
|
|
25928
|
+
self._values["deployment_strategy"] = deployment_strategy
|
|
25104
25929
|
if desired_count is not None:
|
|
25105
25930
|
self._values["desired_count"] = desired_count
|
|
25106
25931
|
if enable_ecs_managed_tags is not None:
|
|
@@ -25109,6 +25934,8 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
25109
25934
|
self._values["enable_execute_command"] = enable_execute_command
|
|
25110
25935
|
if health_check_grace_period is not None:
|
|
25111
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
|
|
25112
25939
|
if max_healthy_percent is not None:
|
|
25113
25940
|
self._values["max_healthy_percent"] = max_healthy_percent
|
|
25114
25941
|
if min_healthy_percent is not None:
|
|
@@ -25145,6 +25972,15 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
25145
25972
|
assert result is not None, "Required property 'cluster' is missing"
|
|
25146
25973
|
return typing.cast("ICluster", result)
|
|
25147
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
|
+
|
|
25148
25984
|
@builtins.property
|
|
25149
25985
|
def capacity_provider_strategies(
|
|
25150
25986
|
self,
|
|
@@ -25198,6 +26034,15 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
25198
26034
|
result = self._values.get("deployment_controller")
|
|
25199
26035
|
return typing.cast(typing.Optional[DeploymentController], result)
|
|
25200
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
|
+
|
|
25201
26046
|
@builtins.property
|
|
25202
26047
|
def desired_count(self) -> typing.Optional[jsii.Number]:
|
|
25203
26048
|
'''The desired number of instantiations of the task definition to keep running on the service.
|
|
@@ -25240,6 +26085,17 @@ class Ec2ServiceProps(BaseServiceOptions):
|
|
|
25240
26085
|
result = self._values.get("health_check_grace_period")
|
|
25241
26086
|
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
25242
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
|
+
|
|
25243
26099
|
@builtins.property
|
|
25244
26100
|
def max_healthy_percent(self) -> typing.Optional[jsii.Number]:
|
|
25245
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.
|
|
@@ -26955,15 +27811,18 @@ class ExternalServiceAttributes:
|
|
|
26955
27811
|
jsii_struct_bases=[BaseServiceOptions],
|
|
26956
27812
|
name_mapping={
|
|
26957
27813
|
"cluster": "cluster",
|
|
27814
|
+
"bake_time": "bakeTime",
|
|
26958
27815
|
"capacity_provider_strategies": "capacityProviderStrategies",
|
|
26959
27816
|
"circuit_breaker": "circuitBreaker",
|
|
26960
27817
|
"cloud_map_options": "cloudMapOptions",
|
|
26961
27818
|
"deployment_alarms": "deploymentAlarms",
|
|
26962
27819
|
"deployment_controller": "deploymentController",
|
|
27820
|
+
"deployment_strategy": "deploymentStrategy",
|
|
26963
27821
|
"desired_count": "desiredCount",
|
|
26964
27822
|
"enable_ecs_managed_tags": "enableECSManagedTags",
|
|
26965
27823
|
"enable_execute_command": "enableExecuteCommand",
|
|
26966
27824
|
"health_check_grace_period": "healthCheckGracePeriod",
|
|
27825
|
+
"lifecycle_hooks": "lifecycleHooks",
|
|
26967
27826
|
"max_healthy_percent": "maxHealthyPercent",
|
|
26968
27827
|
"min_healthy_percent": "minHealthyPercent",
|
|
26969
27828
|
"propagate_tags": "propagateTags",
|
|
@@ -26981,15 +27840,18 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
26981
27840
|
self,
|
|
26982
27841
|
*,
|
|
26983
27842
|
cluster: "ICluster",
|
|
27843
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
26984
27844
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
26985
27845
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
26986
27846
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
26987
27847
|
deployment_alarms: typing.Optional[typing.Union["DeploymentAlarmConfig", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
26988
27848
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
27849
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
26989
27850
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
26990
27851
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
26991
27852
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
26992
27853
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
27854
|
+
lifecycle_hooks: typing.Optional[typing.Sequence["IDeploymentLifecycleHookTarget"]] = None,
|
|
26993
27855
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
26994
27856
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
26995
27857
|
propagate_tags: typing.Optional["PropagatedTagSource"] = None,
|
|
@@ -27004,15 +27866,18 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27004
27866
|
'''The properties for defining a service using the External launch type.
|
|
27005
27867
|
|
|
27006
27868
|
:param cluster: The name of the cluster that hosts the service.
|
|
27869
|
+
:param bake_time: bake time minutes for service. Default: - none
|
|
27007
27870
|
:param capacity_provider_strategies: A list of Capacity Provider strategies used to place a service. Default: - undefined
|
|
27008
27871
|
:param circuit_breaker: Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly enabled. Default: - disabled
|
|
27009
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.
|
|
27010
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.
|
|
27011
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
|
|
27012
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.
|
|
27013
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
|
|
27014
27878
|
:param enable_execute_command: Whether to enable the ability to execute into a container. Default: - undefined
|
|
27015
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;
|
|
27016
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
|
|
27017
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
|
|
27018
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
|
|
@@ -27057,15 +27922,18 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27057
27922
|
if __debug__:
|
|
27058
27923
|
type_hints = typing.get_type_hints(_typecheckingstub__3cc413964caae89bfcfbcabff8356ffe5c054f46824be99731a77b64ec052a8a)
|
|
27059
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"])
|
|
27060
27926
|
check_type(argname="argument capacity_provider_strategies", value=capacity_provider_strategies, expected_type=type_hints["capacity_provider_strategies"])
|
|
27061
27927
|
check_type(argname="argument circuit_breaker", value=circuit_breaker, expected_type=type_hints["circuit_breaker"])
|
|
27062
27928
|
check_type(argname="argument cloud_map_options", value=cloud_map_options, expected_type=type_hints["cloud_map_options"])
|
|
27063
27929
|
check_type(argname="argument deployment_alarms", value=deployment_alarms, expected_type=type_hints["deployment_alarms"])
|
|
27064
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"])
|
|
27065
27932
|
check_type(argname="argument desired_count", value=desired_count, expected_type=type_hints["desired_count"])
|
|
27066
27933
|
check_type(argname="argument enable_ecs_managed_tags", value=enable_ecs_managed_tags, expected_type=type_hints["enable_ecs_managed_tags"])
|
|
27067
27934
|
check_type(argname="argument enable_execute_command", value=enable_execute_command, expected_type=type_hints["enable_execute_command"])
|
|
27068
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"])
|
|
27069
27937
|
check_type(argname="argument max_healthy_percent", value=max_healthy_percent, expected_type=type_hints["max_healthy_percent"])
|
|
27070
27938
|
check_type(argname="argument min_healthy_percent", value=min_healthy_percent, expected_type=type_hints["min_healthy_percent"])
|
|
27071
27939
|
check_type(argname="argument propagate_tags", value=propagate_tags, expected_type=type_hints["propagate_tags"])
|
|
@@ -27080,6 +27948,8 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27080
27948
|
"cluster": cluster,
|
|
27081
27949
|
"task_definition": task_definition,
|
|
27082
27950
|
}
|
|
27951
|
+
if bake_time is not None:
|
|
27952
|
+
self._values["bake_time"] = bake_time
|
|
27083
27953
|
if capacity_provider_strategies is not None:
|
|
27084
27954
|
self._values["capacity_provider_strategies"] = capacity_provider_strategies
|
|
27085
27955
|
if circuit_breaker is not None:
|
|
@@ -27090,6 +27960,8 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27090
27960
|
self._values["deployment_alarms"] = deployment_alarms
|
|
27091
27961
|
if deployment_controller is not None:
|
|
27092
27962
|
self._values["deployment_controller"] = deployment_controller
|
|
27963
|
+
if deployment_strategy is not None:
|
|
27964
|
+
self._values["deployment_strategy"] = deployment_strategy
|
|
27093
27965
|
if desired_count is not None:
|
|
27094
27966
|
self._values["desired_count"] = desired_count
|
|
27095
27967
|
if enable_ecs_managed_tags is not None:
|
|
@@ -27098,6 +27970,8 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27098
27970
|
self._values["enable_execute_command"] = enable_execute_command
|
|
27099
27971
|
if health_check_grace_period is not None:
|
|
27100
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
|
|
27101
27975
|
if max_healthy_percent is not None:
|
|
27102
27976
|
self._values["max_healthy_percent"] = max_healthy_percent
|
|
27103
27977
|
if min_healthy_percent is not None:
|
|
@@ -27124,6 +27998,15 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27124
27998
|
assert result is not None, "Required property 'cluster' is missing"
|
|
27125
27999
|
return typing.cast("ICluster", result)
|
|
27126
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
|
+
|
|
27127
28010
|
@builtins.property
|
|
27128
28011
|
def capacity_provider_strategies(
|
|
27129
28012
|
self,
|
|
@@ -27177,6 +28060,15 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27177
28060
|
result = self._values.get("deployment_controller")
|
|
27178
28061
|
return typing.cast(typing.Optional[DeploymentController], result)
|
|
27179
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
|
+
|
|
27180
28072
|
@builtins.property
|
|
27181
28073
|
def desired_count(self) -> typing.Optional[jsii.Number]:
|
|
27182
28074
|
'''The desired number of instantiations of the task definition to keep running on the service.
|
|
@@ -27219,6 +28111,17 @@ class ExternalServiceProps(BaseServiceOptions):
|
|
|
27219
28111
|
result = self._values.get("health_check_grace_period")
|
|
27220
28112
|
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
27221
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
|
+
|
|
27222
28125
|
@builtins.property
|
|
27223
28126
|
def max_healthy_percent(self) -> typing.Optional[jsii.Number]:
|
|
27224
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.
|
|
@@ -27799,15 +28702,18 @@ class FargateServiceAttributes:
|
|
|
27799
28702
|
jsii_struct_bases=[BaseServiceOptions],
|
|
27800
28703
|
name_mapping={
|
|
27801
28704
|
"cluster": "cluster",
|
|
28705
|
+
"bake_time": "bakeTime",
|
|
27802
28706
|
"capacity_provider_strategies": "capacityProviderStrategies",
|
|
27803
28707
|
"circuit_breaker": "circuitBreaker",
|
|
27804
28708
|
"cloud_map_options": "cloudMapOptions",
|
|
27805
28709
|
"deployment_alarms": "deploymentAlarms",
|
|
27806
28710
|
"deployment_controller": "deploymentController",
|
|
28711
|
+
"deployment_strategy": "deploymentStrategy",
|
|
27807
28712
|
"desired_count": "desiredCount",
|
|
27808
28713
|
"enable_ecs_managed_tags": "enableECSManagedTags",
|
|
27809
28714
|
"enable_execute_command": "enableExecuteCommand",
|
|
27810
28715
|
"health_check_grace_period": "healthCheckGracePeriod",
|
|
28716
|
+
"lifecycle_hooks": "lifecycleHooks",
|
|
27811
28717
|
"max_healthy_percent": "maxHealthyPercent",
|
|
27812
28718
|
"min_healthy_percent": "minHealthyPercent",
|
|
27813
28719
|
"propagate_tags": "propagateTags",
|
|
@@ -27828,15 +28734,18 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
27828
28734
|
self,
|
|
27829
28735
|
*,
|
|
27830
28736
|
cluster: "ICluster",
|
|
28737
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
27831
28738
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
27832
28739
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
27833
28740
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
27834
28741
|
deployment_alarms: typing.Optional[typing.Union["DeploymentAlarmConfig", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
27835
28742
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
28743
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
27836
28744
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
27837
28745
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
27838
28746
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
27839
28747
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
28748
|
+
lifecycle_hooks: typing.Optional[typing.Sequence["IDeploymentLifecycleHookTarget"]] = None,
|
|
27840
28749
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
27841
28750
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
27842
28751
|
propagate_tags: typing.Optional["PropagatedTagSource"] = None,
|
|
@@ -27854,15 +28763,18 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
27854
28763
|
'''The properties for defining a service using the Fargate launch type.
|
|
27855
28764
|
|
|
27856
28765
|
:param cluster: The name of the cluster that hosts the service.
|
|
28766
|
+
:param bake_time: bake time minutes for service. Default: - none
|
|
27857
28767
|
:param capacity_provider_strategies: A list of Capacity Provider strategies used to place a service. Default: - undefined
|
|
27858
28768
|
:param circuit_breaker: Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly enabled. Default: - disabled
|
|
27859
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.
|
|
27860
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.
|
|
27861
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
|
|
27862
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.
|
|
27863
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
|
|
27864
28775
|
:param enable_execute_command: Whether to enable the ability to execute into a container. Default: - undefined
|
|
27865
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;
|
|
27866
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
|
|
27867
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
|
|
27868
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
|
|
@@ -27925,15 +28837,18 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
27925
28837
|
if __debug__:
|
|
27926
28838
|
type_hints = typing.get_type_hints(_typecheckingstub__8290283f61f3e2d289b7e7f81cad1a5d1e9ed9dbc07ccce2b57604682a42ded7)
|
|
27927
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"])
|
|
27928
28841
|
check_type(argname="argument capacity_provider_strategies", value=capacity_provider_strategies, expected_type=type_hints["capacity_provider_strategies"])
|
|
27929
28842
|
check_type(argname="argument circuit_breaker", value=circuit_breaker, expected_type=type_hints["circuit_breaker"])
|
|
27930
28843
|
check_type(argname="argument cloud_map_options", value=cloud_map_options, expected_type=type_hints["cloud_map_options"])
|
|
27931
28844
|
check_type(argname="argument deployment_alarms", value=deployment_alarms, expected_type=type_hints["deployment_alarms"])
|
|
27932
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"])
|
|
27933
28847
|
check_type(argname="argument desired_count", value=desired_count, expected_type=type_hints["desired_count"])
|
|
27934
28848
|
check_type(argname="argument enable_ecs_managed_tags", value=enable_ecs_managed_tags, expected_type=type_hints["enable_ecs_managed_tags"])
|
|
27935
28849
|
check_type(argname="argument enable_execute_command", value=enable_execute_command, expected_type=type_hints["enable_execute_command"])
|
|
27936
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"])
|
|
27937
28852
|
check_type(argname="argument max_healthy_percent", value=max_healthy_percent, expected_type=type_hints["max_healthy_percent"])
|
|
27938
28853
|
check_type(argname="argument min_healthy_percent", value=min_healthy_percent, expected_type=type_hints["min_healthy_percent"])
|
|
27939
28854
|
check_type(argname="argument propagate_tags", value=propagate_tags, expected_type=type_hints["propagate_tags"])
|
|
@@ -27951,6 +28866,8 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
27951
28866
|
"cluster": cluster,
|
|
27952
28867
|
"task_definition": task_definition,
|
|
27953
28868
|
}
|
|
28869
|
+
if bake_time is not None:
|
|
28870
|
+
self._values["bake_time"] = bake_time
|
|
27954
28871
|
if capacity_provider_strategies is not None:
|
|
27955
28872
|
self._values["capacity_provider_strategies"] = capacity_provider_strategies
|
|
27956
28873
|
if circuit_breaker is not None:
|
|
@@ -27961,6 +28878,8 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
27961
28878
|
self._values["deployment_alarms"] = deployment_alarms
|
|
27962
28879
|
if deployment_controller is not None:
|
|
27963
28880
|
self._values["deployment_controller"] = deployment_controller
|
|
28881
|
+
if deployment_strategy is not None:
|
|
28882
|
+
self._values["deployment_strategy"] = deployment_strategy
|
|
27964
28883
|
if desired_count is not None:
|
|
27965
28884
|
self._values["desired_count"] = desired_count
|
|
27966
28885
|
if enable_ecs_managed_tags is not None:
|
|
@@ -27969,6 +28888,8 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
27969
28888
|
self._values["enable_execute_command"] = enable_execute_command
|
|
27970
28889
|
if health_check_grace_period is not None:
|
|
27971
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
|
|
27972
28893
|
if max_healthy_percent is not None:
|
|
27973
28894
|
self._values["max_healthy_percent"] = max_healthy_percent
|
|
27974
28895
|
if min_healthy_percent is not None:
|
|
@@ -28001,6 +28922,15 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
28001
28922
|
assert result is not None, "Required property 'cluster' is missing"
|
|
28002
28923
|
return typing.cast("ICluster", result)
|
|
28003
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
|
+
|
|
28004
28934
|
@builtins.property
|
|
28005
28935
|
def capacity_provider_strategies(
|
|
28006
28936
|
self,
|
|
@@ -28054,6 +28984,15 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
28054
28984
|
result = self._values.get("deployment_controller")
|
|
28055
28985
|
return typing.cast(typing.Optional[DeploymentController], result)
|
|
28056
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
|
+
|
|
28057
28996
|
@builtins.property
|
|
28058
28997
|
def desired_count(self) -> typing.Optional[jsii.Number]:
|
|
28059
28998
|
'''The desired number of instantiations of the task definition to keep running on the service.
|
|
@@ -28096,6 +29035,17 @@ class FargateServiceProps(BaseServiceOptions):
|
|
|
28096
29035
|
result = self._values.get("health_check_grace_period")
|
|
28097
29036
|
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
28098
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
|
+
|
|
28099
29049
|
@builtins.property
|
|
28100
29050
|
def max_healthy_percent(self) -> typing.Optional[jsii.Number]:
|
|
28101
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.
|
|
@@ -31739,6 +32689,43 @@ class Host:
|
|
|
31739
32689
|
)
|
|
31740
32690
|
|
|
31741
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
|
+
|
|
31742
32729
|
@jsii.interface(jsii_type="aws-cdk-lib.aws_ecs.ICluster")
|
|
31743
32730
|
class ICluster(_IResource_c80c4260, typing_extensions.Protocol):
|
|
31744
32731
|
'''A regional grouping of one or more container instances on which you can run tasks and services.'''
|
|
@@ -31867,6 +32854,45 @@ class _IClusterProxy(
|
|
|
31867
32854
|
typing.cast(typing.Any, ICluster).__jsii_proxy_class__ = lambda : _IClusterProxy
|
|
31868
32855
|
|
|
31869
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
|
+
|
|
31870
32896
|
@jsii.interface(jsii_type="aws-cdk-lib.aws_ecs.IEcsLoadBalancerTarget")
|
|
31871
32897
|
class IEcsLoadBalancerTarget(
|
|
31872
32898
|
_IApplicationLoadBalancerTarget_fabf9003,
|
|
@@ -32941,6 +33967,89 @@ class _ListenerConfigProxy(ListenerConfig):
|
|
|
32941
33967
|
typing.cast(typing.Any, ListenerConfig).__jsii_proxy_class__ = lambda : _ListenerConfigProxy
|
|
32942
33968
|
|
|
32943
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
|
+
|
|
32944
34053
|
@jsii.data_type(
|
|
32945
34054
|
jsii_type="aws-cdk-lib.aws_ecs.LoadBalancerTargetOptions",
|
|
32946
34055
|
jsii_struct_bases=[],
|
|
@@ -34627,34 +35736,36 @@ class Protocol(enum.Enum):
|
|
|
34627
35736
|
|
|
34628
35737
|
Example::
|
|
34629
35738
|
|
|
34630
|
-
|
|
35739
|
+
import aws_cdk.aws_lambda as lambda_
|
|
35740
|
+
|
|
34631
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
|
|
34632
35747
|
|
|
34633
35748
|
|
|
34634
|
-
|
|
34635
|
-
|
|
34636
|
-
|
|
34637
|
-
|
|
35749
|
+
service = ecs.FargateService(self, "Service",
|
|
35750
|
+
cluster=cluster,
|
|
35751
|
+
task_definition=task_definition,
|
|
35752
|
+
deployment_strategy=ecs.DeploymentStrategy.BLUE_GREEN
|
|
34638
35753
|
)
|
|
34639
35754
|
|
|
34640
|
-
|
|
34641
|
-
|
|
34642
|
-
|
|
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,
|
|
34643
35762
|
protocol=ecs.Protocol.TCP
|
|
34644
|
-
)
|
|
35763
|
+
), ecs.AlternateTarget("AlternateTarget",
|
|
35764
|
+
alternate_target_group=green_target_group,
|
|
35765
|
+
production_listener=ecs.ListenerRuleConfiguration.application_listener_rule(prod_listener_rule)
|
|
35766
|
+
))
|
|
34645
35767
|
|
|
34646
|
-
|
|
34647
|
-
cluster=cluster,
|
|
34648
|
-
task_definition=task_definition,
|
|
34649
|
-
min_healthy_percent=100,
|
|
34650
|
-
cloud_map_options=ecs.CloudMapOptions(
|
|
34651
|
-
# Create SRV records - useful for bridge networking
|
|
34652
|
-
dns_record_type=cloudmap.DnsRecordType.SRV,
|
|
34653
|
-
# Targets port TCP port 7600 `specificContainer`
|
|
34654
|
-
container=specific_container,
|
|
34655
|
-
container_port=7600
|
|
34656
|
-
)
|
|
34657
|
-
)
|
|
35768
|
+
target.attach_to_application_target_group(blue_target_group)
|
|
34658
35769
|
'''
|
|
34659
35770
|
|
|
34660
35771
|
TCP = "TCP"
|
|
@@ -39915,6 +41026,89 @@ class WindowsOptimizedVersion(enum.Enum):
|
|
|
39915
41026
|
SERVER_2016 = "SERVER_2016"
|
|
39916
41027
|
|
|
39917
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
|
+
|
|
39918
41112
|
class AppMeshProxyConfiguration(
|
|
39919
41113
|
ProxyConfiguration,
|
|
39920
41114
|
metaclass=jsii.JSIIMeta,
|
|
@@ -41192,6 +42386,94 @@ class DeploymentAlarmConfig(DeploymentAlarmOptions):
|
|
|
41192
42386
|
)
|
|
41193
42387
|
|
|
41194
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
|
+
|
|
41195
42477
|
class FireLensLogDriver(
|
|
41196
42478
|
LogDriver,
|
|
41197
42479
|
metaclass=jsii.JSIIMeta,
|
|
@@ -41877,6 +43159,17 @@ class BaseService(
|
|
|
41877
43159
|
check_type(argname="argument service_arn", value=service_arn, expected_type=type_hints["service_arn"])
|
|
41878
43160
|
return typing.cast(IBaseService, jsii.sinvoke(cls, "fromServiceArnWithCluster", [scope, id, service_arn]))
|
|
41879
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
|
+
|
|
41880
43173
|
@jsii.member(jsii_name="addVolume")
|
|
41881
43174
|
def add_volume(self, volume: ServiceManagedVolume) -> None:
|
|
41882
43175
|
'''Adds a volume to the Service.
|
|
@@ -42084,13 +43377,19 @@ class BaseService(
|
|
|
42084
43377
|
|
|
42085
43378
|
return typing.cast(None, jsii.invoke(self, "enableServiceConnect", [config]))
|
|
42086
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
|
+
|
|
42087
43388
|
@jsii.member(jsii_name="loadBalancerTarget")
|
|
42088
43389
|
def load_balancer_target(
|
|
42089
43390
|
self,
|
|
42090
|
-
|
|
42091
|
-
|
|
42092
|
-
container_port: typing.Optional[jsii.Number] = None,
|
|
42093
|
-
protocol: typing.Optional[Protocol] = None,
|
|
43391
|
+
options: typing.Union[LoadBalancerTargetOptions, typing.Dict[builtins.str, typing.Any]],
|
|
43392
|
+
alternate_options: typing.Optional[IAlternateTarget] = None,
|
|
42094
43393
|
) -> IEcsLoadBalancerTarget:
|
|
42095
43394
|
'''Return a load balancing target for a specific container and port.
|
|
42096
43395
|
|
|
@@ -42101,9 +43400,8 @@ class BaseService(
|
|
|
42101
43400
|
Use the return value of this function where you would normally use a load balancer
|
|
42102
43401
|
target, instead of the ``Service`` object itself.
|
|
42103
43402
|
|
|
42104
|
-
:param
|
|
42105
|
-
:param
|
|
42106
|
-
: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: -
|
|
42107
43405
|
|
|
42108
43406
|
Example::
|
|
42109
43407
|
|
|
@@ -42118,13 +43416,11 @@ class BaseService(
|
|
|
42118
43416
|
)]
|
|
42119
43417
|
)
|
|
42120
43418
|
'''
|
|
42121
|
-
|
|
42122
|
-
|
|
42123
|
-
|
|
42124
|
-
|
|
42125
|
-
)
|
|
42126
|
-
|
|
42127
|
-
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]))
|
|
42128
43424
|
|
|
42129
43425
|
@jsii.member(jsii_name="metric")
|
|
42130
43426
|
def metric(
|
|
@@ -42497,15 +43793,18 @@ class Ec2Service(
|
|
|
42497
43793
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
42498
43794
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
42499
43795
|
cluster: ICluster,
|
|
43796
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
42500
43797
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
42501
43798
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
42502
43799
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
42503
43800
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
42504
43801
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
43802
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
42505
43803
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
42506
43804
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
42507
43805
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
42508
43806
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
43807
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
42509
43808
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
42510
43809
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
42511
43810
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -42527,15 +43826,18 @@ class Ec2Service(
|
|
|
42527
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.
|
|
42528
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.
|
|
42529
43828
|
:param cluster: The name of the cluster that hosts the service.
|
|
43829
|
+
:param bake_time: bake time minutes for service. Default: - none
|
|
42530
43830
|
:param capacity_provider_strategies: A list of Capacity Provider strategies used to place a service. Default: - undefined
|
|
42531
43831
|
:param circuit_breaker: Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly enabled. Default: - disabled
|
|
42532
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.
|
|
42533
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.
|
|
42534
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
|
|
42535
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.
|
|
42536
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
|
|
42537
43838
|
:param enable_execute_command: Whether to enable the ability to execute into a container. Default: - undefined
|
|
42538
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;
|
|
42539
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
|
|
42540
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
|
|
42541
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
|
|
@@ -42558,15 +43860,18 @@ class Ec2Service(
|
|
|
42558
43860
|
security_groups=security_groups,
|
|
42559
43861
|
vpc_subnets=vpc_subnets,
|
|
42560
43862
|
cluster=cluster,
|
|
43863
|
+
bake_time=bake_time,
|
|
42561
43864
|
capacity_provider_strategies=capacity_provider_strategies,
|
|
42562
43865
|
circuit_breaker=circuit_breaker,
|
|
42563
43866
|
cloud_map_options=cloud_map_options,
|
|
42564
43867
|
deployment_alarms=deployment_alarms,
|
|
42565
43868
|
deployment_controller=deployment_controller,
|
|
43869
|
+
deployment_strategy=deployment_strategy,
|
|
42566
43870
|
desired_count=desired_count,
|
|
42567
43871
|
enable_ecs_managed_tags=enable_ecs_managed_tags,
|
|
42568
43872
|
enable_execute_command=enable_execute_command,
|
|
42569
43873
|
health_check_grace_period=health_check_grace_period,
|
|
43874
|
+
lifecycle_hooks=lifecycle_hooks,
|
|
42570
43875
|
max_healthy_percent=max_healthy_percent,
|
|
42571
43876
|
min_healthy_percent=min_healthy_percent,
|
|
42572
43877
|
propagate_tags=propagate_tags,
|
|
@@ -42995,15 +44300,18 @@ class ExternalService(
|
|
|
42995
44300
|
daemon: typing.Optional[builtins.bool] = None,
|
|
42996
44301
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
42997
44302
|
cluster: ICluster,
|
|
44303
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
42998
44304
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
42999
44305
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
43000
44306
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
43001
44307
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
43002
44308
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
44309
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
43003
44310
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
43004
44311
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
43005
44312
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
43006
44313
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
44314
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
43007
44315
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
43008
44316
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
43009
44317
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -43020,15 +44328,18 @@ class ExternalService(
|
|
|
43020
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
|
|
43021
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.
|
|
43022
44330
|
:param cluster: The name of the cluster that hosts the service.
|
|
44331
|
+
:param bake_time: bake time minutes for service. Default: - none
|
|
43023
44332
|
:param capacity_provider_strategies: A list of Capacity Provider strategies used to place a service. Default: - undefined
|
|
43024
44333
|
:param circuit_breaker: Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly enabled. Default: - disabled
|
|
43025
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.
|
|
43026
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.
|
|
43027
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
|
|
43028
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.
|
|
43029
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
|
|
43030
44340
|
:param enable_execute_command: Whether to enable the ability to execute into a container. Default: - undefined
|
|
43031
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;
|
|
43032
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
|
|
43033
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
|
|
43034
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
|
|
@@ -43046,15 +44357,18 @@ class ExternalService(
|
|
|
43046
44357
|
daemon=daemon,
|
|
43047
44358
|
security_groups=security_groups,
|
|
43048
44359
|
cluster=cluster,
|
|
44360
|
+
bake_time=bake_time,
|
|
43049
44361
|
capacity_provider_strategies=capacity_provider_strategies,
|
|
43050
44362
|
circuit_breaker=circuit_breaker,
|
|
43051
44363
|
cloud_map_options=cloud_map_options,
|
|
43052
44364
|
deployment_alarms=deployment_alarms,
|
|
43053
44365
|
deployment_controller=deployment_controller,
|
|
44366
|
+
deployment_strategy=deployment_strategy,
|
|
43054
44367
|
desired_count=desired_count,
|
|
43055
44368
|
enable_ecs_managed_tags=enable_ecs_managed_tags,
|
|
43056
44369
|
enable_execute_command=enable_execute_command,
|
|
43057
44370
|
health_check_grace_period=health_check_grace_period,
|
|
44371
|
+
lifecycle_hooks=lifecycle_hooks,
|
|
43058
44372
|
max_healthy_percent=max_healthy_percent,
|
|
43059
44373
|
min_healthy_percent=min_healthy_percent,
|
|
43060
44374
|
propagate_tags=propagate_tags,
|
|
@@ -43228,24 +44542,19 @@ class ExternalService(
|
|
|
43228
44542
|
@jsii.member(jsii_name="loadBalancerTarget")
|
|
43229
44543
|
def load_balancer_target(
|
|
43230
44544
|
self,
|
|
43231
|
-
|
|
43232
|
-
|
|
43233
|
-
container_port: typing.Optional[jsii.Number] = None,
|
|
43234
|
-
protocol: typing.Optional[Protocol] = None,
|
|
44545
|
+
_options: typing.Union[LoadBalancerTargetOptions, typing.Dict[builtins.str, typing.Any]],
|
|
44546
|
+
_alternate_options: typing.Optional[IAlternateTarget] = None,
|
|
43235
44547
|
) -> IEcsLoadBalancerTarget:
|
|
43236
44548
|
'''Overridden method to throw error as ``loadBalancerTarget`` is not supported for external service.
|
|
43237
44549
|
|
|
43238
|
-
:param
|
|
43239
|
-
:param
|
|
43240
|
-
: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: -
|
|
43241
44552
|
'''
|
|
43242
|
-
|
|
43243
|
-
|
|
43244
|
-
|
|
43245
|
-
|
|
43246
|
-
)
|
|
43247
|
-
|
|
43248
|
-
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]))
|
|
43249
44558
|
|
|
43250
44559
|
@jsii.member(jsii_name="registerLoadBalancerTargets")
|
|
43251
44560
|
def register_load_balancer_targets(self, *_targets: EcsTarget) -> None:
|
|
@@ -43463,15 +44772,18 @@ class FargateService(
|
|
|
43463
44772
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
43464
44773
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
43465
44774
|
cluster: ICluster,
|
|
44775
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
43466
44776
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
43467
44777
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
43468
44778
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
43469
44779
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
43470
44780
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
44781
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
43471
44782
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
43472
44783
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
43473
44784
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
43474
44785
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
44786
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
43475
44787
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
43476
44788
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
43477
44789
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -43491,15 +44803,18 @@ class FargateService(
|
|
|
43491
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.
|
|
43492
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.
|
|
43493
44805
|
:param cluster: The name of the cluster that hosts the service.
|
|
44806
|
+
:param bake_time: bake time minutes for service. Default: - none
|
|
43494
44807
|
:param capacity_provider_strategies: A list of Capacity Provider strategies used to place a service. Default: - undefined
|
|
43495
44808
|
:param circuit_breaker: Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly enabled. Default: - disabled
|
|
43496
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.
|
|
43497
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.
|
|
43498
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
|
|
43499
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.
|
|
43500
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
|
|
43501
44815
|
:param enable_execute_command: Whether to enable the ability to execute into a container. Default: - undefined
|
|
43502
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;
|
|
43503
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
|
|
43504
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
|
|
43505
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
|
|
@@ -43520,15 +44835,18 @@ class FargateService(
|
|
|
43520
44835
|
security_groups=security_groups,
|
|
43521
44836
|
vpc_subnets=vpc_subnets,
|
|
43522
44837
|
cluster=cluster,
|
|
44838
|
+
bake_time=bake_time,
|
|
43523
44839
|
capacity_provider_strategies=capacity_provider_strategies,
|
|
43524
44840
|
circuit_breaker=circuit_breaker,
|
|
43525
44841
|
cloud_map_options=cloud_map_options,
|
|
43526
44842
|
deployment_alarms=deployment_alarms,
|
|
43527
44843
|
deployment_controller=deployment_controller,
|
|
44844
|
+
deployment_strategy=deployment_strategy,
|
|
43528
44845
|
desired_count=desired_count,
|
|
43529
44846
|
enable_ecs_managed_tags=enable_ecs_managed_tags,
|
|
43530
44847
|
enable_execute_command=enable_execute_command,
|
|
43531
44848
|
health_check_grace_period=health_check_grace_period,
|
|
44849
|
+
lifecycle_hooks=lifecycle_hooks,
|
|
43532
44850
|
max_healthy_percent=max_healthy_percent,
|
|
43533
44851
|
min_healthy_percent=min_healthy_percent,
|
|
43534
44852
|
propagate_tags=propagate_tags,
|
|
@@ -43800,6 +45118,10 @@ __all__ = [
|
|
|
43800
45118
|
"AddAutoScalingGroupCapacityOptions",
|
|
43801
45119
|
"AddCapacityOptions",
|
|
43802
45120
|
"AlarmBehavior",
|
|
45121
|
+
"AlternateTarget",
|
|
45122
|
+
"AlternateTargetConfig",
|
|
45123
|
+
"AlternateTargetOptions",
|
|
45124
|
+
"AlternateTargetProps",
|
|
43803
45125
|
"AmiHardwareType",
|
|
43804
45126
|
"AppMeshProxyConfiguration",
|
|
43805
45127
|
"AppMeshProxyConfigurationConfigProps",
|
|
@@ -43868,6 +45190,11 @@ __all__ = [
|
|
|
43868
45190
|
"DeploymentCircuitBreaker",
|
|
43869
45191
|
"DeploymentController",
|
|
43870
45192
|
"DeploymentControllerType",
|
|
45193
|
+
"DeploymentLifecycleHookTargetConfig",
|
|
45194
|
+
"DeploymentLifecycleLambdaTarget",
|
|
45195
|
+
"DeploymentLifecycleLambdaTargetProps",
|
|
45196
|
+
"DeploymentLifecycleStage",
|
|
45197
|
+
"DeploymentStrategy",
|
|
43871
45198
|
"Device",
|
|
43872
45199
|
"DevicePermission",
|
|
43873
45200
|
"DockerVolumeConfiguration",
|
|
@@ -43924,8 +45251,10 @@ __all__ = [
|
|
|
43924
45251
|
"GenericLogDriverProps",
|
|
43925
45252
|
"HealthCheck",
|
|
43926
45253
|
"Host",
|
|
45254
|
+
"IAlternateTarget",
|
|
43927
45255
|
"IBaseService",
|
|
43928
45256
|
"ICluster",
|
|
45257
|
+
"IDeploymentLifecycleHookTarget",
|
|
43929
45258
|
"IEc2Service",
|
|
43930
45259
|
"IEc2TaskDefinition",
|
|
43931
45260
|
"IEcsLoadBalancerTarget",
|
|
@@ -43946,6 +45275,7 @@ __all__ = [
|
|
|
43946
45275
|
"LinuxParameters",
|
|
43947
45276
|
"LinuxParametersProps",
|
|
43948
45277
|
"ListenerConfig",
|
|
45278
|
+
"ListenerRuleConfiguration",
|
|
43949
45279
|
"LoadBalancerTargetOptions",
|
|
43950
45280
|
"LogDriver",
|
|
43951
45281
|
"LogDriverConfig",
|
|
@@ -44057,6 +45387,34 @@ def _typecheckingstub__64f2d9b3495e3be78346f77d5ad90928968c8ce230e670b6279dc67ad
|
|
|
44057
45387
|
"""Type checking stubs"""
|
|
44058
45388
|
pass
|
|
44059
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
|
+
|
|
44060
45418
|
def _typecheckingstub__0405fe235aadd4430faf2b963e8de52a23bd867724c74f1f76995c5f208aa3e6(
|
|
44061
45419
|
*,
|
|
44062
45420
|
container_name: builtins.str,
|
|
@@ -44217,15 +45575,18 @@ def _typecheckingstub__47c51bc38319f21956164fb0fbe2257a72cb1269d763f8a2bf334788b
|
|
|
44217
45575
|
def _typecheckingstub__c2e0ba28c74987301a54b0d197b791a6a94084b5f40d15304ffabf113b3f7daa(
|
|
44218
45576
|
*,
|
|
44219
45577
|
cluster: ICluster,
|
|
45578
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
44220
45579
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
44221
45580
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
44222
45581
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
44223
45582
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
44224
45583
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
45584
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
44225
45585
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
44226
45586
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
44227
45587
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
44228
45588
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
45589
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
44229
45590
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
44230
45591
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
44231
45592
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -44240,15 +45601,18 @@ def _typecheckingstub__c2e0ba28c74987301a54b0d197b791a6a94084b5f40d15304ffabf113
|
|
|
44240
45601
|
def _typecheckingstub__3ecfd95265b873c2042a9d5cb8465a48f9e325e2271c18461e2b266333563d84(
|
|
44241
45602
|
*,
|
|
44242
45603
|
cluster: ICluster,
|
|
45604
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
44243
45605
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
44244
45606
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
44245
45607
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
44246
45608
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
44247
45609
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
45610
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
44248
45611
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
44249
45612
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
44250
45613
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
44251
45614
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
45615
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
44252
45616
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
44253
45617
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
44254
45618
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -46222,6 +47586,23 @@ def _typecheckingstub__919598d1dc3ec32befe4a81bbf3a26a387685443884de6cb597180866
|
|
|
46222
47586
|
"""Type checking stubs"""
|
|
46223
47587
|
pass
|
|
46224
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
|
+
|
|
46225
47606
|
def _typecheckingstub__9cd1dbc2946a0873c593d44d008c4c102f3994a3cd94676ec1816b39d1b46931(
|
|
46226
47607
|
*,
|
|
46227
47608
|
host_path: builtins.str,
|
|
@@ -46300,15 +47681,18 @@ def _typecheckingstub__ec9bd820dae60c0be34ffc5a5dd28bccc87947dc35dff1502ce12b80a
|
|
|
46300
47681
|
def _typecheckingstub__95634258086aa3448fbdfd9896017a2cbeb858f382deb61186bb9e22b1ccd366(
|
|
46301
47682
|
*,
|
|
46302
47683
|
cluster: ICluster,
|
|
47684
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
46303
47685
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
46304
47686
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46305
47687
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46306
47688
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46307
47689
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
47690
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
46308
47691
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
46309
47692
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
46310
47693
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
46311
47694
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
47695
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
46312
47696
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
46313
47697
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
46314
47698
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -46503,15 +47887,18 @@ def _typecheckingstub__bb8d7316afb3715109dfb05d3b7460700437fb0490a0e47180a1c5ef5
|
|
|
46503
47887
|
def _typecheckingstub__3cc413964caae89bfcfbcabff8356ffe5c054f46824be99731a77b64ec052a8a(
|
|
46504
47888
|
*,
|
|
46505
47889
|
cluster: ICluster,
|
|
47890
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
46506
47891
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
46507
47892
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46508
47893
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46509
47894
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46510
47895
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
47896
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
46511
47897
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
46512
47898
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
46513
47899
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
46514
47900
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
47901
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
46515
47902
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
46516
47903
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
46517
47904
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -46561,15 +47948,18 @@ def _typecheckingstub__85c0463354cc6d5a3da5daace0570a015f941bfeb87bb282346c1e2be
|
|
|
46561
47948
|
def _typecheckingstub__8290283f61f3e2d289b7e7f81cad1a5d1e9ed9dbc07ccce2b57604682a42ded7(
|
|
46562
47949
|
*,
|
|
46563
47950
|
cluster: ICluster,
|
|
47951
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
46564
47952
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
46565
47953
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46566
47954
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46567
47955
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
46568
47956
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
47957
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
46569
47958
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
46570
47959
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
46571
47960
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
46572
47961
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
47962
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
46573
47963
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
46574
47964
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
46575
47965
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -46850,6 +48240,18 @@ def _typecheckingstub__0275aca574e1acd41af17b3acaa1528dd0890542d27aeee65489bbd55
|
|
|
46850
48240
|
"""Type checking stubs"""
|
|
46851
48241
|
pass
|
|
46852
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
|
+
|
|
46853
48255
|
def _typecheckingstub__11773db60f5e0800c7efe817fcc41dcf7af2f8e010e72471c80e23766e96c5ab(
|
|
46854
48256
|
task_definition: TaskDefinition,
|
|
46855
48257
|
) -> None:
|
|
@@ -46977,6 +48379,18 @@ def _typecheckingstub__ef0bdf65f82e85f94b1db5a37b900ed9f46429089cbcb4c8d29b283f3
|
|
|
46977
48379
|
"""Type checking stubs"""
|
|
46978
48380
|
pass
|
|
46979
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
|
+
|
|
46980
48394
|
def _typecheckingstub__5499166a691d3d9b788ba4a9808f921437da0987c4c4733332600e4e584bf30f(
|
|
46981
48395
|
*,
|
|
46982
48396
|
container_name: builtins.str,
|
|
@@ -47727,6 +49141,23 @@ def _typecheckingstub__8874c61d65168e60874c9191682af53d5d88352dbfe615fd842f45b2b
|
|
|
47727
49141
|
"""Type checking stubs"""
|
|
47728
49142
|
pass
|
|
47729
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
|
+
|
|
47730
49161
|
def _typecheckingstub__6aeeebc397e1073be671305f45ff0de1478d4d043824a139c5e52661f7868baf(
|
|
47731
49162
|
_scope: _constructs_77d1e7e8.Construct,
|
|
47732
49163
|
_task_definition: TaskDefinition,
|
|
@@ -47946,6 +49377,22 @@ def _typecheckingstub__3407e1eace0b05ee1ef50b2d7263c1462cbbc2df7bfe6d22826f0f94f
|
|
|
47946
49377
|
"""Type checking stubs"""
|
|
47947
49378
|
pass
|
|
47948
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
|
+
|
|
47949
49396
|
def _typecheckingstub__0f3b91860780f56b42f6ab26d1855c0db28e15ef0dc9bcb868556324ed95a96b(
|
|
47950
49397
|
_scope: _constructs_77d1e7e8.Construct,
|
|
47951
49398
|
_container_definition: ContainerDefinition,
|
|
@@ -48006,6 +49453,12 @@ def _typecheckingstub__3cd0743b65b66534a274ff34e46f82cd780216193c08611a3b4e166e2
|
|
|
48006
49453
|
"""Type checking stubs"""
|
|
48007
49454
|
pass
|
|
48008
49455
|
|
|
49456
|
+
def _typecheckingstub__480743d611a768bf60af18dc6a08c65385351ccd86b4290955b74d1541662389(
|
|
49457
|
+
target: IDeploymentLifecycleHookTarget,
|
|
49458
|
+
) -> None:
|
|
49459
|
+
"""Type checking stubs"""
|
|
49460
|
+
pass
|
|
49461
|
+
|
|
48009
49462
|
def _typecheckingstub__e086e1f25717ea297fd9f530033e3685af15b9de3deb30fa9b228c05f8b0bcdc(
|
|
48010
49463
|
volume: ServiceManagedVolume,
|
|
48011
49464
|
) -> None:
|
|
@@ -48047,6 +49500,13 @@ def _typecheckingstub__027c7741168086e6dc84ce3b453e99740a28a87dabd7b69b28195c0b3
|
|
|
48047
49500
|
"""Type checking stubs"""
|
|
48048
49501
|
pass
|
|
48049
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
|
+
|
|
48050
49510
|
def _typecheckingstub__fb3b6cd83a49e029a6aab0309e4bf6a856a09b82a0d6752ebc4b8057753a9902(
|
|
48051
49511
|
metric_name: builtins.str,
|
|
48052
49512
|
*,
|
|
@@ -48115,15 +49575,18 @@ def _typecheckingstub__1e578461670bd6cdf856f914534e1feff8905e31d33cd7aea2b9f5151
|
|
|
48115
49575
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
48116
49576
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48117
49577
|
cluster: ICluster,
|
|
49578
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
48118
49579
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
48119
49580
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48120
49581
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48121
49582
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48122
49583
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
49584
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
48123
49585
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
48124
49586
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
48125
49587
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
48126
49588
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
49589
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
48127
49590
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
48128
49591
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
48129
49592
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -48265,15 +49728,18 @@ def _typecheckingstub__6ceef4de126cbb6bd6f379ba0b53be2fb61c35761f50685b5d228c682
|
|
|
48265
49728
|
daemon: typing.Optional[builtins.bool] = None,
|
|
48266
49729
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
48267
49730
|
cluster: ICluster,
|
|
49731
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
48268
49732
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
48269
49733
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48270
49734
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48271
49735
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48272
49736
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
49737
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
48273
49738
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
48274
49739
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
48275
49740
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
48276
49741
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
49742
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
48277
49743
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
48278
49744
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
48279
49745
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|
|
@@ -48319,6 +49785,13 @@ def _typecheckingstub__6a882b6874d4ad85f277f48ab87544e61c1ded22af9e05c1fc5cf0aea
|
|
|
48319
49785
|
"""Type checking stubs"""
|
|
48320
49786
|
pass
|
|
48321
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
|
+
|
|
48322
49795
|
def _typecheckingstub__8c04543cf19a902fa2afce6445c2c60d81551c375dc4a44e88bef45930d140e4(
|
|
48323
49796
|
*_targets: EcsTarget,
|
|
48324
49797
|
) -> None:
|
|
@@ -48371,15 +49844,18 @@ def _typecheckingstub__0ddac6b19472d00f74c1777e699ce5b239dc49e62ff4ab4674c917bbe
|
|
|
48371
49844
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
48372
49845
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48373
49846
|
cluster: ICluster,
|
|
49847
|
+
bake_time: typing.Optional[_Duration_4839e8c3] = None,
|
|
48374
49848
|
capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
48375
49849
|
circuit_breaker: typing.Optional[typing.Union[DeploymentCircuitBreaker, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48376
49850
|
cloud_map_options: typing.Optional[typing.Union[CloudMapOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48377
49851
|
deployment_alarms: typing.Optional[typing.Union[DeploymentAlarmConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
48378
49852
|
deployment_controller: typing.Optional[typing.Union[DeploymentController, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
49853
|
+
deployment_strategy: typing.Optional[DeploymentStrategy] = None,
|
|
48379
49854
|
desired_count: typing.Optional[jsii.Number] = None,
|
|
48380
49855
|
enable_ecs_managed_tags: typing.Optional[builtins.bool] = None,
|
|
48381
49856
|
enable_execute_command: typing.Optional[builtins.bool] = None,
|
|
48382
49857
|
health_check_grace_period: typing.Optional[_Duration_4839e8c3] = None,
|
|
49858
|
+
lifecycle_hooks: typing.Optional[typing.Sequence[IDeploymentLifecycleHookTarget]] = None,
|
|
48383
49859
|
max_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
48384
49860
|
min_healthy_percent: typing.Optional[jsii.Number] = None,
|
|
48385
49861
|
propagate_tags: typing.Optional[PropagatedTagSource] = None,
|