Skip to content

Commit a4d166e

Browse files
author
awstools
committed
feat(client-cloudfront): Adds support for OriginReadTimeout and OriginKeepaliveTimeout to create CloudFront Distributions with VPC Origins.
1 parent 9287267 commit a4d166e

14 files changed

+91
-14
lines changed

clients/client-cloudfront/src/commands/CopyDistributionCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ export interface CopyDistributionCommandOutput extends CopyDistributionResult, _
153153
* // },
154154
* // VpcOriginConfig: { // VpcOriginConfig
155155
* // VpcOriginId: "STRING_VALUE", // required
156+
* // OriginReadTimeout: Number("int"),
157+
* // OriginKeepaliveTimeout: Number("int"),
156158
* // },
157159
* // ConnectionAttempts: Number("int"),
158160
* // ConnectionTimeout: Number("int"),

clients/client-cloudfront/src/commands/CreateDistributionCommand.ts

+4
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ export interface CreateDistributionCommandOutput extends CreateDistributionResul
8484
* },
8585
* VpcOriginConfig: { // VpcOriginConfig
8686
* VpcOriginId: "STRING_VALUE", // required
87+
* OriginReadTimeout: Number("int"),
88+
* OriginKeepaliveTimeout: Number("int"),
8789
* },
8890
* ConnectionAttempts: Number("int"),
8991
* ConnectionTimeout: Number("int"),
@@ -423,6 +425,8 @@ export interface CreateDistributionCommandOutput extends CreateDistributionResul
423425
* // },
424426
* // VpcOriginConfig: { // VpcOriginConfig
425427
* // VpcOriginId: "STRING_VALUE", // required
428+
* // OriginReadTimeout: Number("int"),
429+
* // OriginKeepaliveTimeout: Number("int"),
426430
* // },
427431
* // ConnectionAttempts: Number("int"),
428432
* // ConnectionTimeout: Number("int"),

clients/client-cloudfront/src/commands/CreateDistributionWithTagsCommand.ts

+4
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ export interface CreateDistributionWithTagsCommandOutput extends CreateDistribut
9898
* },
9999
* VpcOriginConfig: { // VpcOriginConfig
100100
* VpcOriginId: "STRING_VALUE", // required
101+
* OriginReadTimeout: Number("int"),
102+
* OriginKeepaliveTimeout: Number("int"),
101103
* },
102104
* ConnectionAttempts: Number("int"),
103105
* ConnectionTimeout: Number("int"),
@@ -446,6 +448,8 @@ export interface CreateDistributionWithTagsCommandOutput extends CreateDistribut
446448
* // },
447449
* // VpcOriginConfig: { // VpcOriginConfig
448450
* // VpcOriginId: "STRING_VALUE", // required
451+
* // OriginReadTimeout: Number("int"),
452+
* // OriginKeepaliveTimeout: Number("int"),
449453
* // },
450454
* // ConnectionAttempts: Number("int"),
451455
* // ConnectionTimeout: Number("int"),

clients/client-cloudfront/src/commands/GetDistributionCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ export interface GetDistributionCommandOutput extends GetDistributionResult, __M
125125
* // },
126126
* // VpcOriginConfig: { // VpcOriginConfig
127127
* // VpcOriginId: "STRING_VALUE", // required
128+
* // OriginReadTimeout: Number("int"),
129+
* // OriginKeepaliveTimeout: Number("int"),
128130
* // },
129131
* // ConnectionAttempts: Number("int"),
130132
* // ConnectionTimeout: Number("int"),

clients/client-cloudfront/src/commands/GetDistributionConfigCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ export interface GetDistributionConfigCommandOutput extends GetDistributionConfi
8888
* // },
8989
* // VpcOriginConfig: { // VpcOriginConfig
9090
* // VpcOriginId: "STRING_VALUE", // required
91+
* // OriginReadTimeout: Number("int"),
92+
* // OriginKeepaliveTimeout: Number("int"),
9193
* // },
9294
* // ConnectionAttempts: Number("int"),
9395
* // ConnectionTimeout: Number("int"),

clients/client-cloudfront/src/commands/ListDistributionsByAnycastIpListIdCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ export interface ListDistributionsByAnycastIpListIdCommandOutput
105105
* // },
106106
* // VpcOriginConfig: { // VpcOriginConfig
107107
* // VpcOriginId: "STRING_VALUE", // required
108+
* // OriginReadTimeout: Number("int"),
109+
* // OriginKeepaliveTimeout: Number("int"),
108110
* // },
109111
* // ConnectionAttempts: Number("int"),
110112
* // ConnectionTimeout: Number("int"),

