Show / Hide Table of Contents

Class CfnCachePolicy

A cache policy.

Inheritance
object
CfnElement
CfnRefElement
CfnResource
CfnCachePolicy
Implements
IInspectable
ICachePolicyRef
IConstruct
IDependable
IEnvironmentAware
Inherited Members
CfnResource.IsCfnResource(object)
CfnResource.AddDeletionOverride(string)
CfnResource.AddDependency(CfnResource)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(string, object)
CfnResource.AddOverride(string, object)
CfnResource.AddPropertyDeletionOverride(string)
CfnResource.AddPropertyOverride(string, object)
CfnResource.ApplyRemovalPolicy(RemovalPolicy?, IRemovalPolicyOptions)
CfnResource.GetAtt(string, ResolutionTypeHint?)
CfnResource.GetMetadata(string)
CfnResource.ObtainDependencies()
CfnResource.ObtainResourceDependencies()
CfnResource.RemoveDependency(CfnResource)
CfnResource.ReplaceDependency(CfnResource, CfnResource)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.Env
CfnResource.UpdatedProperites
CfnResource.UpdatedProperties
CfnRefElement.Ref
CfnElement.IsCfnElement(object)
CfnElement.OverrideLogicalId(string)
CfnElement.With(params IMixin[])
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnCachePolicy : CfnResource, IInspectable, ICachePolicyRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class CfnCachePolicy Inherits CfnResource Implements IInspectable, ICachePolicyRef, IConstruct, IDependable, IEnvironmentAware
Remarks

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

    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: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-cachepolicy.html

    CloudformationResource: AWS::CloudFront::CachePolicy

    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.CloudFront;
    
                 var cfnCachePolicy = new CfnCachePolicy(this, "MyCfnCachePolicy", new CfnCachePolicyProps {
                     CachePolicyConfig = new CachePolicyConfigProperty {
                         DefaultTtl = 123,
                         MaxTtl = 123,
                         MinTtl = 123,
                         Name = "name",
                         ParametersInCacheKeyAndForwardedToOrigin = new ParametersInCacheKeyAndForwardedToOriginProperty {
                             CookiesConfig = new CookiesConfigProperty {
                                 CookieBehavior = "cookieBehavior",
    
                                 // the properties below are optional
                                 Cookies = new [] { "cookies" }
                             },
                             EnableAcceptEncodingGzip = false,
                             HeadersConfig = new HeadersConfigProperty {
                                 HeaderBehavior = "headerBehavior",
    
                                 // the properties below are optional
                                 Headers = new [] { "headers" }
                             },
                             QueryStringsConfig = new QueryStringsConfigProperty {
                                 QueryStringBehavior = "queryStringBehavior",
    
                                 // the properties below are optional
                                 QueryStrings = new [] { "queryStrings" }
                             },
    
                             // the properties below are optional
                             EnableAcceptEncodingBrotli = false
                         },
    
                         // the properties below are optional
                         Comment = "comment"
                     }
                 });

    Synopsis

    Constructors

    CfnCachePolicy(Construct, string, ICfnCachePolicyProps)

    Create a new AWS::CloudFront::CachePolicy.

    Properties

    AttrId

    The unique identifier for the cache policy.

    AttrLastModifiedTime

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

    CFN_RESOURCE_TYPE_NAME

    The CloudFormation resource type name for this resource class.

    CachePolicyConfig

    The cache policy configuration.

    CachePolicyRef

    A reference to a CachePolicy resource.

    CfnProperties

    A cache policy.

    Methods

    ArnForCachePolicy(ICachePolicyRef)

    A cache policy.

    Inspect(TreeInspector)

    Examines the CloudFormation resource and discloses attributes.

    IsCfnCachePolicy(object)

    Checks whether the given object is a CfnCachePolicy.

    RenderProperties(IDictionary<string, object>)

    A cache policy.

    Constructors

    CfnCachePolicy(Construct, string, ICfnCachePolicyProps)

    Create a new AWS::CloudFront::CachePolicy.

    public CfnCachePolicy(Construct scope, string id, ICfnCachePolicyProps props)
    Parameters
    scope Construct

    Scope in which this resource is defined.

    id string

    Construct identifier for this resource (unique in its scope).

    props ICfnCachePolicyProps

    Resource properties.

    Remarks

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

      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: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-cachepolicy.html

      CloudformationResource: AWS::CloudFront::CachePolicy

      ExampleMetadata: fixture=_generated

      Properties

      AttrId

      The unique identifier for the cache policy.

      public virtual string AttrId { get; }
      Property Value

      string

      Remarks

      For example: 2766f7b2-75c5-41c6-8f06-bf4303a2f2f5 .

      CloudformationAttribute: Id

      AttrLastModifiedTime

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

      public virtual string AttrLastModifiedTime { get; }
      Property Value

      string

      Remarks

      CloudformationAttribute: LastModifiedTime

      CFN_RESOURCE_TYPE_NAME

      The CloudFormation resource type name for this resource class.

      public static string CFN_RESOURCE_TYPE_NAME { get; }
      Property Value

      string

      Remarks

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

        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: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-cachepolicy.html

        CloudformationResource: AWS::CloudFront::CachePolicy

        ExampleMetadata: fixture=_generated

        CachePolicyConfig

        The cache policy configuration.

        public virtual object CachePolicyConfig { get; set; }
        Property Value

        object

        Remarks

        Type union: either IResolvable or CfnCachePolicy.ICachePolicyConfigProperty

        CachePolicyRef

        A reference to a CachePolicy resource.

        public virtual ICachePolicyReference CachePolicyRef { get; }
        Property Value

        ICachePolicyReference

        Remarks

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

          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: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-cachepolicy.html

          CloudformationResource: AWS::CloudFront::CachePolicy

          ExampleMetadata: fixture=_generated

          CfnProperties

          A cache policy.

          protected override IDictionary<string, object> CfnProperties { get; }
          Property Value

          IDictionary<string, object>

          Overrides
          CfnResource.CfnProperties
          Remarks

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

            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: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-cachepolicy.html

            CloudformationResource: AWS::CloudFront::CachePolicy

            ExampleMetadata: fixture=_generated

            Methods

            ArnForCachePolicy(ICachePolicyRef)

            A cache policy.

            public static string ArnForCachePolicy(ICachePolicyRef resource)
            Parameters
            resource ICachePolicyRef
            Returns

            string

            Remarks

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

              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: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-cachepolicy.html

              CloudformationResource: AWS::CloudFront::CachePolicy

              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.CloudFront;
              
                           var cfnCachePolicy = new CfnCachePolicy(this, "MyCfnCachePolicy", new CfnCachePolicyProps {
                               CachePolicyConfig = new CachePolicyConfigProperty {
                                   DefaultTtl = 123,
                                   MaxTtl = 123,
                                   MinTtl = 123,
                                   Name = "name",
                                   ParametersInCacheKeyAndForwardedToOrigin = new ParametersInCacheKeyAndForwardedToOriginProperty {
                                       CookiesConfig = new CookiesConfigProperty {
                                           CookieBehavior = "cookieBehavior",
              
                                           // the properties below are optional
                                           Cookies = new [] { "cookies" }
                                       },
                                       EnableAcceptEncodingGzip = false,
                                       HeadersConfig = new HeadersConfigProperty {
                                           HeaderBehavior = "headerBehavior",
              
                                           // the properties below are optional
                                           Headers = new [] { "headers" }
                                       },
                                       QueryStringsConfig = new QueryStringsConfigProperty {
                                           QueryStringBehavior = "queryStringBehavior",
              
                                           // the properties below are optional
                                           QueryStrings = new [] { "queryStrings" }
                                       },
              
                                       // the properties below are optional
                                       EnableAcceptEncodingBrotli = false
                                   },
              
                                   // the properties below are optional
                                   Comment = "comment"
                               }
                           });

              Inspect(TreeInspector)

              Examines the CloudFormation resource and discloses attributes.

              public virtual void Inspect(TreeInspector inspector)
              Parameters
              inspector TreeInspector

              tree inspector to collect and process attributes.

              Remarks

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

                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: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-cachepolicy.html

                CloudformationResource: AWS::CloudFront::CachePolicy

                ExampleMetadata: fixture=_generated

                IsCfnCachePolicy(object)

                Checks whether the given object is a CfnCachePolicy.

                public static bool IsCfnCachePolicy(object x)
                Parameters
                x object
                Returns

                bool

                Remarks

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

                  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: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-cachepolicy.html

                  CloudformationResource: AWS::CloudFront::CachePolicy

                  ExampleMetadata: fixture=_generated

                  RenderProperties(IDictionary<string, object>)

                  A cache policy.

                  protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
                  Parameters
                  props IDictionary<string, object>
                  Returns

                  IDictionary<string, object>

                  Overrides
                  CfnResource.RenderProperties(IDictionary<string, object>)
                  Remarks

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

                    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: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-cachepolicy.html

                    CloudformationResource: AWS::CloudFront::CachePolicy

                    ExampleMetadata: fixture=_generated

                    Implements

                    IInspectable
                    ICachePolicyRef
                    Constructs.IConstruct
                    Constructs.IDependable
                    IEnvironmentAware
                    Back to top Generated by DocFX