- 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.
UpdateSolutionCommand
Updates an Amazon Personalize solution to use a different automatic training configuration. When you update a solution, you can change whether the solution uses automatic training, and you can change the training frequency. For more information about updating a solution, see Updating a solution .
A solution update can be in one of the following states:
CREATE PENDING CREATE IN_PROGRESS ACTIVE -or- CREATE FAILED
To get the status of a solution update, call the DescribeSolution API operation and find the status in the latestSolutionUpdate
.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { PersonalizeClient, UpdateSolutionCommand } from "@aws-sdk/client-personalize"; // ES Modules import
// const { PersonalizeClient, UpdateSolutionCommand } = require("@aws-sdk/client-personalize"); // CommonJS import
const client = new PersonalizeClient(config);
const input = { // UpdateSolutionRequest
solutionArn: "STRING_VALUE", // required
performAutoTraining: true || false,
solutionUpdateConfig: { // SolutionUpdateConfig
autoTrainingConfig: { // AutoTrainingConfig
schedulingExpression: "STRING_VALUE",
},
},
};
const command = new UpdateSolutionCommand(input);
const response = await client.send(command);
// { // UpdateSolutionResponse
// solutionArn: "STRING_VALUE",
// };
UpdateSolutionCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
solutionArn Required | string | undefined | The Amazon Resource Name (ARN) of the solution to update. |
performAutoTraining | boolean | undefined | Whether the solution uses automatic training to create new solution versions (trained models). You can change the training frequency by specifying a If you turn on automatic training, the first automatic training starts within one hour after the solution update completes. If you manually create a solution version within the hour, the solution skips the first automatic training. For more information about automatic training, see Configuring automatic training . After training starts, you can get the solution version's Amazon Resource Name (ARN) with the ListSolutionVersions API operation. To get its status, use the DescribeSolutionVersion . |
solutionUpdateConfig | SolutionUpdateConfig | undefined | The new configuration details of the solution. |
UpdateSolutionCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
solutionArn | string | undefined | The same solution Amazon Resource Name (ARN) as given in the request. |
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. |
ResourceInUseException | client | The specified resource is in use. |
ResourceNotFoundException | client | Could not find the specified resource. |
PersonalizeServiceException | Base exception class for all service exceptions from Personalize service. |