Skip to content

Commit

Permalink
feat(client-cloudfront): Adds support for OriginReadTimeout and Origi…
Browse files Browse the repository at this point in the history
…nKeepaliveTimeout to create CloudFront Distributions with VPC Origins.
  • Loading branch information
awstools committed Dec 17, 2024
1 parent 9287267 commit a4d166e
Show file tree
Hide file tree
Showing 14 changed files with 91 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ export interface CopyDistributionCommandOutput extends CopyDistributionResult, _
* // },
* // VpcOriginConfig: { // VpcOriginConfig
* // VpcOriginId: "STRING_VALUE", // required
* // OriginReadTimeout: Number("int"),
* // OriginKeepaliveTimeout: Number("int"),
* // },
* // ConnectionAttempts: Number("int"),
* // ConnectionTimeout: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ export interface CreateDistributionCommandOutput extends CreateDistributionResul
* },
* VpcOriginConfig: { // VpcOriginConfig
* VpcOriginId: "STRING_VALUE", // required
* OriginReadTimeout: Number("int"),
* OriginKeepaliveTimeout: Number("int"),
* },
* ConnectionAttempts: Number("int"),
* ConnectionTimeout: Number("int"),
Expand Down Expand Up @@ -423,6 +425,8 @@ export interface CreateDistributionCommandOutput extends CreateDistributionResul
* // },
* // VpcOriginConfig: { // VpcOriginConfig
* // VpcOriginId: "STRING_VALUE", // required
* // OriginReadTimeout: Number("int"),
* // OriginKeepaliveTimeout: Number("int"),
* // },
* // ConnectionAttempts: Number("int"),
* // ConnectionTimeout: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ export interface CreateDistributionWithTagsCommandOutput extends CreateDistribut
* },
* VpcOriginConfig: { // VpcOriginConfig
* VpcOriginId: "STRING_VALUE", // required
* OriginReadTimeout: Number("int"),
* OriginKeepaliveTimeout: Number("int"),
* },
* ConnectionAttempts: Number("int"),
* ConnectionTimeout: Number("int"),
Expand Down Expand Up @@ -446,6 +448,8 @@ export interface CreateDistributionWithTagsCommandOutput extends CreateDistribut
* // },
* // VpcOriginConfig: { // VpcOriginConfig
* // VpcOriginId: "STRING_VALUE", // required
* // OriginReadTimeout: Number("int"),
* // OriginKeepaliveTimeout: Number("int"),
* // },
* // ConnectionAttempts: Number("int"),
* // ConnectionTimeout: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ export interface GetDistributionCommandOutput extends GetDistributionResult, __M
* // },
* // VpcOriginConfig: { // VpcOriginConfig
* // VpcOriginId: "STRING_VALUE", // required
* // OriginReadTimeout: Number("int"),
* // OriginKeepaliveTimeout: Number("int"),
* // },
* // ConnectionAttempts: Number("int"),
* // ConnectionTimeout: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ export interface GetDistributionConfigCommandOutput extends GetDistributionConfi
* // },
* // VpcOriginConfig: { // VpcOriginConfig
* // VpcOriginId: "STRING_VALUE", // required
* // OriginReadTimeout: Number("int"),
* // OriginKeepaliveTimeout: Number("int"),
* // },
* // ConnectionAttempts: Number("int"),
* // ConnectionTimeout: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ export interface ListDistributionsByAnycastIpListIdCommandOutput
* // },
* // VpcOriginConfig: { // VpcOriginConfig
* // VpcOriginId: "STRING_VALUE", // required
* // OriginReadTimeout: Number("int"),
* // OriginKeepaliveTimeout: Number("int"),
* // },
* // ConnectionAttempts: Number("int"),
* // ConnectionTimeout: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ export interface ListDistributionsByRealtimeLogConfigCommandOutput
* // },
* // VpcOriginConfig: { // VpcOriginConfig
* // VpcOriginId: "STRING_VALUE", // required
* // OriginReadTimeout: Number("int"),
* // OriginKeepaliveTimeout: Number("int"),
* // },
* // ConnectionAttempts: Number("int"),
* // ConnectionTimeout: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ export interface ListDistributionsByWebACLIdCommandOutput extends ListDistributi
* // },
* // VpcOriginConfig: { // VpcOriginConfig
* // VpcOriginId: "STRING_VALUE", // required
* // OriginReadTimeout: Number("int"),
* // OriginKeepaliveTimeout: Number("int"),
* // },
* // ConnectionAttempts: Number("int"),
* // ConnectionTimeout: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ export interface ListDistributionsCommandOutput extends ListDistributionsResult,
* // },
* // VpcOriginConfig: { // VpcOriginConfig
* // VpcOriginId: "STRING_VALUE", // required
* // OriginReadTimeout: Number("int"),
* // OriginKeepaliveTimeout: Number("int"),
* // },
* // ConnectionAttempts: Number("int"),
* // ConnectionTimeout: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ export interface UpdateDistributionCommandOutput extends UpdateDistributionResul
* },
* VpcOriginConfig: { // VpcOriginConfig
* VpcOriginId: "STRING_VALUE", // required
* OriginReadTimeout: Number("int"),
* OriginKeepaliveTimeout: Number("int"),
* },
* ConnectionAttempts: Number("int"),
* ConnectionTimeout: Number("int"),
Expand Down Expand Up @@ -458,6 +460,8 @@ export interface UpdateDistributionCommandOutput extends UpdateDistributionResul
* // },
* // VpcOriginConfig: { // VpcOriginConfig
* // VpcOriginId: "STRING_VALUE", // required
* // OriginReadTimeout: Number("int"),
* // OriginKeepaliveTimeout: Number("int"),
* // },
* // ConnectionAttempts: Number("int"),
* // ConnectionTimeout: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ export interface UpdateDistributionWithStagingConfigCommandOutput
* // },
* // VpcOriginConfig: { // VpcOriginConfig
* // VpcOriginId: "STRING_VALUE", // required
* // OriginReadTimeout: Number("int"),
* // OriginKeepaliveTimeout: Number("int"),
* // },
* // ConnectionAttempts: Number("int"),
* // ConnectionTimeout: Number("int"),
Expand Down
47 changes: 36 additions & 11 deletions clients/client-cloudfront/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2852,7 +2852,7 @@ export interface CustomOriginConfig {
* also known as the <i>origin response timeout</i>. The minimum timeout is 1
* second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is
* 30 seconds.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginResponseTimeout">Origin Response Timeout</a> in the
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginResponseTimeout">Response timeout (custom origins only)</a> in the
* <i>Amazon CloudFront Developer Guide</i>.</p>
* @public
*/
Expand All @@ -2862,7 +2862,7 @@ export interface CustomOriginConfig {
* <p>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.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginKeepaliveTimeout">Origin Keep-alive Timeout</a> in the
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginKeepaliveTimeout">Keep-alive timeout (custom origins only)</a> in the
* <i>Amazon CloudFront Developer Guide</i>.</p>
* @public
*/
Expand Down Expand Up @@ -2949,6 +2949,27 @@ export interface VpcOriginConfig {
* @public
*/
VpcOriginId: string | undefined;

/**
* <p>Specifies how long, in seconds, CloudFront waits for a response from the origin. This is
* also known as the <i>origin response timeout</i>. The minimum timeout is 1
* second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is
* 30 seconds.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginResponseTimeout">Response timeout (custom origins only)</a> in the
* <i>Amazon CloudFront Developer Guide</i>.</p>
* @public
*/
OriginReadTimeout?: number | undefined;

/**
* <p>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.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginKeepaliveTimeout">Keep-alive timeout (custom origins only)</a> in the
* <i>Amazon CloudFront Developer Guide</i>.</p>
* @public
*/
OriginKeepaliveTimeout?: number | undefined;
}

/**
Expand Down Expand Up @@ -3488,22 +3509,26 @@ export interface DistributionConfig {
Aliases?: Aliases | undefined;

/**
* <p>The object that you want CloudFront to request from your origin (for example,
* <code>index.html</code>) when a viewer requests the root URL for your distribution
* (<code>https://www.example.com</code>) instead of an object in your distribution
* (<code>https://www.example.com/product-description.html</code>). Specifying a
* default root object avoids exposing the contents of your distribution.</p>
* <p>Specify only the object name, for example, <code>index.html</code>. Don't add a
* <code>/</code> before the object name.</p>
* <p>When a viewer requests the root URL for your distribution, the default root object is the
* object that you want CloudFront to request from your origin. For example, if your root URL is
* <code>https://www.example.com</code>, you can specify CloudFront to return the
* <code>index.html</code> file as the default root object. You can specify a default
* root object so that viewers see a specific file or object, instead of another object in
* your distribution (for example,
* <code>https://www.example.com/product-description.html</code>). A default root
* object avoids exposing the contents of your distribution.</p>
* <p>You can specify the object name or a path to the object name (for example,
* <code>index.html</code> or <code>exampleFolderName/index.html</code>). Your string
* can't begin with a forward slash (<code>/</code>). Only specify the object name or the
* path to the object.</p>
* <p>If you don't want to specify a default root object when you create a distribution,
* include an empty <code>DefaultRootObject</code> element.</p>
* <p>To delete the default root object from an existing distribution, update the
* distribution configuration and include an empty <code>DefaultRootObject</code>
* element.</p>
* <p>To replace the default root object, update the distribution configuration and specify
* the new object.</p>
* <p>For more information about the default root object, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html">Creating a
* Default Root Object</a> in the <i>Amazon CloudFront Developer Guide</i>.</p>
* <p>For more information about the default root object, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html">Specify a default root object</a> in the <i>Amazon CloudFront Developer Guide</i>.</p>
* @public
*/
DefaultRootObject?: string | undefined;
Expand Down
12 changes: 12 additions & 0 deletions clients/client-cloudfront/src/protocols/Aws_restXml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11029,6 +11029,12 @@ const se_VpcOriginConfig = (input: VpcOriginConfig, context: __SerdeContext): an
if (input[_VOI] != null) {
bn.c(__XmlNode.of(_st, input[_VOI]).n(_VOI));
}
if (input[_ORT] != null) {
bn.c(__XmlNode.of(_i, String(input[_ORT])).n(_ORT));
}
if (input[_OKT] != null) {
bn.c(__XmlNode.of(_i, String(input[_OKT])).n(_OKT));
}
return bn;
};

Expand Down Expand Up @@ -15056,6 +15062,12 @@ const de_VpcOriginConfig = (output: any, context: __SerdeContext): VpcOriginConf
if (output[_VOI] != null) {
contents[_VOI] = __expectString(output[_VOI]);
}
if (output[_ORT] != null) {
contents[_ORT] = __strictParseInt32(output[_ORT]) as number;
}
if (output[_OKT] != null) {
contents[_OKT] = __strictParseInt32(output[_OKT]) as number;
}
return contents;
};

Expand Down
Loading

0 comments on commit a4d166e

Please sign in to comment.