Class CnameRecord
A DNS CNAME record.
Inherited Members
Namespace: Amazon.CDK.AWS.Route53
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CnameRecord : RecordSet, IRecordSet, IResource
Syntax (vb)
Public Class CnameRecord
Inherits RecordSet
Implements IRecordSet, IResource
Remarks
Resource: AWS::Route53::RecordSet
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
CnameRecord(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CnameRecord(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CnameRecord(Construct, String, ICnameRecordProps) |
Constructors
CnameRecord(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CnameRecord(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CnameRecord(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CnameRecord(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CnameRecord(Construct, String, ICnameRecordProps)
public CnameRecord(Construct scope, string id, ICnameRecordProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props ICnameRecordProps
Implements
Constructs.IConstruct
Constructs.IDependable