@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.674Z") @Stability(value=Stable) public class PublicHostedZone extends HostedZone implements IPublicHostedZone
Example:
PublicHostedZone subZone = PublicHostedZone.Builder.create(this, "SubZone")
.zoneName("sub.someexample.com")
.build();
// import the delegation role by constructing the roleArn
String delegationRoleArn = Stack.of(this).formatArn(ArnComponents.builder()
.region("") // IAM is global in each partition
.service("iam")
.account("parent-account-id")
.resource("role")
.resourceName("MyDelegationRole")
.build());
IRole delegationRole = Role.fromRoleArn(this, "DelegationRole", delegationRoleArn);
// create the record
// create the record
CrossAccountZoneDelegationRecord.Builder.create(this, "delegate")
.delegatedZone(subZone)
.parentHostedZoneName("someexample.com") // or you can use parentHostedZoneId
.delegationRole(delegationRole)
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
PublicHostedZone.Builder
A fluent builder for
PublicHostedZone. |
software.amazon.jsii.JsiiObject.InitializationModeIPublicHostedZone.Jsii$Default, IPublicHostedZone.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
PublicHostedZone(software.constructs.Construct scope,
String id,
PublicHostedZoneProps props) |
protected |
PublicHostedZone(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
PublicHostedZone(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
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 |
addVpc(IVpc _vpc)
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 |
getCrossAccountZoneDelegationRole()
Role for cross account zone delegation.
|
fromHostedZoneAttributes, fromHostedZoneId, fromLookup, getHostedZoneArn, getHostedZoneId, getHostedZoneNameServers, getVpcs, getZoneNameapplyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetHostedZoneArn, getHostedZoneId, getHostedZoneNameServers, getZoneNameapplyRemovalPolicy, getEnv, getStackprotected PublicHostedZone(software.amazon.jsii.JsiiObjectRef objRef)
protected PublicHostedZone(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public PublicHostedZone(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
PublicHostedZoneProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable) @NotNull public static IPublicHostedZone fromPublicHostedZoneAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull PublicHostedZoneAttributes attrs)
Use when both hosted zone ID and hosted zone name are known.
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.@Stability(value=Stable) @NotNull public static IPublicHostedZone fromPublicHostedZoneId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String publicHostedZoneId)
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().
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.@Stability(value=Stable)
public void addDelegation(@NotNull
IPublicHostedZone delegate,
@Nullable
ZoneDelegationOptions opts)
delegate - the zone being delegated to. This parameter is required.opts - options for creating the DNS record, if any.@Stability(value=Stable)
public void addDelegation(@NotNull
IPublicHostedZone delegate)
delegate - the zone being delegated to. This parameter is required.@Stability(value=Stable)
public void addVpc(@NotNull
IVpc _vpc)
addVpc in class HostedZone_vpc - This parameter is required.@Stability(value=Stable) @Nullable public Role getCrossAccountZoneDelegationRole()
Copyright © 2022. All rights reserved.