# IPublicHostedZone

Represents a Route 53 public hosted zone.

Extends: [IHostedZone](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_route53.IHostedZone.html)
Implemented by: [PublicHostedZone](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_route53.PublicHostedZone.html)
Obtainable from: [PublicHostedZone.fromPublicHostedZoneAttributes](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_route53.PublicHostedZone.html#frompublichostedzoneattributes), [PublicHostedZone.fromPublicHostedZoneId](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_route53.PublicHostedZone.html#frompublichostedzoneid)
Used as argument in: [DkimIdentity.bind](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ses.DkimIdentity.html#bind), [Identity.publicHostedZone](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ses.Identity.html#publichostedzone), PublicHostedZone.addDelegation

- Source: [`aws-route53/lib/hosted-zone.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-route53/lib/hosted-zone.ts#L382)
- Type last changed: v2.94.0 · 1 Sep 2023

## Properties

- `env`: [ResourceEnvironment](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html) — The environment this resource belongs to.

  For resources that are created and managed in a Stack (those created by
  creating new class instances like `new Role()`, `new Bucket()`, etc.), this
  is always the same as the environment of the stack they belong to.

  For referenced resources (those obtained from referencing methods like
  `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
  different than the stack they were imported into.

- `hostedZoneArn`: string — ARN of this hosted zone, such as arn:${Partition}:route53:::hostedzone/${Id}.

- `hostedZoneId`: string — ID of this hosted zone, such as "Z23ABC4XYZL05B".

- `hostedZoneNameServers`: string[] — Returns the set of name servers for the specific hosted zone. For example: ns1.example.com.

  This attribute will be undefined for private hosted zones or hosted zones imported from another stack.

- `hostedZoneRef`: [HostedZoneReference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_route53.HostedZoneReference.html) — A reference to a HostedZone resource.

- `name`: string

- `node`: [Node](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.Node.html) — The tree node.

- `stack`: [Stack](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Stack.html) — The stack in which this resource is defined.

- `zoneName`: string — FQDN of this hosted zone.

## Methods

- `applyRemovalPolicy(policy: RemovalPolicy): void` — Apply the given removal policy to this resource.

  The Removal Policy controls what happens to this resource when it stops
  being managed by CloudFormation, either because you've removed it from the
  CDK application or because you've made a change that requires the resource
  to be replaced.

  The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
  account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).

- `grantDelegation(grantee: IGrantable, options?: GrantDelegationOptions): Grant` — Grant permissions to add delegation records to this zone.

- `with(...mixins: IMixin[]): IConstruct` — Applies one or more mixins to this construct.

  Mixins are applied in order. The list of constructs is captured at the
  start of the call, so constructs added by a mixin will not be visited.

  **Parameters**

  - `mixins` — The mixins to apply.

  **Returns:** This construct for chaining
