Interface Behavior

All Superinterfaces:
All Known Implementing Classes:

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:43.418Z") @Stability(Stable) public interface Behavior extends
A CloudFront behavior wrapper.


 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 Function function_;
 KeyGroup keyGroup;
 Version version;
 Behavior behavior = Behavior.builder()
                 // the properties below are optional
                         // the properties below are optional
                 // the properties below are optional
  • Method Details

    • getAllowedMethods

      @Stability(Stable) @Nullable default CloudFrontAllowedMethods getAllowedMethods()
      The method this CloudFront distribution responds do.

      Default: GET_HEAD

    • getCachedMethods

      @Stability(Stable) @Nullable default CloudFrontAllowedCachedMethods getCachedMethods()
      Which methods are cached by CloudFront by default.

      Default: GET_HEAD

    • getCompress

      @Stability(Stable) @Nullable default Boolean getCompress()
      If CloudFront should automatically compress some content types.

      Default: true

    • getDefaultTtl

      @Stability(Stable) @Nullable default Duration getDefaultTtl()
      The default amount of time CloudFront will cache an object.

      This value applies only when your custom origin does not add HTTP headers, such as Cache-Control max-age, Cache-Control s-maxage, and Expires to objects.

      Default: 86400 (1 day)

    • getForwardedValues

      @Stability(Stable) @Nullable default CfnDistribution.ForwardedValuesProperty getForwardedValues()
      The values CloudFront will forward to the origin when making a request.

      Default: none (no cookies - no headers)

    • getFunctionAssociations

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

      Default: - no functions will be invoked

    • getIsDefaultBehavior

      @Stability(Stable) @Nullable default Boolean getIsDefaultBehavior()
      If this behavior is the default behavior for the distribution.

      You must specify exactly one default distribution per CloudFront distribution. The default behavior is allowed to omit the "path" property.

    • getLambdaFunctionAssociations

      @Stability(Stable) @Nullable default List<LambdaFunctionAssociation> getLambdaFunctionAssociations()
      Declares associated lambda@edge functions for this distribution behaviour.

      Default: No lambda function associated

    • getMaxTtl

      @Stability(Stable) @Nullable default Duration getMaxTtl()
      The max amount of time you want objects to stay in the cache before CloudFront queries your origin.

      Default: Duration.seconds(31536000) (one year)

    • getMinTtl

      @Stability(Stable) @Nullable default Duration getMinTtl()
      The minimum amount of time that you want objects to stay in the cache before CloudFront queries your origin.
    • getPathPattern

      @Stability(Stable) @Nullable default String getPathPattern()
      The path this behavior responds to.

      Required for all non-default behaviors. (The default behavior implicitly has "*" as the path pattern. )

    • 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:
    • getTrustedSigners

      @Stability(Deprecated) @Deprecated @Nullable default List<String> getTrustedSigners()
      • We recommend using trustedKeyGroups instead of trustedSigners.
      (deprecated) Trusted signers is how CloudFront allows you to serve private content.

      The signers are the account IDs that are allowed to sign cookies/presigned URLs for this distribution.

      If you pass a non empty value, all requests for this behavior must be signed (no public access will be allowed)

    • getViewerProtocolPolicy

      @Stability(Stable) @Nullable default ViewerProtocolPolicy getViewerProtocolPolicy()
      The viewer policy for this behavior.

      Default: - the distribution wide viewer protocol policy will be used

    • builder

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