| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.IoT1ClickDevices.InvokeDeviceMethod
Description
Given a device ID, issues a request to invoke a named device method (with possible parameters). See the "Example POST" code snippet below.
Synopsis
- data InvokeDeviceMethod = InvokeDeviceMethod' {}
- newInvokeDeviceMethod :: Text -> InvokeDeviceMethod
- invokeDeviceMethod_deviceMethod :: Lens' InvokeDeviceMethod (Maybe DeviceMethod)
- invokeDeviceMethod_deviceMethodParameters :: Lens' InvokeDeviceMethod (Maybe Text)
- invokeDeviceMethod_deviceId :: Lens' InvokeDeviceMethod Text
- data InvokeDeviceMethodResponse = InvokeDeviceMethodResponse' {}
- newInvokeDeviceMethodResponse :: Int -> InvokeDeviceMethodResponse
- invokeDeviceMethodResponse_deviceMethodResponse :: Lens' InvokeDeviceMethodResponse (Maybe Text)
- invokeDeviceMethodResponse_httpStatus :: Lens' InvokeDeviceMethodResponse Int
Creating a Request
data InvokeDeviceMethod Source #
See: newInvokeDeviceMethod smart constructor.
Constructors
| InvokeDeviceMethod' | |
Fields
| |
Instances
newInvokeDeviceMethod Source #
Arguments
| :: Text | |
| -> InvokeDeviceMethod |
Create a value of InvokeDeviceMethod with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:deviceMethod:InvokeDeviceMethod', invokeDeviceMethod_deviceMethod - The device method to invoke.
$sel:deviceMethodParameters:InvokeDeviceMethod', invokeDeviceMethod_deviceMethodParameters - A JSON encoded string containing the device method request parameters.
InvokeDeviceMethod, invokeDeviceMethod_deviceId - The unique identifier of the device.
Request Lenses
invokeDeviceMethod_deviceMethod :: Lens' InvokeDeviceMethod (Maybe DeviceMethod) Source #
The device method to invoke.
invokeDeviceMethod_deviceMethodParameters :: Lens' InvokeDeviceMethod (Maybe Text) Source #
A JSON encoded string containing the device method request parameters.
invokeDeviceMethod_deviceId :: Lens' InvokeDeviceMethod Text Source #
The unique identifier of the device.
Destructuring the Response
data InvokeDeviceMethodResponse Source #
See: newInvokeDeviceMethodResponse smart constructor.
Constructors
| InvokeDeviceMethodResponse' | |
Fields
| |
Instances
newInvokeDeviceMethodResponse Source #
Create a value of InvokeDeviceMethodResponse with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:deviceMethodResponse:InvokeDeviceMethodResponse', invokeDeviceMethodResponse_deviceMethodResponse - A JSON encoded string containing the device method response.
$sel:httpStatus:InvokeDeviceMethodResponse', invokeDeviceMethodResponse_httpStatus - The response's http status code.
Response Lenses
invokeDeviceMethodResponse_deviceMethodResponse :: Lens' InvokeDeviceMethodResponse (Maybe Text) Source #
A JSON encoded string containing the device method response.
invokeDeviceMethodResponse_httpStatus :: Lens' InvokeDeviceMethodResponse Int Source #
The response's http status code.