Skip to content

Commit 2d9bc39

Browse files
author
awstools
committed
feat(client-cloudfront): Adds support for Origin Selection between EMPv2 origins based on media quality score.
1 parent b98d358 commit 2d9bc39

22 files changed

+383
-85
lines changed

Diff for: clients/client-cloudfront/src/commands/CopyDistributionCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ export interface CopyDistributionCommandOutput extends CopyDistributionResult, _
185185
* // },
186186
* // ],
187187
* // },
188+
* // SelectionCriteria: "default" || "media-quality-based",
188189
* // },
189190
* // ],
190191
* // },

Diff for: clients/client-cloudfront/src/commands/CreateDistributionCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ export interface CreateDistributionCommandOutput extends CreateDistributionResul
116116
* },
117117
* ],
118118
* },
119+
* SelectionCriteria: "default" || "media-quality-based",
119120
* },
120121
* ],
121122
* },
@@ -454,6 +455,7 @@ export interface CreateDistributionCommandOutput extends CreateDistributionResul
454455
* // },
455456
* // ],
456457
* // },
458+
* // SelectionCriteria: "default" || "media-quality-based",
457459
* // },
458460
* // ],
459461
* // },

Diff for: clients/client-cloudfront/src/commands/CreateDistributionWithTagsCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ export interface CreateDistributionWithTagsCommandOutput extends CreateDistribut
130130
* },
131131
* ],
132132
* },
133+
* SelectionCriteria: "default" || "media-quality-based",
133134
* },
134135
* ],
135136
* },
@@ -477,6 +478,7 @@ export interface CreateDistributionWithTagsCommandOutput extends CreateDistribut
477478
* // },
478479
* // ],
479480
* // },
481+
* // SelectionCriteria: "default" || "media-quality-based",
480482
* // },
481483
* // ],
482484
* // },

