ListModelPackages
Lists the model packages that have been created.
Request Syntax
{
"CreationTimeAfter": number
,
"CreationTimeBefore": number
,
"MaxResults": number
,
"ModelApprovalStatus": "string
",
"ModelPackageGroupName": "string
",
"ModelPackageType": "string
",
"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 model packages created after the specified time (timestamp).
Type: Timestamp
Required: No
- CreationTimeBefore
-
A filter that returns only model packages created before the specified time (timestamp).
Type: Timestamp
Required: No
- MaxResults
-
The maximum number of model packages to return in the response.
Type: Integer
Valid Range: Minimum value of 1. Maximum value of 100.
Required: No
- ModelApprovalStatus
-
A filter that returns only the model packages with the specified approval status.
Type: String
Valid Values:
Approved | Rejected | PendingManualApproval
Required: No
- ModelPackageGroupName
-
A filter that returns only model versions that belong to the specified model group.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 170.
Pattern:
(arn:aws[a-z\-]*:sagemaker:[a-z0-9\-]*:[0-9]{12}:[a-z\-]*\/)?([a-zA-Z0-9]([a-zA-Z0-9-]){0,62})(?<!-)$
Required: No
- ModelPackageType
-
A filter that returns only the model packages of the specified type. This can be one of the following values.
-
UNVERSIONED
- List only unversioined models. This is the default value if noModelPackageType
is specified. -
VERSIONED
- List only versioned models. -
BOTH
- List both versioned and unversioned models.
Type: String
Valid Values:
Versioned | Unversioned | Both
Required: No
-
- NameContains
-
A string in the model package name. This filter returns only model packages 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
ListModelPackages
request was truncated, the response includes aNextToken
. To retrieve the next set of model packages, use the token in the next request.Type: String
Length Constraints: Maximum length of 8192.
Pattern:
.*
Required: No
- SortBy
-
The parameter by which to sort the results. The default is
CreationTime
.Type: String
Valid Values:
Name | CreationTime
Required: No
- SortOrder
-
The sort order for the results. The default is
Ascending
.Type: String
Valid Values:
Ascending | Descending
Required: No
Response Syntax
{
"ModelPackageSummaryList": [
{
"CreationTime": number,
"ModelApprovalStatus": "string",
"ModelPackageArn": "string",
"ModelPackageDescription": "string",
"ModelPackageGroupName": "string",
"ModelPackageName": "string",
"ModelPackageStatus": "string",
"ModelPackageVersion": number
}
],
"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.
- ModelPackageSummaryList
-
An array of
ModelPackageSummary
objects, each of which lists a model package.Type: Array of ModelPackageSummary objects
- NextToken
-
If the response is truncated, SageMaker returns this token. To retrieve the next set of model packages, 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 AWS SDKs, see the following: