From d28ae7fab4870fdd1a058617b5b297aea4831477 Mon Sep 17 00:00:00 2001 From: aws-sdk-dotnet-automation Date: Mon, 1 Apr 2024 18:59:35 +0000 Subject: [PATCH] This release adds support to upgrade the TLS version of the distribution. --- .../lightsail/lightsail-2016-11-28.api.json | 27 +++++-- .../lightsail/lightsail-2016-11-28.docs.json | 13 ++++ .../lightsail-2016-11-28.normal.json | 41 +++++++++++ .../Generated/PropertyValueRules.xml | 8 ++ .../Model/CreateDistributionRequest.cs | 43 +++++++++++ .../Lightsail/Generated/Model/InputOrigin.cs | 21 ++++++ .../CreateDistributionRequestMarshaller.cs | 12 +++ .../InputOriginMarshaller.cs | 6 ++ .../LightsailDistributionUnmarshaller.cs | 6 ++ .../OriginUnmarshaller.cs | 6 ++ .../UpdateDistributionRequestMarshaller.cs | 18 +++++ .../Generated/Model/LightsailDistribution.cs | 20 +++++ .../Lightsail/Generated/Model/Origin.cs | 21 ++++++ .../Model/UpdateDistributionRequest.cs | 73 +++++++++++++++++++ .../Generated/ServiceEnumerations.cs | 58 +++++++++++++++ 15 files changed, 368 insertions(+), 5 deletions(-) diff --git a/generator/ServiceModels/lightsail/lightsail-2016-11-28.api.json b/generator/ServiceModels/lightsail/lightsail-2016-11-28.api.json index eb165069453f..8ed6a91da7a2 100644 --- a/generator/ServiceModels/lightsail/lightsail-2016-11-28.api.json +++ b/generator/ServiceModels/lightsail/lightsail-2016-11-28.api.json @@ -3999,7 +3999,9 @@ "cacheBehaviors":{"shape":"CacheBehaviorList"}, "bundleId":{"shape":"string"}, "ipAddressType":{"shape":"IpAddressType"}, - "tags":{"shape":"TagList"} + "tags":{"shape":"TagList"}, + "certificateName":{"shape":"ResourceName"}, + "viewerMinimumTlsProtocolVersion":{"shape":"ViewerMinimumTlsProtocolVersionEnum"} } }, "CreateDistributionResult":{ @@ -6058,7 +6060,8 @@ "members":{ "name":{"shape":"ResourceName"}, "regionName":{"shape":"RegionName"}, - "protocolPolicy":{"shape":"OriginProtocolPolicyEnum"} + "protocolPolicy":{"shape":"OriginProtocolPolicyEnum"}, + "responseTimeout":{"shape":"integer"} } }, "Instance":{ @@ -6396,7 +6399,8 @@ "cacheBehaviors":{"shape":"CacheBehaviorList"}, "ableToUpdateBundle":{"shape":"boolean"}, "ipAddressType":{"shape":"IpAddressType"}, - "tags":{"shape":"TagList"} + "tags":{"shape":"TagList"}, + "viewerMinimumTlsProtocolVersion":{"shape":"string"} } }, "LoadBalancer":{ @@ -6955,7 +6959,8 @@ "name":{"shape":"ResourceName"}, "resourceType":{"shape":"ResourceType"}, "regionName":{"shape":"RegionName"}, - "protocolPolicy":{"shape":"OriginProtocolPolicyEnum"} + "protocolPolicy":{"shape":"OriginProtocolPolicyEnum"}, + "responseTimeout":{"shape":"integer"} } }, "OriginProtocolPolicyEnum":{ @@ -8036,7 +8041,10 @@ "defaultCacheBehavior":{"shape":"CacheBehavior"}, "cacheBehaviorSettings":{"shape":"CacheSettings"}, "cacheBehaviors":{"shape":"CacheBehaviorList"}, - "isEnabled":{"shape":"boolean"} + "isEnabled":{"shape":"boolean"}, + "viewerMinimumTlsProtocolVersion":{"shape":"ViewerMinimumTlsProtocolVersionEnum"}, + "certificateName":{"shape":"ResourceName"}, + "useDefaultCertificate":{"shape":"boolean"} } }, "UpdateDistributionResult":{ @@ -8138,6 +8146,15 @@ "operations":{"shape":"OperationList"} } }, + "ViewerMinimumTlsProtocolVersionEnum":{ + "type":"string", + "enum":[ + "TLSv1.1_2016", + "TLSv1.2_2018", + "TLSv1.2_2019", + "TLSv1.2_2021" + ] + }, "boolean":{"type":"boolean"}, "double":{"type":"double"}, "float":{"type":"float"}, diff --git a/generator/ServiceModels/lightsail/lightsail-2016-11-28.docs.json b/generator/ServiceModels/lightsail/lightsail-2016-11-28.docs.json index caf2d390869c..fd9d14f4a638 100644 --- a/generator/ServiceModels/lightsail/lightsail-2016-11-28.docs.json +++ b/generator/ServiceModels/lightsail/lightsail-2016-11-28.docs.json @@ -3810,6 +3810,7 @@ "CreateDiskSnapshotRequest$diskSnapshotName": "

