Interface DomainOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
DomainOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-25T14:21:10.382Z")
@Stability(Stable)
public interface DomainOptions
extends software.amazon.jsii.JsiiSerializable
Domain name configuration for AppSync.
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
Modifier and TypeInterfaceDescriptionstatic final class
A builder forDomainOptions
static final class
An implementation forDomainOptions
-
Method Summary
Modifier and TypeMethodDescriptionstatic DomainOptions.Builder
builder()
The certificate to use with the domain name.The actual domain name.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCertificate
The certificate to use with the domain name. -
getDomainName
The actual domain name.For example,
api.example.com
. -
builder
- Returns:
- a
DomainOptions.Builder
ofDomainOptions
-