Interface OriginOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
HttpOriginProps, LoadBalancerV2OriginProps, OriginProps, RestApiOriginProps, S3OriginProps
All Known Implementing Classes:
HttpOriginProps.Jsii$Proxy, LoadBalancerV2OriginProps.Jsii$Proxy, OriginOptions.Jsii$Proxy, OriginProps.Jsii$Proxy, RestApiOriginProps.Jsii$Proxy, S3OriginProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:43.730Z") @Stability(Stable) public interface OriginOptions extends software.amazon.jsii.JsiiSerializable
Options to define an Origin.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.cloudfront.*;
 import software.amazon.awscdk.core.*;
 OriginOptions originOptions = OriginOptions.builder()
         .connectionAttempts(123)
         .connectionTimeout(Duration.minutes(30))
         .customHeaders(Map.of(
                 "customHeadersKey", "customHeaders"))
         .originShieldRegion("originShieldRegion")
         .build();
 
  • Method Details

    • getConnectionAttempts

      @Stability(Stable) @Nullable default Number getConnectionAttempts()
      The number of times that CloudFront attempts to connect to the origin;

      valid values are 1, 2, or 3 attempts.

      Default: 3

    • getConnectionTimeout

      @Stability(Stable) @Nullable default Duration getConnectionTimeout()
      The number of seconds that CloudFront waits when trying to establish a connection to the origin.

      Valid values are 1-10 seconds, inclusive.

      Default: Duration.seconds(10)

    • getCustomHeaders

      @Stability(Stable) @Nullable default Map<String,String> getCustomHeaders()
      A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.

      Default: {}

    • getOriginShieldRegion

      @Stability(Stable) @Nullable default String getOriginShieldRegion()
      When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.

      Default: - origin shield not enabled

      See Also:
    • builder

      @Stability(Stable) static OriginOptions.Builder builder()
      Returns:
      a OriginOptions.Builder of OriginOptions