# CfnSolutionProps

Properties for defining a `CfnSolution`.

Used as props by: [CfnSolution](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_personalize.CfnSolution.html)

- Source: Generated at build time
- Type last changed: v2.268.0 · 2 Sep 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_personalize as personalize } from 'aws-cdk-lib';

declare const autoMlConfig: any;
declare const hpoConfig: any;
const cfnSolutionProps: personalize.CfnSolutionProps = {
  datasetGroupArn: 'datasetGroupArn',
  name: 'name',

  // the properties below are optional
  eventType: 'eventType',
  performAutoMl: false,
  performHpo: false,
  recipeArn: 'recipeArn',
  solutionConfig: {
    algorithmHyperParameters: {
      algorithmHyperParametersKey: 'algorithmHyperParameters',
    },
    autoMlConfig: autoMlConfig,
    eventValueThreshold: 'eventValueThreshold',
    featureTransformationParameters: {
      featureTransformationParametersKey: 'featureTransformationParameters',
    },
    hpoConfig: hpoConfig,
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

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

# auto_ml_config: Any
# hpo_config: Any

cfn_solution_props = personalize.CfnSolutionProps(
    dataset_group_arn="datasetGroupArn",
    name="name",

    # the properties below are optional
    event_type="eventType",
    perform_auto_ml=False,
    perform_hpo=False,
    recipe_arn="recipeArn",
    solution_config=personalize.CfnSolution.SolutionConfigProperty(
        algorithm_hyper_parameters={
            "algorithm_hyper_parameters_key": "algorithmHyperParameters"
        },
        auto_ml_config=auto_ml_config,
        event_value_threshold="eventValueThreshold",
        feature_transformation_parameters={
            "feature_transformation_parameters_key": "featureTransformationParameters"
        },
        hpo_config=hpo_config
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

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

Object autoMlConfig;
Object hpoConfig;

CfnSolutionProps cfnSolutionProps = CfnSolutionProps.builder()
        .datasetGroupArn("datasetGroupArn")
        .name("name")

        // the properties below are optional
        .eventType("eventType")
        .performAutoMl(false)
        .performHpo(false)
        .recipeArn("recipeArn")
        .solutionConfig(SolutionConfigProperty.builder()
                .algorithmHyperParameters(Map.of(
                        "algorithmHyperParametersKey", "algorithmHyperParameters"))
                .autoMlConfig(autoMlConfig)
                .eventValueThreshold("eventValueThreshold")
                .featureTransformationParameters(Map.of(
                        "featureTransformationParametersKey", "featureTransformationParameters"))
                .hpoConfig(hpoConfig)
                .build())
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .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.Personalize;

var autoMlConfig;
var hpoConfig;

var cfnSolutionProps = new CfnSolutionProps {
    DatasetGroupArn = "datasetGroupArn",
    Name = "name",

    // the properties below are optional
    EventType = "eventType",
    PerformAutoMl = false,
    PerformHpo = false,
    RecipeArn = "recipeArn",
    SolutionConfig = new SolutionConfigProperty {
        AlgorithmHyperParameters = new Dictionary<string, string> {
            { "algorithmHyperParametersKey", "algorithmHyperParameters" }
        },
        AutoMlConfig = autoMlConfig,
        EventValueThreshold = "eventValueThreshold",
        FeatureTransformationParameters = new Dictionary<string, string> {
            { "featureTransformationParametersKey", "featureTransformationParameters" }
        },
        HpoConfig = hpoConfig
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

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"

var autoMlConfig interface{}
var hpoConfig interface{}

cfnSolutionProps := &CfnSolutionProps{
	DatasetGroupArn: jsii.String("datasetGroupArn"),
	Name: jsii.String("name"),

	// the properties below are optional
	EventType: jsii.String("eventType"),
	PerformAutoMl: jsii.Boolean(false),
	PerformHpo: jsii.Boolean(false),
	RecipeArn: jsii.String("recipeArn"),
	SolutionConfig: &SolutionConfigProperty{
		AlgorithmHyperParameters: map[string]*string{
			"algorithmHyperParametersKey": jsii.String("algorithmHyperParameters"),
		},
		AutoMlConfig: autoMlConfig,
		EventValueThreshold: jsii.String("eventValueThreshold"),
		FeatureTransformationParameters: map[string]*string{
			"featureTransformationParametersKey": jsii.String("featureTransformationParameters"),
		},
		HpoConfig: hpoConfig,
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `datasetGroupArn`: string (required) — The Amazon Resource Name (ARN) of the dataset group that provides the training data.

- `eventType`: string — The event type (for example, 'click' or 'like') that is used for training the model.

  If no `eventType` is provided, Amazon Personalize uses all interactions for training with equal weight regardless of type.

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

- `performAutoMl`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — > We don't recommend enabling automated machine learning.

  Instead, match your use case to the available Amazon Personalize recipes. For more information, see [Determining your use case.](https://docs.aws.amazon.com/personalize/latest/dg/determining-use-case.html)

  When true, Amazon Personalize performs a search for the best USER_PERSONALIZATION recipe from the list specified in the solution configuration ( `recipeArn` must not be specified). When false (the default), Amazon Personalize uses `recipeArn` for training.

- `performHpo`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether to perform hyperparameter optimization (HPO) on the chosen recipe.

  The default is `false` .

- `recipeArn`: string — The ARN of the recipe used to create the solution.

  This is required when `performAutoML` is false.

- `solutionConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnSolution.SolutionConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_personalize.CfnSolution.SolutionConfigProperty.html) — Describes the configuration properties for the solution.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — The tags used to organize, track, or control access for this resource.
