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 partitionparent_hosted_zone_id (
Optional
[str
]) – The hosted zone id in the parent account. Default: - no zone idparent_hosted_zone_name (
Optional
[str
]) – The hosted zone name in the parent account. Default: - no zone nameremoval_policy (
Optional
[RemovalPolicy
]) – The removal policy to apply to the record set. Default: RemovalPolicy.DESTROYttl (
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 detectConstruct
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 classConstruct
in each copy of theconstructs
library is seen as a different class, and an instance of one class will not test asinstanceof
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 theconstructs
library can be accidentally installed, andinstanceof
will behave unpredictably. It is safest to avoid usinginstanceof
, 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 extendsConstruct
.