az iot ops ns asset rest
Note
This reference is part of the azure-iot-ops extension for the Azure CLI (version 2.67.0 or higher). The extension will automatically install the first time you run an az iot ops ns asset rest command. Learn more about extensions.
Command group 'iot ops ns' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage namespaced assets that point to REST device endpoints.
Commands
Name | Description | Type | Status |
---|---|---|---|
az iot ops ns asset rest create |
Create a REST namespaced asset in an IoT Operations instance. |
Extension | Preview |
az iot ops ns asset rest dataset |
Manage datasets for REST namespaced assets in an IoT Operations instance. |
Extension | Preview |
az iot ops ns asset rest dataset add |
Add a dataset to a REST namespaced asset in an IoT Operations instance. |
Extension | Preview |
az iot ops ns asset rest dataset list |
List datasets for a REST namespaced asset in an IoT Operations instance. |
Extension | Preview |
az iot ops ns asset rest dataset remove |
Remove a dataset from a REST namespaced asset in an IoT Operations instance. |
Extension | Preview |
az iot ops ns asset rest dataset show |
Show details of a dataset for a REST namespaced asset in an IoT Operations instance. |
Extension | Preview |
az iot ops ns asset rest dataset update |
Update a dataset for a REST namespaced asset in an IoT Operations instance. |
Extension | Preview |
az iot ops ns asset rest update |
Update a REST namespaced asset in an IoT Operations instance. |
Extension | Preview |
az iot ops ns asset rest create
Command group 'iot ops ns' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create a REST namespaced asset in an IoT Operations instance.
The device endpoint must be of type Microsoft.Http.
az iot ops ns asset rest create --device
--endpoint --ep
--instance
--name
--resource-group
[--asset-type-ref --type-ref]
[--attr --attribute]
[--dataset-dest --dsd]
[--description]
[--disable {false, true}]
[--display-name --dn]
[--doc-uri --documentation-uri]
[--eid --external-asset-id]
[--hardware-revision --hw-rev]
[--manufacturer]
[--manufacturer-uri --mfr-uri]
[--model]
[--pc --product-code]
[--sampling-int --si]
[--serial-number --sn]
[--software-revision --sw-rev]
[--tags]
Examples
Create a basic REST asset
az iot ops ns asset rest create --name myrestasset --instance myInstance -g myInstanceResourceGroup --device myrestdevice --endpoint myRestEndpoint
Create a REST asset with dataset configuration
az iot ops ns asset rest create --name myrestasset --instance myInstance -g myInstanceResourceGroup --device myrestdevice --endpoint myRestEndpoint --sampling-int 5000
Create a REST asset with dataset destination
az iot ops ns asset rest create --name myrestasset --instance myInstance -g myInstanceResourceGroup --device myrestdevice --endpoint myRestEndpoint --dataset-dest topic="factory/rest/data" retain=Never qos=Qos1 ttl=3600
Create a REST asset with custom configuration and BrokerStateStore destination
az iot ops ns asset rest create --name myrestasset --instance myInstance -g myInstanceResourceGroup --device myrestdevice --endpoint myRestEndpoint --sampling-int 2000 --dataset-dest key="rest-data-cache"
Create a REST asset with additional metadata
az iot ops ns asset rest create --name myrestasset --instance myInstance -g myInstanceResourceGroup --device myrestdevice --endpoint myRestEndpoint --description "Temperature sensor API" --display-name "Facility Temperature Monitor" --model "TempSensor-3000" --manufacturer "SensorCorp" --serial-number "TS-12345" --documentation-uri "https://example.com/docs/api"
Create a REST asset with custom attributes
az iot ops ns asset rest create --name myrestasset --instance myInstance -g myInstanceResourceGroup --device myrestdevice --endpoint myRestEndpoint --attribute location=warehouse --attribute sensor-type=temperature --attribute units=celsius
Required Parameters
Device name.
Device endpoint name.
The name of the Azure IoT Operations instance.
Name of the asset.
The resource group of the Azure IoT Operations instance.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Space-separated list of asset type references.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Space-separated key=value pairs for custom asset attributes.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Key=value pairs representing the destination for datasets. Allowed arguments include: key
for BrokerStateStore or topic
, retain
, qos
, and ttl
for MQTT. Allowed values for retain
are Never
and Keep
and allowed values for qos
are Qos0
and Qos1
.
Description of the asset.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Disable the asset.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Accepted values: | false, true |
Display name for the asset.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Documentation URI for the asset.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
External asset ID.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Hardware revision information.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Manufacturer name.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Manufacturer URI.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Model name or number.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Product code.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Sampling interval for datasets in milliseconds. Minimum: -1.
Serial number.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Software revision information.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az iot ops ns asset rest update
Command group 'iot ops ns' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update a REST namespaced asset in an IoT Operations instance.
The device endpoint must be of type Microsoft.Http.
az iot ops ns asset rest update --instance
--name
--resource-group
[--asset-type-ref --type-ref]
[--attr --attribute]
[--dataset-dest --dsd]
[--description]
[--disable {false, true}]
[--display-name --dn]
[--doc-uri --documentation-uri]
[--eid --external-asset-id]
[--hardware-revision --hw-rev]
[--manufacturer]
[--manufacturer-uri --mfr-uri]
[--model]
[--pc --product-code]
[--sampling-int --si]
[--serial-number --sn]
[--software-revision --sw-rev]
[--tags]
Examples
Update a REST asset's basic properties
az iot ops ns asset rest update --name myrestasset --instance myInstance -g myInstanceResourceGroup --description "Updated temperature sensor API" --display-name "Main Warehouse Temperature"
Update a REST asset's dataset destination to MQTT
az iot ops ns asset rest update --name myrestasset --instance myInstance -g myInstanceResourceGroup --dataset-dest topic="factory/rest/updated/data" retain=Keep qos=Qos1 ttl=7200
Update a REST asset's dataset destination to BrokerStateStore
az iot ops ns asset rest update --name myrestasset --instance myInstance -g myInstanceResourceGroup --dataset-dest key="updated-rest-cache"
Update a REST asset's metadata
az iot ops ns asset rest update --name myrestasset --instance myInstance -g myInstanceResourceGroup --model "TempSensor-4000" --manufacturer "SensorCorp" --serial-number "TS-67890" --documentation-uri "https://example.com/docs/api/v2"
Update a REST asset's custom attributes
az iot ops ns asset rest update --name myrestasset --instance myInstance -g myInstanceResourceGroup --attribute location=main-warehouse sensor-type=temperature units=fahrenheit accuracy=high
Disable a REST asset and update its reference information
az iot ops ns asset rest update --name myrestasset --instance myInstance -g myInstanceResourceGroup --disable --external-asset-id "TEMP-MAIN-01" --hardware-revision "v2.1"
Required Parameters
The name of the Azure IoT Operations instance.
Name of the asset.
The resource group of the Azure IoT Operations instance.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Space-separated list of asset type references.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Space-separated key=value pairs for custom asset attributes.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Key=value pairs representing the destination for datasets. Allowed arguments include: key
for BrokerStateStore or topic
, retain
, qos
, and ttl
for MQTT. Allowed values for retain
are Never
and Keep
and allowed values for qos
are Qos0
and Qos1
.
Description of the asset.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Disable the asset.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Accepted values: | false, true |
Display name for the asset.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Documentation URI for the asset.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
External asset ID.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Hardware revision information.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Manufacturer name.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Manufacturer URI.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Model name or number.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Product code.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Sampling interval for datasets in milliseconds. Minimum: -1.
Serial number.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Software revision information.
Property | Value |
---|---|
Parameter group: | Additional Info Arguments |
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |