:doc:`LookoutEquipment <../../lookoutequipment>` / Client / import_model_version

********************
import_model_version
********************



.. py:method:: LookoutEquipment.Client.import_model_version(**kwargs)

  

  Imports a model that has been trained successfully.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/lookoutequipment-2020-12-15/ImportModelVersion>`_  


  **Request Syntax**
  ::

    response = client.import_model_version(
        SourceModelVersionArn='string',
        ModelName='string',
        DatasetName='string',
        LabelsInputConfiguration={
            'S3InputConfiguration': {
                'Bucket': 'string',
                'Prefix': 'string'
            },
            'LabelGroupName': 'string'
        },
        ClientToken='string',
        RoleArn='string',
        ServerSideKmsKeyId='string',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        InferenceDataImportStrategy='NO_IMPORT'|'ADD_WHEN_EMPTY'|'OVERWRITE'
    )
    
  :type SourceModelVersionArn: string
  :param SourceModelVersionArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the model version to import.

    

  
  :type ModelName: string
  :param ModelName: 

    The name for the machine learning model to be created. If the model already exists, Amazon Lookout for Equipment creates a new version. If you do not specify this field, it is filled with the name of the source model.

    

  
  :type DatasetName: string
  :param DatasetName: **[REQUIRED]** 

    The name of the dataset for the machine learning model being imported.

    

  
  :type LabelsInputConfiguration: dict
  :param LabelsInputConfiguration: 

    Contains the configuration information for the S3 location being used to hold label data.

    

  
    - **S3InputConfiguration** *(dict) --* 

      Contains location information for the S3 location being used for label data.

      

    
      - **Bucket** *(string) --* **[REQUIRED]** 

        The name of the S3 bucket holding the label data.

        

      
      - **Prefix** *(string) --* 

        The prefix for the S3 bucket used for the label data.

        

      
    
    - **LabelGroupName** *(string) --* 

      The name of the label group to be used for label data.

      

    
  
  :type ClientToken: string
  :param ClientToken: **[REQUIRED]** 

    A unique identifier for the request. If you do not set the client request token, Amazon Lookout for Equipment generates one.

    This field is autopopulated if not provided.

  
  :type RoleArn: string
  :param RoleArn: 

    The Amazon Resource Name (ARN) of a role with permission to access the data source being used to create the machine learning model.

    

  
  :type ServerSideKmsKeyId: string
  :param ServerSideKmsKeyId: 

    Provides the identifier of the KMS key key used to encrypt model data by Amazon Lookout for Equipment.

    

  
  :type Tags: list
  :param Tags: 

    The tags associated with the machine learning model to be created.

    

  
    - *(dict) --* 

      A tag is a key-value pair that can be added to a resource as metadata.

      

    
      - **Key** *(string) --* **[REQUIRED]** 

        The key for the specified tag.

        

      
      - **Value** *(string) --* **[REQUIRED]** 

        The value for the specified tag.

        

      
    

  :type InferenceDataImportStrategy: string
  :param InferenceDataImportStrategy: 

    Indicates how to import the accumulated inference data when a model version is imported. The possible values are as follows:

     

    
    * NO_IMPORT – Don't import the data.
     
    * ADD_WHEN_EMPTY – Only import the data from the source model if there is no existing data in the target model.
     
    * OVERWRITE – Import the data from the source model and overwrite the existing data in the target model.
    

    

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

    
    ::

      {
          'ModelName': 'string',
          'ModelArn': 'string',
          'ModelVersionArn': 'string',
          'ModelVersion': 123,
          'Status': 'IN_PROGRESS'|'SUCCESS'|'FAILED'|'IMPORT_IN_PROGRESS'|'CANCELED'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ModelName** *(string) --* 

        The name for the machine learning model.

        
      

      - **ModelArn** *(string) --* 

        The Amazon Resource Name (ARN) of the model being created.

        
      

      - **ModelVersionArn** *(string) --* 

        The Amazon Resource Name (ARN) of the model version being created.

        
      

      - **ModelVersion** *(integer) --* 

        The version of the model being created.

        
      

      - **Status** *(string) --* 

        The status of the ``ImportModelVersion`` operation.

        
  
  **Exceptions**
  
  *   :py:class:`LookoutEquipment.Client.exceptions.ConflictException`

  
  *   :py:class:`LookoutEquipment.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`LookoutEquipment.Client.exceptions.ValidationException`

  
  *   :py:class:`LookoutEquipment.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`LookoutEquipment.Client.exceptions.ThrottlingException`

  
  *   :py:class:`LookoutEquipment.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`LookoutEquipment.Client.exceptions.InternalServerException`

  