:doc:`FraudDetector <../../frauddetector>` / Client / update_model_version

********************
update_model_version
********************



.. py:method:: FraudDetector.Client.update_model_version(**kwargs)

  

  Updates a model version. Updating a model version retrains an existing model version using updated training data and produces a new minor version of the model. You can update the training data set location and data access role attributes using this action. This action creates and trains a new minor version of the model, for example version 1.01, 1.02, 1.03.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/frauddetector-2019-11-15/UpdateModelVersion>`_  


  **Request Syntax**
  ::

    response = client.update_model_version(
        modelId='string',
        modelType='ONLINE_FRAUD_INSIGHTS'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
        majorVersionNumber='string',
        externalEventsDetail={
            'dataLocation': 'string',
            'dataAccessRoleArn': 'string'
        },
        ingestedEventsDetail={
            'ingestedEventsTimeWindow': {
                'startTime': 'string',
                'endTime': 'string'
            }
        },
        tags=[
            {
                'key': 'string',
                'value': 'string'
            },
        ]
    )
    
  :type modelId: string
  :param modelId: **[REQUIRED]** 

    The model ID.

    

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

    The model type.

    

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

    The major version number.

    

  
  :type externalEventsDetail: dict
  :param externalEventsDetail: 

    The details of the external events data used for training the model version. Required if ``trainingDataSource`` is ``EXTERNAL_EVENTS``.

    

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

      The Amazon S3 bucket location for the data.

      

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

      The ARN of the role that provides Amazon Fraud Detector access to the data location.

      

    
  
  :type ingestedEventsDetail: dict
  :param ingestedEventsDetail: 

    The details of the ingested event used for training the model version. Required if your ``trainingDataSource`` is ``INGESTED_EVENTS``.

    

  
    - **ingestedEventsTimeWindow** *(dict) --* **[REQUIRED]** 

      The start and stop time of the ingested events.

      

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

        Timestamp of the first ingensted event.

        

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

        Timestamp of the final ingested event.

        

      
    
  
  :type tags: list
  :param tags: 

    A collection of key and value pairs.

    

  
    - *(dict) --* 

      A key and value pair.

      

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

        A tag key.

        

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

        A value assigned to a tag key.

        

      
    

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

    
    ::

      {
          'modelId': 'string',
          'modelType': 'ONLINE_FRAUD_INSIGHTS'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
          'modelVersionNumber': 'string',
          'status': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **modelId** *(string) --* 

        The model ID.

        
      

      - **modelType** *(string) --* 

        The model type.

        
      

      - **modelVersionNumber** *(string) --* 

        The model version number of the model version updated.

        
      

      - **status** *(string) --* 

        The status of the updated model version.

        
  
  **Exceptions**
  
  *   :py:class:`FraudDetector.Client.exceptions.ValidationException`

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

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

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

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

  
  *   :py:class:`FraudDetector.Client.exceptions.ConflictException`

  