Interface HostedZoneAttributes
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
PublicHostedZoneAttributes
- All Known Implementing Classes:
HostedZoneAttributes.Jsii$Proxy
,PublicHostedZoneAttributes.Jsii$Proxy
@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)",
date="2025-08-06T18:14:44.786Z")
@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 class
A builder forHostedZoneAttributes
static final class
An implementation forHostedZoneAttributes
-
Method Summary
Modifier and TypeMethodDescriptionstatic HostedZoneAttributes.Builder
builder()
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.Builder
ofHostedZoneAttributes
-