@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-09T19:16:40.565Z") 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 . |
IHostedZone.Jsii$Default, IHostedZone.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
HostedZone(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
HostedZone(software.amazon.jsii.JsiiObjectRef objRef) |
|
HostedZone(software.constructs.Construct scope,
java.lang.String id,
HostedZoneProps props) |
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,
java.lang.String id,
HostedZoneAttributes attrs)
Imports a hosted zone from another stack.
|
static IHostedZone |
fromHostedZoneId(software.constructs.Construct scope,
java.lang.String id,
java.lang.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,
java.lang.String id,
HostedZoneProviderProps query)
Lookup a hosted zone in the current account/region based on query parameters.
|
java.lang.String |
getHostedZoneArn()
ARN of this hosted zone, such as arn:${Partition}:route53:::hostedzone/${Id}.
|
java.lang.String |
getHostedZoneId()
ID of this hosted zone, such as "Z23ABC4XYZL05B".
|
java.util.List<java.lang.String> |
getHostedZoneNameServers()
Returns the set of name servers for the specific hosted zone.
|
protected java.util.List<CfnHostedZone.VPCProperty> |
getVpcs()
VPCs to which this hosted zone will be added.
|
java.lang.String |
getZoneName()
FQDN of this hosted zone.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyRemovalPolicy, getEnv, getStack
getNode
protected HostedZone(software.amazon.jsii.JsiiObjectRef objRef)
protected HostedZone(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public HostedZone(software.constructs.Construct scope, java.lang.String id, HostedZoneProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public static IHostedZone fromHostedZoneAttributes(software.constructs.Construct scope, java.lang.String id, 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.public static IHostedZone fromHostedZoneId(software.constructs.Construct scope, java.lang.String id, java.lang.String hostedZoneId)
Use when hosted zone ID is known. Hosted zone name becomes unavailable through this query.
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.public static IHostedZone fromLookup(software.constructs.Construct scope, java.lang.String id, 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.public void addVpc(IVpc vpc)
vpc
- the other VPC to add. This parameter is required.public java.lang.String getHostedZoneArn()
getHostedZoneArn
in interface IHostedZone
public java.lang.String getHostedZoneId()
getHostedZoneId
in interface IHostedZone
protected java.util.List<CfnHostedZone.VPCProperty> getVpcs()
public java.lang.String getZoneName()
getZoneName
in interface IHostedZone
public java.util.List<java.lang.String> getHostedZoneNameServers()
This attribute will be undefined for private hosted zones or hosted zones imported from another stack.
getHostedZoneNameServers
in interface IHostedZone