The name of the destination disk snapshot (my-disk-snapshot) based on the source disk.

", "CreateDiskSnapshotRequest$instanceName": "

The unique name of the source instance (Amazon_Linux-512MB-Virginia-1). When this is defined, a snapshot of the instance's system volume is created.

This parameter cannot be defined together with the disk name parameter. The instance name and disk name parameters are mutually exclusive.

", "CreateDistributionRequest$distributionName": "

The name for the distribution.

", + "CreateDistributionRequest$certificateName": "

The name of the SSL/TLS certificate that you want to attach to the distribution.

Use the GetCertificates action to get a list of certificate names that you can specify.

", "CreateGUISessionAccessDetailsRequest$resourceName": "

The resource name.

", "CreateGUISessionAccessDetailsResult$resourceName": "

The resource name.

", "CreateInstanceSnapshotRequest$instanceSnapshotName": "

The name for your new snapshot.

", @@ -3944,6 +3945,7 @@ "UntagResourceRequest$resourceName": "

The name of the resource from which you are removing a tag.

", "UpdateDistributionBundleRequest$distributionName": "

The name of the distribution for which to update the bundle.

Use the GetDistributions action to get a list of distribution names that you can specify.

", "UpdateDistributionRequest$distributionName": "

The name of the distribution to update.

Use the GetDistributions action to get a list of distribution names that you can specify.

", + "UpdateDistributionRequest$certificateName": "

The name of the SSL/TLS certificate that you want to attach to the distribution.

Only certificates with a status of ISSUED can be attached to a distribution.

Use the GetCertificates action to get a list of certificate names that you can specify.

", "UpdateInstanceMetadataOptionsRequest$instanceName": "

The name of the instance for which to update metadata parameters.

", "UpdateLoadBalancerAttributeRequest$loadBalancerName": "