Diff for: clients/client-cloudfront/src/commands/CreateKeyValueStoreCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export interface CreateKeyValueStoreCommandOutput extends CreateKeyValueStoreRes
9595
* const input = {
9696
* "Comment": "my-key-valuestore-comment",
9797
* "ImportSource": {
98-
* "SourceARN": "arn:aws:s3:::my-bucket/validJSON.json",
98+
* "SourceARN": "arn:aws:s3:::amzn-s3-demo-bucket/validJSON.json",
9999
* "SourceType": "S3"
100100
* },
101101
* "Name": "my-keyvaluestore-name"

Diff for: clients/client-cloudfront/src/commands/CreateVpcOriginCommand.ts

+51
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,57 @@ export interface CreateVpcOriginCommandOutput extends CreateVpcOriginResult, __M
120120
* <p>Base exception class for all service exceptions from CloudFront service.</p>
121121
*
122122
* @public
123+
* @example To create a VPC origin
124+
* ```javascript
125+
* // The following command creates a VPC origin:
126+
* const input = {
127+
* "VpcOriginEndpointConfig": {
128+
* "Arn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-alb-us-west-2/e6aa5c7d26415c6d",
129+
* "HTTPPort": 80,
130+
* "HTTPSPort": 443,
131+
* "Name": "my-vpcorigin-name",
132+
* "OriginProtocolPolicy": "match-viewer",
133+
* "OriginSslProtocols": {
134+
* "Items": [
135+
* "TLSv1.1",
136+
* "TLSv1.2"
137+
* ],
138+
* "Quantity": 2
139+
* }
140+
* }
141+
* };
142+
* const command = new CreateVpcOriginCommand(input);
143+
* const response = await client.send(command);
144+
* /* response ==
145+
* {
146+
* "ETag": "E23ZP02F085DFQ",
147+
* "Location": "https://cloudfront.amazonaws.com/2020-05-31/vpc-origin/vo_BQwjxxQxjCaBcQLzJUFkDM",
148+
* "VpcOrigin": {
149+
* "Arn": "arn:aws:cloudfront::123456789012:vpcorigin/vo_BQwjxxQxjCaBcQLzJUFkDM",
150+
* "CreatedTime": "2024-10-15T17:19:42.318Z",
151+
* "Id": "vo_BQwjxxQxjCaBcQLzJUFkDM",
152+
* "LastModifiedTime": "2024-10-15T17:19:42.318Z",
153+
* "Status": "Deploying",
154+
* "VpcOriginEndpointConfig": {
155+
* "Arn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-alb-us-west-2/e6aa5c7d26415c6d",
156+
* "HTTPPort": 80,
157+
* "HTTPSPort": 443,
158+
* "Name": "my-vpcorigin-name",
159+
* "OriginProtocolPolicy": "match-viewer",
160+
* "OriginSslProtocols": {
161+
* "Items": [
162+
* "TLSv1.1",
163+
* "TLSv1.2"
164+
* ],
165+
* "Quantity": 2
166+
* }
167+
* }
168+
* }
169+
* }
170+
* *\/
171+
* // example id: example-1
172+
* ```
173+
*
123174
*/
124175
export class CreateVpcOriginCommand extends $Command
125176
.classBuilder<

Diff for: clients/client-cloudfront/src/commands/DeleteVpcOriginCommand.ts

+38
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,44 @@ export interface DeleteVpcOriginCommandOutput extends DeleteVpcOriginResult, __M
102102
* <p>Base exception class for all service exceptions from CloudFront service.</p>
103103
*
104104
* @public
105+
* @example To delete a VPC origin
106+
* ```javascript
107+
* // The following command deletes a VPC origin:
108+
* const input = {
109+
* "Id": "vo_BQwjxxQxjCaBcQLzJUFkDM",
110+
* "IfMatch": "E1F83G8C2ARO7P"
111+
* };
112+
* const command = new DeleteVpcOriginCommand(input);
113+
* const response = await client.send(command);
114+
* /* response ==
115+
* {
116+
* "ETag": "E1PA6795UKMFR9",
117+
* "VpcOrigin": {
118+
* "Arn": "arn:aws:cloudfront::123456789012:vpcorigin/vo_BQwjxxQxjCaBcQLzJUFkDM",
119+
* "CreatedTime": "2024-10-15T17:19:42.318Z",
120+
* "Id": "vo_BQwjxxQxjCaBcQLzJUFkDM",
121+
* "LastModifiedTime": "2024-10-15T17:57:08.965Z",
122+
* "Status": "Deploying",
123+
* "VpcOriginEndpointConfig": {
124+
* "Arn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-alb-us-west-2/e6aa5c7d26415c6d",
125+
* "HTTPPort": 80,
126+
* "HTTPSPort": 443,
127+
* "Name": "my-vpcorigin-name",
128+
* "OriginProtocolPolicy": "match-viewer",
129+
* "OriginSslProtocols": {
130+
* "Items": [
131+
* "TLSv1.1",
132+
* "TLSv1.2"
133+
* ],
134+
* "Quantity": 2
135+
* }
136+
* }
137+
* }
138+
* }
139+
* *\/
140+
* // example id: example-1
141+
* ```
142+
*
105143
*/
106144
export class DeleteVpcOriginCommand extends $Command
107145
.classBuilder<

Diff for: clients/client-cloudfront/src/commands/GetDistributionCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export interface GetDistributionCommandOutput extends GetDistributionResult, __M
157157
* // },
158158
* // ],
159159
* // },
160+
* // SelectionCriteria: "default" || "media-quality-based",
160161
* // },
161162
* // ],
162163
* // },

Diff for: clients/client-cloudfront/src/commands/GetDistributionConfigCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ export interface GetDistributionConfigCommandOutput extends GetDistributionConfi
120120
* // },
121121
* // ],
122122
* // },
123+
* // SelectionCriteria: "default" || "media-quality-based",
123124
* // },
124125
* // ],
125126
* // },

Diff for: clients/client-cloudfront/src/commands/GetVpcOriginCommand.ts

+37
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,43 @@ export interface GetVpcOriginCommandOutput extends GetVpcOriginResult, __Metadat
8888
* <p>Base exception class for all service exceptions from CloudFront service.</p>
8989
*
9090
* @public
91+
* @example To get a VPC origin
92+
* ```javascript
93+
* // The following command gets a VPC origin:
94+
* const input = {
95+
* "Id": "vo_BQwjxxQxjCaBcQLzJUFkDM"
96+
* };
97+
* const command = new GetVpcOriginCommand(input);
98+
* const response = await client.send(command);
99+
* /* response ==
100+
* {
101+
* "ETag": "ETVPDKIKX0DER",
102+
* "VpcOrigin": {
103+
* "Arn": "arn:aws:cloudfront::123456789012:vpcorigin/vo_BQwjxxQxjCaBcQLzJUFkDM",
104+
* "CreatedTime": "2024-10-15T17:19:42.318Z",
105+
* "Id": "vo_BQwjxxQxjCaBcQLzJUFkDM",
106+
* "LastModifiedTime": "2024-10-15T17:24:35.188Z",
107+
* "Status": "Deployed",
108+
* "VpcOriginEndpointConfig": {
109+
* "Arn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-alb-us-west-2/e6aa5c7d26415c6d",
110+
* "HTTPPort": 80,
111+
* "HTTPSPort": 443,
112+
* "Name": "my-vpcorigin-name",
113+
* "OriginProtocolPolicy": "match-viewer",
114+
* "OriginSslProtocols": {
115+
* "Items": [
116+
* "TLSv1.1",
117+
* "TLSv1.2"
118+
* ],
119+
* "Quantity": 2
120+
* }
121+
* }
122+
* }
123+
* }
124+
* *\/
125+
* // example id: example-1
126+
* ```
127+
*
91128
*/
92129
export class GetVpcOriginCommand extends $Command
93130
.classBuilder<

Diff for: clients/client-cloudfront/src/commands/ListDistributionsByAnycastIpListIdCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ export interface ListDistributionsByAnycastIpListIdCommandOutput
137137
* // },
138138
* // ],
139139
* // },
140+
* // SelectionCriteria: "default" || "media-quality-based",
140141
* // },
141142
* // ],
142143
* // },

Diff for: clients/client-cloudfront/src/commands/ListDistributionsByRealtimeLogConfigCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ export interface ListDistributionsByRealtimeLogConfigCommandOutput
147147
* // },
148148
* // ],
149149
* // },
150+
* // SelectionCriteria: "default" || "media-quality-based",
150151
* // },
151152
* // ],
152153
* // },

Diff for: clients/client-cloudfront/src/commands/ListDistributionsByVpcOriginIdCommand.ts

+22
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,28 @@ export interface ListDistributionsByVpcOriginIdCommandOutput
8484
* <p>Base exception class for all service exceptions from CloudFront service.</p>
8585
*
8686
* @public
87+
* @example To list distributions by VPC origin ID
88+
* ```javascript
89+
* // The following command lists distributions by VPC origin ID:
90+
* const input = {
91+
* "VpcOriginId": "vo_BQwjxxQxjCaBcQLzJUFkDM"
92+
* };
93+
* const command = new ListDistributionsByVpcOriginIdCommand(input);
94+
* const response = await client.send(command);
95+
* /* response ==
96+
* {
97+
* "DistributionIdList": {
98+
* "IsTruncated": false,
99+
* "Items": [],
100+
* "Marker": "a",
101+
* "MaxItems": 100,
102+
* "Quantity": 0
103+
* }
104+
* }
105+
* *\/
106+
* // example id: example-1
107+
* ```
108+
*
87109
*/
88110
export class ListDistributionsByVpcOriginIdCommand extends $Command
89111
.classBuilder<

Diff for: clients/client-cloudfront/src/commands/ListDistributionsByWebACLIdCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ export interface ListDistributionsByWebACLIdCommandOutput extends ListDistributi
132132
* // },
133133
* // ],
134134
* // },
135+
* // SelectionCriteria: "default" || "media-quality-based",
135136
* // },
136137
* // ],
137138
* // },

Diff for: clients/client-cloudfront/src/commands/ListDistributionsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ export interface ListDistributionsCommandOutput extends ListDistributionsResult,
131131
* // },
132132
* // ],
133133
* // },
134+
* // SelectionCriteria: "default" || "media-quality-based",
134135
* // },
135136
* // ],
136137
* // },

Diff for: clients/client-cloudfront/src/commands/ListVpcOriginsCommand.ts

+30
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,36 @@ export interface ListVpcOriginsCommandOutput extends ListVpcOriginsResult, __Met
8686
* <p>Base exception class for all service exceptions from CloudFront service.</p>
8787
*
8888
* @public
89+
* @example To list VPC origins
90+
* ```javascript
91+
* // The following command lists VPC origins:
92+
* const input = {};
93+
* const command = new ListVpcOriginsCommand(input);
94+
* const response = await client.send(command);
95+
* /* response ==
96+
* {
97+
* "VpcOriginList": {
98+
* "IsTruncated": true,
99+
* "Items": [
100+
* {
101+
* "Arn": "arn:aws:cloudfront::123456789012:vpcorigin/vo_BQwjxxQxjCaBcQLzJUFkDM",
102+
* "CreatedTime": "2024-10-15T17:19:42.318Z",
103+
* "Id": "vo_BQwjxxQxjCaBcQLzJUFkDM",
104+
* "LastModifiedTime": "2024-10-15T17:24:35.188Z",
105+
* "Name": "my-vpcorigin-name",
106+
* "OriginEndpointArn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-alb-us-west-2/e6aa5c7d26415c6d",
107+
* "Status": "Deployed"
108+
* }
109+
* ],
110+
* "Marker": "a",
111+
* "MaxItems": 100,
112+
* "Quantity": 1
113+
* }
114+
* }
115+
* *\/
116+
* // example id: example-1
117+
* ```
118+
*
89119
*/
90120
export class ListVpcOriginsCommand extends $Command
91121
.classBuilder<

Diff for: clients/client-cloudfront/src/commands/UpdateDistributionCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ export interface UpdateDistributionCommandOutput extends UpdateDistributionResul
149149
* },
150150
* ],
151151
* },
152+
* SelectionCriteria: "default" || "media-quality-based",
152153
* },
153154
* ],
154155
* },
@@ -489,6 +490,7 @@ export interface UpdateDistributionCommandOutput extends UpdateDistributionResul
489490
* // },
490491
* // ],
491492
* // },
493+
* // SelectionCriteria: "default" || "media-quality-based",
492494
* // },
493495
* // ],
494496
* // },

