aws-cdk-lib.aws_appsync.CfnFunctionConfigurationProps

interface CfnFunctionConfigurationProps

LanguageType name
.NETAmazon.CDK.AWS.AppSync.CfnFunctionConfigurationProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappsync#CfnFunctionConfigurationProps
Javasoftware.amazon.awscdk.services.appsync.CfnFunctionConfigurationProps
Pythonaws_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

NameTypeDescription
apiIdstringThe AWS AppSync GraphQL API that you want to attach using this function.
dataSourceNamestringThe name of data source this function will attach.
namestringThe name of the function.
code?stringThe resolver code that contains the request and response functions.
codeS3Location?stringThe Amazon S3 endpoint.
description?stringThe Function description.
functionVersion?stringThe version of the request mapping template.
maxBatchSize?numberThe maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.
requestMappingTemplate?stringThe Function request mapping template.
requestMappingTemplateS3Location?stringDescribes a Sync configuration for a resolver.
responseMappingTemplate?stringThe Function response mapping template.
responseMappingTemplateS3Location?stringThe location of a response mapping template in an Amazon S3 bucket.
runtime?IResolvable | AppSyncRuntimePropertyDescribes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.
syncConfig?IResolvable | SyncConfigPropertyDescribes 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 | AppSyncRuntimeProperty (optional)

Describes a runtime used by an AWS AppSync pipeline 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 | SyncConfigProperty (optional)

Describes a Sync configuration for a resolver.

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