- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
CreateSolutionVersionCommand
Trains or retrains an active solution in a Custom dataset group. A solution is created using the CreateSolution operation and must be in the ACTIVE state before calling CreateSolutionVersion
. A new version of the solution is created every time you call this operation.
Status
A solution version can be in one of the following states:
-
CREATE PENDING
-
CREATE IN_PROGRESS
-
ACTIVE
-
CREATE FAILED
-
CREATE STOPPING
-
CREATE STOPPED
To get the status of the version, call DescribeSolutionVersion . Wait until the status shows as ACTIVE before calling CreateCampaign
.
If the status shows as CREATE FAILED, the response includes a failureReason
key, which describes why the job failed.
Related APIs
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { PersonalizeClient, CreateSolutionVersionCommand } from "@aws-sdk/client-personalize"; // ES Modules import
// const { PersonalizeClient, CreateSolutionVersionCommand } = require("@aws-sdk/client-personalize"); // CommonJS import
const client = new PersonalizeClient(config);
const input = { // CreateSolutionVersionRequest
name: "STRING_VALUE",
solutionArn: "STRING_VALUE", // required
trainingMode: "FULL" || "UPDATE" || "AUTOTRAIN",
tags: [ // Tags
{ // Tag
tagKey: "STRING_VALUE", // required
tagValue: "STRING_VALUE", // required
},
],
};
const command = new CreateSolutionVersionCommand(input);
const response = await client.send(command);
// { // CreateSolutionVersionResponse
// solutionVersionArn: "STRING_VALUE",
// };
CreateSolutionVersionCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
solutionArn Required | string | undefined | The Amazon Resource Name (ARN) of the solution containing the training configuration information. |
name | string | undefined | The name of the solution version. |
tags | Tag[] | undefined | A list of tags to apply to the solution version. |
trainingMode | TrainingMode | undefined | The scope of training to be performed when creating the solution version. The default is If you use User-Personalization , you can specify a training mode of The |
CreateSolutionVersionCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
solutionVersionArn | string | undefined | The ARN of the new solution version. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidInputException | client | Provide a valid value for the field or parameter. |
LimitExceededException | client | The limit on the number of requests per second has been exceeded. |
ResourceAlreadyExistsException | client | The specified resource already exists. |
ResourceInUseException | client | The specified resource is in use. |
ResourceNotFoundException | client | Could not find the specified resource. |
TooManyTagsException | client | You have exceeded the maximum number of tags you can apply to this resource. |
PersonalizeServiceException | Base exception class for all service exceptions from Personalize service. |