list_image_versions

list_image_versions(**kwargs)

Lists the versions of a specified image and their properties. The list can be filtered by creation time or modified time.

See also: AWS API Documentation

Request Syntax

response = client.list_image_versions(
    CreationTimeAfter=datetime(2015, 1, 1),
    CreationTimeBefore=datetime(2015, 1, 1),
    ImageName='string',
    LastModifiedTimeAfter=datetime(2015, 1, 1),
    LastModifiedTimeBefore=datetime(2015, 1, 1),
    MaxResults=123,
    NextToken='string',
    SortBy='CREATION_TIME'|'LAST_MODIFIED_TIME'|'VERSION',
    SortOrder='ASCENDING'|'DESCENDING'
)
Parameters
  • CreationTimeAfter (datetime) -- A filter that returns only versions created on or after the specified time.
  • CreationTimeBefore (datetime) -- A filter that returns only versions created on or before the specified time.
  • ImageName (string) --

    [REQUIRED]

    The name of the image to list the versions of.

  • LastModifiedTimeAfter (datetime) -- A filter that returns only versions modified on or after the specified time.
  • LastModifiedTimeBefore (datetime) -- A filter that returns only versions modified on or before the specified time.
  • MaxResults (integer) -- The maximum number of versions to return in the response. The default value is 10.
  • NextToken (string) -- If the previous call to ListImageVersions didn't return the full set of versions, the call returns a token for getting the next set of versions.
  • SortBy (string) -- The property used to sort results. The default value is CREATION_TIME .
  • SortOrder (string) -- The sort order. The default value is DESCENDING .
Return type

dict

Returns

Response Syntax

{
    'ImageVersions': [
        {
            'CreationTime': datetime(2015, 1, 1),
            'FailureReason': 'string',
            'ImageArn': 'string',
            'ImageVersionArn': 'string',
            'ImageVersionStatus': 'CREATING'|'CREATED'|'CREATE_FAILED'|'DELETING'|'DELETE_FAILED',
            'LastModifiedTime': datetime(2015, 1, 1),
            'Version': 123
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ImageVersions (list) --

      A list of versions and their properties.

      • (dict) --

        A version of a SageMaker Image . A version represents an existing container image.

        • CreationTime (datetime) --

          When the version was created.

        • FailureReason (string) --

          When a create or delete operation fails, the reason for the failure.

        • ImageArn (string) --

          The ARN of the image the version is based on.

        • ImageVersionArn (string) --

          The ARN of the version.

        • ImageVersionStatus (string) --

          The status of the version.

        • LastModifiedTime (datetime) --

          When the version was last modified.

        • Version (integer) --

          The version number.

    • NextToken (string) --

      A token for getting the next set of versions, if there are any.

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound