Show / Hide Table of Contents

Class ViewerCertificateOptions

Inheritance
object
ViewerCertificateOptions
Implements
IViewerCertificateOptions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ViewerCertificateOptions : IViewerCertificateOptions
Syntax (vb)
Public Class ViewerCertificateOptions Implements IViewerCertificateOptions
Remarks

ExampleMetadata: lit=aws-cloudfront/test/example.iam-cert-alias.lit.ts infused

Examples
var s3BucketSource = new Bucket(this, "Bucket");

            var distribution = new CloudFrontWebDistribution(this, "AnAmazingWebsiteProbably", new CloudFrontWebDistributionProps {
                OriginConfigs = new [] { new SourceConfiguration {
                    S3OriginSource = new S3OriginConfig { S3BucketSource = s3BucketSource },
                    Behaviors = new [] { new Behavior { IsDefaultBehavior = true } }
                } },
                ViewerCertificate = ViewerCertificate.FromIamCertificate("certificateId", new ViewerCertificateOptions {
                    Aliases = new [] { "example.com" },
                    SecurityPolicy = SecurityPolicyProtocol.SSL_V3,  // default
                    SslMethod = SSLMethod.SNI
                })
            });

Synopsis

Constructors

ViewerCertificateOptions()

Properties

Aliases

Domain names on the certificate (both main domain name and Subject Alternative names).

SecurityPolicy

The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections.

SslMethod

How CloudFront should serve HTTPS requests.

Constructors

ViewerCertificateOptions()

public ViewerCertificateOptions()
Remarks

ExampleMetadata: lit=aws-cloudfront/test/example.iam-cert-alias.lit.ts infused

Examples
var s3BucketSource = new Bucket(this, "Bucket");

            var distribution = new CloudFrontWebDistribution(this, "AnAmazingWebsiteProbably", new CloudFrontWebDistributionProps {
                OriginConfigs = new [] { new SourceConfiguration {
                    S3OriginSource = new S3OriginConfig { S3BucketSource = s3BucketSource },
                    Behaviors = new [] { new Behavior { IsDefaultBehavior = true } }
                } },
                ViewerCertificate = ViewerCertificate.FromIamCertificate("certificateId", new ViewerCertificateOptions {
                    Aliases = new [] { "example.com" },
                    SecurityPolicy = SecurityPolicyProtocol.SSL_V3,  // default
                    SslMethod = SSLMethod.SNI
                })
            });

Properties

Aliases

Domain names on the certificate (both main domain name and Subject Alternative names).

public string[]? Aliases { get; set; }
Property Value

string[]

Remarks

ExampleMetadata: lit=aws-cloudfront/test/example.iam-cert-alias.lit.ts infused

SecurityPolicy

The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections.

public SecurityPolicyProtocol? SecurityPolicy { get; set; }
Property Value

SecurityPolicyProtocol?

Remarks

CloudFront serves your objects only to browsers or devices that support at least the SSL version that you specify.

Default: - SSLv3 if sslMethod VIP, TLSv1 if sslMethod SNI

SslMethod

How CloudFront should serve HTTPS requests.

public SSLMethod? SslMethod { get; set; }
Property Value

SSLMethod?

Remarks

See the notes on SSLMethod if you wish to use other SSL termination types.

Default: SSLMethod.SNI

See: https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ViewerCertificate.html

Implements

IViewerCertificateOptions
Back to top Generated by DocFX