Skip to content

Commit

Permalink
feat(client-cloudfront): Introducing UpdateDistributionWithStagingCon…
Browse files Browse the repository at this point in the history
…fig that can be used to promote the staging configuration to the production.
  • Loading branch information
awstools committed Dec 7, 2022
1 parent 8458469 commit ce728a2
Show file tree
Hide file tree
Showing 61 changed files with 3,872 additions and 2,597 deletions.
7 changes: 4 additions & 3 deletions clients/client-cloudfront/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ AWS SDK for JavaScript CloudFront Client for Node.js, Browser and React Native.

<fullname>Amazon CloudFront</fullname>

<p>This is the <i>Amazon CloudFront API Reference</i>. This guide
is for developers who need detailed information about
CloudFront API actions, data types, and errors. For detailed information about CloudFront features, see the <i>Amazon CloudFront Developer Guide</i>.</p>
<p>This is the <i>Amazon CloudFront API Reference</i>. This guide is for developers
who need detailed information about CloudFront API actions, data types, and errors. For
detailed information about CloudFront features, see the
<i>Amazon CloudFront Developer Guide</i>.</p>

## Installing

Expand Down
498 changes: 282 additions & 216 deletions clients/client-cloudfront/src/CloudFront.ts

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions clients/client-cloudfront/src/CloudFrontClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,10 @@ import {
UpdateContinuousDeploymentPolicyCommandOutput,
} from "./commands/UpdateContinuousDeploymentPolicyCommand";
import { UpdateDistributionCommandInput, UpdateDistributionCommandOutput } from "./commands/UpdateDistributionCommand";
import {
UpdateDistributionWithStagingConfigCommandInput,
UpdateDistributionWithStagingConfigCommandOutput,
} from "./commands/UpdateDistributionWithStagingConfigCommand";
import {
UpdateFieldLevelEncryptionConfigCommandInput,
UpdateFieldLevelEncryptionConfigCommandOutput,
Expand Down Expand Up @@ -460,6 +464,7 @@ export type ServiceInputTypes =
| UpdateCloudFrontOriginAccessIdentityCommandInput
| UpdateContinuousDeploymentPolicyCommandInput
| UpdateDistributionCommandInput
| UpdateDistributionWithStagingConfigCommandInput
| UpdateFieldLevelEncryptionConfigCommandInput
| UpdateFieldLevelEncryptionProfileCommandInput
| UpdateFunctionCommandInput
Expand Down Expand Up @@ -567,6 +572,7 @@ export type ServiceOutputTypes =
| UpdateCloudFrontOriginAccessIdentityCommandOutput
| UpdateContinuousDeploymentPolicyCommandOutput
| UpdateDistributionCommandOutput
| UpdateDistributionWithStagingConfigCommandOutput
| UpdateFieldLevelEncryptionConfigCommandOutput
| UpdateFieldLevelEncryptionProfileCommandOutput
| UpdateFunctionCommandOutput
Expand Down Expand Up @@ -729,9 +735,10 @@ export interface CloudFrontClientResolvedConfig extends CloudFrontClientResolved

/**
* <fullname>Amazon CloudFront</fullname>
* <p>This is the <i>Amazon CloudFront API Reference</i>. This guide
* is for developers who need detailed information about
* CloudFront API actions, data types, and errors. For detailed information about CloudFront features, see the <i>Amazon CloudFront Developer Guide</i>.</p>
* <p>This is the <i>Amazon CloudFront API Reference</i>. This guide is for developers
* who need detailed information about CloudFront API actions, data types, and errors. For
* detailed information about CloudFront features, see the
* <i>Amazon CloudFront Developer Guide</i>.</p>
*/
export class CloudFrontClient extends __Client<
__HttpHandlerOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export interface AssociateAliasCommandOutput extends __MetadataBearer {}
* <p>To use this operation to associate an alias with a distribution, you provide the alias
* and the ID of the target distribution for the alias. For more information, including how
* to set up the target distribution, prerequisites that you must complete, and other
* restrictions, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-move">Moving an alternate domain name to a different distribution</a>
* in the <i>Amazon CloudFront Developer Guide</i>.</p>
* restrictions, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-move">Moving an alternate domain name to a different
* distribution</a> in the <i>Amazon CloudFront Developer Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ export interface CopyDistributionCommandInput extends CopyDistributionRequest {}
export interface CopyDistributionCommandOutput extends CopyDistributionResult, __MetadataBearer {}

/**
* <p>Creates a staging distribution using the configuration of the provided primary distribution.
* A staging distribution is a copy of an existing distribution (called the primary
* distribution) that you can use in a continuous deployment workflow.</p>
* <p>After you create a staging distribution, you can use <code>UpdateDistribution</code> to
* modify the staging distribution’s configuration. Then you can use
* <p>Creates a staging distribution using the configuration of the provided primary
* distribution. A staging distribution is a copy of an existing distribution (called the
* primary distribution) that you can use in a continuous deployment workflow.</p>
* <p>After you create a staging distribution, you can use <code>UpdateDistribution</code>
* to modify the staging distribution’s configuration. Then you can use
* <code>CreateContinuousDeploymentPolicy</code> to incrementally move traffic to the
* staging distribution.</p>
* @example
Expand Down
28 changes: 15 additions & 13 deletions clients/client-cloudfront/src/commands/CreateCachePolicyCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,28 @@ export interface CreateCachePolicyCommandOutput extends CreateCachePolicyResult,

/**
* <p>Creates a cache policy.</p>
* <p>After you create a cache policy, you can attach it to one or more cache behaviors. When it’s
* attached to a cache behavior, the cache policy determines the following:</p>
* <p>After you create a cache policy, you can attach it to one or more cache behaviors.
* When it’s attached to a cache behavior, the cache policy determines the
* following:</p>
* <ul>
* <li>
* <p>The values that CloudFront includes in the <i>cache key</i>. These values can
* include HTTP headers, cookies, and URL query strings. CloudFront uses the cache key to
* find an object in its cache that it can return to the viewer.</p>
* <p>The values that CloudFront includes in the <i>cache key</i>. These
* values can include HTTP headers, cookies, and URL query strings. CloudFront uses the
* cache key to find an object in its cache that it can return to the
* viewer.</p>
* </li>
* <li>
* <p>The default, minimum, and maximum time to live (TTL) values that you want objects to stay
* in the CloudFront cache.</p>
* <p>The default, minimum, and maximum time to live (TTL) values that you want
* objects to stay in the CloudFront cache.</p>
* </li>
* </ul>
* <p>The headers, cookies, and query strings that are included in the cache key are automatically
* included in requests that CloudFront sends to the origin. CloudFront sends a request when it can’t
* find an object in its cache that matches the request’s cache key. If you want to send
* values to the origin but <i>not</i> include them in the cache key, use
* <code>OriginRequestPolicy</code>.</p>
* <p>The headers, cookies, and query strings that are included in the cache key are
* automatically included in requests that CloudFront sends to the origin. CloudFront sends a request
* when it can’t find an object in its cache that matches the request’s cache key. If you
* want to send values to the origin but <i>not</i> include them in the cache
* key, use <code>OriginRequestPolicy</code>.</p>
* <p>For more information about cache policies, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html">Controlling the cache key</a> in the
* <i>Amazon CloudFront Developer Guide</i>.</p>
* <i>Amazon CloudFront Developer Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ export interface CreateCloudFrontOriginAccessIdentityCommandOutput

/**
* <p>Creates a new origin access identity. If you're using Amazon S3 for your origin, you can
* use an origin access identity to require users to access your content using a CloudFront URL instead
* of the Amazon S3 URL. For more information about how to use origin access identities, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html">Serving Private Content through CloudFront</a> in the
* <i>Amazon CloudFront Developer Guide</i>.</p>
* use an origin access identity to require users to access your content using a CloudFront URL
* instead of the Amazon S3 URL. For more information about how to use origin access identities,
* see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html">Serving Private
* Content through CloudFront</a> in the <i>Amazon CloudFront Developer Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,15 @@ export interface CreateContinuousDeploymentPolicyCommandOutput
__MetadataBearer {}

/**
* <p>Creates a continuous deployment policy that distributes traffic for a custom domain name to
* two different CloudFront distributions.</p>
* <p>To use a continuous deployment policy, first use
* <code>CopyDistribution</code> to create a staging distribution, then use
* <code>UpdateDistribution</code> to modify the staging distribution’s
* configuration.</p>
* <p>After you create and update a staging distribution, you can use a continuous deployment
* policy to incrementally move traffic to the staging distribution. This workflow enables
* you to test changes to a distribution’s configuration before moving all of your domain’s
* production traffic to the new configuration.</p>
* <p>Creates a continuous deployment policy that distributes traffic for a custom domain
* name to two different CloudFront distributions.</p>
* <p>To use a continuous deployment policy, first use <code>CopyDistribution</code> to
* create a staging distribution, then use <code>UpdateDistribution</code> to modify the
* staging distribution’s configuration.</p>
* <p>After you create and update a staging distribution, you can use a continuous
* deployment policy to incrementally move traffic to the staging distribution. This
* workflow enables you to test changes to a distribution’s configuration before moving all
* of your domain’s production traffic to the new configuration.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export interface CreateFunctionCommandOutput extends CreateFunctionResult, __Met
* <p>To create a function, you provide the function code and some configuration information
* about the function. The response contains an Amazon Resource Name (ARN) that uniquely
* identifies the function.</p>
* <p>When you create a function, it’s in the <code>DEVELOPMENT</code> stage. In this stage, you
* can test the function with <code>TestFunction</code>, and update it with
* <code>UpdateFunction</code>.</p>
* <p>When you create a function, it’s in the <code>DEVELOPMENT</code> stage. In this stage,
* you can test the function with <code>TestFunction</code>, and update it with
* <code>UpdateFunction</code>.</p>
* <p>When you’re ready to use your function with a CloudFront distribution, use
* <code>PublishFunction</code> to copy the function from the <code>DEVELOPMENT</code>
* <code>PublishFunction</code> to copy the function from the <code>DEVELOPMENT</code>
* stage to <code>LIVE</code>. When it’s live, you can attach the function to a
* distribution’s cache behavior, using the function’s ARN.</p>
* @example
Expand Down
15 changes: 8 additions & 7 deletions clients/client-cloudfront/src/commands/CreateKeyGroupCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ export interface CreateKeyGroupCommandOutput extends CreateKeyGroupResult, __Met

/**
* <p>Creates a key group that you can use with <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html">CloudFront signed URLs and signed cookies</a>.</p>
* <p>To create a key group, you must specify at least one public key for the key group. After you
* create a key group, you can reference it from one or more cache behaviors. When you
* reference a key group in a cache behavior, CloudFront requires signed URLs or signed cookies
* for all requests that match the cache behavior. The URLs or cookies must be signed with
* a private key whose corresponding public key is in the key group. The signed URL or
* cookie contains information about which public key CloudFront should use to verify the
* signature. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html">Serving private content</a> in the <i>Amazon CloudFront Developer Guide</i>.</p>
* <p>To create a key group, you must specify at least one public key for the key group.
* After you create a key group, you can reference it from one or more cache behaviors.
* When you reference a key group in a cache behavior, CloudFront requires signed URLs or signed
* cookies for all requests that match the cache behavior. The URLs or cookies must be
* signed with a private key whose corresponding public key is in the key group. The signed
* URL or cookie contains information about which public key CloudFront should use to verify the
* signature. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html">Serving private content</a> in the
* <i>Amazon CloudFront Developer Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export interface CreateMonitoringSubscriptionCommandOutput
/**
* <p>Enables additional CloudWatch metrics for the specified CloudFront distribution. The
* additional metrics incur an additional cost.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/viewing-cloudfront-metrics.html#monitoring-console.distributions-additional">Viewing additional CloudFront distribution metrics</a> in the
* <i>Amazon CloudFront Developer Guide</i>.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/viewing-cloudfront-metrics.html#monitoring-console.distributions-additional">Viewing additional CloudFront distribution metrics</a> in
* the <i>Amazon CloudFront Developer Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ export interface CreateOriginAccessControlCommandInput extends CreateOriginAcces
export interface CreateOriginAccessControlCommandOutput extends CreateOriginAccessControlResult, __MetadataBearer {}

/**
* <p>Creates a new origin access control in CloudFront. After you create an origin access control, you
* can add it to an origin in a CloudFront distribution so that CloudFront sends authenticated (signed)
* requests to the origin.</p>
* <p>Creates a new origin access control in CloudFront. After you create an origin access
* control, you can add it to an origin in a CloudFront distribution so that CloudFront sends
* authenticated (signed) requests to the origin.</p>
* <p>For an Amazon S3 origin, this makes it possible to block public access to the Amazon S3 bucket
* so that viewers (users) can access the content in the bucket only through CloudFront.</p>
* <p>For more information about using a CloudFront origin access control, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html">Restricting access to an Amazon S3 origin</a> in the
* <i>Amazon CloudFront Developer Guide</i>.</p>
* <i>Amazon CloudFront Developer Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,32 @@ export interface CreateOriginRequestPolicyCommandOutput extends CreateOriginRequ

/**
* <p>Creates an origin request policy.</p>
* <p>After you create an origin request policy, you can attach it to one or more cache behaviors.
* When it’s attached to a cache behavior, the origin request policy determines the values
* that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends
* to the origin includes the following:</p>
* <p>After you create an origin request policy, you can attach it to one or more cache
* behaviors. When it’s attached to a cache behavior, the origin request policy determines
* the values that CloudFront includes in requests that it sends to the origin. Each request that
* CloudFront sends to the origin includes the following:</p>
* <ul>
* <li>
* <p>The request body and the URL path (without the domain name) from the viewer
* request.</p>
* </li>
* <li>
* <p>The headers that CloudFront automatically includes in every origin request, including
* <code>Host</code>, <code>User-Agent</code>, and <code>X-Amz-Cf-Id</code>.</p>
* <p>The headers that CloudFront automatically includes in every origin request,
* including <code>Host</code>, <code>User-Agent</code>, and
* <code>X-Amz-Cf-Id</code>.</p>
* </li>
* <li>
* <p>All HTTP headers, cookies, and URL query strings that are specified in the cache policy or
* the origin request policy. These can include items from the viewer request and,
* in the case of headers, additional ones that are added by CloudFront.</p>
* <p>All HTTP headers, cookies, and URL query strings that are specified in the
* cache policy or the origin request policy. These can include items from the
* viewer request and, in the case of headers, additional ones that are added by
* CloudFront.</p>
* </li>
* </ul>
* <p>CloudFront sends a request when it can’t find a valid object in its cache that matches the
* request. If you want to send values to the origin and also include them in the cache
* key, use <code>CachePolicy</code>.</p>
* <p>For more information about origin request policies, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html">Controlling origin requests</a> in the
* <i>Amazon CloudFront Developer Guide</i>.</p>
* <i>Amazon CloudFront Developer Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export interface CreateRealtimeLogConfigCommandOutput extends CreateRealtimeLogC
* <p>Creates a real-time log configuration.</p>
* <p>After you create a real-time log configuration, you can attach it to one or more cache
* behaviors to send real-time log data to the specified Amazon Kinesis data stream.</p>
* <p>For more information about real-time log configurations, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html">Real-time logs</a> in the <i>Amazon CloudFront Developer Guide</i>.</p>
* <p>For more information about real-time log configurations, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html">Real-time logs</a> in the
* <i>Amazon CloudFront Developer Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Loading

0 comments on commit ce728a2

Please sign in to comment.