Skip to content

Commit 502a221

Browse files
author
awstools
committed
feat(client-lightsail): This release adds support to upgrade the TLS version of the distribution.
1 parent 1508e72 commit 502a221

File tree

8 files changed

+177
-14
lines changed

8 files changed

+177
-14
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export interface CreateDistributionCommandOutput extends CreateDistributionResul
4343
* name: "STRING_VALUE",
4444
* regionName: "us-east-1" || "us-east-2" || "us-west-1" || "us-west-2" || "eu-west-1" || "eu-west-2" || "eu-west-3" || "eu-central-1" || "ca-central-1" || "ap-south-1" || "ap-southeast-1" || "ap-southeast-2" || "ap-northeast-1" || "ap-northeast-2" || "eu-north-1",
4545
* protocolPolicy: "http-only" || "https-only",
46+
* responseTimeout: Number("int"),
4647
* },
4748
* defaultCacheBehavior: { // CacheBehavior
4849
* behavior: "dont-cache" || "cache",
@@ -86,6 +87,8 @@ export interface CreateDistributionCommandOutput extends CreateDistributionResul
8687
* value: "STRING_VALUE",
8788
* },
8889
* ],
90+
* certificateName: "STRING_VALUE",
91+
* viewerMinimumTlsProtocolVersion: "TLSv1.1_2016" || "TLSv1.2_2018" || "TLSv1.2_2019" || "TLSv1.2_2021",
8992
* };
9093
* const command = new CreateDistributionCommand(input);
9194
* const response = await client.send(command);
@@ -113,6 +116,7 @@ export interface CreateDistributionCommandOutput extends CreateDistributionResul
113116
* // resourceType: "ContainerService" || "Instance" || "StaticIp" || "KeyPair" || "InstanceSnapshot" || "Domain" || "PeeredVpc" || "LoadBalancer" || "LoadBalancerTlsCertificate" || "Disk" || "DiskSnapshot" || "RelationalDatabase" || "RelationalDatabaseSnapshot" || "ExportSnapshotRecord" || "CloudFormationStackRecord" || "Alarm" || "ContactMethod" || "Distribution" || "Certificate" || "Bucket",
114117
* // regionName: "us-east-1" || "us-east-2" || "us-west-1" || "us-west-2" || "eu-west-1" || "eu-west-2" || "eu-west-3" || "eu-central-1" || "ca-central-1" || "ap-south-1" || "ap-southeast-1" || "ap-southeast-2" || "ap-northeast-1" || "ap-northeast-2" || "eu-north-1",
115118
* // protocolPolicy: "http-only" || "https-only",
119+
* // responseTimeout: Number("int"),
116120
* // },
117121
* // originPublicDNS: "STRING_VALUE",
118122
* // defaultCacheBehavior: { // CacheBehavior
@@ -157,6 +161,7 @@ export interface CreateDistributionCommandOutput extends CreateDistributionResul
157161
* // value: "STRING_VALUE",
158162
* // },
159163
* // ],
164+
* // viewerMinimumTlsProtocolVersion: "STRING_VALUE",
160165
* // },
161166
* // operation: { // Operation
162167
* // id: "STRING_VALUE",

