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

**************
execute_action
**************



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

  

  Executes an action on a target resource.

  

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


  **Request Syntax**
  ::

    response = client.execute_action(
        targetResource={
            'assetId': 'string',
            'computationModelId': 'string'
        },
        actionDefinitionId='string',
        actionPayload={
            'stringValue': 'string'
        },
        clientToken='string',
        resolveTo={
            'assetId': 'string'
        }
    )
    
  :type targetResource: dict
  :param targetResource: **[REQUIRED]** 

    The resource the action will be taken on.

    

  
    - **assetId** *(string) --* 

      The ID of the asset, in UUID format.

      

    
    - **computationModelId** *(string) --* 

      The ID of the computation model.

      

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

    The ID of the action definition.

    

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

    The JSON payload of the action.

    

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

      The payload of the action in a JSON string.

      

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

    

  
  :type resolveTo: dict
  :param resolveTo: 

    The detailed resource this action resolves to.

    

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

      The ID of the asset that the resource resolves to.

      

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

    
    ::

      {
          'actionId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **actionId** *(string) --* 

        The ID of the action.

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

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

  