aws-cdk-lib.aws_route53.CrossAccountZoneDelegationRecord

class CrossAccountZoneDelegationRecord (construct)

LanguageType name
.NETAmazon.CDK.AWS.Route53.CrossAccountZoneDelegationRecord
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsroute53#CrossAccountZoneDelegationRecord
Javasoftware.amazon.awscdk.services.route53.CrossAccountZoneDelegationRecord
Pythonaws_cdk.aws_route53.CrossAccountZoneDelegationRecord
TypeScript (source)aws-cdk-lib » aws_route53 » CrossAccountZoneDelegationRecord

Implements IConstruct, IDependable

A Cross Account Zone Delegation record.

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 CrossAccountZoneDelegationRecordProps

Construct Props

NameTypeDescription
delegatedZoneIHostedZoneThe zone to be delegated.
delegationRoleIRoleThe delegation role in the parent account.
parentHostedZoneId?stringThe hosted zone id in the parent account.
parentHostedZoneName?stringThe hosted zone name in the parent account.
removalPolicy?RemovalPolicyThe removal policy to apply to the record set.
ttl?DurationThe resource record cache time to live (TTL).

delegatedZone

Type: IHostedZone

The zone to be delegated.


delegationRole

Type: IRole

The delegation role in the parent account.


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: RemovalPolicy (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

NameTypeDescription
nodeNodeThe tree node.

node

Type: Node

The tree node.

Methods

NameDescription
toString()Returns a string representation of this construct.

toString()

public toString(): string

Returns

  • string

Returns a string representation of this construct.