# DataSharingPreferenceProperty

Allows you to opt in or opt out to share data with Rekognition to improve model performance.

You can choose this option at the account level or on a per-stream basis. Note that if you opt out at the account level, this setting is ignored on individual streams. For more information, see [StreamProcessorDataSharingPreference](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StreamProcessorDataSharingPreference) .

- 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_rekognition as rekognition } from 'aws-cdk-lib';
const dataSharingPreferenceProperty: rekognition.CfnStreamProcessor.DataSharingPreferenceProperty = {
  optIn: false,
};
```

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_rekognition as rekognition

data_sharing_preference_property = rekognition.CfnStreamProcessor.DataSharingPreferenceProperty(
    opt_in=False
)
```

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.rekognition.*;

DataSharingPreferenceProperty dataSharingPreferenceProperty = DataSharingPreferenceProperty.builder()
        .optIn(false)
        .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.Rekognition;

var dataSharingPreferenceProperty = new DataSharingPreferenceProperty {
    OptIn = false
};
```

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"

dataSharingPreferenceProperty := &DataSharingPreferenceProperty{
	OptIn: jsii.Boolean(false),
}
```

## Properties

- `optIn`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) (required) — Describes the opt-in status applied to a stream processor's data sharing policy.