The name of the load balancer that you want to modify (my-load-balancer.

", "UpdateRelationalDatabaseParametersRequest$relationalDatabaseName": "

The name of your database for which to update parameters.

", @@ -4504,6 +4506,13 @@ "refs": { } }, + "ViewerMinimumTlsProtocolVersionEnum": { + "base": null, + "refs": { + "CreateDistributionRequest$viewerMinimumTlsProtocolVersion": "

The minimum TLS protocol version for the SSL/TLS certificate.

", + "UpdateDistributionRequest$viewerMinimumTlsProtocolVersion": "

Use this parameter to update the minimum TLS protocol version for the SSL/TLS certificate that's attached to the distribution.

" + } + }, "boolean": { "base": null, "refs": { @@ -4571,6 +4580,7 @@ "StopInstanceRequest$force": "

When set to True, forces a Lightsail instance that is stuck in a stopping state to stop.

Only use the force parameter if your instance is stuck in the stopping state. In any other state, your instance should stop normally without adding this parameter to your API request.

", "UpdateContainerServiceRequest$isDisabled": "

A Boolean value to indicate whether the container service is disabled.

", "UpdateDistributionRequest$isEnabled": "

Indicates whether to enable the distribution.

", + "UpdateDistributionRequest$useDefaultCertificate": "

Indicates whether the default SSL/TLS certificate is attached to the distribution. The default value is true. When true, the distribution uses the default domain name such as d111111abcdef8.cloudfront.net.

Set this value to false to attach a new certificate to the distribution.

", "UpdateRelationalDatabaseRequest$rotateMasterUserPassword": "

When true, the master user password is changed to a new strong password generated by Lightsail.

Use the get relational database master user password operation to get the new password.

", "UpdateRelationalDatabaseRequest$enableBackupRetention": "

When true, enables automated backup retention for your database.

Updates are applied during the next maintenance window because this can result in an outage.

", "UpdateRelationalDatabaseRequest$disableBackupRetention": "

When true, disables automated backup retention for your database.

Disabling backup retention deletes all automated database backups. Before disabling this, you may want to create a snapshot of your database using the create relational database snapshot operation.

Updates are applied during the next maintenance window because this can result in an outage.

", @@ -4640,12 +4650,14 @@ "DistributionBundle$transferPerMonthInGb": "

The monthly network transfer quota of the bundle.

", "EndpointRequest$containerPort": "

The port of the container to which traffic is forwarded to.

", "GetRelationalDatabaseEventsRequest$durationInMinutes": "

The number of minutes in the past from which to retrieve events. For example, to get all events from the past 2 hours, enter 120.

Default: 60

The minimum is 1 and the maximum is 14 days (20160 minutes).

", + "InputOrigin$responseTimeout": "

The amount of time, in seconds, that the distribution waits for a response after forwarding a request to the origin. The minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is 30 seconds.

", "InstanceHardware$cpuCount": "

The number of vCPUs the instance has.

", "InstanceMetadataOptions$httpPutResponseHopLimit": "

The desired HTTP PUT response hop limit for instance metadata requests. A larger number means that the instance metadata requests can travel farther.

", "InstanceSnapshot$sizeInGb": "

The size in GB of the SSD.

", "InstanceState$code": "

The status code for the instance.

", "LoadBalancer$instancePort": "

The port where the load balancer will direct traffic to your Lightsail instances. For HTTP traffic, it's port 80. For HTTPS traffic, it's port 443.

", "MonthlyTransfer$gbPerMonthAllocated": "

The amount allocated per month (in GB).

", + "Origin$responseTimeout": "

The amount of time, in seconds, that the distribution waits for a response after forwarding a request to the origin. The minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is 30 seconds.

", "PutAlarmRequest$evaluationPeriods": "

The number of most recent periods over which data is compared to the specified threshold. If you are setting an \"M out of N\" alarm, this value (evaluationPeriods) is the N.

If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies the rolling period of time in which data points are evaluated.

Each evaluation period is five minutes long. For example, specify an evaluation period of 24 to evaluate a metric over a rolling period of two hours.

You can specify a minimum valuation period of 1 (5 minutes), and a maximum evaluation period of 288 (24 hours).

", "PutAlarmRequest$datapointsToAlarm": "

The number of data points that must be not within the specified threshold to trigger the alarm. If you are setting an \"M out of N\" alarm, this value (datapointsToAlarm) is the M.

", "RelationalDatabaseBundle$diskSizeInGb": "

The size of the disk for the database bundle.

", @@ -4855,6 +4867,7 @@ "LightsailDistribution$domainName": "

The domain name of the distribution.

", "LightsailDistribution$bundleId": "

The ID of the bundle currently applied to the distribution.

", "LightsailDistribution$originPublicDNS": "

The public DNS of the origin.

", + "LightsailDistribution$viewerMinimumTlsProtocolVersion": "

The minimum TLS protocol version that the distribution can use to communicate with viewers.

", "LoadBalancer$supportCode": "

The support code. Include this code in your email to support when you have questions about your Lightsail load balancer. This code enables our support team to look up your Lightsail information more easily.

", "LoadBalancerConfigurationOptions$value": null, "LoadBalancerTlsCertificate$supportCode": "

The support code. Include this code in your email to support when you have questions about your Lightsail load balancer or SSL/TLS certificate. This code enables our support team to look up your Lightsail information more easily.

", diff --git a/generator/ServiceModels/lightsail/lightsail-2016-11-28.normal.json b/generator/ServiceModels/lightsail/lightsail-2016-11-28.normal.json index 5750921dd44c..cb178ff9528c 100644 --- a/generator/ServiceModels/lightsail/lightsail-2016-11-28.normal.json +++ b/generator/ServiceModels/lightsail/lightsail-2016-11-28.normal.json @@ -5153,6 +5153,14 @@ "tags":{ "shape":"TagList", "documentation":"

The tag keys and optional values to add to the distribution during create.

Use the TagResource action to tag a resource after it's created.

" + }, + "certificateName":{ + "shape":"ResourceName", + "documentation":"

The name of the SSL/TLS certificate that you want to attach to the distribution.

Use the GetCertificates action to get a list of certificate names that you can specify.

" + }, + "viewerMinimumTlsProtocolVersion":{ + "shape":"ViewerMinimumTlsProtocolVersionEnum", + "documentation":"

The minimum TLS protocol version for the SSL/TLS certificate.

" } } }, @@ -8740,6 +8748,10 @@ "protocolPolicy":{ "shape":"OriginProtocolPolicyEnum", "documentation":"

The protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.

" + }, + "responseTimeout":{ + "shape":"integer", + "documentation":"

The amount of time, in seconds, that the distribution waits for a response after forwarding a request to the origin. The minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is 30 seconds.

" } }, "documentation":"

Describes the origin resource of an Amazon Lightsail content delivery network (CDN) distribution.

An origin can be a Lightsail instance, bucket, container service, or load balancer. A distribution pulls content from an origin, caches it, and serves it to viewers via a worldwide network of edge servers.

" @@ -9447,6 +9459,10 @@ "tags":{ "shape":"TagList", "documentation":"

The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.

" + }, + "viewerMinimumTlsProtocolVersion":{ + "shape":"string", + "documentation":"

The minimum TLS protocol version that the distribution can use to communicate with viewers.

" } }, "documentation":"

Describes an Amazon Lightsail content delivery network (CDN) distribution.

" @@ -10314,6 +10330,10 @@ "protocolPolicy":{ "shape":"OriginProtocolPolicyEnum", "documentation":"

The protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.

" + }, + "responseTimeout":{ + "shape":"integer", + "documentation":"

The amount of time, in seconds, that the distribution waits for a response after forwarding a request to the origin. The minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is 30 seconds.

" } }, "documentation":"

Describes the origin resource of an Amazon Lightsail content delivery network (CDN) distribution.

An origin can be a Lightsail instance, bucket, or load balancer. A distribution pulls content from an origin, caches it, and serves it to viewers via a worldwide network of edge servers.

" @@ -12183,6 +12203,18 @@ "isEnabled":{ "shape":"boolean", "documentation":"

Indicates whether to enable the distribution.

" + }, + "viewerMinimumTlsProtocolVersion":{ + "shape":"ViewerMinimumTlsProtocolVersionEnum", + "documentation":"

Use this parameter to update the minimum TLS protocol version for the SSL/TLS certificate that's attached to the distribution.

" + }, + "certificateName":{ + "shape":"ResourceName", + "documentation":"

The name of the SSL/TLS certificate that you want to attach to the distribution.

Only certificates with a status of ISSUED can be attached to a distribution.

Use the GetCertificates action to get a list of certificate names that you can specify.

" + }, + "useDefaultCertificate":{ + "shape":"boolean", + "documentation":"

Indicates whether the default SSL/TLS certificate is attached to the distribution. The default value is true. When true, the distribution uses the default domain name such as d111111abcdef8.cloudfront.net.

Set this value to false to attach a new certificate to the distribution.

" } } }, @@ -12372,6 +12404,15 @@ } } }, + "ViewerMinimumTlsProtocolVersionEnum":{ + "type":"string", + "enum":[ + "TLSv1.1_2016", + "TLSv1.2_2018", + "TLSv1.2_2019", + "TLSv1.2_2021" + ] + }, "boolean":{"type":"boolean"}, "double":{"type":"double"}, "float":{"type":"float"}, diff --git a/sdk/code-analysis/ServiceAnalysis/Lightsail/Generated/PropertyValueRules.xml b/sdk/code-analysis/ServiceAnalysis/Lightsail/Generated/PropertyValueRules.xml index 6605cd414edc..0a195ef883ec 100644 --- a/sdk/code-analysis/ServiceAnalysis/Lightsail/Generated/PropertyValueRules.xml +++ b/sdk/code-analysis/ServiceAnalysis/Lightsail/Generated/PropertyValueRules.xml @@ -126,6 +126,10 @@ Amazon.Lightsail.Model.CreateDiskSnapshotRequest.InstanceName \w[\w\-]*\w + + Amazon.Lightsail.Model.CreateDistributionRequest.CertificateName + \w[\w\-]*\w + Amazon.Lightsail.Model.CreateDistributionRequest.DistributionName \w[\w\-]*\w @@ -712,6 +716,10 @@ 63 ^[a-z0-9]{1,2}|[a-z0-9][a-z0-9-]+[a-z0-9]$ + + Amazon.Lightsail.Model.UpdateDistributionRequest.CertificateName + \w[\w\-]*\w + Amazon.Lightsail.Model.UpdateDistributionRequest.DistributionName \w[\w\-]*\w diff --git a/sdk/src/Services/Lightsail/Generated/Model/CreateDistributionRequest.cs b/sdk/src/Services/Lightsail/Generated/Model/CreateDistributionRequest.cs index 8a753c7dac92..4ef8d5405756 100644 --- a/sdk/src/Services/Lightsail/Generated/Model/CreateDistributionRequest.cs +++ b/sdk/src/Services/Lightsail/Generated/Model/CreateDistributionRequest.cs @@ -45,11 +45,13 @@ public partial class CreateDistributionRequest : AmazonLightsailRequest private string _bundleId; private List _cacheBehaviors = AWSConfigs.InitializeCollections ? new List() : null; private CacheSettings _cacheBehaviorSettings; + private string _certificateName; private CacheBehavior _defaultCacheBehavior; private string _distributionName; private IpAddressType _ipAddressType; private InputOrigin _origin; private List _tags = AWSConfigs.InitializeCollections ? new List() : null; + private ViewerMinimumTlsProtocolVersionEnum _viewerMinimumTlsProtocolVersion; /// /// Gets and sets the property BundleId. @@ -116,6 +118,29 @@ internal bool IsSetCacheBehaviorSettings() return this._cacheBehaviorSettings != null; } + /// + /// Gets and sets the property CertificateName. + /// + /// The name of the SSL/TLS certificate that you want to attach to the distribution. + /// + /// + /// + /// Use the GetCertificates + /// action to get a list of certificate names that you can specify. + /// + /// + public string CertificateName + { + get { return this._certificateName; } + set { this._certificateName = value; } + } + + // Check to see if CertificateName property is set + internal bool IsSetCertificateName() + { + return this._certificateName != null; + } + /// /// Gets and sets the property DefaultCacheBehavior. /// @@ -227,5 +252,23 @@ internal bool IsSetTags() return this._tags != null && (this._tags.Count > 0 || !AWSConfigs.InitializeCollections); } + /// + /// Gets and sets the property ViewerMinimumTlsProtocolVersion. + /// + /// The minimum TLS protocol version for the SSL/TLS certificate. + /// + /// + public ViewerMinimumTlsProtocolVersionEnum ViewerMinimumTlsProtocolVersion + { + get { return this._viewerMinimumTlsProtocolVersion; } + set { this._viewerMinimumTlsProtocolVersion = value; } + } + + // Check to see if ViewerMinimumTlsProtocolVersion property is set + internal bool IsSetViewerMinimumTlsProtocolVersion() + { + return this._viewerMinimumTlsProtocolVersion != null; + } + } } \ No newline at end of file diff --git a/sdk/src/Services/Lightsail/Generated/Model/InputOrigin.cs b/sdk/src/Services/Lightsail/Generated/Model/InputOrigin.cs index 4c5a297717b1..cbbe411775a9 100644 --- a/sdk/src/Services/Lightsail/Generated/Model/InputOrigin.cs +++ b/sdk/src/Services/Lightsail/Generated/Model/InputOrigin.cs @@ -44,6 +44,7 @@ public partial class InputOrigin private string _name; private OriginProtocolPolicyEnum _protocolPolicy; private RegionName _regionName; + private int? _responseTimeout; /// /// Gets and sets the property Name. @@ -100,5 +101,25 @@ internal bool IsSetRegionName() return this._regionName != null; } + /// + /// Gets and sets the property ResponseTimeout. + /// + /// The amount of time, in seconds, that the distribution waits for a response after forwarding + /// a request to the origin. The minimum timeout is 1 second, the maximum is 60 seconds, + /// and the default (if you don't specify otherwise) is 30 seconds. + /// + /// + public int ResponseTimeout + { + get { return this._responseTimeout.GetValueOrDefault(); } + set { this._responseTimeout = value; } + } + + // Check to see if ResponseTimeout property is set + internal bool IsSetResponseTimeout() + { + return this._responseTimeout.HasValue; + } + } } \ No newline at end of file diff --git a/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/CreateDistributionRequestMarshaller.cs b/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/CreateDistributionRequestMarshaller.cs index 4b9b43322c04..e675bc003f16 100644 --- a/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/CreateDistributionRequestMarshaller.cs +++ b/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/CreateDistributionRequestMarshaller.cs @@ -100,6 +100,12 @@ public IRequest Marshall(CreateDistributionRequest publicRequest) context.Writer.WriteObjectEnd(); } + if(publicRequest.IsSetCertificateName()) + { + context.Writer.WritePropertyName("certificateName"); + context.Writer.Write(publicRequest.CertificateName); + } + if(publicRequest.IsSetDefaultCacheBehavior()) { context.Writer.WritePropertyName("defaultCacheBehavior"); @@ -150,6 +156,12 @@ public IRequest Marshall(CreateDistributionRequest publicRequest) context.Writer.WriteArrayEnd(); } + if(publicRequest.IsSetViewerMinimumTlsProtocolVersion()) + { + context.Writer.WritePropertyName("viewerMinimumTlsProtocolVersion"); + context.Writer.Write(publicRequest.ViewerMinimumTlsProtocolVersion); + } + writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); diff --git a/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/InputOriginMarshaller.cs b/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/InputOriginMarshaller.cs index 95510c764048..b476a4e1826a 100644 --- a/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/InputOriginMarshaller.cs +++ b/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/InputOriginMarshaller.cs @@ -63,6 +63,12 @@ public void Marshall(InputOrigin requestObject, JsonMarshallerContext context) context.Writer.Write(requestObject.RegionName); } + if(requestObject.IsSetResponseTimeout()) + { + context.Writer.WritePropertyName("responseTimeout"); + context.Writer.Write(requestObject.ResponseTimeout); + } + } /// diff --git a/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/LightsailDistributionUnmarshaller.cs b/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/LightsailDistributionUnmarshaller.cs index 2fa127c0100e..3d5c0992c370 100644 --- a/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/LightsailDistributionUnmarshaller.cs +++ b/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/LightsailDistributionUnmarshaller.cs @@ -183,6 +183,12 @@ public LightsailDistribution Unmarshall(JsonUnmarshallerContext context) unmarshalledObject.Tags = unmarshaller.Unmarshall(context); continue; } + if (context.TestExpression("viewerMinimumTlsProtocolVersion", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.ViewerMinimumTlsProtocolVersion = unmarshaller.Unmarshall(context); + continue; + } } return unmarshalledObject; } diff --git a/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/OriginUnmarshaller.cs b/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/OriginUnmarshaller.cs index 438f775369a9..f47a2f27170d 100644 --- a/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/OriginUnmarshaller.cs +++ b/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/OriginUnmarshaller.cs @@ -87,6 +87,12 @@ public Origin Unmarshall(JsonUnmarshallerContext context) unmarshalledObject.ResourceType = unmarshaller.Unmarshall(context); continue; } + if (context.TestExpression("responseTimeout", targetDepth)) + { + var unmarshaller = IntUnmarshaller.Instance; + unmarshalledObject.ResponseTimeout = unmarshaller.Unmarshall(context); + continue; + } } return unmarshalledObject; } diff --git a/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/UpdateDistributionRequestMarshaller.cs b/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/UpdateDistributionRequestMarshaller.cs index 2ea72f2b5a95..8dd5c2cdb12d 100644 --- a/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/UpdateDistributionRequestMarshaller.cs +++ b/sdk/src/Services/Lightsail/Generated/Model/Internal/MarshallTransformations/UpdateDistributionRequestMarshaller.cs @@ -94,6 +94,12 @@ public IRequest Marshall(UpdateDistributionRequest publicRequest) context.Writer.WriteObjectEnd(); } + if(publicRequest.IsSetCertificateName()) + { + context.Writer.WritePropertyName("certificateName"); + context.Writer.Write(publicRequest.CertificateName); + } + if(publicRequest.IsSetDefaultCacheBehavior()) { context.Writer.WritePropertyName("defaultCacheBehavior"); @@ -128,6 +134,18 @@ public IRequest Marshall(UpdateDistributionRequest publicRequest) context.Writer.WriteObjectEnd(); } + if(publicRequest.IsSetUseDefaultCertificate()) + { + context.Writer.WritePropertyName("useDefaultCertificate"); + context.Writer.Write(publicRequest.UseDefaultCertificate); + } + + if(publicRequest.IsSetViewerMinimumTlsProtocolVersion()) + { + context.Writer.WritePropertyName("viewerMinimumTlsProtocolVersion"); + context.Writer.Write(publicRequest.ViewerMinimumTlsProtocolVersion); + } + writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); diff --git a/sdk/src/Services/Lightsail/Generated/Model/LightsailDistribution.cs b/sdk/src/Services/Lightsail/Generated/Model/LightsailDistribution.cs index 6523d4eda42c..d7287e03aa3a 100644 --- a/sdk/src/Services/Lightsail/Generated/Model/LightsailDistribution.cs +++ b/sdk/src/Services/Lightsail/Generated/Model/LightsailDistribution.cs @@ -53,6 +53,7 @@ public partial class LightsailDistribution private string _status; private string _supportCode; private List _tags = AWSConfigs.InitializeCollections ? new List() : null; + private string _viewerMinimumTlsProtocolVersion; /// /// Gets and sets the property AbleToUpdateBundle. @@ -441,5 +442,24 @@ internal bool IsSetTags() return this._tags != null && (this._tags.Count > 0 || !AWSConfigs.InitializeCollections); } + /// + /// Gets and sets the property ViewerMinimumTlsProtocolVersion. + /// + /// The minimum TLS protocol version that the distribution can use to communicate with + /// viewers. + /// + /// + public string ViewerMinimumTlsProtocolVersion + { + get { return this._viewerMinimumTlsProtocolVersion; } + set { this._viewerMinimumTlsProtocolVersion = value; } + } + + // Check to see if ViewerMinimumTlsProtocolVersion property is set + internal bool IsSetViewerMinimumTlsProtocolVersion() + { + return this._viewerMinimumTlsProtocolVersion != null; + } + } } \ No newline at end of file diff --git a/sdk/src/Services/Lightsail/Generated/Model/Origin.cs b/sdk/src/Services/Lightsail/Generated/Model/Origin.cs index 4f7afd7580f2..65a69bc51830 100644 --- a/sdk/src/Services/Lightsail/Generated/Model/Origin.cs +++ b/sdk/src/Services/Lightsail/Generated/Model/Origin.cs @@ -45,6 +45,7 @@ public partial class Origin private OriginProtocolPolicyEnum _protocolPolicy; private RegionName _regionName; private ResourceType _resourceType; + private int? _responseTimeout; /// /// Gets and sets the property Name. @@ -119,5 +120,25 @@ internal bool IsSetResourceType() return this._resourceType != null; } + /// + /// Gets and sets the property ResponseTimeout. + /// + /// The amount of time, in seconds, that the distribution waits for a response after forwarding + /// a request to the origin. The minimum timeout is 1 second, the maximum is 60 seconds, + /// and the default (if you don't specify otherwise) is 30 seconds. + /// + /// + public int ResponseTimeout + { + get { return this._responseTimeout.GetValueOrDefault(); } + set { this._responseTimeout = value; } + } + + // Check to see if ResponseTimeout property is set + internal bool IsSetResponseTimeout() + { + return this._responseTimeout.HasValue; + } + } } \ No newline at end of file diff --git a/sdk/src/Services/Lightsail/Generated/Model/UpdateDistributionRequest.cs b/sdk/src/Services/Lightsail/Generated/Model/UpdateDistributionRequest.cs index 56815ea18698..87a88191aa41 100644 --- a/sdk/src/Services/Lightsail/Generated/Model/UpdateDistributionRequest.cs +++ b/sdk/src/Services/Lightsail/Generated/Model/UpdateDistributionRequest.cs @@ -41,10 +41,13 @@ public partial class UpdateDistributionRequest : AmazonLightsailRequest { private List _cacheBehaviors = AWSConfigs.InitializeCollections ? new List() : null; private CacheSettings _cacheBehaviorSettings; + private string _certificateName; private CacheBehavior _defaultCacheBehavior; private string _distributionName; private bool? _isEnabled; private InputOrigin _origin; + private bool? _useDefaultCertificate; + private ViewerMinimumTlsProtocolVersionEnum _viewerMinimumTlsProtocolVersion; /// /// Gets and sets the property CacheBehaviors. @@ -88,6 +91,33 @@ internal bool IsSetCacheBehaviorSettings() return this._cacheBehaviorSettings != null; } + /// + /// Gets and sets the property CertificateName. + /// + /// The name of the SSL/TLS certificate that you want to attach to the distribution. + /// + /// + /// + /// Only certificates with a status of ISSUED can be attached to a distribution. + /// + /// + /// + /// Use the GetCertificates + /// action to get a list of certificate names that you can specify. + /// + /// + public string CertificateName + { + get { return this._certificateName; } + set { this._certificateName = value; } + } + + // Check to see if CertificateName property is set + internal bool IsSetCertificateName() + { + return this._certificateName != null; + } + /// /// Gets and sets the property DefaultCacheBehavior. /// @@ -171,5 +201,48 @@ internal bool IsSetOrigin() return this._origin != null; } + /// + /// Gets and sets the property UseDefaultCertificate. + /// + /// Indicates whether the default SSL/TLS certificate is attached to the distribution. + /// The default value is true. When true, the distribution uses the default + /// domain name such as d111111abcdef8.cloudfront.net. + /// + /// + /// + /// Set this value to false to attach a new certificate to the distribution. + /// + /// + public bool UseDefaultCertificate + { + get { return this._useDefaultCertificate.GetValueOrDefault(); } + set { this._useDefaultCertificate = value; } + } + + // Check to see if UseDefaultCertificate property is set + internal bool IsSetUseDefaultCertificate() + { + return this._useDefaultCertificate.HasValue; + } + + /// + /// Gets and sets the property ViewerMinimumTlsProtocolVersion. + /// + /// Use this parameter to update the minimum TLS protocol version for the SSL/TLS certificate + /// that's attached to the distribution. + /// + /// + public ViewerMinimumTlsProtocolVersionEnum ViewerMinimumTlsProtocolVersion + { + get { return this._viewerMinimumTlsProtocolVersion; } + set { this._viewerMinimumTlsProtocolVersion = value; } + } + + // Check to see if ViewerMinimumTlsProtocolVersion property is set + internal bool IsSetViewerMinimumTlsProtocolVersion() + { + return this._viewerMinimumTlsProtocolVersion != null; + } + } } \ No newline at end of file diff --git a/sdk/src/Services/Lightsail/Generated/ServiceEnumerations.cs b/sdk/src/Services/Lightsail/Generated/ServiceEnumerations.cs index 984a459101ae..3a621297b0e1 100644 --- a/sdk/src/Services/Lightsail/Generated/ServiceEnumerations.cs +++ b/sdk/src/Services/Lightsail/Generated/ServiceEnumerations.cs @@ -5263,4 +5263,62 @@ public static implicit operator TreatMissingData(string value) } } + + /// + /// Constants used for properties of type ViewerMinimumTlsProtocolVersionEnum. + /// + public class ViewerMinimumTlsProtocolVersionEnum : ConstantClass + { + + /// + /// Constant TLSv11_2016 for ViewerMinimumTlsProtocolVersionEnum + /// + public static readonly ViewerMinimumTlsProtocolVersionEnum TLSv11_2016 = new ViewerMinimumTlsProtocolVersionEnum("TLSv1.1_2016"); + /// + /// Constant TLSv12_2018 for ViewerMinimumTlsProtocolVersionEnum + /// + public static readonly ViewerMinimumTlsProtocolVersionEnum TLSv12_2018 = new ViewerMinimumTlsProtocolVersionEnum("TLSv1.2_2018"); + /// + /// Constant TLSv12_2019 for ViewerMinimumTlsProtocolVersionEnum + /// + public static readonly ViewerMinimumTlsProtocolVersionEnum TLSv12_2019 = new ViewerMinimumTlsProtocolVersionEnum("TLSv1.2_2019"); + /// + /// Constant TLSv12_2021 for ViewerMinimumTlsProtocolVersionEnum + /// + public static readonly ViewerMinimumTlsProtocolVersionEnum TLSv12_2021 = new ViewerMinimumTlsProtocolVersionEnum("TLSv1.2_2021"); + + /// + /// This constant constructor does not need to be called if the constant + /// you are attempting to use is already defined as a static instance of + /// this class. + /// This constructor should be used to construct constants that are not + /// defined as statics, for instance if attempting to use a feature that is + /// newer than the current version of the SDK. + /// + public ViewerMinimumTlsProtocolVersionEnum(string value) + : base(value) + { + } + + /// + /// Finds the constant for the unique value. + /// + /// The unique value for the constant + /// The constant for the unique value + public static ViewerMinimumTlsProtocolVersionEnum FindValue(string value) + { + return FindValue(value); + } + + /// + /// Utility method to convert strings to the constant class. + /// + /// The string value to convert to the constant class. + /// + public static implicit operator ViewerMinimumTlsProtocolVersionEnum(string value) + { + return FindValue(value); + } + } + } \ No newline at end of file