Class CfnHostedZone
Creates a new public or private hosted zone.
Inherited Members
Namespace: Amazon.CDK.AWS.Route53
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnHostedZone : CfnResource, IInspectable, IHostedZoneRef, IConstruct, IDependable, IEnvironmentAware, ITaggable
Syntax (vb)
Public Class CfnHostedZone Inherits CfnResource Implements IInspectable, IHostedZoneRef, IConstruct, IDependable, IEnvironmentAware, ITaggable
Remarks
You create records in a public hosted zone to define how you want to route traffic on the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a private hosted zone to define how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds (Amazon VPCs).
You can't convert a public hosted zone to a private hosted zone or vice versa. Instead, you must create a new hosted zone with the same name and create new resource record sets.
For more information about charges for hosted zones, see Amazon Route 53 Pricing .
Note the following:
When you submit a CreateHostedZone request, the initial status of the hosted zone is PENDING . For public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the NS and SOA records are available, the status of the zone changes to INSYNC .
The CreateHostedZone request requires the caller to have an ec2:DescribeVpcs permission.
When creating private hosted zones, the Amazon VPC must belong to the same partition where the hosted zone is created. A partition is a group of AWS Regions . Each AWS account is scoped to one partition.
The following are the supported partitions:
For more information, see Access Management in the AWS General Reference .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html
CloudformationResource: AWS::Route53::HostedZone
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Route53;
var cfnHostedZone = new CfnHostedZone(this, "MyCfnHostedZone", new CfnHostedZoneProps {
HostedZoneConfig = new HostedZoneConfigProperty {
Comment = "comment"
},
HostedZoneTags = new [] { new HostedZoneTagProperty {
Key = "key",
Value = "value"
} },
Name = "name",
QueryLoggingConfig = new QueryLoggingConfigProperty {
CloudWatchLogsLogGroupArn = "cloudWatchLogsLogGroupArn"
},
Vpcs = new [] { new VPCProperty {
VpcId = "vpcId",
VpcRegion = "vpcRegion"
} }
});
Synopsis
Constructors
| CfnHostedZone(Construct, string, ICfnHostedZoneProps?) | Create a new |
Properties
| AttrId | The ID that Amazon Route 53 assigned to the hosted zone when you created it. |
| AttrNameServers | Returns the set of name servers for the specific hosted zone. For example: |
| CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
| CfnProperties | Creates a new public or private hosted zone. |
| HostedZoneConfig | A complex type that contains an optional comment. |
| HostedZoneRef | A reference to a HostedZone resource. |
| HostedZoneTagsRaw | Adds, edits, or deletes tags for a health check or a hosted zone. |
| Name | The name of the domain. |
| QueryLoggingConfig | Creates a configuration for DNS query logging. |
| Tags | Tag Manager which manages the tags for this resource. |
| Vpcs | Private hosted zones: A complex type that contains information about the VPCs that are associated with the specified hosted zone. |
Methods
| ArnForHostedZone(IHostedZoneRef) | Creates a new public or private hosted zone. |
| Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
| IsCfnHostedZone(object) | Checks whether the given object is a CfnHostedZone. |
| RenderProperties(IDictionary<string, object>) | Creates a new public or private hosted zone. |
Constructors
CfnHostedZone(Construct, string, ICfnHostedZoneProps?)
Create a new AWS::Route53::HostedZone.
public CfnHostedZone(Construct scope, string id, ICfnHostedZoneProps? props = null)
Parameters
- scope Construct
Scope in which this resource is defined.
- id string
Construct identifier for this resource (unique in its scope).
- props ICfnHostedZoneProps
Resource properties.
Remarks
You create records in a public hosted zone to define how you want to route traffic on the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a private hosted zone to define how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds (Amazon VPCs).
You can't convert a public hosted zone to a private hosted zone or vice versa. Instead, you must create a new hosted zone with the same name and create new resource record sets.
For more information about charges for hosted zones, see Amazon Route 53 Pricing .
Note the following:
When you submit a CreateHostedZone request, the initial status of the hosted zone is PENDING . For public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the NS and SOA records are available, the status of the zone changes to INSYNC .
The CreateHostedZone request requires the caller to have an ec2:DescribeVpcs permission.
When creating private hosted zones, the Amazon VPC must belong to the same partition where the hosted zone is created. A partition is a group of AWS Regions . Each AWS account is scoped to one partition.
The following are the supported partitions:
For more information, see Access Management in the AWS General Reference .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html
CloudformationResource: AWS::Route53::HostedZone
ExampleMetadata: fixture=_generated
Properties
AttrId
The ID that Amazon Route 53 assigned to the hosted zone when you created it.
public virtual string AttrId { get; }
Property Value
Remarks
CloudformationAttribute: Id
AttrNameServers
Returns the set of name servers for the specific hosted zone. For example: ns1.example.com .
public virtual string[] AttrNameServers { get; }
Property Value
string[]
Remarks
This attribute is not supported for private hosted zones.
CloudformationAttribute: NameServers
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
Remarks
You create records in a public hosted zone to define how you want to route traffic on the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a private hosted zone to define how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds (Amazon VPCs).
You can't convert a public hosted zone to a private hosted zone or vice versa. Instead, you must create a new hosted zone with the same name and create new resource record sets.
For more information about charges for hosted zones, see Amazon Route 53 Pricing .
Note the following:
When you submit a CreateHostedZone request, the initial status of the hosted zone is PENDING . For public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the NS and SOA records are available, the status of the zone changes to INSYNC .
The CreateHostedZone request requires the caller to have an ec2:DescribeVpcs permission.
When creating private hosted zones, the Amazon VPC must belong to the same partition where the hosted zone is created. A partition is a group of AWS Regions . Each AWS account is scoped to one partition.
The following are the supported partitions:
For more information, see Access Management in the AWS General Reference .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html
CloudformationResource: AWS::Route53::HostedZone
ExampleMetadata: fixture=_generated
CfnProperties
Creates a new public or private hosted zone.
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Overrides
Remarks
You create records in a public hosted zone to define how you want to route traffic on the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a private hosted zone to define how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds (Amazon VPCs).
You can't convert a public hosted zone to a private hosted zone or vice versa. Instead, you must create a new hosted zone with the same name and create new resource record sets.
For more information about charges for hosted zones, see Amazon Route 53 Pricing .
Note the following:
When you submit a CreateHostedZone request, the initial status of the hosted zone is PENDING . For public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the NS and SOA records are available, the status of the zone changes to INSYNC .
The CreateHostedZone request requires the caller to have an ec2:DescribeVpcs permission.
When creating private hosted zones, the Amazon VPC must belong to the same partition where the hosted zone is created. A partition is a group of AWS Regions . Each AWS account is scoped to one partition.
The following are the supported partitions:
For more information, see Access Management in the AWS General Reference .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html
CloudformationResource: AWS::Route53::HostedZone
ExampleMetadata: fixture=_generated
HostedZoneConfig
A complex type that contains an optional comment.
public virtual object? HostedZoneConfig { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnHostedZone.IHostedZoneConfigProperty
HostedZoneRef
A reference to a HostedZone resource.
public virtual IHostedZoneReference HostedZoneRef { get; }
Property Value
Remarks
You create records in a public hosted zone to define how you want to route traffic on the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a private hosted zone to define how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds (Amazon VPCs).
You can't convert a public hosted zone to a private hosted zone or vice versa. Instead, you must create a new hosted zone with the same name and create new resource record sets.
For more information about charges for hosted zones, see Amazon Route 53 Pricing .
Note the following:
When you submit a CreateHostedZone request, the initial status of the hosted zone is PENDING . For public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the NS and SOA records are available, the status of the zone changes to INSYNC .
The CreateHostedZone request requires the caller to have an ec2:DescribeVpcs permission.
When creating private hosted zones, the Amazon VPC must belong to the same partition where the hosted zone is created. A partition is a group of AWS Regions . Each AWS account is scoped to one partition.
The following are the supported partitions:
For more information, see Access Management in the AWS General Reference .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html
CloudformationResource: AWS::Route53::HostedZone
ExampleMetadata: fixture=_generated
HostedZoneTagsRaw
Adds, edits, or deletes tags for a health check or a hosted zone.
public virtual CfnHostedZone.IHostedZoneTagProperty[]? HostedZoneTagsRaw { get; set; }
Property Value
Remarks
You create records in a public hosted zone to define how you want to route traffic on the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a private hosted zone to define how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds (Amazon VPCs).
You can't convert a public hosted zone to a private hosted zone or vice versa. Instead, you must create a new hosted zone with the same name and create new resource record sets.
For more information about charges for hosted zones, see Amazon Route 53 Pricing .
Note the following:
When you submit a CreateHostedZone request, the initial status of the hosted zone is PENDING . For public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the NS and SOA records are available, the status of the zone changes to INSYNC .
The CreateHostedZone request requires the caller to have an ec2:DescribeVpcs permission.
When creating private hosted zones, the Amazon VPC must belong to the same partition where the hosted zone is created. A partition is a group of AWS Regions . Each AWS account is scoped to one partition.
The following are the supported partitions:
For more information, see Access Management in the AWS General Reference .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html
CloudformationResource: AWS::Route53::HostedZone
ExampleMetadata: fixture=_generated
Name
The name of the domain.
public virtual string? Name { get; set; }
Property Value
Remarks
You create records in a public hosted zone to define how you want to route traffic on the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a private hosted zone to define how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds (Amazon VPCs).
You can't convert a public hosted zone to a private hosted zone or vice versa. Instead, you must create a new hosted zone with the same name and create new resource record sets.
For more information about charges for hosted zones, see Amazon Route 53 Pricing .
Note the following:
When you submit a CreateHostedZone request, the initial status of the hosted zone is PENDING . For public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the NS and SOA records are available, the status of the zone changes to INSYNC .
The CreateHostedZone request requires the caller to have an ec2:DescribeVpcs permission.
When creating private hosted zones, the Amazon VPC must belong to the same partition where the hosted zone is created. A partition is a group of AWS Regions . Each AWS account is scoped to one partition.
The following are the supported partitions:
For more information, see Access Management in the AWS General Reference .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html
CloudformationResource: AWS::Route53::HostedZone
ExampleMetadata: fixture=_generated
QueryLoggingConfig
Creates a configuration for DNS query logging.
public virtual object? QueryLoggingConfig { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnHostedZone.IQueryLoggingConfigProperty
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
Remarks
You create records in a public hosted zone to define how you want to route traffic on the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a private hosted zone to define how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds (Amazon VPCs).
You can't convert a public hosted zone to a private hosted zone or vice versa. Instead, you must create a new hosted zone with the same name and create new resource record sets.
For more information about charges for hosted zones, see Amazon Route 53 Pricing .
Note the following:
When you submit a CreateHostedZone request, the initial status of the hosted zone is PENDING . For public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the NS and SOA records are available, the status of the zone changes to INSYNC .
The CreateHostedZone request requires the caller to have an ec2:DescribeVpcs permission.
When creating private hosted zones, the Amazon VPC must belong to the same partition where the hosted zone is created. A partition is a group of AWS Regions . Each AWS account is scoped to one partition.
The following are the supported partitions:
For more information, see Access Management in the AWS General Reference .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html
CloudformationResource: AWS::Route53::HostedZone
ExampleMetadata: fixture=_generated
Vpcs
Private hosted zones: A complex type that contains information about the VPCs that are associated with the specified hosted zone.
public virtual object? Vpcs { get; set; }
Property Value
Remarks
Type union: either IResolvable or (either IResolvable or CfnHostedZone.IVPCProperty)[]
Methods
ArnForHostedZone(IHostedZoneRef)
Creates a new public or private hosted zone.
public static string ArnForHostedZone(IHostedZoneRef resource)
Parameters
- resource IHostedZoneRef
Returns
Remarks
You create records in a public hosted zone to define how you want to route traffic on the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a private hosted zone to define how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds (Amazon VPCs).
You can't convert a public hosted zone to a private hosted zone or vice versa. Instead, you must create a new hosted zone with the same name and create new resource record sets.
For more information about charges for hosted zones, see Amazon Route 53 Pricing .
Note the following:
When you submit a CreateHostedZone request, the initial status of the hosted zone is PENDING . For public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the NS and SOA records are available, the status of the zone changes to INSYNC .
The CreateHostedZone request requires the caller to have an ec2:DescribeVpcs permission.
When creating private hosted zones, the Amazon VPC must belong to the same partition where the hosted zone is created. A partition is a group of AWS Regions . Each AWS account is scoped to one partition.
The following are the supported partitions:
For more information, see Access Management in the AWS General Reference .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html
CloudformationResource: AWS::Route53::HostedZone
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Route53;
var cfnHostedZone = new CfnHostedZone(this, "MyCfnHostedZone", new CfnHostedZoneProps {
HostedZoneConfig = new HostedZoneConfigProperty {
Comment = "comment"
},
HostedZoneTags = new [] { new HostedZoneTagProperty {
Key = "key",
Value = "value"
} },
Name = "name",
QueryLoggingConfig = new QueryLoggingConfigProperty {
CloudWatchLogsLogGroupArn = "cloudWatchLogsLogGroupArn"
},
Vpcs = new [] { new VPCProperty {
VpcId = "vpcId",
VpcRegion = "vpcRegion"
} }
});
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
Remarks
You create records in a public hosted zone to define how you want to route traffic on the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a private hosted zone to define how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds (Amazon VPCs).
You can't convert a public hosted zone to a private hosted zone or vice versa. Instead, you must create a new hosted zone with the same name and create new resource record sets.
For more information about charges for hosted zones, see Amazon Route 53 Pricing .
Note the following:
When you submit a CreateHostedZone request, the initial status of the hosted zone is PENDING . For public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the NS and SOA records are available, the status of the zone changes to INSYNC .
The CreateHostedZone request requires the caller to have an ec2:DescribeVpcs permission.
When creating private hosted zones, the Amazon VPC must belong to the same partition where the hosted zone is created. A partition is a group of AWS Regions . Each AWS account is scoped to one partition.
The following are the supported partitions:
For more information, see Access Management in the AWS General Reference .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html
CloudformationResource: AWS::Route53::HostedZone
ExampleMetadata: fixture=_generated
IsCfnHostedZone(object)
Checks whether the given object is a CfnHostedZone.
public static bool IsCfnHostedZone(object x)
Parameters
- x object
Returns
Remarks
You create records in a public hosted zone to define how you want to route traffic on the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a private hosted zone to define how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds (Amazon VPCs).
You can't convert a public hosted zone to a private hosted zone or vice versa. Instead, you must create a new hosted zone with the same name and create new resource record sets.
For more information about charges for hosted zones, see Amazon Route 53 Pricing .
Note the following:
When you submit a CreateHostedZone request, the initial status of the hosted zone is PENDING . For public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the NS and SOA records are available, the status of the zone changes to INSYNC .
The CreateHostedZone request requires the caller to have an ec2:DescribeVpcs permission.
When creating private hosted zones, the Amazon VPC must belong to the same partition where the hosted zone is created. A partition is a group of AWS Regions . Each AWS account is scoped to one partition.
The following are the supported partitions:
For more information, see Access Management in the AWS General Reference .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html
CloudformationResource: AWS::Route53::HostedZone
ExampleMetadata: fixture=_generated
RenderProperties(IDictionary<string, object>)
Creates a new public or private hosted zone.
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
You create records in a public hosted zone to define how you want to route traffic on the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a private hosted zone to define how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds (Amazon VPCs).
You can't convert a public hosted zone to a private hosted zone or vice versa. Instead, you must create a new hosted zone with the same name and create new resource record sets.
For more information about charges for hosted zones, see Amazon Route 53 Pricing .
Note the following:
When you submit a CreateHostedZone request, the initial status of the hosted zone is PENDING . For public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the NS and SOA records are available, the status of the zone changes to INSYNC .
The CreateHostedZone request requires the caller to have an ec2:DescribeVpcs permission.
When creating private hosted zones, the Amazon VPC must belong to the same partition where the hosted zone is created. A partition is a group of AWS Regions . Each AWS account is scoped to one partition.
The following are the supported partitions:
For more information, see Access Management in the AWS General Reference .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-hostedzone.html
CloudformationResource: AWS::Route53::HostedZone
ExampleMetadata: fixture=_generated