Class CrossAccountZoneDelegationRecord
A Cross Account Zone Delegation record.
Namespace: Amazon.CDK.AWS.Route53
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CrossAccountZoneDelegationRecord : Construct
Syntax (vb)
Public Class CrossAccountZoneDelegationRecord Inherits Construct
Remarks
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.
ExampleMetadata: infused
Examples
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
});
Synopsis
Constructors
CrossAccountZoneDelegationRecord(Construct, string, ICrossAccountZoneDelegationRecordProps) | A Cross Account Zone Delegation record. |
Constructors
CrossAccountZoneDelegationRecord(Construct, string, ICrossAccountZoneDelegationRecordProps)
A Cross Account Zone Delegation record.
public CrossAccountZoneDelegationRecord(Construct scope, string id, ICrossAccountZoneDelegationRecordProps props)
Parameters
- scope Construct
- id string
- props ICrossAccountZoneDelegationRecordProps
Remarks
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.
ExampleMetadata: infused
Examples
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
});