Skip to content
v2.274.0

BaseAppsyncFunctionProps Struct ​

the base properties for AppSync Functions.

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';

declare const code: appsync.Code;
declare const functionRuntime: appsync.FunctionRuntime;
declare const mappingTemplate: appsync.MappingTemplate;
const baseAppsyncFunctionProps: appsync.BaseAppsyncFunctionProps = {
  name: 'name',

  // the properties below are optional
  code: code,
  description: 'description',
  maxBatchSize: 123,
  requestMappingTemplate: mappingTemplate,
  responseMappingTemplate: mappingTemplate,
  runtime: functionRuntime,
};

Properties ​

codeoptionalCodecodeoptionalCodecodeoptionalCodeCodeoptionalCodeCodeoptionalCode#
The function code.

Default: no code is used

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
the description for this AppSync Function.

Default: no description

maxBatchSizeoptionalnumbermax_batch_sizeoptionalint | floatmaxBatchSizeoptionalNumberMaxBatchSizeoptionaldoubleMaxBatchSizeoptional*float64#
The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.

Default: No max batch size

Can only be set when using LambdaDataSource.

namestringnamestrnameStringNamestringName*stringrequired#
the name of the AppSync Function.
requestMappingTemplateoptionalMappingTemplaterequest_mapping_templateoptionalMappingTemplaterequestMappingTemplateoptionalMappingTemplateRequestMappingTemplateoptionalMappingTemplateRequestMappingTemplateoptionalMappingTemplate#
the request mapping template for the AppSync Function.

Default: no request mapping template

responseMappingTemplateoptionalMappingTemplateresponse_mapping_templateoptionalMappingTemplateresponseMappingTemplateoptionalMappingTemplateResponseMappingTemplateoptionalMappingTemplateResponseMappingTemplateoptionalMappingTemplate#
the response mapping template for the AppSync Function.

Default: no response mapping template

runtimeoptionalFunctionRuntimeruntimeoptionalFunctionRuntimeruntimeoptionalFunctionRuntimeRuntimeoptionalFunctionRuntimeRuntimeoptionalFunctionRuntime#
The functions runtime.

Default: no function runtime, VTL mapping templates used