package awsappsync // The options for configuring a schema from an existing file. // // Example: // import acm "github.com/aws/aws-cdk-go/awscdk" // import "github.com/aws/aws-cdk-go/awscdk" // // // hosted zone and route53 features // var hostedZoneId string // zoneName := "example.com" // // // myDomainName := "api.example.com" // certificate := acm.NewCertificate(this, jsii.String("cert"), &CertificateProps{ // DomainName: myDomainName, // }) // schema := appsync.NewSchemaFile(&SchemaProps{ // FilePath: jsii.String("mySchemaFile"), // }) // api := appsync.NewGraphqlApi(this, jsii.String("api"), &GraphqlApiProps{ // Name: jsii.String("myApi"), // Schema: Schema, // DomainName: &DomainOptions{ // Certificate: *Certificate, // DomainName: myDomainName, // }, // }) // // // hosted zone for adding appsync domain // zone := route53.HostedZone_FromHostedZoneAttributes(this, jsii.String("HostedZone"), &HostedZoneAttributes{ // HostedZoneId: jsii.String(HostedZoneId), // ZoneName: jsii.String(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 // route53.NewCnameRecord(this, jsii.String("CnameApiRecord"), &CnameRecordProps{ // RecordName: jsii.String("api"), // Zone: Zone, // DomainName: api.appSyncDomainName, // }) // type SchemaProps struct { // The file path for the schema. // // When this option is // configured, then the schema will be generated from an // existing file from disk. FilePath *string `field:"required" json:"filePath" yaml:"filePath"` }