Interface DomainOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
DomainOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:49.486Z") @Stability(Experimental) public interface DomainOptions extends software.amazon.jsii.JsiiSerializable
(experimental) 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();
 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();
 
  • Method Details

    • getCertificate

      @Stability(Experimental) @NotNull ICertificate getCertificate()
      (experimental) The certificate to use with the domain name.
    • getDomainName

      @Stability(Experimental) @NotNull String getDomainName()
      (experimental) The actual domain name.

      For example, api.example.com.

    • builder

      @Stability(Experimental) static DomainOptions.Builder builder()
      Returns:
      a DomainOptions.Builder of DomainOptions