clients/client-cloudfront/src/commands/ListDistributionsByRealtimeLogConfigCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ export interface ListDistributionsByRealtimeLogConfigCommandOutput
115115
* // },
116116
* // VpcOriginConfig: { // VpcOriginConfig
117117
* // VpcOriginId: "STRING_VALUE", // required
118+
* // OriginReadTimeout: Number("int"),
119+
* // OriginKeepaliveTimeout: Number("int"),
118120
* // },
119121
* // ConnectionAttempts: Number("int"),
120122
* // ConnectionTimeout: Number("int"),

clients/client-cloudfront/src/commands/ListDistributionsByWebACLIdCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ export interface ListDistributionsByWebACLIdCommandOutput extends ListDistributi
100100
* // },
101101
* // VpcOriginConfig: { // VpcOriginConfig
102102
* // VpcOriginId: "STRING_VALUE", // required
103+
* // OriginReadTimeout: Number("int"),
104+
* // OriginKeepaliveTimeout: Number("int"),
103105
* // },
104106
* // ConnectionAttempts: Number("int"),
105107
* // ConnectionTimeout: Number("int"),

clients/client-cloudfront/src/commands/ListDistributionsCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ export interface ListDistributionsCommandOutput extends ListDistributionsResult,
9999
* // },
100100
* // VpcOriginConfig: { // VpcOriginConfig
101101
* // VpcOriginId: "STRING_VALUE", // required
102+
* // OriginReadTimeout: Number("int"),
103+
* // OriginKeepaliveTimeout: Number("int"),
102104
* // },
103105
* // ConnectionAttempts: Number("int"),
104106
* // ConnectionTimeout: Number("int"),

clients/client-cloudfront/src/commands/UpdateDistributionCommand.ts

+4
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ export interface UpdateDistributionCommandOutput extends UpdateDistributionResul
117117
* },
118118
* VpcOriginConfig: { // VpcOriginConfig
119119
* VpcOriginId: "STRING_VALUE", // required
120+
* OriginReadTimeout: Number("int"),
121+
* OriginKeepaliveTimeout: Number("int"),
120122
* },
121123
* ConnectionAttempts: Number("int"),
122124
* ConnectionTimeout: Number("int"),
@@ -458,6 +460,8 @@ export interface UpdateDistributionCommandOutput extends UpdateDistributionResul
458460
* // },
459461
* // VpcOriginConfig: { // VpcOriginConfig
460462
* // VpcOriginId: "STRING_VALUE", // required
463+
* // OriginReadTimeout: Number("int"),
464+
* // OriginKeepaliveTimeout: Number("int"),
461465
* // },
462466
* // ConnectionAttempts: Number("int"),
463467
* // ConnectionTimeout: Number("int"),

clients/client-cloudfront/src/commands/UpdateDistributionWithStagingConfigCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ export interface UpdateDistributionWithStagingConfigCommandOutput
154154
* // },
155155
* // VpcOriginConfig: { // VpcOriginConfig
156156
* // VpcOriginId: "STRING_VALUE", // required
157+
* // OriginReadTimeout: Number("int"),
158+
* // OriginKeepaliveTimeout: Number("int"),
157159
* // },
158160
* // ConnectionAttempts: Number("int"),
159161
* // ConnectionTimeout: Number("int"),

clients/client-cloudfront/src/models/models_0.ts

