Class DomainOptions
(experimental) Domain name configuration for AppSync.
Inheritance
System.Object
DomainOptions
Implements
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.AWS.AppSync.dll
Syntax (csharp)
public class DomainOptions : Object, IDomainOptions
Syntax (vb)
Public Class DomainOptions
Inherits Object
Implements IDomainOptions
Remarks
Stability: Experimental
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
DomainOptions() |
Properties
Certificate | (experimental) The certificate to use with the domain name. |
DomainName | (experimental) The actual domain name. |
Constructors
DomainOptions()
public DomainOptions()
Properties
Certificate
(experimental) The certificate to use with the domain name.
public ICertificate Certificate { get; set; }
Property Value
Remarks
Stability: Experimental
DomainName
(experimental) The actual domain name.
public string DomainName { get; set; }
Property Value
System.String
Remarks
For example, api.example.com
.
Stability: Experimental