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

************
update_asset
************



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

  

  Updates an asset's name. For more information, see `Updating assets and models <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/update-assets-and-models.html>`__ in the *IoT SiteWise User Guide*.

  

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


  **Request Syntax**
  ::

    response = client.update_asset(
        assetId='string',
        assetExternalId='string',
        assetName='string',
        clientToken='string',
        assetDescription='string'
    )
    
  :type assetId: string
  :param assetId: **[REQUIRED]** 

    The ID of the asset to update. This can be either the actual ID in UUID format, or else ``externalId:`` followed by the external ID, if it has one. For more information, see `Referencing objects with external IDs <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/object-ids.html#external-id-references>`__ in the *IoT SiteWise User Guide*.

    

  
  :type assetExternalId: string
  :param assetExternalId: 

    An external ID to assign to the asset. The asset must not already have an external ID. The external ID must be unique within your Amazon Web Services account. For more information, see `Using external IDs <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/object-ids.html#external-ids>`__ in the *IoT SiteWise User Guide*.

    

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

    A friendly name for the asset.

    

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

  
  :type assetDescription: string
  :param assetDescription: 

    A description for the asset.

    

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

    
    ::

      {
          'assetStatus': {
              '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) --* 
      

      - **assetStatus** *(dict) --* 

        The status of the asset, which contains a state ( ``UPDATING`` after successfully calling this operation) and any error message.

        
        

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

          The current status of the asset.

          
        

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

          Contains associated error information, if any.

          
          

          - **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.ConflictingOperationException`

  