aws-cdk-lib 2.132.1__py3-none-any.whl → 2.134.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 +9 -1
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.132.1.jsii.tgz → aws-cdk-lib@2.134.0.jsii.tgz} +0 -0
- aws_cdk/aws_amplify/__init__.py +12 -10
- aws_cdk/aws_apigatewayv2/__init__.py +112 -6
- aws_cdk/aws_apigatewayv2_integrations/__init__.py +155 -3
- aws_cdk/aws_appconfig/__init__.py +186 -8
- aws_cdk/aws_appintegrations/__init__.py +551 -0
- aws_cdk/aws_applicationautoscaling/__init__.py +6 -6
- aws_cdk/aws_appsync/__init__.py +71 -0
- aws_cdk/aws_autoscaling/__init__.py +10 -14
- aws_cdk/aws_b2bi/__init__.py +2 -42
- aws_cdk/aws_backup/__init__.py +23 -12
- aws_cdk/aws_batch/__init__.py +2150 -1078
- aws_cdk/aws_bedrock/__init__.py +197 -2
- aws_cdk/aws_cloudformation/__init__.py +1 -1
- aws_cdk/aws_cloudfront/__init__.py +4 -4
- aws_cdk/aws_cloudtrail/__init__.py +44 -14
- aws_cdk/aws_cloudwatch/__init__.py +20 -4
- aws_cdk/aws_codeartifact/__init__.py +812 -2
- aws_cdk/aws_codebuild/__init__.py +32 -10
- aws_cdk/aws_codepipeline/__init__.py +33 -11
- aws_cdk/aws_cognito/__init__.py +49 -44
- aws_cdk/aws_connect/__init__.py +256 -0
- aws_cdk/aws_controltower/__init__.py +4 -4
- aws_cdk/aws_datasync/__init__.py +393 -13
- aws_cdk/aws_dlm/__init__.py +2 -2
- aws_cdk/aws_docdbelastic/__init__.py +117 -0
- aws_cdk/aws_dynamodb/__init__.py +416 -5
- aws_cdk/aws_ec2/__init__.py +590 -134
- aws_cdk/aws_ecs/__init__.py +29 -20
- aws_cdk/aws_ecs_patterns/__init__.py +52 -12
- aws_cdk/aws_eks/__init__.py +27 -25
- aws_cdk/aws_elasticloadbalancing/__init__.py +6 -9
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +363 -62
- aws_cdk/aws_emr/__init__.py +7 -4
- aws_cdk/aws_entityresolution/__init__.py +91 -64
- aws_cdk/aws_fsx/__init__.py +7 -7
- aws_cdk/aws_glue/__init__.py +137 -3
- aws_cdk/aws_iam/__init__.py +9 -10
- aws_cdk/aws_internetmonitor/__init__.py +85 -0
- aws_cdk/aws_iotsitewise/__init__.py +208 -198
- aws_cdk/aws_iotwireless/__init__.py +6 -5
- aws_cdk/aws_kafkaconnect/__init__.py +1237 -162
- aws_cdk/aws_kendra/__init__.py +34 -24
- aws_cdk/aws_kinesisanalytics/__init__.py +37 -37
- aws_cdk/aws_kinesisanalyticsv2/__init__.py +37 -37
- aws_cdk/aws_kinesisfirehose/__init__.py +6 -2
- aws_cdk/aws_lambda/__init__.py +16 -16
- aws_cdk/aws_msk/__init__.py +88 -0
- aws_cdk/aws_opensearchservice/__init__.py +61 -18
- aws_cdk/aws_pinpoint/__init__.py +42 -0
- aws_cdk/aws_rds/__init__.py +1292 -216
- aws_cdk/aws_redshift/__init__.py +6 -3
- aws_cdk/aws_redshiftserverless/__init__.py +0 -157
- aws_cdk/aws_sagemaker/__init__.py +29 -9
- aws_cdk/aws_shield/__init__.py +7 -8
- aws_cdk/aws_ssm/__init__.py +15 -12
- aws_cdk/aws_stepfunctions_tasks/__init__.py +476 -0
- aws_cdk/aws_synthetics/__init__.py +74 -14
- aws_cdk/aws_transfer/__init__.py +4 -3
- aws_cdk/aws_wafv2/__init__.py +516 -42
- aws_cdk/cx_api/__init__.py +34 -0
- {aws_cdk_lib-2.132.1.dist-info → aws_cdk_lib-2.134.0.dist-info}/METADATA +2 -2
- {aws_cdk_lib-2.132.1.dist-info → aws_cdk_lib-2.134.0.dist-info}/RECORD +69 -69
- {aws_cdk_lib-2.132.1.dist-info → aws_cdk_lib-2.134.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.132.1.dist-info → aws_cdk_lib-2.134.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.132.1.dist-info → aws_cdk_lib-2.134.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.132.1.dist-info → aws_cdk_lib-2.134.0.dist-info}/top_level.txt +0 -0
|
@@ -198,7 +198,7 @@ If you do not provide any options for this method, it redirects HTTP port 80 to
|
|
|
198
198
|
By default all ingress traffic will be allowed on the source port. If you want to be more selective with your
|
|
199
199
|
ingress rules then set `open: false` and use the listener's `connections` object to selectively grant access to the listener.
|
|
200
200
|
|
|
201
|
-
### Load Balancer attributes
|
|
201
|
+
### Application Load Balancer attributes
|
|
202
202
|
|
|
203
203
|
You can modify attributes of Application Load Balancers:
|
|
204
204
|
|
|
@@ -225,7 +225,16 @@ lb = elbv2.ApplicationLoadBalancer(self, "LB",
|
|
|
225
225
|
desync_mitigation_mode=elbv2.DesyncMitigationMode.DEFENSIVE,
|
|
226
226
|
|
|
227
227
|
# The type of IP addresses to use.
|
|
228
|
-
ip_address_type=elbv2.IpAddressType.IPV4
|
|
228
|
+
ip_address_type=elbv2.IpAddressType.IPV4,
|
|
229
|
+
|
|
230
|
+
# The duration of client keep-alive connections
|
|
231
|
+
client_keep_alive=Duration.seconds(500),
|
|
232
|
+
|
|
233
|
+
# Whether cross-zone load balancing is enabled.
|
|
234
|
+
cross_zone_enabled=True,
|
|
235
|
+
|
|
236
|
+
# Whether the load balancer blocks traffic through the Internet Gateway (IGW).
|
|
237
|
+
deny_all_igw_traffic=False
|
|
229
238
|
)
|
|
230
239
|
```
|
|
231
240
|
|
|
@@ -264,6 +273,22 @@ listener.add_targets("AppFleet",
|
|
|
264
273
|
)
|
|
265
274
|
```
|
|
266
275
|
|
|
276
|
+
### Enforce security group inbound rules on PrivateLink traffic for a Network Load Balancer
|
|
277
|
+
|
|
278
|
+
You can indicate whether to evaluate inbound security group rules for traffic
|
|
279
|
+
sent to a Network Load Balancer through AWS PrivateLink.
|
|
280
|
+
The evaluation is enabled by default.
|
|
281
|
+
|
|
282
|
+
```python
|
|
283
|
+
# vpc: ec2.Vpc
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
nlb = elbv2.NetworkLoadBalancer(self, "LB",
|
|
287
|
+
vpc=vpc,
|
|
288
|
+
enforce_security_group_inbound_rules_on_private_link_traffic=True
|
|
289
|
+
)
|
|
290
|
+
```
|
|
291
|
+
|
|
267
292
|
One thing to keep in mind is that network load balancers do not have security
|
|
268
293
|
groups, and no automatic security group configuration is done for you. You will
|
|
269
294
|
have to configure the security groups of the target yourself to allow traffic by
|
|
@@ -290,6 +315,30 @@ lb = elbv2.NetworkLoadBalancer(self, "LB",
|
|
|
290
315
|
|
|
291
316
|
You cannot add UDP or TCP_UDP listeners to a dualstack Network Load Balancer.
|
|
292
317
|
|
|
318
|
+
### Network Load Balancer attributes
|
|
319
|
+
|
|
320
|
+
You can modify attributes of Network Load Balancers:
|
|
321
|
+
|
|
322
|
+
```python
|
|
323
|
+
# vpc: ec2.Vpc
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
lb = elbv2.NetworkLoadBalancer(self, "LB",
|
|
327
|
+
vpc=vpc,
|
|
328
|
+
# Whether deletion protection is enabled.
|
|
329
|
+
deletion_protection=True,
|
|
330
|
+
|
|
331
|
+
# Whether cross-zone load balancing is enabled.
|
|
332
|
+
cross_zone_enabled=True,
|
|
333
|
+
|
|
334
|
+
# Whether the load balancer blocks traffic through the Internet Gateway (IGW).
|
|
335
|
+
deny_all_igw_traffic=False,
|
|
336
|
+
|
|
337
|
+
# Indicates how traffic is distributed among the load balancer Availability Zones.
|
|
338
|
+
client_routing_policy=elbv2.ClientRoutingPolicy.AVAILABILITY_ZONE_AFFINITY
|
|
339
|
+
)
|
|
340
|
+
```
|
|
341
|
+
|
|
293
342
|
## Targets and Target Groups
|
|
294
343
|
|
|
295
344
|
Application and Network Load Balancers organize load balancing targets in Target
|
|
@@ -345,6 +394,27 @@ tg2 = elbv2.ApplicationTargetGroup(self, "TG2",
|
|
|
345
394
|
)
|
|
346
395
|
```
|
|
347
396
|
|
|
397
|
+
### Slow start mode for your Application Load Balancer
|
|
398
|
+
|
|
399
|
+
By default, a target starts to receive its full share of requests as soon as it is registered with a target group and passes an initial health check. Using slow start mode gives targets time to warm up before the load balancer sends them a full share of requests.
|
|
400
|
+
|
|
401
|
+
After you enable slow start for a target group, its targets enter slow start mode when they are considered healthy by the target group. A target in slow start mode exits slow start mode when the configured slow start duration period elapses or the target becomes unhealthy. The load balancer linearly increases the number of requests that it can send to a target in slow start mode. After a healthy target exits slow start mode, the load balancer can send it a full share of requests.
|
|
402
|
+
|
|
403
|
+
The allowed range is 30-900 seconds (15 minutes). The default is 0 seconds (disabled).
|
|
404
|
+
|
|
405
|
+
```python
|
|
406
|
+
# vpc: ec2.Vpc
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
# Target group with slow start mode enabled
|
|
410
|
+
tg = elbv2.ApplicationTargetGroup(self, "TG",
|
|
411
|
+
target_type=elbv2.TargetType.INSTANCE,
|
|
412
|
+
slow_start=Duration.seconds(60),
|
|
413
|
+
port=80,
|
|
414
|
+
vpc=vpc
|
|
415
|
+
)
|
|
416
|
+
```
|
|
417
|
+
|
|
348
418
|
For more information see: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/sticky-sessions.html#application-based-stickiness
|
|
349
419
|
|
|
350
420
|
### Setting the target group protocol version
|
|
@@ -2619,7 +2689,9 @@ class BaseLoadBalancerLookupOptions:
|
|
|
2619
2689
|
jsii_struct_bases=[],
|
|
2620
2690
|
name_mapping={
|
|
2621
2691
|
"vpc": "vpc",
|
|
2692
|
+
"cross_zone_enabled": "crossZoneEnabled",
|
|
2622
2693
|
"deletion_protection": "deletionProtection",
|
|
2694
|
+
"deny_all_igw_traffic": "denyAllIgwTraffic",
|
|
2623
2695
|
"internet_facing": "internetFacing",
|
|
2624
2696
|
"load_balancer_name": "loadBalancerName",
|
|
2625
2697
|
"vpc_subnets": "vpcSubnets",
|
|
@@ -2630,7 +2702,9 @@ class BaseLoadBalancerProps:
|
|
|
2630
2702
|
self,
|
|
2631
2703
|
*,
|
|
2632
2704
|
vpc: _IVpc_f30d5663,
|
|
2705
|
+
cross_zone_enabled: typing.Optional[builtins.bool] = None,
|
|
2633
2706
|
deletion_protection: typing.Optional[builtins.bool] = None,
|
|
2707
|
+
deny_all_igw_traffic: typing.Optional[builtins.bool] = None,
|
|
2634
2708
|
internet_facing: typing.Optional[builtins.bool] = None,
|
|
2635
2709
|
load_balancer_name: typing.Optional[builtins.str] = None,
|
|
2636
2710
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
@@ -2638,7 +2712,9 @@ class BaseLoadBalancerProps:
|
|
|
2638
2712
|
'''Shared properties of both Application and Network Load Balancers.
|
|
2639
2713
|
|
|
2640
2714
|
:param vpc: The VPC network to place the load balancer in.
|
|
2715
|
+
:param cross_zone_enabled: Indicates whether cross-zone load balancing is enabled. Default: - false for Network Load Balancers and true for Application Load Balancers.
|
|
2641
2716
|
:param deletion_protection: Indicates whether deletion protection is enabled. Default: false
|
|
2717
|
+
:param deny_all_igw_traffic: Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW). Default: - false for internet-facing load balancers and true for internal load balancers
|
|
2642
2718
|
:param internet_facing: Whether the load balancer has an internet-routable address. Default: false
|
|
2643
2719
|
:param load_balancer_name: Name of the load balancer. Default: - Automatically generated name.
|
|
2644
2720
|
:param vpc_subnets: Which subnets place the load balancer in. Default: - the Vpc default strategy.
|
|
@@ -2660,7 +2736,9 @@ class BaseLoadBalancerProps:
|
|
|
2660
2736
|
vpc=vpc,
|
|
2661
2737
|
|
|
2662
2738
|
# the properties below are optional
|
|
2739
|
+
cross_zone_enabled=False,
|
|
2663
2740
|
deletion_protection=False,
|
|
2741
|
+
deny_all_igw_traffic=False,
|
|
2664
2742
|
internet_facing=False,
|
|
2665
2743
|
load_balancer_name="loadBalancerName",
|
|
2666
2744
|
vpc_subnets=ec2.SubnetSelection(
|
|
@@ -2678,15 +2756,21 @@ class BaseLoadBalancerProps:
|
|
|
2678
2756
|
if __debug__:
|
|
2679
2757
|
type_hints = typing.get_type_hints(_typecheckingstub__36614588a5e075aa6e7ea0a4d41053b09874f2590b227cd5d62f3429901282f2)
|
|
2680
2758
|
check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
|
|
2759
|
+
check_type(argname="argument cross_zone_enabled", value=cross_zone_enabled, expected_type=type_hints["cross_zone_enabled"])
|
|
2681
2760
|
check_type(argname="argument deletion_protection", value=deletion_protection, expected_type=type_hints["deletion_protection"])
|
|
2761
|
+
check_type(argname="argument deny_all_igw_traffic", value=deny_all_igw_traffic, expected_type=type_hints["deny_all_igw_traffic"])
|
|
2682
2762
|
check_type(argname="argument internet_facing", value=internet_facing, expected_type=type_hints["internet_facing"])
|
|
2683
2763
|
check_type(argname="argument load_balancer_name", value=load_balancer_name, expected_type=type_hints["load_balancer_name"])
|
|
2684
2764
|
check_type(argname="argument vpc_subnets", value=vpc_subnets, expected_type=type_hints["vpc_subnets"])
|
|
2685
2765
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
2686
2766
|
"vpc": vpc,
|
|
2687
2767
|
}
|
|
2768
|
+
if cross_zone_enabled is not None:
|
|
2769
|
+
self._values["cross_zone_enabled"] = cross_zone_enabled
|
|
2688
2770
|
if deletion_protection is not None:
|
|
2689
2771
|
self._values["deletion_protection"] = deletion_protection
|
|
2772
|
+
if deny_all_igw_traffic is not None:
|
|
2773
|
+
self._values["deny_all_igw_traffic"] = deny_all_igw_traffic
|
|
2690
2774
|
if internet_facing is not None:
|
|
2691
2775
|
self._values["internet_facing"] = internet_facing
|
|
2692
2776
|
if load_balancer_name is not None:
|
|
@@ -2701,6 +2785,15 @@ class BaseLoadBalancerProps:
|
|
|
2701
2785
|
assert result is not None, "Required property 'vpc' is missing"
|
|
2702
2786
|
return typing.cast(_IVpc_f30d5663, result)
|
|
2703
2787
|
|
|
2788
|
+
@builtins.property
|
|
2789
|
+
def cross_zone_enabled(self) -> typing.Optional[builtins.bool]:
|
|
2790
|
+
'''Indicates whether cross-zone load balancing is enabled.
|
|
2791
|
+
|
|
2792
|
+
:default: - false for Network Load Balancers and true for Application Load Balancers.
|
|
2793
|
+
'''
|
|
2794
|
+
result = self._values.get("cross_zone_enabled")
|
|
2795
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
2796
|
+
|
|
2704
2797
|
@builtins.property
|
|
2705
2798
|
def deletion_protection(self) -> typing.Optional[builtins.bool]:
|
|
2706
2799
|
'''Indicates whether deletion protection is enabled.
|
|
@@ -2710,6 +2803,15 @@ class BaseLoadBalancerProps:
|
|
|
2710
2803
|
result = self._values.get("deletion_protection")
|
|
2711
2804
|
return typing.cast(typing.Optional[builtins.bool], result)
|
|
2712
2805
|
|
|
2806
|
+
@builtins.property
|
|
2807
|
+
def deny_all_igw_traffic(self) -> typing.Optional[builtins.bool]:
|
|
2808
|
+
'''Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW).
|
|
2809
|
+
|
|
2810
|
+
:default: - false for internet-facing load balancers and true for internal load balancers
|
|
2811
|
+
'''
|
|
2812
|
+
result = self._values.get("deny_all_igw_traffic")
|
|
2813
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
2814
|
+
|
|
2713
2815
|
@builtins.property
|
|
2714
2816
|
def internet_facing(self) -> typing.Optional[builtins.bool]:
|
|
2715
2817
|
'''Whether the load balancer has an internet-routable address.
|
|
@@ -3207,7 +3309,7 @@ class CfnListener(
|
|
|
3207
3309
|
:param mutual_authentication: The mutual authentication configuration information.
|
|
3208
3310
|
:param port: The port on which the load balancer is listening. You cannot specify a port for a Gateway Load Balancer.
|
|
3209
3311
|
:param protocol: The protocol for connections from clients to the load balancer. For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocols are TCP, TLS, UDP, and TCP_UDP. You can’t specify the UDP or TCP_UDP protocol if dual-stack mode is enabled. You cannot specify a protocol for a Gateway Load Balancer.
|
|
3210
|
-
:param ssl_policy: [HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported. For more information, see `Security policies <https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies>`_ in the *Application Load Balancers Guide* and `Security policies <https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#describe-ssl-policies>`_ in the *Network Load Balancers Guide* .
|
|
3312
|
+
:param ssl_policy: [HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported. Updating the security policy can result in interruptions if the load balancer is handling a high volume of traffic. For more information, see `Security policies <https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies>`_ in the *Application Load Balancers Guide* and `Security policies <https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#describe-ssl-policies>`_ in the *Network Load Balancers Guide* .
|
|
3211
3313
|
'''
|
|
3212
3314
|
if __debug__:
|
|
3213
3315
|
type_hints = typing.get_type_hints(_typecheckingstub__da6c6bab97eae93f0a1595d72a25ac890e7034cc701e7cf76b58f5c6a2170048)
|
|
@@ -5022,7 +5124,7 @@ class CfnListenerProps:
|
|
|
5022
5124
|
:param mutual_authentication: The mutual authentication configuration information.
|
|
5023
5125
|
:param port: The port on which the load balancer is listening. You cannot specify a port for a Gateway Load Balancer.
|
|
5024
5126
|
:param protocol: The protocol for connections from clients to the load balancer. For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocols are TCP, TLS, UDP, and TCP_UDP. You can’t specify the UDP or TCP_UDP protocol if dual-stack mode is enabled. You cannot specify a protocol for a Gateway Load Balancer.
|
|
5025
|
-
:param ssl_policy: [HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported. For more information, see `Security policies <https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies>`_ in the *Application Load Balancers Guide* and `Security policies <https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#describe-ssl-policies>`_ in the *Network Load Balancers Guide* .
|
|
5127
|
+
:param ssl_policy: [HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported. Updating the security policy can result in interruptions if the load balancer is handling a high volume of traffic. For more information, see `Security policies <https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies>`_ in the *Application Load Balancers Guide* and `Security policies <https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#describe-ssl-policies>`_ in the *Network Load Balancers Guide* .
|
|
5026
5128
|
|
|
5027
5129
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html
|
|
5028
5130
|
:exampleMetadata: fixture=_generated
|
|
@@ -5229,6 +5331,8 @@ class CfnListenerProps:
|
|
|
5229
5331
|
def ssl_policy(self) -> typing.Optional[builtins.str]:
|
|
5230
5332
|
'''[HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported.
|
|
5231
5333
|
|
|
5334
|
+
Updating the security policy can result in interruptions if the load balancer is handling a high volume of traffic.
|
|
5335
|
+
|
|
5232
5336
|
For more information, see `Security policies <https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies>`_ in the *Application Load Balancers Guide* and `Security policies <https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#describe-ssl-policies>`_ in the *Network Load Balancers Guide* .
|
|
5233
5337
|
|
|
5234
5338
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html#cfn-elasticloadbalancingv2-listener-sslpolicy
|
|
@@ -7970,7 +8074,7 @@ class CfnLoadBalancer(
|
|
|
7970
8074
|
) -> None:
|
|
7971
8075
|
'''Specifies an attribute for an Application Load Balancer, a Network Load Balancer, or a Gateway Load Balancer.
|
|
7972
8076
|
|
|
7973
|
-
:param key: The name of the attribute. The following attributes are supported by all load balancers: - ``deletion_protection.enabled`` - Indicates whether deletion protection is enabled. The value is ``true`` or ``false`` . The default is ``false`` . - ``load_balancing.cross_zone.enabled`` - Indicates whether cross-zone load balancing is enabled. The possible values are ``true`` and ``false`` . The default for Network Load Balancers and Gateway Load Balancers is ``false`` . The default for Application Load Balancers is ``true`` , and cannot be changed. The following attributes are supported by both Application Load Balancers and Network Load Balancers: - ``access_logs.s3.enabled`` - Indicates whether access logs are enabled. The value is ``true`` or ``false`` . The default is ``false`` . - ``access_logs.s3.bucket`` - The name of the S3 bucket for the access logs. This attribute is required if access logs are enabled. The bucket must exist in the same region as the load balancer and have a bucket policy that grants Elastic Load Balancing permissions to write to the bucket. - ``access_logs.s3.prefix`` - The prefix for the location in the S3 bucket for the access logs. - ``ipv6.deny_all_igw_traffic`` - Blocks internet gateway (IGW) access to the load balancer. It is set to ``false`` for internet-facing load balancers and ``true`` for internal load balancers, preventing unintended access to your internal load balancer through an internet gateway. The following attributes are supported by only Application Load Balancers: - ``idle_timeout.timeout_seconds`` - The idle timeout value, in seconds. The valid range is 1-4000 seconds. The default is 60 seconds. - ``connection_logs.s3.enabled`` - Indicates whether connection logs are enabled. The value is ``true`` or ``false`` . The default is ``false`` . - ``connection_logs.s3.bucket`` - The name of the S3 bucket for the connection logs. This attribute is required if connection logs are enabled. The bucket must exist in the same region as the load balancer and have a bucket policy that grants Elastic Load Balancing permissions to write to the bucket. - ``connection_logs.s3.prefix`` - The prefix for the location in the S3 bucket for the connection logs. - ``routing.http.desync_mitigation_mode`` - Determines how the load balancer handles requests that might pose a security risk to your application. The possible values are ``monitor`` , ``defensive`` , and ``strictest`` . The default is ``defensive`` . - ``routing.http.drop_invalid_header_fields.enabled`` - Indicates whether HTTP headers with invalid header fields are removed by the load balancer ( ``true`` ) or routed to targets ( ``false`` ). The default is ``false`` . - ``routing.http.preserve_host_header.enabled`` - Indicates whether the Application Load Balancer should preserve the ``Host`` header in the HTTP request and send it to the target without any change. The possible values are ``true`` and ``false`` . The default is ``false`` . - ``routing.http.x_amzn_tls_version_and_cipher_suite.enabled`` - Indicates whether the two headers ( ``x-amzn-tls-version`` and ``x-amzn-tls-cipher-suite`` ), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. The ``x-amzn-tls-version`` header has information about the TLS protocol version negotiated with the client, and the ``x-amzn-tls-cipher-suite`` header has information about the cipher suite negotiated with the client. Both headers are in OpenSSL format. The possible values for the attribute are ``true`` and ``false`` . The default is ``false`` . - ``routing.http.xff_client_port.enabled`` - Indicates whether the ``X-Forwarded-For`` header should preserve the source port that the client used to connect to the load balancer. The possible values are ``true`` and ``false`` . The default is ``false`` . - ``routing.http.xff_header_processing.mode`` - Enables you to modify, preserve, or remove the ``X-Forwarded-For`` header in the HTTP request before the Application Load Balancer sends the request to the target. The possible values are ``append`` , ``preserve`` , and ``remove`` . The default is ``append`` . - If the value is ``append`` , the Application Load Balancer adds the client IP address (of the last hop) to the ``X-Forwarded-For`` header in the HTTP request before it sends it to targets. - If the value is ``preserve`` the Application Load Balancer preserves the ``X-Forwarded-For`` header in the HTTP request, and sends it to targets without any change. - If the value is ``remove`` , the Application Load Balancer removes the ``X-Forwarded-For`` header in the HTTP request before it sends it to targets. - ``routing.http2.enabled`` - Indicates whether HTTP/2 is enabled. The possible values are ``true`` and ``false`` . The default is ``true`` . Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. - ``waf.fail_open.enabled`` - Indicates whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF. The possible values are ``true`` and ``false`` . The default is ``false`` . The following attributes are supported by only Network Load Balancers: - ``dns_record.client_routing_policy`` - Indicates how traffic is distributed among the load balancer Availability Zones. The possible values are ``availability_zone_affinity`` with 100 percent zonal affinity, ``partial_availability_zone_affinity`` with 85 percent zonal affinity, and ``any_availability_zone`` with 0 percent zonal affinity.
|
|
8077
|
+
:param key: The name of the attribute. The following attributes are supported by all load balancers: - ``deletion_protection.enabled`` - Indicates whether deletion protection is enabled. The value is ``true`` or ``false`` . The default is ``false`` . - ``load_balancing.cross_zone.enabled`` - Indicates whether cross-zone load balancing is enabled. The possible values are ``true`` and ``false`` . The default for Network Load Balancers and Gateway Load Balancers is ``false`` . The default for Application Load Balancers is ``true`` , and cannot be changed. The following attributes are supported by both Application Load Balancers and Network Load Balancers: - ``access_logs.s3.enabled`` - Indicates whether access logs are enabled. The value is ``true`` or ``false`` . The default is ``false`` . - ``access_logs.s3.bucket`` - The name of the S3 bucket for the access logs. This attribute is required if access logs are enabled. The bucket must exist in the same region as the load balancer and have a bucket policy that grants Elastic Load Balancing permissions to write to the bucket. - ``access_logs.s3.prefix`` - The prefix for the location in the S3 bucket for the access logs. - ``ipv6.deny_all_igw_traffic`` - Blocks internet gateway (IGW) access to the load balancer. It is set to ``false`` for internet-facing load balancers and ``true`` for internal load balancers, preventing unintended access to your internal load balancer through an internet gateway. The following attributes are supported by only Application Load Balancers: - ``idle_timeout.timeout_seconds`` - The idle timeout value, in seconds. The valid range is 1-4000 seconds. The default is 60 seconds. - ``client_keep_alive.seconds`` - The client keep alive value, in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds. - ``connection_logs.s3.enabled`` - Indicates whether connection logs are enabled. The value is ``true`` or ``false`` . The default is ``false`` . - ``connection_logs.s3.bucket`` - The name of the S3 bucket for the connection logs. This attribute is required if connection logs are enabled. The bucket must exist in the same region as the load balancer and have a bucket policy that grants Elastic Load Balancing permissions to write to the bucket. - ``connection_logs.s3.prefix`` - The prefix for the location in the S3 bucket for the connection logs. - ``routing.http.desync_mitigation_mode`` - Determines how the load balancer handles requests that might pose a security risk to your application. The possible values are ``monitor`` , ``defensive`` , and ``strictest`` . The default is ``defensive`` . - ``routing.http.drop_invalid_header_fields.enabled`` - Indicates whether HTTP headers with invalid header fields are removed by the load balancer ( ``true`` ) or routed to targets ( ``false`` ). The default is ``false`` . - ``routing.http.preserve_host_header.enabled`` - Indicates whether the Application Load Balancer should preserve the ``Host`` header in the HTTP request and send it to the target without any change. The possible values are ``true`` and ``false`` . The default is ``false`` . - ``routing.http.x_amzn_tls_version_and_cipher_suite.enabled`` - Indicates whether the two headers ( ``x-amzn-tls-version`` and ``x-amzn-tls-cipher-suite`` ), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. The ``x-amzn-tls-version`` header has information about the TLS protocol version negotiated with the client, and the ``x-amzn-tls-cipher-suite`` header has information about the cipher suite negotiated with the client. Both headers are in OpenSSL format. The possible values for the attribute are ``true`` and ``false`` . The default is ``false`` . - ``routing.http.xff_client_port.enabled`` - Indicates whether the ``X-Forwarded-For`` header should preserve the source port that the client used to connect to the load balancer. The possible values are ``true`` and ``false`` . The default is ``false`` . - ``routing.http.xff_header_processing.mode`` - Enables you to modify, preserve, or remove the ``X-Forwarded-For`` header in the HTTP request before the Application Load Balancer sends the request to the target. The possible values are ``append`` , ``preserve`` , and ``remove`` . The default is ``append`` . - If the value is ``append`` , the Application Load Balancer adds the client IP address (of the last hop) to the ``X-Forwarded-For`` header in the HTTP request before it sends it to targets. - If the value is ``preserve`` the Application Load Balancer preserves the ``X-Forwarded-For`` header in the HTTP request, and sends it to targets without any change. - If the value is ``remove`` , the Application Load Balancer removes the ``X-Forwarded-For`` header in the HTTP request before it sends it to targets. - ``routing.http2.enabled`` - Indicates whether HTTP/2 is enabled. The possible values are ``true`` and ``false`` . The default is ``true`` . Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. - ``waf.fail_open.enabled`` - Indicates whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF. The possible values are ``true`` and ``false`` . The default is ``false`` . The following attributes are supported by only Network Load Balancers: - ``dns_record.client_routing_policy`` - Indicates how traffic is distributed among the load balancer Availability Zones. The possible values are ``availability_zone_affinity`` with 100 percent zonal affinity, ``partial_availability_zone_affinity`` with 85 percent zonal affinity, and ``any_availability_zone`` with 0 percent zonal affinity.
|
|
7974
8078
|
:param value: The value of the attribute.
|
|
7975
8079
|
|
|
7976
8080
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-loadbalancerattribute.html
|
|
@@ -8016,6 +8120,7 @@ class CfnLoadBalancer(
|
|
|
8016
8120
|
The following attributes are supported by only Application Load Balancers:
|
|
8017
8121
|
|
|
8018
8122
|
- ``idle_timeout.timeout_seconds`` - The idle timeout value, in seconds. The valid range is 1-4000 seconds. The default is 60 seconds.
|
|
8123
|
+
- ``client_keep_alive.seconds`` - The client keep alive value, in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds.
|
|
8019
8124
|
- ``connection_logs.s3.enabled`` - Indicates whether connection logs are enabled. The value is ``true`` or ``false`` . The default is ``false`` .
|
|
8020
8125
|
- ``connection_logs.s3.bucket`` - The name of the S3 bucket for the connection logs. This attribute is required if connection logs are enabled. The bucket must exist in the same region as the load balancer and have a bucket policy that grants Elastic Load Balancing permissions to write to the bucket.
|
|
8021
8126
|
- ``connection_logs.s3.prefix`` - The prefix for the location in the S3 bucket for the connection logs.
|
|
@@ -10396,6 +10501,42 @@ class CfnTrustStoreRevocationProps:
|
|
|
10396
10501
|
)
|
|
10397
10502
|
|
|
10398
10503
|
|
|
10504
|
+
@jsii.enum(jsii_type="aws-cdk-lib.aws_elasticloadbalancingv2.ClientRoutingPolicy")
|
|
10505
|
+
class ClientRoutingPolicy(enum.Enum):
|
|
10506
|
+
'''Indicates how traffic is distributed among the load balancer Availability Zones.
|
|
10507
|
+
|
|
10508
|
+
:see: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#zonal-dns-affinity
|
|
10509
|
+
:exampleMetadata: infused
|
|
10510
|
+
|
|
10511
|
+
Example::
|
|
10512
|
+
|
|
10513
|
+
# vpc: ec2.Vpc
|
|
10514
|
+
|
|
10515
|
+
|
|
10516
|
+
lb = elbv2.NetworkLoadBalancer(self, "LB",
|
|
10517
|
+
vpc=vpc,
|
|
10518
|
+
# Whether deletion protection is enabled.
|
|
10519
|
+
deletion_protection=True,
|
|
10520
|
+
|
|
10521
|
+
# Whether cross-zone load balancing is enabled.
|
|
10522
|
+
cross_zone_enabled=True,
|
|
10523
|
+
|
|
10524
|
+
# Whether the load balancer blocks traffic through the Internet Gateway (IGW).
|
|
10525
|
+
deny_all_igw_traffic=False,
|
|
10526
|
+
|
|
10527
|
+
# Indicates how traffic is distributed among the load balancer Availability Zones.
|
|
10528
|
+
client_routing_policy=elbv2.ClientRoutingPolicy.AVAILABILITY_ZONE_AFFINITY
|
|
10529
|
+
)
|
|
10530
|
+
'''
|
|
10531
|
+
|
|
10532
|
+
AVAILABILITY_ZONE_AFFINITY = "AVAILABILITY_ZONE_AFFINITY"
|
|
10533
|
+
'''100 percent zonal affinity.'''
|
|
10534
|
+
PARTIAL_AVAILABILITY_ZONE_AFFINITY = "PARTIAL_AVAILABILITY_ZONE_AFFINITY"
|
|
10535
|
+
'''85 percent zonal affinity.'''
|
|
10536
|
+
ANY_AVAILABILITY_ZONE = "ANY_AVAILABILITY_ZONE"
|
|
10537
|
+
'''No zonal affinity.'''
|
|
10538
|
+
|
|
10539
|
+
|
|
10399
10540
|
@jsii.enum(jsii_type="aws-cdk-lib.aws_elasticloadbalancingv2.DesyncMitigationMode")
|
|
10400
10541
|
class DesyncMitigationMode(enum.Enum):
|
|
10401
10542
|
'''How the load balancer handles requests that might pose a security risk to your application.
|
|
@@ -10427,7 +10568,16 @@ class DesyncMitigationMode(enum.Enum):
|
|
|
10427
10568
|
desync_mitigation_mode=elbv2.DesyncMitigationMode.DEFENSIVE,
|
|
10428
10569
|
|
|
10429
10570
|
# The type of IP addresses to use.
|
|
10430
|
-
ip_address_type=elbv2.IpAddressType.IPV4
|
|
10571
|
+
ip_address_type=elbv2.IpAddressType.IPV4,
|
|
10572
|
+
|
|
10573
|
+
# The duration of client keep-alive connections
|
|
10574
|
+
client_keep_alive=Duration.seconds(500),
|
|
10575
|
+
|
|
10576
|
+
# Whether cross-zone load balancing is enabled.
|
|
10577
|
+
cross_zone_enabled=True,
|
|
10578
|
+
|
|
10579
|
+
# Whether the load balancer blocks traffic through the Internet Gateway (IGW).
|
|
10580
|
+
deny_all_igw_traffic=False
|
|
10431
10581
|
)
|
|
10432
10582
|
'''
|
|
10433
10583
|
|
|
@@ -13458,6 +13608,17 @@ class INetworkLoadBalancer(
|
|
|
13458
13608
|
'''All metrics available for this load balancer.'''
|
|
13459
13609
|
...
|
|
13460
13610
|
|
|
13611
|
+
@builtins.property
|
|
13612
|
+
@jsii.member(jsii_name="enforceSecurityGroupInboundRulesOnPrivateLinkTraffic")
|
|
13613
|
+
def enforce_security_group_inbound_rules_on_private_link_traffic(
|
|
13614
|
+
self,
|
|
13615
|
+
) -> typing.Optional[builtins.str]:
|
|
13616
|
+
'''Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink.
|
|
13617
|
+
|
|
13618
|
+
:default: on
|
|
13619
|
+
'''
|
|
13620
|
+
...
|
|
13621
|
+
|
|
13461
13622
|
@builtins.property
|
|
13462
13623
|
@jsii.member(jsii_name="ipAddressType")
|
|
13463
13624
|
def ip_address_type(self) -> typing.Optional["IpAddressType"]:
|
|
@@ -13523,6 +13684,17 @@ class _INetworkLoadBalancerProxy(
|
|
|
13523
13684
|
'''All metrics available for this load balancer.'''
|
|
13524
13685
|
return typing.cast("INetworkLoadBalancerMetrics", jsii.get(self, "metrics"))
|
|
13525
13686
|
|
|
13687
|
+
@builtins.property
|
|
13688
|
+
@jsii.member(jsii_name="enforceSecurityGroupInboundRulesOnPrivateLinkTraffic")
|
|
13689
|
+
def enforce_security_group_inbound_rules_on_private_link_traffic(
|
|
13690
|
+
self,
|
|
13691
|
+
) -> typing.Optional[builtins.str]:
|
|
13692
|
+
'''Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink.
|
|
13693
|
+
|
|
13694
|
+
:default: on
|
|
13695
|
+
'''
|
|
13696
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "enforceSecurityGroupInboundRulesOnPrivateLinkTraffic"))
|
|
13697
|
+
|
|
13526
13698
|
@builtins.property
|
|
13527
13699
|
@jsii.member(jsii_name="ipAddressType")
|
|
13528
13700
|
def ip_address_type(self) -> typing.Optional["IpAddressType"]:
|
|
@@ -14529,7 +14701,16 @@ class IpAddressType(enum.Enum):
|
|
|
14529
14701
|
desync_mitigation_mode=elbv2.DesyncMitigationMode.DEFENSIVE,
|
|
14530
14702
|
|
|
14531
14703
|
# The type of IP addresses to use.
|
|
14532
|
-
ip_address_type=elbv2.IpAddressType.IPV4
|
|
14704
|
+
ip_address_type=elbv2.IpAddressType.IPV4,
|
|
14705
|
+
|
|
14706
|
+
# The duration of client keep-alive connections
|
|
14707
|
+
client_keep_alive=Duration.seconds(500),
|
|
14708
|
+
|
|
14709
|
+
# Whether cross-zone load balancing is enabled.
|
|
14710
|
+
cross_zone_enabled=True,
|
|
14711
|
+
|
|
14712
|
+
# Whether the load balancer blocks traffic through the Internet Gateway (IGW).
|
|
14713
|
+
deny_all_igw_traffic=False
|
|
14533
14714
|
)
|
|
14534
14715
|
'''
|
|
14535
14716
|
|
|
@@ -15651,24 +15832,18 @@ class NetworkLoadBalancer(
|
|
|
15651
15832
|
|
|
15652
15833
|
Example::
|
|
15653
15834
|
|
|
15654
|
-
|
|
15835
|
+
from aws_cdk.aws_apigatewayv2_integrations import HttpNlbIntegration
|
|
15655
15836
|
|
|
15656
15837
|
|
|
15657
15838
|
vpc = ec2.Vpc(self, "VPC")
|
|
15658
|
-
|
|
15659
|
-
|
|
15660
|
-
|
|
15661
|
-
|
|
15662
|
-
targets=[nlb]
|
|
15839
|
+
lb = elbv2.NetworkLoadBalancer(self, "lb", vpc=vpc)
|
|
15840
|
+
listener = lb.add_listener("listener", port=80)
|
|
15841
|
+
listener.add_targets("target",
|
|
15842
|
+
port=80
|
|
15663
15843
|
)
|
|
15664
15844
|
|
|
15665
|
-
|
|
15666
|
-
|
|
15667
|
-
integration_http_method="ANY",
|
|
15668
|
-
options=apigateway.IntegrationOptions(
|
|
15669
|
-
connection_type=apigateway.ConnectionType.VPC_LINK,
|
|
15670
|
-
vpc_link=link
|
|
15671
|
-
)
|
|
15845
|
+
http_endpoint = apigwv2.HttpApi(self, "HttpProxyPrivateApi",
|
|
15846
|
+
default_integration=HttpNlbIntegration("DefaultIntegration", listener)
|
|
15672
15847
|
)
|
|
15673
15848
|
'''
|
|
15674
15849
|
|
|
@@ -15677,11 +15852,14 @@ class NetworkLoadBalancer(
|
|
|
15677
15852
|
scope: _constructs_77d1e7e8.Construct,
|
|
15678
15853
|
id: builtins.str,
|
|
15679
15854
|
*,
|
|
15680
|
-
|
|
15855
|
+
client_routing_policy: typing.Optional[ClientRoutingPolicy] = None,
|
|
15856
|
+
enforce_security_group_inbound_rules_on_private_link_traffic: typing.Optional[builtins.bool] = None,
|
|
15681
15857
|
ip_address_type: typing.Optional[IpAddressType] = None,
|
|
15682
15858
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
15683
15859
|
vpc: _IVpc_f30d5663,
|
|
15860
|
+
cross_zone_enabled: typing.Optional[builtins.bool] = None,
|
|
15684
15861
|
deletion_protection: typing.Optional[builtins.bool] = None,
|
|
15862
|
+
deny_all_igw_traffic: typing.Optional[builtins.bool] = None,
|
|
15685
15863
|
internet_facing: typing.Optional[builtins.bool] = None,
|
|
15686
15864
|
load_balancer_name: typing.Optional[builtins.str] = None,
|
|
15687
15865
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
@@ -15689,11 +15867,14 @@ class NetworkLoadBalancer(
|
|
|
15689
15867
|
'''
|
|
15690
15868
|
:param scope: -
|
|
15691
15869
|
:param id: -
|
|
15692
|
-
:param
|
|
15870
|
+
:param client_routing_policy: The AZ affinity routing policy. Default: - AZ affinity is disabled.
|
|
15871
|
+
:param enforce_security_group_inbound_rules_on_private_link_traffic: Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink. Default: true
|
|
15693
15872
|
:param ip_address_type: The type of IP addresses to use. If you want to add a UDP or TCP_UDP listener to the load balancer, you must choose IPv4. Default: IpAddressType.IPV4
|
|
15694
15873
|
:param security_groups: Security groups to associate with this load balancer. Default: - No security groups associated with the load balancer.
|
|
15695
15874
|
:param vpc: The VPC network to place the load balancer in.
|
|
15875
|
+
:param cross_zone_enabled: Indicates whether cross-zone load balancing is enabled. Default: - false for Network Load Balancers and true for Application Load Balancers.
|
|
15696
15876
|
:param deletion_protection: Indicates whether deletion protection is enabled. Default: false
|
|
15877
|
+
:param deny_all_igw_traffic: Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW). Default: - false for internet-facing load balancers and true for internal load balancers
|
|
15697
15878
|
:param internet_facing: Whether the load balancer has an internet-routable address. Default: false
|
|
15698
15879
|
:param load_balancer_name: Name of the load balancer. Default: - Automatically generated name.
|
|
15699
15880
|
:param vpc_subnets: Which subnets place the load balancer in. Default: - the Vpc default strategy.
|
|
@@ -15703,11 +15884,14 @@ class NetworkLoadBalancer(
|
|
|
15703
15884
|
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
15704
15885
|
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
15705
15886
|
props = NetworkLoadBalancerProps(
|
|
15706
|
-
|
|
15887
|
+
client_routing_policy=client_routing_policy,
|
|
15888
|
+
enforce_security_group_inbound_rules_on_private_link_traffic=enforce_security_group_inbound_rules_on_private_link_traffic,
|
|
15707
15889
|
ip_address_type=ip_address_type,
|
|
15708
15890
|
security_groups=security_groups,
|
|
15709
15891
|
vpc=vpc,
|
|
15892
|
+
cross_zone_enabled=cross_zone_enabled,
|
|
15710
15893
|
deletion_protection=deletion_protection,
|
|
15894
|
+
deny_all_igw_traffic=deny_all_igw_traffic,
|
|
15711
15895
|
internet_facing=internet_facing,
|
|
15712
15896
|
load_balancer_name=load_balancer_name,
|
|
15713
15897
|
vpc_subnets=vpc_subnets,
|
|
@@ -16199,6 +16383,14 @@ class NetworkLoadBalancer(
|
|
|
16199
16383
|
'''All metrics available for this load balancer.'''
|
|
16200
16384
|
return typing.cast(INetworkLoadBalancerMetrics, jsii.get(self, "metrics"))
|
|
16201
16385
|
|
|
16386
|
+
@builtins.property
|
|
16387
|
+
@jsii.member(jsii_name="enforceSecurityGroupInboundRulesOnPrivateLinkTraffic")
|
|
16388
|
+
def enforce_security_group_inbound_rules_on_private_link_traffic(
|
|
16389
|
+
self,
|
|
16390
|
+
) -> typing.Optional[builtins.str]:
|
|
16391
|
+
'''Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink.'''
|
|
16392
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "enforceSecurityGroupInboundRulesOnPrivateLinkTraffic"))
|
|
16393
|
+
|
|
16202
16394
|
@builtins.property
|
|
16203
16395
|
@jsii.member(jsii_name="ipAddressType")
|
|
16204
16396
|
def ip_address_type(self) -> typing.Optional[IpAddressType]:
|
|
@@ -16434,11 +16626,14 @@ class NetworkLoadBalancerLookupOptions(BaseLoadBalancerLookupOptions):
|
|
|
16434
16626
|
jsii_struct_bases=[BaseLoadBalancerProps],
|
|
16435
16627
|
name_mapping={
|
|
16436
16628
|
"vpc": "vpc",
|
|
16629
|
+
"cross_zone_enabled": "crossZoneEnabled",
|
|
16437
16630
|
"deletion_protection": "deletionProtection",
|
|
16631
|
+
"deny_all_igw_traffic": "denyAllIgwTraffic",
|
|
16438
16632
|
"internet_facing": "internetFacing",
|
|
16439
16633
|
"load_balancer_name": "loadBalancerName",
|
|
16440
16634
|
"vpc_subnets": "vpcSubnets",
|
|
16441
|
-
"
|
|
16635
|
+
"client_routing_policy": "clientRoutingPolicy",
|
|
16636
|
+
"enforce_security_group_inbound_rules_on_private_link_traffic": "enforceSecurityGroupInboundRulesOnPrivateLinkTraffic",
|
|
16442
16637
|
"ip_address_type": "ipAddressType",
|
|
16443
16638
|
"security_groups": "securityGroups",
|
|
16444
16639
|
},
|
|
@@ -16448,22 +16643,28 @@ class NetworkLoadBalancerProps(BaseLoadBalancerProps):
|
|
|
16448
16643
|
self,
|
|
16449
16644
|
*,
|
|
16450
16645
|
vpc: _IVpc_f30d5663,
|
|
16646
|
+
cross_zone_enabled: typing.Optional[builtins.bool] = None,
|
|
16451
16647
|
deletion_protection: typing.Optional[builtins.bool] = None,
|
|
16648
|
+
deny_all_igw_traffic: typing.Optional[builtins.bool] = None,
|
|
16452
16649
|
internet_facing: typing.Optional[builtins.bool] = None,
|
|
16453
16650
|
load_balancer_name: typing.Optional[builtins.str] = None,
|
|
16454
16651
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
16455
|
-
|
|
16652
|
+
client_routing_policy: typing.Optional[ClientRoutingPolicy] = None,
|
|
16653
|
+
enforce_security_group_inbound_rules_on_private_link_traffic: typing.Optional[builtins.bool] = None,
|
|
16456
16654
|
ip_address_type: typing.Optional[IpAddressType] = None,
|
|
16457
16655
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
16458
16656
|
) -> None:
|
|
16459
16657
|
'''Properties for a network load balancer.
|
|
16460
16658
|
|
|
16461
16659
|
:param vpc: The VPC network to place the load balancer in.
|
|
16660
|
+
:param cross_zone_enabled: Indicates whether cross-zone load balancing is enabled. Default: - false for Network Load Balancers and true for Application Load Balancers.
|
|
16462
16661
|
:param deletion_protection: Indicates whether deletion protection is enabled. Default: false
|
|
16662
|
+
:param deny_all_igw_traffic: Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW). Default: - false for internet-facing load balancers and true for internal load balancers
|
|
16463
16663
|
:param internet_facing: Whether the load balancer has an internet-routable address. Default: false
|
|
16464
16664
|
:param load_balancer_name: Name of the load balancer. Default: - Automatically generated name.
|
|
16465
16665
|
:param vpc_subnets: Which subnets place the load balancer in. Default: - the Vpc default strategy.
|
|
16466
|
-
:param
|
|
16666
|
+
:param client_routing_policy: The AZ affinity routing policy. Default: - AZ affinity is disabled.
|
|
16667
|
+
:param enforce_security_group_inbound_rules_on_private_link_traffic: Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink. Default: true
|
|
16467
16668
|
:param ip_address_type: The type of IP addresses to use. If you want to add a UDP or TCP_UDP listener to the load balancer, you must choose IPv4. Default: IpAddressType.IPV4
|
|
16468
16669
|
:param security_groups: Security groups to associate with this load balancer. Default: - No security groups associated with the load balancer.
|
|
16469
16670
|
|
|
@@ -16471,24 +16672,18 @@ class NetworkLoadBalancerProps(BaseLoadBalancerProps):
|
|
|
16471
16672
|
|
|
16472
16673
|
Example::
|
|
16473
16674
|
|
|
16474
|
-
|
|
16675
|
+
from aws_cdk.aws_apigatewayv2_integrations import HttpNlbIntegration
|
|
16475
16676
|
|
|
16476
16677
|
|
|
16477
16678
|
vpc = ec2.Vpc(self, "VPC")
|
|
16478
|
-
|
|
16479
|
-
|
|
16480
|
-
|
|
16481
|
-
|
|
16482
|
-
targets=[nlb]
|
|
16679
|
+
lb = elbv2.NetworkLoadBalancer(self, "lb", vpc=vpc)
|
|
16680
|
+
listener = lb.add_listener("listener", port=80)
|
|
16681
|
+
listener.add_targets("target",
|
|
16682
|
+
port=80
|
|
16483
16683
|
)
|
|
16484
16684
|
|
|
16485
|
-
|
|
16486
|
-
|
|
16487
|
-
integration_http_method="ANY",
|
|
16488
|
-
options=apigateway.IntegrationOptions(
|
|
16489
|
-
connection_type=apigateway.ConnectionType.VPC_LINK,
|
|
16490
|
-
vpc_link=link
|
|
16491
|
-
)
|
|
16685
|
+
http_endpoint = apigwv2.HttpApi(self, "HttpProxyPrivateApi",
|
|
16686
|
+
default_integration=HttpNlbIntegration("DefaultIntegration", listener)
|
|
16492
16687
|
)
|
|
16493
16688
|
'''
|
|
16494
16689
|
if isinstance(vpc_subnets, dict):
|
|
@@ -16496,26 +16691,35 @@ class NetworkLoadBalancerProps(BaseLoadBalancerProps):
|
|
|
16496
16691
|
if __debug__:
|
|
16497
16692
|
type_hints = typing.get_type_hints(_typecheckingstub__195ab659ca9cd1c401d6d2d1a1f5cb0aaf7dd80f06dbc724020ac0cc391d75da)
|
|
16498
16693
|
check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
|
|
16694
|
+
check_type(argname="argument cross_zone_enabled", value=cross_zone_enabled, expected_type=type_hints["cross_zone_enabled"])
|
|
16499
16695
|
check_type(argname="argument deletion_protection", value=deletion_protection, expected_type=type_hints["deletion_protection"])
|
|
16696
|
+
check_type(argname="argument deny_all_igw_traffic", value=deny_all_igw_traffic, expected_type=type_hints["deny_all_igw_traffic"])
|
|
16500
16697
|
check_type(argname="argument internet_facing", value=internet_facing, expected_type=type_hints["internet_facing"])
|
|
16501
16698
|
check_type(argname="argument load_balancer_name", value=load_balancer_name, expected_type=type_hints["load_balancer_name"])
|
|
16502
16699
|
check_type(argname="argument vpc_subnets", value=vpc_subnets, expected_type=type_hints["vpc_subnets"])
|
|
16503
|
-
check_type(argname="argument
|
|
16700
|
+
check_type(argname="argument client_routing_policy", value=client_routing_policy, expected_type=type_hints["client_routing_policy"])
|
|
16701
|
+
check_type(argname="argument enforce_security_group_inbound_rules_on_private_link_traffic", value=enforce_security_group_inbound_rules_on_private_link_traffic, expected_type=type_hints["enforce_security_group_inbound_rules_on_private_link_traffic"])
|
|
16504
16702
|
check_type(argname="argument ip_address_type", value=ip_address_type, expected_type=type_hints["ip_address_type"])
|
|
16505
16703
|
check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
|
|
16506
16704
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
16507
16705
|
"vpc": vpc,
|
|
16508
16706
|
}
|
|
16707
|
+
if cross_zone_enabled is not None:
|
|
16708
|
+
self._values["cross_zone_enabled"] = cross_zone_enabled
|
|
16509
16709
|
if deletion_protection is not None:
|
|
16510
16710
|
self._values["deletion_protection"] = deletion_protection
|
|
16711
|
+
if deny_all_igw_traffic is not None:
|
|
16712
|
+
self._values["deny_all_igw_traffic"] = deny_all_igw_traffic
|
|
16511
16713
|
if internet_facing is not None:
|
|
16512
16714
|
self._values["internet_facing"] = internet_facing
|
|
16513
16715
|
if load_balancer_name is not None:
|
|
16514
16716
|
self._values["load_balancer_name"] = load_balancer_name
|
|
16515
16717
|
if vpc_subnets is not None:
|
|
16516
16718
|
self._values["vpc_subnets"] = vpc_subnets
|
|
16517
|
-
if
|
|
16518
|
-
self._values["
|
|
16719
|
+
if client_routing_policy is not None:
|
|
16720
|
+
self._values["client_routing_policy"] = client_routing_policy
|
|
16721
|
+
if enforce_security_group_inbound_rules_on_private_link_traffic is not None:
|
|
16722
|
+
self._values["enforce_security_group_inbound_rules_on_private_link_traffic"] = enforce_security_group_inbound_rules_on_private_link_traffic
|
|
16519
16723
|
if ip_address_type is not None:
|
|
16520
16724
|
self._values["ip_address_type"] = ip_address_type
|
|
16521
16725
|
if security_groups is not None:
|
|
@@ -16528,6 +16732,15 @@ class NetworkLoadBalancerProps(BaseLoadBalancerProps):
|
|
|
16528
16732
|
assert result is not None, "Required property 'vpc' is missing"
|
|
16529
16733
|
return typing.cast(_IVpc_f30d5663, result)
|
|
16530
16734
|
|
|
16735
|
+
@builtins.property
|
|
16736
|
+
def cross_zone_enabled(self) -> typing.Optional[builtins.bool]:
|
|
16737
|
+
'''Indicates whether cross-zone load balancing is enabled.
|
|
16738
|
+
|
|
16739
|
+
:default: - false for Network Load Balancers and true for Application Load Balancers.
|
|
16740
|
+
'''
|
|
16741
|
+
result = self._values.get("cross_zone_enabled")
|
|
16742
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
16743
|
+
|
|
16531
16744
|
@builtins.property
|
|
16532
16745
|
def deletion_protection(self) -> typing.Optional[builtins.bool]:
|
|
16533
16746
|
'''Indicates whether deletion protection is enabled.
|
|
@@ -16537,6 +16750,15 @@ class NetworkLoadBalancerProps(BaseLoadBalancerProps):
|
|
|
16537
16750
|
result = self._values.get("deletion_protection")
|
|
16538
16751
|
return typing.cast(typing.Optional[builtins.bool], result)
|
|
16539
16752
|
|
|
16753
|
+
@builtins.property
|
|
16754
|
+
def deny_all_igw_traffic(self) -> typing.Optional[builtins.bool]:
|
|
16755
|
+
'''Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW).
|
|
16756
|
+
|
|
16757
|
+
:default: - false for internet-facing load balancers and true for internal load balancers
|
|
16758
|
+
'''
|
|
16759
|
+
result = self._values.get("deny_all_igw_traffic")
|
|
16760
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
16761
|
+
|
|
16540
16762
|
@builtins.property
|
|
16541
16763
|
def internet_facing(self) -> typing.Optional[builtins.bool]:
|
|
16542
16764
|
'''Whether the load balancer has an internet-routable address.
|
|
@@ -16565,12 +16787,25 @@ class NetworkLoadBalancerProps(BaseLoadBalancerProps):
|
|
|
16565
16787
|
return typing.cast(typing.Optional[_SubnetSelection_e57d76df], result)
|
|
16566
16788
|
|
|
16567
16789
|
@builtins.property
|
|
16568
|
-
def
|
|
16569
|
-
'''
|
|
16790
|
+
def client_routing_policy(self) -> typing.Optional[ClientRoutingPolicy]:
|
|
16791
|
+
'''The AZ affinity routing policy.
|
|
16570
16792
|
|
|
16571
|
-
:default:
|
|
16793
|
+
:default: - AZ affinity is disabled.
|
|
16794
|
+
|
|
16795
|
+
:see: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#zonal-dns-affinity
|
|
16572
16796
|
'''
|
|
16573
|
-
result = self._values.get("
|
|
16797
|
+
result = self._values.get("client_routing_policy")
|
|
16798
|
+
return typing.cast(typing.Optional[ClientRoutingPolicy], result)
|
|
16799
|
+
|
|
16800
|
+
@builtins.property
|
|
16801
|
+
def enforce_security_group_inbound_rules_on_private_link_traffic(
|
|
16802
|
+
self,
|
|
16803
|
+
) -> typing.Optional[builtins.bool]:
|
|
16804
|
+
'''Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink.
|
|
16805
|
+
|
|
16806
|
+
:default: true
|
|
16807
|
+
'''
|
|
16808
|
+
result = self._values.get("enforce_security_group_inbound_rules_on_private_link_traffic")
|
|
16574
16809
|
return typing.cast(typing.Optional[builtins.bool], result)
|
|
16575
16810
|
|
|
16576
16811
|
@builtins.property
|
|
@@ -18861,10 +19096,13 @@ class ApplicationLoadBalancerLookupOptions(BaseLoadBalancerLookupOptions):
|
|
|
18861
19096
|
jsii_struct_bases=[BaseLoadBalancerProps],
|
|
18862
19097
|
name_mapping={
|
|
18863
19098
|
"vpc": "vpc",
|
|
19099
|
+
"cross_zone_enabled": "crossZoneEnabled",
|
|
18864
19100
|
"deletion_protection": "deletionProtection",
|
|
19101
|
+
"deny_all_igw_traffic": "denyAllIgwTraffic",
|
|
18865
19102
|
"internet_facing": "internetFacing",
|
|
18866
19103
|
"load_balancer_name": "loadBalancerName",
|
|
18867
19104
|
"vpc_subnets": "vpcSubnets",
|
|
19105
|
+
"client_keep_alive": "clientKeepAlive",
|
|
18868
19106
|
"desync_mitigation_mode": "desyncMitigationMode",
|
|
18869
19107
|
"drop_invalid_header_fields": "dropInvalidHeaderFields",
|
|
18870
19108
|
"http2_enabled": "http2Enabled",
|
|
@@ -18878,10 +19116,13 @@ class ApplicationLoadBalancerProps(BaseLoadBalancerProps):
|
|
|
18878
19116
|
self,
|
|
18879
19117
|
*,
|
|
18880
19118
|
vpc: _IVpc_f30d5663,
|
|
19119
|
+
cross_zone_enabled: typing.Optional[builtins.bool] = None,
|
|
18881
19120
|
deletion_protection: typing.Optional[builtins.bool] = None,
|
|
19121
|
+
deny_all_igw_traffic: typing.Optional[builtins.bool] = None,
|
|
18882
19122
|
internet_facing: typing.Optional[builtins.bool] = None,
|
|
18883
19123
|
load_balancer_name: typing.Optional[builtins.str] = None,
|
|
18884
19124
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
19125
|
+
client_keep_alive: typing.Optional[_Duration_4839e8c3] = None,
|
|
18885
19126
|
desync_mitigation_mode: typing.Optional[DesyncMitigationMode] = None,
|
|
18886
19127
|
drop_invalid_header_fields: typing.Optional[builtins.bool] = None,
|
|
18887
19128
|
http2_enabled: typing.Optional[builtins.bool] = None,
|
|
@@ -18892,10 +19133,13 @@ class ApplicationLoadBalancerProps(BaseLoadBalancerProps):
|
|
|
18892
19133
|
'''Properties for defining an Application Load Balancer.
|
|
18893
19134
|
|
|
18894
19135
|
:param vpc: The VPC network to place the load balancer in.
|
|
19136
|
+
:param cross_zone_enabled: Indicates whether cross-zone load balancing is enabled. Default: - false for Network Load Balancers and true for Application Load Balancers.
|
|
18895
19137
|
:param deletion_protection: Indicates whether deletion protection is enabled. Default: false
|
|
19138
|
+
:param deny_all_igw_traffic: Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW). Default: - false for internet-facing load balancers and true for internal load balancers
|
|
18896
19139
|
:param internet_facing: Whether the load balancer has an internet-routable address. Default: false
|
|
18897
19140
|
:param load_balancer_name: Name of the load balancer. Default: - Automatically generated name.
|
|
18898
19141
|
:param vpc_subnets: Which subnets place the load balancer in. Default: - the Vpc default strategy.
|
|
19142
|
+
:param client_keep_alive: The client keep alive duration. The valid range is 60 to 604800 seconds (1 minute to 7 days). Default: - Duration.seconds(3600)
|
|
18899
19143
|
:param desync_mitigation_mode: Determines how the load balancer handles requests that might pose a security risk to your application. Default: DesyncMitigationMode.DEFENSIVE
|
|
18900
19144
|
:param drop_invalid_header_fields: Indicates whether HTTP headers with invalid header fields are removed by the load balancer (true) or routed to targets (false). Default: false
|
|
18901
19145
|
:param http2_enabled: Indicates whether HTTP/2 is enabled. Default: true
|
|
@@ -18929,10 +19173,13 @@ class ApplicationLoadBalancerProps(BaseLoadBalancerProps):
|
|
|
18929
19173
|
if __debug__:
|
|
18930
19174
|
type_hints = typing.get_type_hints(_typecheckingstub__e43cf75024913d9be0d5d621a5f2c2c7be60a57898a54967cd54179b2b3d1584)
|
|
18931
19175
|
check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
|
|
19176
|
+
check_type(argname="argument cross_zone_enabled", value=cross_zone_enabled, expected_type=type_hints["cross_zone_enabled"])
|
|
18932
19177
|
check_type(argname="argument deletion_protection", value=deletion_protection, expected_type=type_hints["deletion_protection"])
|
|
19178
|
+
check_type(argname="argument deny_all_igw_traffic", value=deny_all_igw_traffic, expected_type=type_hints["deny_all_igw_traffic"])
|
|
18933
19179
|
check_type(argname="argument internet_facing", value=internet_facing, expected_type=type_hints["internet_facing"])
|
|
18934
19180
|
check_type(argname="argument load_balancer_name", value=load_balancer_name, expected_type=type_hints["load_balancer_name"])
|
|
18935
19181
|
check_type(argname="argument vpc_subnets", value=vpc_subnets, expected_type=type_hints["vpc_subnets"])
|
|
19182
|
+
check_type(argname="argument client_keep_alive", value=client_keep_alive, expected_type=type_hints["client_keep_alive"])
|
|
18936
19183
|
check_type(argname="argument desync_mitigation_mode", value=desync_mitigation_mode, expected_type=type_hints["desync_mitigation_mode"])
|
|
18937
19184
|
check_type(argname="argument drop_invalid_header_fields", value=drop_invalid_header_fields, expected_type=type_hints["drop_invalid_header_fields"])
|
|
18938
19185
|
check_type(argname="argument http2_enabled", value=http2_enabled, expected_type=type_hints["http2_enabled"])
|
|
@@ -18942,14 +19189,20 @@ class ApplicationLoadBalancerProps(BaseLoadBalancerProps):
|
|
|
18942
19189
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
18943
19190
|
"vpc": vpc,
|
|
18944
19191
|
}
|
|
19192
|
+
if cross_zone_enabled is not None:
|
|
19193
|
+
self._values["cross_zone_enabled"] = cross_zone_enabled
|
|
18945
19194
|
if deletion_protection is not None:
|
|
18946
19195
|
self._values["deletion_protection"] = deletion_protection
|
|
19196
|
+
if deny_all_igw_traffic is not None:
|
|
19197
|
+
self._values["deny_all_igw_traffic"] = deny_all_igw_traffic
|
|
18947
19198
|
if internet_facing is not None:
|
|
18948
19199
|
self._values["internet_facing"] = internet_facing
|
|
18949
19200
|
if load_balancer_name is not None:
|
|
18950
19201
|
self._values["load_balancer_name"] = load_balancer_name
|
|
18951
19202
|
if vpc_subnets is not None:
|
|
18952
19203
|
self._values["vpc_subnets"] = vpc_subnets
|
|
19204
|
+
if client_keep_alive is not None:
|
|
19205
|
+
self._values["client_keep_alive"] = client_keep_alive
|
|
18953
19206
|
if desync_mitigation_mode is not None:
|
|
18954
19207
|
self._values["desync_mitigation_mode"] = desync_mitigation_mode
|
|
18955
19208
|
if drop_invalid_header_fields is not None:
|
|
@@ -18970,6 +19223,15 @@ class ApplicationLoadBalancerProps(BaseLoadBalancerProps):
|
|
|
18970
19223
|
assert result is not None, "Required property 'vpc' is missing"
|
|
18971
19224
|
return typing.cast(_IVpc_f30d5663, result)
|
|
18972
19225
|
|
|
19226
|
+
@builtins.property
|
|
19227
|
+
def cross_zone_enabled(self) -> typing.Optional[builtins.bool]:
|
|
19228
|
+
'''Indicates whether cross-zone load balancing is enabled.
|
|
19229
|
+
|
|
19230
|
+
:default: - false for Network Load Balancers and true for Application Load Balancers.
|
|
19231
|
+
'''
|
|
19232
|
+
result = self._values.get("cross_zone_enabled")
|
|
19233
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
19234
|
+
|
|
18973
19235
|
@builtins.property
|
|
18974
19236
|
def deletion_protection(self) -> typing.Optional[builtins.bool]:
|
|
18975
19237
|
'''Indicates whether deletion protection is enabled.
|
|
@@ -18979,6 +19241,15 @@ class ApplicationLoadBalancerProps(BaseLoadBalancerProps):
|
|
|
18979
19241
|
result = self._values.get("deletion_protection")
|
|
18980
19242
|
return typing.cast(typing.Optional[builtins.bool], result)
|
|
18981
19243
|
|
|
19244
|
+
@builtins.property
|
|
19245
|
+
def deny_all_igw_traffic(self) -> typing.Optional[builtins.bool]:
|
|
19246
|
+
'''Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW).
|
|
19247
|
+
|
|
19248
|
+
:default: - false for internet-facing load balancers and true for internal load balancers
|
|
19249
|
+
'''
|
|
19250
|
+
result = self._values.get("deny_all_igw_traffic")
|
|
19251
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
19252
|
+
|
|
18982
19253
|
@builtins.property
|
|
18983
19254
|
def internet_facing(self) -> typing.Optional[builtins.bool]:
|
|
18984
19255
|
'''Whether the load balancer has an internet-routable address.
|
|
@@ -19006,6 +19277,17 @@ class ApplicationLoadBalancerProps(BaseLoadBalancerProps):
|
|
|
19006
19277
|
result = self._values.get("vpc_subnets")
|
|
19007
19278
|
return typing.cast(typing.Optional[_SubnetSelection_e57d76df], result)
|
|
19008
19279
|
|
|
19280
|
+
@builtins.property
|
|
19281
|
+
def client_keep_alive(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
19282
|
+
'''The client keep alive duration.
|
|
19283
|
+
|
|
19284
|
+
The valid range is 60 to 604800 seconds (1 minute to 7 days).
|
|
19285
|
+
|
|
19286
|
+
:default: - Duration.seconds(3600)
|
|
19287
|
+
'''
|
|
19288
|
+
result = self._values.get("client_keep_alive")
|
|
19289
|
+
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
19290
|
+
|
|
19009
19291
|
@builtins.property
|
|
19010
19292
|
def desync_mitigation_mode(self) -> typing.Optional[DesyncMitigationMode]:
|
|
19011
19293
|
'''Determines how the load balancer handles requests that might pose a security risk to your application.
|
|
@@ -19132,20 +19414,15 @@ class ApplicationTargetGroupProps(BaseTargetGroupProps):
|
|
|
19132
19414
|
# vpc: ec2.Vpc
|
|
19133
19415
|
|
|
19134
19416
|
|
|
19135
|
-
|
|
19136
|
-
|
|
19137
|
-
|
|
19138
|
-
|
|
19139
|
-
|
|
19140
|
-
|
|
19141
|
-
|
|
19142
|
-
|
|
19143
|
-
|
|
19144
|
-
tg2 = elbv2.ApplicationTargetGroup(self, "TG2",
|
|
19145
|
-
target_type=elbv2.TargetType.INSTANCE,
|
|
19146
|
-
port=80,
|
|
19147
|
-
stickiness_cookie_duration=Duration.minutes(5),
|
|
19148
|
-
stickiness_cookie_name="MyDeliciousCookie",
|
|
19417
|
+
tg = elbv2.ApplicationTargetGroup(self, "TG",
|
|
19418
|
+
target_type=elbv2.TargetType.IP,
|
|
19419
|
+
port=50051,
|
|
19420
|
+
protocol=elbv2.ApplicationProtocol.HTTP,
|
|
19421
|
+
protocol_version=elbv2.ApplicationProtocolVersion.GRPC,
|
|
19422
|
+
health_check=elbv2.HealthCheck(
|
|
19423
|
+
enabled=True,
|
|
19424
|
+
healthy_grpc_codes="0-99"
|
|
19425
|
+
),
|
|
19149
19426
|
vpc=vpc
|
|
19150
19427
|
)
|
|
19151
19428
|
'''
|
|
@@ -20971,6 +21248,7 @@ class ApplicationLoadBalancer(
|
|
|
20971
21248
|
scope: _constructs_77d1e7e8.Construct,
|
|
20972
21249
|
id: builtins.str,
|
|
20973
21250
|
*,
|
|
21251
|
+
client_keep_alive: typing.Optional[_Duration_4839e8c3] = None,
|
|
20974
21252
|
desync_mitigation_mode: typing.Optional[DesyncMitigationMode] = None,
|
|
20975
21253
|
drop_invalid_header_fields: typing.Optional[builtins.bool] = None,
|
|
20976
21254
|
http2_enabled: typing.Optional[builtins.bool] = None,
|
|
@@ -20978,7 +21256,9 @@ class ApplicationLoadBalancer(
|
|
|
20978
21256
|
ip_address_type: typing.Optional[IpAddressType] = None,
|
|
20979
21257
|
security_group: typing.Optional[_ISecurityGroup_acf8a799] = None,
|
|
20980
21258
|
vpc: _IVpc_f30d5663,
|
|
21259
|
+
cross_zone_enabled: typing.Optional[builtins.bool] = None,
|
|
20981
21260
|
deletion_protection: typing.Optional[builtins.bool] = None,
|
|
21261
|
+
deny_all_igw_traffic: typing.Optional[builtins.bool] = None,
|
|
20982
21262
|
internet_facing: typing.Optional[builtins.bool] = None,
|
|
20983
21263
|
load_balancer_name: typing.Optional[builtins.str] = None,
|
|
20984
21264
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
@@ -20986,6 +21266,7 @@ class ApplicationLoadBalancer(
|
|
|
20986
21266
|
'''
|
|
20987
21267
|
:param scope: -
|
|
20988
21268
|
:param id: -
|
|
21269
|
+
:param client_keep_alive: The client keep alive duration. The valid range is 60 to 604800 seconds (1 minute to 7 days). Default: - Duration.seconds(3600)
|
|
20989
21270
|
:param desync_mitigation_mode: Determines how the load balancer handles requests that might pose a security risk to your application. Default: DesyncMitigationMode.DEFENSIVE
|
|
20990
21271
|
:param drop_invalid_header_fields: Indicates whether HTTP headers with invalid header fields are removed by the load balancer (true) or routed to targets (false). Default: false
|
|
20991
21272
|
:param http2_enabled: Indicates whether HTTP/2 is enabled. Default: true
|
|
@@ -20993,7 +21274,9 @@ class ApplicationLoadBalancer(
|
|
|
20993
21274
|
:param ip_address_type: The type of IP addresses to use. Default: IpAddressType.IPV4
|
|
20994
21275
|
:param security_group: Security group to associate with this load balancer. Default: A security group is created
|
|
20995
21276
|
:param vpc: The VPC network to place the load balancer in.
|
|
21277
|
+
:param cross_zone_enabled: Indicates whether cross-zone load balancing is enabled. Default: - false for Network Load Balancers and true for Application Load Balancers.
|
|
20996
21278
|
:param deletion_protection: Indicates whether deletion protection is enabled. Default: false
|
|
21279
|
+
:param deny_all_igw_traffic: Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW). Default: - false for internet-facing load balancers and true for internal load balancers
|
|
20997
21280
|
:param internet_facing: Whether the load balancer has an internet-routable address. Default: false
|
|
20998
21281
|
:param load_balancer_name: Name of the load balancer. Default: - Automatically generated name.
|
|
20999
21282
|
:param vpc_subnets: Which subnets place the load balancer in. Default: - the Vpc default strategy.
|
|
@@ -21003,6 +21286,7 @@ class ApplicationLoadBalancer(
|
|
|
21003
21286
|
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
21004
21287
|
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
21005
21288
|
props = ApplicationLoadBalancerProps(
|
|
21289
|
+
client_keep_alive=client_keep_alive,
|
|
21006
21290
|
desync_mitigation_mode=desync_mitigation_mode,
|
|
21007
21291
|
drop_invalid_header_fields=drop_invalid_header_fields,
|
|
21008
21292
|
http2_enabled=http2_enabled,
|
|
@@ -21010,7 +21294,9 @@ class ApplicationLoadBalancer(
|
|
|
21010
21294
|
ip_address_type=ip_address_type,
|
|
21011
21295
|
security_group=security_group,
|
|
21012
21296
|
vpc=vpc,
|
|
21297
|
+
cross_zone_enabled=cross_zone_enabled,
|
|
21013
21298
|
deletion_protection=deletion_protection,
|
|
21299
|
+
deny_all_igw_traffic=deny_all_igw_traffic,
|
|
21014
21300
|
internet_facing=internet_facing,
|
|
21015
21301
|
load_balancer_name=load_balancer_name,
|
|
21016
21302
|
vpc_subnets=vpc_subnets,
|
|
@@ -22908,6 +23194,7 @@ __all__ = [
|
|
|
22908
23194
|
"CfnTrustStoreProps",
|
|
22909
23195
|
"CfnTrustStoreRevocation",
|
|
22910
23196
|
"CfnTrustStoreRevocationProps",
|
|
23197
|
+
"ClientRoutingPolicy",
|
|
22911
23198
|
"DesyncMitigationMode",
|
|
22912
23199
|
"FixedResponseOptions",
|
|
22913
23200
|
"ForwardOptions",
|
|
@@ -23157,7 +23444,9 @@ def _typecheckingstub__c636cf30c7688e65af48df2d228f5c138bd07b3c256c82b3692388fb2
|
|
|
23157
23444
|
def _typecheckingstub__36614588a5e075aa6e7ea0a4d41053b09874f2590b227cd5d62f3429901282f2(
|
|
23158
23445
|
*,
|
|
23159
23446
|
vpc: _IVpc_f30d5663,
|
|
23447
|
+
cross_zone_enabled: typing.Optional[builtins.bool] = None,
|
|
23160
23448
|
deletion_protection: typing.Optional[builtins.bool] = None,
|
|
23449
|
+
deny_all_igw_traffic: typing.Optional[builtins.bool] = None,
|
|
23161
23450
|
internet_facing: typing.Optional[builtins.bool] = None,
|
|
23162
23451
|
load_balancer_name: typing.Optional[builtins.str] = None,
|
|
23163
23452
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
@@ -24446,11 +24735,14 @@ def _typecheckingstub__e1c7a4c1332bdc807d1e25aa5d69eea6e1f3bf6a88ddd30dac9a64c93
|
|
|
24446
24735
|
scope: _constructs_77d1e7e8.Construct,
|
|
24447
24736
|
id: builtins.str,
|
|
24448
24737
|
*,
|
|
24449
|
-
|
|
24738
|
+
client_routing_policy: typing.Optional[ClientRoutingPolicy] = None,
|
|
24739
|
+
enforce_security_group_inbound_rules_on_private_link_traffic: typing.Optional[builtins.bool] = None,
|
|
24450
24740
|
ip_address_type: typing.Optional[IpAddressType] = None,
|
|
24451
24741
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
24452
24742
|
vpc: _IVpc_f30d5663,
|
|
24743
|
+
cross_zone_enabled: typing.Optional[builtins.bool] = None,
|
|
24453
24744
|
deletion_protection: typing.Optional[builtins.bool] = None,
|
|
24745
|
+
deny_all_igw_traffic: typing.Optional[builtins.bool] = None,
|
|
24454
24746
|
internet_facing: typing.Optional[builtins.bool] = None,
|
|
24455
24747
|
load_balancer_name: typing.Optional[builtins.str] = None,
|
|
24456
24748
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
@@ -24538,11 +24830,14 @@ def _typecheckingstub__d4dc8b446f6caacf313a46c99f00148ea8982b0018d14d0f1d5004245
|
|
|
24538
24830
|
def _typecheckingstub__195ab659ca9cd1c401d6d2d1a1f5cb0aaf7dd80f06dbc724020ac0cc391d75da(
|
|
24539
24831
|
*,
|
|
24540
24832
|
vpc: _IVpc_f30d5663,
|
|
24833
|
+
cross_zone_enabled: typing.Optional[builtins.bool] = None,
|
|
24541
24834
|
deletion_protection: typing.Optional[builtins.bool] = None,
|
|
24835
|
+
deny_all_igw_traffic: typing.Optional[builtins.bool] = None,
|
|
24542
24836
|
internet_facing: typing.Optional[builtins.bool] = None,
|
|
24543
24837
|
load_balancer_name: typing.Optional[builtins.str] = None,
|
|
24544
24838
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
24545
|
-
|
|
24839
|
+
client_routing_policy: typing.Optional[ClientRoutingPolicy] = None,
|
|
24840
|
+
enforce_security_group_inbound_rules_on_private_link_traffic: typing.Optional[builtins.bool] = None,
|
|
24546
24841
|
ip_address_type: typing.Optional[IpAddressType] = None,
|
|
24547
24842
|
security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
|
|
24548
24843
|
) -> None:
|
|
@@ -24722,10 +25017,13 @@ def _typecheckingstub__5e4d185ab2bd554850b96481b3fbdc7ee1a86c97629f1b0fd835c6f72
|
|
|
24722
25017
|
def _typecheckingstub__e43cf75024913d9be0d5d621a5f2c2c7be60a57898a54967cd54179b2b3d1584(
|
|
24723
25018
|
*,
|
|
24724
25019
|
vpc: _IVpc_f30d5663,
|
|
25020
|
+
cross_zone_enabled: typing.Optional[builtins.bool] = None,
|
|
24725
25021
|
deletion_protection: typing.Optional[builtins.bool] = None,
|
|
25022
|
+
deny_all_igw_traffic: typing.Optional[builtins.bool] = None,
|
|
24726
25023
|
internet_facing: typing.Optional[builtins.bool] = None,
|
|
24727
25024
|
load_balancer_name: typing.Optional[builtins.str] = None,
|
|
24728
25025
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
25026
|
+
client_keep_alive: typing.Optional[_Duration_4839e8c3] = None,
|
|
24729
25027
|
desync_mitigation_mode: typing.Optional[DesyncMitigationMode] = None,
|
|
24730
25028
|
drop_invalid_header_fields: typing.Optional[builtins.bool] = None,
|
|
24731
25029
|
http2_enabled: typing.Optional[builtins.bool] = None,
|
|
@@ -25075,6 +25373,7 @@ def _typecheckingstub__22d249b6cdbe3ce0dfc1a873ef276c65fe89ce6a5dba0603fae0a5755
|
|
|
25075
25373
|
scope: _constructs_77d1e7e8.Construct,
|
|
25076
25374
|
id: builtins.str,
|
|
25077
25375
|
*,
|
|
25376
|
+
client_keep_alive: typing.Optional[_Duration_4839e8c3] = None,
|
|
25078
25377
|
desync_mitigation_mode: typing.Optional[DesyncMitigationMode] = None,
|
|
25079
25378
|
drop_invalid_header_fields: typing.Optional[builtins.bool] = None,
|
|
25080
25379
|
http2_enabled: typing.Optional[builtins.bool] = None,
|
|
@@ -25082,7 +25381,9 @@ def _typecheckingstub__22d249b6cdbe3ce0dfc1a873ef276c65fe89ce6a5dba0603fae0a5755
|
|
|
25082
25381
|
ip_address_type: typing.Optional[IpAddressType] = None,
|
|
25083
25382
|
security_group: typing.Optional[_ISecurityGroup_acf8a799] = None,
|
|
25084
25383
|
vpc: _IVpc_f30d5663,
|
|
25384
|
+
cross_zone_enabled: typing.Optional[builtins.bool] = None,
|
|
25085
25385
|
deletion_protection: typing.Optional[builtins.bool] = None,
|
|
25386
|
+
deny_all_igw_traffic: typing.Optional[builtins.bool] = None,
|
|
25086
25387
|
internet_facing: typing.Optional[builtins.bool] = None,
|
|
25087
25388
|
load_balancer_name: typing.Optional[builtins.str] = None,
|
|
25088
25389
|
vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
|