clients/client-lightsail/src/commands/GetContainerServicePowersCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
88
import { LightsailClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LightsailClient";
9-
import { GetContainerServicePowersRequest, GetContainerServicePowersResult } from "../models/models_0";
9+
import { GetContainerServicePowersRequest } from "../models/models_0";
10+
import { GetContainerServicePowersResult } from "../models/models_1";
1011
import { de_GetContainerServicePowersCommand, se_GetContainerServicePowersCommand } from "../protocols/Aws_json1_1";
1112

1213
/**

clients/client-lightsail/src/commands/GetDistributionsCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export interface GetDistributionsCommandOutput extends GetDistributionsResult, _
6666
* // resourceType: "ContainerService" || "Instance" || "StaticIp" || "KeyPair" || "InstanceSnapshot" || "Domain" || "PeeredVpc" || "LoadBalancer" || "LoadBalancerTlsCertificate" || "Disk" || "DiskSnapshot" || "RelationalDatabase" || "RelationalDatabaseSnapshot" || "ExportSnapshotRecord" || "CloudFormationStackRecord" || "Alarm" || "ContactMethod" || "Distribution" || "Certificate" || "Bucket",
6767
* // regionName: "us-east-1" || "us-east-2" || "us-west-1" || "us-west-2" || "eu-west-1" || "eu-west-2" || "eu-west-3" || "eu-central-1" || "ca-central-1" || "ap-south-1" || "ap-southeast-1" || "ap-southeast-2" || "ap-northeast-1" || "ap-northeast-2" || "eu-north-1",
6868
* // protocolPolicy: "http-only" || "https-only",
69+
* // responseTimeout: Number("int"),
6970
* // },
7071
* // originPublicDNS: "STRING_VALUE",
7172
* // defaultCacheBehavior: { // CacheBehavior
@@ -110,6 +111,7 @@ export interface GetDistributionsCommandOutput extends GetDistributionsResult, _
110111
* // value: "STRING_VALUE",
111112
* // },
112113
* // ],
114+
* // viewerMinimumTlsProtocolVersion: "STRING_VALUE",
113115
* // },
114116
* // ],
115117
* // nextPageToken: "STRING_VALUE",

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export interface UpdateDistributionCommandOutput extends UpdateDistributionResul
4141
* name: "STRING_VALUE",
4242
* regionName: "us-east-1" || "us-east-2" || "us-west-1" || "us-west-2" || "eu-west-1" || "eu-west-2" || "eu-west-3" || "eu-central-1" || "ca-central-1" || "ap-south-1" || "ap-southeast-1" || "ap-southeast-2" || "ap-northeast-1" || "ap-northeast-2" || "eu-north-1",
4343
* protocolPolicy: "http-only" || "https-only",
44+
* responseTimeout: Number("int"),
4445
* },
4546
* defaultCacheBehavior: { // CacheBehavior
4647
* behavior: "dont-cache" || "cache",
@@ -77,6 +78,9 @@ export interface UpdateDistributionCommandOutput extends UpdateDistributionResul
7778
* },
7879
* ],
7980
* isEnabled: true || false,
81+
* viewerMinimumTlsProtocolVersion: "TLSv1.1_2016" || "TLSv1.2_2018" || "TLSv1.2_2019" || "TLSv1.2_2021",
82+
* certificateName: "STRING_VALUE",
83+
* useDefaultCertificate: true || false,
8084
* };
8185
* const command = new UpdateDistributionCommand(input);
8286
* const response = await client.send(command);

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

Lines changed: 50 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5337,8 +5337,32 @@ export interface InputOrigin {
53375337
* @public
53385338
*/
53395339
protocolPolicy?: OriginProtocolPolicyEnum;
5340+
5341+
/**
5342+
* <p>The amount of time, in seconds, that the distribution waits for a response after forwarding a request to the origin.
5343+
* The minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is 30 seconds.</p>
5344+
* @public
5345+
*/
5346+
responseTimeout?: number;
53405347
}
53415348

