Interface HostedZoneProviderProps

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:43.025Z") @Stability(Stable) public interface HostedZoneProviderProps extends software.amazon.jsii.JsiiSerializable
Zone properties for looking up the Hosted Zone.

Example:

 import software.amazon.awscdk.services.s3.*;
 String recordName = "www";
 String domainName = "example.com";
 Bucket bucketWebsite = Bucket.Builder.create(this, "BucketWebsite")
         .bucketName(List.of(recordName, domainName).join(".")) // www.example.com
         .publicReadAccess(true)
         .websiteIndexDocument("index.html")
         .build();
 IHostedZone zone = HostedZone.fromLookup(this, "Zone", HostedZoneProviderProps.builder().domainName(domainName).build()); // example.com
  // example.com
 ARecord.Builder.create(this, "AliasRecord")
         .zone(zone)
         .recordName(recordName) // www
         .target(RecordTarget.fromAlias(new BucketWebsiteTarget(bucketWebsite)))
         .build();
 
  • Method Details

    • getDomainName

      @Stability(Stable) @NotNull String getDomainName()
      The zone domain e.g. example.com.
    • getPrivateZone

      @Stability(Stable) @Nullable default Boolean getPrivateZone()
      Whether the zone that is being looked up is a private hosted zone.

      Default: false

    • getVpcId

      @Stability(Stable) @Nullable default String getVpcId()
      Specifies the ID of the VPC associated with a private hosted zone.

      If a VPC ID is provided and privateZone is false, no results will be returned and an error will be raised

      Default: - No VPC ID

    • builder

      @Stability(Stable) static HostedZoneProviderProps.Builder builder()
      Returns:
      a HostedZoneProviderProps.Builder of HostedZoneProviderProps