ListModels - Amazon SageMaker
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

ListModels

Lists models created with the CreateModel API.

Request Syntax

{ "CreationTimeAfter": number, "CreationTimeBefore": number, "MaxResults": number, "NameContains": "string", "NextToken": "string", "SortBy": "string", "SortOrder": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

CreationTimeAfter

A filter that returns only models with a creation time greater than or equal to the specified time (timestamp).

Type: Timestamp

Required: No

CreationTimeBefore

A filter that returns only models created before the specified time (timestamp).

Type: Timestamp

Required: No

MaxResults

The maximum number of models to return in the response.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 100.

Required: No

NameContains

A string in the model name. This filter returns only models whose name contains the specified string.

Type: String

Length Constraints: Maximum length of 63.

Pattern: [a-zA-Z0-9-]+

Required: No

NextToken

If the response to a previous ListModels request was truncated, the response includes a NextToken. To retrieve the next set of models, use the token in the next request.

Type: String

Length Constraints: Maximum length of 8192.

Pattern: .*

Required: No

SortBy

Sorts the list of results. The default is CreationTime.

Type: String

Valid Values: Name | CreationTime

Required: No

SortOrder

The sort order for results. The default is Descending.

Type: String

Valid Values: Ascending | Descending

Required: No

Response Syntax

{ "Models": [ { "CreationTime": number, "ModelArn": "string", "ModelName": "string" } ], "NextToken": "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.

Models

An array of ModelSummary objects, each of which lists a model.

Type: Array of ModelSummary objects

NextToken

If the response is truncated, SageMaker returns this token. To retrieve the next set of models, use it in the subsequent request.

Type: String

Length Constraints: Maximum length of 8192.

Pattern: .*

Errors

For information about the errors that are common to all actions, see Common Errors.

See Also

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