Class PublicHostedZone
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.route53.HostedZone
software.amazon.awscdk.services.route53.PublicHostedZone
- All Implemented Interfaces:
IResource
,IHostedZone
,IPublicHostedZone
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-06T23:25:16.097Z")
@Stability(Stable)
public class PublicHostedZone
extends HostedZone
implements IPublicHostedZone
Create a Route53 public hosted zone.
Example:
Stack stack1 = Stack.Builder.create(app, "Stack1") .env(Environment.builder() .region("us-east-1") .build()) .crossRegionReferences(true) .build(); Certificate cert = Certificate.Builder.create(stack1, "Cert") .domainName("*.example.com") .validation(CertificateValidation.fromDns(PublicHostedZone.fromHostedZoneId(stack1, "Zone", "Z0329774B51CGXTDQV3X"))) .build(); Stack stack2 = Stack.Builder.create(app, "Stack2") .env(Environment.builder() .region("us-east-2") .build()) .crossRegionReferences(true) .build(); Distribution.Builder.create(stack2, "Distribution") .defaultBehavior(BehaviorOptions.builder() .origin(new HttpOrigin("example.com")) .build()) .domainNames(List.of("dev.example.com")) .certificate(cert) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.route53.IHostedZone
IHostedZone.Jsii$Default, IHostedZone.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.route53.IPublicHostedZone
IPublicHostedZone.Jsii$Default, IPublicHostedZone.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
PublicHostedZone
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
PublicHostedZone
(software.amazon.jsii.JsiiObjectRef objRef) PublicHostedZone
(software.constructs.Construct scope, String id, PublicHostedZoneProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDelegation
(IPublicHostedZone delegate) Adds a delegation from this zone to a designated zone.void
addDelegation
(IPublicHostedZone delegate, ZoneDelegationOptions opts) Adds a delegation from this zone to a designated zone.void
Add another VPC to this private hosted zone.static IPublicHostedZone
fromPublicHostedZoneAttributes
(software.constructs.Construct scope, String id, PublicHostedZoneAttributes attrs) Imports a public hosted zone from another stack.static IPublicHostedZone
fromPublicHostedZoneId
(software.constructs.Construct scope, String id, String publicHostedZoneId) Import a Route 53 public hosted zone defined either outside the CDK, or in a different CDK stack.Role for cross account zone delegation.Methods inherited from class software.amazon.awscdk.services.route53.HostedZone
enableDnssec, fromHostedZoneAttributes, fromHostedZoneId, fromLookup, getHostedZoneArn, getHostedZoneId, getHostedZoneNameServers, getVpcs, getZoneName, grantDelegation
Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.services.route53.IHostedZone
getHostedZoneArn, getHostedZoneId, getHostedZoneNameServers, getZoneName, grantDelegation
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
PublicHostedZone
protected PublicHostedZone(software.amazon.jsii.JsiiObjectRef objRef) -
PublicHostedZone
protected PublicHostedZone(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
PublicHostedZone
@Stability(Stable) public PublicHostedZone(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull PublicHostedZoneProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
fromPublicHostedZoneAttributes
@Stability(Stable) @NotNull public static IPublicHostedZone fromPublicHostedZoneAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull PublicHostedZoneAttributes attrs) Imports a public hosted zone from another stack.Use when both hosted zone ID and hosted zone name are known.
- Parameters:
scope
- the parent Construct for this Construct. This parameter is required.id
- the logical name of this Construct. This parameter is required.attrs
- the PublicHostedZoneAttributes (hosted zone ID and hosted zone name). This parameter is required.
-
fromPublicHostedZoneId
@Stability(Stable) @NotNull public static IPublicHostedZone fromPublicHostedZoneId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String publicHostedZoneId) Import a Route 53 public hosted zone defined either outside the CDK, or in a different CDK stack.Use when hosted zone ID is known. If a PublicHostedZone is imported with this method the zoneName cannot be referenced. If the zoneName is needed then the PublicHostedZone should be imported with
fromPublicHostedZoneAttributes()
.- Parameters:
scope
- the parent Construct for this Construct. This parameter is required.id
- the logical name of this Construct. This parameter is required.publicHostedZoneId
- the ID of the public hosted zone to import. This parameter is required.
-
addDelegation
@Stability(Stable) public void addDelegation(@NotNull IPublicHostedZone delegate, @Nullable ZoneDelegationOptions opts) Adds a delegation from this zone to a designated zone.- Parameters:
delegate
- the zone being delegated to. This parameter is required.opts
- options for creating the DNS record, if any.
-
addDelegation
Adds a delegation from this zone to a designated zone.- Parameters:
delegate
- the zone being delegated to. This parameter is required.
-
addVpc
Add another VPC to this private hosted zone.- Overrides:
addVpc
in classHostedZone
- Parameters:
_vpc
- This parameter is required.
-
getCrossAccountZoneDelegationRole
Role for cross account zone delegation.
-