Skip to content

Commit 9fcbc0a

Browse files
Merge pull request #313511 from dominicbetts/release-aio-2603-management-actions
AIO 2603: Management actions clarification
2 parents e735e73 + adc234c commit 9fcbc0a

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

articles/iot-operations/discover-manage-assets/howto-use-management-actions.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ai-usage: ai-assisted
1313

1414
# Enable and run management actions
1515

16-
Management actions let you invoke operations on southbound assets connected to your Azure IoT Operations instance. You can call methods, write values, and read values on assets such as OPC UA servers, ONVIF cameras, and MQTT devices. Management actions use Azure Event Grid to route requests and responses between the cloud and the internal MQTT broker The connector subscribes to a known topic on the internal MQTT broker and then executes the operation on the target asset.
16+
Management actions let you invoke operations on southbound assets connected to your Azure IoT Operations instance. You can call methods, write values, and read values on assets such as OPC UA servers, ONVIF cameras, and MQTT devices. Management actions use Azure Event Grid to route requests and responses between the cloud and the internal MQTT broker. The connector subscribes to a known topic on the internal MQTT broker and then executes the operation on the target asset.
1717

1818
When you enable management actions, the Azure CLI provisions the infrastructure that connects Event Grid to the MQTT broker. This infrastructure includes an Event Grid data flow endpoint, a request data flow that uses a WebAssembly (WASM) module to process incoming messages, a response data flow that routes replies back through Event Grid, and the required topic spaces and permission bindings. After the infrastructure is in place, you can execute actions on any asset that has a management group and action defined.
1919

@@ -96,11 +96,34 @@ az iot ops mgmt-actions execute \
9696
> [!TIP]
9797
> The `--payload` parameter supports inline JSON or a local file path that contains the JSON payload.
9898
99+
Not all call actions require a payload. For example, the ONVIF `GetDeviceInformation` action doesn't require any input parameters, so you can execute it without a payload:
100+
101+
```azurecli
102+
az iot ops mgmt-actions execute \
103+
--instance <instance-name> \
104+
--resource-group <resource-group> \
105+
--asset onvif-asset \
106+
--group Device \
107+
--action GetDeviceInformation
108+
```
109+
110+
In this scenario, the following command returns a `Could not resolve the request schema for action 'GetDeviceInformation'...` error because the CLI attempts to validate the request against a non-existent schema:
111+
112+
```azurecli
113+
az iot ops mgmt-actions execute \
114+
--instance <instance-name> \
115+
--resource-group <resource-group> \
116+
--asset onvif-asset \
117+
--group Device \
118+
--action GetDeviceInformation \
119+
--show-schema
120+
```
121+
99122
### Action types
100123

101124
The payload depends on the action type and the target asset's management group definition:
102125

103-
- **Call** actions invoke a method on the asset. The payload contains the method's input parameters. To call a method that takes no parameters, set the payload to `'{}'`.
126+
- **Call** actions invoke a method on the asset. If the method expects input parameters, the payload contains them.
104127
- **Write** actions write a value to the target URI on the asset. The payload contains the value to write.
105128
- **Read** actions read a value from the target URI. Use an empty payload `'{}'` for read actions.
106129

0 commit comments

Comments
 (0)