5349+
/**
5350+
* @public
5351+
* @enum
5352+
*/
5353+
export const ViewerMinimumTlsProtocolVersionEnum = {
5354+
TLSv11_2016: "TLSv1.1_2016",
5355+
TLSv12_2018: "TLSv1.2_2018",
5356+
TLSv12_2019: "TLSv1.2_2019",
5357+
TLSv12_2021: "TLSv1.2_2021",
5358+
} as const;
5359+
5360+
/**
5361+
* @public
5362+
*/
5363+
export type ViewerMinimumTlsProtocolVersionEnum =
5364+
(typeof ViewerMinimumTlsProtocolVersionEnum)[keyof typeof ViewerMinimumTlsProtocolVersionEnum];
5365+
53425366
/**
53435367
* @public
53445368
*/
@@ -5400,6 +5424,19 @@ export interface CreateDistributionRequest {
54005424
* @public
54015425
*/
54025426
tags?: Tag[];
5427+
5428+
/**
5429+
* <p>The name of the SSL/TLS certificate that you want to attach to the distribution.</p>
5430+
* <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetCertificates.html">GetCertificates</a> action to get a list of certificate names that you can specify.</p>
5431+
* @public
5432+
*/
5433+
certificateName?: string;
5434+
5435+
/**
5436+
* <p>The minimum TLS protocol version for the SSL/TLS certificate.</p>
5437+
* @public
5438+
*/
5439+
viewerMinimumTlsProtocolVersion?: ViewerMinimumTlsProtocolVersionEnum;
54035440
}
54045441

54055442
/**
@@ -5435,6 +5472,13 @@ export interface Origin {
54355472
* @public
54365473
*/
54375474
protocolPolicy?: OriginProtocolPolicyEnum;
5475+
5476+
/**
5477+
* <p>The amount of time, in seconds, that the distribution waits for a response after forwarding a request to the origin.
5478+
* The minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is 30 seconds.</p>
5479+
* @public
5480+
*/
5481+
responseTimeout?: number;
54385482
}
54395483

54405484
/**
@@ -5577,6 +5621,12 @@ export interface LightsailDistribution {
55775621
* @public
55785622
*/
55795623
tags?: Tag[];
5624+
5625+
/**
5626+
* <p>The minimum TLS protocol version that the distribution can use to communicate with viewers.</p>
5627+
* @public
5628+
*/
5629+
viewerMinimumTlsProtocolVersion?: string;
55805630
}
55815631

55825632
/**
@@ -9287,18 +9337,6 @@ export interface GetContainerServiceMetricDataResult {
92879337
*/
92889338
export interface GetContainerServicePowersRequest {}
92899339

9290-
/**
9291-
* @public
9292-
*/
9293-
export interface GetContainerServicePowersResult {
9294-
/**
9295-
* <p>An array of objects that describe the powers that can be specified for a container
9296-
* service.</p>
9297-
* @public
9298-
*/
9299-
powers?: ContainerServicePower[];
9300-
}
9301-
93029340
/**
93039341
* @internal
93049342
*/

clients/client-lightsail/src/models/models_1.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
ContactProtocol,
1919
ContainerImage,
2020
ContainerService,
21+
ContainerServicePower,
2122
ContainerServicePowerName,
2223
CostEstimate,
2324
Disk,
@@ -44,8 +45,21 @@ import {
4445
ResourceType,
4546
Tag,
4647
TreatMissingData,
48+
ViewerMinimumTlsProtocolVersionEnum,
4749
} from "./models_0";
4850

51+
/**
52+
* @public
53+
*/
54+
export interface GetContainerServicePowersResult {
55+
/**
56+
* <p>An array of objects that describe the powers that can be specified for a container
57+
* service.</p>
58+
* @public
59+
*/
60+
powers?: ContainerServicePower[];
61+
}
62+
4963
/**
5064
* @public
5165
*/
@@ -6540,6 +6554,27 @@ export interface UpdateDistributionRequest {
65406554
* @public
65416555
*/
65426556
isEnabled?: boolean;
6557+
6558+
/**
6559+
* <p>Use this parameter to update the minimum TLS protocol version for the SSL/TLS certificate that's attached to the distribution.</p>
6560+
* @public
6561+
*/
6562+
viewerMinimumTlsProtocolVersion?: ViewerMinimumTlsProtocolVersionEnum;
6563+
6564+
/**
6565+
* <p>The name of the SSL/TLS certificate that you want to attach to the distribution.</p>
6566+
* <p>Only certificates with a status of <code>ISSUED</code> can be attached to a distribution.</p>
6567+
* <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetCertificates.html">GetCertificates</a> action to get a list of certificate names that you can specify.</p>
6568+
* @public
6569+
*/
6570+
certificateName?: string;
6571+
6572+
/**
6573+
* <p>Indicates whether the default SSL/TLS certificate is attached to the distribution. The default value is <code>true</code>. When <code>true</code>, the distribution uses the default domain name such as <code>d111111abcdef8.cloudfront.net</code>.</p>
6574+
* <p> Set this value to <code>false</code> to attach a new certificate to the distribution.</p>
6575+
* @public
6576+
*/
6577+
useDefaultCertificate?: boolean;
65436578
}
65446579

65456580
/**

clients/client-lightsail/src/protocols/Aws_json1_1.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,6 @@ import {
620620
GetContainerServiceMetricDataRequest,
621621
GetContainerServiceMetricDataResult,
622622
GetContainerServicePowersRequest,
623-
GetContainerServicePowersResult,
624623
HeaderEnum,
625624
HeaderObject,
626625
InputOrigin,
@@ -644,6 +643,7 @@ import {
644643
UnauthenticatedException,
645644
} from "../models/models_0";
646645
import {
646+
GetContainerServicePowersResult,
647647
GetContainerServicesRequest,
648648
GetCostEstimateRequest,
649649
GetCostEstimateResult,
@@ -9033,6 +9033,7 @@ const de_LightsailDistribution = (output: any, context: __SerdeContext): Lightsa
90339033
status: __expectString,
90349034
supportCode: __expectString,
90359035
tags: _json,
9036+
viewerMinimumTlsProtocolVersion: __expectString,
90369037
}) as any;
90379038
};
90389039

codegen/sdk-codegen/aws-models/lightsail.json

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4324,6 +4324,18 @@
43244324
"traits": {
43254325
"smithy.api#documentation": "<p>The tag keys and optional values to add to the distribution during create.</p>\n <p>Use the <code>TagResource</code> action to tag a resource after it's created.</p>"
43264326
}
4327+
},
4328+
"certificateName": {
4329+
"target": "com.amazonaws.lightsail#ResourceName",
4330+
"traits": {
4331+
"smithy.api#documentation": "<p>The name of the SSL/TLS certificate that you want to attach to the distribution.</p>\n <p>Use the <a href=\"https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetCertificates.html\">GetCertificates</a> action to get a list of certificate names that you can specify.</p>"
4332+
}
4333+
},
4334+
"viewerMinimumTlsProtocolVersion": {
4335+
"target": "com.amazonaws.lightsail#ViewerMinimumTlsProtocolVersionEnum",
4336+
"traits": {
4337+
"smithy.api#documentation": "<p>The minimum TLS protocol version for the SSL/TLS certificate.</p>"
4338+
}
43274339
}
43284340
},
43294341
"traits": {
@@ -13956,6 +13968,12 @@
1395613968
"traits": {
1395713969
"smithy.api#documentation": "<p>The protocol that your Amazon Lightsail distribution uses when establishing a connection\n with your origin to pull content.</p>"
1395813970
}
13971+
},
13972+
"responseTimeout": {
13973+
"target": "com.amazonaws.lightsail#integer",
13974+
"traits": {
13975+
"smithy.api#documentation": "<p>The amount of time, in seconds, that the distribution waits for a response after forwarding a request to the origin.\n The minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is 30 seconds.</p>"
13976+
}
1395913977
}
1396013978
},
1396113979
"traits": {
@@ -15198,6 +15216,12 @@
1519815216
"traits": {
1519915217
"smithy.api#documentation": "<p>The tag keys and optional values for the resource. For more information about tags in\n Lightsail, see the <a href=\"https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags\">Amazon Lightsail Developer Guide</a>.</p>"
1520015218
}
15219+
},
15220+
"viewerMinimumTlsProtocolVersion": {
15221+
"target": "com.amazonaws.lightsail#string",
15222+
"traits": {
15223+
"smithy.api#documentation": "<p>The minimum TLS protocol version that the distribution can use to communicate with viewers.</p>"
15224+
}
1520115225
}
1520215226
},
1520315227
"traits": {
@@ -18738,6 +18762,12 @@
1873818762
"traits": {
1873918763
"smithy.api#documentation": "<p>The protocol that your Amazon Lightsail distribution uses when establishing a connection\n with your origin to pull content.</p>"
1874018764
}
18765+
},
18766+
"responseTimeout": {
18767+
"target": "com.amazonaws.lightsail#integer",
18768+
"traits": {
18769+
"smithy.api#documentation": "<p>The amount of time, in seconds, that the distribution waits for a response after forwarding a request to the origin.\n The minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is 30 seconds.</p>"
18770+
}
1874118771
}
1874218772
},
1874318773
"traits": {
@@ -22906,6 +22936,24 @@
2290622936
"traits": {
2290722937
"smithy.api#documentation": "<p>Indicates whether to enable the distribution.</p>"
2290822938
}
22939+
},
22940+
"viewerMinimumTlsProtocolVersion": {
22941+
"target": "com.amazonaws.lightsail#ViewerMinimumTlsProtocolVersionEnum",
22942+
"traits": {
22943+
"smithy.api#documentation": "<p>Use this parameter to update the minimum TLS protocol version for the SSL/TLS certificate that's attached to the distribution.</p>"
22944+
}
22945+
},
22946+
"certificateName": {
22947+
"target": "com.amazonaws.lightsail#ResourceName",
22948+
"traits": {
22949+
"smithy.api#documentation": "<p>The name of the SSL/TLS certificate that you want to attach to the distribution.</p>\n <p>Only certificates with a status of <code>ISSUED</code> can be attached to a distribution.</p>\n <p>Use the <a href=\"https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetCertificates.html\">GetCertificates</a> action to get a list of certificate names that you can specify.</p>"
22950+
}
22951+
},
22952+
"useDefaultCertificate": {
22953+
"target": "com.amazonaws.lightsail#boolean",
22954+
"traits": {
22955+
"smithy.api#documentation": "<p>Indicates whether the default SSL/TLS certificate is attached to the distribution. The default value is <code>true</code>. When <code>true</code>, the distribution uses the default domain name such as <code>d111111abcdef8.cloudfront.net</code>.</p>\n <p> Set this value to <code>false</code> to attach a new certificate to the distribution.</p>"
22956+
}
2290922957
}
2291022958
},
2291122959
"traits": {
@@ -23383,6 +23431,35 @@
2338323431
"smithy.api#output": {}
2338423432
}
2338523433
},
23434+
"com.amazonaws.lightsail#ViewerMinimumTlsProtocolVersionEnum": {
23435+
"type": "enum",
23436+
"members": {
23437+
"TLSv11_2016": {
23438+
"target": "smithy.api#Unit",
23439+
"traits": {
23440+
"smithy.api#enumValue": "TLSv1.1_2016"
23441+
}
23442+
},
23443+
"TLSv12_2018": {
23444+
"target": "smithy.api#Unit",
23445+
"traits": {
23446+
"smithy.api#enumValue": "TLSv1.2_2018"
23447+
}
23448+
},
23449+
"TLSv12_2019": {
23450+
"target": "smithy.api#Unit",
23451+
"traits": {
23452+
"smithy.api#enumValue": "TLSv1.2_2019"
23453+
}
23454+
},
23455+
"TLSv12_2021": {
23456+
"target": "smithy.api#Unit",
23457+
"traits": {
23458+
"smithy.api#enumValue": "TLSv1.2_2021"
23459+
}
23460+
}
23461+
}
23462+
},
2338623463
"com.amazonaws.lightsail#boolean": {
2338723464
"type": "boolean"
2338823465
},

0 commit comments

Comments
 (0)