Class HostedZone
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.route53.HostedZone
- All Implemented Interfaces:
IConstruct,IDependable,IResource,IHostedZone,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
- Direct Known Subclasses:
PrivateHostedZone,PublicHostedZone
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:43.012Z")
@Stability(Stable)
public class HostedZone
extends Resource
implements IHostedZone
Container for records, and records contain information about how to route traffic for a specific domain, such as example.com and its subdomains (acme.example.com, zenith.example.com).
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();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.route53.IHostedZone
IHostedZone.Jsii$Default, IHostedZone.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHostedZone(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedHostedZone(software.amazon.jsii.JsiiObjectRef objRef) HostedZone(software.constructs.Construct scope, String id, HostedZoneProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd another VPC to this private hosted zone.static IHostedZonefromHostedZoneAttributes(software.constructs.Construct scope, String id, HostedZoneAttributes attrs) Imports a hosted zone from another stack.static IHostedZonefromHostedZoneId(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 IHostedZonefromLookup(software.constructs.Construct scope, String id, HostedZoneProviderProps query) Lookup a hosted zone in the current account/region based on query parameters.ARN of this hosted zone, such as arn:${Partition}:route53:::hostedzone/${Id}.ID of this hosted zone, such as "Z23ABC4XYZL05B".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.FQDN of this hosted zone.Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourceMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.constructs.Construct
toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.core.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
HostedZone
protected HostedZone(software.amazon.jsii.JsiiObjectRef objRef) -
HostedZone
protected HostedZone(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
HostedZone
@Stability(Stable) public HostedZone(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull HostedZoneProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromHostedZoneAttributes
@Stability(Stable) @NotNull public static IHostedZone fromHostedZoneAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull HostedZoneAttributes attrs) Imports a 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 HostedZoneAttributes (hosted zone ID and hosted zone name). This parameter is required.
-
fromHostedZoneId
@Stability(Stable) @NotNull public static IHostedZone fromHostedZoneId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String hostedZoneId) Import a Route 53 hosted zone defined either outside the CDK, or in a different CDK stack.Use when hosted zone ID is known. Hosted zone name becomes unavailable through this query.
- Parameters:
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.
-
fromLookup
@Stability(Stable) @NotNull public static IHostedZone fromLookup(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull HostedZoneProviderProps query) Lookup a hosted zone in the current account/region based on query parameters.Requires environment, you must specify env for the stack.
Use to easily query hosted zones.
- Parameters:
scope- This parameter is required.id- This parameter is required.query- This parameter is required.- See Also:
-
addVpc
Add another VPC to this private hosted zone.- Parameters:
vpc- the other VPC to add. This parameter is required.
-
getHostedZoneArn
ARN of this hosted zone, such as arn:${Partition}:route53:::hostedzone/${Id}.- Specified by:
getHostedZoneArnin interfaceIHostedZone
-
getHostedZoneId
ID of this hosted zone, such as "Z23ABC4XYZL05B".- Specified by:
getHostedZoneIdin interfaceIHostedZone
-
getVpcs
VPCs to which this hosted zone will be added. -
getZoneName
FQDN of this hosted zone.- Specified by:
getZoneNamein interfaceIHostedZone
-
getHostedZoneNameServers
Returns the set of name servers for the specific hosted zone. For example: ns1.example.com.This attribute will be undefined for private hosted zones or hosted zones imported from another stack.
- Specified by:
getHostedZoneNameServersin interfaceIHostedZone
-