az iot ops ns asset mgmt-group

Note

This reference is part of the azure-iot-ops extension for the Azure CLI (version 2.70.0 or higher). The extension will automatically install the first time you run an az iot ops ns asset mgmt-group command. Learn more about extensions.

Manage management groups for namespaced assets in an IoT Operations instance.

The connector type is detected automatically from the existing asset. For connector-specific parameters use --mgmt-group-config (inline JSON or file). Use --show-template to discover the supported configuration schema for the asset's connector type.

Commands

Name Description Type Status
az iot ops ns asset mgmt-group add

Add a management group to a namespaced asset in an IoT Operations instance.

Extension Preview
az iot ops ns asset mgmt-group export

Export management groups to file.

Extension Preview
az iot ops ns asset mgmt-group import

Import management groups from file.

Extension Preview
az iot ops ns asset mgmt-group list

List management groups for a namespaced asset in an IoT Operations instance.

Extension Preview
az iot ops ns asset mgmt-group remove

Remove a management group from a namespaced asset in an IoT Operations instance.

Extension Preview
az iot ops ns asset mgmt-group show

Show details of a management group for a namespaced asset in an IoT Operations instance.

Extension Preview
az iot ops ns asset mgmt-group update

Update a management group for a namespaced asset in an IoT Operations instance.

Extension Preview

az iot ops ns asset mgmt-group add

Preview

This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Add a management group to a namespaced asset in an IoT Operations instance.

The connector type is detected from the asset's device endpoint. Connector-specific configuration can be supplied via --mgmt-group-config. Use --show-template to discover the supported config schema. For non-OPC UA connectors, a connector template must exist in the instance.

az iot ops ns asset mgmt-group add --asset
                                   --instance
                                   --name
                                   --resource-group
                                   [--acquire-policy-token]
                                   [--change-reference]
                                   [--data-source --ds]
                                   [--default-timeout --dto]
                                   [--default-topic --dt]
                                   [--mgc --mgmt-group-config]
                                   [--replace {false, true}]
                                   [--show-template {config, schema}]
                                   [--tr --type-ref]

Examples

Add a basic management group to any asset type

az iot ops ns asset mgmt-group add --asset myasset --instance myInstance -g myInstanceResourceGroup --name boilerControls

Show the management group config template for the asset's connector type

az iot ops ns asset mgmt-group add --asset myasset --instance myInstance -g myInstanceResourceGroup --name boilerControls --show-template config

Add a management group with connector-specific configuration from inline JSON

az iot ops ns asset mgmt-group add --asset myasset --instance myInstance -g myInstanceResourceGroup --name boilerControls --mgmt-group-config '{"managementGroupConfiguration": {"maxConcurrentRequests": 5}}'

Add a management group with configuration from a file

az iot ops ns asset mgmt-group add --asset myasset --instance myInstance -g myInstanceResourceGroup --name boilerControls --mgmt-group-config ./mgmt_group_config.json

Replace an existing management group

az iot ops ns asset mgmt-group add --asset myasset --instance myInstance -g myInstanceResourceGroup --name boilerControls --replace

Required Parameters

--asset -a

Asset name.

--instance -i

The name of the Azure IoT Operations instance.

--name -n

Management group name.

--resource-group -g

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--data-source --ds

Data source for the management group.

--default-timeout --dto

Default timeout in seconds for management group actions. Minimum: 0.

--default-topic --dt

Default topic for management group actions.

--mgc --mgmt-group-config

Inline JSON string or path to a JSON/YAML file (.json, .yaml, .yml) containing connector-specific management-group configuration. The accepted key is 'managementGroupConfiguration' (connector-specific config object). Use --show-template to discover the supported keys and schema for the asset's connector type. Cannot be combined with --show-template. For non-OPC UA connectors, a connector template must exist in the instance.

--replace

Replace the management group if another management group with the same name is already present.

Property Value
Default value: False
Accepted values: false, true
--show-template

Show a starter management-group configuration template for the asset's connector type and exit without modifying the management group. The connector type is read from the existing asset. config: fields shown with their default values (null if no default); output is directly usable as --mgmt-group-config input. schema: every field includes type, default, and constraints (min, max, enum, pattern). Draft-07 $ref pointers (#/definitions/...) are resolved inline in both modes.

Property Value
Accepted values: config, schema
--tr --type-ref

Type definition ID or URI.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az iot ops ns asset mgmt-group export

Preview

This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Export management groups to file.

az iot ops ns asset mgmt-group export --asset
                                      --instance
                                      --resource-group
                                      [--acquire-policy-token]
                                      [--change-reference]
                                      [--format {json, yaml}]
                                      [--od --output-dir]
                                      [--replace {false, true}]

Examples

Export management groups to JSON

az iot ops ns asset mgmt-group export --asset myasset --instance myInstance -g myInstanceResourceGroup

Required Parameters

--asset -a

Asset name.

--instance -i

The name of the Azure IoT Operations instance.

--resource-group -g

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--format -f

Export file format (JSON or YAML).

Property Value
Default value: json
Accepted values: json, yaml
--od --output-dir

Output directory for export.

Property Value
Default value: .
--replace

Replace the local file if present.

Property Value
Default value: False
Accepted values: false, true
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az iot ops ns asset mgmt-group import

Preview

This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Import management groups from file.

az iot ops ns asset mgmt-group import --asset
                                      --if --input-file
                                      --instance
                                      --resource-group
                                      [--acquire-policy-token]
                                      [--change-reference]
                                      [--replace {false, true}]

Examples

Import management groups from a JSON file

az iot ops ns asset mgmt-group import --asset myasset --instance myInstance -g myInstanceResourceGroup --input-file ./management_groups.json

Required Parameters

--asset -a

Asset name.

--if --input-file

Path to import file (JSON or YAML).

--instance -i

The name of the Azure IoT Operations instance.

--resource-group -g

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--replace

Replace existing management groups that share a name with an imported management group.

Property Value
Default value: False
Accepted values: false, true
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az iot ops ns asset mgmt-group list

Preview

This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List management groups for a namespaced asset in an IoT Operations instance.

az iot ops ns asset mgmt-group list --asset
                                    --instance
                                    --resource-group

Examples

List all management groups for an asset

az iot ops ns asset mgmt-group list --asset myasset --instance myInstance -g myInstanceResourceGroup

Required Parameters

--asset -a

Asset name.

--instance -i

The name of the Azure IoT Operations instance.

--resource-group -g

The resource group of the Azure IoT Operations instance.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az iot ops ns asset mgmt-group remove

Preview

This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Remove a management group from a namespaced asset in an IoT Operations instance.

az iot ops ns asset mgmt-group remove --asset
                                      --instance
                                      --name
                                      --resource-group
                                      [--acquire-policy-token]
                                      [--change-reference]

Examples

Remove a management group from an asset

az iot ops ns asset mgmt-group remove --asset myasset --instance myInstance -g myInstanceResourceGroup --name boilerControls

Required Parameters

--asset -a

Asset name.

--instance -i

The name of the Azure IoT Operations instance.

--name -n

Management group name.

--resource-group -g

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az iot ops ns asset mgmt-group show

Preview

This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show details of a management group for a namespaced asset in an IoT Operations instance.

az iot ops ns asset mgmt-group show --asset
                                    --instance
                                    --name
                                    --resource-group

Examples

Show management group details

az iot ops ns asset mgmt-group show --asset myasset --instance myInstance -g myInstanceResourceGroup --name boilerControls

Required Parameters

--asset -a

Asset name.

--instance -i

The name of the Azure IoT Operations instance.

--name -n

Management group name.

--resource-group -g

The resource group of the Azure IoT Operations instance.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az iot ops ns asset mgmt-group update

Preview

This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update a management group for a namespaced asset in an IoT Operations instance.

The connector type is detected from the asset's device endpoint. Use --mgmt-group-config to supply connector-specific configuration. Use --show-template config to see current management group values pre-filled in the full schema structure (ready to edit and pass back via --mgmt-group-config). Use --show-template schema to see the full connector schema with types and constraints.

az iot ops ns asset mgmt-group update --asset
                                      --instance
                                      --name
                                      --resource-group
                                      [--acquire-policy-token]
                                      [--change-reference]
                                      [--data-source --ds]
                                      [--default-timeout --dto]
                                      [--default-topic --dt]
                                      [--mgc --mgmt-group-config]
                                      [--show-template {config, schema}]
                                      [--tr --type-ref]

Examples

Show current management group config pre-filled with existing values (for editing before update)

az iot ops ns asset mgmt-group update --asset myasset --instance myInstance -g myInstanceResourceGroup --name boilerControls --show-template config

Show the management group config schema with types and constraints

az iot ops ns asset mgmt-group update --asset myasset --instance myInstance -g myInstanceResourceGroup --name boilerControls --show-template schema

Update management group configuration from inline JSON

az iot ops ns asset mgmt-group update --asset myasset --instance myInstance -g myInstanceResourceGroup --name boilerControls --mgmt-group-config '{"managementGroupConfiguration": {"maxConcurrentRequests": 10}}'

Update management group data source

az iot ops ns asset mgmt-group update --asset myasset --instance myInstance -g myInstanceResourceGroup --name boilerControls --data-source "boiler.controls"

Required Parameters

--asset -a

Asset name.

--instance -i

The name of the Azure IoT Operations instance.

--name -n

Management group name.

--resource-group -g

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--data-source --ds

Data source for the management group.

--default-timeout --dto

Default timeout in seconds for management group actions. Minimum: 0.

--default-topic --dt

Default topic for management group actions.

--mgc --mgmt-group-config

Inline JSON string or path to a JSON/YAML file (.json, .yaml, .yml) containing connector-specific management-group configuration. The accepted key is 'managementGroupConfiguration' (connector-specific config object). Use --show-template to discover the supported keys and schema for the asset's connector type. Cannot be combined with --show-template. For non-OPC UA connectors, a connector template must exist in the instance.

--show-template

Show a starter management-group configuration template for the asset's connector type and exit without modifying the management group. The connector type is read from the existing asset. config: fields shown with their default values (null if no default); output is directly usable as --mgmt-group-config input. schema: every field includes type, default, and constraints (min, max, enum, pattern). Draft-07 $ref pointers (#/definitions/...) are resolved inline in both modes.

Property Value
Accepted values: config, schema
--tr --type-ref

Type definition ID or URI.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False