Show / Hide Table of Contents

Class SchemaProps

The options for configuring a schema from an existing file.

Inheritance
object
SchemaProps
Implements
ISchemaProps
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.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SchemaProps : ISchemaProps
Syntax (vb)
Public Class SchemaProps Implements ISchemaProps
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

SchemaProps()

The options for configuring a schema from an existing file.

Properties

FilePath

The file path for the schema.

Constructors

SchemaProps()

The options for configuring a schema from an existing file.

public SchemaProps()
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

FilePath

The file path for the schema.

public string FilePath { get; set; }
Property Value

string

Remarks

When this option is configured, then the schema will be generated from an existing file from disk.

Implements

ISchemaProps
Back to top Generated by DocFX