# SyncConfigProperty

Describes a Sync configuration for a resolver.

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

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## 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 syncConfigProperty: appsync.CfnFunctionConfiguration.SyncConfigProperty = {
  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

sync_config_property = 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.*;

SyncConfigProperty syncConfigProperty = SyncConfigProperty.builder()
        .conflictDetection("conflictDetection")

        // the properties below are optional
        .conflictHandler("conflictHandler")
        .lambdaConflictHandlerConfig(LambdaConflictHandlerConfigProperty.builder()
                .lambdaConflictHandlerArn("lambdaConflictHandlerArn")
                .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 syncConfigProperty = 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"

syncConfigProperty := &SyncConfigProperty{
	ConflictDetection: jsii.String("conflictDetection"),

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

## Properties

- `conflictDetection`: string (required) — The Conflict Detection strategy to use.

  - *VERSION* : Detect conflicts based on object versions for this resolver.
  - *NONE* : Do not detect conflicts when invoking this resolver.

- `conflictHandler`: string — The Conflict Resolution strategy to perform in the event of a conflict.

  - *OPTIMISTIC_CONCURRENCY* : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
  - *AUTOMERGE* : Resolve conflicts with the Automerge conflict resolution strategy.
  - *LAMBDA* : Resolve conflicts with an AWS Lambda function supplied in the `LambdaConflictHandlerConfig` .

- `lambdaConflictHandlerConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunctionConfiguration.LambdaConflictHandlerConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnFunctionConfiguration.LambdaConflictHandlerConfigProperty.html) — The `LambdaConflictHandlerConfig` when configuring `LAMBDA` as the Conflict Handler.
