:doc:`SageMaker <../../sagemaker>` / Paginator / ListModelPackages

*****************
ListModelPackages
*****************



.. py:class:: SageMaker.Paginator.ListModelPackages

  ::

    
    paginator = client.get_paginator('list_model_packages')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`SageMaker.Client.list_model_packages`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModelPackages>`_    


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          CreationTimeAfter=datetime(2015, 1, 1),
          CreationTimeBefore=datetime(2015, 1, 1),
          NameContains='string',
          ModelApprovalStatus='Approved'|'Rejected'|'PendingManualApproval',
          ModelPackageGroupName='string',
          ModelPackageType='Versioned'|'Unversioned'|'Both',
          SortBy='Name'|'CreationTime',
          SortOrder='Ascending'|'Descending',
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type CreationTimeAfter: datetime
    :param CreationTimeAfter: 

      A filter that returns only model packages created after the specified time (timestamp).

      

    
    :type CreationTimeBefore: datetime
    :param CreationTimeBefore: 

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

      

    
    :type NameContains: string
    :param NameContains: 

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

      

    
    :type ModelApprovalStatus: string
    :param ModelApprovalStatus: 

      A filter that returns only the model packages with the specified approval status.

      

    
    :type ModelPackageGroupName: string
    :param ModelPackageGroupName: 

      A filter that returns only model versions that belong to the specified model group.

      

    
    :type ModelPackageType: string
    :param 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 no ``ModelPackageType`` is specified.
       
      * ``VERSIONED`` - List only versioned models.
       
      * ``BOTH`` - List both versioned and unversioned models.
      

      

    
    :type SortBy: string
    :param SortBy: 

      The parameter by which to sort the results. The default is ``CreationTime``.

      

    
    :type SortOrder: string
    :param SortOrder: 

      The sort order for the results. The default is ``Ascending``.

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

      
    
    
    :rtype: 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',
                    'ModelLifeCycle': {
                        'Stage': 'string',
                        'StageStatus': 'string',
                        'StageDescription': 'string'
                    },
                    'ModelPackageRegistrationType': 'Logged'|'Registered'
                },
            ],
            
        }
        
      **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.
              

              
            

            - **ModelLifeCycle** *(dict) --* 

              A structure describing the current state of the model in its life cycle.

              
              

              - **Stage** *(string) --* 

                The current stage in the model life cycle.

                
              

              - **StageStatus** *(string) --* 

                The current status of a stage in model life cycle.

                
              

              - **StageDescription** *(string) --* 

                Describes the stage related details.

                
          
            

            - **ModelPackageRegistrationType** *(string) --* 

              The package registration type of the model package summary.

              
        
      
    