Skip to content
v2.274.0

CfnFunctionConfigurationProps Struct ​

Properties for defining a CfnFunctionConfiguration.

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 cfnFunctionConfigurationProps: appsync.CfnFunctionConfigurationProps = {
  apiId: 'apiId',
  dataSourceName: 'dataSourceName',
  name: 'name',

  // the properties below are optional
  code: 'code',
  codeS3Location: 'codeS3Location',
  description: 'description',
  functionVersion: 'functionVersion',
  maxBatchSize: 123,
  requestMappingTemplate: 'requestMappingTemplate',
  requestMappingTemplateS3Location: 'requestMappingTemplateS3Location',
  responseMappingTemplate: 'responseMappingTemplate',
  responseMappingTemplateS3Location: 'responseMappingTemplateS3Location',
  runtime: {
    name: 'name',
    runtimeVersion: 'runtimeVersion',
  },
  syncConfig: {
    conflictDetection: 'conflictDetection',

    // the properties below are optional
    conflictHandler: 'conflictHandler',
    lambdaConflictHandlerConfig: {
      lambdaConflictHandlerArn: 'lambdaConflictHandlerArn',
    },
  },
};

Properties ​

apiIdstringapi_idstrapiIdStringApiIdstringApiId*stringrequired#
The AWS AppSync GraphQL API that you want to attach using this function.
codeoptionalstringcodeoptionalstrcodeoptionalStringCodeoptionalstringCodeoptional*string#
The `resolver` code that contains the request and response functions.

When code is used, the runtime is required. The runtime value must be APPSYNC_JS .

codeS3Locationoptionalstringcode_s3_locationoptionalstrcodeS3LocationoptionalStringCodeS3LocationoptionalstringCodeS3Locationoptional*string#
The Amazon S3 endpoint.
dataSourceNamestringdata_source_namestrdataSourceNameStringDataSourceNamestringDataSourceName*stringrequired#
The name of data source this function will attach.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
The `Function` description.
functionVersionoptionalstringfunction_versionoptionalstrfunctionVersionoptionalStringFunctionVersionoptionalstringFunctionVersionoptional*string#
The version of the request mapping template.

Currently, only the 2018-05-29 version of the template is supported.

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.
namestringnamestrnameStringNamestringName*stringrequired#
The name of the function.
requestMappingTemplateoptionalstringrequest_mapping_templateoptionalstrrequestMappingTemplateoptionalStringRequestMappingTemplateoptionalstringRequestMappingTemplateoptional*string#
The `Function` request mapping template.

Functions support only the 2018-05-29 version of the request mapping template.

requestMappingTemplateS3Locationoptionalstringrequest_mapping_template_s3_locationoptionalstrrequestMappingTemplateS3LocationoptionalStringRequestMappingTemplateS3LocationoptionalstringRequestMappingTemplateS3Locationoptional*string#
Describes a Sync configuration for a resolver.

Contains information on which Conflict Detection, as well as Resolution strategy, should be performed when the resolver is invoked.

responseMappingTemplateoptionalstringresponse_mapping_templateoptionalstrresponseMappingTemplateoptionalStringResponseMappingTemplateoptionalstringResponseMappingTemplateoptional*string#
The `Function` response mapping template.
responseMappingTemplateS3Locationoptionalstringresponse_mapping_template_s3_locationoptionalstrresponseMappingTemplateS3LocationoptionalStringResponseMappingTemplateS3LocationoptionalstringResponseMappingTemplateS3Locationoptional*string#
The location of a response mapping template in an Amazon S3 bucket.

Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.

runtimeoptionalIResolvable | CfnFunctionConfiguration.AppSyncRuntimePropertyruntimeoptionaltyping.Union[IResolvable, AppSyncRuntimeProperty]runtimeoptionalIResolvableRuntimeoptionalIResolvableRuntimeoptionalinterface{}#
Describes a runtime used by an AWS AppSync resolver or AWS AppSync function.

Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.

syncConfigoptionalIResolvable | CfnFunctionConfiguration.SyncConfigPropertysync_configoptionaltyping.Union[IResolvable, SyncConfigProperty]syncConfigoptionalIResolvableSyncConfigoptionalIResolvableSyncConfigoptionalinterface{}#
Describes a Sync configuration for a resolver.

Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.