Amazon Forecast
Developer Guide

This is prerelease documentation for a service in preview release. It is subject to change.

RetrainPredictor

Retrains the predictor, which is identified by an Amazon Resource Name (ARN), and returns a new version ID. RetrainPredictor ignores the retraining schedule configured for the predictor, if there is one, and starts retraining immediately. While the predictor is being retrained, you can check its status with the DescribePredictor operation. You must wait until retraining has completed to use the predictor.

Request Syntax

{ "PredictorName": "string" }

Request Parameters

The request accepts the following data in JSON format.

PredictorName

The name of the predictor to retrain.

Type: String

Length Constraints: Maximum length of 256.

Pattern: ^[a-zA-Z0-9\_]+$

Required: Yes

Response Syntax

{ "PredictorArn": "string", "PredictorName": "string", "VersionId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

PredictorArn

The Amazon Resource Name (ARN) of the predictor.

Type: String

Length Constraints: Maximum length of 256.

Pattern: ^[a-zA-Z0-9\-\_\.\/\:]+$

PredictorName

The name of the retrained predictor.

Type: String

Length Constraints: Maximum length of 256.

Pattern: ^[a-zA-Z0-9\_]+$

VersionId

The new version ID of the predictor.

Type: String

Length Constraints: Maximum length of 256.

Pattern: ^[a-zA-Z0-9\_]+$

Errors

InternalServiceException

Request processing has failed due to some unknown error, exception, or failure.

HTTP Status Code: 400

InvalidInputException

We can't process the request because it includes an invalid value or a value that exceeds the valid range.

HTTP Status Code: 400

InvalidStateException

Processing has reached an invalid state. Amazon Forecast returns this exception when an operation attempts to perform an action on a resource that is changing.

HTTP Status Code: 400

QuotaLimitExceededException

You have exceeded the quota limits for resources that are long-running jobs, such as import jobs, create predictors, and forecasts. You might also be creating too many resources concurrently, in which case, you might wait for resources to be created and try again.

HTTP Status Code: 400

ResourceAlreadyExistsException

There is already a resource with this name and characteristics. Try again with different settings.

HTTP Status Code: 400

ResourceNotFoundException

We can't find a resource with that name. Check the name and try again.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: