# ApiGatewayDomain

Defines an API Gateway domain name as the alias target.

Use the `ApiGateway` class if you wish to map the alias to an REST API with a
domain name defined through the `RestApiProps.domainName` prop.

Extends: ApiGatewayDomain
Implements: IAliasRecordTarget
Superclass of: ApiGateway

- Source: [`aws-route53-targets/lib/api-gateway-domain-name.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-route53-targets/lib/api-gateway-domain-name.ts#L12)

## Example

```ts
declare const hostedZoneForExampleCom: any;
declare const domainName: apigateway.DomainName;

import * as route53 from 'aws-cdk-lib/aws-route53';
import * as targets from 'aws-cdk-lib/aws-route53-targets';

new route53.ARecord(this, 'CustomDomainAliasRecord', {
  zone: hostedZoneForExampleCom,
  target: route53.RecordTarget.fromAlias(new targets.ApiGatewayDomain(domainName))
});
```

## Initializer

```ts
new ApiGatewayDomain(domainName: IDomainName)
```

## Methods

- `bind(_record: IRecordSet, _zone?: IHostedZone): AliasRecordTargetConfig` — Return hosted zone ID and DNS name, usable for Route53 alias targets.
