class CrossAccountZoneDelegationRecord (construct)
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Route53.CrossAccountZoneDelegationRecord |
![]() | software.amazon.awscdk.services.route53.CrossAccountZoneDelegationRecord |
![]() | aws_cdk.aws_route53.CrossAccountZoneDelegationRecord |
![]() | @aws-cdk/aws-route53 » CrossAccountZoneDelegationRecord |
Implements
IConstruct
, 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
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. |
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.
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 | Construct | The construct tree node associated with this construct. |
node
Type:
Construct
The construct tree node associated with this construct.
Methods
Name | Description |
---|---|
to | Returns a string representation of this construct. |
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.