# OriginCustomHeaderProperty

A complex type that contains `HeaderName` and `HeaderValue` elements, if any, for this distribution.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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 originCustomHeaderProperty: cloudfront.CfnDistribution.OriginCustomHeaderProperty = {
  headerName: 'headerName',
  headerValue: 'headerValue',
};
```

Python:

```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

origin_custom_header_property = cloudfront.CfnDistribution.OriginCustomHeaderProperty(
    header_name="headerName",
    header_value="headerValue"
)
```

Java:

```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.*;

OriginCustomHeaderProperty originCustomHeaderProperty = OriginCustomHeaderProperty.builder()
        .headerName("headerName")
        .headerValue("headerValue")
        .build();
```

C# / .NET:

```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 originCustomHeaderProperty = new OriginCustomHeaderProperty {
    HeaderName = "headerName",
    HeaderValue = "headerValue"
};
```

Golang:

```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"

originCustomHeaderProperty := &OriginCustomHeaderProperty{
	HeaderName: jsii.String("headerName"),
	HeaderValue: jsii.String("headerValue"),
}
```

## Properties

- `headerName`: string (required) — The name of a header that you want CloudFront to send to your origin.

  For more information, see [Adding Custom Headers to Origin Requests](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/forward-custom-headers.html) in the *Amazon CloudFront Developer Guide* .

- `headerValue`: string (required) — The value for the header that you specified in the `HeaderName` field.
