aws-cdk-lib 2.128.0__py3-none-any.whl → 2.130.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 +2 -10
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.128.0.jsii.tgz → aws-cdk-lib@2.130.0.jsii.tgz} +0 -0
- aws_cdk/aws_amazonmq/__init__.py +6 -24
- aws_cdk/aws_amplify/__init__.py +1 -2
- aws_cdk/aws_appconfig/__init__.py +13010 -2708
- aws_cdk/aws_applicationautoscaling/__init__.py +55 -22
- aws_cdk/aws_appstream/__init__.py +14 -14
- aws_cdk/aws_appsync/__init__.py +334 -3
- aws_cdk/aws_autoscaling/__init__.py +11 -7
- aws_cdk/aws_backup/__init__.py +3 -3
- aws_cdk/aws_batch/__init__.py +137 -16
- aws_cdk/aws_bedrock/__init__.py +13 -1
- aws_cdk/aws_cleanrooms/__init__.py +1 -2
- aws_cdk/aws_cloudformation/__init__.py +2 -10
- aws_cdk/aws_cloudfront/__init__.py +15 -8
- aws_cdk/aws_cloudfront/experimental/__init__.py +22 -0
- aws_cdk/aws_cloudfront_origins/__init__.py +332 -0
- aws_cdk/aws_cloudtrail/__init__.py +12 -2
- aws_cdk/aws_cloudwatch/__init__.py +4 -0
- aws_cdk/aws_codepipeline/__init__.py +463 -11
- aws_cdk/aws_cognito/__init__.py +0 -9
- aws_cdk/aws_config/__init__.py +2 -2
- aws_cdk/aws_connect/__init__.py +6 -1
- aws_cdk/aws_controltower/__init__.py +527 -7
- aws_cdk/aws_datasync/__init__.py +2 -2
- aws_cdk/aws_directoryservice/__init__.py +2 -3
- aws_cdk/aws_dynamodb/__init__.py +7 -0
- aws_cdk/aws_ec2/__init__.py +117 -210
- aws_cdk/aws_ecs/__init__.py +537 -3
- aws_cdk/aws_eks/__init__.py +2 -2
- aws_cdk/aws_elasticache/__init__.py +27 -20
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +3 -4
- aws_cdk/aws_emr/__init__.py +23 -3
- aws_cdk/aws_events_targets/__init__.py +64 -20
- aws_cdk/aws_fis/__init__.py +4 -4
- aws_cdk/aws_frauddetector/__init__.py +3 -3
- aws_cdk/aws_globalaccelerator/__init__.py +2 -6
- aws_cdk/aws_glue/__init__.py +84 -55
- aws_cdk/aws_groundstation/__init__.py +8 -12
- aws_cdk/aws_guardduty/__init__.py +74 -70
- aws_cdk/aws_iam/__init__.py +16 -23
- aws_cdk/aws_imagebuilder/__init__.py +178 -156
- aws_cdk/aws_internetmonitor/__init__.py +12 -10
- aws_cdk/aws_iot/__init__.py +17 -10
- aws_cdk/aws_iotevents/__init__.py +4 -4
- aws_cdk/aws_iotfleetwise/__init__.py +10 -5
- aws_cdk/aws_iottwinmaker/__init__.py +3 -5
- aws_cdk/aws_iotwireless/__init__.py +35 -23
- aws_cdk/aws_kendra/__init__.py +36 -15
- aws_cdk/aws_kinesisfirehose/__init__.py +155 -114
- aws_cdk/aws_lambda/__init__.py +157 -12
- aws_cdk/aws_lambda_nodejs/__init__.py +22 -0
- aws_cdk/aws_lightsail/__init__.py +14 -18
- aws_cdk/aws_logs/__init__.py +15 -15
- aws_cdk/aws_mediaconnect/__init__.py +5 -3
- aws_cdk/aws_medialive/__init__.py +3 -12
- aws_cdk/aws_mediapackagev2/__init__.py +287 -286
- aws_cdk/aws_mediatailor/__init__.py +2 -2
- aws_cdk/aws_memorydb/__init__.py +2 -2
- aws_cdk/aws_msk/__init__.py +6 -3
- aws_cdk/aws_mwaa/__init__.py +10 -5
- aws_cdk/aws_neptunegraph/__init__.py +84 -66
- aws_cdk/aws_networkfirewall/__init__.py +5 -8
- aws_cdk/aws_networkmanager/__init__.py +3 -3
- aws_cdk/aws_nimblestudio/__init__.py +2 -4
- aws_cdk/aws_opensearchservice/__init__.py +12 -10
- aws_cdk/aws_osis/__init__.py +1 -3
- aws_cdk/aws_pinpoint/__init__.py +5 -5
- aws_cdk/aws_pipes/__init__.py +5 -5
- aws_cdk/aws_quicksight/__init__.py +5 -10
- aws_cdk/aws_rds/__init__.py +43 -26
- aws_cdk/aws_redshift/__init__.py +9 -5
- aws_cdk/aws_redshiftserverless/__init__.py +62 -38
- aws_cdk/aws_rolesanywhere/__init__.py +41 -53
- aws_cdk/aws_route53/__init__.py +532 -6
- aws_cdk/aws_route53recoverycontrol/__init__.py +1 -3
- aws_cdk/aws_route53recoveryreadiness/__init__.py +2 -2
- aws_cdk/aws_route53resolver/__init__.py +1 -4
- aws_cdk/aws_s3/__init__.py +3 -1
- aws_cdk/aws_s3objectlambda/__init__.py +7 -4
- aws_cdk/aws_s3outposts/__init__.py +1 -1
- aws_cdk/aws_sagemaker/__init__.py +111 -11
- aws_cdk/aws_servicecatalogappregistry/__init__.py +3 -3
- aws_cdk/aws_sns/__init__.py +185 -38
- aws_cdk/aws_ssm/__init__.py +16 -16
- aws_cdk/aws_ssmincidents/__init__.py +1 -1
- aws_cdk/aws_synthetics/__init__.py +94 -21
- aws_cdk/aws_verifiedpermissions/__init__.py +1 -2
- aws_cdk/aws_vpclattice/__init__.py +8 -4
- aws_cdk/aws_wafv2/__init__.py +14 -59
- aws_cdk/aws_workspaces/__init__.py +5 -4
- aws_cdk/aws_workspacesweb/__init__.py +6 -12
- aws_cdk/pipelines/__init__.py +3 -2
- aws_cdk/triggers/__init__.py +22 -0
- {aws_cdk_lib-2.128.0.dist-info → aws_cdk_lib-2.130.0.dist-info}/METADATA +1 -1
- {aws_cdk_lib-2.128.0.dist-info → aws_cdk_lib-2.130.0.dist-info}/NOTICE +30 -0
- {aws_cdk_lib-2.128.0.dist-info → aws_cdk_lib-2.130.0.dist-info}/RECORD +101 -101
- {aws_cdk_lib-2.128.0.dist-info → aws_cdk_lib-2.130.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.128.0.dist-info → aws_cdk_lib-2.130.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.128.0.dist-info → aws_cdk_lib-2.130.0.dist-info}/top_level.txt +0 -0
|
@@ -150,6 +150,7 @@ class EdgeFunction(
|
|
|
150
150
|
function_name: typing.Optional[builtins.str] = None,
|
|
151
151
|
initial_policy: typing.Optional[typing.Sequence[_PolicyStatement_0fe33853]] = None,
|
|
152
152
|
insights_version: typing.Optional[_LambdaInsightsVersion_9dfbfef9] = None,
|
|
153
|
+
ipv6_allowed_for_dual_stack: typing.Optional[builtins.bool] = None,
|
|
153
154
|
layers: typing.Optional[typing.Sequence[_ILayerVersion_5ac127c8]] = None,
|
|
154
155
|
log_format: typing.Optional[builtins.str] = None,
|
|
155
156
|
logging_format: typing.Optional[_LoggingFormat_30be8e01] = None,
|
|
@@ -202,6 +203,7 @@ class EdgeFunction(
|
|
|
202
203
|
:param function_name: A name for the function. Default: - AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. For more information, see Name Type.
|
|
203
204
|
:param initial_policy: Initial policy statements to add to the created Lambda Role. You can call ``addToRolePolicy`` to the created lambda to add statements post creation. Default: - No policy statements are added to the created Lambda role.
|
|
204
205
|
:param insights_version: Specify the version of CloudWatch Lambda insights to use for monitoring. Default: - No Lambda Insights
|
|
206
|
+
:param ipv6_allowed_for_dual_stack: Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. Only used if 'vpc' is supplied. Default: false
|
|
205
207
|
:param layers: A list of layers to add to the function's execution environment. You can configure your Lambda function to pull in additional code during initialization in the form of layers. Layers are packages of libraries or other dependencies that can be used by multiple functions. Default: - No layers.
|
|
206
208
|
:param log_format: Sets the logFormat for the function. Default: "Text"
|
|
207
209
|
:param logging_format: Sets the loggingFormat for the function. Default: LoggingFormat.TEXT
|
|
@@ -256,6 +258,7 @@ class EdgeFunction(
|
|
|
256
258
|
function_name=function_name,
|
|
257
259
|
initial_policy=initial_policy,
|
|
258
260
|
insights_version=insights_version,
|
|
261
|
+
ipv6_allowed_for_dual_stack=ipv6_allowed_for_dual_stack,
|
|
259
262
|
layers=layers,
|
|
260
263
|
log_format=log_format,
|
|
261
264
|
logging_format=logging_format,
|
|
@@ -875,6 +878,7 @@ class EdgeFunction(
|
|
|
875
878
|
"function_name": "functionName",
|
|
876
879
|
"initial_policy": "initialPolicy",
|
|
877
880
|
"insights_version": "insightsVersion",
|
|
881
|
+
"ipv6_allowed_for_dual_stack": "ipv6AllowedForDualStack",
|
|
878
882
|
"layers": "layers",
|
|
879
883
|
"log_format": "logFormat",
|
|
880
884
|
"logging_format": "loggingFormat",
|
|
@@ -929,6 +933,7 @@ class EdgeFunctionProps(_FunctionProps_a308e854):
|
|
|
929
933
|
function_name: typing.Optional[builtins.str] = None,
|
|
930
934
|
initial_policy: typing.Optional[typing.Sequence[_PolicyStatement_0fe33853]] = None,
|
|
931
935
|
insights_version: typing.Optional[_LambdaInsightsVersion_9dfbfef9] = None,
|
|
936
|
+
ipv6_allowed_for_dual_stack: typing.Optional[builtins.bool] = None,
|
|
932
937
|
layers: typing.Optional[typing.Sequence[_ILayerVersion_5ac127c8]] = None,
|
|
933
938
|
log_format: typing.Optional[builtins.str] = None,
|
|
934
939
|
logging_format: typing.Optional[_LoggingFormat_30be8e01] = None,
|
|
@@ -980,6 +985,7 @@ class EdgeFunctionProps(_FunctionProps_a308e854):
|
|
|
980
985
|
:param function_name: A name for the function. Default: - AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. For more information, see Name Type.
|
|
981
986
|
:param initial_policy: Initial policy statements to add to the created Lambda Role. You can call ``addToRolePolicy`` to the created lambda to add statements post creation. Default: - No policy statements are added to the created Lambda role.
|
|
982
987
|
:param insights_version: Specify the version of CloudWatch Lambda insights to use for monitoring. Default: - No Lambda Insights
|
|
988
|
+
:param ipv6_allowed_for_dual_stack: Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. Only used if 'vpc' is supplied. Default: false
|
|
983
989
|
:param layers: A list of layers to add to the function's execution environment. You can configure your Lambda function to pull in additional code during initialization in the form of layers. Layers are packages of libraries or other dependencies that can be used by multiple functions. Default: - No layers.
|
|
984
990
|
:param log_format: Sets the logFormat for the function. Default: "Text"
|
|
985
991
|
:param logging_format: Sets the loggingFormat for the function. Default: LoggingFormat.TEXT
|
|
@@ -1062,6 +1068,7 @@ class EdgeFunctionProps(_FunctionProps_a308e854):
|
|
|
1062
1068
|
check_type(argname="argument function_name", value=function_name, expected_type=type_hints["function_name"])
|
|
1063
1069
|
check_type(argname="argument initial_policy", value=initial_policy, expected_type=type_hints["initial_policy"])
|
|
1064
1070
|
check_type(argname="argument insights_version", value=insights_version, expected_type=type_hints["insights_version"])
|
|
1071
|
+
check_type(argname="argument ipv6_allowed_for_dual_stack", value=ipv6_allowed_for_dual_stack, expected_type=type_hints["ipv6_allowed_for_dual_stack"])
|
|
1065
1072
|
check_type(argname="argument layers", value=layers, expected_type=type_hints["layers"])
|
|
1066
1073
|
check_type(argname="argument log_format", value=log_format, expected_type=type_hints["log_format"])
|
|
1067
1074
|
check_type(argname="argument logging_format", value=logging_format, expected_type=type_hints["logging_format"])
|
|
@@ -1138,6 +1145,8 @@ class EdgeFunctionProps(_FunctionProps_a308e854):
|
|
|
1138
1145
|
self._values["initial_policy"] = initial_policy
|
|
1139
1146
|
if insights_version is not None:
|
|
1140
1147
|
self._values["insights_version"] = insights_version
|
|
1148
|
+
if ipv6_allowed_for_dual_stack is not None:
|
|
1149
|
+
self._values["ipv6_allowed_for_dual_stack"] = ipv6_allowed_for_dual_stack
|
|
1141
1150
|
if layers is not None:
|
|
1142
1151
|
self._values["layers"] = layers
|
|
1143
1152
|
if log_format is not None:
|
|
@@ -1433,6 +1442,17 @@ class EdgeFunctionProps(_FunctionProps_a308e854):
|
|
|
1433
1442
|
result = self._values.get("insights_version")
|
|
1434
1443
|
return typing.cast(typing.Optional[_LambdaInsightsVersion_9dfbfef9], result)
|
|
1435
1444
|
|
|
1445
|
+
@builtins.property
|
|
1446
|
+
def ipv6_allowed_for_dual_stack(self) -> typing.Optional[builtins.bool]:
|
|
1447
|
+
'''Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.
|
|
1448
|
+
|
|
1449
|
+
Only used if 'vpc' is supplied.
|
|
1450
|
+
|
|
1451
|
+
:default: false
|
|
1452
|
+
'''
|
|
1453
|
+
result = self._values.get("ipv6_allowed_for_dual_stack")
|
|
1454
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
1455
|
+
|
|
1436
1456
|
@builtins.property
|
|
1437
1457
|
def layers(self) -> typing.Optional[typing.List[_ILayerVersion_5ac127c8]]:
|
|
1438
1458
|
'''A list of layers to add to the function's execution environment.
|
|
@@ -1809,6 +1829,7 @@ def _typecheckingstub__b2f96e5632f259adb036f7aba2bbc7c19fd9840c647d67a10a8135cb3
|
|
|
1809
1829
|
function_name: typing.Optional[builtins.str] = None,
|
|
1810
1830
|
initial_policy: typing.Optional[typing.Sequence[_PolicyStatement_0fe33853]] = None,
|
|
1811
1831
|
insights_version: typing.Optional[_LambdaInsightsVersion_9dfbfef9] = None,
|
|
1832
|
+
ipv6_allowed_for_dual_stack: typing.Optional[builtins.bool] = None,
|
|
1812
1833
|
layers: typing.Optional[typing.Sequence[_ILayerVersion_5ac127c8]] = None,
|
|
1813
1834
|
log_format: typing.Optional[builtins.str] = None,
|
|
1814
1835
|
logging_format: typing.Optional[_LoggingFormat_30be8e01] = None,
|
|
@@ -1964,6 +1985,7 @@ def _typecheckingstub__709cdcb05c7a5fc7f7bcd1d72557097c39c5c534076a00b6b8db807bd
|
|
|
1964
1985
|
function_name: typing.Optional[builtins.str] = None,
|
|
1965
1986
|
initial_policy: typing.Optional[typing.Sequence[_PolicyStatement_0fe33853]] = None,
|
|
1966
1987
|
insights_version: typing.Optional[_LambdaInsightsVersion_9dfbfef9] = None,
|
|
1988
|
+
ipv6_allowed_for_dual_stack: typing.Optional[builtins.bool] = None,
|
|
1967
1989
|
layers: typing.Optional[typing.Sequence[_ILayerVersion_5ac127c8]] = None,
|
|
1968
1990
|
log_format: typing.Optional[builtins.str] = None,
|
|
1969
1991
|
logging_format: typing.Optional[_LoggingFormat_30be8e01] = None,
|
|
@@ -135,6 +135,22 @@ cloudfront.Distribution(self, "Distribution",
|
|
|
135
135
|
default_behavior=cloudfront.BehaviorOptions(origin=origins.RestApiOrigin(api, origin_path="/custom-origin-path"))
|
|
136
136
|
)
|
|
137
137
|
```
|
|
138
|
+
|
|
139
|
+
## From a Lambda Function URL
|
|
140
|
+
|
|
141
|
+
Lambda Function URLs enable direct invocation of Lambda functions via HTTP(S), without intermediaries. They can be set as CloudFront origins for streamlined function execution behind a CDN, leveraging caching and custom domains.
|
|
142
|
+
|
|
143
|
+
```python
|
|
144
|
+
import aws_cdk.aws_lambda as lambda_
|
|
145
|
+
|
|
146
|
+
# fn: lambda.Function
|
|
147
|
+
|
|
148
|
+
fn_url = fn.add_function_url(auth_type=lambda_.FunctionUrlAuthType.NONE)
|
|
149
|
+
|
|
150
|
+
cloudfront.Distribution(self, "Distribution",
|
|
151
|
+
default_behavior=cloudfront.BehaviorOptions(origin=origins.FunctionUrlOrigin(fn_url))
|
|
152
|
+
)
|
|
153
|
+
```
|
|
138
154
|
'''
|
|
139
155
|
import abc
|
|
140
156
|
import builtins
|
|
@@ -165,9 +181,292 @@ from ..aws_cloudfront import (
|
|
|
165
181
|
OriginSslPolicy as _OriginSslPolicy_d65cede2,
|
|
166
182
|
)
|
|
167
183
|
from ..aws_elasticloadbalancingv2 import ILoadBalancerV2 as _ILoadBalancerV2_4c5c0fbb
|
|
184
|
+
from ..aws_lambda import IFunctionUrl as _IFunctionUrl_1a74cd94
|
|
168
185
|
from ..aws_s3 import IBucket as _IBucket_42e086fd
|
|
169
186
|
|
|
170
187
|
|
|
188
|
+
class FunctionUrlOrigin(
|
|
189
|
+
_OriginBase_b8fe5bcc,
|
|
190
|
+
metaclass=jsii.JSIIMeta,
|
|
191
|
+
jsii_type="aws-cdk-lib.aws_cloudfront_origins.FunctionUrlOrigin",
|
|
192
|
+
):
|
|
193
|
+
'''An Origin for a Lambda Function URL.
|
|
194
|
+
|
|
195
|
+
:exampleMetadata: infused
|
|
196
|
+
|
|
197
|
+
Example::
|
|
198
|
+
|
|
199
|
+
import aws_cdk.aws_lambda as lambda_
|
|
200
|
+
|
|
201
|
+
# fn: lambda.Function
|
|
202
|
+
|
|
203
|
+
fn_url = fn.add_function_url(auth_type=lambda_.FunctionUrlAuthType.NONE)
|
|
204
|
+
|
|
205
|
+
cloudfront.Distribution(self, "Distribution",
|
|
206
|
+
default_behavior=cloudfront.BehaviorOptions(origin=origins.FunctionUrlOrigin(fn_url))
|
|
207
|
+
)
|
|
208
|
+
'''
|
|
209
|
+
|
|
210
|
+
def __init__(
|
|
211
|
+
self,
|
|
212
|
+
lambda_function_url: _IFunctionUrl_1a74cd94,
|
|
213
|
+
*,
|
|
214
|
+
keepalive_timeout: typing.Optional[_Duration_4839e8c3] = None,
|
|
215
|
+
read_timeout: typing.Optional[_Duration_4839e8c3] = None,
|
|
216
|
+
origin_path: typing.Optional[builtins.str] = None,
|
|
217
|
+
connection_attempts: typing.Optional[jsii.Number] = None,
|
|
218
|
+
connection_timeout: typing.Optional[_Duration_4839e8c3] = None,
|
|
219
|
+
custom_headers: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
220
|
+
origin_id: typing.Optional[builtins.str] = None,
|
|
221
|
+
origin_shield_enabled: typing.Optional[builtins.bool] = None,
|
|
222
|
+
origin_shield_region: typing.Optional[builtins.str] = None,
|
|
223
|
+
) -> None:
|
|
224
|
+
'''
|
|
225
|
+
:param lambda_function_url: -
|
|
226
|
+
:param keepalive_timeout: Specifies how long, in seconds, CloudFront persists its connection to the origin. The valid range is from 1 to 180 seconds, inclusive. Note that values over 60 seconds are possible only after a limit increase request for the origin response timeout quota has been approved in the target account; otherwise, values over 60 seconds will produce an error at deploy time. Default: Duration.seconds(5)
|
|
227
|
+
:param read_timeout: Specifies how long, in seconds, CloudFront waits for a response from the origin. The valid range is from 1 to 180 seconds, inclusive. Note that values over 60 seconds are possible only after a limit increase request for the origin response timeout quota has been approved in the target account; otherwise, values over 60 seconds will produce an error at deploy time. Default: Duration.seconds(30)
|
|
228
|
+
:param origin_path: An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin. Must begin, but not end, with '/' (e.g., '/production/images'). Default: '/'
|
|
229
|
+
:param connection_attempts: The number of times that CloudFront attempts to connect to the origin; valid values are 1, 2, or 3 attempts. Default: 3
|
|
230
|
+
:param connection_timeout: The number of seconds that CloudFront waits when trying to establish a connection to the origin. Valid values are 1-10 seconds, inclusive. Default: Duration.seconds(10)
|
|
231
|
+
:param custom_headers: A list of HTTP header names and values that CloudFront adds to requests it sends to the origin. Default: {}
|
|
232
|
+
:param origin_id: A unique identifier for the origin. This value must be unique within the distribution. Default: - an originid will be generated for you
|
|
233
|
+
:param origin_shield_enabled: Origin Shield is enabled by setting originShieldRegion to a valid region, after this to disable Origin Shield again you must set this flag to false. Default: - true
|
|
234
|
+
:param origin_shield_region: When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance. Default: - origin shield not enabled
|
|
235
|
+
'''
|
|
236
|
+
if __debug__:
|
|
237
|
+
type_hints = typing.get_type_hints(_typecheckingstub__fcda903697b26acfe2149a285d5a64619682b675affb52f4ae2d1aca46c8f1c3)
|
|
238
|
+
check_type(argname="argument lambda_function_url", value=lambda_function_url, expected_type=type_hints["lambda_function_url"])
|
|
239
|
+
props = FunctionUrlOriginProps(
|
|
240
|
+
keepalive_timeout=keepalive_timeout,
|
|
241
|
+
read_timeout=read_timeout,
|
|
242
|
+
origin_path=origin_path,
|
|
243
|
+
connection_attempts=connection_attempts,
|
|
244
|
+
connection_timeout=connection_timeout,
|
|
245
|
+
custom_headers=custom_headers,
|
|
246
|
+
origin_id=origin_id,
|
|
247
|
+
origin_shield_enabled=origin_shield_enabled,
|
|
248
|
+
origin_shield_region=origin_shield_region,
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
jsii.create(self.__class__, self, [lambda_function_url, props])
|
|
252
|
+
|
|
253
|
+
@jsii.member(jsii_name="renderCustomOriginConfig")
|
|
254
|
+
def _render_custom_origin_config(
|
|
255
|
+
self,
|
|
256
|
+
) -> typing.Optional[_CfnDistribution_d9ad3595.CustomOriginConfigProperty]:
|
|
257
|
+
return typing.cast(typing.Optional[_CfnDistribution_d9ad3595.CustomOriginConfigProperty], jsii.invoke(self, "renderCustomOriginConfig", []))
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
@jsii.data_type(
|
|
261
|
+
jsii_type="aws-cdk-lib.aws_cloudfront_origins.FunctionUrlOriginProps",
|
|
262
|
+
jsii_struct_bases=[_OriginProps_0675928d],
|
|
263
|
+
name_mapping={
|
|
264
|
+
"connection_attempts": "connectionAttempts",
|
|
265
|
+
"connection_timeout": "connectionTimeout",
|
|
266
|
+
"custom_headers": "customHeaders",
|
|
267
|
+
"origin_id": "originId",
|
|
268
|
+
"origin_shield_enabled": "originShieldEnabled",
|
|
269
|
+
"origin_shield_region": "originShieldRegion",
|
|
270
|
+
"origin_path": "originPath",
|
|
271
|
+
"keepalive_timeout": "keepaliveTimeout",
|
|
272
|
+
"read_timeout": "readTimeout",
|
|
273
|
+
},
|
|
274
|
+
)
|
|
275
|
+
class FunctionUrlOriginProps(_OriginProps_0675928d):
|
|
276
|
+
def __init__(
|
|
277
|
+
self,
|
|
278
|
+
*,
|
|
279
|
+
connection_attempts: typing.Optional[jsii.Number] = None,
|
|
280
|
+
connection_timeout: typing.Optional[_Duration_4839e8c3] = None,
|
|
281
|
+
custom_headers: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
282
|
+
origin_id: typing.Optional[builtins.str] = None,
|
|
283
|
+
origin_shield_enabled: typing.Optional[builtins.bool] = None,
|
|
284
|
+
origin_shield_region: typing.Optional[builtins.str] = None,
|
|
285
|
+
origin_path: typing.Optional[builtins.str] = None,
|
|
286
|
+
keepalive_timeout: typing.Optional[_Duration_4839e8c3] = None,
|
|
287
|
+
read_timeout: typing.Optional[_Duration_4839e8c3] = None,
|
|
288
|
+
) -> None:
|
|
289
|
+
'''Properties for a Lambda Function URL Origin.
|
|
290
|
+
|
|
291
|
+
:param connection_attempts: The number of times that CloudFront attempts to connect to the origin; valid values are 1, 2, or 3 attempts. Default: 3
|
|
292
|
+
:param connection_timeout: The number of seconds that CloudFront waits when trying to establish a connection to the origin. Valid values are 1-10 seconds, inclusive. Default: Duration.seconds(10)
|
|
293
|
+
:param custom_headers: A list of HTTP header names and values that CloudFront adds to requests it sends to the origin. Default: {}
|
|
294
|
+
:param origin_id: A unique identifier for the origin. This value must be unique within the distribution. Default: - an originid will be generated for you
|
|
295
|
+
:param origin_shield_enabled: Origin Shield is enabled by setting originShieldRegion to a valid region, after this to disable Origin Shield again you must set this flag to false. Default: - true
|
|
296
|
+
:param origin_shield_region: When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance. Default: - origin shield not enabled
|
|
297
|
+
:param origin_path: An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin. Must begin, but not end, with '/' (e.g., '/production/images'). Default: '/'
|
|
298
|
+
:param keepalive_timeout: Specifies how long, in seconds, CloudFront persists its connection to the origin. The valid range is from 1 to 180 seconds, inclusive. Note that values over 60 seconds are possible only after a limit increase request for the origin response timeout quota has been approved in the target account; otherwise, values over 60 seconds will produce an error at deploy time. Default: Duration.seconds(5)
|
|
299
|
+
:param read_timeout: Specifies how long, in seconds, CloudFront waits for a response from the origin. The valid range is from 1 to 180 seconds, inclusive. Note that values over 60 seconds are possible only after a limit increase request for the origin response timeout quota has been approved in the target account; otherwise, values over 60 seconds will produce an error at deploy time. Default: Duration.seconds(30)
|
|
300
|
+
|
|
301
|
+
:exampleMetadata: fixture=_generated
|
|
302
|
+
|
|
303
|
+
Example::
|
|
304
|
+
|
|
305
|
+
# The code below shows an example of how to instantiate this type.
|
|
306
|
+
# The values are placeholders you should change.
|
|
307
|
+
import aws_cdk as cdk
|
|
308
|
+
from aws_cdk import aws_cloudfront_origins as cloudfront_origins
|
|
309
|
+
|
|
310
|
+
function_url_origin_props = cloudfront_origins.FunctionUrlOriginProps(
|
|
311
|
+
connection_attempts=123,
|
|
312
|
+
connection_timeout=cdk.Duration.minutes(30),
|
|
313
|
+
custom_headers={
|
|
314
|
+
"custom_headers_key": "customHeaders"
|
|
315
|
+
},
|
|
316
|
+
keepalive_timeout=cdk.Duration.minutes(30),
|
|
317
|
+
origin_id="originId",
|
|
318
|
+
origin_path="originPath",
|
|
319
|
+
origin_shield_enabled=False,
|
|
320
|
+
origin_shield_region="originShieldRegion",
|
|
321
|
+
read_timeout=cdk.Duration.minutes(30)
|
|
322
|
+
)
|
|
323
|
+
'''
|
|
324
|
+
if __debug__:
|
|
325
|
+
type_hints = typing.get_type_hints(_typecheckingstub__56d340a9ac5dd93c6aa22cb98bcbc860fb23f8d247b53c2cd1a51ecd8406909a)
|
|
326
|
+
check_type(argname="argument connection_attempts", value=connection_attempts, expected_type=type_hints["connection_attempts"])
|
|
327
|
+
check_type(argname="argument connection_timeout", value=connection_timeout, expected_type=type_hints["connection_timeout"])
|
|
328
|
+
check_type(argname="argument custom_headers", value=custom_headers, expected_type=type_hints["custom_headers"])
|
|
329
|
+
check_type(argname="argument origin_id", value=origin_id, expected_type=type_hints["origin_id"])
|
|
330
|
+
check_type(argname="argument origin_shield_enabled", value=origin_shield_enabled, expected_type=type_hints["origin_shield_enabled"])
|
|
331
|
+
check_type(argname="argument origin_shield_region", value=origin_shield_region, expected_type=type_hints["origin_shield_region"])
|
|
332
|
+
check_type(argname="argument origin_path", value=origin_path, expected_type=type_hints["origin_path"])
|
|
333
|
+
check_type(argname="argument keepalive_timeout", value=keepalive_timeout, expected_type=type_hints["keepalive_timeout"])
|
|
334
|
+
check_type(argname="argument read_timeout", value=read_timeout, expected_type=type_hints["read_timeout"])
|
|
335
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
336
|
+
if connection_attempts is not None:
|
|
337
|
+
self._values["connection_attempts"] = connection_attempts
|
|
338
|
+
if connection_timeout is not None:
|
|
339
|
+
self._values["connection_timeout"] = connection_timeout
|
|
340
|
+
if custom_headers is not None:
|
|
341
|
+
self._values["custom_headers"] = custom_headers
|
|
342
|
+
if origin_id is not None:
|
|
343
|
+
self._values["origin_id"] = origin_id
|
|
344
|
+
if origin_shield_enabled is not None:
|
|
345
|
+
self._values["origin_shield_enabled"] = origin_shield_enabled
|
|
346
|
+
if origin_shield_region is not None:
|
|
347
|
+
self._values["origin_shield_region"] = origin_shield_region
|
|
348
|
+
if origin_path is not None:
|
|
349
|
+
self._values["origin_path"] = origin_path
|
|
350
|
+
if keepalive_timeout is not None:
|
|
351
|
+
self._values["keepalive_timeout"] = keepalive_timeout
|
|
352
|
+
if read_timeout is not None:
|
|
353
|
+
self._values["read_timeout"] = read_timeout
|
|
354
|
+
|
|
355
|
+
@builtins.property
|
|
356
|
+
def connection_attempts(self) -> typing.Optional[jsii.Number]:
|
|
357
|
+
'''The number of times that CloudFront attempts to connect to the origin;
|
|
358
|
+
|
|
359
|
+
valid values are 1, 2, or 3 attempts.
|
|
360
|
+
|
|
361
|
+
:default: 3
|
|
362
|
+
'''
|
|
363
|
+
result = self._values.get("connection_attempts")
|
|
364
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
365
|
+
|
|
366
|
+
@builtins.property
|
|
367
|
+
def connection_timeout(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
368
|
+
'''The number of seconds that CloudFront waits when trying to establish a connection to the origin.
|
|
369
|
+
|
|
370
|
+
Valid values are 1-10 seconds, inclusive.
|
|
371
|
+
|
|
372
|
+
:default: Duration.seconds(10)
|
|
373
|
+
'''
|
|
374
|
+
result = self._values.get("connection_timeout")
|
|
375
|
+
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
376
|
+
|
|
377
|
+
@builtins.property
|
|
378
|
+
def custom_headers(
|
|
379
|
+
self,
|
|
380
|
+
) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
|
|
381
|
+
'''A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.
|
|
382
|
+
|
|
383
|
+
:default: {}
|
|
384
|
+
'''
|
|
385
|
+
result = self._values.get("custom_headers")
|
|
386
|
+
return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
|
|
387
|
+
|
|
388
|
+
@builtins.property
|
|
389
|
+
def origin_id(self) -> typing.Optional[builtins.str]:
|
|
390
|
+
'''A unique identifier for the origin.
|
|
391
|
+
|
|
392
|
+
This value must be unique within the distribution.
|
|
393
|
+
|
|
394
|
+
:default: - an originid will be generated for you
|
|
395
|
+
'''
|
|
396
|
+
result = self._values.get("origin_id")
|
|
397
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
398
|
+
|
|
399
|
+
@builtins.property
|
|
400
|
+
def origin_shield_enabled(self) -> typing.Optional[builtins.bool]:
|
|
401
|
+
'''Origin Shield is enabled by setting originShieldRegion to a valid region, after this to disable Origin Shield again you must set this flag to false.
|
|
402
|
+
|
|
403
|
+
:default: - true
|
|
404
|
+
'''
|
|
405
|
+
result = self._values.get("origin_shield_enabled")
|
|
406
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
407
|
+
|
|
408
|
+
@builtins.property
|
|
409
|
+
def origin_shield_region(self) -> typing.Optional[builtins.str]:
|
|
410
|
+
'''When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.
|
|
411
|
+
|
|
412
|
+
:default: - origin shield not enabled
|
|
413
|
+
|
|
414
|
+
:see: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html
|
|
415
|
+
'''
|
|
416
|
+
result = self._values.get("origin_shield_region")
|
|
417
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
418
|
+
|
|
419
|
+
@builtins.property
|
|
420
|
+
def origin_path(self) -> typing.Optional[builtins.str]:
|
|
421
|
+
'''An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin.
|
|
422
|
+
|
|
423
|
+
Must begin, but not end, with '/' (e.g., '/production/images').
|
|
424
|
+
|
|
425
|
+
:default: '/'
|
|
426
|
+
'''
|
|
427
|
+
result = self._values.get("origin_path")
|
|
428
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
429
|
+
|
|
430
|
+
@builtins.property
|
|
431
|
+
def keepalive_timeout(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
432
|
+
'''Specifies how long, in seconds, CloudFront persists its connection to the origin.
|
|
433
|
+
|
|
434
|
+
The valid range is from 1 to 180 seconds, inclusive.
|
|
435
|
+
|
|
436
|
+
Note that values over 60 seconds are possible only after a limit increase request for the origin response timeout quota
|
|
437
|
+
has been approved in the target account; otherwise, values over 60 seconds will produce an error at deploy time.
|
|
438
|
+
|
|
439
|
+
:default: Duration.seconds(5)
|
|
440
|
+
'''
|
|
441
|
+
result = self._values.get("keepalive_timeout")
|
|
442
|
+
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
443
|
+
|
|
444
|
+
@builtins.property
|
|
445
|
+
def read_timeout(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
446
|
+
'''Specifies how long, in seconds, CloudFront waits for a response from the origin.
|
|
447
|
+
|
|
448
|
+
The valid range is from 1 to 180 seconds, inclusive.
|
|
449
|
+
|
|
450
|
+
Note that values over 60 seconds are possible only after a limit increase request for the origin response timeout quota
|
|
451
|
+
has been approved in the target account; otherwise, values over 60 seconds will produce an error at deploy time.
|
|
452
|
+
|
|
453
|
+
:default: Duration.seconds(30)
|
|
454
|
+
'''
|
|
455
|
+
result = self._values.get("read_timeout")
|
|
456
|
+
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
457
|
+
|
|
458
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
459
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
460
|
+
|
|
461
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
462
|
+
return not (rhs == self)
|
|
463
|
+
|
|
464
|
+
def __repr__(self) -> str:
|
|
465
|
+
return "FunctionUrlOriginProps(%s)" % ", ".join(
|
|
466
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
467
|
+
)
|
|
468
|
+
|
|
469
|
+
|
|
171
470
|
class HttpOrigin(
|
|
172
471
|
_OriginBase_b8fe5bcc,
|
|
173
472
|
metaclass=jsii.JSIIMeta,
|
|
@@ -1578,6 +1877,8 @@ class S3OriginProps(_OriginProps_0675928d):
|
|
|
1578
1877
|
|
|
1579
1878
|
|
|
1580
1879
|
__all__ = [
|
|
1880
|
+
"FunctionUrlOrigin",
|
|
1881
|
+
"FunctionUrlOriginProps",
|
|
1581
1882
|
"HttpOrigin",
|
|
1582
1883
|
"HttpOriginProps",
|
|
1583
1884
|
"LoadBalancerV2Origin",
|
|
@@ -1592,6 +1893,37 @@ __all__ = [
|
|
|
1592
1893
|
|
|
1593
1894
|
publication.publish()
|
|
1594
1895
|
|
|
1896
|
+
def _typecheckingstub__fcda903697b26acfe2149a285d5a64619682b675affb52f4ae2d1aca46c8f1c3(
|
|
1897
|
+
lambda_function_url: _IFunctionUrl_1a74cd94,
|
|
1898
|
+
*,
|
|
1899
|
+
keepalive_timeout: typing.Optional[_Duration_4839e8c3] = None,
|
|
1900
|
+
read_timeout: typing.Optional[_Duration_4839e8c3] = None,
|
|
1901
|
+
origin_path: typing.Optional[builtins.str] = None,
|
|
1902
|
+
connection_attempts: typing.Optional[jsii.Number] = None,
|
|
1903
|
+
connection_timeout: typing.Optional[_Duration_4839e8c3] = None,
|
|
1904
|
+
custom_headers: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
1905
|
+
origin_id: typing.Optional[builtins.str] = None,
|
|
1906
|
+
origin_shield_enabled: typing.Optional[builtins.bool] = None,
|
|
1907
|
+
origin_shield_region: typing.Optional[builtins.str] = None,
|
|
1908
|
+
) -> None:
|
|
1909
|
+
"""Type checking stubs"""
|
|
1910
|
+
pass
|
|
1911
|
+
|
|
1912
|
+
def _typecheckingstub__56d340a9ac5dd93c6aa22cb98bcbc860fb23f8d247b53c2cd1a51ecd8406909a(
|
|
1913
|
+
*,
|
|
1914
|
+
connection_attempts: typing.Optional[jsii.Number] = None,
|
|
1915
|
+
connection_timeout: typing.Optional[_Duration_4839e8c3] = None,
|
|
1916
|
+
custom_headers: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
1917
|
+
origin_id: typing.Optional[builtins.str] = None,
|
|
1918
|
+
origin_shield_enabled: typing.Optional[builtins.bool] = None,
|
|
1919
|
+
origin_shield_region: typing.Optional[builtins.str] = None,
|
|
1920
|
+
origin_path: typing.Optional[builtins.str] = None,
|
|
1921
|
+
keepalive_timeout: typing.Optional[_Duration_4839e8c3] = None,
|
|
1922
|
+
read_timeout: typing.Optional[_Duration_4839e8c3] = None,
|
|
1923
|
+
) -> None:
|
|
1924
|
+
"""Type checking stubs"""
|
|
1925
|
+
pass
|
|
1926
|
+
|
|
1595
1927
|
def _typecheckingstub__57d13f69f251622e0723aa73c3eb93e482e0deb7a7b1e8439c7d7ad35cfc0cc5(
|
|
1596
1928
|
domain_name: builtins.str,
|
|
1597
1929
|
*,
|