Class CfnOriginRequestPolicy
An origin request policy.
Inherited Members
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnOriginRequestPolicy : CfnResource, IInspectable, IOriginRequestPolicyRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class CfnOriginRequestPolicy Inherits CfnResource Implements IInspectable, IOriginRequestPolicyRef, IConstruct, IDependable, IEnvironmentAware
Remarks
When it's attached to a cache behavior, the origin request policy determines the values that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the following:
CloudFront sends a request when it can't find an object in its cache that matches the request. If you want to send values to the origin and also include them in the cache key, use CachePolicy .
CloudformationResource: AWS::CloudFront::OriginRequestPolicy
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 cfnOriginRequestPolicy = new CfnOriginRequestPolicy(this, "MyCfnOriginRequestPolicy", new CfnOriginRequestPolicyProps {
OriginRequestPolicyConfig = new OriginRequestPolicyConfigProperty {
CookiesConfig = new CookiesConfigProperty {
CookieBehavior = "cookieBehavior",
// the properties below are optional
Cookies = new [] { "cookies" }
},
HeadersConfig = new HeadersConfigProperty {
HeaderBehavior = "headerBehavior",
// the properties below are optional
Headers = new [] { "headers" }
},
Name = "name",
QueryStringsConfig = new QueryStringsConfigProperty {
QueryStringBehavior = "queryStringBehavior",
// the properties below are optional
QueryStrings = new [] { "queryStrings" }
},
// the properties below are optional
Comment = "comment"
}
});
Synopsis
Constructors
| CfnOriginRequestPolicy(Construct, string, ICfnOriginRequestPolicyProps) | Create a new |
Properties
| AttrId | The unique identifier for the origin request policy. |
| AttrLastModifiedTime | The date and time when the origin request policy was last modified. |
| CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
| CfnProperties | An origin request policy. |
| OriginRequestPolicyConfig | The origin request policy configuration. |
| OriginRequestPolicyRef | A reference to a OriginRequestPolicy resource. |
Methods
| ArnForOriginRequestPolicy(IOriginRequestPolicyRef) | An origin request policy. |
| Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
| IsCfnOriginRequestPolicy(object) | Checks whether the given object is a CfnOriginRequestPolicy. |
| RenderProperties(IDictionary<string, object>) | An origin request policy. |
Constructors
CfnOriginRequestPolicy(Construct, string, ICfnOriginRequestPolicyProps)
Create a new AWS::CloudFront::OriginRequestPolicy.
public CfnOriginRequestPolicy(Construct scope, string id, ICfnOriginRequestPolicyProps props)
Parameters
- scope Construct
Scope in which this resource is defined.
- id string
Construct identifier for this resource (unique in its scope).
- props ICfnOriginRequestPolicyProps
Resource properties.
Remarks
When it's attached to a cache behavior, the origin request policy determines the values that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the following:
CloudFront sends a request when it can't find an object in its cache that matches the request. If you want to send values to the origin and also include them in the cache key, use CachePolicy .
CloudformationResource: AWS::CloudFront::OriginRequestPolicy
ExampleMetadata: fixture=_generated
Properties
AttrId
The unique identifier for the origin request policy.
public virtual string AttrId { get; }
Property Value
Remarks
For example: befd7079-9bbc-4ebf-8ade-498a3694176c .
CloudformationAttribute: Id
AttrLastModifiedTime
The date and time when the origin request policy was last modified.
public virtual string AttrLastModifiedTime { get; }
Property Value
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
Remarks
When it's attached to a cache behavior, the origin request policy determines the values that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the following:
CloudFront sends a request when it can't find an object in its cache that matches the request. If you want to send values to the origin and also include them in the cache key, use CachePolicy .
CloudformationResource: AWS::CloudFront::OriginRequestPolicy
ExampleMetadata: fixture=_generated
CfnProperties
An origin request policy.
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Overrides
Remarks
When it's attached to a cache behavior, the origin request policy determines the values that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the following:
CloudFront sends a request when it can't find an object in its cache that matches the request. If you want to send values to the origin and also include them in the cache key, use CachePolicy .
CloudformationResource: AWS::CloudFront::OriginRequestPolicy
ExampleMetadata: fixture=_generated
OriginRequestPolicyConfig
The origin request policy configuration.
public virtual object OriginRequestPolicyConfig { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnOriginRequestPolicy.IOriginRequestPolicyConfigProperty
OriginRequestPolicyRef
A reference to a OriginRequestPolicy resource.
public virtual IOriginRequestPolicyReference OriginRequestPolicyRef { get; }
Property Value
Remarks
When it's attached to a cache behavior, the origin request policy determines the values that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the following:
CloudFront sends a request when it can't find an object in its cache that matches the request. If you want to send values to the origin and also include them in the cache key, use CachePolicy .
CloudformationResource: AWS::CloudFront::OriginRequestPolicy
ExampleMetadata: fixture=_generated
Methods
ArnForOriginRequestPolicy(IOriginRequestPolicyRef)
An origin request policy.
public static string ArnForOriginRequestPolicy(IOriginRequestPolicyRef resource)
Parameters
- resource IOriginRequestPolicyRef
Returns
Remarks
When it's attached to a cache behavior, the origin request policy determines the values that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the following:
CloudFront sends a request when it can't find an object in its cache that matches the request. If you want to send values to the origin and also include them in the cache key, use CachePolicy .
CloudformationResource: AWS::CloudFront::OriginRequestPolicy
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 cfnOriginRequestPolicy = new CfnOriginRequestPolicy(this, "MyCfnOriginRequestPolicy", new CfnOriginRequestPolicyProps {
OriginRequestPolicyConfig = new OriginRequestPolicyConfigProperty {
CookiesConfig = new CookiesConfigProperty {
CookieBehavior = "cookieBehavior",
// the properties below are optional
Cookies = new [] { "cookies" }
},
HeadersConfig = new HeadersConfigProperty {
HeaderBehavior = "headerBehavior",
// the properties below are optional
Headers = new [] { "headers" }
},
Name = "name",
QueryStringsConfig = new QueryStringsConfigProperty {
QueryStringBehavior = "queryStringBehavior",
// the properties below are optional
QueryStrings = new [] { "queryStrings" }
},
// 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 origin request policy determines the values that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the following:
CloudFront sends a request when it can't find an object in its cache that matches the request. If you want to send values to the origin and also include them in the cache key, use CachePolicy .
CloudformationResource: AWS::CloudFront::OriginRequestPolicy
ExampleMetadata: fixture=_generated
IsCfnOriginRequestPolicy(object)
Checks whether the given object is a CfnOriginRequestPolicy.
public static bool IsCfnOriginRequestPolicy(object x)
Parameters
- x object
Returns
Remarks
When it's attached to a cache behavior, the origin request policy determines the values that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the following:
CloudFront sends a request when it can't find an object in its cache that matches the request. If you want to send values to the origin and also include them in the cache key, use CachePolicy .
CloudformationResource: AWS::CloudFront::OriginRequestPolicy
ExampleMetadata: fixture=_generated
RenderProperties(IDictionary<string, object>)
An origin request policy.
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
When it's attached to a cache behavior, the origin request policy determines the values that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the following:
CloudFront sends a request when it can't find an object in its cache that matches the request. If you want to send values to the origin and also include them in the cache key, use CachePolicy .
CloudformationResource: AWS::CloudFront::OriginRequestPolicy
ExampleMetadata: fixture=_generated