interface HostedZoneAttributes
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.Route53.HostedZoneAttributes | 
|  Go | github.com/aws/aws-cdk-go/awscdk/v2/awsroute53#HostedZoneAttributes | 
|  Java | software.amazon.awscdk.services.route53.HostedZoneAttributes | 
|  Python | aws_cdk.aws_route53.HostedZoneAttributes | 
|  TypeScript (source) | aws-cdk-lib»aws_route53»HostedZoneAttributes | 
Reference to a hosted zone.
Example
import * as acm from 'aws-cdk-lib/aws-certificatemanager';
import * as route53 from 'aws-cdk-lib/aws-route53';
const myDomainName = 'api.example.com';
const certificate = new acm.Certificate(this, 'cert', { domainName: myDomainName });
const schema = new appsync.SchemaFile({ filePath: 'mySchemaFile' })
const api = new appsync.GraphqlApi(this, 'api', {
  name: 'myApi',
  definition: appsync.Definition.fromSchema(schema),
  domainName: {
    certificate,
    domainName: myDomainName,
  },
});
// hosted zone and route53 features
declare const hostedZoneId: string;
declare const zoneName = 'example.com';
// hosted zone for adding appsync domain
const zone = route53.HostedZone.fromHostedZoneAttributes(this, `HostedZone`, {
  hostedZoneId,
  zoneName,
});
// create a cname to the appsync domain. will map to something like xxxx.cloudfront.net
new route53.CnameRecord(this, `CnameApiRecord`, {
  recordName: 'api',
  zone,
  domainName: api.appSyncDomainName,
});
Properties
| Name | Type | Description | 
|---|---|---|
| hosted | string | Identifier of the hosted zone. | 
| zone | string | Name of the hosted zone. | 
hostedZoneId
Type:
string
Identifier of the hosted zone.
zoneName
Type:
string
Name of the hosted zone.
