From d90641eadf7a1d27050bfc427f9ea4df9061bf58 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Mon, 7 Dec 2020 18:30:00 +0000 Subject: [PATCH] feat(cloudfront): the Distribution construct is now Generally Available (stable) Marking the `Distribution` construct APIs -- and so the whole module -- as stable/GA. --- packages/@aws-cdk/aws-cloudfront/README.md | 36 ++++--------------- .../aws-cloudfront/lib/cache-policy.ts | 6 ---- .../aws-cloudfront/lib/distribution.ts | 12 ------- .../lib/origin-request-policy.ts | 6 ---- .../@aws-cdk/aws-cloudfront/lib/origin.ts | 6 ---- .../aws-cloudfront/lib/web_distribution.ts | 2 -- packages/@aws-cdk/aws-cloudfront/package.json | 14 ++------ 7 files changed, 8 insertions(+), 74 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront/README.md b/packages/@aws-cdk/aws-cloudfront/README.md index 689cb77945452..cccfb7405488e 100644 --- a/packages/@aws-cdk/aws-cloudfront/README.md +++ b/packages/@aws-cdk/aws-cloudfront/README.md @@ -3,30 +3,9 @@ --- -Features | Stability -------------------------------------------------------|--------------------------------------------- -CFN Resources | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) -Higher level constructs for Distribution | ![Developer Preview](https://img.shields.io/badge/developer--preview-informational.svg?style=for-the-badge) -Higher level constructs for CloudFrontWebDistribution | ![Stable](https://img.shields.io/badge/stable-success.svg?style=for-the-badge) +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> **CFN Resources:** All classes with the `Cfn` prefix in this module ([CFN Resources]) are always -> stable and safe to use. -> -> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib - - - -> **Developer Preview:** Higher level constructs in this module that are marked as developer -> preview have completed their phase of active development and are looking for adoption and -> feedback. While the same caveats around non-backward compatible as Experimental constructs apply, -> they will undergo fewer breaking changes. Just as with Experimental constructs, these are not -> subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be -> announced in the release notes. - - - -> **Stable:** Higher level constructs in this module that are marked stable will not undergo any -> breaking changes. They will strictly follow the [Semantic Versioning](https://semver.org/) model. +![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- @@ -37,9 +16,7 @@ your users. CloudFront delivers your content through a worldwide network of data you're serving with CloudFront, the user is routed to the edge location that provides the lowest latency, so that content is delivered with the best possible performance. -## Distribution API - Developer Preview - -![Developer Preview](https://img.shields.io/badge/developer--preview-informational.svg?style=for-the-badge) +## Distribution API The `Distribution` API is currently being built to replace the existing `CloudFrontWebDistribution` API. The `Distribution` API is optimized for the most common use cases of CloudFront distributions (e.g., single origin and behavior, few customizations) while still providing the ability for more @@ -384,11 +361,10 @@ const distribution = cloudfront.Distribution.fromDistributionAttributes(scope, ' }); ``` -## CloudFrontWebDistribution API - Stable - -![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) +## CloudFrontWebDistribution API -A CloudFront construct - for setting up the AWS CDN with ease! +> The `CloudFrontWebDistribution` construct is the original construct written for working with CloudFront distributions. +> Users are encouraged to use the newer `Distribution` instead, as it has a simpler interface and receives new features faster. Example usage: diff --git a/packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts b/packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts index 30d3e6b97db74..18924ade79748 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts @@ -4,7 +4,6 @@ import { CfnCachePolicy } from './cloudfront.generated'; /** * Represents a Cache Policy - * @experimental */ export interface ICachePolicy { /** @@ -16,7 +15,6 @@ export interface ICachePolicy { /** * Properties for creating a Cache Policy - * @experimental */ export interface CachePolicyProps { /** @@ -87,7 +85,6 @@ export interface CachePolicyProps { * A Cache Policy configuration. * * @resource AWS::CloudFront::CachePolicy - * @experimental */ export class CachePolicy extends Resource implements ICachePolicy { @@ -178,7 +175,6 @@ export class CachePolicy extends Resource implements ICachePolicy { /** * Determines whether any cookies in viewer requests are included in the cache key and * automatically included in requests that CloudFront sends to the origin. - * @experimental */ export class CacheCookieBehavior { /** @@ -226,7 +222,6 @@ export class CacheCookieBehavior { /** * Determines whether any HTTP headers are included in the cache key and automatically included in requests that CloudFront sends to the origin. - * @experimental */ export class CacheHeaderBehavior { /** HTTP headers are not included in the cache key and are not automatically included in requests that CloudFront sends to the origin. */ @@ -253,7 +248,6 @@ export class CacheHeaderBehavior { /** * Determines whether any URL query strings in viewer requests are included in the cache key * and automatically included in requests that CloudFront sends to the origin. - * @experimental */ export class CacheQueryStringBehavior { /** diff --git a/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts b/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts index e339f9d7541a6..af66ab1faa205 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts @@ -43,8 +43,6 @@ export interface IDistribution extends IResource { /** * Attributes used to import a Distribution. - * - * @experimental */ export interface DistributionAttributes { /** @@ -69,8 +67,6 @@ interface BoundOrigin extends OriginBindOptions, OriginBindConfig { /** * Properties for a Distribution - * - * @experimental */ export interface DistributionProps { /** @@ -214,8 +210,6 @@ export interface DistributionProps { /** * A CloudFront distribution with associated origin(s) and caching behavior(s). - * - * @experimental */ export class Distribution extends Resource implements IDistribution { @@ -555,8 +549,6 @@ export class CachedMethods { /** * Options for configuring custom error responses. - * - * @experimental */ export interface ErrorResponse { /** @@ -640,8 +632,6 @@ export interface EdgeLambda { /** * Options for adding a new behavior to a Distribution. - * - * @experimental */ export interface AddBehaviorOptions { /** @@ -709,8 +699,6 @@ export interface AddBehaviorOptions { /** * Options for creating a new behavior. - * - * @experimental */ export interface BehaviorOptions extends AddBehaviorOptions { /** diff --git a/packages/@aws-cdk/aws-cloudfront/lib/origin-request-policy.ts b/packages/@aws-cdk/aws-cloudfront/lib/origin-request-policy.ts index 8f279c7ddb213..3d45cf2bc56fb 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/origin-request-policy.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/origin-request-policy.ts @@ -4,7 +4,6 @@ import { CfnOriginRequestPolicy } from './cloudfront.generated'; /** * Represents a Origin Request Policy - * @experimental */ export interface IOriginRequestPolicy { /** @@ -16,7 +15,6 @@ export interface IOriginRequestPolicy { /** * Properties for creating a Origin Request Policy - * @experimental */ export interface OriginRequestPolicyProps { /** @@ -55,7 +53,6 @@ export interface OriginRequestPolicyProps { * A Origin Request Policy configuration. * * @resource AWS::CloudFront::OriginRequestPolicy - * @experimental */ export class OriginRequestPolicy extends Resource implements IOriginRequestPolicy { @@ -126,7 +123,6 @@ export class OriginRequestPolicy extends Resource implements IOriginRequestPolic /** * Ddetermines whether any cookies in viewer requests (and if so, which cookies) * are included in requests that CloudFront sends to the origin. - * @experimental */ export class OriginRequestCookieBehavior { /** @@ -159,7 +155,6 @@ export class OriginRequestCookieBehavior { /** * Determines whether any HTTP headers (and if so, which headers) are included in requests that CloudFront sends to the origin. - * @experimental */ export class OriginRequestHeaderBehavior { /** @@ -206,7 +201,6 @@ export class OriginRequestHeaderBehavior { /** * Determines whether any URL query strings in viewer requests (and if so, which query strings) * are included in requests that CloudFront sends to the origin. - * @experimental */ export class OriginRequestQueryStringBehavior { /** diff --git a/packages/@aws-cdk/aws-cloudfront/lib/origin.ts b/packages/@aws-cdk/aws-cloudfront/lib/origin.ts index 8581ffa5e8aee..0722dff17099d 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/origin.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/origin.ts @@ -48,8 +48,6 @@ export interface IOrigin { /** * Properties to define an Origin. - * - * @experimental */ export interface OriginProps { /** @@ -85,8 +83,6 @@ export interface OriginProps { /** * Options passed to Origin.bind(). - * - * @experimental */ export interface OriginBindOptions { /** @@ -99,8 +95,6 @@ export interface OriginBindOptions { /** * Represents a distribution origin, that describes the Amazon S3 bucket, HTTP server (for example, a web server), * Amazon MediaStore, or other server from which CloudFront gets your files. - * - * @experimental */ export abstract class OriginBase implements IOrigin { private readonly domainName: string; diff --git a/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts b/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts index 6889e50739f7e..dad54c3b1488a 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts @@ -640,8 +640,6 @@ interface BehaviorWithOrigin extends Behavior { /** * Attributes used to import a Distribution. - * - * @experimental */ export interface CloudFrontWebDistributionAttributes { /** diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index a47d074758e54..680d41b669489 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -109,18 +109,8 @@ "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" }, - "stability": "experimental", - "maturity": "experimental", - "features": [ - { - "name": "Higher level constructs for Distribution", - "stability": "Developer Preview" - }, - { - "name": "Higher level constructs for CloudFrontWebDistribution", - "stability": "Stable" - } - ], + "stability": "stable", + "maturity": "stable", "awslint": { "exclude": [ "props-physical-name:@aws-cdk/aws-cloudfront.Distribution",