Show / Hide Table of Contents

Interface IDomainOptions

Domain name configuration for AppSync.

Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IDomainOptions
Syntax (vb)
Public Interface IDomainOptions
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

Properties

Certificate

The certificate to use with the domain name.

DomainName

The actual domain name.

Properties

Certificate

The certificate to use with the domain name.

ICertificateRef Certificate { get; }
Property Value

ICertificateRef

Remarks

ExampleMetadata: infused

DomainName

The actual domain name.

string DomainName { get; }
Property Value

string

Remarks

For example, api.example.com.

Back to top Generated by DocFX