Class CfnSolution

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-22T22:42:54.972Z") @Stability(Stable) public class CfnSolution extends CfnResource implements IInspectable

After you create a solution, you can’t change its configuration.

By default, all new solutions use automatic training. With automatic training, you incur training costs while your solution is active. You can't stop automatic training for a solution. To avoid unnecessary costs, make sure to delete the solution when you are finished. For information about training costs, see Amazon Personalize pricing .

An object that provides information about a solution. A solution includes the custom recipe, customized parameters, and trained models (Solution Versions) that Amazon Personalize uses to generate recommendations.

After you create a solution, you can’t change its configuration. If you need to make changes, you can clone the solution with the Amazon Personalize console or create a new one.

Example:

 // 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;
 CfnSolution cfnSolution = CfnSolution.Builder.create(this, "MyCfnSolution")
         .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())
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnSolution

      protected CfnSolution(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnSolution

      protected CfnSolution(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnSolution

      @Stability(Stable) public CfnSolution(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnSolutionProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrSolutionArn

      @Stability(Stable) @NotNull public String getAttrSolutionArn()
      The Amazon Resource Name (ARN) of the solution.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getDatasetGroupArn

      @Stability(Stable) @NotNull public String getDatasetGroupArn()
      The Amazon Resource Name (ARN) of the dataset group that provides the training data.
    • setDatasetGroupArn

      @Stability(Stable) public void setDatasetGroupArn(@NotNull String value)
      The Amazon Resource Name (ARN) of the dataset group that provides the training data.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the solution.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the solution.
    • getEventType

      @Stability(Stable) @Nullable public String getEventType()
      The event type (for example, 'click' or 'like') that is used for training the model.
    • setEventType

      @Stability(Stable) public void setEventType(@Nullable String value)
      The event type (for example, 'click' or 'like') that is used for training the model.
    • getPerformAutoMl

      @Stability(Stable) @Nullable public Object getPerformAutoMl()

      We don't recommend enabling automated machine learning.

    • setPerformAutoMl

      @Stability(Stable) public void setPerformAutoMl(@Nullable Boolean value)

      We don't recommend enabling automated machine learning.

    • setPerformAutoMl

      @Stability(Stable) public void setPerformAutoMl(@Nullable IResolvable value)

      We don't recommend enabling automated machine learning.

    • getPerformHpo

      @Stability(Stable) @Nullable public Object getPerformHpo()
      Whether to perform hyperparameter optimization (HPO) on the chosen recipe.
    • setPerformHpo

      @Stability(Stable) public void setPerformHpo(@Nullable Boolean value)
      Whether to perform hyperparameter optimization (HPO) on the chosen recipe.
    • setPerformHpo

      @Stability(Stable) public void setPerformHpo(@Nullable IResolvable value)
      Whether to perform hyperparameter optimization (HPO) on the chosen recipe.
    • getRecipeArn

      @Stability(Stable) @Nullable public String getRecipeArn()
      The ARN of the recipe used to create the solution.
    • setRecipeArn

      @Stability(Stable) public void setRecipeArn(@Nullable String value)
      The ARN of the recipe used to create the solution.
    • getSolutionConfig

      @Stability(Stable) @Nullable public Object getSolutionConfig()
      Describes the configuration properties for the solution.
    • setSolutionConfig

      @Stability(Stable) public void setSolutionConfig(@Nullable IResolvable value)
      Describes the configuration properties for the solution.
    • setSolutionConfig

      @Stability(Stable) public void setSolutionConfig(@Nullable CfnSolution.SolutionConfigProperty value)
      Describes the configuration properties for the solution.