Diff for: clients/client-cloudfront/src/commands/UpdateDistributionWithStagingConfigCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ export interface UpdateDistributionWithStagingConfigCommandOutput
186186
* // },
187187
* // ],
188188
* // },
189+
* // SelectionCriteria: "default" || "media-quality-based",
189190
* // },
190191
* // ],
191192
* // },

Diff for: clients/client-cloudfront/src/commands/UpdateVpcOriginCommand.ts

+52
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,58 @@ export interface UpdateVpcOriginCommandOutput extends UpdateVpcOriginResult, __M
126126
* <p>Base exception class for all service exceptions from CloudFront service.</p>
127127
*
128128
* @public
129+
* @example To update a VPC origin
130+
* ```javascript
131+
* // The following command updates a VPC origin:
132+
* const input = {
133+
* "Id": "vo_BQwjxxQxjCaBcQLzJUFkDM",
134+
* "IfMatch": "ETVPDKIKX0DER",
135+
* "VpcOriginEndpointConfig": {
136+
* "Arn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-alb-us-west-2/e6aa5c7d26415c6d",
137+
* "HTTPPort": 80,
138+
* "HTTPSPort": 443,
139+
* "Name": "my-vpcorigin-name",
140+
* "OriginProtocolPolicy": "match-viewer",
141+
* "OriginSslProtocols": {
142+
* "Items": [
143+
* "TLSv1.1",
144+
* "TLSv1.2"
145+
* ],
146+
* "Quantity": 2
147+
* }
148+
* }
149+
* };
150+
* const command = new UpdateVpcOriginCommand(input);
151+
* const response = await client.send(command);
152+
* /* response ==
153+
* {
154+
* "ETag": "E3UN6WX5RRO2AG",
155+
* "VpcOrigin": {
156+
* "Arn": "arn:aws:cloudfront::123456789012:vpcorigin/vo_BQwjxxQxjCaBcQLzJUFkDM",
157+
* "CreatedTime": "2024-10-15T17:19:42.318Z",
158+
* "Id": "vo_BQwjxxQxjCaBcQLzJUFkDM",
159+
* "LastModifiedTime": "2024-10-15T17:47:08.133Z",
160+
* "Status": "Deploying",
161+
* "VpcOriginEndpointConfig": {
162+
* "Arn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-alb-us-west-2/e6aa5c7d26415c6d",
163+
* "HTTPPort": 80,
164+
* "HTTPSPort": 443,
165+
* "Name": "my-vpcorigin-name",
166+
* "OriginProtocolPolicy": "match-viewer",
167+
* "OriginSslProtocols": {
168+
* "Items": [
169+
* "TLSv1.1",
170+
* "TLSv1.2"
171+
* ],
172+
* "Quantity": 2
173+
* }
174+
* }
175+
* }
176+
* }
177+
* *\/
178+
* // example id: example-1
179+
* ```
180+
*
129181
*/
130182
export class UpdateVpcOriginCommand extends $Command
131183
.classBuilder<

0 commit comments

Comments
 (0)