az network private-endpoint-connection doesn't recognise Microsoft.Sql/managedInstances as a valid type
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
Hi,
I'm trying to retrieve the list of private endpoints that belongs to an Azure SQL Managed Instance.
To achieve that, I'm using the command `az network private-endpoint-connection show`:
`az network private-endpoint-connection show -g myRG -n myPrivateEndpoint--resource-name mySQLMI --type Microsoft.Sql/managedInstances`
See the full error below.
The same error will happen for any for the command of az network private-endpoint-connection (show, list, approve, etc).
However, SQL MI supports Private endpoint since [early 2023.](https://techcommunity.microsoft.com/blog/azuresqlblog/private-endpoints-for-azure-sql-managed-instance/3782015)
Also, the list of private endpoints that belongs to an Azure SQL Managed Instance is retrievable through the [REST API.](https://learn.microsoft.com/en-us/rest/api/sql/managed-instance-private-endpoint-connections/list-by-managed-instance)
So there is probably an update needed to the command az network private-endpoint-connection to add the support of SQL Managed Instance.
In the mean time, I'll use the REST API to cover my use case.
Thank you for your support and feedback.
Note: I already opened a similar issue for Azure PowerShell [Azure/azure-powershell/issues/27081](https://github.com/Azure/azure-powershell/issues/27081)
### Related command
`az network private-endpoint-connection show -g myRG -n myPrivateEndpoint--resource-name mySQLMI --type Microsoft.Sql/managedInstances`
### Errors
az network private-endpoint-connection show: 'Microsoft.Sql/managedInstances' is not a valid value for '--type'. Allowed values: Microsoft.AgFoodPlatform/farmBeats, Microsoft.Automation/automationAccounts, Microsoft.Authorization/resourceManagementPrivateLinks, Microsoft.ApiManagement/service, Microsoft.AppConfiguration/configurationStores, Microsoft.Batch/batchAccounts, Microsoft.BotService/botServices, Microsoft.Cache/Redis, Microsoft.CognitiveServices/accounts, Microsoft.Compute/diskAccesses, Microsoft.ContainerRegistry/registries, Microsoft.Dashboard/grafana, Microsoft.DBforMySQL/servers, Microsoft.DBforMariaDB/servers, Microsoft.DBforPostgreSQL/servers, Microsoft.DBforPostgreSQL/serverGroupsv2, Microsoft.DesktopVirtualization/hostpools, Microsoft.DesktopVirtualization/workspaces, Microsoft.Devices/IotHubs, Microsoft.DeviceUpdate/accounts, Microsoft.DocumentDB/databaseAccounts, Microsoft.DigitalTwins/digitalTwinsInstances, Microsoft.ElasticSan/elasticSans, Microsoft.EventGrid/topics, Microsoft.EventGrid/domains, Microsoft.EventGrid/partnerNamespaces, Microsoft.EventGrid/namespaces, Microsoft.EventHub/namespaces, Microsoft.HardwareSecurityModules/cloudHsmClusters, Microsoft.HDInsight/clusters, Microsoft.HybridCompute/privateLinkScopes, Microsoft.HealthcareApis/services, Microsoft.HealthDataAiservices/deidservices, microsoft.insights/privateLinkScopes, Microsoft.KeyVault/managedHSMs, Microsoft.Keyvault/vaults, Microsoft.MachineLearningServices/workspaces, Microsoft.Media/mediaservices, Microsoft.Monitor/accounts, Microsoft.Network/applicationGateways, Microsoft.Network/privateLinkServices, Microsoft.Purview/accounts, Microsoft.PowerBI/privateLinkServicesForPowerBI, Microsoft.Search/searchServices, Microsoft.ServiceBus/namespaces, Microsoft.SignalRService/signalr, Microsoft.Sql/servers, Microsoft.Storage/storageAccounts, Microsoft.StorageSync/storageSyncServices, Microsoft.Synapse/workspaces, Microsoft.Web/sites, Microsoft.Web/hostingEnvironments, Microsoft.SignalRService/WebPubSub, Microsoft.DataFactory/factories, Microsoft.Databricks/workspaces, Microsoft.RecoveryServices/vaults, Microsoft.Kusto/clusters, Microsoft.KubernetesConfiguration/privateLinkScopes, Microsoft.OpenEnergyPlatform/energyServices, Microsoft.MachineLearningServices/registries, Microsoft.DBforMySQL/flexibleServers, Microsoft.DocumentDB/mongoClusters, Microsoft.DBforPostgreSQL/flexibleServers, Microsoft.App/managedEnvironments.
### Issue script & Debug output
cli.knack.cli: Command arguments: ['network', 'private-endpoint-connection', 'show', '-myRG', '-n', 'myPrivateEndpoint', '--resource-name', 'mySQLMI', '--type', 'Microsoft.Sql/managedInstances', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [, , ]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'network': ['azure.cli.command_modules.network', 'azure.cli.command_modules.privatedns']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: network 0.235 118 362
cli.azure.cli.core: privatedns 0.007 14 60
cli.azure.cli.core: Total (2) 0.242 132 422
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: Total (0) 0.000 0 0
cli.azure.cli.core: Loaded 131 groups, 422 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : network private-endpoint-connection show
cli.azure.cli.core: Command table: network private-endpoint-connection show
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate []
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/xxx/.azure/commands/2025-05-07.16-46-28.network_private-endpoint-connection_show.15814.log'.
az_command_data_logger: command args: network private-endpoint-connection show -g {} -n {} --resource-name {} --type {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [.add_subscription_parameter at 0x101fcca40>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [.add_ids_arguments at 0x101fcf2e0>, .add_cache_arguments at 0x101fcf420>, .update_breaking_change_info at 0x101fcf4c0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
urllib3.connectionpool: Starting new HTTPS connection (1): app.aladdin.microsoft.com:443
urllib3.connectionpool: https://app.aladdin.microsoft.com:443 "GET /api/v1.0/suggestions?query=%7B%22command%22%3A+%22network+private-endpoint-connection+show%22%2C+%22parameters%22%3A+%22--type%2C--name%2C--resource-name%2C--resource-group%22%7D&clientType=AzureCli&context=%7B%22versionNumber%22%3A+%222.72.0%22%2C+%22errorType%22%3A+%22InvalidParameterValue%22%2C+%22correlationId%22%3A+%229af52f43-eb23-4271-b844-149afc60d530%22%2C+%22subscriptionId%22%3A+%223ca2bf68-8090-4ba9-b009-e923f5be09dd%22%2C+%22eventId%22%3A+%2269f54f40-bac0-438b-89ce-2101c63ae260%22%7D HTTP/1.1" 200 None
cli.azure.cli.core.azclierror: NoneType: None
cli.azure.cli.core.azclierror: az network private-endpoint-connection show: 'Microsoft.Sql/managedInstances' is not a valid value for '--type'. Allowed values: Microsoft.AgFoodPlatform/farmBeats, Microsoft.Automation/automationAccounts, Microsoft.Authorization/resourceManagementPrivateLinks, Microsoft.ApiManagement/service, Microsoft.AppConfiguration/configurationStores, Microsoft.Batch/batchAccounts, Microsoft.BotService/botServices, Microsoft.Cache/Redis, Microsoft.CognitiveServices/accounts, Microsoft.Compute/diskAccesses, Microsoft.ContainerRegistry/registries, Microsoft.Dashboard/grafana, Microsoft.DBforMySQL/servers, Microsoft.DBforMariaDB/servers, Microsoft.DBforPostgreSQL/servers, Microsoft.DBforPostgreSQL/serverGroupsv2, Microsoft.DesktopVirtualization/hostpools, Microsoft.DesktopVirtualization/workspaces, Microsoft.Devices/IotHubs, Microsoft.DeviceUpdate/accounts, Microsoft.DocumentDB/databaseAccounts, Microsoft.DigitalTwins/digitalTwinsInstances, Microsoft.ElasticSan/elasticSans, Microsoft.EventGrid/topics, Microsoft.EventGrid/domains, Microsoft.EventGrid/partnerNamespaces, Microsoft.EventGrid/namespaces, Microsoft.EventHub/namespaces, Microsoft.HardwareSecurityModules/cloudHsmClusters, Microsoft.HDInsight/clusters, Microsoft.HybridCompute/privateLinkScopes, Microsoft.HealthcareApis/services, Microsoft.HealthDataAiservices/deidservices, microsoft.insights/privateLinkScopes, Microsoft.KeyVault/managedHSMs, Microsoft.Keyvault/vaults, Microsoft.MachineLearningServices/workspaces, Microsoft.Media/mediaservices, Microsoft.Monitor/accounts, Microsoft.Network/applicationGateways, Microsoft.Network/privateLinkServices, Microsoft.Purview/accounts, Microsoft.PowerBI/privateLinkServicesForPowerBI, Microsoft.Search/searchServices, Microsoft.ServiceBus/namespaces, Microsoft.SignalRService/signalr, Microsoft.Sql/servers, Microsoft.Storage/storageAccounts, Microsoft.StorageSync/storageSyncServices, Microsoft.Synapse/workspaces, Microsoft.Web/sites, Microsoft.Web/hostingEnvironments, Microsoft.SignalRService/WebPubSub, Microsoft.DataFactory/factories, Microsoft.Databricks/workspaces, Microsoft.RecoveryServices/vaults, Microsoft.Kusto/clusters, Microsoft.KubernetesConfiguration/privateLinkScopes, Microsoft.OpenEnergyPlatform/energyServices, Microsoft.MachineLearningServices/registries, Microsoft.DBforMySQL/flexibleServers, Microsoft.DocumentDB/mongoClusters, Microsoft.DBforPostgreSQL/flexibleServers, Microsoft.App/managedEnvironments.
az_command_data_logger: az network private-endpoint-connection show: 'Microsoft.Sql/managedInstances' is not a valid value for '--type'. Allowed values: Microsoft.AgFoodPlatform/farmBeats, Microsoft.Automation/automationAccounts, Microsoft.Authorization/resourceManagementPrivateLinks, Microsoft.ApiManagement/service, Microsoft.AppConfiguration/configurationStores, Microsoft.Batch/batchAccounts, Microsoft.BotService/botServices, Microsoft.Cache/Redis, Microsoft.CognitiveServices/accounts, Microsoft.Compute/diskAccesses, Microsoft.ContainerRegistry/registries, Microsoft.Dashboard/grafana, Microsoft.DBforMySQL/servers, Microsoft.DBforMariaDB/servers, Microsoft.DBforPostgreSQL/servers, Microsoft.DBforPostgreSQL/serverGroupsv2, Microsoft.DesktopVirtualization/hostpools, Microsoft.DesktopVirtualization/workspaces, Microsoft.Devices/IotHubs, Microsoft.DeviceUpdate/accounts, Microsoft.DocumentDB/databaseAccounts, Microsoft.DigitalTwins/digitalTwinsInstances, Microsoft.ElasticSan/elasticSans, Microsoft.EventGrid/topics, Microsoft.EventGrid/domains, Microsoft.EventGrid/partnerNamespaces, Microsoft.EventGrid/namespaces, Microsoft.EventHub/namespaces, Microsoft.HardwareSecurityModules/cloudHsmClusters, Microsoft.HDInsight/clusters, Microsoft.HybridCompute/privateLinkScopes, Microsoft.HealthcareApis/services, Microsoft.HealthDataAiservices/deidservices, microsoft.insights/privateLinkScopes, Microsoft.KeyVault/managedHSMs, Microsoft.Keyvault/vaults, Microsoft.MachineLearningServices/workspaces, Microsoft.Media/mediaservices, Microsoft.Monitor/accounts, Microsoft.Network/applicationGateways, Microsoft.Network/privateLinkServices, Microsoft.Purview/accounts, Microsoft.PowerBI/privateLinkServicesForPowerBI, Microsoft.Search/searchServices, Microsoft.ServiceBus/namespaces, Microsoft.SignalRService/signalr, Microsoft.Sql/servers, Microsoft.Storage/storageAccounts, Microsoft.StorageSync/storageSyncServices, Microsoft.Synapse/workspaces, Microsoft.Web/sites, Microsoft.Web/hostingEnvironments, Microsoft.SignalRService/WebPubSub, Microsoft.DataFactory/factories, Microsoft.Databricks/workspaces, Microsoft.RecoveryServices/vaults, Microsoft.Kusto/clusters, Microsoft.KubernetesConfiguration/privateLinkScopes, Microsoft.OpenEnergyPlatform/energyServices, Microsoft.MachineLearningServices/registries, Microsoft.DBforMySQL/flexibleServers, Microsoft.DocumentDB/mongoClusters, Microsoft.DBforPostgreSQL/flexibleServers, Microsoft.App/managedEnvironments.
Examples from AI knowledge base:
az network private-endpoint-connection show -g MyResourceGroup -n MyPrivateEndpoint --resource-name MySA --type Microsoft.Storage/storageAccounts
Show a private endpoint connection for a storage account.
az network private-endpoint-connection show -g MyResourceGroup -n MyPrivateEndpoint --resource-name MyKV --type Microsoft.Keyvault/vaults
Show a private endpoint connection for a keyvault.
az network private-endpoint-connection show --id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/testreg000002/privateEndpointConnections/testreg000002.6e6bf72bc59d41cc89c698d4cc5ee79d
Show a private endpoint connection for an ACR.
https://aka.ms/cli_ref
Read more about the command in reference docs
cli.knack.cli: Event: Cli.PostExecute []
az_command_data_logger: exit code: 2
cli.__main__: Command ran in 0.542 seconds (init: 0.072, invoke: 0.470)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 7030 in cache file under /Users/xxx/.azure/telemetry/20250507164628509
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/homebrew/Cellar/azure-cli/2.72.0/libexec/bin/python /opt/homebrew/Cellar/azure-cli/2.72.0/libexec/lib/python3.12/site-packages/azure/cli/telemetry/__init__.py /Users/xxx/.azure /Users/xxx/.azure/telemetry/20250507164628509"
telemetry.process: Return from creating process 15819
telemetry.main: Finish creating telemetry upload process.
### Expected behavior
The command should show the list of private endpoint connection for an SQLMI.
### Environment Summary
azure-cli 2.72.0
core 2.72.0
telemetry 1.1.0
Extensions:
connectedmachine 1.0.0
Dependencies:
msal 1.32.3
azure-mgmt-resource 23.1.1
Python location '/opt/homebrew/Cellar/azure-cli/2.72.0/libexec/bin/python'
Config directory '/Users/xxx/.azure'
Extensions directory '/Users/xxx/.azure/cliextensions'
Python (Darwin) 3.12.10 (main, Apr 8 2025, 11:35:47) [Clang 16.0.0 (clang-1600.0.26.6)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.