Class CfnCachePolicyPropsMixin
A cache policy.
Implements
Inherited Members
Namespace: Amazon.CDK.Mixins.Preview.AWS.CloudFront.Mixins
Assembly: Amazon.CDK.Mixins.Preview.dll
Syntax (csharp)
public class CfnCachePolicyPropsMixin : Mixin, IMixin
Syntax (vb)
Public Class CfnCachePolicyPropsMixin Inherits Mixin Implements IMixin
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 .
CloudformationResource: AWS::CloudFront::CachePolicy
Mixin: true
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.Mixins.Preview.Mixins;
using Amazon.CDK.Mixins.Preview.AWS.CloudFront.Mixins;
var cfnCachePolicyPropsMixin = new CfnCachePolicyPropsMixin(new CfnCachePolicyMixinProps {
CachePolicyConfig = new CachePolicyConfigProperty {
Comment = "comment",
DefaultTtl = 123,
MaxTtl = 123,
MinTtl = 123,
Name = "name",
ParametersInCacheKeyAndForwardedToOrigin = new ParametersInCacheKeyAndForwardedToOriginProperty {
CookiesConfig = new CookiesConfigProperty {
CookieBehavior = "cookieBehavior",
Cookies = new [] { "cookies" }
},
EnableAcceptEncodingBrotli = false,
EnableAcceptEncodingGzip = false,
HeadersConfig = new HeadersConfigProperty {
HeaderBehavior = "headerBehavior",
Headers = new [] { "headers" }
},
QueryStringsConfig = new QueryStringsConfigProperty {
QueryStringBehavior = "queryStringBehavior",
QueryStrings = new [] { "queryStrings" }
}
}
}
}, new CfnPropertyMixinOptions {
Strategy = PropertyMergeStrategy.OVERRIDE
});
Synopsis
Constructors
| CfnCachePolicyPropsMixin(ICfnCachePolicyMixinProps, ICfnPropertyMixinOptions?) | Create a mixin to apply properties to |
Properties
| CFN_PROPERTY_KEYS | A cache policy. |
| Props | A cache policy. |
| Strategy | A cache policy. |
Methods
| ApplyTo(IConstruct) | Apply the mixin properties to the construct. |
| Supports(IConstruct) | Check if this mixin supports the given construct. |
Constructors
CfnCachePolicyPropsMixin(ICfnCachePolicyMixinProps, ICfnPropertyMixinOptions?)
Create a mixin to apply properties to AWS::CloudFront::CachePolicy.
public CfnCachePolicyPropsMixin(ICfnCachePolicyMixinProps props, ICfnPropertyMixinOptions? options = null)
Parameters
- props ICfnCachePolicyMixinProps
L1 properties to apply.
- options ICfnPropertyMixinOptions
Mixin options.
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 .
CloudformationResource: AWS::CloudFront::CachePolicy
Mixin: true
ExampleMetadata: fixture=_generated
Properties
CFN_PROPERTY_KEYS
A cache policy.
protected static string[] CFN_PROPERTY_KEYS { 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 .
CloudformationResource: AWS::CloudFront::CachePolicy
Mixin: true
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.Mixins.Preview.Mixins;
using Amazon.CDK.Mixins.Preview.AWS.CloudFront.Mixins;
var cfnCachePolicyPropsMixin = new CfnCachePolicyPropsMixin(new CfnCachePolicyMixinProps {
CachePolicyConfig = new CachePolicyConfigProperty {
Comment = "comment",
DefaultTtl = 123,
MaxTtl = 123,
MinTtl = 123,
Name = "name",
ParametersInCacheKeyAndForwardedToOrigin = new ParametersInCacheKeyAndForwardedToOriginProperty {
CookiesConfig = new CookiesConfigProperty {
CookieBehavior = "cookieBehavior",
Cookies = new [] { "cookies" }
},
EnableAcceptEncodingBrotli = false,
EnableAcceptEncodingGzip = false,
HeadersConfig = new HeadersConfigProperty {
HeaderBehavior = "headerBehavior",
Headers = new [] { "headers" }
},
QueryStringsConfig = new QueryStringsConfigProperty {
QueryStringBehavior = "queryStringBehavior",
QueryStrings = new [] { "queryStrings" }
}
}
}
}, new CfnPropertyMixinOptions {
Strategy = PropertyMergeStrategy.OVERRIDE
});
Props
A cache policy.
protected virtual ICfnCachePolicyMixinProps Props { get; }
Property Value
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 .
CloudformationResource: AWS::CloudFront::CachePolicy
Mixin: true
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.Mixins.Preview.Mixins;
using Amazon.CDK.Mixins.Preview.AWS.CloudFront.Mixins;
var cfnCachePolicyPropsMixin = new CfnCachePolicyPropsMixin(new CfnCachePolicyMixinProps {
CachePolicyConfig = new CachePolicyConfigProperty {
Comment = "comment",
DefaultTtl = 123,
MaxTtl = 123,
MinTtl = 123,
Name = "name",
ParametersInCacheKeyAndForwardedToOrigin = new ParametersInCacheKeyAndForwardedToOriginProperty {
CookiesConfig = new CookiesConfigProperty {
CookieBehavior = "cookieBehavior",
Cookies = new [] { "cookies" }
},
EnableAcceptEncodingBrotli = false,
EnableAcceptEncodingGzip = false,
HeadersConfig = new HeadersConfigProperty {
HeaderBehavior = "headerBehavior",
Headers = new [] { "headers" }
},
QueryStringsConfig = new QueryStringsConfigProperty {
QueryStringBehavior = "queryStringBehavior",
QueryStrings = new [] { "queryStrings" }
}
}
}
}, new CfnPropertyMixinOptions {
Strategy = PropertyMergeStrategy.OVERRIDE
});
Strategy
A cache policy.
protected virtual PropertyMergeStrategy Strategy { get; }
Property Value
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 .
CloudformationResource: AWS::CloudFront::CachePolicy
Mixin: true
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.Mixins.Preview.Mixins;
using Amazon.CDK.Mixins.Preview.AWS.CloudFront.Mixins;
var cfnCachePolicyPropsMixin = new CfnCachePolicyPropsMixin(new CfnCachePolicyMixinProps {
CachePolicyConfig = new CachePolicyConfigProperty {
Comment = "comment",
DefaultTtl = 123,
MaxTtl = 123,
MinTtl = 123,
Name = "name",
ParametersInCacheKeyAndForwardedToOrigin = new ParametersInCacheKeyAndForwardedToOriginProperty {
CookiesConfig = new CookiesConfigProperty {
CookieBehavior = "cookieBehavior",
Cookies = new [] { "cookies" }
},
EnableAcceptEncodingBrotli = false,
EnableAcceptEncodingGzip = false,
HeadersConfig = new HeadersConfigProperty {
HeaderBehavior = "headerBehavior",
Headers = new [] { "headers" }
},
QueryStringsConfig = new QueryStringsConfigProperty {
QueryStringBehavior = "queryStringBehavior",
QueryStrings = new [] { "queryStrings" }
}
}
}
}, new CfnPropertyMixinOptions {
Strategy = PropertyMergeStrategy.OVERRIDE
});
Methods
ApplyTo(IConstruct)
Apply the mixin properties to the construct.
public override IConstruct ApplyTo(IConstruct construct)
Parameters
- construct IConstruct
Returns
IConstruct
Overrides
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 .
CloudformationResource: AWS::CloudFront::CachePolicy
Mixin: true
ExampleMetadata: fixture=_generated
Supports(IConstruct)
Check if this mixin supports the given construct.
public override bool Supports(IConstruct construct)
Parameters
- construct IConstruct
Returns
Overrides
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 .
CloudformationResource: AWS::CloudFront::CachePolicy
Mixin: true
ExampleMetadata: fixture=_generated