class CrossAccountZoneDelegationRecord (construct)
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Route53.CrossAccountZoneDelegationRecord |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsroute53#CrossAccountZoneDelegationRecord |
![]() | software.amazon.awscdk.services.route53.CrossAccountZoneDelegationRecord |
![]() | aws_cdk.aws_route53.CrossAccountZoneDelegationRecord |
![]() | aws-cdk-lib » aws_route53 » CrossAccountZoneDelegationRecord |
Implements
IConstruct
, IDependable
A Cross Account Zone Delegation record.
This construct uses custom resource lambda that calls Route53
ChangeResourceRecordSets API to upsert a NS record into the parentHostedZone
.
WARNING: The default removal policy of this resource is DESTROY, therefore, if this resource's logical ID changes or if this resource is removed from the stack, the existing NS record will be removed.
Example
const subZone = new route53.PublicHostedZone(this, 'SubZone', {
zoneName: 'sub.someexample.com',
});
// import the delegation role by constructing the roleArn
const delegationRoleArn = Stack.of(this).formatArn({
region: '', // IAM is global in each partition
service: 'iam',
account: 'parent-account-id',
resource: 'role',
resourceName: 'MyDelegationRole',
});
const delegationRole = iam.Role.fromRoleArn(this, 'DelegationRole', delegationRoleArn);
// create the record
new route53.CrossAccountZoneDelegationRecord(this, 'delegate', {
delegatedZone: subZone,
parentHostedZoneName: 'someexample.com', // or you can use parentHostedZoneId
delegationRole,
});
Initializer
new CrossAccountZoneDelegationRecord(scope: Construct, id: string, props: CrossAccountZoneDelegationRecordProps)
Parameters
- scope
Construct
- id
string
- props
Cross
Account Zone Delegation Record Props
Construct Props
Name | Type | Description |
---|---|---|
delegated | IHosted | The zone to be delegated. |
delegation | IRole | The delegation role in the parent account. |
assume | string | Region from which to obtain temporary credentials. |
parent | string | The hosted zone id in the parent account. |
parent | string | The hosted zone name in the parent account. |
removal | Removal | The removal policy to apply to the record set. |
ttl? | Duration | The resource record cache time to live (TTL). |
delegatedZone
Type:
IHosted
The zone to be delegated.
delegationRole
Type:
IRole
The delegation role in the parent account.
assumeRoleRegion?
Type:
string
(optional, default: the Route53 signing region in the current partition)
Region from which to obtain temporary credentials.
parentHostedZoneId?
Type:
string
(optional, default: no zone id)
The hosted zone id in the parent account.
parentHostedZoneName?
Type:
string
(optional, default: no zone name)
The hosted zone name in the parent account.
removalPolicy?
Type:
Removal
(optional, default: RemovalPolicy.DESTROY)
The removal policy to apply to the record set.
ttl?
Type:
Duration
(optional, default: Duration.days(2))
The resource record cache time to live (TTL).
Properties
Name | Type | Description |
---|---|---|
node | Node | The tree node. |
node
Type:
Node
The tree node.
Methods
Name | Description |
---|---|
to | Returns a string representation of this construct. |
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.