Skip to content
v2.278.0

CustomHeaderProperty Struct ​

An HTTP response header name and its value.

CloudFront includes this header in HTTP responses that it sends for requests that match a cache behavior that's associated with this response headers policy.

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 customHeaderProperty: cloudfront.CfnResponseHeadersPolicy.CustomHeaderProperty = {
  header: 'header',
  override: false,
  value: 'value',
};
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

custom_header_property = cloudfront.CfnResponseHeadersPolicy.CustomHeaderProperty(
    header="header",
    override=False,
    value="value"
)
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.*;

CustomHeaderProperty customHeaderProperty = CustomHeaderProperty.builder()
        .header("header")
        .override(false)
        .value("value")
        .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 customHeaderProperty = new CustomHeaderProperty {
    Header = "header",
    Override = false,
    Value = "value"
};
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"

customHeaderProperty := &CustomHeaderProperty{
	Header: jsii.String("header"),
	Override: jsii.Boolean(false),
	Value: jsii.String("value"),
}

Properties ​

overrideboolean | IResolvableoverridetyping.Union[bool, IResolvable]overrideBooleanOverrideboolOverrideinterface{} required #
A Boolean that determines whether CloudFront overrides a response header with the same name received from the origin with the header specified here.
valuestringvaluestrvalueStringValuestringValue*string required #
The value for the HTTP response header.