@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.663Z") @Stability(value=Stable) public class HostedZone extends Resource implements IHostedZone
Example:
HostedZone hostedZone = HostedZone.Builder.create(this, "MyHostedZone").zoneName("example.org").build();
Metric metric = Metric.Builder.create()
.namespace("AWS/Route53")
.metricName("DNSQueries")
.dimensionsMap(Map.of(
"HostedZoneId", hostedZone.getHostedZoneId()))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
HostedZone.Builder
A fluent builder for
HostedZone. |
software.amazon.jsii.JsiiObject.InitializationModeIHostedZone.Jsii$Default, IHostedZone.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
HostedZone(software.constructs.Construct scope,
String id,
HostedZoneProps props) |
protected |
HostedZone(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
HostedZone(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
addVpc(IVpc vpc)
Add another VPC to this private hosted zone.
|
static IHostedZone |
fromHostedZoneAttributes(software.constructs.Construct scope,
String id,
HostedZoneAttributes attrs)
Imports a hosted zone from another stack.
|
static IHostedZone |
fromHostedZoneId(software.constructs.Construct scope,
String id,
String hostedZoneId)
Import a Route 53 hosted zone defined either outside the CDK, or in a different CDK stack.
|
static IHostedZone |
fromLookup(software.constructs.Construct scope,
String id,
HostedZoneProviderProps query)
Lookup a hosted zone in the current account/region based on query parameters.
|
String |
getHostedZoneArn()
ARN of this hosted zone, such as arn:${Partition}:route53:::hostedzone/${Id}.
|
String |
getHostedZoneId()
ID of this hosted zone, such as "Z23ABC4XYZL05B".
|
List<String> |
getHostedZoneNameServers()
Returns the set of name servers for the specific hosted zone.
|
protected List<CfnHostedZone.VPCProperty> |
getVpcs()
VPCs to which this hosted zone will be added.
|
String |
getZoneName()
FQDN of this hosted zone.
|
applyRemovalPolicy, 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, waitapplyRemovalPolicy, getEnv, getStackprotected HostedZone(software.amazon.jsii.JsiiObjectRef objRef)
protected HostedZone(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public HostedZone(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
HostedZoneProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable) @NotNull public static IHostedZone fromHostedZoneAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull HostedZoneAttributes 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 HostedZoneAttributes (hosted zone ID and hosted zone name). This parameter is required.@Stability(value=Stable) @NotNull public static IHostedZone fromHostedZoneId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String hostedZoneId)
Use when hosted zone ID is known. If a HostedZone is imported with this method the zoneName cannot be referenced.
If the zoneName is needed then the HostedZone should be imported with fromHostedZoneAttributes() or fromLookup()
scope - the parent Construct for this Construct. This parameter is required.id - the logical name of this Construct. This parameter is required.hostedZoneId - the ID of the hosted zone to import. This parameter is required.@Stability(value=Stable) @NotNull public static IHostedZone fromLookup(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull HostedZoneProviderProps query)
Requires environment, you must specify env for the stack.
Use to easily query hosted zones.
scope - This parameter is required.id - This parameter is required.query - This parameter is required.@Stability(value=Stable)
public void addVpc(@NotNull
IVpc vpc)
vpc - the other VPC to add. This parameter is required.@Stability(value=Stable) @NotNull public String getHostedZoneArn()
getHostedZoneArn in interface IHostedZone@Stability(value=Stable) @NotNull public String getHostedZoneId()
getHostedZoneId in interface IHostedZone@Stability(value=Stable) @NotNull protected List<CfnHostedZone.VPCProperty> getVpcs()
@Stability(value=Stable) @NotNull public String getZoneName()
getZoneName in interface IHostedZone@Stability(value=Stable) @Nullable public List<String> getHostedZoneNameServers()
This attribute will be undefined for private hosted zones or hosted zones imported from another stack.
getHostedZoneNameServers in interface IHostedZoneCopyright © 2022. All rights reserved.