Skip to content

Commit

Permalink
feat(client-cloudfront): Adds support for Origin Selection between EM…
Browse files Browse the repository at this point in the history
…Pv2 origins based on media quality score.
  • Loading branch information
awstools committed Nov 21, 2024
1 parent b98d358 commit 2d9bc39
Show file tree
Hide file tree
Showing 22 changed files with 383 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ export interface CopyDistributionCommandOutput extends CopyDistributionResult, _
* // },
* // ],
* // },
* // SelectionCriteria: "default" || "media-quality-based",
* // },
* // ],
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export interface CreateDistributionCommandOutput extends CreateDistributionResul
* },
* ],
* },
* SelectionCriteria: "default" || "media-quality-based",
* },
* ],
* },
Expand Down Expand Up @@ -454,6 +455,7 @@ export interface CreateDistributionCommandOutput extends CreateDistributionResul
* // },
* // ],
* // },
* // SelectionCriteria: "default" || "media-quality-based",
* // },
* // ],
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export interface CreateDistributionWithTagsCommandOutput extends CreateDistribut
* },
* ],
* },
* SelectionCriteria: "default" || "media-quality-based",
* },
* ],
* },
Expand Down Expand Up @@ -477,6 +478,7 @@ export interface CreateDistributionWithTagsCommandOutput extends CreateDistribut
* // },
* // ],
* // },
* // SelectionCriteria: "default" || "media-quality-based",
* // },
* // ],
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export interface CreateKeyValueStoreCommandOutput extends CreateKeyValueStoreRes
* const input = {
* "Comment": "my-key-valuestore-comment",
* "ImportSource": {
* "SourceARN": "arn:aws:s3:::my-bucket/validJSON.json",
* "SourceARN": "arn:aws:s3:::amzn-s3-demo-bucket/validJSON.json",
* "SourceType": "S3"
* },
* "Name": "my-keyvaluestore-name"
Expand Down
51 changes: 51 additions & 0 deletions clients/client-cloudfront/src/commands/CreateVpcOriginCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,57 @@ export interface CreateVpcOriginCommandOutput extends CreateVpcOriginResult, __M
* <p>Base exception class for all service exceptions from CloudFront service.</p>
*
* @public
* @example To create a VPC origin
* ```javascript
* // The following command creates a VPC origin:
* const input = {
* "VpcOriginEndpointConfig": {
* "Arn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-alb-us-west-2/e6aa5c7d26415c6d",
* "HTTPPort": 80,
* "HTTPSPort": 443,
* "Name": "my-vpcorigin-name",
* "OriginProtocolPolicy": "match-viewer",
* "OriginSslProtocols": {
* "Items": [
* "TLSv1.1",
* "TLSv1.2"
* ],
* "Quantity": 2
* }
* }
* };
* const command = new CreateVpcOriginCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "ETag": "E23ZP02F085DFQ",
* "Location": "https://cloudfront.amazonaws.com/2020-05-31/vpc-origin/vo_BQwjxxQxjCaBcQLzJUFkDM",
* "VpcOrigin": {
* "Arn": "arn:aws:cloudfront::123456789012:vpcorigin/vo_BQwjxxQxjCaBcQLzJUFkDM",
* "CreatedTime": "2024-10-15T17:19:42.318Z",
* "Id": "vo_BQwjxxQxjCaBcQLzJUFkDM",
* "LastModifiedTime": "2024-10-15T17:19:42.318Z",
* "Status": "Deploying",
* "VpcOriginEndpointConfig": {
* "Arn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-alb-us-west-2/e6aa5c7d26415c6d",
* "HTTPPort": 80,
* "HTTPSPort": 443,
* "Name": "my-vpcorigin-name",
* "OriginProtocolPolicy": "match-viewer",
* "OriginSslProtocols": {
* "Items": [
* "TLSv1.1",
* "TLSv1.2"
* ],
* "Quantity": 2
* }
* }
* }
* }
* *\/
* // example id: example-1
* ```
*
*/
export class CreateVpcOriginCommand extends $Command
.classBuilder<
Expand Down
38 changes: 38 additions & 0 deletions clients/client-cloudfront/src/commands/DeleteVpcOriginCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,44 @@ export interface DeleteVpcOriginCommandOutput extends DeleteVpcOriginResult, __M
* <p>Base exception class for all service exceptions from CloudFront service.</p>
*
* @public
* @example To delete a VPC origin
* ```javascript
* // The following command deletes a VPC origin:
* const input = {
* "Id": "vo_BQwjxxQxjCaBcQLzJUFkDM",
* "IfMatch": "E1F83G8C2ARO7P"
* };
* const command = new DeleteVpcOriginCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "ETag": "E1PA6795UKMFR9",
* "VpcOrigin": {
* "Arn": "arn:aws:cloudfront::123456789012:vpcorigin/vo_BQwjxxQxjCaBcQLzJUFkDM",
* "CreatedTime": "2024-10-15T17:19:42.318Z",
* "Id": "vo_BQwjxxQxjCaBcQLzJUFkDM",
* "LastModifiedTime": "2024-10-15T17:57:08.965Z",
* "Status": "Deploying",
* "VpcOriginEndpointConfig": {
* "Arn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-alb-us-west-2/e6aa5c7d26415c6d",
* "HTTPPort": 80,
* "HTTPSPort": 443,
* "Name": "my-vpcorigin-name",
* "OriginProtocolPolicy": "match-viewer",
* "OriginSslProtocols": {
* "Items": [
* "TLSv1.1",
* "TLSv1.2"
* ],
* "Quantity": 2
* }
* }
* }
* }
* *\/
* // example id: example-1
* ```
*
*/
export class DeleteVpcOriginCommand extends $Command
.classBuilder<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export interface GetDistributionCommandOutput extends GetDistributionResult, __M
* // },
* // ],
* // },
* // SelectionCriteria: "default" || "media-quality-based",
* // },
* // ],
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export interface GetDistributionConfigCommandOutput extends GetDistributionConfi
* // },
* // ],
* // },
* // SelectionCriteria: "default" || "media-quality-based",
* // },
* // ],
* // },
Expand Down
37 changes: 37 additions & 0 deletions clients/client-cloudfront/src/commands/GetVpcOriginCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,43 @@ export interface GetVpcOriginCommandOutput extends GetVpcOriginResult, __Metadat
* <p>Base exception class for all service exceptions from CloudFront service.</p>
*
* @public
* @example To get a VPC origin
* ```javascript
* // The following command gets a VPC origin:
* const input = {
* "Id": "vo_BQwjxxQxjCaBcQLzJUFkDM"
* };
* const command = new GetVpcOriginCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "ETag": "ETVPDKIKX0DER",
* "VpcOrigin": {
* "Arn": "arn:aws:cloudfront::123456789012:vpcorigin/vo_BQwjxxQxjCaBcQLzJUFkDM",
* "CreatedTime": "2024-10-15T17:19:42.318Z",
* "Id": "vo_BQwjxxQxjCaBcQLzJUFkDM",
* "LastModifiedTime": "2024-10-15T17:24:35.188Z",
* "Status": "Deployed",
* "VpcOriginEndpointConfig": {
* "Arn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-alb-us-west-2/e6aa5c7d26415c6d",
* "HTTPPort": 80,
* "HTTPSPort": 443,
* "Name": "my-vpcorigin-name",
* "OriginProtocolPolicy": "match-viewer",
* "OriginSslProtocols": {
* "Items": [
* "TLSv1.1",
* "TLSv1.2"
* ],
* "Quantity": 2
* }
* }
* }
* }
* *\/
* // example id: example-1
* ```
*
*/
export class GetVpcOriginCommand extends $Command
.classBuilder<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export interface ListDistributionsByAnycastIpListIdCommandOutput
* // },
* // ],
* // },
* // SelectionCriteria: "default" || "media-quality-based",
* // },
* // ],
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export interface ListDistributionsByRealtimeLogConfigCommandOutput
* // },
* // ],
* // },
* // SelectionCriteria: "default" || "media-quality-based",
* // },
* // ],
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,28 @@ export interface ListDistributionsByVpcOriginIdCommandOutput
* <p>Base exception class for all service exceptions from CloudFront service.</p>
*
* @public
* @example To list distributions by VPC origin ID
* ```javascript
* // The following command lists distributions by VPC origin ID:
* const input = {
* "VpcOriginId": "vo_BQwjxxQxjCaBcQLzJUFkDM"
* };
* const command = new ListDistributionsByVpcOriginIdCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "DistributionIdList": {
* "IsTruncated": false,
* "Items": [],
* "Marker": "a",
* "MaxItems": 100,
* "Quantity": 0
* }
* }
* *\/
* // example id: example-1
* ```
*
*/
export class ListDistributionsByVpcOriginIdCommand extends $Command
.classBuilder<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export interface ListDistributionsByWebACLIdCommandOutput extends ListDistributi
* // },
* // ],
* // },
* // SelectionCriteria: "default" || "media-quality-based",
* // },
* // ],
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export interface ListDistributionsCommandOutput extends ListDistributionsResult,
* // },
* // ],
* // },
* // SelectionCriteria: "default" || "media-quality-based",
* // },
* // ],
* // },
Expand Down
30 changes: 30 additions & 0 deletions clients/client-cloudfront/src/commands/ListVpcOriginsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,36 @@ export interface ListVpcOriginsCommandOutput extends ListVpcOriginsResult, __Met
* <p>Base exception class for all service exceptions from CloudFront service.</p>
*
* @public
* @example To list VPC origins
* ```javascript
* // The following command lists VPC origins:
* const input = {};
* const command = new ListVpcOriginsCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "VpcOriginList": {
* "IsTruncated": true,
* "Items": [
* {
* "Arn": "arn:aws:cloudfront::123456789012:vpcorigin/vo_BQwjxxQxjCaBcQLzJUFkDM",
* "CreatedTime": "2024-10-15T17:19:42.318Z",
* "Id": "vo_BQwjxxQxjCaBcQLzJUFkDM",
* "LastModifiedTime": "2024-10-15T17:24:35.188Z",
* "Name": "my-vpcorigin-name",
* "OriginEndpointArn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-alb-us-west-2/e6aa5c7d26415c6d",
* "Status": "Deployed"
* }
* ],
* "Marker": "a",
* "MaxItems": 100,
* "Quantity": 1
* }
* }
* *\/
* // example id: example-1
* ```
*
*/
export class ListVpcOriginsCommand extends $Command
.classBuilder<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export interface UpdateDistributionCommandOutput extends UpdateDistributionResul
* },
* ],
* },
* SelectionCriteria: "default" || "media-quality-based",
* },
* ],
* },
Expand Down Expand Up @@ -489,6 +490,7 @@ export interface UpdateDistributionCommandOutput extends UpdateDistributionResul
* // },
* // ],
* // },
* // SelectionCriteria: "default" || "media-quality-based",
* // },
* // ],
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export interface UpdateDistributionWithStagingConfigCommandOutput
* // },
* // ],
* // },
* // SelectionCriteria: "default" || "media-quality-based",
* // },
* // ],
* // },
Expand Down
52 changes: 52 additions & 0 deletions clients/client-cloudfront/src/commands/UpdateVpcOriginCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,58 @@ export interface UpdateVpcOriginCommandOutput extends UpdateVpcOriginResult, __M
* <p>Base exception class for all service exceptions from CloudFront service.</p>
*
* @public
* @example To update a VPC origin
* ```javascript
* // The following command updates a VPC origin:
* const input = {
* "Id": "vo_BQwjxxQxjCaBcQLzJUFkDM",
* "IfMatch": "ETVPDKIKX0DER",
* "VpcOriginEndpointConfig": {
* "Arn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-alb-us-west-2/e6aa5c7d26415c6d",
* "HTTPPort": 80,
* "HTTPSPort": 443,
* "Name": "my-vpcorigin-name",
* "OriginProtocolPolicy": "match-viewer",
* "OriginSslProtocols": {
* "Items": [
* "TLSv1.1",
* "TLSv1.2"
* ],
* "Quantity": 2
* }
* }
* };
* const command = new UpdateVpcOriginCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "ETag": "E3UN6WX5RRO2AG",
* "VpcOrigin": {
* "Arn": "arn:aws:cloudfront::123456789012:vpcorigin/vo_BQwjxxQxjCaBcQLzJUFkDM",
* "CreatedTime": "2024-10-15T17:19:42.318Z",
* "Id": "vo_BQwjxxQxjCaBcQLzJUFkDM",
* "LastModifiedTime": "2024-10-15T17:47:08.133Z",
* "Status": "Deploying",
* "VpcOriginEndpointConfig": {
* "Arn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-alb-us-west-2/e6aa5c7d26415c6d",
* "HTTPPort": 80,
* "HTTPSPort": 443,
* "Name": "my-vpcorigin-name",
* "OriginProtocolPolicy": "match-viewer",
* "OriginSslProtocols": {
* "Items": [
* "TLSv1.1",
* "TLSv1.2"
* ],
* "Quantity": 2
* }
* }
* }
* }
* *\/
* // example id: example-1
* ```
*
*/
export class UpdateVpcOriginCommand extends $Command
.classBuilder<
Expand Down
Loading

0 comments on commit 2d9bc39

Please sign in to comment.