# HostedZoneProviderProps

Zone properties for looking up the Hosted Zone.

- Source: [`aws-route53/lib/hosted-zone-provider.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-route53/lib/hosted-zone-provider.ts#L4)

## Example

```ts
import * as s3 from 'aws-cdk-lib/aws-s3';

const recordName = 'www';
const domainName = 'example.com';

const bucketWebsite = new s3.Bucket(this, 'BucketWebsite', {
  bucketName: [recordName, domainName].join('.'), // www.example.com
  publicReadAccess: true,
  websiteIndexDocument: 'index.html',
});

const zone = route53.HostedZone.fromLookup(this, 'Zone', { domainName }); // example.com

new route53.ARecord(this, 'AliasRecord', {
  zone,
  recordName, // www
  target: route53.RecordTarget.fromAlias(
    new targets.BucketWebsiteTarget(bucketWebsite, {
      evaluateTargetHealth: true,
    }),
  ),
});
```

## Properties

- `domainName`: string (required) — The zone domain e.g. example.com.

- `privateZone`: boolean = false — Whether the zone that is being looked up is a private hosted zone.

- `vpcId`: string — Specifies the ID of the VPC associated with a private hosted zone.

  **Default:** No VPC ID

  If a VPC ID is provided and privateZone is false, no results will be returned
  and an error will be raised
