invoke_device_method

IoT1ClickDevicesService.Client.invoke_device_method(**kwargs)

Given a device ID, issues a request to invoke a named device method (with possible parameters). See the "Example POST" code snippet below.

See also: AWS API Documentation

Request Syntax

response = client.invoke_device_method(
    DeviceId='string',
    DeviceMethod={
        'DeviceType': 'string',
        'MethodName': 'string'
    },
    DeviceMethodParameters='string'
)
Parameters
  • DeviceId (string) --

    [REQUIRED]

    The unique identifier of the device.

  • DeviceMethod (dict) --

    The device method to invoke.

    • DeviceType (string) --

      The type of the device, such as "button".

    • MethodName (string) --

      The name of the method applicable to the deviceType.

  • DeviceMethodParameters (string) -- A JSON encoded string containing the device method request parameters.
Return type

dict

Returns

Response Syntax

{
    'DeviceMethodResponse': 'string'
}

Response Structure

  • (dict) --

    200 response

    • DeviceMethodResponse (string) --

      A JSON encoded string containing the device method response.

Exceptions

  • IoT1ClickDevicesService.Client.exceptions.InvalidRequestException
  • IoT1ClickDevicesService.Client.exceptions.PreconditionFailedException
  • IoT1ClickDevicesService.Client.exceptions.InternalFailureException
  • IoT1ClickDevicesService.Client.exceptions.ResourceNotFoundException
  • IoT1ClickDevicesService.Client.exceptions.RangeNotSatisfiableException
  • IoT1ClickDevicesService.Client.exceptions.ResourceConflictException