Show / Hide Table of Contents

Class HostedZoneProviderProps

Zone properties for looking up the Hosted Zone.

Inheritance
object
HostedZoneProviderProps
Implements
IHostedZoneProviderProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.Route53
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class HostedZoneProviderProps : IHostedZoneProviderProps
Syntax (vb)
Public Class HostedZoneProviderProps Implements 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, new Dictionary<string, boolean?> {
                    { "evaluateTargetHealth", true }
                }))
            });

Synopsis

Constructors

HostedZoneProviderProps()

Zone properties for looking up the Hosted Zone.

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.

Constructors

HostedZoneProviderProps()

Zone properties for looking up the Hosted Zone.

public HostedZoneProviderProps()
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, new Dictionary<string, boolean?> {
                    { "evaluateTargetHealth", true }
                }))
            });

Properties

DomainName

The zone domain e.g. example.com.

public string DomainName { get; set; }
Property Value

string

Remarks

ExampleMetadata: infused

PrivateZone

Whether the zone that is being looked up is a private hosted zone.

public bool? PrivateZone { get; set; }
Property Value

bool?

Remarks

Default: false

VpcId

Specifies the ID of the VPC associated with a private hosted zone.

public string? VpcId { get; set; }
Property Value

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

Implements

IHostedZoneProviderProps
Back to top Generated by DocFX