Interface SchemaProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
SchemaProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-10-14T12:28:05.334Z")
@Stability(Stable)
public interface SchemaProps
extends software.amazon.jsii.JsiiSerializable
The options for configuring a schema from an existing file.
Example:
import software.amazon.awscdk.services.certificatemanager.*;
import software.amazon.awscdk.services.route53.*;
// hosted zone and route53 features
String hostedZoneId;
String zoneName = "example.com";
String myDomainName = "api.example.com";
Certificate certificate = Certificate.Builder.create(this, "cert").domainName(myDomainName).build();
SchemaFile schema = SchemaFile.Builder.create().filePath("mySchemaFile").build();
GraphqlApi api = GraphqlApi.Builder.create(this, "api")
.name("myApi")
.definition(Definition.fromSchema(schema))
.domainName(DomainOptions.builder()
.certificate(certificate)
.domainName(myDomainName)
.build())
.build();
// hosted zone for adding appsync domain
IHostedZone zone = HostedZone.fromHostedZoneAttributes(this, "HostedZone", HostedZoneAttributes.builder()
.hostedZoneId(hostedZoneId)
.zoneName(zoneName)
.build());
// 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
CnameRecord.Builder.create(this, "CnameApiRecord")
.recordName("api")
.zone(zone)
.domainName(api.getAppSyncDomainName())
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forSchemaPropsstatic final classAn implementation forSchemaProps -
Method Summary
Modifier and TypeMethodDescriptionstatic SchemaProps.Builderbuilder()The file path for the schema.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getFilePath
The file path for the schema.When this option is configured, then the schema will be generated from an existing file from disk.
-
builder
- Returns:
- a
SchemaProps.BuilderofSchemaProps
-