:doc:`ManagedintegrationsforIoTDeviceManagement <../../iot-managed-integrations>` / Client / send_managed_thing_command

**************************
send_managed_thing_command
**************************



.. py:method:: ManagedintegrationsforIoTDeviceManagement.Client.send_managed_thing_command(**kwargs)

  

  Send the command to the device represented by the managed thing.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-managed-integrations-2025-03-03/SendManagedThingCommand>`_  


  **Request Syntax**
  ::

    response = client.send_managed_thing_command(
        ManagedThingId='string',
        Endpoints=[
            {
                'endpointId': 'string',
                'capabilities': [
                    {
                        'id': 'string',
                        'name': 'string',
                        'version': 'string',
                        'actions': [
                            {
                                'name': 'string',
                                'ref': 'string',
                                'actionTraceId': 'string',
                                'parameters': {...}|[...]|123|123.4|'string'|True|None
                            },
                        ]
                    },
                ]
            },
        ],
        ConnectorAssociationId='string',
        AccountAssociationId='string'
    )
    
  :type ManagedThingId: string
  :param ManagedThingId: **[REQUIRED]** 

    The id of the device.

    

  
  :type Endpoints: list
  :param Endpoints: **[REQUIRED]** 

    The device endpoint.

    

  
    - *(dict) --* 

      The endpoint for a managed thing when sending a command.

      

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

        The id of the endpoint for a managed thing.

        

      
      - **capabilities** *(list) --* **[REQUIRED]** 

        Describe the endpoint with an id, a name, and the relevant capabilities for sending commands.

        

      
        - *(dict) --* 

          The command capabilities added for the managed thing

          

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

            Describe the capability with an id.

            

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

            Describe the capability with an name.

            

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

            Describe the capability with a version.

            

          
          - **actions** *(list) --* **[REQUIRED]** 

            Describe the command capability with the actions it supports.

            

          
            - *(dict) --* 

              Action for an Amazon Web Services capability, containing the action parameters for control.

              

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

                Describe a capability action with a name.

                

              
              - **ref** *(string) --* 

                Describe a capability action with an reference.

                

              
              - **actionTraceId** *(string) --* 

                Describe a capability action with an ``actionTraceId`` for a response command.

                

              
              - **parameters** (:ref:`document<document>`) -- 

                Describe a capability action with a capability property.

                

              
            
        
        
    
    

  :type ConnectorAssociationId: string
  :param ConnectorAssociationId: 

    The ID tracking the current discovery process for one connector association.

    

  
  :type AccountAssociationId: string
  :param AccountAssociationId: 

    The identifier of the account association to use when sending a command to a managed thing.

    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **TraceId** *(string) --* 

        The trace request identifier. This is generated by IoT managed integrations and can be used to trace this command and its related operations in CloudWatch.

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

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

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

  
  *   :py:class:`ManagedintegrationsforIoTDeviceManagement.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`ManagedintegrationsforIoTDeviceManagement.Client.exceptions.ServiceUnavailableException`

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

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

  