aws-cdk-lib 2.129.0__py3-none-any.whl → 2.131.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 +41 -21
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.129.0.jsii.tgz → aws-cdk-lib@2.131.0.jsii.tgz} +0 -0
- aws_cdk/aws_apigatewayv2/__init__.py +52 -11
- aws_cdk/aws_apigatewayv2_integrations/__init__.py +286 -0
- aws_cdk/aws_appconfig/__init__.py +13062 -2713
- aws_cdk/aws_applicationautoscaling/__init__.py +80 -123
- aws_cdk/aws_applicationinsights/__init__.py +48 -0
- aws_cdk/aws_apprunner/__init__.py +8 -1
- aws_cdk/aws_appstream/__init__.py +8 -1
- aws_cdk/aws_appsync/__init__.py +324 -103
- aws_cdk/aws_athena/__init__.py +8 -1
- aws_cdk/aws_b2bi/__init__.py +30 -4
- aws_cdk/aws_backup/__init__.py +80 -56
- aws_cdk/aws_bedrock/__init__.py +13 -1
- aws_cdk/aws_cleanrooms/__init__.py +37 -5
- aws_cdk/aws_cloudtrail/__init__.py +23 -1
- aws_cdk/aws_codebuild/__init__.py +8 -1
- aws_cdk/aws_codestarconnections/__init__.py +8 -1
- aws_cdk/aws_cognito/__init__.py +21 -21
- aws_cdk/aws_comprehend/__init__.py +8 -1
- aws_cdk/aws_connect/__init__.py +57 -8
- aws_cdk/aws_controltower/__init__.py +27 -7
- aws_cdk/aws_customerprofiles/__init__.py +136 -123
- aws_cdk/aws_datapipeline/__init__.py +19 -11
- aws_cdk/aws_datasync/__init__.py +8 -1
- aws_cdk/aws_datazone/__init__.py +9 -1
- aws_cdk/aws_dms/__init__.py +29 -4
- aws_cdk/aws_docdb/__init__.py +131 -5
- aws_cdk/aws_ec2/__init__.py +178 -65
- aws_cdk/aws_ecs/__init__.py +43 -51
- aws_cdk/aws_ecs_patterns/__init__.py +214 -0
- aws_cdk/aws_eks/__init__.py +44 -3
- aws_cdk/aws_elasticache/__init__.py +8 -1
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +8 -1
- aws_cdk/aws_emr/__init__.py +8 -1
- aws_cdk/aws_entityresolution/__init__.py +23 -3
- aws_cdk/aws_events/__init__.py +12 -1
- aws_cdk/aws_fms/__init__.py +8 -1
- aws_cdk/aws_glue/__init__.py +18 -4
- aws_cdk/aws_healthimaging/__init__.py +9 -1
- aws_cdk/aws_inspectorv2/__init__.py +9 -1
- aws_cdk/aws_iot/__init__.py +29 -4
- aws_cdk/aws_ivs/__init__.py +8 -1
- aws_cdk/aws_kms/__init__.py +1 -1
- aws_cdk/aws_lambda/__init__.py +3 -5
- aws_cdk/aws_location/__init__.py +44 -6
- aws_cdk/aws_logs/__init__.py +22 -3
- aws_cdk/aws_macie/__init__.py +15 -2
- aws_cdk/aws_medialive/__init__.py +8 -1
- aws_cdk/aws_mediapackagev2/__init__.py +23 -3
- aws_cdk/aws_mediatailor/__init__.py +29 -4
- aws_cdk/aws_msk/__init__.py +8 -1
- aws_cdk/aws_neptunegraph/__init__.py +9 -1
- aws_cdk/aws_networkfirewall/__init__.py +8 -1
- aws_cdk/aws_opensearchservice/__init__.py +6 -3
- aws_cdk/aws_pcaconnectorad/__init__.py +23 -3
- aws_cdk/aws_pinpointemail/__init__.py +23 -3
- aws_cdk/aws_quicksight/__init__.py +37 -0
- aws_cdk/aws_rds/__init__.py +52 -9
- aws_cdk/aws_route53resolver/__init__.py +8 -1
- aws_cdk/aws_s3/__init__.py +29 -4
- aws_cdk/aws_sagemaker/__init__.py +19 -8
- aws_cdk/aws_securityhub/__init__.py +8 -1
- aws_cdk/aws_shield/__init__.py +16 -2
- aws_cdk/aws_workspacesthinclient/__init__.py +9 -1
- aws_cdk/aws_workspacesweb/__init__.py +51 -7
- aws_cdk/aws_xray/__init__.py +16 -2
- aws_cdk/pipelines/__init__.py +3 -2
- {aws_cdk_lib-2.129.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/METADATA +1 -1
- {aws_cdk_lib-2.129.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/NOTICE +30 -0
- {aws_cdk_lib-2.129.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/RECORD +75 -75
- {aws_cdk_lib-2.129.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.129.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.129.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/top_level.txt +0 -0
aws_cdk/aws_ecs/__init__.py
CHANGED
|
@@ -3200,7 +3200,7 @@ class AsgCapacityProvider(
|
|
|
3200
3200
|
:param scope: -
|
|
3201
3201
|
:param id: -
|
|
3202
3202
|
:param auto_scaling_group: The autoscaling group to add as a Capacity Provider.
|
|
3203
|
-
:param capacity_provider_name: The name of the capacity provider. If a name is specified, it cannot start with ``aws``, ``ecs``, or ``fargate``. If no name is specified, a default name in the CFNStackName-CFNResourceName-RandomString format is used. Default: CloudFormation-generated name
|
|
3203
|
+
:param capacity_provider_name: The name of the capacity provider. If a name is specified, it cannot start with ``aws``, ``ecs``, or ``fargate``. If no name is specified, a default name in the CFNStackName-CFNResourceName-RandomString format is used. If the stack name starts with ``aws``, ``ecs``, or ``fargate``, a unique resource name is generated that starts with ``cp-``. Default: CloudFormation-generated name
|
|
3204
3204
|
:param enable_managed_draining: Managed instance draining facilitates graceful termination of Amazon ECS instances. This allows your service workloads to stop safely and be rescheduled to non-terminating instances. Infrastructure maintenance and updates are preformed without disruptions to workloads. To use managed instance draining, set enableManagedDraining to true. Default: true
|
|
3205
3205
|
:param enable_managed_scaling: When enabled the scale-in and scale-out actions of the cluster's Auto Scaling Group will be managed for you. This means your cluster will automatically scale instances based on the load your tasks put on the cluster. For more information, see `Using Managed Scaling <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/asg-capacity-providers.html#asg-capacity-providers-managed-scaling>`_ in the ECS Developer Guide. Default: true
|
|
3206
3206
|
:param enable_managed_termination_protection: When enabled the Auto Scaling Group will only terminate EC2 instances that no longer have running non-daemon tasks. Scale-in protection will be automatically enabled on instances. When all non-daemon tasks are stopped on an instance, ECS initiates the scale-in process and turns off scale-in protection for the instance. The Auto Scaling Group can then terminate the instance. For more information see `Managed termination protection <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-auto-scaling.html#managed-termination-protection>`_ in the ECS Developer Guide. Managed scaling must also be enabled. Default: true
|
|
@@ -3322,7 +3322,7 @@ class AsgCapacityProviderProps(AddAutoScalingGroupCapacityOptions):
|
|
|
3322
3322
|
:param spot_instance_draining: Specify whether to enable Automated Draining for Spot Instances running Amazon ECS Services. For more information, see `Using Spot Instances <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-spot.html>`_. Default: false
|
|
3323
3323
|
:param topic_encryption_key: If ``AddAutoScalingGroupCapacityOptions.taskDrainTime`` is non-zero, then the ECS cluster creates an SNS Topic to as part of a system to drain instances of tasks when the instance is being shut down. If this property is provided, then this key will be used to encrypt the contents of that SNS Topic. See `SNS Data Encryption <https://docs.aws.amazon.com/sns/latest/dg/sns-data-encryption.html>`_ for more information. Default: The SNS Topic will not be encrypted.
|
|
3324
3324
|
:param auto_scaling_group: The autoscaling group to add as a Capacity Provider.
|
|
3325
|
-
:param capacity_provider_name: The name of the capacity provider. If a name is specified, it cannot start with ``aws``, ``ecs``, or ``fargate``. If no name is specified, a default name in the CFNStackName-CFNResourceName-RandomString format is used. Default: CloudFormation-generated name
|
|
3325
|
+
:param capacity_provider_name: The name of the capacity provider. If a name is specified, it cannot start with ``aws``, ``ecs``, or ``fargate``. If no name is specified, a default name in the CFNStackName-CFNResourceName-RandomString format is used. If the stack name starts with ``aws``, ``ecs``, or ``fargate``, a unique resource name is generated that starts with ``cp-``. Default: CloudFormation-generated name
|
|
3326
3326
|
:param enable_managed_draining: Managed instance draining facilitates graceful termination of Amazon ECS instances. This allows your service workloads to stop safely and be rescheduled to non-terminating instances. Infrastructure maintenance and updates are preformed without disruptions to workloads. To use managed instance draining, set enableManagedDraining to true. Default: true
|
|
3327
3327
|
:param enable_managed_scaling: When enabled the scale-in and scale-out actions of the cluster's Auto Scaling Group will be managed for you. This means your cluster will automatically scale instances based on the load your tasks put on the cluster. For more information, see `Using Managed Scaling <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/asg-capacity-providers.html#asg-capacity-providers-managed-scaling>`_ in the ECS Developer Guide. Default: true
|
|
3328
3328
|
:param enable_managed_termination_protection: When enabled the Auto Scaling Group will only terminate EC2 instances that no longer have running non-daemon tasks. Scale-in protection will be automatically enabled on instances. When all non-daemon tasks are stopped on an instance, ECS initiates the scale-in process and turns off scale-in protection for the instance. The Auto Scaling Group can then terminate the instance. For more information see `Managed termination protection <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-auto-scaling.html#managed-termination-protection>`_ in the ECS Developer Guide. Managed scaling must also be enabled. Default: true
|
|
@@ -3465,6 +3465,8 @@ class AsgCapacityProviderProps(AddAutoScalingGroupCapacityOptions):
|
|
|
3465
3465
|
If a name is specified,
|
|
3466
3466
|
it cannot start with ``aws``, ``ecs``, or ``fargate``. If no name is specified,
|
|
3467
3467
|
a default name in the CFNStackName-CFNResourceName-RandomString format is used.
|
|
3468
|
+
If the stack name starts with ``aws``, ``ecs``, or ``fargate``, a unique resource name
|
|
3469
|
+
is generated that starts with ``cp-``.
|
|
3468
3470
|
|
|
3469
3471
|
:default: CloudFormation-generated name
|
|
3470
3472
|
'''
|
|
@@ -18360,34 +18362,42 @@ class ClusterProps:
|
|
|
18360
18362
|
|
|
18361
18363
|
Example::
|
|
18362
18364
|
|
|
18363
|
-
vpc
|
|
18364
|
-
|
|
18365
|
+
# vpc: ec2.Vpc
|
|
18366
|
+
|
|
18367
|
+
|
|
18368
|
+
cluster = ecs.Cluster(self, "Cluster",
|
|
18369
|
+
vpc=vpc
|
|
18365
18370
|
)
|
|
18366
18371
|
|
|
18367
|
-
|
|
18372
|
+
auto_scaling_group = autoscaling.AutoScalingGroup(self, "ASG",
|
|
18373
|
+
vpc=vpc,
|
|
18374
|
+
instance_type=ec2.InstanceType("t2.micro"),
|
|
18375
|
+
machine_image=ecs.EcsOptimizedImage.amazon_linux2(),
|
|
18376
|
+
min_capacity=0,
|
|
18377
|
+
max_capacity=100
|
|
18378
|
+
)
|
|
18368
18379
|
|
|
18369
|
-
|
|
18370
|
-
|
|
18371
|
-
|
|
18372
|
-
compatibility=ecs.Compatibility.FARGATE
|
|
18380
|
+
capacity_provider = ecs.AsgCapacityProvider(self, "AsgCapacityProvider",
|
|
18381
|
+
auto_scaling_group=auto_scaling_group,
|
|
18382
|
+
instance_warmup_period=300
|
|
18373
18383
|
)
|
|
18384
|
+
cluster.add_asg_capacity_provider(capacity_provider)
|
|
18374
18385
|
|
|
18375
|
-
|
|
18376
|
-
|
|
18377
|
-
|
|
18386
|
+
task_definition = ecs.Ec2TaskDefinition(self, "TaskDef")
|
|
18387
|
+
|
|
18388
|
+
task_definition.add_container("web",
|
|
18389
|
+
image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample"),
|
|
18390
|
+
memory_reservation_mi_b=256
|
|
18378
18391
|
)
|
|
18379
18392
|
|
|
18380
|
-
|
|
18381
|
-
integration_pattern=sfn.IntegrationPattern.RUN_JOB,
|
|
18393
|
+
ecs.Ec2Service(self, "EC2Service",
|
|
18382
18394
|
cluster=cluster,
|
|
18383
18395
|
task_definition=task_definition,
|
|
18384
|
-
|
|
18385
|
-
|
|
18386
|
-
|
|
18387
|
-
|
|
18388
|
-
|
|
18389
|
-
launch_target=tasks.EcsFargateLaunchTarget(),
|
|
18390
|
-
propagated_tag_source=ecs.PropagatedTagSource.TASK_DEFINITION
|
|
18396
|
+
capacity_provider_strategies=[ecs.CapacityProviderStrategy(
|
|
18397
|
+
capacity_provider=capacity_provider.capacity_provider_name,
|
|
18398
|
+
weight=1
|
|
18399
|
+
)
|
|
18400
|
+
]
|
|
18391
18401
|
)
|
|
18392
18402
|
'''
|
|
18393
18403
|
if isinstance(capacity, dict):
|
|
@@ -37006,42 +37016,24 @@ class Cluster(
|
|
|
37006
37016
|
|
|
37007
37017
|
Example::
|
|
37008
37018
|
|
|
37009
|
-
|
|
37019
|
+
from aws_cdk import Tags
|
|
37010
37020
|
|
|
37011
37021
|
|
|
37012
|
-
|
|
37013
|
-
|
|
37014
|
-
|
|
37015
|
-
|
|
37016
|
-
|
|
37017
|
-
vpc=vpc,
|
|
37018
|
-
instance_type=ec2.InstanceType("t2.micro"),
|
|
37019
|
-
machine_image=ecs.EcsOptimizedImage.amazon_linux2(),
|
|
37020
|
-
min_capacity=0,
|
|
37021
|
-
max_capacity=100
|
|
37022
|
-
)
|
|
37023
|
-
|
|
37024
|
-
capacity_provider = ecs.AsgCapacityProvider(self, "AsgCapacityProvider",
|
|
37025
|
-
auto_scaling_group=auto_scaling_group,
|
|
37026
|
-
instance_warmup_period=300
|
|
37022
|
+
vpc = ec2.Vpc(self, "Vpc", max_azs=1)
|
|
37023
|
+
cluster = ecs.Cluster(self, "EcsCluster", vpc=vpc)
|
|
37024
|
+
task_definition = ecs.FargateTaskDefinition(self, "TaskDef",
|
|
37025
|
+
memory_limit_mi_b=512,
|
|
37026
|
+
cpu=256
|
|
37027
37027
|
)
|
|
37028
|
-
|
|
37029
|
-
|
|
37030
|
-
task_definition = ecs.Ec2TaskDefinition(self, "TaskDef")
|
|
37031
|
-
|
|
37032
|
-
task_definition.add_container("web",
|
|
37033
|
-
image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample"),
|
|
37034
|
-
memory_reservation_mi_b=256
|
|
37028
|
+
task_definition.add_container("WebContainer",
|
|
37029
|
+
image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample")
|
|
37035
37030
|
)
|
|
37036
|
-
|
|
37037
|
-
|
|
37031
|
+
Tags.of(task_definition).add("my-tag", "my-tag-value")
|
|
37032
|
+
scheduled_fargate_task = ecs_patterns.ScheduledFargateTask(self, "ScheduledFargateTask",
|
|
37038
37033
|
cluster=cluster,
|
|
37039
37034
|
task_definition=task_definition,
|
|
37040
|
-
|
|
37041
|
-
|
|
37042
|
-
weight=1
|
|
37043
|
-
)
|
|
37044
|
-
]
|
|
37035
|
+
schedule=appscaling.Schedule.expression("rate(1 minute)"),
|
|
37036
|
+
propagate_tags=ecs.PropagatedTagSource.TASK_DEFINITION
|
|
37045
37037
|
)
|
|
37046
37038
|
'''
|
|
37047
37039
|
|