# CfnFunctionConfigurationProps

Properties for defining a `CfnFunctionConfiguration`.

Used as props by: [CfnFunctionConfiguration](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnFunctionConfiguration.html)

- Source: Generated at build time
- Type last changed: v2.234.0 · 8 Jan 2026

## Example

TypeScript:

```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',
    },
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

cfn_function_configuration_props = appsync.CfnFunctionConfigurationProps(
    api_id="apiId",
    data_source_name="dataSourceName",
    name="name",

    # the properties below are optional
    code="code",
    code_s3_location="codeS3Location",
    description="description",
    function_version="functionVersion",
    max_batch_size=123,
    request_mapping_template="requestMappingTemplate",
    request_mapping_template_s3_location="requestMappingTemplateS3Location",
    response_mapping_template="responseMappingTemplate",
    response_mapping_template_s3_location="responseMappingTemplateS3Location",
    runtime=appsync.CfnFunctionConfiguration.AppSyncRuntimeProperty(
        name="name",
        runtime_version="runtimeVersion"
    ),
    sync_config=appsync.CfnFunctionConfiguration.SyncConfigProperty(
        conflict_detection="conflictDetection",

        # the properties below are optional
        conflict_handler="conflictHandler",
        lambda_conflict_handler_config=appsync.CfnFunctionConfiguration.LambdaConflictHandlerConfigProperty(
            lambda_conflict_handler_arn="lambdaConflictHandlerArn"
        )
    )
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appsync.*;

CfnFunctionConfigurationProps cfnFunctionConfigurationProps = CfnFunctionConfigurationProps.builder()
        .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(AppSyncRuntimeProperty.builder()
                .name("name")
                .runtimeVersion("runtimeVersion")
                .build())
        .syncConfig(SyncConfigProperty.builder()
                .conflictDetection("conflictDetection")

                // the properties below are optional
                .conflictHandler("conflictHandler")
                .lambdaConflictHandlerConfig(LambdaConflictHandlerConfigProperty.builder()
                        .lambdaConflictHandlerArn("lambdaConflictHandlerArn")
                        .build())
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;

var cfnFunctionConfigurationProps = new 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 = new AppSyncRuntimeProperty {
        Name = "name",
        RuntimeVersion = "runtimeVersion"
    },
    SyncConfig = new SyncConfigProperty {
        ConflictDetection = "conflictDetection",

        // the properties below are optional
        ConflictHandler = "conflictHandler",
        LambdaConflictHandlerConfig = new LambdaConflictHandlerConfigProperty {
            LambdaConflictHandlerArn = "lambdaConflictHandlerArn"
        }
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnFunctionConfigurationProps := &CfnFunctionConfigurationProps{
	ApiId: jsii.String("apiId"),
	DataSourceName: jsii.String("dataSourceName"),
	Name: jsii.String("name"),

	// the properties below are optional
	Code: jsii.String("code"),
	CodeS3Location: jsii.String("codeS3Location"),
	Description: jsii.String("description"),
	FunctionVersion: jsii.String("functionVersion"),
	MaxBatchSize: jsii.Number(123),
	RequestMappingTemplate: jsii.String("requestMappingTemplate"),
	RequestMappingTemplateS3Location: jsii.String("requestMappingTemplateS3Location"),
	ResponseMappingTemplate: jsii.String("responseMappingTemplate"),
	ResponseMappingTemplateS3Location: jsii.String("responseMappingTemplateS3Location"),
	Runtime: &AppSyncRuntimeProperty{
		Name: jsii.String("name"),
		RuntimeVersion: jsii.String("runtimeVersion"),
	},
	SyncConfig: &SyncConfigProperty{
		ConflictDetection: jsii.String("conflictDetection"),

		// the properties below are optional
		ConflictHandler: jsii.String("conflictHandler"),
		LambdaConflictHandlerConfig: &LambdaConflictHandlerConfigProperty{
			LambdaConflictHandlerArn: jsii.String("lambdaConflictHandlerArn"),
		},
	},
}
```

## Properties

- `apiId`: string (required) — The AWS AppSync GraphQL API that you want to attach using this function.

- `code`: 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` .

- `codeS3Location`: string — The Amazon S3 endpoint.

- `dataSourceName`: string (required) — The name of data source this function will attach.

- `description`: string — The `Function` description.

- `functionVersion`: string — The version of the request mapping template.

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

- `maxBatchSize`: number — The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a `BatchInvoke` operation.

- `name`: string (required) — The name of the function.

- `requestMappingTemplate`: string — The `Function` request mapping template.

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

- `requestMappingTemplateS3Location`: 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.

- `responseMappingTemplate`: string — The `Function` response mapping template.

- `responseMappingTemplateS3Location`: 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.

- `runtime`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunctionConfiguration.AppSyncRuntimeProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnFunctionConfiguration.AppSyncRuntimeProperty.html) — 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`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunctionConfiguration.SyncConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnFunctionConfiguration.SyncConfigProperty.html) — Describes a Sync configuration for a resolver.

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