@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-11-01T13:16:42.811Z") @Stability(value=Experimental) public interface DomainOptions extends software.amazon.jsii.JsiiSerializable
Example:
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.core.*;
// 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();
GraphqlApi api = GraphqlApi.Builder.create(this, "api")
.name("myApi")
.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(myDomainName)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
DomainOptions.Builder
A builder for
DomainOptions |
static class |
DomainOptions.Jsii$Proxy
An implementation for
DomainOptions |
| Modifier and Type | Method and Description |
|---|---|
static DomainOptions.Builder |
builder() |
ICertificate |
getCertificate()
(experimental) The certificate to use with the domain name.
|
String |
getDomainName()
(experimental) The actual domain name.
|
@Stability(value=Experimental) @NotNull ICertificate getCertificate()
@Stability(value=Experimental) @NotNull String getDomainName()
For example, api.example.com.
@Stability(value=Experimental) static DomainOptions.Builder builder()
DomainOptions.Builder of DomainOptionsCopyright © 2022. All rights reserved.