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

******************
put_external_model
******************



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

  

  Creates or updates an Amazon SageMaker model endpoint. You can also use this action to update the configuration of the model endpoint, including the IAM role and/or the mapped variables.

  

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


  **Request Syntax**
  ::

    response = client.put_external_model(
        modelEndpoint='string',
        modelSource='SAGEMAKER',
        invokeModelEndpointRoleArn='string',
        inputConfiguration={
            'eventTypeName': 'string',
            'format': 'TEXT_CSV'|'APPLICATION_JSON',
            'useEventVariables': True|False,
            'jsonInputTemplate': 'string',
            'csvInputTemplate': 'string'
        },
        outputConfiguration={
            'format': 'TEXT_CSV'|'APPLICATION_JSONLINES',
            'jsonKeyToVariableMap': {
                'string': 'string'
            },
            'csvIndexToVariableMap': {
                'string': 'string'
            }
        },
        modelEndpointStatus='ASSOCIATED'|'DISSOCIATED',
        tags=[
            {
                'key': 'string',
                'value': 'string'
            },
        ]
    )
    
  :type modelEndpoint: string
  :param modelEndpoint: **[REQUIRED]** 

    The model endpoints name.

    

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

    The source of the model.

    

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

    The IAM role used to invoke the model endpoint.

    

  
  :type inputConfiguration: dict
  :param inputConfiguration: **[REQUIRED]** 

    The model endpoint input configuration.

    

  
    - **eventTypeName** *(string) --* 

      The event type name.

      

    
    - **format** *(string) --* 

      The format of the model input configuration. The format differs depending on if it is passed through to SageMaker or constructed by Amazon Fraud Detector.

      

    
    - **useEventVariables** *(boolean) --* **[REQUIRED]** 

      The event variables.

      

    
    - **jsonInputTemplate** *(string) --* 

      Template for constructing the JSON input-data sent to SageMaker. At event-evaluation, the placeholders for variable names in the template will be replaced with the variable values before being sent to SageMaker.

      

    
    - **csvInputTemplate** *(string) --* 

      Template for constructing the CSV input-data sent to SageMaker. At event-evaluation, the placeholders for variable-names in the template will be replaced with the variable values before being sent to SageMaker.

      

    
  
  :type outputConfiguration: dict
  :param outputConfiguration: **[REQUIRED]** 

    The model endpoint output configuration.

    

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

      The format of the model output configuration.

      

    
    - **jsonKeyToVariableMap** *(dict) --* 

      A map of JSON keys in response from SageMaker to the Amazon Fraud Detector variables.

      

    
      - *(string) --* 

      
        - *(string) --* 

        
  

    - **csvIndexToVariableMap** *(dict) --* 

      A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables.

      

    
      - *(string) --* 

      
        - *(string) --* 

        
  

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

    The model endpoint’s status in Amazon Fraud Detector.

    

  
  :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**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`FraudDetector.Client.exceptions.ValidationException`

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

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

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

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

  