CfnOriginRequestPolicyProps Struct
Properties for defining a CfnOriginRequestPolicy.
| Source |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudfront as cloudfront } from 'aws-cdk-lib';
const cfnOriginRequestPolicyProps: cloudfront.CfnOriginRequestPolicyProps = {
originRequestPolicyConfig: {
cookiesConfig: {
cookieBehavior: 'cookieBehavior',
// the properties below are optional
cookies: ['cookies'],
},
headersConfig: {
headerBehavior: 'headerBehavior',
// the properties below are optional
headers: ['headers'],
},
name: 'name',
queryStringsConfig: {
queryStringBehavior: 'queryStringBehavior',
// the properties below are optional
queryStrings: ['queryStrings'],
},
// the properties below are optional
comment: 'comment',
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudfront as cloudfront
cfn_origin_request_policy_props = cloudfront.CfnOriginRequestPolicyProps(
origin_request_policy_config=cloudfront.CfnOriginRequestPolicy.OriginRequestPolicyConfigProperty(
cookies_config=cloudfront.CfnOriginRequestPolicy.CookiesConfigProperty(
cookie_behavior="cookieBehavior",
# the properties below are optional
cookies=["cookies"]
),
headers_config=cloudfront.CfnOriginRequestPolicy.HeadersConfigProperty(
header_behavior="headerBehavior",
# the properties below are optional
headers=["headers"]
),
name="name",
query_strings_config=cloudfront.CfnOriginRequestPolicy.QueryStringsConfigProperty(
query_string_behavior="queryStringBehavior",
# the properties below are optional
query_strings=["queryStrings"]
),
# the properties below are optional
comment="comment"
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudfront.*;
CfnOriginRequestPolicyProps cfnOriginRequestPolicyProps = CfnOriginRequestPolicyProps.builder()
.originRequestPolicyConfig(OriginRequestPolicyConfigProperty.builder()
.cookiesConfig(CookiesConfigProperty.builder()
.cookieBehavior("cookieBehavior")
// the properties below are optional
.cookies(List.of("cookies"))
.build())
.headersConfig(HeadersConfigProperty.builder()
.headerBehavior("headerBehavior")
// the properties below are optional
.headers(List.of("headers"))
.build())
.name("name")
.queryStringsConfig(QueryStringsConfigProperty.builder()
.queryStringBehavior("queryStringBehavior")
// the properties below are optional
.queryStrings(List.of("queryStrings"))
.build())
// the properties below are optional
.comment("comment")
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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 cfnOriginRequestPolicyProps = 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"
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnOriginRequestPolicyProps := &CfnOriginRequestPolicyProps{
OriginRequestPolicyConfig: &OriginRequestPolicyConfigProperty{
CookiesConfig: &CookiesConfigProperty{
CookieBehavior: jsii.String("cookieBehavior"),
// the properties below are optional
Cookies: []*string{
jsii.String("cookies"),
},
},
HeadersConfig: &HeadersConfigProperty{
HeaderBehavior: jsii.String("headerBehavior"),
// the properties below are optional
Headers: []*string{
jsii.String("headers"),
},
},
Name: jsii.String("name"),
QueryStringsConfig: &QueryStringsConfigProperty{
QueryStringBehavior: jsii.String("queryStringBehavior"),
// the properties below are optional
QueryStrings: []*string{
jsii.String("queryStrings"),
},
},
// the properties below are optional
Comment: jsii.String("comment"),
},
}
Properties
originRequestPolicyConfigIResolvable | CfnOriginRequestPolicy.origin_request_policy_configtyping.Union[IResolvable, OriginRequestPolicyConfigProperty]originRequestPolicyConfigIResolvableOriginRequestPolicyConfigIResolvableOriginRequestPolicyConfiginterface{} required #The origin request policy configuration.