:doc:`LexModelBuildingService <../../lex-models>` / Client / get_migrations

**************
get_migrations
**************



.. py:method:: LexModelBuildingService.Client.get_migrations(**kwargs)

  

  Gets a list of migrations between Amazon Lex V1 and Amazon Lex V2.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetMigrations>`_  


  **Request Syntax**
  ::

    response = client.get_migrations(
        sortByAttribute='V1_BOT_NAME'|'MIGRATION_DATE_TIME',
        sortByOrder='ASCENDING'|'DESCENDING',
        v1BotNameContains='string',
        migrationStatusEquals='IN_PROGRESS'|'COMPLETED'|'FAILED',
        maxResults=123,
        nextToken='string'
    )
    
  :type sortByAttribute: string
  :param sortByAttribute: 

    The field to sort the list of migrations by. You can sort by the Amazon Lex V1 bot name or the date and time that the migration was started.

    

  
  :type sortByOrder: string
  :param sortByOrder: 

    The order so sort the list.

    

  
  :type v1BotNameContains: string
  :param v1BotNameContains: 

    Filters the list to contain only bots whose name contains the specified string. The string is matched anywhere in bot name.

    

  
  :type migrationStatusEquals: string
  :param migrationStatusEquals: 

    Filters the list to contain only migrations in the specified state.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of migrations to return in the response. The default is 10.

    

  
  :type nextToken: string
  :param nextToken: 

    A pagination token that fetches the next page of migrations. If the response to this operation is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of migrations, specify the pagination token in the request.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'migrationSummaries': [
              {
                  'migrationId': 'string',
                  'v1BotName': 'string',
                  'v1BotVersion': 'string',
                  'v1BotLocale': 'de-DE'|'en-AU'|'en-GB'|'en-IN'|'en-US'|'es-419'|'es-ES'|'es-US'|'fr-FR'|'fr-CA'|'it-IT'|'ja-JP'|'ko-KR',
                  'v2BotId': 'string',
                  'v2BotRole': 'string',
                  'migrationStatus': 'IN_PROGRESS'|'COMPLETED'|'FAILED',
                  'migrationStrategy': 'CREATE_NEW'|'UPDATE_EXISTING',
                  'migrationTimestamp': datetime(2015, 1, 1)
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **migrationSummaries** *(list) --* 

        An array of summaries for migrations from Amazon Lex V1 to Amazon Lex V2. To see details of the migration, use the ``migrationId`` from the summary in a call to the operation.

        
        

        - *(dict) --* 

          Provides information about migrating a bot from Amazon Lex V1 to Amazon Lex V2.

          
          

          - **migrationId** *(string) --* 

            The unique identifier that Amazon Lex assigned to the migration.

            
          

          - **v1BotName** *(string) --* 

            The name of the Amazon Lex V1 bot that is the source of the migration.

            
          

          - **v1BotVersion** *(string) --* 

            The version of the Amazon Lex V1 bot that is the source of the migration.

            
          

          - **v1BotLocale** *(string) --* 

            The locale of the Amazon Lex V1 bot that is the source of the migration.

            
          

          - **v2BotId** *(string) --* 

            The unique identifier of the Amazon Lex V2 that is the destination of the migration.

            
          

          - **v2BotRole** *(string) --* 

            The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.

            
          

          - **migrationStatus** *(string) --* 

            The status of the operation. When the status is ``COMPLETE`` the bot is available in Amazon Lex V2. There may be alerts and warnings that need to be resolved to complete the migration.

            
          

          - **migrationStrategy** *(string) --* 

            The strategy used to conduct the migration.

            
          

          - **migrationTimestamp** *(datetime) --* 

            The date and time that the migration started.

            
      
    
      

      - **nextToken** *(string) --* 

        If the response is truncated, it includes a pagination token that you can specify in your next request to fetch the next page of migrations.

        
  
  **Exceptions**
  
  *   :py:class:`LexModelBuildingService.Client.exceptions.LimitExceededException`

  
  *   :py:class:`LexModelBuildingService.Client.exceptions.InternalFailureException`

  
  *   :py:class:`LexModelBuildingService.Client.exceptions.BadRequestException`

  