CmdID / az / az relationship / az relationship dependency-of
az relationship dependency-of create
Create a DependencyOfRelationship Azure CLI extensions reference
Create or update a dependencyOf relationship. This is a long-running operation.
2 examples 4 options Its page in the Azure CLI extensions reference
Examples
Create a dependency from a resource group to a service group
az relationship dependency-of create --resource-uri "/subscriptions/{sub}/resourceGroups/{rg}" --name myDependency --target-id "/providers/Microsoft.Management/serviceGroups/mySG"Identify--resource-uriThe fully qualified Azure Resource manager identifier of the resource.--nameName of dependencyOf relationship.--target-idThe relationship target resource id.Create a dependency from a subscription to a service group
az relationship dependency-of create --resource-uri "/subscriptions/{sub}" --name subDep --target-id "/providers/Microsoft.Management/serviceGroups/mySG"Identify--resource-uriThe fully qualified Azure Resource manager identifier of the resource.--nameName of dependencyOf relationship.--target-idThe relationship target resource id.Options
--nameName of dependencyOf relationship.--resource-uriThe fully qualified Azure Resource manager identifier of the resource.--target-idThe relationship target resource id.--target-tenantThe relationship target tenant id.