+36-11
Original file line numberDiff line numberDiff line change
@@ -2852,7 +2852,7 @@ export interface CustomOriginConfig {
28522852
* also known as the <i>origin response timeout</i>. The minimum timeout is 1
28532853
* second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is
28542854
* 30 seconds.</p>
2855-
* <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
2855+
* <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
28562856
* <i>Amazon CloudFront Developer Guide</i>.</p>
28572857
* @public
28582858
*/
@@ -2862,7 +2862,7 @@ export interface CustomOriginConfig {
28622862
* <p>Specifies how long, in seconds, CloudFront persists its connection to the origin. The
28632863
* minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't
28642864
* specify otherwise) is 5 seconds.</p>
2865-
* <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
2865+
* <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
28662866
* <i>Amazon CloudFront Developer Guide</i>.</p>
28672867
* @public
28682868
*/
@@ -2949,6 +2949,27 @@ export interface VpcOriginConfig {
29492949
* @public
29502950
*/
29512951
VpcOriginId: string | undefined;
2952+
2953+
/**
2954+
* <p>Specifies how long, in seconds, CloudFront waits for a response from the origin. This is
2955+
* also known as the <i>origin response timeout</i>. The minimum timeout is 1
2956+
* second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is
2957+
* 30 seconds.</p>
2958+
* <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
2959+
* <i>Amazon CloudFront Developer Guide</i>.</p>
2960+
* @public
2961+
*/
2962+
OriginReadTimeout?: number | undefined;
2963+
2964+
/**
2965+
* <p>Specifies how long, in seconds, CloudFront persists its connection to the origin. The
2966+
* minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't
2967+
* specify otherwise) is 5 seconds.</p>
2968+
* <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
2969+
* <i>Amazon CloudFront Developer Guide</i>.</p>
2970+
* @public
2971+
*/
2972+
OriginKeepaliveTimeout?: number | undefined;
29522973
}
29532974

29542975
/**
@@ -3488,22 +3509,26 @@ export interface DistributionConfig {
34883509
Aliases?: Aliases | undefined;
34893510

34903511
/**
3491-
* <p>The object that you want CloudFront to request from your origin (for example,
3492-
* <code>index.html</code>) when a viewer requests the root URL for your distribution
3493-
* (<code>https://www.example.com</code>) instead of an object in your distribution
3494-
* (<code>https://www.example.com/product-description.html</code>). Specifying a
3495-
* default root object avoids exposing the contents of your distribution.</p>
3496-
* <p>Specify only the object name, for example, <code>index.html</code>. Don't add a
3497-
* <code>/</code> before the object name.</p>
3512+
* <p>When a viewer requests the root URL for your distribution, the default root object is the
3513+
* object that you want CloudFront to request from your origin. For example, if your root URL is
3514+
* <code>https://www.example.com</code>, you can specify CloudFront to return the
3515+
* <code>index.html</code> file as the default root object. You can specify a default
3516+
* root object so that viewers see a specific file or object, instead of another object in
3517+
* your distribution (for example,
3518+
* <code>https://www.example.com/product-description.html</code>). A default root
3519+
* object avoids exposing the contents of your distribution.</p>
3520+
* <p>You can specify the object name or a path to the object name (for example,
3521+
* <code>index.html</code> or <code>exampleFolderName/index.html</code>). Your string
3522+
* can't begin with a forward slash (<code>/</code>). Only specify the object name or the
3523+
* path to the object.</p>
34983524
* <p>If you don't want to specify a default root object when you create a distribution,
34993525
* include an empty <code>DefaultRootObject</code> element.</p>
35003526
* <p>To delete the default root object from an existing distribution, update the
35013527
* distribution configuration and include an empty <code>DefaultRootObject</code>
35023528
* element.</p>
35033529
* <p>To replace the default root object, update the distribution configuration and specify
35043530
* the new object.</p>
3505-
* <p>For more information about the default root object, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html">Creating a
3506-
* Default Root Object</a> in the <i>Amazon CloudFront Developer Guide</i>.</p>
3531+
* <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>
35073532
* @public
35083533
*/
35093534
DefaultRootObject?: string | undefined;

clients/client-cloudfront/src/protocols/Aws_restXml.ts

+12
Original file line numberDiff line numberDiff line change
@@ -11029,6 +11029,12 @@ const se_VpcOriginConfig = (input: VpcOriginConfig, context: __SerdeContext): an
1102911029
if (input[_VOI] != null) {
1103011030
bn.c(__XmlNode.of(_st, input[_VOI]).n(_VOI));
1103111031
}
11032+
if (input[_ORT] != null) {
11033+
bn.c(__XmlNode.of(_i, String(input[_ORT])).n(_ORT));
11034+
}
11035+
if (input[_OKT] != null) {
11036+
bn.c(__XmlNode.of(_i, String(input[_OKT])).n(_OKT));
11037+
}
1103211038
return bn;
1103311039
};
1103411040

@@ -15056,6 +15062,12 @@ const de_VpcOriginConfig = (output: any, context: __SerdeContext): VpcOriginConf
1505615062
if (output[_VOI] != null) {
1505715063
contents[_VOI] = __expectString(output[_VOI]);
1505815064
}
15065+
if (output[_ORT] != null) {
15066+
contents[_ORT] = __strictParseInt32(output[_ORT]) as number;
15067+
}
15068+
if (output[_OKT] != null) {
15069+
contents[_OKT] = __strictParseInt32(output[_OKT]) as number;
15070+
}
1505915071
return contents;
1506015072
};
1506115073

0 commit comments

Comments
 (0)