Interface HostedZoneAttributes
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
PrivateHostedZoneAttributes,PublicHostedZoneAttributes
- All Known Implementing Classes:
HostedZoneAttributes.Jsii$Proxy,PrivateHostedZoneAttributes.Jsii$Proxy,PublicHostedZoneAttributes.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-17T14:40:59.536Z")
@Stability(Stable)
public interface HostedZoneAttributes
extends software.amazon.jsii.JsiiSerializable
Reference to a hosted zone.
Example:
import software.amazon.awscdk.services.certificatemanager.*;
import software.amazon.awscdk.services.route53.*;
// hosted zone and route53 features
String hostedZoneId;
String zoneName = "example.com";
String myDomainName = "api.example.com";
Certificate certificate = Certificate.Builder.create(this, "cert").domainName(myDomainName).build();
SchemaFile schema = SchemaFile.Builder.create().filePath("mySchemaFile").build();
GraphqlApi api = GraphqlApi.Builder.create(this, "api")
.name("myApi")
.definition(Definition.fromSchema(schema))
.domainName(DomainOptions.builder()
.certificate(certificate)
.domainName(myDomainName)
.build())
.build();
// hosted zone for adding appsync domain
IHostedZone zone = HostedZone.fromHostedZoneAttributes(this, "HostedZone", HostedZoneAttributes.builder()
.hostedZoneId(hostedZoneId)
.zoneName(zoneName)
.build());
// create a cname to the appsync domain. will map to something like xxxx.cloudfront.net
// create a cname to the appsync domain. will map to something like xxxx.cloudfront.net
CnameRecord.Builder.create(this, "CnameApiRecord")
.recordName("api")
.zone(zone)
.domainName(api.getAppSyncDomainName())
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forHostedZoneAttributesstatic final classAn implementation forHostedZoneAttributes -
Method Summary
Modifier and TypeMethodDescriptionstatic HostedZoneAttributes.Builderbuilder()Identifier of the hosted zone.Name of the hosted zone.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getHostedZoneId
Identifier of the hosted zone. -
getZoneName
Name of the hosted zone. -
builder
- Returns:
- a
HostedZoneAttributes.BuilderofHostedZoneAttributes
-