Interface AddBehaviorOptions

All Superinterfaces:
All Known Subinterfaces:
All Known Implementing Classes:
AddBehaviorOptions.Jsii$Proxy, BehaviorOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:33:58.553Z") @Stability(Stable) public interface AddBehaviorOptions extends
Options for adding a new behavior to a Distribution.


 // Add a behavior to a Distribution after initial creation.
 Bucket myBucket;
 Distribution myWebDistribution;
 myWebDistribution.addBehavior("/images/*.jpg", new S3Origin(myBucket), AddBehaviorOptions.builder()
  • Method Details

    • getAllowedMethods

      @Stability(Stable) @Nullable default AllowedMethods getAllowedMethods()
      HTTP methods to allow for this behavior.

      Default: AllowedMethods.ALLOW_GET_HEAD

    • getCachedMethods

      @Stability(Stable) @Nullable default CachedMethods getCachedMethods()
      HTTP methods to cache for this behavior.

      Default: CachedMethods.CACHE_GET_HEAD

    • getCachePolicy

      @Stability(Stable) @Nullable default ICachePolicy getCachePolicy()
      The cache policy for this behavior.

      The cache policy determines what values are included in the cache key, and the time-to-live (TTL) values for the cache.

      Default: CachePolicy.CACHING_OPTIMIZED

      See Also:
    • getCompress

      @Stability(Stable) @Nullable default Boolean getCompress()
      Whether you want CloudFront to automatically compress certain files for this cache behavior.

      See for file types CloudFront will compress.

      Default: true

    • getEdgeLambdas

      @Stability(Stable) @Nullable default List<EdgeLambda> getEdgeLambdas()
      The Lambda@Edge functions to invoke before serving the contents.

      Default: - no Lambda functions will be invoked

      See Also:
    • getFunctionAssociations

      @Stability(Stable) @Nullable default List<FunctionAssociation> getFunctionAssociations()
      The CloudFront functions to invoke before serving the contents.

      Default: - no functions will be invoked

    • getOriginRequestPolicy

      @Stability(Stable) @Nullable default IOriginRequestPolicy getOriginRequestPolicy()
      The origin request policy for this behavior.

      The origin request policy determines which values (e.g., headers, cookies) are included in requests that CloudFront sends to the origin.

      Default: - none

    • getRealtimeLogConfig

      @Stability(Stable) @Nullable default IRealtimeLogConfig getRealtimeLogConfig()
      The real-time log configuration to be attached to this cache behavior.

      Default: - none

    • getResponseHeadersPolicy

      @Stability(Stable) @Nullable default IResponseHeadersPolicy getResponseHeadersPolicy()
      The response headers policy for this behavior.

      The response headers policy determines which headers are included in responses

      Default: - none

    • getSmoothStreaming

      @Stability(Stable) @Nullable default Boolean getSmoothStreaming()
      Set this to true to indicate you want to distribute media files in the Microsoft Smooth Streaming format using this behavior.

      Default: false

    • getTrustedKeyGroups

      @Stability(Stable) @Nullable default List<IKeyGroup> getTrustedKeyGroups()
      A list of Key Groups that CloudFront can use to validate signed URLs or signed cookies.

      Default: - no KeyGroups are associated with cache behavior

      See Also:
    • getViewerProtocolPolicy

      @Stability(Stable) @Nullable default ViewerProtocolPolicy getViewerProtocolPolicy()
      The protocol that viewers can use to access the files controlled by this behavior.

      Default: ViewerProtocolPolicy.ALLOW_ALL

    • builder

      @Stability(Stable) static AddBehaviorOptions.Builder builder()
      a AddBehaviorOptions.Builder of AddBehaviorOptions