/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the cloudfront-2020-05-31.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.CloudFront.Model { /// /// A complex type that determines the distribution's SSL/TLS configuration for communicating /// with viewers. /// /// /// /// If the distribution doesn't use Aliases (also known as alternate domain /// names or CNAMEs)—that is, if the distribution uses the CloudFront domain name such /// as d111111abcdef8.cloudfront.net—set CloudFrontDefaultCertificate /// to true and leave all other fields empty. /// /// /// /// If the distribution uses Aliases (alternate domain names or CNAMEs), /// use the fields in this type to specify the following settings: /// /// /// /// All distributions support HTTPS connections from viewers. To require viewers to use /// HTTPS only, or to redirect them from HTTP to HTTPS, use ViewerProtocolPolicy /// in the CacheBehavior or DefaultCacheBehavior. To specify /// how CloudFront should use SSL/TLS to communicate with your custom origin, use CustomOriginConfig. /// /// /// /// For more information, see Using /// HTTPS with CloudFront and /// Using Alternate Domain Names and HTTPS in the Amazon CloudFront Developer Guide. /// /// public partial class ViewerCertificate { private string _acmCertificateArn; private string _certificate; private CertificateSource _certificateSource; private bool? _cloudFrontDefaultCertificate; private string _iamCertificateId; private MinimumProtocolVersion _minimumProtocolVersion; private SSLSupportMethod _sslSupportMethod; /// /// Gets and sets the property ACMCertificateArn. /// /// If the distribution uses Aliases (alternate domain names or CNAMEs) and /// the SSL/TLS certificate is stored in Certificate /// Manager (ACM), provide the Amazon Resource Name (ARN) of the ACM certificate. /// CloudFront only supports ACM certificates in the US East (N. Virginia) Region (us-east-1). /// /// /// /// If you specify an ACM certificate ARN, you must also specify values for MinimumProtocolVersion /// and SSLSupportMethod. /// /// public string ACMCertificateArn { get { return this._acmCertificateArn; } set { this._acmCertificateArn = value; } } // Check to see if ACMCertificateArn property is set internal bool IsSetACMCertificateArn() { return this._acmCertificateArn != null; } /// /// Gets and sets the property Certificate. /// /// This field is deprecated. Use one of the following fields instead: /// /// /// [Obsolete("This field has been deprecated. Use one of the following fields instead: ACMCertificateArn, IAMCertificateId or CloudFrontDefaultCertificate.")] public string Certificate { get { return this._certificate; } set { this._certificate = value; } } // Check to see if Certificate property is set internal bool IsSetCertificate() { return this._certificate != null; } /// /// Gets and sets the property CertificateSource. /// /// This field is deprecated. Use one of the following fields instead: /// /// /// [Obsolete("This field has been deprecated. Use one of the following fields instead: ACMCertificateArn, IAMCertificateId or CloudFrontDefaultCertificate.")] public CertificateSource CertificateSource { get { return this._certificateSource; } set { this._certificateSource = value; } } // Check to see if CertificateSource property is set internal bool IsSetCertificateSource() { return this._certificateSource != null; } /// /// Gets and sets the property CloudFrontDefaultCertificate. /// /// If the distribution uses the CloudFront domain name such as d111111abcdef8.cloudfront.net, /// set this field to true. /// /// /// /// If the distribution uses Aliases (alternate domain names or CNAMEs), /// set this field to false and specify values for the following fields: /// /// /// public bool CloudFrontDefaultCertificate { get { return this._cloudFrontDefaultCertificate.GetValueOrDefault(); } set { this._cloudFrontDefaultCertificate = value; } } // Check to see if CloudFrontDefaultCertificate property is set internal bool IsSetCloudFrontDefaultCertificate() { return this._cloudFrontDefaultCertificate.HasValue; } /// /// Gets and sets the property IAMCertificateId. /// /// If the distribution uses Aliases (alternate domain names or CNAMEs) and /// the SSL/TLS certificate is stored in Identity /// and Access Management (IAM), provide the ID of the IAM certificate. /// /// /// /// If you specify an IAM certificate ID, you must also specify values for MinimumProtocolVersion /// and SSLSupportMethod. /// /// public string IAMCertificateId { get { return this._iamCertificateId; } set { this._iamCertificateId = value; } } // Check to see if IAMCertificateId property is set internal bool IsSetIAMCertificateId() { return this._iamCertificateId != null; } /// /// Gets and sets the property MinimumProtocolVersion. /// /// If the distribution uses Aliases (alternate domain names or CNAMEs), /// specify the security policy that you want CloudFront to use for HTTPS connections /// with viewers. The security policy determines two settings: /// /// /// /// For more information, see Security /// Policy and Supported /// Protocols and Ciphers Between Viewers and CloudFront in the Amazon CloudFront /// Developer Guide. /// /// /// /// On the CloudFront console, this setting is called Security Policy. /// /// /// /// When you're using SNI only (you set SSLSupportMethod to sni-only), /// you must specify TLSv1 or higher. /// /// /// /// If the distribution uses the CloudFront domain name such as d111111abcdef8.cloudfront.net /// (you set CloudFrontDefaultCertificate to true), CloudFront /// automatically sets the security policy to TLSv1 regardless of the value /// that you set here. /// /// public MinimumProtocolVersion MinimumProtocolVersion { get { return this._minimumProtocolVersion; } set { this._minimumProtocolVersion = value; } } // Check to see if MinimumProtocolVersion property is set internal bool IsSetMinimumProtocolVersion() { return this._minimumProtocolVersion != null; } /// /// Gets and sets the property SSLSupportMethod. /// /// If the distribution uses Aliases (alternate domain names or CNAMEs), /// specify which viewers the distribution accepts HTTPS connections from. /// /// /// /// If the distribution uses the CloudFront domain name such as d111111abcdef8.cloudfront.net, /// don't set a value for this field. /// /// public SSLSupportMethod SSLSupportMethod { get { return this._sslSupportMethod; } set { this._sslSupportMethod = value; } } // Check to see if SSLSupportMethod property is set internal bool IsSetSSLSupportMethod() { return this._sslSupportMethod != null; } } }