Metadata-Version: 2.1
Name: aws-cdk.aws-cloudfront
Version: 1.47.1
Summary: CDK Constructs for AWS CloudFront
Home-page: https://github.com/aws/aws-cdk
Author: Amazon Web Services
License: Apache-2.0
Project-URL: Source, https://github.com/aws/aws-cdk.git
Description: ## Amazon CloudFront Construct Library
        
        <!--BEGIN STABILITY BANNER-->---
        
        
        ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge)
        
        > All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use.
        
        ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)
        
        > The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
        
        ---
        <!--END STABILITY BANNER-->
        
        A CloudFront construct - for setting up the AWS CDN with ease!
        
        Example usage:
        
        ```python
        # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
        source_bucket = Bucket(self, "Bucket")
        
        distribution = CloudFrontWebDistribution(self, "MyDistribution",
            origin_configs=[{
                "s3_origin_source": {
                    "s3_bucket_source": source_bucket
                },
                "behaviors": [{"is_default_behavior": True}]
            }
            ]
        )
        ```
        
        ### Viewer certificate
        
        By default, CloudFront Web Distributions will answer HTTPS requests with CloudFront's default certificate, only containing the distribution `domainName` (e.g. d111111abcdef8.cloudfront.net).
        You can customize the viewer certificate property to provide a custom certificate and/or list of domain name aliases to fit your needs.
        
        See [Using Alternate Domain Names and HTTPS](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-alternate-domain-names.html) in the CloudFront User Guide.
        
        #### Default certificate
        
        You can customize the default certificate aliases. This is intended to be used in combination with CNAME records in your DNS zone.
        
        Example:
        
        ```python
        # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
        s3_bucket_source = s3.Bucket(self, "Bucket")
        
        distribution = cloudfront.CloudFrontWebDistribution(self, "AnAmazingWebsiteProbably",
            origin_configs=[SourceConfiguration(
                s3_origin_source=S3OriginConfig(s3_bucket_source=s3_bucket_source),
                behaviors=[Behavior(is_default_behavior=True)]
            )],
            viewer_certificate=cloudfront.ViewerCertificate.from_cloud_front_default_certificate("www.example.com")
        )
        ```
        
        #### ACM certificate
        
        You can change the default certificate by one stored AWS Certificate Manager, or ACM.
        Those certificate can either be generated by AWS, or purchased by another CA imported into ACM.
        
        For more information, see [the aws-certificatemanager module documentation](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-certificatemanager-readme.html) or [Importing Certificates into AWS Certificate Manager](https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) in the AWS Certificate Manager User Guide.
        
        Example:
        
        ```python
        # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
        s3_bucket_source = s3.Bucket(self, "Bucket")
        
        certificate = certificatemanager.Certificate(self, "Certificate",
            domain_name="example.com",
            subject_alternative_names=["*.example.com"]
        )
        
        distribution = cloudfront.CloudFrontWebDistribution(self, "AnAmazingWebsiteProbably",
            origin_configs=[SourceConfiguration(
                s3_origin_source=S3OriginConfig(s3_bucket_source=s3_bucket_source),
                behaviors=[Behavior(is_default_behavior=True)]
            )],
            viewer_certificate=cloudfront.ViewerCertificate.from_acm_certificate(certificate,
                aliases=["example.com", "www.example.com"],
                security_policy=cloudfront.SecurityPolicyProtocol.TLS_V1, # default
                ssl_method=cloudfront.SSLMethod.SNI
            )
        )
        ```
        
        #### IAM certificate
        
        You can also import a certificate into the IAM certificate store.
        
        See [Importing an SSL/TLS Certificate](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cnames-and-https-procedures.html#cnames-and-https-uploading-certificates) in the CloudFront User Guide.
        
        Example:
        
        ```python
        # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
        s3_bucket_source = s3.Bucket(self, "Bucket")
        
        distribution = cloudfront.CloudFrontWebDistribution(self, "AnAmazingWebsiteProbably",
            origin_configs=[SourceConfiguration(
                s3_origin_source=S3OriginConfig(s3_bucket_source=s3_bucket_source),
                behaviors=[Behavior(is_default_behavior=True)]
            )],
            viewer_certificate=cloudfront.ViewerCertificate.from_iam_certificate("certificateId",
                aliases=["example.com"],
                security_policy=cloudfront.SecurityPolicyProtocol.SSL_V3, # default
                ssl_method=cloudfront.SSLMethod.SNI
            )
        )
        ```
        
        #### Restrictions
        
        CloudFront supports adding restrictions to your distribution.
        
        See [Restricting the Geographic Distribution of Your Content](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/georestrictions.html) in the CloudFront User Guide.
        
        Example:
        
        ```python
        # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
        cloudfront.CloudFrontWebDistribution(stack, "MyDistribution",
            # ...
            geo_restriction=GeoRestriction.whitelist("US", "UK")
        )
        ```
        
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: JavaScript
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Typing :: Typed
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved
Requires-Python: >=3.6
Description-Content-Type: text/markdown
