CrossAccountZoneDelegationRecord

class aws_cdk.aws_route53.CrossAccountZoneDelegationRecord(scope, id, *, delegated_zone, delegation_role, assume_role_region=None, parent_hosted_zone_id=None, parent_hosted_zone_name=None, removal_policy=None, ttl=None)

Bases: Construct

A Cross Account Zone Delegation record.

ExampleMetadata:

infused

Example:

sub_zone = route53.PublicHostedZone(self, "SubZone",
    zone_name="sub.someexample.com"
)

# import the delegation role by constructing the roleArn
delegation_role_arn = Stack.of(self).format_arn(
    region="",  # IAM is global in each partition
    service="iam",
    account="parent-account-id",
    resource="role",
    resource_name="MyDelegationRole"
)
delegation_role = iam.Role.from_role_arn(self, "DelegationRole", delegation_role_arn)

# create the record
route53.CrossAccountZoneDelegationRecord(self, "delegate",
    delegated_zone=sub_zone,
    parent_hosted_zone_name="someexample.com",  # or you can use parentHostedZoneId
    delegation_role=delegation_role
)
Parameters:
  • scope (Construct) –

  • id (str) –

  • delegated_zone (IHostedZone) – The zone to be delegated.

  • delegation_role (IRole) – The delegation role in the parent account.

  • assume_role_region (Optional[str]) – Region from which to obtain temporary credentials. Default: - the Route53 signing region in the current partition

  • parent_hosted_zone_id (Optional[str]) – The hosted zone id in the parent account. Default: - no zone id

  • parent_hosted_zone_name (Optional[str]) – The hosted zone name in the parent account. Default: - no zone name

  • removal_policy (Optional[RemovalPolicy]) – The removal policy to apply to the record set. Default: RemovalPolicy.DESTROY

  • ttl (Optional[Duration]) – The resource record cache time to live (TTL). Default: Duration.days(2)

Methods

to_string()

Returns a string representation of this construct.

Return type:

str

Attributes

node

The tree node.

Static Methods

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.