java.lang.Object
java.lang.Enum<SSLMethod>
software.amazon.awscdk.services.cloudfront.SSLMethod
All Implemented Interfaces:
Serializable, Comparable<SSLMethod>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-22T22:42:48.563Z") @Stability(Stable) public enum SSLMethod extends Enum<SSLMethod>
The SSL method CloudFront will use for your distribution.

Server Name Indication (SNI) - is an extension to the TLS computer networking protocol by which a client indicates which hostname it is attempting to connect to at the start of the handshaking process. This allows a server to present multiple certificates on the same IP address and TCP port number and hence allows multiple secure (HTTPS) websites (or any other service over TLS) to be served by the same IP address without requiring all those sites to use the same certificate.

CloudFront can use SNI to host multiple distributions on the same IP - which a large majority of clients will support.

If your clients cannot support SNI however - CloudFront can use dedicated IPs for your distribution - but there is a prorated monthly charge for using this feature. By default, we use SNI - but you can optionally enable dedicated IPs (VIP).

See the CloudFront SSL for more details about pricing : https://aws.amazon.com/cloudfront/custom-ssl-domains/

Example:

 Bucket s3BucketSource = new Bucket(this, "Bucket");
 CloudFrontWebDistribution distribution = CloudFrontWebDistribution.Builder.create(this, "AnAmazingWebsiteProbably")
         .originConfigs(List.of(SourceConfiguration.builder()
                 .s3OriginSource(S3OriginConfig.builder().s3BucketSource(s3BucketSource).build())
                 .behaviors(List.of(Behavior.builder().isDefaultBehavior(true).build()))
                 .build()))
         .viewerCertificate(ViewerCertificate.fromIamCertificate("certificateId", ViewerCertificateOptions.builder()
                 .aliases(List.of("example.com"))
                 .securityPolicy(SecurityPolicyProtocol.SSL_V3) // default
                 .sslMethod(SSLMethod.SNI)
                 .build()))
         .build();
 
  • Enum Constant Details

    • SNI

      @Stability(Stable) public static final SSLMethod SNI
    • VIP

      @Stability(Stable) public static final SSLMethod VIP
  • Method Details

    • values

      public static SSLMethod[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static SSLMethod valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null