Class CnameRecordProps
Construction properties for a CnameRecord.
Inheritance
System.Object
CnameRecordProps
Namespace: Amazon.CDK.AWS.Route53
Assembly: Amazon.CDK.AWS.Route53.dll
Syntax (csharp)
public class CnameRecordProps : Object, ICnameRecordProps, IRecordSetOptions
Syntax (vb)
Public Class CnameRecordProps
Inherits Object
Implements ICnameRecordProps, IRecordSetOptions
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 api = new GraphqlApi(this, "api", new GraphqlApiProps {
Name = "myApi",
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 = myDomainName
});
Synopsis
Constructors
CnameRecordProps() |
Properties
Comment | A comment to add on the record. |
DomainName | The domain name. |
RecordName | The domain name for this record. |
Ttl | The resource record cache time to live (TTL). |
Zone | The hosted zone in which to define the new record. |
Constructors
CnameRecordProps()
public CnameRecordProps()
Properties
Comment
A comment to add on the record.
public string Comment { get; set; }
Property Value
System.String
Remarks
Default: no comment
DomainName
The domain name.
public string DomainName { get; set; }
Property Value
System.String
RecordName
The domain name for this record.
public string RecordName { get; set; }
Property Value
System.String
Remarks
Default: zone root
Ttl
The resource record cache time to live (TTL).
public Duration Ttl { get; set; }
Property Value
Remarks
Default: Duration.minutes(30)
Zone
The hosted zone in which to define the new record.
public IHostedZone Zone { get; set; }
Property Value