Interface CustomOriginConfig

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CustomOriginConfig.Jsii$Proxy

@Generated(value="jsii-pacmak/1.94.0 (build b380f01)", date="2024-02-14T19:10:13.738Z") @Stability(Stable) public interface CustomOriginConfig extends software.amazon.jsii.JsiiSerializable
A custom origin configuration.

Example:

 Bucket sourceBucket;
 OriginAccessIdentity oai;
 CloudFrontWebDistribution.Builder.create(this, "MyCfWebDistribution")
         .originConfigs(List.of(SourceConfiguration.builder()
                 .s3OriginSource(S3OriginConfig.builder()
                         .s3BucketSource(sourceBucket)
                         .originAccessIdentity(oai)
                         .build())
                 .behaviors(List.of(Behavior.builder().isDefaultBehavior(true).build()))
                 .build(), SourceConfiguration.builder()
                 .customOriginSource(CustomOriginConfig.builder()
                         .domainName("MYALIAS")
                         .build())
                 .behaviors(List.of(Behavior.builder().pathPattern("/somewhere").build()))
                 .build()))
         .build();
 
  • Method Details

    • getDomainName

      @Stability(Stable) @NotNull String getDomainName()
      The domain name of the custom origin.

      Should not include the path - that should be in the parent SourceConfiguration

    • getAllowedOriginSSLVersions

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

      Default: OriginSslPolicy.TLS_V1_2

    • getHttpPort

      @Stability(Stable) @Nullable default Number getHttpPort()
      The origin HTTP port.

      Default: 80

    • getHttpsPort

      @Stability(Stable) @Nullable default Number getHttpsPort()
      The origin HTTPS port.

      Default: 443

    • getOriginHeaders

      @Stability(Stable) @Nullable default Map<String,String> getOriginHeaders()
      Any additional headers to pass to the origin.

      Default: - No additional headers are passed.

    • getOriginKeepaliveTimeout

      @Stability(Stable) @Nullable default Duration getOriginKeepaliveTimeout()
      The keep alive timeout when making calls in seconds.

      Default: Duration.seconds(5)

    • getOriginPath

      @Stability(Stable) @Nullable default String getOriginPath()
      The relative path to the origin root to use for sources.

      Default: /

    • getOriginProtocolPolicy

      @Stability(Stable) @Nullable default OriginProtocolPolicy getOriginProtocolPolicy()
      The protocol (http or https) policy to use when interacting with the origin.

      Default: OriginProtocolPolicy.HttpsOnly

    • getOriginReadTimeout

      @Stability(Stable) @Nullable default Duration getOriginReadTimeout()
      The read timeout when calling the origin in seconds.

      Default: Duration.seconds(30)

    • 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

    • builder

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