Class CfnSolution
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,ISolutionRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
By default, all new solutions use automatic training.
With automatic training, you incur training costs while your solution is active. To avoid unnecessary costs, when you are finished you can update the solution to turn off automatic training. 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceSpecifies the hyperparameters and their ranges.static interfaceWhen the solution performs AutoML (performAutoMLis true in CreateSolution ), Amazon Personalize determines which recipe, from the specified list, optimizes the given metric.static final classA fluent builder forCfnSolution.static interfaceProvides the name and range of a categorical hyperparameter.static interfaceProvides the name and range of a continuous hyperparameter.static interfaceDescribes the properties for hyperparameter optimization (HPO).static interfaceThe metric to optimize during hyperparameter optimization (HPO).static interfaceDescribes the resource configuration for hyperparameter optimization (HPO).static interfaceProvides the name and range of an integer-valued hyperparameter.static interfaceDescribes the configuration properties for the solution.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.personalize.ISolutionRef
ISolutionRef.Jsii$Default, ISolutionRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnSolution(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnSolution(software.amazon.jsii.JsiiObjectRef objRef) CfnSolution(software.constructs.Construct scope, String id, CfnSolutionProps props) Create a newAWS::Personalize::Solution. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForSolution(ISolutionRef resource) The Amazon Resource Name (ARN) of the solution.The Amazon Resource Name (ARN) of the dataset group that provides the training data.The event type (for example, 'click' or 'like') that is used for training the model.getName()The name of the solution.Whether to perform hyperparameter optimization (HPO) on the chosen recipe.The ARN of the recipe used to create the solution.Describes the configuration properties for the solution.A reference to a Solution resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDatasetGroupArn(String value) The Amazon Resource Name (ARN) of the dataset group that provides the training data.voidsetEventType(String value) The event type (for example, 'click' or 'like') that is used for training the model.voidThe name of the solution.voidsetPerformAutoMl(Boolean value) voidsetPerformAutoMl(IResolvable value) voidsetPerformHpo(Boolean value) Whether to perform hyperparameter optimization (HPO) on the chosen recipe.voidsetPerformHpo(IResolvable value) Whether to perform hyperparameter optimization (HPO) on the chosen recipe.voidsetRecipeArn(String value) The ARN of the recipe used to create the solution.voidsetSolutionConfig(IResolvable value) Describes the configuration properties for the solution.voidDescribes the configuration properties for the solution.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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) Create a newAWS::Personalize::Solution.- 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
-
arnForSolution
- Parameters:
resource- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrSolutionArn
The Amazon Resource Name (ARN) of the solution. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getSolutionRef
A reference to a Solution resource.- Specified by:
getSolutionRefin interfaceISolutionRef
-
getDatasetGroupArn
The Amazon Resource Name (ARN) of the dataset group that provides the training data. -
setDatasetGroupArn
The Amazon Resource Name (ARN) of the dataset group that provides the training data. -
getName
The name of the solution. -
setName
The name of the solution. -
getEventType
The event type (for example, 'click' or 'like') that is used for training the model. -
setEventType
The event type (for example, 'click' or 'like') that is used for training the model. -
getPerformAutoMl
We don't recommend enabling automated machine learning.
Returns union: either
BooleanorIResolvable -
setPerformAutoMl
We don't recommend enabling automated machine learning.
-
setPerformAutoMl
We don't recommend enabling automated machine learning.
-
getPerformHpo
Whether to perform hyperparameter optimization (HPO) on the chosen recipe.Returns union: either
BooleanorIResolvable -
setPerformHpo
Whether to perform hyperparameter optimization (HPO) on the chosen recipe. -
setPerformHpo
Whether to perform hyperparameter optimization (HPO) on the chosen recipe. -
getRecipeArn
The ARN of the recipe used to create the solution. -
setRecipeArn
The ARN of the recipe used to create the solution. -
getSolutionConfig
Describes the configuration properties for the solution.Returns union: either
IResolvableorCfnSolution.SolutionConfigProperty -
setSolutionConfig
Describes the configuration properties for the solution. -
setSolutionConfig
@Stability(Stable) public void setSolutionConfig(@Nullable CfnSolution.SolutionConfigProperty value) Describes the configuration properties for the solution.
-