:doc:`IoTSiteWise <../../iotsitewise>` / Client / update_computation_model

************************
update_computation_model
************************



.. py:method:: IoTSiteWise.Client.update_computation_model(**kwargs)

  

  Updates the computation model.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotsitewise-2019-12-02/UpdateComputationModel>`_  


  **Request Syntax**
  ::

    response = client.update_computation_model(
        computationModelId='string',
        computationModelName='string',
        computationModelDescription='string',
        computationModelConfiguration={
            'anomalyDetection': {
                'inputProperties': 'string',
                'resultProperty': 'string'
            }
        },
        computationModelDataBinding={
            'string': {
                'assetModelProperty': {
                    'assetModelId': 'string',
                    'propertyId': 'string'
                },
                'assetProperty': {
                    'assetId': 'string',
                    'propertyId': 'string'
                },
                'list': [
                    {'... recursive ...'},
                ]
            }
        },
        clientToken='string'
    )
    
  :type computationModelId: string
  :param computationModelId: **[REQUIRED]** 

    The ID of the computation model.

    

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

    The name of the computation model.

    

  
  :type computationModelDescription: string
  :param computationModelDescription: 

    The description of the computation model.

    

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

    The configuration for the computation model.

    

  
    - **anomalyDetection** *(dict) --* 

      The configuration for the anomaly detection type of computation model.

      

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

        Define the variable name associated with input properties, with the following format ``${VariableName}``.

        

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

        Define the variable name associated with the result property, and the following format ``${VariableName}``.

        

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

    The data binding for the computation model. Key is a variable name defined in configuration. Value is a ``ComputationModelDataBindingValue`` referenced by the variable.

    

  
    - *(string) --* 

    
      - *(dict) --* 

        Contains computation model data binding value information, which can be one of ``assetModelProperty``, ``list``.

        

      
        - **assetModelProperty** *(dict) --* 

          Specifies an asset model property data binding value.

          

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

            The ID of the asset model, in UUID format.

            

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

            The ID of the asset model property used in data binding value.

            

          
        
        - **assetProperty** *(dict) --* 

          The asset property value used for computation model data binding.

          

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

            The ID of the asset containing the property. This identifies the specific asset instance's property value used in the computation model.

            

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

            The ID of the property within the asset. This identifies the specific property's value used in the computation model.

            

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

          Specifies a list of data binding value.

          

        
          - *(dict) --* 

            Contains computation model data binding value information, which can be one of ``assetModelProperty``, ``list``.

            

          
      
      


  :type clientToken: string
  :param clientToken: 

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    This field is autopopulated if not provided.

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

    
    ::

      {
          'computationModelStatus': {
              'state': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
              'error': {
                  'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
                  'message': 'string',
                  'details': [
                      {
                          'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                          'message': 'string'
                      },
                  ]
              }
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **computationModelStatus** *(dict) --* 

        The status of the computation model. It contains a state (UPDATING after successfully calling this operation) and an error message if any.

        
        

        - **state** *(string) --* 

          The current state of the computation model.

          
        

        - **error** *(dict) --* 

          Contains the details of an IoT SiteWise error.

          
          

          - **code** *(string) --* 

            The error code.

            
          

          - **message** *(string) --* 

            The error message.

            
          

          - **details** *(list) --* 

            A list of detailed errors.

            
            

            - *(dict) --* 

              Contains detailed error information.

              
              

              - **code** *(string) --* 

                The error code.

                
              

              - **message** *(string) --* 

                The error message.

                
          
        
      
    
  
  **Exceptions**
  
  *   :py:class:`IoTSiteWise.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.ResourceAlreadyExistsException`

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

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

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

  
  *   :py:class:`IoTSiteWise.Client.exceptions.LimitExceededException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.ConflictingOperationException`

  