Show / Hide Table of Contents

Class CfnDistribution.CacheSettingsProperty

CacheSettings is a property of the AWS::Lightsail::Distribution resource. It describes the cache settings of an Amazon Lightsail content delivery network (CDN) distribution.

Inheritance
System.Object
CfnDistribution.CacheSettingsProperty
Implements
CfnDistribution.ICacheSettingsProperty
Namespace: Amazon.CDK.AWS.Lightsail
Assembly: Amazon.CDK.AWS.Lightsail.dll
Syntax (csharp)
public class CacheSettingsProperty : Object, CfnDistribution.ICacheSettingsProperty
Syntax (vb)
Public Class CacheSettingsProperty
    Inherits Object
    Implements CfnDistribution.ICacheSettingsProperty
Remarks

These settings apply only to your distribution’s CacheBehaviors that have a Behavior of cache . This includes the DefaultCacheBehavior .

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachesettings.html

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lightsail;

var cacheSettingsProperty = new CacheSettingsProperty {
    AllowedHttpMethods = "allowedHttpMethods",
    CachedHttpMethods = "cachedHttpMethods",
    DefaultTtl = 123,
    ForwardedCookies = new CookieObjectProperty {
        CookiesAllowList = new [] { "cookiesAllowList" },
        Option = "option"
    },
    ForwardedHeaders = new HeaderObjectProperty {
        HeadersAllowList = new [] { "headersAllowList" },
        Option = "option"
    },
    ForwardedQueryStrings = new QueryStringObjectProperty {
        Option = false,
        QueryStringsAllowList = new [] { "queryStringsAllowList" }
    },
    MaximumTtl = 123,
    MinimumTtl = 123
};

Synopsis

Constructors

CacheSettingsProperty()

Properties

AllowedHttpMethods

The HTTP methods that are processed and forwarded to the distribution's origin.

CachedHttpMethods

The HTTP method responses that are cached by your distribution.

DefaultTtl

The default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.

ForwardedCookies

An object that describes the cookies that are forwarded to the origin.

ForwardedHeaders

An object that describes the headers that are forwarded to the origin.

ForwardedQueryStrings

An object that describes the query strings that are forwarded to the origin.

MaximumTtl

The maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.

MinimumTtl

The minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.

Constructors

CacheSettingsProperty()

public CacheSettingsProperty()

Properties

AllowedHttpMethods

The HTTP methods that are processed and forwarded to the distribution's origin.

public string AllowedHttpMethods { get; set; }
Property Value

System.String

Remarks

You can specify the following options:

    If you specify GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE , you might need to restrict access to your distribution's origin so users can't perform operations that you don't want them to. For example, you might not want users to have permission to delete objects from your origin.

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachesettings.html#cfn-lightsail-distribution-cachesettings-allowedhttpmethods

    CachedHttpMethods

    The HTTP method responses that are cached by your distribution.

    public string CachedHttpMethods { get; set; }
    Property Value

    System.String

    Remarks

    You can specify the following options:

      Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachesettings.html#cfn-lightsail-distribution-cachesettings-cachedhttpmethods

      DefaultTtl

      The default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.

      public Nullable<double> DefaultTtl { get; set; }
      Property Value

      System.Nullable<System.Double>

      Remarks

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

      Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachesettings.html#cfn-lightsail-distribution-cachesettings-defaultttl

      ForwardedCookies

      An object that describes the cookies that are forwarded to the origin.

      public object ForwardedCookies { get; set; }
      Property Value

      System.Object

      Remarks

      Your content is cached based on the cookies that are forwarded.

      Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachesettings.html#cfn-lightsail-distribution-cachesettings-forwardedcookies

      ForwardedHeaders

      An object that describes the headers that are forwarded to the origin.

      public object ForwardedHeaders { get; set; }
      Property Value

      System.Object

      Remarks

      Your content is cached based on the headers that are forwarded.

      Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachesettings.html#cfn-lightsail-distribution-cachesettings-forwardedheaders

      ForwardedQueryStrings

      An object that describes the query strings that are forwarded to the origin.

      public object ForwardedQueryStrings { get; set; }
      Property Value

      System.Object

      Remarks

      Your content is cached based on the query strings that are forwarded.

      Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachesettings.html#cfn-lightsail-distribution-cachesettings-forwardedquerystrings

      MaximumTtl

      The maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.

      public Nullable<double> MaximumTtl { get; set; }
      Property Value

      System.Nullable<System.Double>

      Remarks

      The value specified applies only when the origin adds HTTP headers such as Cache-Control max-age , Cache-Control s-maxage , and Expires to objects.

      Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachesettings.html#cfn-lightsail-distribution-cachesettings-maximumttl

      MinimumTtl

      The minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.

      public Nullable<double> MinimumTtl { get; set; }
      Property Value

      System.Nullable<System.Double>

      Remarks

      A value of 0 must be specified for minimumTTL if the distribution is configured to forward all headers to the origin.

      Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachesettings.html#cfn-lightsail-distribution-cachesettings-minimumttl

      Implements

      CfnDistribution.ICacheSettingsProperty
      Back to top Generated by DocFX