az iot adr ns device attribute
Note
This reference is part of the azure-iot extension for the Azure CLI (version 2.73.0 or higher). The extension will automatically install the first time you run an az iot adr ns device attribute command. Learn more about extensions.
Command group 'iot adr ns device' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage Registry Device attributes.
User attributes are customer-authored. Microsoft.DeviceUpdate attributes are service-owned.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az iot adr ns device attribute create |
Create or replace a User-reported attribute. |
Extension | Preview |
| az iot adr ns device attribute delete |
Delete an attribute by its literal resource name. |
Extension | Preview |
| az iot adr ns device attribute list |
List attributes, including service-reported metadata. |
Extension | Preview |
| az iot adr ns device attribute show |
Get an attribute. |
Extension | Preview |
az iot adr ns device attribute create
Command group 'iot adr ns device attribute' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create or replace a User-reported attribute.
Properties must be a JSON object. User provenance is added automatically. Use schema identifiers and property values supported by your service; the CLI does not infer a schema or validate application-specific fields.
az iot adr ns device attribute create --an --attribute-name --name
--device-name --dn --rdn --registry-device-name
--namespace --ns
--resource-group
[--acquire-policy-token]
[--change-reference]
[--properties --props]
[--schema]
Examples
Create an attribute from a JSON file.
az iot adr ns device attribute create -n my-attribute --rdn my-device --ns my-ns -g MyRG --properties @attribute.json
Required Parameters
Name of the Registry Device attribute.
Name of the parent Registry Device.
Name of the Device Registry namespace.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Attribute properties as a JSON object or JSON file path (optionally prefixed by @). Service-owned Microsoft.DeviceUpdate provenance cannot be authored.
Schema identifier for the attribute. Use a schema supported by your service.
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 adr ns device attribute delete
Command group 'iot adr ns device attribute' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete an attribute by its literal resource name.
az iot adr ns device attribute delete --an --attribute-name --name
--device-name --dn --rdn --registry-device-name
--namespace --ns
--resource-group
[--acquire-policy-token]
[--change-reference]
[--yes {false, true}]
Examples
Delete a customer-owned attribute.
az iot adr ns device attribute delete -n my-attribute --rdn my-device --ns my-ns -g MyRG --yes
Required Parameters
Name of the Registry Device attribute.
Name of the parent Registry Device.
Name of the Device Registry namespace.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Skip user prompts. Indicates acceptance of action. Used primarily for automation scenarios. Default: false.
| Property | Value |
|---|---|
| Accepted values: | false, true |
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 adr ns device attribute list
Command group 'iot adr ns device attribute' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List attributes, including service-reported metadata.
az iot adr ns device attribute list --device-name --dn --rdn --registry-device-name
--namespace --ns
--resource-group
Examples
List attributes.
az iot adr ns device attribute list --rdn my-device --ns my-ns -g MyRG
Required Parameters
Name of the parent Registry Device.
Name of the Device Registry namespace.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
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 adr ns device attribute show
Command group 'iot adr ns device attribute' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Get an attribute.
The software-update alias falls back to the canonical update attribute only after the literal name returns HTTP 404. Create and delete use literal names.
az iot adr ns device attribute show --an --attribute-name --name
--device-name --dn --rdn --registry-device-name
--namespace --ns
--resource-group
Examples
Read an attribute.
az iot adr ns device attribute show -n my-attribute --rdn my-device --ns my-ns -g MyRG
Required Parameters
Attribute name. If no literal match exists, software-update is an alias for the service-owned Device Update attribute named update.
Name of the parent Registry Device.
Name of the Device Registry namespace.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
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 |