Class CfnOriginRequestPolicy
An origin request policy.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnOriginRequestPolicy : CfnResource, IInspectable
Syntax (vb)
Public Class CfnOriginRequestPolicy
Inherits CfnResource
Implements IInspectable
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(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnOriginRequestPolicy(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnOriginRequestPolicy(Construct, String, ICfnOriginRequestPolicyProps) |
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 | |
OriginRequestPolicyConfig | The origin request policy configuration. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnOriginRequestPolicy(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnOriginRequestPolicy(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnOriginRequestPolicy(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnOriginRequestPolicy(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnOriginRequestPolicy(Construct, String, ICfnOriginRequestPolicyProps)
public CfnOriginRequestPolicy(Construct scope, string id, ICfnOriginRequestPolicyProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnOriginRequestPolicyProps
Resource properties.
Properties
AttrId
The unique identifier for the origin request policy.
public virtual string AttrId { get; }
Property Value
System.String
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
System.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
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
OriginRequestPolicyConfig
The origin request policy configuration.
public virtual object OriginRequestPolicyConfig { get; set; }
Property Value
System.Object
Methods
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.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>