Share via


az iot ops rsync

Note

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

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

Resource sync rules management.

Commands

Name Description Type Status
az iot ops rsync disable

Disable edge to cloud hydration by deleting instance associated resource sync rules.

Extension Preview
az iot ops rsync enable

Enable edge to cloud hydration by creating resource sync rules for the instance.

Extension Preview
az iot ops rsync list

List resource sync rules associated with the instance.

Extension Preview

az iot ops rsync disable

Preview

Command group 'iot ops rsync' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Disable edge to cloud hydration by deleting instance associated resource sync rules.

az iot ops rsync disable --instance
                         --resource-group
                         [--yes {false, true}]

Examples

Disable resource sync for the target instance.

az iot ops rsync disable -n myinstance -g myresourcegroup

Required Parameters

--instance -i -n

IoT Operations instance name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--yes -y

Confirm [y]es without a prompt. Useful for CI and automation scenarios.

Accepted values: false, true
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az iot ops rsync enable

Preview

Command group 'iot ops rsync' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Enable edge to cloud hydration by creating resource sync rules for the instance.

This operation will create two resource sync rules. One for IoT Operations and one for Device Registry. It will then apply a role assignment between the K8 Bridge service principal and the IoT Operations instance custom location.

az iot ops rsync enable --instance
                        --resource-group
                        [--custom-role-id]
                        [--k8-bridge-sp-oid]
                        [--rule-adr-name]
                        [--rule-adr-pri]
                        [--rule-ops-name]
                        [--rule-ops-pri]
                        [--skip-ra {false, true}]
                        [--tags]

Examples

Enable resource sync for the instance.

az iot ops rsync enable -n myinstance -g myresourcegroup

Enable resource sync for the instance but skip the role assignment step.

az iot ops rsync enable -n myinstance -g myresourcegroup --skip-ra

Enable resource sync for the instance and explictly provide the K8 Bridge principal OID.

az iot ops rsync enable -n myinstance -g myresourcegroup --k8-bridge-sp-oid $TENANT_K8_BRIDGE_SP_OID

Enable resource sync for the instance with some customization.

az iot ops rsync enable -n myinstance -g myresourcegroup --rule-adr-name myadrsync --rule-ops-name myopsync --rule-adr-pri 100 --rule-ops-pri 200

Required Parameters

--instance -i -n

IoT Operations instance name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--custom-role-id

Fully qualified role definition Id in the following format: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/roleDefinitions/{roleId}.

--k8-bridge-sp-oid

Provide an explicit K8 Bridge service principal OID for the custom location role assignment. This is useful if the logged-in principal does not have permission to query apps from MS Graph.

--rule-adr-name

The desired name of the resource sync rule to create for Device Registry.

--rule-adr-pri

The desired priority of the resource sync rule to create for Device Registry.

--rule-ops-name

The desired name of the resource sync rule to create for IoT Operations.

--rule-ops-pri

The desired priority of the resource sync rule to create for IoT Operations.

--skip-ra

When used the role assignment step of the operation will be skipped.

Accepted values: false, true
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az iot ops rsync list

Preview

Command group 'iot ops rsync' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List resource sync rules associated with the instance.

az iot ops rsync list --instance
                      --resource-group

Examples

List resource sync rules associated with the instance.

az iot ops rsync list -n myinstance -g myresourcegroup

Required Parameters

--instance -i -n

IoT Operations instance name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.