list_model_packages

SageMaker.Client.list_model_packages(**kwargs)

Lists the model packages that have been created.

See also: AWS API Documentation

Request Syntax

response = client.list_model_packages(
    CreationTimeAfter=datetime(2015, 1, 1),
    CreationTimeBefore=datetime(2015, 1, 1),
    MaxResults=123,
    NameContains='string',
    ModelApprovalStatus='Approved'|'Rejected'|'PendingManualApproval',
    ModelPackageGroupName='string',
    ModelPackageType='Versioned'|'Unversioned'|'Both',
    NextToken='string',
    SortBy='Name'|'CreationTime',
    SortOrder='Ascending'|'Descending'
)
Parameters
  • CreationTimeAfter (datetime) -- A filter that returns only model packages created after the specified time (timestamp).
  • CreationTimeBefore (datetime) -- A filter that returns only model packages created before the specified time (timestamp).
  • MaxResults (integer) -- The maximum number of model packages to return in the response.
  • NameContains (string) -- A string in the model package name. This filter returns only model packages whose name contains the specified string.
  • ModelApprovalStatus (string) -- A filter that returns only the model packages with the specified approval status.
  • ModelPackageGroupName (string) -- A filter that returns only model versions that belong to the specified model group.
  • ModelPackageType (string) --

    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 no ModelPackageType is specified.
    • VERSIONED - List only versioned models.
    • BOTH - List both versioned and unversioned models.
  • NextToken (string) -- If the response to a previous ListModelPackages request was truncated, the response includes a NextToken . To retrieve the next set of model packages, use the token in the next request.
  • SortBy (string) -- The parameter by which to sort the results. The default is CreationTime .
  • SortOrder (string) -- The sort order for the results. The default is Ascending .
Return type

dict

Returns

Response Syntax

{
    'ModelPackageSummaryList': [
        {
            'ModelPackageName': 'string',
            'ModelPackageGroupName': 'string',
            'ModelPackageVersion': 123,
            'ModelPackageArn': 'string',
            'ModelPackageDescription': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'ModelPackageStatus': 'Pending'|'InProgress'|'Completed'|'Failed'|'Deleting',
            'ModelApprovalStatus': 'Approved'|'Rejected'|'PendingManualApproval'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ModelPackageSummaryList (list) --

      An array of ModelPackageSummary objects, each of which lists a model package.

      • (dict) --

        Provides summary information about a model package.

        • ModelPackageName (string) --

          The name of the model package.

        • ModelPackageGroupName (string) --

          If the model package is a versioned model, the model group that the versioned model belongs to.

        • ModelPackageVersion (integer) --

          If the model package is a versioned model, the version of the model.

        • ModelPackageArn (string) --

          The Amazon Resource Name (ARN) of the model package.

        • ModelPackageDescription (string) --

          A brief description of the model package.

        • CreationTime (datetime) --

          A timestamp that shows when the model package was created.

        • ModelPackageStatus (string) --

          The overall status of the model package.

        • ModelApprovalStatus (string) --

          The approval status of the model. This can be one of the following values.

          • APPROVED - The model is approved
          • REJECTED - The model is rejected.
          • PENDING_MANUAL_APPROVAL - The model is waiting for manual approval.
    • NextToken (string) --

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