Class DistributionDefaultCacheBehavior


  • public final class DistributionDefaultCacheBehavior
    extends java.lang.Object
    • Method Detail

      • allowedMethods

        public java.util.List<java.lang.String> allowedMethods()
        Returns:
        Controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom origin.
      • cachePolicyId

        public java.util.Optional<java.lang.String> cachePolicyId()
        Returns:
        Unique identifier of the cache policy that is attached to the cache behavior. If configuring the `defaultCacheBehavior` either `cachePolicyId` or `forwardedValues` must be set.
      • cachedMethods

        public java.util.List<java.lang.String> cachedMethods()
        Returns:
        Controls whether CloudFront caches the response to requests using the specified HTTP methods.
      • compress

        public java.util.Optional<java.lang.Boolean> compress()
        Returns:
        Whether you want CloudFront to automatically compress content for web requests that include `Accept-Encoding: gzip` in the request header (default: `false`).
      • defaultTtl

        public java.util.Optional<java.lang.Integer> defaultTtl()
        Returns:
        Default amount of time (in seconds) that an object is in a CloudFront cache before CloudFront forwards another request in the absence of an `Cache-Control max-age` or `Expires` header. The TTL defined in Cache Policy overrides this configuration.
      • fieldLevelEncryptionId

        public java.util.Optional<java.lang.String> fieldLevelEncryptionId()
        Returns:
        Field level encryption configuration ID.
      • forwardedValues

        public java.util.Optional<DistributionDefaultCacheBehaviorForwardedValues> forwardedValues()
        Returns:
        The forwarded values configuration that specifies how CloudFront handles query strings, cookies and headers (maximum one).
      • maxTtl

        public java.util.Optional<java.lang.Integer> maxTtl()
        Returns:
        Maximum amount of time (in seconds) that an object is in a CloudFront cache before CloudFront forwards another request to your origin to determine whether the object has been updated. Only effective in the presence of `Cache-Control max-age`, `Cache-Control s-maxage`, and `Expires` headers. The TTL defined in Cache Policy overrides this configuration.
      • minTtl

        public java.util.Optional<java.lang.Integer> minTtl()
        Returns:
        Minimum amount of time that you want objects to stay in CloudFront caches before CloudFront queries your origin to see whether the object has been updated. Defaults to 0 seconds. The TTL defined in Cache Policy overrides this configuration.
      • originRequestPolicyId

        public java.util.Optional<java.lang.String> originRequestPolicyId()
        Returns:
        Unique identifier of the origin request policy that is attached to the behavior.
      • realtimeLogConfigArn

        public java.util.Optional<java.lang.String> realtimeLogConfigArn()
        Returns:
        ARN of the real-time log configuration that is attached to this cache behavior.
      • responseHeadersPolicyId

        public java.util.Optional<java.lang.String> responseHeadersPolicyId()
        Returns:
        Identifier for a response headers policy.
      • smoothStreaming

        public java.util.Optional<java.lang.Boolean> smoothStreaming()
        Returns:
        Indicates whether you want to distribute media files in Microsoft Smooth Streaming format using the origin that is associated with this cache behavior.
      • targetOriginId

        public java.lang.String targetOriginId()
        Returns:
        Value of ID for the origin that you want CloudFront to route requests to when a request matches the path pattern either for a cache behavior or for the default cache behavior.
      • trustedKeyGroups

        public java.util.List<java.lang.String> trustedKeyGroups()
        Returns:
        List of nested attributes for active trusted key groups, if the distribution is set up to serve private content with signed URLs.
      • trustedSigners

        public java.util.List<java.lang.String> trustedSigners()
        Returns:
        List of nested attributes for active trusted signers, if the distribution is set up to serve private content with signed URLs.
      • viewerProtocolPolicy

        public java.lang.String viewerProtocolPolicy()
        Returns:
        Use this element to specify the protocol that users can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern. One of `allow-all`, `https-only`, or `redirect-to-https`.