# VpcOriginAttributes

The properties to import from the VPC origin.

Used as argument in: [VpcOrigin.fromVpcOriginAttributes](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.VpcOrigin.html#fromvpcoriginattributes)

- Source: [`aws-cloudfront/lib/vpc-origin.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-cloudfront/lib/vpc-origin.ts#L90)
- Type last changed: v2.180.0 · 21 Feb 2025

## 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 vpcOriginAttributes: cloudfront.VpcOriginAttributes = {
  domainName: 'domainName',
  vpcOriginArn: 'vpcOriginArn',
  vpcOriginId: 'vpcOriginId',
};
```

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

vpc_origin_attributes = cloudfront.VpcOriginAttributes(
    domain_name="domainName",
    vpc_origin_arn="vpcOriginArn",
    vpc_origin_id="vpcOriginId"
)
```

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

VpcOriginAttributes vpcOriginAttributes = VpcOriginAttributes.builder()
        .domainName("domainName")
        .vpcOriginArn("vpcOriginArn")
        .vpcOriginId("vpcOriginId")
        .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 vpcOriginAttributes = new VpcOriginAttributes {
    DomainName = "domainName",
    VpcOriginArn = "vpcOriginArn",
    VpcOriginId = "vpcOriginId"
};
```

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"

vpcOriginAttributes := &VpcOriginAttributes{
	DomainName: jsii.String("domainName"),
	VpcOriginArn: jsii.String("vpcOriginArn"),
	VpcOriginId: jsii.String("vpcOriginId"),
}
```

## Properties

- `domainName`: string — The domain name of the CloudFront VPC origin endpoint configuration.

  **Default:** No domain name configured

- `vpcOriginArn`: string — The ARN of the VPC origin.

  **Default:** derived from `vpcOriginId`.

  At least one of vpcOriginArn and vpcOriginId must be provided.

- `vpcOriginId`: string — The ID of the VPC origin.

  **Default:** derived from `vpcOriginArn`.

  At least one of vpcOriginArn and vpcOriginId must be provided.
