Show / Hide Table of Contents

Class HostedZoneAttributes

Reference to a hosted zone.

Inheritance
object
HostedZoneAttributes
Implements
IHostedZoneAttributes
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 HostedZoneAttributes : IHostedZoneAttributes
Syntax (vb)
Public Class HostedZoneAttributes Implements IHostedZoneAttributes
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.CertificateManager;
            using Amazon.CDK.AWS.Route53;

            // hosted zone and route53 features
            string hostedZoneId;
            var zoneName = "example.com";


            var myDomainName = "api.example.com";
            var certificate = new Certificate(this, "cert", new CertificateProps { DomainName = myDomainName });
            var schema = new SchemaFile(new SchemaProps { FilePath = "mySchemaFile" });
            var api = new GraphqlApi(this, "api", new GraphqlApiProps {
                Name = "myApi",
                Definition = Definition.FromSchema(schema),
                DomainName = new DomainOptions {
                    Certificate = certificate,
                    DomainName = myDomainName
                }
            });

            // hosted zone for adding appsync domain
            var zone = HostedZone.FromHostedZoneAttributes(this, "HostedZone", new HostedZoneAttributes {
                HostedZoneId = hostedZoneId,
                ZoneName = zoneName
            });

            // create a cname to the appsync domain. will map to something like xxxx.cloudfront.net
            // create a cname to the appsync domain. will map to something like xxxx.cloudfront.net
            new CnameRecord(this, "CnameApiRecord", new CnameRecordProps {
                RecordName = "api",
                Zone = zone,
                DomainName = api.AppSyncDomainName
            });

Synopsis

Constructors

HostedZoneAttributes()

Reference to a hosted zone.

Properties

HostedZoneId

Identifier of the hosted zone.

ZoneName

Name of the hosted zone.

Constructors

HostedZoneAttributes()

Reference to a hosted zone.

public HostedZoneAttributes()
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.CertificateManager;
            using Amazon.CDK.AWS.Route53;

            // hosted zone and route53 features
            string hostedZoneId;
            var zoneName = "example.com";


            var myDomainName = "api.example.com";
            var certificate = new Certificate(this, "cert", new CertificateProps { DomainName = myDomainName });
            var schema = new SchemaFile(new SchemaProps { FilePath = "mySchemaFile" });
            var api = new GraphqlApi(this, "api", new GraphqlApiProps {
                Name = "myApi",
                Definition = Definition.FromSchema(schema),
                DomainName = new DomainOptions {
                    Certificate = certificate,
                    DomainName = myDomainName
                }
            });

            // hosted zone for adding appsync domain
            var zone = HostedZone.FromHostedZoneAttributes(this, "HostedZone", new HostedZoneAttributes {
                HostedZoneId = hostedZoneId,
                ZoneName = zoneName
            });

            // create a cname to the appsync domain. will map to something like xxxx.cloudfront.net
            // create a cname to the appsync domain. will map to something like xxxx.cloudfront.net
            new CnameRecord(this, "CnameApiRecord", new CnameRecordProps {
                RecordName = "api",
                Zone = zone,
                DomainName = api.AppSyncDomainName
            });

Properties

HostedZoneId

Identifier of the hosted zone.

public string HostedZoneId { get; set; }
Property Value

string

Remarks

ExampleMetadata: infused

ZoneName

Name of the hosted zone.

public string ZoneName { get; set; }
Property Value

string

Remarks

ExampleMetadata: infused

Implements

IHostedZoneAttributes
Back to top Generated by DocFX