Skip to content
v2.278.0

CfnGraphQLSchemaProps Struct ​

Properties for defining a CfnGraphQLSchema.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';
const cfnGraphQLSchemaProps: appsync.CfnGraphQLSchemaProps = {
  apiId: 'apiId',

  // the properties below are optional
  definition: 'definition',
  definitionS3Location: 'definitionS3Location',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

cfn_graph_ql_schema_props = appsync.CfnGraphQLSchemaProps(
    api_id="apiId",

    # the properties below are optional
    definition="definition",
    definition_s3_location="definitionS3Location"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appsync.*;

CfnGraphQLSchemaProps cfnGraphQLSchemaProps = CfnGraphQLSchemaProps.builder()
        .apiId("apiId")

        // the properties below are optional
        .definition("definition")
        .definitionS3Location("definitionS3Location")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;

var cfnGraphQLSchemaProps = new CfnGraphQLSchemaProps {
    ApiId = "apiId",

    // the properties below are optional
    Definition = "definition",
    DefinitionS3Location = "definitionS3Location"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnGraphQLSchemaProps := &CfnGraphQLSchemaProps{
	ApiId: jsii.String("apiId"),

	// the properties below are optional
	Definition: jsii.String("definition"),
	DefinitionS3Location: jsii.String("definitionS3Location"),
}

Properties ​

apiIdstringapi_idstrapiIdStringApiIdstringApiId*string required #
The AWS AppSync GraphQL API identifier to which you want to apply this schema.
definitionoptionalstringdefinitionoptionalstrdefinitionoptionalStringDefinitionoptionalstringDefinitionoptional*string #
The text representation of a GraphQL schema in SDL format.

For more information about using the Ref function, see Ref .

definitionS3Locationoptionalstringdefinition_s3_locationoptionalstrdefinitionS3LocationoptionalStringDefinitionS3LocationoptionalstringDefinitionS3Locationoptional*string #
The location of a GraphQL schema file in an Amazon S3 bucket.

Use this if you want to provision with the schema living in Amazon S3 rather than embedding it in your CloudFormation template.