aws-cdk-lib.aws_appsync.AppsyncFunctionProps

interface AppsyncFunctionProps

LanguageType name
.NETAmazon.CDK.AWS.AppSync.AppsyncFunctionProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappsync#AppsyncFunctionProps
Javasoftware.amazon.awscdk.services.appsync.AppsyncFunctionProps
Pythonaws_cdk.aws_appsync.AppsyncFunctionProps
TypeScript (source)aws-cdk-lib » aws_appsync » AppsyncFunctionProps

the CDK properties for AppSync Functions.

Example

declare const api: appsync.GraphqlApi;

const appsyncFunction = new appsync.AppsyncFunction(this, 'function', {
  name: 'appsync_function',
  api,
  dataSource: api.addNoneDataSource('none'),
  requestMappingTemplate: appsync.MappingTemplate.fromFile('request.vtl'),
  responseMappingTemplate: appsync.MappingTemplate.fromFile('response.vtl'),
});

Properties

NameTypeDescription
apiIGraphqlApithe GraphQL Api linked to this AppSync Function.
dataSourceBaseDataSourcethe data source linked to this AppSync Function.
namestringthe name of the AppSync Function.
code?CodeThe function code.
description?stringthe description for this AppSync Function.
requestMappingTemplate?MappingTemplatethe request mapping template for the AppSync Function.
responseMappingTemplate?MappingTemplatethe response mapping template for the AppSync Function.
runtime?FunctionRuntimeThe functions runtime.

api

Type: IGraphqlApi

the GraphQL Api linked to this AppSync Function.


dataSource

Type: BaseDataSource

the data source linked to this AppSync Function.


name

Type: string

the name of the AppSync Function.


code?

Type: Code (optional, default: no code is used)

The function code.


description?

Type: string (optional, default: no description)

the description for this AppSync Function.


requestMappingTemplate?

Type: MappingTemplate (optional, default: no request mapping template)

the request mapping template for the AppSync Function.


responseMappingTemplate?

Type: MappingTemplate (optional, default: no response mapping template)

the response mapping template for the AppSync Function.


runtime?

Type: FunctionRuntime (optional, default: no function runtime, VTL mapping templates used)

The functions runtime.