{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-personalize/json-schema/amazon-personalize-create-solution-request-schema.json",
  "title": "CreateSolutionRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-personalize-solution-api-openapi.yml#/components/schemas/CreateSolutionRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name for the solution."
    },
    "performHPO": {
      "type": "boolean",
      "description": "Whether to perform hyperparameter optimization (HPO) on the specified or selected recipe. The default is false. When performing AutoML, this parameter is always true and you should not set it to false."
    },
    "performAutoML": {
      "type": "boolean",
      "description": "We don't recommend enabling automated machine learning. Instead, match your use case to the available Amazon Personalize recipes. For more information, see Choosing a recipe. Whether to perform automated machine learning (AutoML). The default is false. For this case, you must specify recipeArn. When set to true, Amazon Personalize analyzes your training data and selects the optimal USER_PERSONALIZATION recipe and hyperparameters. In this case, you must omit recipeArn. Amazon Personalize determines the optimal recipe by running tests with different values for the hyperparameters. AutoML lengthe"
    },
    "performAutoTraining": {
      "type": "boolean",
      "description": "Whether the solution uses automatic training to create new solution versions (trained models). The default is True and the solution automatically creates new solution versions every 7 days. You can change the training frequency by specifying a schedulingExpression in the AutoTrainingConfig as part of solution configuration. For more information about automatic training, see Configuring automatic training. Automatic solution version creation starts within one hour after the solution is ACTIVE. If you manually create a solution version within the hour, the solution skips the first automatic trai"
    },
    "performIncrementalUpdate": {
      "type": "boolean",
      "description": "Whether to perform incremental training updates on your model. When enabled, this allows the model to learn from new data more frequently without requiring full retraining, which enables near real-time personalization. This parameter is supported only for solutions that use the semantic-similarity recipe."
    },
    "recipeArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the recipe to use for model training. This is required when performAutoML is false. For information about different Amazon Personalize recipes and their ARNs, see Choosing a recipe."
    },
    "datasetGroupArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the dataset group that provides the training data."
    },
    "eventType": {
      "type": "string",
      "description": "When your have multiple event types (using an EVENT_TYPE schema field), this parameter specifies which event type (for example, 'click' or 'like') is used for training the model. If you do not provide an eventType, Amazon Personalize will use all interactions for training with equal weight regardless of type."
    },
    "solutionConfig": {
      "$ref": "#/$defs/SolutionConfig"
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "A list of tags to apply to the solution."
    }
  },
  "required": [
    "name",
    "datasetGroupArn"
  ],
  "$defs": {
    "AutoMLConfig": {
      "type": "object",
      "properties": {
        "metricName": {
          "type": "string",
          "description": "The metric to optimize."
        },
        "recipeList": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of candidate recipes."
        }
      }
    },
    "AutoTrainingConfig": {
      "type": "object",
      "properties": {
        "schedulingExpression": {
          "type": "string",
          "description": "Specifies how often to automatically train new solution versions. Specify a rate expression in rate(value unit) format. For value, specify a number between 1 and 30. For unit, specify day or days. For example, to automatically create a new solution version every 5 days, specify rate(5 days). The default is every 7 days. For more information about auto training, see Creating and configuring a solution."
        }
      }
    },
    "CategoricalHyperParameterRange": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the hyperparameter."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of the categories for the hyperparameter."
        }
      }
    },
    "ContinuousHyperParameterRange": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the hyperparameter."
        },
        "minValue": {
          "type": "number",
          "description": "The minimum allowable value for the hyperparameter."
        },
        "maxValue": {
          "type": "number",
          "description": "The maximum allowable value for the hyperparameter."
        }
      }
    },
    "EventParameters": {
      "type": "object",
      "properties": {
        "eventType": {
          "type": "string",
          "description": "The name of the event type to be considered for solution creation."
        },
        "eventValueThreshold": {
          "type": "number",
          "description": "The threshold of the event type. Only events with a value greater or equal to this threshold will be considered for solution creation."
        },
        "weight": {
          "type": "number",
          "description": "The weight of the event type. A higher weight means higher importance of the event type for the created solution."
        }
      }
    },
    "EventsConfig": {
      "type": "object",
      "properties": {
        "eventParametersList": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EventParameters"
          },
          "description": "A list of event parameters, which includes event types and their event value thresholds and weights."
        }
      }
    },
    "HPOConfig": {
      "type": "object",
      "properties": {
        "hpoObjective": {
          "$ref": "#/$defs/HPOObjective"
        },
        "hpoResourceConfig": {
          "$ref": "#/$defs/HPOResourceConfig"
        },
        "algorithmHyperParameterRanges": {
          "$ref": "#/$defs/HyperParameterRanges"
        }
      }
    },
    "HPOObjective": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of the metric. Valid values are Maximize and Minimize."
        },
        "metricName": {
          "type": "string",
          "description": "The name of the metric."
        },
        "metricRegex": {
          "type": "string",
          "description": "A regular expression for finding the metric in the training job logs."
        }
      }
    },
    "HPOResourceConfig": {
      "type": "object",
      "properties": {
        "maxNumberOfTrainingJobs": {
          "type": "string",
          "description": "The maximum number of training jobs when you create a solution version. The maximum value for maxNumberOfTrainingJobs is 40."
        },
        "maxParallelTrainingJobs": {
          "type": "string",
          "description": "The maximum number of parallel training jobs when you create a solution version. The maximum value for maxParallelTrainingJobs is 10."
        }
      }
    },
    "HyperParameterRanges": {
      "type": "object",
      "properties": {
        "integerHyperParameterRanges": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IntegerHyperParameterRange"
          },
          "description": "The integer-valued hyperparameters and their ranges."
        },
        "continuousHyperParameterRanges": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ContinuousHyperParameterRange"
          },
          "description": "The continuous hyperparameters and their ranges."
        },
        "categoricalHyperParameterRanges": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CategoricalHyperParameterRange"
          },
          "description": "The categorical hyperparameters and their ranges."
        }
      }
    },
    "IntegerHyperParameterRange": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the hyperparameter."
        },
        "minValue": {
          "type": "integer",
          "description": "The minimum allowable value for the hyperparameter."
        },
        "maxValue": {
          "type": "integer",
          "description": "The maximum allowable value for the hyperparameter."
        }
      }
    },
    "OptimizationObjective": {
      "type": "object",
      "properties": {
        "itemAttribute": {
          "type": "string",
          "description": "The numerical metadata column in an Items dataset related to the optimization objective. For example, VIDEO_LENGTH (to maximize streaming minutes), or PRICE (to maximize revenue)."
        },
        "objectiveSensitivity": {
          "type": "string",
          "enum": [
            "LOW",
            "MEDIUM",
            "HIGH",
            "OFF"
          ],
          "description": "Specifies how Amazon Personalize balances the importance of your optimization objective versus relevance."
        }
      }
    },
    "SolutionConfig": {
      "type": "object",
      "properties": {
        "eventValueThreshold": {
          "type": "string",
          "description": "Only events with a value greater than or equal to this threshold are used for training a model."
        },
        "hpoConfig": {
          "$ref": "#/$defs/HPOConfig"
        },
        "algorithmHyperParameters": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Lists the algorithm hyperparameters and their values."
        },
        "featureTransformationParameters": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Lists the feature transformation parameters."
        },
        "autoMLConfig": {
          "$ref": "#/$defs/AutoMLConfig"
        },
        "eventsConfig": {
          "$ref": "#/$defs/EventsConfig"
        },
        "optimizationObjective": {
          "$ref": "#/$defs/OptimizationObjective"
        },
        "trainingDataConfig": {
          "$ref": "#/$defs/TrainingDataConfig"
        },
        "autoTrainingConfig": {
          "$ref": "#/$defs/AutoTrainingConfig"
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "tagKey": {
          "type": "string",
          "description": "One part of a key-value pair that makes up a tag. A key is a general label that acts like a category for more specific tag values."
        },
        "tagValue": {
          "type": "string",
          "description": "The optional part of a key-value pair that makes up a tag. A value acts as a descriptor within a tag category (key)."
        }
      },
      "required": [
        "tagKey",
        "tagValue"
      ]
    },
    "TrainingDataConfig": {
      "type": "object",
      "properties": {
        "excludedDatasetColumns": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": "Specifies the columns to exclude from training. Each key is a dataset type, and each value is a list of columns. Exclude columns to control what data Amazon Personalize uses to generate recommendations. For example, you might have a column that you want to use only to filter recommendations. You can exclude this column from training and Amazon Personalize considers it only when filtering."
        },
        "includedDatasetColumns": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": "A map that specifies which columns to include from each dataset during training. The map can contain up to 3 entries, where each key is a dataset name (maximum length of 256 characters, must contain only letters and underscores) and each value is an array of up to 50 column names. Column names can be up to 150 characters long, must start with a letter or underscore, and can contain only letters, numbers, and underscores."
        }
      }
    }
  }
}