interface CfnFunctionConfigurationProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.AppSync.CfnFunctionConfigurationProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsappsync#CfnFunctionConfigurationProps |
Java | software.amazon.awscdk.services.appsync.CfnFunctionConfigurationProps |
Python | aws_cdk.aws_appsync.CfnFunctionConfigurationProps |
TypeScript | aws-cdk-lib » aws_appsync » CfnFunctionConfigurationProps |
Properties for defining a CfnFunctionConfiguration.
Example
// 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
| Name | Type | Description |
|---|---|---|
| api | string | The AWS AppSync GraphQL API that you want to attach using this function. |
| data | string | The name of data source this function will attach. |
| name | string | The name of the function. |
| code? | string | The resolver code that contains the request and response functions. |
| code | string | The Amazon S3 endpoint. |
| description? | string | The Function description. |
| function | string | The version of the request mapping template. |
| max | number | The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation. |
| request | string | The Function request mapping template. |
| request | string | Describes a Sync configuration for a resolver. |
| response | string | The Function response mapping template. |
| response | string | The location of a response mapping template in an Amazon S3 bucket. |
| runtime? | IResolvable | App | Describes a runtime used by an AWS AppSync resolver or AWS AppSync function. |
| sync | IResolvable | Sync | Describes a Sync configuration for a resolver. |
apiId
Type:
string
The AWS AppSync GraphQL API that you want to attach using this function.
dataSourceName
Type:
string
The name of data source this function will attach.
name
Type:
string
The name of the function.
code?
Type:
string
(optional)
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 .
codeS3Location?
Type:
string
(optional)
The Amazon S3 endpoint.
description?
Type:
string
(optional)
The Function description.
functionVersion?
Type:
string
(optional)
The version of the request mapping template.
Currently, only the 2018-05-29 version of the template is supported.
maxBatchSize?
Type:
number
(optional)
The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.
requestMappingTemplate?
Type:
string
(optional)
The Function request mapping template.
Functions support only the 2018-05-29 version of the request mapping template.
requestMappingTemplateS3Location?
Type:
string
(optional)
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.
responseMappingTemplate?
Type:
string
(optional)
The Function response mapping template.
responseMappingTemplateS3Location?
Type:
string
(optional)
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.
runtime?
Type:
IResolvable | App
(optional)
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.
syncConfig?
Type:
IResolvable | Sync
(optional)
Describes a Sync configuration for a resolver.
Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.

.NET
Go
Java
Python
TypeScript