Skip to content
v2.277.0

CrossAccountZoneDelegationRecordProps Struct ​

Construction properties for a CrossAccountZoneDelegationRecord.

Example ​

ts
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,
});
python
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
)
java
PublicHostedZone subZone = PublicHostedZone.Builder.create(this, "SubZone")
        .zoneName("sub.someexample.com")
        .build();

// import the delegation role by constructing the roleArn
String delegationRoleArn = Stack.of(this).formatArn(ArnComponents.builder()
        .region("") // IAM is global in each partition
        .service("iam")
        .account("parent-account-id")
        .resource("role")
        .resourceName("MyDelegationRole")
        .build());
IRole delegationRole = Role.fromRoleArn(this, "DelegationRole", delegationRoleArn);

// create the record
// create the record
CrossAccountZoneDelegationRecord.Builder.create(this, "delegate")
        .delegatedZone(subZone)
        .parentHostedZoneName("someexample.com") // or you can use parentHostedZoneId
        .delegationRole(delegationRole)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
var subZone = new PublicHostedZone(this, "SubZone", new PublicHostedZoneProps {
    ZoneName = "sub.someexample.com"
});

// import the delegation role by constructing the roleArn
var delegationRoleArn = Stack.Of(this).FormatArn(new ArnComponents {
    Region = "",  // IAM is global in each partition
    Service = "iam",
    Account = "parent-account-id",
    Resource = "role",
    ResourceName = "MyDelegationRole"
});
var delegationRole = Role.FromRoleArn(this, "DelegationRole", delegationRoleArn);

// create the record
// create the record
new CrossAccountZoneDelegationRecord(this, "delegate", new CrossAccountZoneDelegationRecordProps {
    DelegatedZone = subZone,
    ParentHostedZoneName = "someexample.com",  // or you can use parentHostedZoneId
    DelegationRole = delegationRole
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
subZone := route53.NewPublicHostedZone(this, jsii.String("SubZone"), &PublicHostedZoneProps{
	ZoneName: jsii.String("sub.someexample.com"),
})

// import the delegation role by constructing the roleArn
delegationRoleArn := awscdk.stack_Of(this).FormatArn(&ArnComponents{
	Region: jsii.String(""),
	 // IAM is global in each partition
	Service: jsii.String("iam"),
	Account: jsii.String("parent-account-id"),
	Resource: jsii.String("role"),
	ResourceName: jsii.String("MyDelegationRole"),
})
delegationRole := iam.Role_FromRoleArn(this, jsii.String("DelegationRole"), delegationRoleArn)

// create the record
// create the record
route53.NewCrossAccountZoneDelegationRecord(this, jsii.String("delegate"), &CrossAccountZoneDelegationRecordProps{
	DelegatedZone: subZone,
	ParentHostedZoneName: jsii.String("someexample.com"),
	 // or you can use parentHostedZoneId
	DelegationRole: DelegationRole,
})

Properties ​

assumeRoleRegionoptionalstringassume_role_regionoptionalstrassumeRoleRegionoptionalStringAssumeRoleRegionoptionalstringAssumeRoleRegionoptional*string #
Region from which to obtain temporary credentials.

Default: the Route53 signing region in the current partition

delegatedZoneIHostedZonedelegated_zoneIHostedZonedelegatedZoneIHostedZoneDelegatedZoneIHostedZoneDelegatedZoneIHostedZone required #
The zone to be delegated.
delegationRoleIRoleRefdelegation_roleIRoleRefdelegationRoleIRoleRefDelegationRoleIRoleRefDelegationRoleIRoleRef required #
The delegation role in the parent account.
parentHostedZoneIdoptionalstringparent_hosted_zone_idoptionalstrparentHostedZoneIdoptionalStringParentHostedZoneIdoptionalstringParentHostedZoneIdoptional*string #
The hosted zone id in the parent account.

Default: no zone id

parentHostedZoneNameoptionalstringparent_hosted_zone_nameoptionalstrparentHostedZoneNameoptionalStringParentHostedZoneNameoptionalstringParentHostedZoneNameoptional*string #
The hosted zone name in the parent account.

Default: no zone name

removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy = RemovalPolicy.DESTROY #
The removal policy to apply to the record set.
ttloptionalDurationttloptionalDurationttloptionalDurationTtloptionalDurationTtloptionalDuration = Duration.days(2) #
The resource record cache time to live (TTL).