JavaScript is disabled on your browser.
Skip navigation links

AWS SDK for Java 1.x API Reference - 1.12.795

We announced the upcoming end-of-support for AWS SDK for Java (v1). We recommend that you migrate to AWS SDK for Java v2. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
com.amazonaws.services.cloudfront.model

Class CachePolicy

  • All Implemented Interfaces:
    Serializable, Cloneable


    @Generated(value="com.amazonaws:aws-java-sdk-code-generator")
    public class CachePolicy
    extends Object
    implements Serializable, Cloneable 

    A cache policy.

    When it's attached to a cache behavior, the cache policy determines the following:

    • The values that CloudFront includes in the cache key. These values can include HTTP headers, cookies, and URL query strings. CloudFront uses the cache key to find an object in its cache that it can return to the viewer.

    • The default, minimum, and maximum time to live (TTL) values that you want objects to stay in the CloudFront cache.

    The headers, cookies, and query strings that are included in the cache key are also included in requests that CloudFront sends to the origin. CloudFront sends a request when it can't find a valid object in its cache that matches the request's cache key. If you want to send values to the origin but not include them in the cache key, use OriginRequestPolicy.

    See Also:
    AWS API Documentation, Serialized Form
    • Constructor Detail

      • CachePolicy

        public CachePolicy()
    • Method Detail

      • setId

        public void setId(String id)

        The unique identifier for the cache policy.

        Parameters:
        id - The unique identifier for the cache policy.
      • getId

        public String getId()

        The unique identifier for the cache policy.

        Returns:
        The unique identifier for the cache policy.
      • withId

        public CachePolicy withId(String id)

        The unique identifier for the cache policy.

        Parameters:
        id - The unique identifier for the cache policy.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setLastModifiedTime

        public void setLastModifiedTime(Date lastModifiedTime)

        The date and time when the cache policy was last modified.

        Parameters:
        lastModifiedTime - The date and time when the cache policy was last modified.
      • getLastModifiedTime

        public Date getLastModifiedTime()

        The date and time when the cache policy was last modified.

        Returns:
        The date and time when the cache policy was last modified.
      • withLastModifiedTime

        public CachePolicy withLastModifiedTime(Date lastModifiedTime)

        The date and time when the cache policy was last modified.

        Parameters:
        lastModifiedTime - The date and time when the cache policy was last modified.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setCachePolicyConfig

        public void setCachePolicyConfig(CachePolicyConfig cachePolicyConfig)

        The cache policy configuration.

        Parameters:
        cachePolicyConfig - The cache policy configuration.
      • getCachePolicyConfig

        public CachePolicyConfig getCachePolicyConfig()

        The cache policy configuration.

        Returns:
        The cache policy configuration.
      • withCachePolicyConfig

        public CachePolicy withCachePolicyConfig(CachePolicyConfig cachePolicyConfig)

        The cache policy configuration.

        Parameters:
        cachePolicyConfig - The cache policy configuration.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • toString

        public String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
        Returns:
        A string representation of this object.
        See Also:
        Object.toString()
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /