# DomainNameAttributes

- Source: [`aws-apigateway/lib/domain-name.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-apigateway/lib/domain-name.ts#L491)

## Example

```ts
declare const api: apigateway.RestApi;

const domainName = apigateway.DomainName.fromDomainNameAttributes(this, 'DomainName', {
  domainName: 'domainName',
  domainNameAliasHostedZoneId: 'domainNameAliasHostedZoneId',
  domainNameAliasTarget: 'domainNameAliasTarget',
});

new apigateway.BasePathMapping(this, 'BasePathMapping', {
  domainName: domainName,
  restApi: api,
});
```

## Properties

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

- `domainNameAliasHostedZoneId`: string (required) — The Route53 hosted zone ID to use in order to connect a record set to this domain through an alias.

- `domainNameAliasTarget`: string (required) — The Route53 alias target to use in order to connect a record set to this domain through an alias.
