HostedZone

class aws_cdk.aws_route53.HostedZone(scope, id, *, vpcs=None, zone_name, comment=None, query_logs_log_group_arn=None)

Bases: aws_cdk.core.Resource

__init__(scope, id, *, vpcs=None, zone_name, comment=None, query_logs_log_group_arn=None)
Parameters
  • scope (Construct) –

  • id (str) –

  • props

  • vpcs (Optional[List[IVpc]]) – A VPC that you want to associate with this hosted zone. When you specify this property, a private hosted zone will be created. You can associate additional VPCs to this private zone using addVpc(vpc). Default: public (no VPCs associated)

  • zone_name (str) – The name of the domain. For resource record types that include a domain name, specify a fully qualified domain name.

  • comment (Optional[str]) – Any comments that you want to include about the hosted zone. Default: none

  • query_logs_log_group_arn (Optional[str]) – The Amazon Resource Name (ARN) for the log group that you want Amazon Route 53 to send query logs to. Default: disabled

Return type

None

Methods

add_vpc(vpc)

Add another VPC to this private hosted zone.

Parameters

vpc (IVpc) – the other VPC to add.

Return type

None

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

hosted_zone_id

ID of this hosted zone, such as “Z23ABC4XYZL05B”.

Return type

str

hosted_zone_name_servers

ns1.example.com.

This attribute will be undefined for private hosted zones or hosted zones imported from another stack.

Type

Returns the set of name servers for the specific hosted zone. For example

Return type

Optional[List[str]]

node

Construct tree node which offers APIs for interacting with the construct tree.

Return type

ConstructNode

stack

The stack in which this resource is defined.

Return type

Stack

zone_name

FQDN of this hosted zone.

Return type

str

Static Methods

classmethod from_hosted_zone_attributes(scope, id, *, hosted_zone_id, zone_name)

Imports a hosted zone from another stack.

Parameters
  • scope (Construct) –

  • id (str) –

  • attrs

  • hosted_zone_id (str) – Identifier of the hosted zone.

  • zone_name (str) – Name of the hosted zone.

Return type

IHostedZone

classmethod from_hosted_zone_id(scope, id, hosted_zone_id)
Parameters
  • scope (Construct) –

  • id (str) –

  • hosted_zone_id (str) –

Return type

IHostedZone

classmethod from_lookup(scope, id, *, domain_name, private_zone=None, vpc_id=None)

Lookup a hosted zone in the current account/region based on query parameters.

Parameters
  • scope (Construct) –

  • id (str) –

  • query

  • domain_name (str) – The zone domain e.g. example.com.

  • private_zone (Optional[bool]) – Is this a private zone.

  • vpc_id (Optional[str]) – If this is a private zone which VPC is assocaitated.

Return type

IHostedZone

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool