aws-cdk-lib 2.179.0__py3-none-any.whl → 2.181.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 +92 -34
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.179.0.jsii.tgz → aws-cdk-lib@2.181.0.jsii.tgz} +0 -0
- aws_cdk/aws_acmpca/__init__.py +48 -1
- aws_cdk/aws_apigateway/__init__.py +6 -6
- aws_cdk/aws_appsync/__init__.py +4 -3
- aws_cdk/aws_backup/__init__.py +89 -0
- aws_cdk/aws_batch/__init__.py +89 -50
- aws_cdk/aws_bedrock/__init__.py +1265 -62
- aws_cdk/aws_chatbot/__init__.py +80 -53
- aws_cdk/aws_cloudformation/__init__.py +40 -8
- aws_cdk/aws_cloudfront/__init__.py +1046 -155
- aws_cdk/aws_cloudfront_origins/__init__.py +1338 -144
- aws_cdk/aws_cloudtrail/__init__.py +4 -8
- aws_cdk/aws_cloudwatch/__init__.py +1 -1
- aws_cdk/aws_codebuild/__init__.py +2 -2
- aws_cdk/aws_codepipeline/__init__.py +24 -0
- aws_cdk/aws_codepipeline_actions/__init__.py +28 -1
- aws_cdk/aws_codestar/__init__.py +2 -1
- aws_cdk/aws_cognito/__init__.py +100 -13
- aws_cdk/aws_config/__init__.py +3 -3
- aws_cdk/aws_connect/__init__.py +257 -0
- aws_cdk/aws_datasync/__init__.py +279 -50
- aws_cdk/aws_deadline/__init__.py +683 -6
- aws_cdk/aws_directoryservice/__init__.py +9 -4
- aws_cdk/aws_dlm/__init__.py +2 -2
- aws_cdk/aws_dms/__init__.py +3 -3
- aws_cdk/aws_dynamodb/__init__.py +4 -58
- aws_cdk/aws_ec2/__init__.py +377 -121
- aws_cdk/aws_ecs/__init__.py +37 -46
- aws_cdk/aws_efs/__init__.py +1 -1
- aws_cdk/aws_eks/__init__.py +19 -13
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +13 -27
- aws_cdk/aws_emrcontainers/__init__.py +44 -1
- aws_cdk/aws_events/__init__.py +8 -11
- aws_cdk/aws_fms/__init__.py +5 -5
- aws_cdk/aws_fsx/__init__.py +5 -4
- aws_cdk/aws_glue/__init__.py +161 -0
- aws_cdk/aws_groundstation/__init__.py +23 -1
- aws_cdk/aws_iam/__init__.py +12 -12
- aws_cdk/aws_iot/__init__.py +7 -0
- aws_cdk/aws_ivs/__init__.py +17 -8
- aws_cdk/aws_kinesis/__init__.py +689 -35
- aws_cdk/aws_lambda/__init__.py +10 -15
- aws_cdk/aws_lambda_event_sources/__init__.py +175 -2
- aws_cdk/aws_medialive/__init__.py +314 -4
- aws_cdk/aws_mediapackagev2/__init__.py +228 -0
- aws_cdk/aws_networkfirewall/__init__.py +3 -3
- aws_cdk/aws_opensearchserverless/__init__.py +31 -8
- aws_cdk/aws_organizations/__init__.py +3 -3
- aws_cdk/aws_pcaconnectorscep/__init__.py +1 -1
- aws_cdk/aws_rds/__init__.py +456 -100
- aws_cdk/aws_s3/__init__.py +278 -0
- aws_cdk/aws_s3objectlambda/__init__.py +2 -2
- aws_cdk/aws_ses/__init__.py +228 -8
- aws_cdk/aws_ssm/__init__.py +9 -10
- aws_cdk/aws_stepfunctions/__init__.py +345 -70
- aws_cdk/aws_stepfunctions_tasks/__init__.py +142 -142
- aws_cdk/aws_supportapp/__init__.py +7 -7
- aws_cdk/aws_transfer/__init__.py +829 -4
- aws_cdk/aws_wafv2/__init__.py +17 -9
- aws_cdk/aws_wisdom/__init__.py +149 -4
- aws_cdk/custom_resources/__init__.py +23 -26
- aws_cdk/cx_api/__init__.py +16 -0
- {aws_cdk_lib-2.179.0.dist-info → aws_cdk_lib-2.181.0.dist-info}/METADATA +1 -1
- {aws_cdk_lib-2.179.0.dist-info → aws_cdk_lib-2.181.0.dist-info}/RECORD +70 -70
- {aws_cdk_lib-2.179.0.dist-info → aws_cdk_lib-2.181.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.179.0.dist-info → aws_cdk_lib-2.181.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.179.0.dist-info → aws_cdk_lib-2.181.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.179.0.dist-info → aws_cdk_lib-2.181.0.dist-info}/top_level.txt +0 -0
|
@@ -70,6 +70,15 @@ cloudfront.Distribution(self, "myDist",
|
|
|
70
70
|
)
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
+
### VPC origins
|
|
74
|
+
|
|
75
|
+
You can use CloudFront to deliver content from applications that are hosted in your virtual private cloud (VPC) private subnets.
|
|
76
|
+
You can use Application Load Balancers (ALBs), Network Load Balancers (NLBs), and EC2 instances in private subnets as VPC origins.
|
|
77
|
+
|
|
78
|
+
Learn more about [Restrict access with VPC origins](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-vpc-origins.html).
|
|
79
|
+
|
|
80
|
+
See the README of the `aws-cdk-lib/aws-cloudfront-origins` module for more information on setting up VPC origins.
|
|
81
|
+
|
|
73
82
|
### Domain Names and Certificates
|
|
74
83
|
|
|
75
84
|
When you create a distribution, CloudFront assigns a domain name for the distribution, for example: `d111111abcdef8.cloudfront.net`; this value can
|
|
@@ -796,6 +805,29 @@ cloudfront.Distribution(self, "myCdn",
|
|
|
796
805
|
)
|
|
797
806
|
```
|
|
798
807
|
|
|
808
|
+
### gRPC
|
|
809
|
+
|
|
810
|
+
CloudFront supports gRPC, an open-source remote procedure call (RPC) framework built on HTTP/2. gRPC offers bi-directional streaming and
|
|
811
|
+
binary protocol that buffers payloads, making it suitable for applications that require low latency communications.
|
|
812
|
+
|
|
813
|
+
To enable your distribution to handle gRPC requests, you must include HTTP/2 as one of the supported HTTP versions and allow HTTP methods,
|
|
814
|
+
including POST.
|
|
815
|
+
|
|
816
|
+
See [Using gRPC with CloudFront distributions](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-using-grpc.html)
|
|
817
|
+
in the CloudFront User Guide.
|
|
818
|
+
|
|
819
|
+
Example:
|
|
820
|
+
|
|
821
|
+
```python
|
|
822
|
+
cloudfront.Distribution(self, "myCdn",
|
|
823
|
+
default_behavior=cloudfront.BehaviorOptions(
|
|
824
|
+
origin=origins.HttpOrigin("www.example.com"),
|
|
825
|
+
allowed_methods=cloudfront.AllowedMethods.ALLOW_ALL, # `AllowedMethods.ALLOW_ALL` is required if `enableGrpc` is true
|
|
826
|
+
enable_grpc=True
|
|
827
|
+
)
|
|
828
|
+
)
|
|
829
|
+
```
|
|
830
|
+
|
|
799
831
|
## Migrating from the original CloudFrontWebDistribution to the newer Distribution construct
|
|
800
832
|
|
|
801
833
|
It's possible to migrate a distribution from the original to the modern API.
|
|
@@ -1318,6 +1350,11 @@ from ..aws_cloudwatch import (
|
|
|
1318
1350
|
MetricOptions as _MetricOptions_1788b62f,
|
|
1319
1351
|
Unit as _Unit_61bc6f70,
|
|
1320
1352
|
)
|
|
1353
|
+
from ..aws_ec2 import IInstance as _IInstance_ab239e7c
|
|
1354
|
+
from ..aws_elasticloadbalancingv2 import (
|
|
1355
|
+
IApplicationLoadBalancer as _IApplicationLoadBalancer_4cbd50ab,
|
|
1356
|
+
INetworkLoadBalancer as _INetworkLoadBalancer_96e17101,
|
|
1357
|
+
)
|
|
1321
1358
|
from ..aws_iam import (
|
|
1322
1359
|
Grant as _Grant_a7ae64f8,
|
|
1323
1360
|
IGrantable as _IGrantable_71c4f5de,
|
|
@@ -1340,13 +1377,13 @@ class AccessLevel(enum.Enum):
|
|
|
1340
1377
|
Example::
|
|
1341
1378
|
|
|
1342
1379
|
my_bucket = s3.Bucket(self, "myBucket")
|
|
1343
|
-
s3_origin = origins.S3BucketOrigin.with_origin_access_control(my_bucket,
|
|
1344
|
-
origin_access_levels=[cloudfront.AccessLevel.READ, cloudfront.AccessLevel.WRITE, cloudfront.AccessLevel.DELETE]
|
|
1345
|
-
)
|
|
1380
|
+
s3_origin = origins.S3BucketOrigin.with_origin_access_control(my_bucket, origin_access_levels=[cloudfront.AccessLevel.READ, cloudfront.AccessLevel.READ_VERSIONED, cloudfront.AccessLevel.WRITE, cloudfront.AccessLevel.DELETE])
|
|
1346
1381
|
'''
|
|
1347
1382
|
|
|
1348
1383
|
READ = "READ"
|
|
1349
1384
|
'''Grants read permissions to CloudFront Distribution.'''
|
|
1385
|
+
READ_VERSIONED = "READ_VERSIONED"
|
|
1386
|
+
'''Grants versioned read permissions to CloudFront Distribution.'''
|
|
1350
1387
|
LIST = "LIST"
|
|
1351
1388
|
'''Grants list permissions to CloudFront Distribution.'''
|
|
1352
1389
|
WRITE = "WRITE"
|
|
@@ -1364,6 +1401,7 @@ class AccessLevel(enum.Enum):
|
|
|
1364
1401
|
"cache_policy": "cachePolicy",
|
|
1365
1402
|
"compress": "compress",
|
|
1366
1403
|
"edge_lambdas": "edgeLambdas",
|
|
1404
|
+
"enable_grpc": "enableGrpc",
|
|
1367
1405
|
"function_associations": "functionAssociations",
|
|
1368
1406
|
"origin_request_policy": "originRequestPolicy",
|
|
1369
1407
|
"realtime_log_config": "realtimeLogConfig",
|
|
@@ -1382,6 +1420,7 @@ class AddBehaviorOptions:
|
|
|
1382
1420
|
cache_policy: typing.Optional["ICachePolicy"] = None,
|
|
1383
1421
|
compress: typing.Optional[builtins.bool] = None,
|
|
1384
1422
|
edge_lambdas: typing.Optional[typing.Sequence[typing.Union["EdgeLambda", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
1423
|
+
enable_grpc: typing.Optional[builtins.bool] = None,
|
|
1385
1424
|
function_associations: typing.Optional[typing.Sequence[typing.Union["FunctionAssociation", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
1386
1425
|
origin_request_policy: typing.Optional["IOriginRequestPolicy"] = None,
|
|
1387
1426
|
realtime_log_config: typing.Optional["IRealtimeLogConfig"] = None,
|
|
@@ -1397,6 +1436,7 @@ class AddBehaviorOptions:
|
|
|
1397
1436
|
:param cache_policy: The cache policy for this behavior. The cache policy determines what values are included in the cache key, and the time-to-live (TTL) values for the cache. Default: CachePolicy.CACHING_OPTIMIZED
|
|
1398
1437
|
:param compress: Whether you want CloudFront to automatically compress certain files for this cache behavior. See https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html#compressed-content-cloudfront-file-types for file types CloudFront will compress. Default: true
|
|
1399
1438
|
:param edge_lambdas: The Lambda@Edge functions to invoke before serving the contents. Default: - no Lambda functions will be invoked
|
|
1439
|
+
:param enable_grpc: Enables your CloudFront distribution to receive gRPC requests and to proxy them directly to your origins. If the ``enableGrpc`` is set to true, the following restrictions apply: - The ``allowedMethods`` property must be ``AllowedMethods.ALLOW_ALL`` to include POST method because gRPC only supports POST method. - The ``httpVersion`` property must be ``HttpVersion.HTTP2`` or ``HttpVersion.HTTP2_AND_3`` because gRPC only supports versions including HTTP/2. - The ``edgeLambdas`` property can't be specified because gRPC is not supported with Lambda@Edge. Default: false
|
|
1400
1440
|
:param function_associations: The CloudFront functions to invoke before serving the contents. Default: - no functions will be invoked
|
|
1401
1441
|
:param origin_request_policy: The origin request policy for this behavior. The origin request policy determines which values (e.g., headers, cookies) are included in requests that CloudFront sends to the origin. Default: - none
|
|
1402
1442
|
:param realtime_log_config: The real-time log configuration to be attached to this cache behavior. Default: - none
|
|
@@ -1424,6 +1464,7 @@ class AddBehaviorOptions:
|
|
|
1424
1464
|
check_type(argname="argument cache_policy", value=cache_policy, expected_type=type_hints["cache_policy"])
|
|
1425
1465
|
check_type(argname="argument compress", value=compress, expected_type=type_hints["compress"])
|
|
1426
1466
|
check_type(argname="argument edge_lambdas", value=edge_lambdas, expected_type=type_hints["edge_lambdas"])
|
|
1467
|
+
check_type(argname="argument enable_grpc", value=enable_grpc, expected_type=type_hints["enable_grpc"])
|
|
1427
1468
|
check_type(argname="argument function_associations", value=function_associations, expected_type=type_hints["function_associations"])
|
|
1428
1469
|
check_type(argname="argument origin_request_policy", value=origin_request_policy, expected_type=type_hints["origin_request_policy"])
|
|
1429
1470
|
check_type(argname="argument realtime_log_config", value=realtime_log_config, expected_type=type_hints["realtime_log_config"])
|
|
@@ -1442,6 +1483,8 @@ class AddBehaviorOptions:
|
|
|
1442
1483
|
self._values["compress"] = compress
|
|
1443
1484
|
if edge_lambdas is not None:
|
|
1444
1485
|
self._values["edge_lambdas"] = edge_lambdas
|
|
1486
|
+
if enable_grpc is not None:
|
|
1487
|
+
self._values["enable_grpc"] = enable_grpc
|
|
1445
1488
|
if function_associations is not None:
|
|
1446
1489
|
self._values["function_associations"] = function_associations
|
|
1447
1490
|
if origin_request_policy is not None:
|
|
@@ -1512,6 +1555,23 @@ class AddBehaviorOptions:
|
|
|
1512
1555
|
result = self._values.get("edge_lambdas")
|
|
1513
1556
|
return typing.cast(typing.Optional[typing.List["EdgeLambda"]], result)
|
|
1514
1557
|
|
|
1558
|
+
@builtins.property
|
|
1559
|
+
def enable_grpc(self) -> typing.Optional[builtins.bool]:
|
|
1560
|
+
'''Enables your CloudFront distribution to receive gRPC requests and to proxy them directly to your origins.
|
|
1561
|
+
|
|
1562
|
+
If the ``enableGrpc`` is set to true, the following restrictions apply:
|
|
1563
|
+
|
|
1564
|
+
- The ``allowedMethods`` property must be ``AllowedMethods.ALLOW_ALL`` to include POST method because gRPC only supports POST method.
|
|
1565
|
+
- The ``httpVersion`` property must be ``HttpVersion.HTTP2`` or ``HttpVersion.HTTP2_AND_3`` because gRPC only supports versions including HTTP/2.
|
|
1566
|
+
- The ``edgeLambdas`` property can't be specified because gRPC is not supported with Lambda@Edge.
|
|
1567
|
+
|
|
1568
|
+
:default: false
|
|
1569
|
+
|
|
1570
|
+
:see: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-using-grpc.html
|
|
1571
|
+
'''
|
|
1572
|
+
result = self._values.get("enable_grpc")
|
|
1573
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
1574
|
+
|
|
1515
1575
|
@builtins.property
|
|
1516
1576
|
def function_associations(
|
|
1517
1577
|
self,
|
|
@@ -1961,6 +2021,7 @@ class Behavior:
|
|
|
1961
2021
|
"cache_policy": "cachePolicy",
|
|
1962
2022
|
"compress": "compress",
|
|
1963
2023
|
"edge_lambdas": "edgeLambdas",
|
|
2024
|
+
"enable_grpc": "enableGrpc",
|
|
1964
2025
|
"function_associations": "functionAssociations",
|
|
1965
2026
|
"origin_request_policy": "originRequestPolicy",
|
|
1966
2027
|
"realtime_log_config": "realtimeLogConfig",
|
|
@@ -1980,6 +2041,7 @@ class BehaviorOptions(AddBehaviorOptions):
|
|
|
1980
2041
|
cache_policy: typing.Optional["ICachePolicy"] = None,
|
|
1981
2042
|
compress: typing.Optional[builtins.bool] = None,
|
|
1982
2043
|
edge_lambdas: typing.Optional[typing.Sequence[typing.Union["EdgeLambda", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
2044
|
+
enable_grpc: typing.Optional[builtins.bool] = None,
|
|
1983
2045
|
function_associations: typing.Optional[typing.Sequence[typing.Union["FunctionAssociation", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
1984
2046
|
origin_request_policy: typing.Optional["IOriginRequestPolicy"] = None,
|
|
1985
2047
|
realtime_log_config: typing.Optional["IRealtimeLogConfig"] = None,
|
|
@@ -1996,6 +2058,7 @@ class BehaviorOptions(AddBehaviorOptions):
|
|
|
1996
2058
|
:param cache_policy: The cache policy for this behavior. The cache policy determines what values are included in the cache key, and the time-to-live (TTL) values for the cache. Default: CachePolicy.CACHING_OPTIMIZED
|
|
1997
2059
|
:param compress: Whether you want CloudFront to automatically compress certain files for this cache behavior. See https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html#compressed-content-cloudfront-file-types for file types CloudFront will compress. Default: true
|
|
1998
2060
|
:param edge_lambdas: The Lambda@Edge functions to invoke before serving the contents. Default: - no Lambda functions will be invoked
|
|
2061
|
+
:param enable_grpc: Enables your CloudFront distribution to receive gRPC requests and to proxy them directly to your origins. If the ``enableGrpc`` is set to true, the following restrictions apply: - The ``allowedMethods`` property must be ``AllowedMethods.ALLOW_ALL`` to include POST method because gRPC only supports POST method. - The ``httpVersion`` property must be ``HttpVersion.HTTP2`` or ``HttpVersion.HTTP2_AND_3`` because gRPC only supports versions including HTTP/2. - The ``edgeLambdas`` property can't be specified because gRPC is not supported with Lambda@Edge. Default: false
|
|
1999
2062
|
:param function_associations: The CloudFront functions to invoke before serving the contents. Default: - no functions will be invoked
|
|
2000
2063
|
:param origin_request_policy: The origin request policy for this behavior. The origin request policy determines which values (e.g., headers, cookies) are included in requests that CloudFront sends to the origin. Default: - none
|
|
2001
2064
|
:param realtime_log_config: The real-time log configuration to be attached to this cache behavior. Default: - none
|
|
@@ -2009,21 +2072,17 @@ class BehaviorOptions(AddBehaviorOptions):
|
|
|
2009
2072
|
|
|
2010
2073
|
Example::
|
|
2011
2074
|
|
|
2012
|
-
#
|
|
2013
|
-
#
|
|
2014
|
-
# s3_bucket: s3.Bucket
|
|
2075
|
+
# Creates a distribution from an Application Load Balancer
|
|
2076
|
+
# vpc: ec2.Vpc
|
|
2015
2077
|
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
)
|
|
2025
|
-
]
|
|
2026
|
-
)
|
|
2078
|
+
# Create an application load balancer in a VPC. 'internetFacing' can be 'false'.
|
|
2079
|
+
alb = elbv2.ApplicationLoadBalancer(self, "ALB",
|
|
2080
|
+
vpc=vpc,
|
|
2081
|
+
internet_facing=False,
|
|
2082
|
+
vpc_subnets=ec2.SubnetSelection(subnet_type=ec2.SubnetType.PRIVATE_ISOLATED)
|
|
2083
|
+
)
|
|
2084
|
+
cloudfront.Distribution(self, "myDist",
|
|
2085
|
+
default_behavior=cloudfront.BehaviorOptions(origin=origins.VpcOrigin.with_application_load_balancer(alb))
|
|
2027
2086
|
)
|
|
2028
2087
|
'''
|
|
2029
2088
|
if __debug__:
|
|
@@ -2033,6 +2092,7 @@ class BehaviorOptions(AddBehaviorOptions):
|
|
|
2033
2092
|
check_type(argname="argument cache_policy", value=cache_policy, expected_type=type_hints["cache_policy"])
|
|
2034
2093
|
check_type(argname="argument compress", value=compress, expected_type=type_hints["compress"])
|
|
2035
2094
|
check_type(argname="argument edge_lambdas", value=edge_lambdas, expected_type=type_hints["edge_lambdas"])
|
|
2095
|
+
check_type(argname="argument enable_grpc", value=enable_grpc, expected_type=type_hints["enable_grpc"])
|
|
2036
2096
|
check_type(argname="argument function_associations", value=function_associations, expected_type=type_hints["function_associations"])
|
|
2037
2097
|
check_type(argname="argument origin_request_policy", value=origin_request_policy, expected_type=type_hints["origin_request_policy"])
|
|
2038
2098
|
check_type(argname="argument realtime_log_config", value=realtime_log_config, expected_type=type_hints["realtime_log_config"])
|
|
@@ -2054,6 +2114,8 @@ class BehaviorOptions(AddBehaviorOptions):
|
|
|
2054
2114
|
self._values["compress"] = compress
|
|
2055
2115
|
if edge_lambdas is not None:
|
|
2056
2116
|
self._values["edge_lambdas"] = edge_lambdas
|
|
2117
|
+
if enable_grpc is not None:
|
|
2118
|
+
self._values["enable_grpc"] = enable_grpc
|
|
2057
2119
|
if function_associations is not None:
|
|
2058
2120
|
self._values["function_associations"] = function_associations
|
|
2059
2121
|
if origin_request_policy is not None:
|
|
@@ -2124,6 +2186,23 @@ class BehaviorOptions(AddBehaviorOptions):
|
|
|
2124
2186
|
result = self._values.get("edge_lambdas")
|
|
2125
2187
|
return typing.cast(typing.Optional[typing.List["EdgeLambda"]], result)
|
|
2126
2188
|
|
|
2189
|
+
@builtins.property
|
|
2190
|
+
def enable_grpc(self) -> typing.Optional[builtins.bool]:
|
|
2191
|
+
'''Enables your CloudFront distribution to receive gRPC requests and to proxy them directly to your origins.
|
|
2192
|
+
|
|
2193
|
+
If the ``enableGrpc`` is set to true, the following restrictions apply:
|
|
2194
|
+
|
|
2195
|
+
- The ``allowedMethods`` property must be ``AllowedMethods.ALLOW_ALL`` to include POST method because gRPC only supports POST method.
|
|
2196
|
+
- The ``httpVersion`` property must be ``HttpVersion.HTTP2`` or ``HttpVersion.HTTP2_AND_3`` because gRPC only supports versions including HTTP/2.
|
|
2197
|
+
- The ``edgeLambdas`` property can't be specified because gRPC is not supported with Lambda@Edge.
|
|
2198
|
+
|
|
2199
|
+
:default: false
|
|
2200
|
+
|
|
2201
|
+
:see: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-using-grpc.html
|
|
2202
|
+
'''
|
|
2203
|
+
result = self._values.get("enable_grpc")
|
|
2204
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
2205
|
+
|
|
2127
2206
|
@builtins.property
|
|
2128
2207
|
def function_associations(
|
|
2129
2208
|
self,
|
|
@@ -8781,7 +8860,7 @@ class CfnDistribution(
|
|
|
8781
8860
|
:param origin_path: An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin. For more information, see `Origin Path <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginPath>`_ in the *Amazon CloudFront Developer Guide* . Default: - ""
|
|
8782
8861
|
:param origin_shield: CloudFront Origin Shield. Using Origin Shield can help reduce the load on your origin. For more information, see `Using Origin Shield <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html>`_ in the *Amazon CloudFront Developer Guide* .
|
|
8783
8862
|
:param s3_origin_config: Use this type to specify an origin that is an Amazon S3 bucket that is not configured with static website hosting. To specify any other type of origin, including an Amazon S3 bucket that is configured with static website hosting, use the ``CustomOriginConfig`` type instead.
|
|
8784
|
-
:param vpc_origin_config:
|
|
8863
|
+
:param vpc_origin_config: The VPC origin configuration.
|
|
8785
8864
|
|
|
8786
8865
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origin.html
|
|
8787
8866
|
:exampleMetadata: fixture=_generated
|
|
@@ -8999,7 +9078,8 @@ class CfnDistribution(
|
|
|
8999
9078
|
def vpc_origin_config(
|
|
9000
9079
|
self,
|
|
9001
9080
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnDistribution.VpcOriginConfigProperty"]]:
|
|
9002
|
-
'''
|
|
9081
|
+
'''The VPC origin configuration.
|
|
9082
|
+
|
|
9003
9083
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origin.html#cfn-cloudfront-distribution-origin-vpcoriginconfig
|
|
9004
9084
|
'''
|
|
9005
9085
|
result = self._values.get("vpc_origin_config")
|
|
@@ -9512,10 +9592,11 @@ class CfnDistribution(
|
|
|
9512
9592
|
origin_keepalive_timeout: typing.Optional[jsii.Number] = None,
|
|
9513
9593
|
origin_read_timeout: typing.Optional[jsii.Number] = None,
|
|
9514
9594
|
) -> None:
|
|
9515
|
-
'''
|
|
9516
|
-
|
|
9517
|
-
:param
|
|
9518
|
-
:param
|
|
9595
|
+
'''An Amazon CloudFront VPC origin configuration.
|
|
9596
|
+
|
|
9597
|
+
:param vpc_origin_id: The VPC origin ID.
|
|
9598
|
+
:param origin_keepalive_timeout: Specifies how long, in seconds, CloudFront persists its connection to the origin. The minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is 5 seconds. For more information, see `Keep-alive timeout (custom origins only) <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginKeepaliveTimeout>`_ in the *Amazon CloudFront Developer Guide* . Default: - 5
|
|
9599
|
+
:param origin_read_timeout: Specifies how long, in seconds, CloudFront waits for a response from the origin. This is also known as the *origin response timeout* . The minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is 30 seconds. For more information, see `Response timeout (custom origins only) <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginResponseTimeout>`_ in the *Amazon CloudFront Developer Guide* . Default: - 30
|
|
9519
9600
|
|
|
9520
9601
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-vpcoriginconfig.html
|
|
9521
9602
|
:exampleMetadata: fixture=_generated
|
|
@@ -9549,7 +9630,8 @@ class CfnDistribution(
|
|
|
9549
9630
|
|
|
9550
9631
|
@builtins.property
|
|
9551
9632
|
def vpc_origin_id(self) -> builtins.str:
|
|
9552
|
-
'''
|
|
9633
|
+
'''The VPC origin ID.
|
|
9634
|
+
|
|
9553
9635
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-vpcoriginconfig.html#cfn-cloudfront-distribution-vpcoriginconfig-vpcoriginid
|
|
9554
9636
|
'''
|
|
9555
9637
|
result = self._values.get("vpc_origin_id")
|
|
@@ -9558,7 +9640,12 @@ class CfnDistribution(
|
|
|
9558
9640
|
|
|
9559
9641
|
@builtins.property
|
|
9560
9642
|
def origin_keepalive_timeout(self) -> typing.Optional[jsii.Number]:
|
|
9561
|
-
'''
|
|
9643
|
+
'''Specifies how long, in seconds, CloudFront persists its connection to the origin.
|
|
9644
|
+
|
|
9645
|
+
The minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is 5 seconds.
|
|
9646
|
+
|
|
9647
|
+
For more information, see `Keep-alive timeout (custom origins only) <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginKeepaliveTimeout>`_ in the *Amazon CloudFront Developer Guide* .
|
|
9648
|
+
|
|
9562
9649
|
:default: - 5
|
|
9563
9650
|
|
|
9564
9651
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-vpcoriginconfig.html#cfn-cloudfront-distribution-vpcoriginconfig-originkeepalivetimeout
|
|
@@ -9568,7 +9655,12 @@ class CfnDistribution(
|
|
|
9568
9655
|
|
|
9569
9656
|
@builtins.property
|
|
9570
9657
|
def origin_read_timeout(self) -> typing.Optional[jsii.Number]:
|
|
9571
|
-
'''
|
|
9658
|
+
'''Specifies how long, in seconds, CloudFront waits for a response from the origin.
|
|
9659
|
+
|
|
9660
|
+
This is also known as the *origin response timeout* . The minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is 30 seconds.
|
|
9661
|
+
|
|
9662
|
+
For more information, see `Response timeout (custom origins only) <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginResponseTimeout>`_ in the *Amazon CloudFront Developer Guide* .
|
|
9663
|
+
|
|
9572
9664
|
:default: - 30
|
|
9573
9665
|
|
|
9574
9666
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-vpcoriginconfig.html#cfn-cloudfront-distribution-vpcoriginconfig-originreadtimeout
|
|
@@ -16050,8 +16142,8 @@ class CfnVpcOrigin(
|
|
|
16050
16142
|
|
|
16051
16143
|
:param arn: The ARN of the CloudFront VPC origin endpoint configuration.
|
|
16052
16144
|
:param name: The name of the CloudFront VPC origin endpoint configuration.
|
|
16053
|
-
:param http_port: The HTTP port for the CloudFront VPC origin endpoint configuration. Default: - 80
|
|
16054
|
-
:param https_port: The HTTPS port of the CloudFront VPC origin endpoint configuration. Default: - 443
|
|
16145
|
+
:param http_port: The HTTP port for the CloudFront VPC origin endpoint configuration. The default value is ``80`` . Default: - 80
|
|
16146
|
+
:param https_port: The HTTPS port of the CloudFront VPC origin endpoint configuration. The default value is ``443`` . Default: - 443
|
|
16055
16147
|
:param origin_protocol_policy: The origin protocol policy for the CloudFront VPC origin endpoint configuration. Default: - "match-viewer"
|
|
16056
16148
|
:param origin_ssl_protocols:
|
|
16057
16149
|
|
|
@@ -16120,6 +16212,8 @@ class CfnVpcOrigin(
|
|
|
16120
16212
|
def http_port(self) -> typing.Optional[jsii.Number]:
|
|
16121
16213
|
'''The HTTP port for the CloudFront VPC origin endpoint configuration.
|
|
16122
16214
|
|
|
16215
|
+
The default value is ``80`` .
|
|
16216
|
+
|
|
16123
16217
|
:default: - 80
|
|
16124
16218
|
|
|
16125
16219
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-vpcorigin-vpcoriginendpointconfig.html#cfn-cloudfront-vpcorigin-vpcoriginendpointconfig-httpport
|
|
@@ -16131,6 +16225,8 @@ class CfnVpcOrigin(
|
|
|
16131
16225
|
def https_port(self) -> typing.Optional[jsii.Number]:
|
|
16132
16226
|
'''The HTTPS port of the CloudFront VPC origin endpoint configuration.
|
|
16133
16227
|
|
|
16228
|
+
The default value is ``443`` .
|
|
16229
|
+
|
|
16134
16230
|
:default: - 443
|
|
16135
16231
|
|
|
16136
16232
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-vpcorigin-vpcoriginendpointconfig.html#cfn-cloudfront-vpcorigin-vpcoriginendpointconfig-httpsport
|
|
@@ -16968,21 +17064,17 @@ class DistributionProps:
|
|
|
16968
17064
|
|
|
16969
17065
|
Example::
|
|
16970
17066
|
|
|
16971
|
-
#
|
|
16972
|
-
#
|
|
16973
|
-
# s3_bucket: s3.Bucket
|
|
17067
|
+
# Creates a distribution from an Application Load Balancer
|
|
17068
|
+
# vpc: ec2.Vpc
|
|
16974
17069
|
|
|
16975
|
-
|
|
16976
|
-
|
|
16977
|
-
|
|
16978
|
-
|
|
16979
|
-
|
|
16980
|
-
|
|
16981
|
-
|
|
16982
|
-
|
|
16983
|
-
)
|
|
16984
|
-
]
|
|
16985
|
-
)
|
|
17070
|
+
# Create an application load balancer in a VPC. 'internetFacing' can be 'false'.
|
|
17071
|
+
alb = elbv2.ApplicationLoadBalancer(self, "ALB",
|
|
17072
|
+
vpc=vpc,
|
|
17073
|
+
internet_facing=False,
|
|
17074
|
+
vpc_subnets=ec2.SubnetSelection(subnet_type=ec2.SubnetType.PRIVATE_ISOLATED)
|
|
17075
|
+
)
|
|
17076
|
+
cloudfront.Distribution(self, "myDist",
|
|
17077
|
+
default_behavior=cloudfront.BehaviorOptions(origin=origins.VpcOrigin.with_application_load_balancer(alb))
|
|
16986
17078
|
)
|
|
16987
17079
|
'''
|
|
16988
17080
|
if isinstance(default_behavior, dict):
|
|
@@ -18923,6 +19015,70 @@ class _IResponseHeadersPolicyProxy:
|
|
|
18923
19015
|
typing.cast(typing.Any, IResponseHeadersPolicy).__jsii_proxy_class__ = lambda : _IResponseHeadersPolicyProxy
|
|
18924
19016
|
|
|
18925
19017
|
|
|
19018
|
+
@jsii.interface(jsii_type="aws-cdk-lib.aws_cloudfront.IVpcOrigin")
|
|
19019
|
+
class IVpcOrigin(_IResource_c80c4260, typing_extensions.Protocol):
|
|
19020
|
+
'''Represents a VPC origin.'''
|
|
19021
|
+
|
|
19022
|
+
@builtins.property
|
|
19023
|
+
@jsii.member(jsii_name="vpcOriginArn")
|
|
19024
|
+
def vpc_origin_arn(self) -> builtins.str:
|
|
19025
|
+
'''The VPC origin ARN.
|
|
19026
|
+
|
|
19027
|
+
:attribute: true
|
|
19028
|
+
'''
|
|
19029
|
+
...
|
|
19030
|
+
|
|
19031
|
+
@builtins.property
|
|
19032
|
+
@jsii.member(jsii_name="vpcOriginId")
|
|
19033
|
+
def vpc_origin_id(self) -> builtins.str:
|
|
19034
|
+
'''The VPC origin ID.
|
|
19035
|
+
|
|
19036
|
+
:attribute: true
|
|
19037
|
+
'''
|
|
19038
|
+
...
|
|
19039
|
+
|
|
19040
|
+
@builtins.property
|
|
19041
|
+
@jsii.member(jsii_name="domainName")
|
|
19042
|
+
def domain_name(self) -> typing.Optional[builtins.str]:
|
|
19043
|
+
'''The domain name of the CloudFront VPC origin endpoint configuration.'''
|
|
19044
|
+
...
|
|
19045
|
+
|
|
19046
|
+
|
|
19047
|
+
class _IVpcOriginProxy(
|
|
19048
|
+
jsii.proxy_for(_IResource_c80c4260), # type: ignore[misc]
|
|
19049
|
+
):
|
|
19050
|
+
'''Represents a VPC origin.'''
|
|
19051
|
+
|
|
19052
|
+
__jsii_type__: typing.ClassVar[str] = "aws-cdk-lib.aws_cloudfront.IVpcOrigin"
|
|
19053
|
+
|
|
19054
|
+
@builtins.property
|
|
19055
|
+
@jsii.member(jsii_name="vpcOriginArn")
|
|
19056
|
+
def vpc_origin_arn(self) -> builtins.str:
|
|
19057
|
+
'''The VPC origin ARN.
|
|
19058
|
+
|
|
19059
|
+
:attribute: true
|
|
19060
|
+
'''
|
|
19061
|
+
return typing.cast(builtins.str, jsii.get(self, "vpcOriginArn"))
|
|
19062
|
+
|
|
19063
|
+
@builtins.property
|
|
19064
|
+
@jsii.member(jsii_name="vpcOriginId")
|
|
19065
|
+
def vpc_origin_id(self) -> builtins.str:
|
|
19066
|
+
'''The VPC origin ID.
|
|
19067
|
+
|
|
19068
|
+
:attribute: true
|
|
19069
|
+
'''
|
|
19070
|
+
return typing.cast(builtins.str, jsii.get(self, "vpcOriginId"))
|
|
19071
|
+
|
|
19072
|
+
@builtins.property
|
|
19073
|
+
@jsii.member(jsii_name="domainName")
|
|
19074
|
+
def domain_name(self) -> typing.Optional[builtins.str]:
|
|
19075
|
+
'''The domain name of the CloudFront VPC origin endpoint configuration.'''
|
|
19076
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "domainName"))
|
|
19077
|
+
|
|
19078
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
|
|
19079
|
+
typing.cast(typing.Any, IVpcOrigin).__jsii_proxy_class__ = lambda : _IVpcOriginProxy
|
|
19080
|
+
|
|
19081
|
+
|
|
18926
19082
|
class ImportSource(
|
|
18927
19083
|
metaclass=jsii.JSIIAbstractClass,
|
|
18928
19084
|
jsii_type="aws-cdk-lib.aws_cloudfront.ImportSource",
|
|
@@ -20101,6 +20257,12 @@ class OriginBase(
|
|
|
20101
20257
|
) -> typing.Optional[CfnDistribution.S3OriginConfigProperty]:
|
|
20102
20258
|
return typing.cast(typing.Optional[CfnDistribution.S3OriginConfigProperty], jsii.invoke(self, "renderS3OriginConfig", []))
|
|
20103
20259
|
|
|
20260
|
+
@jsii.member(jsii_name="renderVpcOriginConfig")
|
|
20261
|
+
def _render_vpc_origin_config(
|
|
20262
|
+
self,
|
|
20263
|
+
) -> typing.Optional[CfnDistribution.VpcOriginConfigProperty]:
|
|
20264
|
+
return typing.cast(typing.Optional[CfnDistribution.VpcOriginConfigProperty], jsii.invoke(self, "renderVpcOriginConfig", []))
|
|
20265
|
+
|
|
20104
20266
|
|
|
20105
20267
|
class _OriginBaseProxy(OriginBase):
|
|
20106
20268
|
pass
|
|
@@ -20750,8 +20912,6 @@ class OriginProtocolPolicy(enum.Enum):
|
|
|
20750
20912
|
|
|
20751
20913
|
Example::
|
|
20752
20914
|
|
|
20753
|
-
import aws_cdk.aws_elasticloadbalancingv2 as elbv2
|
|
20754
|
-
|
|
20755
20915
|
# load_balancer: elbv2.ApplicationLoadBalancer
|
|
20756
20916
|
|
|
20757
20917
|
origin = origins.LoadBalancerV2Origin(load_balancer,
|
|
@@ -24381,148 +24541,776 @@ class ViewerProtocolPolicy(enum.Enum):
|
|
|
24381
24541
|
'''Both HTTP and HTTPS supported.'''
|
|
24382
24542
|
|
|
24383
24543
|
|
|
24384
|
-
|
|
24385
|
-
|
|
24544
|
+
@jsii.implements(IVpcOrigin, _ITaggableV2_4e6798f8)
|
|
24545
|
+
class VpcOrigin(
|
|
24546
|
+
_Resource_45bc6135,
|
|
24386
24547
|
metaclass=jsii.JSIIMeta,
|
|
24387
|
-
jsii_type="aws-cdk-lib.aws_cloudfront.
|
|
24548
|
+
jsii_type="aws-cdk-lib.aws_cloudfront.VpcOrigin",
|
|
24388
24549
|
):
|
|
24389
|
-
'''
|
|
24550
|
+
'''A CloudFront VPC Origin configuration.
|
|
24390
24551
|
|
|
24552
|
+
:resource: AWS::CloudFront::VpcOrigin
|
|
24391
24553
|
:exampleMetadata: fixture=_generated
|
|
24392
24554
|
|
|
24393
24555
|
Example::
|
|
24394
24556
|
|
|
24395
24557
|
# The code below shows an example of how to instantiate this type.
|
|
24396
24558
|
# The values are placeholders you should change.
|
|
24397
|
-
import aws_cdk as cdk
|
|
24398
24559
|
from aws_cdk import aws_cloudfront as cloudfront
|
|
24399
|
-
from aws_cdk import aws_iam as iam
|
|
24400
|
-
from aws_cdk import aws_kms as kms
|
|
24401
|
-
|
|
24402
|
-
# docker_image: cdk.DockerImage
|
|
24403
|
-
# grantable: iam.IGrantable
|
|
24404
|
-
# key: kms.Key
|
|
24405
|
-
# local_bundling: cdk.ILocalBundling
|
|
24406
24560
|
|
|
24407
|
-
|
|
24408
|
-
asset_hash="assetHash",
|
|
24409
|
-
asset_hash_type=cdk.AssetHashType.SOURCE,
|
|
24410
|
-
bundling=cdk.BundlingOptions(
|
|
24411
|
-
image=docker_image,
|
|
24561
|
+
# vpc_origin_endpoint: cloudfront.VpcOriginEndpoint
|
|
24412
24562
|
|
|
24413
|
-
|
|
24414
|
-
|
|
24415
|
-
command=["command"],
|
|
24416
|
-
entrypoint=["entrypoint"],
|
|
24417
|
-
environment={
|
|
24418
|
-
"environment_key": "environment"
|
|
24419
|
-
},
|
|
24420
|
-
local=local_bundling,
|
|
24421
|
-
network="network",
|
|
24422
|
-
output_type=cdk.BundlingOutput.ARCHIVED,
|
|
24423
|
-
platform="platform",
|
|
24424
|
-
security_opt="securityOpt",
|
|
24425
|
-
user="user",
|
|
24426
|
-
volumes=[cdk.DockerVolume(
|
|
24427
|
-
container_path="containerPath",
|
|
24428
|
-
host_path="hostPath",
|
|
24563
|
+
vpc_origin = cloudfront.VpcOrigin(self, "MyVpcOrigin",
|
|
24564
|
+
endpoint=vpc_origin_endpoint,
|
|
24429
24565
|
|
|
24430
|
-
|
|
24431
|
-
|
|
24432
|
-
|
|
24433
|
-
|
|
24434
|
-
|
|
24435
|
-
|
|
24436
|
-
deploy_time=False,
|
|
24437
|
-
exclude=["exclude"],
|
|
24438
|
-
follow_symlinks=cdk.SymlinkFollowMode.NEVER,
|
|
24439
|
-
ignore_mode=cdk.IgnoreMode.GLOB,
|
|
24440
|
-
readers=[grantable],
|
|
24441
|
-
source_kMSKey=key
|
|
24566
|
+
# the properties below are optional
|
|
24567
|
+
http_port=123,
|
|
24568
|
+
https_port=123,
|
|
24569
|
+
origin_ssl_protocols=[cloudfront.OriginSslPolicy.SSL_V3],
|
|
24570
|
+
protocol_policy=cloudfront.OriginProtocolPolicy.HTTP_ONLY,
|
|
24571
|
+
vpc_origin_name="vpcOriginName"
|
|
24442
24572
|
)
|
|
24443
24573
|
'''
|
|
24444
24574
|
|
|
24445
24575
|
def __init__(
|
|
24446
24576
|
self,
|
|
24447
|
-
|
|
24577
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
24578
|
+
id: builtins.str,
|
|
24448
24579
|
*,
|
|
24449
|
-
|
|
24450
|
-
|
|
24451
|
-
|
|
24452
|
-
|
|
24453
|
-
|
|
24454
|
-
|
|
24455
|
-
exclude: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
24456
|
-
follow_symlinks: typing.Optional[_SymlinkFollowMode_047ec1f6] = None,
|
|
24457
|
-
ignore_mode: typing.Optional[_IgnoreMode_655a98e8] = None,
|
|
24580
|
+
endpoint: "VpcOriginEndpoint",
|
|
24581
|
+
http_port: typing.Optional[jsii.Number] = None,
|
|
24582
|
+
https_port: typing.Optional[jsii.Number] = None,
|
|
24583
|
+
origin_ssl_protocols: typing.Optional[typing.Sequence[OriginSslPolicy]] = None,
|
|
24584
|
+
protocol_policy: typing.Optional[OriginProtocolPolicy] = None,
|
|
24585
|
+
vpc_origin_name: typing.Optional[builtins.str] = None,
|
|
24458
24586
|
) -> None:
|
|
24459
24587
|
'''
|
|
24460
|
-
:param
|
|
24461
|
-
:param
|
|
24462
|
-
:param
|
|
24463
|
-
:param
|
|
24464
|
-
:param
|
|
24465
|
-
:param
|
|
24466
|
-
:param
|
|
24467
|
-
:param
|
|
24468
|
-
:param follow_symlinks: A strategy for how to handle symlinks. Default: SymlinkFollowMode.NEVER
|
|
24469
|
-
:param ignore_mode: The ignore behavior to use for ``exclude`` patterns. Default: IgnoreMode.GLOB
|
|
24588
|
+
:param scope: -
|
|
24589
|
+
:param id: -
|
|
24590
|
+
:param endpoint: The VPC origin endpoint.
|
|
24591
|
+
:param http_port: The HTTP port for the CloudFront VPC origin endpoint configuration. Default: 80
|
|
24592
|
+
:param https_port: The HTTPS port of the CloudFront VPC origin endpoint configuration. Default: 443
|
|
24593
|
+
:param origin_ssl_protocols: A list that contains allowed SSL/TLS protocols for this distribution. Default: - TLSv1.2
|
|
24594
|
+
:param protocol_policy: The origin protocol policy for the CloudFront VPC origin endpoint configuration. Default: OriginProtocolPolicy.MATCH_VIEWER
|
|
24595
|
+
:param vpc_origin_name: The name of the CloudFront VPC origin endpoint configuration. Default: - generated from the ``id``
|
|
24470
24596
|
'''
|
|
24471
24597
|
if __debug__:
|
|
24472
|
-
type_hints = typing.get_type_hints(
|
|
24473
|
-
check_type(argname="argument
|
|
24474
|
-
|
|
24475
|
-
|
|
24476
|
-
|
|
24477
|
-
|
|
24478
|
-
|
|
24479
|
-
|
|
24480
|
-
|
|
24481
|
-
|
|
24482
|
-
follow_symlinks=follow_symlinks,
|
|
24483
|
-
ignore_mode=ignore_mode,
|
|
24598
|
+
type_hints = typing.get_type_hints(_typecheckingstub__998be59ed4f6babe6930bce84041b072a68877dd129a90f3f7ff729f39569e9c)
|
|
24599
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
24600
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
24601
|
+
props = VpcOriginProps(
|
|
24602
|
+
endpoint=endpoint,
|
|
24603
|
+
http_port=http_port,
|
|
24604
|
+
https_port=https_port,
|
|
24605
|
+
origin_ssl_protocols=origin_ssl_protocols,
|
|
24606
|
+
protocol_policy=protocol_policy,
|
|
24607
|
+
vpc_origin_name=vpc_origin_name,
|
|
24484
24608
|
)
|
|
24485
24609
|
|
|
24486
|
-
jsii.create(self.__class__, self, [
|
|
24487
|
-
|
|
24488
|
-
@builtins.property
|
|
24489
|
-
@jsii.member(jsii_name="path")
|
|
24490
|
-
def path(self) -> builtins.str:
|
|
24491
|
-
'''the path to the local file.'''
|
|
24492
|
-
return typing.cast(builtins.str, jsii.get(self, "path"))
|
|
24493
|
-
|
|
24494
|
-
|
|
24495
|
-
@jsii.implements(ICachePolicy)
|
|
24496
|
-
class CachePolicy(
|
|
24497
|
-
_Resource_45bc6135,
|
|
24498
|
-
metaclass=jsii.JSIIMeta,
|
|
24499
|
-
jsii_type="aws-cdk-lib.aws_cloudfront.CachePolicy",
|
|
24500
|
-
):
|
|
24501
|
-
'''A Cache Policy configuration.
|
|
24502
|
-
|
|
24503
|
-
:link: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html
|
|
24504
|
-
:resource: AWS::CloudFront::CachePolicy
|
|
24505
|
-
:exampleMetadata: infused
|
|
24610
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
24506
24611
|
|
|
24507
|
-
|
|
24612
|
+
@jsii.member(jsii_name="fromVpcOriginArn")
|
|
24613
|
+
@builtins.classmethod
|
|
24614
|
+
def from_vpc_origin_arn(
|
|
24615
|
+
cls,
|
|
24616
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
24617
|
+
id: builtins.str,
|
|
24618
|
+
vpc_origin_arn: builtins.str,
|
|
24619
|
+
) -> IVpcOrigin:
|
|
24620
|
+
'''Import an existing VPC origin from its ARN.
|
|
24508
24621
|
|
|
24509
|
-
|
|
24510
|
-
|
|
24511
|
-
|
|
24512
|
-
|
|
24513
|
-
|
|
24514
|
-
|
|
24515
|
-
|
|
24516
|
-
)
|
|
24517
|
-
|
|
24518
|
-
|
|
24622
|
+
:param scope: -
|
|
24623
|
+
:param id: -
|
|
24624
|
+
:param vpc_origin_arn: -
|
|
24625
|
+
'''
|
|
24626
|
+
if __debug__:
|
|
24627
|
+
type_hints = typing.get_type_hints(_typecheckingstub__4c9f072fdf3e48d903220d18d2af9c155e6769b7577c4d4f171830da0f9d5163)
|
|
24628
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
24629
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
24630
|
+
check_type(argname="argument vpc_origin_arn", value=vpc_origin_arn, expected_type=type_hints["vpc_origin_arn"])
|
|
24631
|
+
return typing.cast(IVpcOrigin, jsii.sinvoke(cls, "fromVpcOriginArn", [scope, id, vpc_origin_arn]))
|
|
24519
24632
|
|
|
24520
|
-
|
|
24521
|
-
|
|
24633
|
+
@jsii.member(jsii_name="fromVpcOriginAttributes")
|
|
24634
|
+
@builtins.classmethod
|
|
24635
|
+
def from_vpc_origin_attributes(
|
|
24636
|
+
cls,
|
|
24522
24637
|
scope: _constructs_77d1e7e8.Construct,
|
|
24523
24638
|
id: builtins.str,
|
|
24524
24639
|
*,
|
|
24525
|
-
|
|
24640
|
+
domain_name: typing.Optional[builtins.str] = None,
|
|
24641
|
+
vpc_origin_arn: typing.Optional[builtins.str] = None,
|
|
24642
|
+
vpc_origin_id: typing.Optional[builtins.str] = None,
|
|
24643
|
+
) -> IVpcOrigin:
|
|
24644
|
+
'''Import an existing VPC origin from its attributes.
|
|
24645
|
+
|
|
24646
|
+
:param scope: -
|
|
24647
|
+
:param id: -
|
|
24648
|
+
:param domain_name: The domain name of the CloudFront VPC origin endpoint configuration. Default: - No domain name configured
|
|
24649
|
+
:param vpc_origin_arn: The ARN of the VPC origin. At least one of vpcOriginArn and vpcOriginId must be provided. Default: - derived from ``vpcOriginId``.
|
|
24650
|
+
:param vpc_origin_id: The ID of the VPC origin. At least one of vpcOriginArn and vpcOriginId must be provided. Default: - derived from ``vpcOriginArn``.
|
|
24651
|
+
'''
|
|
24652
|
+
if __debug__:
|
|
24653
|
+
type_hints = typing.get_type_hints(_typecheckingstub__0ba8097a17cca24c063a5fd81fd0d90aa0e067cd79f2834ac88e9247a2ba1e93)
|
|
24654
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
24655
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
24656
|
+
attrs = VpcOriginAttributes(
|
|
24657
|
+
domain_name=domain_name,
|
|
24658
|
+
vpc_origin_arn=vpc_origin_arn,
|
|
24659
|
+
vpc_origin_id=vpc_origin_id,
|
|
24660
|
+
)
|
|
24661
|
+
|
|
24662
|
+
return typing.cast(IVpcOrigin, jsii.sinvoke(cls, "fromVpcOriginAttributes", [scope, id, attrs]))
|
|
24663
|
+
|
|
24664
|
+
@jsii.member(jsii_name="fromVpcOriginId")
|
|
24665
|
+
@builtins.classmethod
|
|
24666
|
+
def from_vpc_origin_id(
|
|
24667
|
+
cls,
|
|
24668
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
24669
|
+
id: builtins.str,
|
|
24670
|
+
vpc_origin_id: builtins.str,
|
|
24671
|
+
) -> IVpcOrigin:
|
|
24672
|
+
'''Import an existing VPC origin from its ID.
|
|
24673
|
+
|
|
24674
|
+
:param scope: -
|
|
24675
|
+
:param id: -
|
|
24676
|
+
:param vpc_origin_id: -
|
|
24677
|
+
'''
|
|
24678
|
+
if __debug__:
|
|
24679
|
+
type_hints = typing.get_type_hints(_typecheckingstub__7df1a8ecdd841e03add189e788ca2b0ecd250cd46a247318d3eacced6a3db276)
|
|
24680
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
24681
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
24682
|
+
check_type(argname="argument vpc_origin_id", value=vpc_origin_id, expected_type=type_hints["vpc_origin_id"])
|
|
24683
|
+
return typing.cast(IVpcOrigin, jsii.sinvoke(cls, "fromVpcOriginId", [scope, id, vpc_origin_id]))
|
|
24684
|
+
|
|
24685
|
+
@builtins.property
|
|
24686
|
+
@jsii.member(jsii_name="cdkTagManager")
|
|
24687
|
+
def cdk_tag_manager(self) -> _TagManager_0a598cb3:
|
|
24688
|
+
'''TagManager to set, remove and format tags.'''
|
|
24689
|
+
return typing.cast(_TagManager_0a598cb3, jsii.get(self, "cdkTagManager"))
|
|
24690
|
+
|
|
24691
|
+
@builtins.property
|
|
24692
|
+
@jsii.member(jsii_name="vpcOriginArn")
|
|
24693
|
+
def vpc_origin_arn(self) -> builtins.str:
|
|
24694
|
+
'''The VPC origin ARN.
|
|
24695
|
+
|
|
24696
|
+
:attribute: true
|
|
24697
|
+
'''
|
|
24698
|
+
return typing.cast(builtins.str, jsii.get(self, "vpcOriginArn"))
|
|
24699
|
+
|
|
24700
|
+
@builtins.property
|
|
24701
|
+
@jsii.member(jsii_name="vpcOriginId")
|
|
24702
|
+
def vpc_origin_id(self) -> builtins.str:
|
|
24703
|
+
'''The VPC origin ID.
|
|
24704
|
+
|
|
24705
|
+
:attribute: true
|
|
24706
|
+
'''
|
|
24707
|
+
return typing.cast(builtins.str, jsii.get(self, "vpcOriginId"))
|
|
24708
|
+
|
|
24709
|
+
@builtins.property
|
|
24710
|
+
@jsii.member(jsii_name="domainName")
|
|
24711
|
+
def domain_name(self) -> typing.Optional[builtins.str]:
|
|
24712
|
+
'''The domain name of the CloudFront VPC origin endpoint configuration.'''
|
|
24713
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "domainName"))
|
|
24714
|
+
|
|
24715
|
+
|
|
24716
|
+
@jsii.data_type(
|
|
24717
|
+
jsii_type="aws-cdk-lib.aws_cloudfront.VpcOriginAttributes",
|
|
24718
|
+
jsii_struct_bases=[],
|
|
24719
|
+
name_mapping={
|
|
24720
|
+
"domain_name": "domainName",
|
|
24721
|
+
"vpc_origin_arn": "vpcOriginArn",
|
|
24722
|
+
"vpc_origin_id": "vpcOriginId",
|
|
24723
|
+
},
|
|
24724
|
+
)
|
|
24725
|
+
class VpcOriginAttributes:
|
|
24726
|
+
def __init__(
|
|
24727
|
+
self,
|
|
24728
|
+
*,
|
|
24729
|
+
domain_name: typing.Optional[builtins.str] = None,
|
|
24730
|
+
vpc_origin_arn: typing.Optional[builtins.str] = None,
|
|
24731
|
+
vpc_origin_id: typing.Optional[builtins.str] = None,
|
|
24732
|
+
) -> None:
|
|
24733
|
+
'''The properties to import from the VPC origin.
|
|
24734
|
+
|
|
24735
|
+
:param domain_name: The domain name of the CloudFront VPC origin endpoint configuration. Default: - No domain name configured
|
|
24736
|
+
:param vpc_origin_arn: The ARN of the VPC origin. At least one of vpcOriginArn and vpcOriginId must be provided. Default: - derived from ``vpcOriginId``.
|
|
24737
|
+
:param vpc_origin_id: The ID of the VPC origin. At least one of vpcOriginArn and vpcOriginId must be provided. Default: - derived from ``vpcOriginArn``.
|
|
24738
|
+
|
|
24739
|
+
:exampleMetadata: fixture=_generated
|
|
24740
|
+
|
|
24741
|
+
Example::
|
|
24742
|
+
|
|
24743
|
+
# The code below shows an example of how to instantiate this type.
|
|
24744
|
+
# The values are placeholders you should change.
|
|
24745
|
+
from aws_cdk import aws_cloudfront as cloudfront
|
|
24746
|
+
|
|
24747
|
+
vpc_origin_attributes = cloudfront.VpcOriginAttributes(
|
|
24748
|
+
domain_name="domainName",
|
|
24749
|
+
vpc_origin_arn="vpcOriginArn",
|
|
24750
|
+
vpc_origin_id="vpcOriginId"
|
|
24751
|
+
)
|
|
24752
|
+
'''
|
|
24753
|
+
if __debug__:
|
|
24754
|
+
type_hints = typing.get_type_hints(_typecheckingstub__0e378056dfebabd64eec79fbd87a1a7a2c3b26bf2ab9463d659e417bf92f74c5)
|
|
24755
|
+
check_type(argname="argument domain_name", value=domain_name, expected_type=type_hints["domain_name"])
|
|
24756
|
+
check_type(argname="argument vpc_origin_arn", value=vpc_origin_arn, expected_type=type_hints["vpc_origin_arn"])
|
|
24757
|
+
check_type(argname="argument vpc_origin_id", value=vpc_origin_id, expected_type=type_hints["vpc_origin_id"])
|
|
24758
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
24759
|
+
if domain_name is not None:
|
|
24760
|
+
self._values["domain_name"] = domain_name
|
|
24761
|
+
if vpc_origin_arn is not None:
|
|
24762
|
+
self._values["vpc_origin_arn"] = vpc_origin_arn
|
|
24763
|
+
if vpc_origin_id is not None:
|
|
24764
|
+
self._values["vpc_origin_id"] = vpc_origin_id
|
|
24765
|
+
|
|
24766
|
+
@builtins.property
|
|
24767
|
+
def domain_name(self) -> typing.Optional[builtins.str]:
|
|
24768
|
+
'''The domain name of the CloudFront VPC origin endpoint configuration.
|
|
24769
|
+
|
|
24770
|
+
:default: - No domain name configured
|
|
24771
|
+
'''
|
|
24772
|
+
result = self._values.get("domain_name")
|
|
24773
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
24774
|
+
|
|
24775
|
+
@builtins.property
|
|
24776
|
+
def vpc_origin_arn(self) -> typing.Optional[builtins.str]:
|
|
24777
|
+
'''The ARN of the VPC origin.
|
|
24778
|
+
|
|
24779
|
+
At least one of vpcOriginArn and vpcOriginId must be provided.
|
|
24780
|
+
|
|
24781
|
+
:default: - derived from ``vpcOriginId``.
|
|
24782
|
+
'''
|
|
24783
|
+
result = self._values.get("vpc_origin_arn")
|
|
24784
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
24785
|
+
|
|
24786
|
+
@builtins.property
|
|
24787
|
+
def vpc_origin_id(self) -> typing.Optional[builtins.str]:
|
|
24788
|
+
'''The ID of the VPC origin.
|
|
24789
|
+
|
|
24790
|
+
At least one of vpcOriginArn and vpcOriginId must be provided.
|
|
24791
|
+
|
|
24792
|
+
:default: - derived from ``vpcOriginArn``.
|
|
24793
|
+
'''
|
|
24794
|
+
result = self._values.get("vpc_origin_id")
|
|
24795
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
24796
|
+
|
|
24797
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
24798
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
24799
|
+
|
|
24800
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
24801
|
+
return not (rhs == self)
|
|
24802
|
+
|
|
24803
|
+
def __repr__(self) -> str:
|
|
24804
|
+
return "VpcOriginAttributes(%s)" % ", ".join(
|
|
24805
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
24806
|
+
)
|
|
24807
|
+
|
|
24808
|
+
|
|
24809
|
+
class VpcOriginEndpoint(
|
|
24810
|
+
metaclass=jsii.JSIIAbstractClass,
|
|
24811
|
+
jsii_type="aws-cdk-lib.aws_cloudfront.VpcOriginEndpoint",
|
|
24812
|
+
):
|
|
24813
|
+
'''Represents the VPC origin endpoint.
|
|
24814
|
+
|
|
24815
|
+
:exampleMetadata: fixture=_generated
|
|
24816
|
+
|
|
24817
|
+
Example::
|
|
24818
|
+
|
|
24819
|
+
# The code below shows an example of how to instantiate this type.
|
|
24820
|
+
# The values are placeholders you should change.
|
|
24821
|
+
from aws_cdk import aws_cloudfront as cloudfront
|
|
24822
|
+
from aws_cdk import aws_elasticloadbalancingv2 as elbv2
|
|
24823
|
+
|
|
24824
|
+
# application_load_balancer: elbv2.ApplicationLoadBalancer
|
|
24825
|
+
|
|
24826
|
+
vpc_origin_endpoint = cloudfront.VpcOriginEndpoint.application_load_balancer(application_load_balancer)
|
|
24827
|
+
'''
|
|
24828
|
+
|
|
24829
|
+
def __init__(self) -> None:
|
|
24830
|
+
jsii.create(self.__class__, self, [])
|
|
24831
|
+
|
|
24832
|
+
@jsii.member(jsii_name="applicationLoadBalancer")
|
|
24833
|
+
@builtins.classmethod
|
|
24834
|
+
def application_load_balancer(
|
|
24835
|
+
cls,
|
|
24836
|
+
alb: _IApplicationLoadBalancer_4cbd50ab,
|
|
24837
|
+
) -> "VpcOriginEndpoint":
|
|
24838
|
+
'''A VPC origin endpoint from an Application Load Balancer.
|
|
24839
|
+
|
|
24840
|
+
:param alb: -
|
|
24841
|
+
'''
|
|
24842
|
+
if __debug__:
|
|
24843
|
+
type_hints = typing.get_type_hints(_typecheckingstub__6a95d20ca8db6bfe1227b47fc98da59fed8dbab051c0e8b028b9b3285672ddce)
|
|
24844
|
+
check_type(argname="argument alb", value=alb, expected_type=type_hints["alb"])
|
|
24845
|
+
return typing.cast("VpcOriginEndpoint", jsii.sinvoke(cls, "applicationLoadBalancer", [alb]))
|
|
24846
|
+
|
|
24847
|
+
@jsii.member(jsii_name="ec2Instance")
|
|
24848
|
+
@builtins.classmethod
|
|
24849
|
+
def ec2_instance(cls, instance: _IInstance_ab239e7c) -> "VpcOriginEndpoint":
|
|
24850
|
+
'''A VPC origin endpoint from an EC2 instance.
|
|
24851
|
+
|
|
24852
|
+
:param instance: -
|
|
24853
|
+
'''
|
|
24854
|
+
if __debug__:
|
|
24855
|
+
type_hints = typing.get_type_hints(_typecheckingstub__1338909f764189d3d71094278189d5e4d05d08b426fd2d58a1734ef150a07bd4)
|
|
24856
|
+
check_type(argname="argument instance", value=instance, expected_type=type_hints["instance"])
|
|
24857
|
+
return typing.cast("VpcOriginEndpoint", jsii.sinvoke(cls, "ec2Instance", [instance]))
|
|
24858
|
+
|
|
24859
|
+
@jsii.member(jsii_name="networkLoadBalancer")
|
|
24860
|
+
@builtins.classmethod
|
|
24861
|
+
def network_load_balancer(
|
|
24862
|
+
cls,
|
|
24863
|
+
nlb: _INetworkLoadBalancer_96e17101,
|
|
24864
|
+
) -> "VpcOriginEndpoint":
|
|
24865
|
+
'''A VPC origin endpoint from an Network Load Balancer.
|
|
24866
|
+
|
|
24867
|
+
:param nlb: -
|
|
24868
|
+
'''
|
|
24869
|
+
if __debug__:
|
|
24870
|
+
type_hints = typing.get_type_hints(_typecheckingstub__818863b0770e9bfeaa545f403f7b87c64ea9684eae160350df445cf51fc06101)
|
|
24871
|
+
check_type(argname="argument nlb", value=nlb, expected_type=type_hints["nlb"])
|
|
24872
|
+
return typing.cast("VpcOriginEndpoint", jsii.sinvoke(cls, "networkLoadBalancer", [nlb]))
|
|
24873
|
+
|
|
24874
|
+
@builtins.property
|
|
24875
|
+
@jsii.member(jsii_name="endpointArn")
|
|
24876
|
+
@abc.abstractmethod
|
|
24877
|
+
def endpoint_arn(self) -> builtins.str:
|
|
24878
|
+
'''The ARN of the CloudFront VPC origin endpoint configuration.'''
|
|
24879
|
+
...
|
|
24880
|
+
|
|
24881
|
+
@builtins.property
|
|
24882
|
+
@jsii.member(jsii_name="domainName")
|
|
24883
|
+
@abc.abstractmethod
|
|
24884
|
+
def domain_name(self) -> typing.Optional[builtins.str]:
|
|
24885
|
+
'''The domain name of the CloudFront VPC origin endpoint configuration.
|
|
24886
|
+
|
|
24887
|
+
:default: - No domain name configured
|
|
24888
|
+
'''
|
|
24889
|
+
...
|
|
24890
|
+
|
|
24891
|
+
|
|
24892
|
+
class _VpcOriginEndpointProxy(VpcOriginEndpoint):
|
|
24893
|
+
@builtins.property
|
|
24894
|
+
@jsii.member(jsii_name="endpointArn")
|
|
24895
|
+
def endpoint_arn(self) -> builtins.str:
|
|
24896
|
+
'''The ARN of the CloudFront VPC origin endpoint configuration.'''
|
|
24897
|
+
return typing.cast(builtins.str, jsii.get(self, "endpointArn"))
|
|
24898
|
+
|
|
24899
|
+
@builtins.property
|
|
24900
|
+
@jsii.member(jsii_name="domainName")
|
|
24901
|
+
def domain_name(self) -> typing.Optional[builtins.str]:
|
|
24902
|
+
'''The domain name of the CloudFront VPC origin endpoint configuration.
|
|
24903
|
+
|
|
24904
|
+
:default: - No domain name configured
|
|
24905
|
+
'''
|
|
24906
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "domainName"))
|
|
24907
|
+
|
|
24908
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
|
|
24909
|
+
typing.cast(typing.Any, VpcOriginEndpoint).__jsii_proxy_class__ = lambda : _VpcOriginEndpointProxy
|
|
24910
|
+
|
|
24911
|
+
|
|
24912
|
+
@jsii.data_type(
|
|
24913
|
+
jsii_type="aws-cdk-lib.aws_cloudfront.VpcOriginOptions",
|
|
24914
|
+
jsii_struct_bases=[],
|
|
24915
|
+
name_mapping={
|
|
24916
|
+
"http_port": "httpPort",
|
|
24917
|
+
"https_port": "httpsPort",
|
|
24918
|
+
"origin_ssl_protocols": "originSslProtocols",
|
|
24919
|
+
"protocol_policy": "protocolPolicy",
|
|
24920
|
+
"vpc_origin_name": "vpcOriginName",
|
|
24921
|
+
},
|
|
24922
|
+
)
|
|
24923
|
+
class VpcOriginOptions:
|
|
24924
|
+
def __init__(
|
|
24925
|
+
self,
|
|
24926
|
+
*,
|
|
24927
|
+
http_port: typing.Optional[jsii.Number] = None,
|
|
24928
|
+
https_port: typing.Optional[jsii.Number] = None,
|
|
24929
|
+
origin_ssl_protocols: typing.Optional[typing.Sequence[OriginSslPolicy]] = None,
|
|
24930
|
+
protocol_policy: typing.Optional[OriginProtocolPolicy] = None,
|
|
24931
|
+
vpc_origin_name: typing.Optional[builtins.str] = None,
|
|
24932
|
+
) -> None:
|
|
24933
|
+
'''VPC origin endpoint configuration.
|
|
24934
|
+
|
|
24935
|
+
:param http_port: The HTTP port for the CloudFront VPC origin endpoint configuration. Default: 80
|
|
24936
|
+
:param https_port: The HTTPS port of the CloudFront VPC origin endpoint configuration. Default: 443
|
|
24937
|
+
:param origin_ssl_protocols: A list that contains allowed SSL/TLS protocols for this distribution. Default: - TLSv1.2
|
|
24938
|
+
:param protocol_policy: The origin protocol policy for the CloudFront VPC origin endpoint configuration. Default: OriginProtocolPolicy.MATCH_VIEWER
|
|
24939
|
+
:param vpc_origin_name: The name of the CloudFront VPC origin endpoint configuration. Default: - generated from the ``id``
|
|
24940
|
+
|
|
24941
|
+
:exampleMetadata: fixture=_generated
|
|
24942
|
+
|
|
24943
|
+
Example::
|
|
24944
|
+
|
|
24945
|
+
# The code below shows an example of how to instantiate this type.
|
|
24946
|
+
# The values are placeholders you should change.
|
|
24947
|
+
from aws_cdk import aws_cloudfront as cloudfront
|
|
24948
|
+
|
|
24949
|
+
vpc_origin_options = cloudfront.VpcOriginOptions(
|
|
24950
|
+
http_port=123,
|
|
24951
|
+
https_port=123,
|
|
24952
|
+
origin_ssl_protocols=[cloudfront.OriginSslPolicy.SSL_V3],
|
|
24953
|
+
protocol_policy=cloudfront.OriginProtocolPolicy.HTTP_ONLY,
|
|
24954
|
+
vpc_origin_name="vpcOriginName"
|
|
24955
|
+
)
|
|
24956
|
+
'''
|
|
24957
|
+
if __debug__:
|
|
24958
|
+
type_hints = typing.get_type_hints(_typecheckingstub__a89a687db27974ad058448847b73db0fc172703d38e1e97a3712f7c6fa7a797a)
|
|
24959
|
+
check_type(argname="argument http_port", value=http_port, expected_type=type_hints["http_port"])
|
|
24960
|
+
check_type(argname="argument https_port", value=https_port, expected_type=type_hints["https_port"])
|
|
24961
|
+
check_type(argname="argument origin_ssl_protocols", value=origin_ssl_protocols, expected_type=type_hints["origin_ssl_protocols"])
|
|
24962
|
+
check_type(argname="argument protocol_policy", value=protocol_policy, expected_type=type_hints["protocol_policy"])
|
|
24963
|
+
check_type(argname="argument vpc_origin_name", value=vpc_origin_name, expected_type=type_hints["vpc_origin_name"])
|
|
24964
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
24965
|
+
if http_port is not None:
|
|
24966
|
+
self._values["http_port"] = http_port
|
|
24967
|
+
if https_port is not None:
|
|
24968
|
+
self._values["https_port"] = https_port
|
|
24969
|
+
if origin_ssl_protocols is not None:
|
|
24970
|
+
self._values["origin_ssl_protocols"] = origin_ssl_protocols
|
|
24971
|
+
if protocol_policy is not None:
|
|
24972
|
+
self._values["protocol_policy"] = protocol_policy
|
|
24973
|
+
if vpc_origin_name is not None:
|
|
24974
|
+
self._values["vpc_origin_name"] = vpc_origin_name
|
|
24975
|
+
|
|
24976
|
+
@builtins.property
|
|
24977
|
+
def http_port(self) -> typing.Optional[jsii.Number]:
|
|
24978
|
+
'''The HTTP port for the CloudFront VPC origin endpoint configuration.
|
|
24979
|
+
|
|
24980
|
+
:default: 80
|
|
24981
|
+
'''
|
|
24982
|
+
result = self._values.get("http_port")
|
|
24983
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
24984
|
+
|
|
24985
|
+
@builtins.property
|
|
24986
|
+
def https_port(self) -> typing.Optional[jsii.Number]:
|
|
24987
|
+
'''The HTTPS port of the CloudFront VPC origin endpoint configuration.
|
|
24988
|
+
|
|
24989
|
+
:default: 443
|
|
24990
|
+
'''
|
|
24991
|
+
result = self._values.get("https_port")
|
|
24992
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
24993
|
+
|
|
24994
|
+
@builtins.property
|
|
24995
|
+
def origin_ssl_protocols(self) -> typing.Optional[typing.List[OriginSslPolicy]]:
|
|
24996
|
+
'''A list that contains allowed SSL/TLS protocols for this distribution.
|
|
24997
|
+
|
|
24998
|
+
:default: - TLSv1.2
|
|
24999
|
+
'''
|
|
25000
|
+
result = self._values.get("origin_ssl_protocols")
|
|
25001
|
+
return typing.cast(typing.Optional[typing.List[OriginSslPolicy]], result)
|
|
25002
|
+
|
|
25003
|
+
@builtins.property
|
|
25004
|
+
def protocol_policy(self) -> typing.Optional[OriginProtocolPolicy]:
|
|
25005
|
+
'''The origin protocol policy for the CloudFront VPC origin endpoint configuration.
|
|
25006
|
+
|
|
25007
|
+
:default: OriginProtocolPolicy.MATCH_VIEWER
|
|
25008
|
+
'''
|
|
25009
|
+
result = self._values.get("protocol_policy")
|
|
25010
|
+
return typing.cast(typing.Optional[OriginProtocolPolicy], result)
|
|
25011
|
+
|
|
25012
|
+
@builtins.property
|
|
25013
|
+
def vpc_origin_name(self) -> typing.Optional[builtins.str]:
|
|
25014
|
+
'''The name of the CloudFront VPC origin endpoint configuration.
|
|
25015
|
+
|
|
25016
|
+
:default: - generated from the ``id``
|
|
25017
|
+
'''
|
|
25018
|
+
result = self._values.get("vpc_origin_name")
|
|
25019
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
25020
|
+
|
|
25021
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
25022
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
25023
|
+
|
|
25024
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
25025
|
+
return not (rhs == self)
|
|
25026
|
+
|
|
25027
|
+
def __repr__(self) -> str:
|
|
25028
|
+
return "VpcOriginOptions(%s)" % ", ".join(
|
|
25029
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
25030
|
+
)
|
|
25031
|
+
|
|
25032
|
+
|
|
25033
|
+
@jsii.data_type(
|
|
25034
|
+
jsii_type="aws-cdk-lib.aws_cloudfront.VpcOriginProps",
|
|
25035
|
+
jsii_struct_bases=[VpcOriginOptions],
|
|
25036
|
+
name_mapping={
|
|
25037
|
+
"http_port": "httpPort",
|
|
25038
|
+
"https_port": "httpsPort",
|
|
25039
|
+
"origin_ssl_protocols": "originSslProtocols",
|
|
25040
|
+
"protocol_policy": "protocolPolicy",
|
|
25041
|
+
"vpc_origin_name": "vpcOriginName",
|
|
25042
|
+
"endpoint": "endpoint",
|
|
25043
|
+
},
|
|
25044
|
+
)
|
|
25045
|
+
class VpcOriginProps(VpcOriginOptions):
|
|
25046
|
+
def __init__(
|
|
25047
|
+
self,
|
|
25048
|
+
*,
|
|
25049
|
+
http_port: typing.Optional[jsii.Number] = None,
|
|
25050
|
+
https_port: typing.Optional[jsii.Number] = None,
|
|
25051
|
+
origin_ssl_protocols: typing.Optional[typing.Sequence[OriginSslPolicy]] = None,
|
|
25052
|
+
protocol_policy: typing.Optional[OriginProtocolPolicy] = None,
|
|
25053
|
+
vpc_origin_name: typing.Optional[builtins.str] = None,
|
|
25054
|
+
endpoint: VpcOriginEndpoint,
|
|
25055
|
+
) -> None:
|
|
25056
|
+
'''VPC origin endpoint configuration.
|
|
25057
|
+
|
|
25058
|
+
:param http_port: The HTTP port for the CloudFront VPC origin endpoint configuration. Default: 80
|
|
25059
|
+
:param https_port: The HTTPS port of the CloudFront VPC origin endpoint configuration. Default: 443
|
|
25060
|
+
:param origin_ssl_protocols: A list that contains allowed SSL/TLS protocols for this distribution. Default: - TLSv1.2
|
|
25061
|
+
:param protocol_policy: The origin protocol policy for the CloudFront VPC origin endpoint configuration. Default: OriginProtocolPolicy.MATCH_VIEWER
|
|
25062
|
+
:param vpc_origin_name: The name of the CloudFront VPC origin endpoint configuration. Default: - generated from the ``id``
|
|
25063
|
+
:param endpoint: The VPC origin endpoint.
|
|
25064
|
+
|
|
25065
|
+
:exampleMetadata: fixture=_generated
|
|
25066
|
+
|
|
25067
|
+
Example::
|
|
25068
|
+
|
|
25069
|
+
# The code below shows an example of how to instantiate this type.
|
|
25070
|
+
# The values are placeholders you should change.
|
|
25071
|
+
from aws_cdk import aws_cloudfront as cloudfront
|
|
25072
|
+
|
|
25073
|
+
# vpc_origin_endpoint: cloudfront.VpcOriginEndpoint
|
|
25074
|
+
|
|
25075
|
+
vpc_origin_props = cloudfront.VpcOriginProps(
|
|
25076
|
+
endpoint=vpc_origin_endpoint,
|
|
25077
|
+
|
|
25078
|
+
# the properties below are optional
|
|
25079
|
+
http_port=123,
|
|
25080
|
+
https_port=123,
|
|
25081
|
+
origin_ssl_protocols=[cloudfront.OriginSslPolicy.SSL_V3],
|
|
25082
|
+
protocol_policy=cloudfront.OriginProtocolPolicy.HTTP_ONLY,
|
|
25083
|
+
vpc_origin_name="vpcOriginName"
|
|
25084
|
+
)
|
|
25085
|
+
'''
|
|
25086
|
+
if __debug__:
|
|
25087
|
+
type_hints = typing.get_type_hints(_typecheckingstub__b3781ce8dabcabae80ad6471ada771087884081a0e2fb504e9e94b69b06bd9bd)
|
|
25088
|
+
check_type(argname="argument http_port", value=http_port, expected_type=type_hints["http_port"])
|
|
25089
|
+
check_type(argname="argument https_port", value=https_port, expected_type=type_hints["https_port"])
|
|
25090
|
+
check_type(argname="argument origin_ssl_protocols", value=origin_ssl_protocols, expected_type=type_hints["origin_ssl_protocols"])
|
|
25091
|
+
check_type(argname="argument protocol_policy", value=protocol_policy, expected_type=type_hints["protocol_policy"])
|
|
25092
|
+
check_type(argname="argument vpc_origin_name", value=vpc_origin_name, expected_type=type_hints["vpc_origin_name"])
|
|
25093
|
+
check_type(argname="argument endpoint", value=endpoint, expected_type=type_hints["endpoint"])
|
|
25094
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
25095
|
+
"endpoint": endpoint,
|
|
25096
|
+
}
|
|
25097
|
+
if http_port is not None:
|
|
25098
|
+
self._values["http_port"] = http_port
|
|
25099
|
+
if https_port is not None:
|
|
25100
|
+
self._values["https_port"] = https_port
|
|
25101
|
+
if origin_ssl_protocols is not None:
|
|
25102
|
+
self._values["origin_ssl_protocols"] = origin_ssl_protocols
|
|
25103
|
+
if protocol_policy is not None:
|
|
25104
|
+
self._values["protocol_policy"] = protocol_policy
|
|
25105
|
+
if vpc_origin_name is not None:
|
|
25106
|
+
self._values["vpc_origin_name"] = vpc_origin_name
|
|
25107
|
+
|
|
25108
|
+
@builtins.property
|
|
25109
|
+
def http_port(self) -> typing.Optional[jsii.Number]:
|
|
25110
|
+
'''The HTTP port for the CloudFront VPC origin endpoint configuration.
|
|
25111
|
+
|
|
25112
|
+
:default: 80
|
|
25113
|
+
'''
|
|
25114
|
+
result = self._values.get("http_port")
|
|
25115
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
25116
|
+
|
|
25117
|
+
@builtins.property
|
|
25118
|
+
def https_port(self) -> typing.Optional[jsii.Number]:
|
|
25119
|
+
'''The HTTPS port of the CloudFront VPC origin endpoint configuration.
|
|
25120
|
+
|
|
25121
|
+
:default: 443
|
|
25122
|
+
'''
|
|
25123
|
+
result = self._values.get("https_port")
|
|
25124
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
25125
|
+
|
|
25126
|
+
@builtins.property
|
|
25127
|
+
def origin_ssl_protocols(self) -> typing.Optional[typing.List[OriginSslPolicy]]:
|
|
25128
|
+
'''A list that contains allowed SSL/TLS protocols for this distribution.
|
|
25129
|
+
|
|
25130
|
+
:default: - TLSv1.2
|
|
25131
|
+
'''
|
|
25132
|
+
result = self._values.get("origin_ssl_protocols")
|
|
25133
|
+
return typing.cast(typing.Optional[typing.List[OriginSslPolicy]], result)
|
|
25134
|
+
|
|
25135
|
+
@builtins.property
|
|
25136
|
+
def protocol_policy(self) -> typing.Optional[OriginProtocolPolicy]:
|
|
25137
|
+
'''The origin protocol policy for the CloudFront VPC origin endpoint configuration.
|
|
25138
|
+
|
|
25139
|
+
:default: OriginProtocolPolicy.MATCH_VIEWER
|
|
25140
|
+
'''
|
|
25141
|
+
result = self._values.get("protocol_policy")
|
|
25142
|
+
return typing.cast(typing.Optional[OriginProtocolPolicy], result)
|
|
25143
|
+
|
|
25144
|
+
@builtins.property
|
|
25145
|
+
def vpc_origin_name(self) -> typing.Optional[builtins.str]:
|
|
25146
|
+
'''The name of the CloudFront VPC origin endpoint configuration.
|
|
25147
|
+
|
|
25148
|
+
:default: - generated from the ``id``
|
|
25149
|
+
'''
|
|
25150
|
+
result = self._values.get("vpc_origin_name")
|
|
25151
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
25152
|
+
|
|
25153
|
+
@builtins.property
|
|
25154
|
+
def endpoint(self) -> VpcOriginEndpoint:
|
|
25155
|
+
'''The VPC origin endpoint.'''
|
|
25156
|
+
result = self._values.get("endpoint")
|
|
25157
|
+
assert result is not None, "Required property 'endpoint' is missing"
|
|
25158
|
+
return typing.cast(VpcOriginEndpoint, result)
|
|
25159
|
+
|
|
25160
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
25161
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
25162
|
+
|
|
25163
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
25164
|
+
return not (rhs == self)
|
|
25165
|
+
|
|
25166
|
+
def __repr__(self) -> str:
|
|
25167
|
+
return "VpcOriginProps(%s)" % ", ".join(
|
|
25168
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
25169
|
+
)
|
|
25170
|
+
|
|
25171
|
+
|
|
25172
|
+
class AssetImportSource(
|
|
25173
|
+
ImportSource,
|
|
25174
|
+
metaclass=jsii.JSIIMeta,
|
|
25175
|
+
jsii_type="aws-cdk-lib.aws_cloudfront.AssetImportSource",
|
|
25176
|
+
):
|
|
25177
|
+
'''An import source from a local file.
|
|
25178
|
+
|
|
25179
|
+
:exampleMetadata: fixture=_generated
|
|
25180
|
+
|
|
25181
|
+
Example::
|
|
25182
|
+
|
|
25183
|
+
# The code below shows an example of how to instantiate this type.
|
|
25184
|
+
# The values are placeholders you should change.
|
|
25185
|
+
import aws_cdk as cdk
|
|
25186
|
+
from aws_cdk import aws_cloudfront as cloudfront
|
|
25187
|
+
from aws_cdk import aws_iam as iam
|
|
25188
|
+
from aws_cdk import aws_kms as kms
|
|
25189
|
+
|
|
25190
|
+
# docker_image: cdk.DockerImage
|
|
25191
|
+
# grantable: iam.IGrantable
|
|
25192
|
+
# key: kms.Key
|
|
25193
|
+
# local_bundling: cdk.ILocalBundling
|
|
25194
|
+
|
|
25195
|
+
asset_import_source = cloudfront.AssetImportSource.from_asset("path",
|
|
25196
|
+
asset_hash="assetHash",
|
|
25197
|
+
asset_hash_type=cdk.AssetHashType.SOURCE,
|
|
25198
|
+
bundling=cdk.BundlingOptions(
|
|
25199
|
+
image=docker_image,
|
|
25200
|
+
|
|
25201
|
+
# the properties below are optional
|
|
25202
|
+
bundling_file_access=cdk.BundlingFileAccess.VOLUME_COPY,
|
|
25203
|
+
command=["command"],
|
|
25204
|
+
entrypoint=["entrypoint"],
|
|
25205
|
+
environment={
|
|
25206
|
+
"environment_key": "environment"
|
|
25207
|
+
},
|
|
25208
|
+
local=local_bundling,
|
|
25209
|
+
network="network",
|
|
25210
|
+
output_type=cdk.BundlingOutput.ARCHIVED,
|
|
25211
|
+
platform="platform",
|
|
25212
|
+
security_opt="securityOpt",
|
|
25213
|
+
user="user",
|
|
25214
|
+
volumes=[cdk.DockerVolume(
|
|
25215
|
+
container_path="containerPath",
|
|
25216
|
+
host_path="hostPath",
|
|
25217
|
+
|
|
25218
|
+
# the properties below are optional
|
|
25219
|
+
consistency=cdk.DockerVolumeConsistency.CONSISTENT
|
|
25220
|
+
)],
|
|
25221
|
+
volumes_from=["volumesFrom"],
|
|
25222
|
+
working_directory="workingDirectory"
|
|
25223
|
+
),
|
|
25224
|
+
deploy_time=False,
|
|
25225
|
+
exclude=["exclude"],
|
|
25226
|
+
follow_symlinks=cdk.SymlinkFollowMode.NEVER,
|
|
25227
|
+
ignore_mode=cdk.IgnoreMode.GLOB,
|
|
25228
|
+
readers=[grantable],
|
|
25229
|
+
source_kMSKey=key
|
|
25230
|
+
)
|
|
25231
|
+
'''
|
|
25232
|
+
|
|
25233
|
+
def __init__(
|
|
25234
|
+
self,
|
|
25235
|
+
path: builtins.str,
|
|
25236
|
+
*,
|
|
25237
|
+
deploy_time: typing.Optional[builtins.bool] = None,
|
|
25238
|
+
readers: typing.Optional[typing.Sequence[_IGrantable_71c4f5de]] = None,
|
|
25239
|
+
source_kms_key: typing.Optional[_IKey_5f11635f] = None,
|
|
25240
|
+
asset_hash: typing.Optional[builtins.str] = None,
|
|
25241
|
+
asset_hash_type: typing.Optional[_AssetHashType_05b67f2d] = None,
|
|
25242
|
+
bundling: typing.Optional[typing.Union[_BundlingOptions_588cc936, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
25243
|
+
exclude: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
25244
|
+
follow_symlinks: typing.Optional[_SymlinkFollowMode_047ec1f6] = None,
|
|
25245
|
+
ignore_mode: typing.Optional[_IgnoreMode_655a98e8] = None,
|
|
25246
|
+
) -> None:
|
|
25247
|
+
'''
|
|
25248
|
+
:param path: the path to the local file.
|
|
25249
|
+
:param deploy_time: Whether or not the asset needs to exist beyond deployment time; i.e. are copied over to a different location and not needed afterwards. Setting this property to true has an impact on the lifecycle of the asset, because we will assume that it is safe to delete after the CloudFormation deployment succeeds. For example, Lambda Function assets are copied over to Lambda during deployment. Therefore, it is not necessary to store the asset in S3, so we consider those deployTime assets. Default: false
|
|
25250
|
+
:param readers: A list of principals that should be able to read this asset from S3. You can use ``asset.grantRead(principal)`` to grant read permissions later. Default: - No principals that can read file asset.
|
|
25251
|
+
:param source_kms_key: The ARN of the KMS key used to encrypt the handler code. Default: - the default server-side encryption with Amazon S3 managed keys(SSE-S3) key will be used.
|
|
25252
|
+
:param asset_hash: Specify a custom hash for this asset. If ``assetHashType`` is set it must be set to ``AssetHashType.CUSTOM``. For consistency, this custom hash will be SHA256 hashed and encoded as hex. The resulting hash will be the asset hash. NOTE: the hash is used in order to identify a specific revision of the asset, and used for optimizing and caching deployment activities related to this asset such as packaging, uploading to Amazon S3, etc. If you chose to customize the hash, you will need to make sure it is updated every time the asset changes, or otherwise it is possible that some deployments will not be invalidated. Default: - based on ``assetHashType``
|
|
25253
|
+
:param asset_hash_type: Specifies the type of hash to calculate for this asset. If ``assetHash`` is configured, this option must be ``undefined`` or ``AssetHashType.CUSTOM``. Default: - the default is ``AssetHashType.SOURCE``, but if ``assetHash`` is explicitly specified this value defaults to ``AssetHashType.CUSTOM``.
|
|
25254
|
+
:param bundling: Bundle the asset by executing a command in a Docker container or a custom bundling provider. The asset path will be mounted at ``/asset-input``. The Docker container is responsible for putting content at ``/asset-output``. The content at ``/asset-output`` will be zipped and used as the final asset. Default: - uploaded as-is to S3 if the asset is a regular file or a .zip file, archived into a .zip file and uploaded to S3 otherwise
|
|
25255
|
+
:param exclude: File paths matching the patterns will be excluded. See ``ignoreMode`` to set the matching behavior. Has no effect on Assets bundled using the ``bundling`` property. Default: - nothing is excluded
|
|
25256
|
+
:param follow_symlinks: A strategy for how to handle symlinks. Default: SymlinkFollowMode.NEVER
|
|
25257
|
+
:param ignore_mode: The ignore behavior to use for ``exclude`` patterns. Default: IgnoreMode.GLOB
|
|
25258
|
+
'''
|
|
25259
|
+
if __debug__:
|
|
25260
|
+
type_hints = typing.get_type_hints(_typecheckingstub__62441d3d3228ae5fb69aaca12e603944f07f9335dae80f70ce3b04e8e353f020)
|
|
25261
|
+
check_type(argname="argument path", value=path, expected_type=type_hints["path"])
|
|
25262
|
+
options = _AssetOptions_2aa69621(
|
|
25263
|
+
deploy_time=deploy_time,
|
|
25264
|
+
readers=readers,
|
|
25265
|
+
source_kms_key=source_kms_key,
|
|
25266
|
+
asset_hash=asset_hash,
|
|
25267
|
+
asset_hash_type=asset_hash_type,
|
|
25268
|
+
bundling=bundling,
|
|
25269
|
+
exclude=exclude,
|
|
25270
|
+
follow_symlinks=follow_symlinks,
|
|
25271
|
+
ignore_mode=ignore_mode,
|
|
25272
|
+
)
|
|
25273
|
+
|
|
25274
|
+
jsii.create(self.__class__, self, [path, options])
|
|
25275
|
+
|
|
25276
|
+
@builtins.property
|
|
25277
|
+
@jsii.member(jsii_name="path")
|
|
25278
|
+
def path(self) -> builtins.str:
|
|
25279
|
+
'''the path to the local file.'''
|
|
25280
|
+
return typing.cast(builtins.str, jsii.get(self, "path"))
|
|
25281
|
+
|
|
25282
|
+
|
|
25283
|
+
@jsii.implements(ICachePolicy)
|
|
25284
|
+
class CachePolicy(
|
|
25285
|
+
_Resource_45bc6135,
|
|
25286
|
+
metaclass=jsii.JSIIMeta,
|
|
25287
|
+
jsii_type="aws-cdk-lib.aws_cloudfront.CachePolicy",
|
|
25288
|
+
):
|
|
25289
|
+
'''A Cache Policy configuration.
|
|
25290
|
+
|
|
25291
|
+
:link: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html
|
|
25292
|
+
:resource: AWS::CloudFront::CachePolicy
|
|
25293
|
+
:exampleMetadata: infused
|
|
25294
|
+
|
|
25295
|
+
Example::
|
|
25296
|
+
|
|
25297
|
+
# Using an existing cache policy for a Distribution
|
|
25298
|
+
# bucket_origin: origins.S3Origin
|
|
25299
|
+
|
|
25300
|
+
cloudfront.Distribution(self, "myDistManagedPolicy",
|
|
25301
|
+
default_behavior=cloudfront.BehaviorOptions(
|
|
25302
|
+
origin=bucket_origin,
|
|
25303
|
+
cache_policy=cloudfront.CachePolicy.CACHING_OPTIMIZED
|
|
25304
|
+
)
|
|
25305
|
+
)
|
|
25306
|
+
'''
|
|
25307
|
+
|
|
25308
|
+
def __init__(
|
|
25309
|
+
self,
|
|
25310
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
25311
|
+
id: builtins.str,
|
|
25312
|
+
*,
|
|
25313
|
+
cache_policy_name: typing.Optional[builtins.str] = None,
|
|
24526
25314
|
comment: typing.Optional[builtins.str] = None,
|
|
24527
25315
|
cookie_behavior: typing.Optional[CacheCookieBehavior] = None,
|
|
24528
25316
|
default_ttl: typing.Optional[_Duration_4839e8c3] = None,
|
|
@@ -25013,6 +25801,7 @@ class Distribution(
|
|
|
25013
25801
|
cache_policy: typing.Optional[ICachePolicy] = None,
|
|
25014
25802
|
compress: typing.Optional[builtins.bool] = None,
|
|
25015
25803
|
edge_lambdas: typing.Optional[typing.Sequence[typing.Union[EdgeLambda, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
25804
|
+
enable_grpc: typing.Optional[builtins.bool] = None,
|
|
25016
25805
|
function_associations: typing.Optional[typing.Sequence[typing.Union[FunctionAssociation, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
25017
25806
|
origin_request_policy: typing.Optional[IOriginRequestPolicy] = None,
|
|
25018
25807
|
realtime_log_config: typing.Optional[IRealtimeLogConfig] = None,
|
|
@@ -25030,6 +25819,7 @@ class Distribution(
|
|
|
25030
25819
|
:param cache_policy: The cache policy for this behavior. The cache policy determines what values are included in the cache key, and the time-to-live (TTL) values for the cache. Default: CachePolicy.CACHING_OPTIMIZED
|
|
25031
25820
|
:param compress: Whether you want CloudFront to automatically compress certain files for this cache behavior. See https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html#compressed-content-cloudfront-file-types for file types CloudFront will compress. Default: true
|
|
25032
25821
|
:param edge_lambdas: The Lambda@Edge functions to invoke before serving the contents. Default: - no Lambda functions will be invoked
|
|
25822
|
+
:param enable_grpc: Enables your CloudFront distribution to receive gRPC requests and to proxy them directly to your origins. If the ``enableGrpc`` is set to true, the following restrictions apply: - The ``allowedMethods`` property must be ``AllowedMethods.ALLOW_ALL`` to include POST method because gRPC only supports POST method. - The ``httpVersion`` property must be ``HttpVersion.HTTP2`` or ``HttpVersion.HTTP2_AND_3`` because gRPC only supports versions including HTTP/2. - The ``edgeLambdas`` property can't be specified because gRPC is not supported with Lambda@Edge. Default: false
|
|
25033
25823
|
:param function_associations: The CloudFront functions to invoke before serving the contents. Default: - no functions will be invoked
|
|
25034
25824
|
:param origin_request_policy: The origin request policy for this behavior. The origin request policy determines which values (e.g., headers, cookies) are included in requests that CloudFront sends to the origin. Default: - none
|
|
25035
25825
|
:param realtime_log_config: The real-time log configuration to be attached to this cache behavior. Default: - none
|
|
@@ -25048,6 +25838,7 @@ class Distribution(
|
|
|
25048
25838
|
cache_policy=cache_policy,
|
|
25049
25839
|
compress=compress,
|
|
25050
25840
|
edge_lambdas=edge_lambdas,
|
|
25841
|
+
enable_grpc=enable_grpc,
|
|
25051
25842
|
function_associations=function_associations,
|
|
25052
25843
|
origin_request_policy=origin_request_policy,
|
|
25053
25844
|
realtime_log_config=realtime_log_config,
|
|
@@ -26238,6 +27029,7 @@ __all__ = [
|
|
|
26238
27029
|
"IPublicKey",
|
|
26239
27030
|
"IRealtimeLogConfig",
|
|
26240
27031
|
"IResponseHeadersPolicy",
|
|
27032
|
+
"IVpcOrigin",
|
|
26241
27033
|
"ImportSource",
|
|
26242
27034
|
"InlineImportSource",
|
|
26243
27035
|
"KeyGroup",
|
|
@@ -26295,6 +27087,11 @@ __all__ = [
|
|
|
26295
27087
|
"ViewerCertificate",
|
|
26296
27088
|
"ViewerCertificateOptions",
|
|
26297
27089
|
"ViewerProtocolPolicy",
|
|
27090
|
+
"VpcOrigin",
|
|
27091
|
+
"VpcOriginAttributes",
|
|
27092
|
+
"VpcOriginEndpoint",
|
|
27093
|
+
"VpcOriginOptions",
|
|
27094
|
+
"VpcOriginProps",
|
|
26298
27095
|
"experimental",
|
|
26299
27096
|
]
|
|
26300
27097
|
|
|
@@ -26310,6 +27107,7 @@ def _typecheckingstub__65772d6db92564a1181169ceb316d515431097e5d91750c338502393d
|
|
|
26310
27107
|
cache_policy: typing.Optional[ICachePolicy] = None,
|
|
26311
27108
|
compress: typing.Optional[builtins.bool] = None,
|
|
26312
27109
|
edge_lambdas: typing.Optional[typing.Sequence[typing.Union[EdgeLambda, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
27110
|
+
enable_grpc: typing.Optional[builtins.bool] = None,
|
|
26313
27111
|
function_associations: typing.Optional[typing.Sequence[typing.Union[FunctionAssociation, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
26314
27112
|
origin_request_policy: typing.Optional[IOriginRequestPolicy] = None,
|
|
26315
27113
|
realtime_log_config: typing.Optional[IRealtimeLogConfig] = None,
|
|
@@ -26348,6 +27146,7 @@ def _typecheckingstub__4eb7e06f76f798ae0a32c303cbe5f500a4fd80b03804aa96894c0cddc
|
|
|
26348
27146
|
cache_policy: typing.Optional[ICachePolicy] = None,
|
|
26349
27147
|
compress: typing.Optional[builtins.bool] = None,
|
|
26350
27148
|
edge_lambdas: typing.Optional[typing.Sequence[typing.Union[EdgeLambda, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
27149
|
+
enable_grpc: typing.Optional[builtins.bool] = None,
|
|
26351
27150
|
function_associations: typing.Optional[typing.Sequence[typing.Union[FunctionAssociation, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
26352
27151
|
origin_request_policy: typing.Optional[IOriginRequestPolicy] = None,
|
|
26353
27152
|
realtime_log_config: typing.Optional[IRealtimeLogConfig] = None,
|
|
@@ -28598,6 +29397,97 @@ def _typecheckingstub__d1fca8e67199164c4d795df93e2e45befd6c6e688025259d033408b16
|
|
|
28598
29397
|
"""Type checking stubs"""
|
|
28599
29398
|
pass
|
|
28600
29399
|
|
|
29400
|
+
def _typecheckingstub__998be59ed4f6babe6930bce84041b072a68877dd129a90f3f7ff729f39569e9c(
|
|
29401
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
29402
|
+
id: builtins.str,
|
|
29403
|
+
*,
|
|
29404
|
+
endpoint: VpcOriginEndpoint,
|
|
29405
|
+
http_port: typing.Optional[jsii.Number] = None,
|
|
29406
|
+
https_port: typing.Optional[jsii.Number] = None,
|
|
29407
|
+
origin_ssl_protocols: typing.Optional[typing.Sequence[OriginSslPolicy]] = None,
|
|
29408
|
+
protocol_policy: typing.Optional[OriginProtocolPolicy] = None,
|
|
29409
|
+
vpc_origin_name: typing.Optional[builtins.str] = None,
|
|
29410
|
+
) -> None:
|
|
29411
|
+
"""Type checking stubs"""
|
|
29412
|
+
pass
|
|
29413
|
+
|
|
29414
|
+
def _typecheckingstub__4c9f072fdf3e48d903220d18d2af9c155e6769b7577c4d4f171830da0f9d5163(
|
|
29415
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
29416
|
+
id: builtins.str,
|
|
29417
|
+
vpc_origin_arn: builtins.str,
|
|
29418
|
+
) -> None:
|
|
29419
|
+
"""Type checking stubs"""
|
|
29420
|
+
pass
|
|
29421
|
+
|
|
29422
|
+
def _typecheckingstub__0ba8097a17cca24c063a5fd81fd0d90aa0e067cd79f2834ac88e9247a2ba1e93(
|
|
29423
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
29424
|
+
id: builtins.str,
|
|
29425
|
+
*,
|
|
29426
|
+
domain_name: typing.Optional[builtins.str] = None,
|
|
29427
|
+
vpc_origin_arn: typing.Optional[builtins.str] = None,
|
|
29428
|
+
vpc_origin_id: typing.Optional[builtins.str] = None,
|
|
29429
|
+
) -> None:
|
|
29430
|
+
"""Type checking stubs"""
|
|
29431
|
+
pass
|
|
29432
|
+
|
|
29433
|
+
def _typecheckingstub__7df1a8ecdd841e03add189e788ca2b0ecd250cd46a247318d3eacced6a3db276(
|
|
29434
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
29435
|
+
id: builtins.str,
|
|
29436
|
+
vpc_origin_id: builtins.str,
|
|
29437
|
+
) -> None:
|
|
29438
|
+
"""Type checking stubs"""
|
|
29439
|
+
pass
|
|
29440
|
+
|
|
29441
|
+
def _typecheckingstub__0e378056dfebabd64eec79fbd87a1a7a2c3b26bf2ab9463d659e417bf92f74c5(
|
|
29442
|
+
*,
|
|
29443
|
+
domain_name: typing.Optional[builtins.str] = None,
|
|
29444
|
+
vpc_origin_arn: typing.Optional[builtins.str] = None,
|
|
29445
|
+
vpc_origin_id: typing.Optional[builtins.str] = None,
|
|
29446
|
+
) -> None:
|
|
29447
|
+
"""Type checking stubs"""
|
|
29448
|
+
pass
|
|
29449
|
+
|
|
29450
|
+
def _typecheckingstub__6a95d20ca8db6bfe1227b47fc98da59fed8dbab051c0e8b028b9b3285672ddce(
|
|
29451
|
+
alb: _IApplicationLoadBalancer_4cbd50ab,
|
|
29452
|
+
) -> None:
|
|
29453
|
+
"""Type checking stubs"""
|
|
29454
|
+
pass
|
|
29455
|
+
|
|
29456
|
+
def _typecheckingstub__1338909f764189d3d71094278189d5e4d05d08b426fd2d58a1734ef150a07bd4(
|
|
29457
|
+
instance: _IInstance_ab239e7c,
|
|
29458
|
+
) -> None:
|
|
29459
|
+
"""Type checking stubs"""
|
|
29460
|
+
pass
|
|
29461
|
+
|
|
29462
|
+
def _typecheckingstub__818863b0770e9bfeaa545f403f7b87c64ea9684eae160350df445cf51fc06101(
|
|
29463
|
+
nlb: _INetworkLoadBalancer_96e17101,
|
|
29464
|
+
) -> None:
|
|
29465
|
+
"""Type checking stubs"""
|
|
29466
|
+
pass
|
|
29467
|
+
|
|
29468
|
+
def _typecheckingstub__a89a687db27974ad058448847b73db0fc172703d38e1e97a3712f7c6fa7a797a(
|
|
29469
|
+
*,
|
|
29470
|
+
http_port: typing.Optional[jsii.Number] = None,
|
|
29471
|
+
https_port: typing.Optional[jsii.Number] = None,
|
|
29472
|
+
origin_ssl_protocols: typing.Optional[typing.Sequence[OriginSslPolicy]] = None,
|
|
29473
|
+
protocol_policy: typing.Optional[OriginProtocolPolicy] = None,
|
|
29474
|
+
vpc_origin_name: typing.Optional[builtins.str] = None,
|
|
29475
|
+
) -> None:
|
|
29476
|
+
"""Type checking stubs"""
|
|
29477
|
+
pass
|
|
29478
|
+
|
|
29479
|
+
def _typecheckingstub__b3781ce8dabcabae80ad6471ada771087884081a0e2fb504e9e94b69b06bd9bd(
|
|
29480
|
+
*,
|
|
29481
|
+
http_port: typing.Optional[jsii.Number] = None,
|
|
29482
|
+
https_port: typing.Optional[jsii.Number] = None,
|
|
29483
|
+
origin_ssl_protocols: typing.Optional[typing.Sequence[OriginSslPolicy]] = None,
|
|
29484
|
+
protocol_policy: typing.Optional[OriginProtocolPolicy] = None,
|
|
29485
|
+
vpc_origin_name: typing.Optional[builtins.str] = None,
|
|
29486
|
+
endpoint: VpcOriginEndpoint,
|
|
29487
|
+
) -> None:
|
|
29488
|
+
"""Type checking stubs"""
|
|
29489
|
+
pass
|
|
29490
|
+
|
|
28601
29491
|
def _typecheckingstub__62441d3d3228ae5fb69aaca12e603944f07f9335dae80f70ce3b04e8e353f020(
|
|
28602
29492
|
path: builtins.str,
|
|
28603
29493
|
*,
|
|
@@ -28731,6 +29621,7 @@ def _typecheckingstub__f94c33f8f74d148b7c436f42a002e770c6ad95241e489b963596aea62
|
|
|
28731
29621
|
cache_policy: typing.Optional[ICachePolicy] = None,
|
|
28732
29622
|
compress: typing.Optional[builtins.bool] = None,
|
|
28733
29623
|
edge_lambdas: typing.Optional[typing.Sequence[typing.Union[EdgeLambda, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
29624
|
+
enable_grpc: typing.Optional[builtins.bool] = None,
|
|
28734
29625
|
function_associations: typing.Optional[typing.Sequence[typing.Union[FunctionAssociation, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
28735
29626
|
origin_request_policy: typing.Optional[IOriginRequestPolicy] = None,
|
|
28736
29627
|
realtime_log_config: typing.Optional[IRealtimeLogConfig] = None,
|