CmdID

CmdID / az / az relationship / az relationship contains

az relationship contains list

List ContainsRelationship resources by subscription ID Azure CLI extensions reference

Omit --resource-group to list at subscription scope. Use --filter for OData filtering.

2 examples 1 option Its page in the Azure CLI extensions reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from the Azure CLI, each command read by CmdID

List contains relationships in a subscription

az relationship contains list --subscription "{sub}"Identify
--subscriptionName or ID of subscription.

List resource-group containment relationships filtered by target type

az relationship contains list --subscription "{sub}" --resource-group "{rg}" --filter "properties.metadata.targetType eq 'Microsoft.Compute/virtualMachines'"Identify
--subscriptionName or ID of subscription.
--resource-groupName of resource group.
--filterFilters the results by target resource type.

Options

1 in the Azure CLI extensions reference
--filterFilters the results by target resource type.