Interface IHostedZoneProviderProps
Zone properties for looking up the Hosted Zone.
Namespace: Amazon.CDK.AWS.Route53
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IHostedZoneProviderProps
Syntax (vb)
Public Interface IHostedZoneProviderProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.S3;
var recordName = "www";
var domainName = "example.com";
var bucketWebsite = new Bucket(this, "BucketWebsite", new BucketProps {
BucketName = new [] { recordName, domainName }.Join("."), // www.example.com
PublicReadAccess = true,
WebsiteIndexDocument = "index.html"
});
var zone = HostedZone.FromLookup(this, "Zone", new HostedZoneProviderProps { DomainName = domainName }); // example.com
// example.com
new ARecord(this, "AliasRecord", new ARecordProps {
Zone = zone,
RecordName = recordName, // www
Target = RecordTarget.FromAlias(new BucketWebsiteTarget(bucketWebsite))
});
Synopsis
Properties
DomainName | The zone domain e.g. example.com. |
PrivateZone | Whether the zone that is being looked up is a private hosted zone. |
VpcId | Specifies the ID of the VPC associated with a private hosted zone. |
Properties
DomainName
The zone domain e.g. example.com.
string DomainName { get; }
Property Value
System.String
PrivateZone
Whether the zone that is being looked up is a private hosted zone.
virtual Nullable<bool> PrivateZone { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
VpcId
Specifies the ID of the VPC associated with a private hosted zone.
virtual string VpcId { get; }
Property Value
System.String
Remarks
If a VPC ID is provided and privateZone is false, no results will be returned and an error will be raised
Default: - No VPC ID