Interface HttpOriginProps

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

@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)", date="2025-09-25T11:29:03.244Z") @Stability(Stable) public interface HttpOriginProps extends software.amazon.jsii.JsiiSerializable, OriginProps
Properties for an Origin backed by an S3 website-configured bucket, load balancer, or custom HTTP server.

Example:

 Distribution.Builder.create(this, "Distribution")
         .defaultBehavior(BehaviorOptions.builder()
                 .origin(HttpOrigin.Builder.create("api.example.com")
                         .readTimeout(Duration.seconds(60))
                         .responseCompletionTimeout(Duration.seconds(120))
                         .keepaliveTimeout(Duration.seconds(45))
                         .build())
                 .build())
         .build();
 
  • Method Details

    • getHttpPort

      @Stability(Stable) @Nullable default Number getHttpPort()
      The HTTP port that CloudFront uses to connect to the origin.

      Default: 80

    • getHttpsPort

      @Stability(Stable) @Nullable default Number getHttpsPort()
      The HTTPS port that CloudFront uses to connect to the origin.

      Default: 443

    • getKeepaliveTimeout

      @Stability(Stable) @Nullable default Duration getKeepaliveTimeout()
      Specifies how long, in seconds, CloudFront persists its connection to the origin.

      The valid range is from 1 to 180 seconds, inclusive.

      Note that values over 60 seconds are possible only after a limit increase request for the origin response timeout quota has been approved in the target account; otherwise, values over 60 seconds will produce an error at deploy time.

      Default: Duration.seconds(5)

    • getOriginSslProtocols

      @Stability(Stable) @Nullable default List<OriginSslPolicy> getOriginSslProtocols()
      The SSL versions to use when interacting with the origin.

      Default: OriginSslPolicy.TLS_V1_2

    • getProtocolPolicy

      @Stability(Stable) @Nullable default OriginProtocolPolicy getProtocolPolicy()
      Specifies the protocol (HTTP or HTTPS) that CloudFront uses to connect to the origin.

      Default: OriginProtocolPolicy.HTTPS_ONLY

    • getReadTimeout

      @Stability(Stable) @Nullable default Duration getReadTimeout()
      Specifies how long, in seconds, CloudFront waits for a response from the origin, also known as the origin response timeout.

      The valid range is from 1 to 180 seconds, inclusive.

      Note that values over 60 seconds are possible only after a limit increase request for the origin response timeout quota has been approved in the target account; otherwise, values over 60 seconds will produce an error at deploy time.

      Default: Duration.seconds(30)

    • builder

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