Class PublicHostedZoneProps
Construction properties for a PublicHostedZone.
Inherited Members
Namespace: Amazon.CDK.AWS.Route53
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class PublicHostedZoneProps : IPublicHostedZoneProps, ICommonHostedZoneProps
Syntax (vb)
Public Class PublicHostedZoneProps Implements IPublicHostedZoneProps, ICommonHostedZoneProps
Remarks
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);
new CrossAccountZoneDelegationRecord(this, "delegate", new CrossAccountZoneDelegationRecordProps {
DelegatedZone = subZone,
ParentHostedZoneName = "someexample.com", // or you can use parentHostedZoneId
DelegationRole = delegationRole,
AssumeRoleRegion = "us-east-1"
});
Synopsis
Constructors
| PublicHostedZoneProps() | Construction properties for a PublicHostedZone. |
Properties
| AddTrailingDot | Whether to add a trailing dot to the zone name. |
| CaaAmazon | Whether to create a CAA record to restrict certificate authorities allowed to issue certificates for this domain to Amazon only. |
| Comment | Any comments that you want to include about the hosted zone. |
| CrossAccountZoneDelegationPrincipal | (deprecated) A principal which is trusted to assume a role for zone delegation. |
| CrossAccountZoneDelegationRoleName | (deprecated) The name of the role created for cross account delegation. |
| QueryLogsLogGroupArn | The Amazon Resource Name (ARN) for the log group that you want Amazon Route 53 to send query logs to. |
| ZoneName | The name of the domain. |
Constructors
PublicHostedZoneProps()
Construction properties for a PublicHostedZone.
public PublicHostedZoneProps()
Remarks
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);
new CrossAccountZoneDelegationRecord(this, "delegate", new CrossAccountZoneDelegationRecordProps {
DelegatedZone = subZone,
ParentHostedZoneName = "someexample.com", // or you can use parentHostedZoneId
DelegationRole = delegationRole,
AssumeRoleRegion = "us-east-1"
});
Properties
AddTrailingDot
Whether to add a trailing dot to the zone name.
public bool? AddTrailingDot { get; set; }
Property Value
bool?
Remarks
Default: true
CaaAmazon
Whether to create a CAA record to restrict certificate authorities allowed to issue certificates for this domain to Amazon only.
public bool? CaaAmazon { get; set; }
Property Value
bool?
Remarks
Default: false
Comment
Any comments that you want to include about the hosted zone.
public string? Comment { get; set; }
Property Value
Remarks
Default: none
CrossAccountZoneDelegationPrincipal
(deprecated) A principal which is trusted to assume a role for zone delegation.
[Obsolete("Create the Role yourself and call `hostedZone.grantDelegation()`.")]
public IPrincipal? CrossAccountZoneDelegationPrincipal { get; set; }
Property Value
Remarks
If supplied, this will create a Role in the same account as the Hosted
Zone, which can be assumed by the CrossAccountZoneDelegationRecord to
create a delegation record to a zone in a different account.
Be sure to indicate the account(s) that you trust to create delegation
records, using either iam.AccountPrincipal or iam.OrganizationPrincipal.
If you are planning to use iam.ServicePrincipals here, be sure to include
region-specific service principals for every opt-in region you are going to
be delegating to; or don't use this feature and create separate roles
with appropriate permissions for every opt-in region instead.
Default: - No delegation configuration
Stability: Deprecated
CrossAccountZoneDelegationRoleName
(deprecated) The name of the role created for cross account delegation.
[Obsolete("Create the Role yourself and call `hostedZone.grantDelegation()`.")]
public string? CrossAccountZoneDelegationRoleName { get; set; }
Property Value
Remarks
Default: - A role name is generated automatically
Stability: Deprecated
QueryLogsLogGroupArn
The Amazon Resource Name (ARN) for the log group that you want Amazon Route 53 to send query logs to.
public string? QueryLogsLogGroupArn { get; set; }
Property Value
Remarks
Default: disabled
ZoneName
The name of the domain.
public string ZoneName { get; set; }
Property Value
Remarks
For resource record types that include a domain name, specify a fully qualified domain name.