Private Endpoints Support
Resource Provider Microsoft.Network
Description of Feature or Work Requested Support for private endpoints operations, new top level resource that provides private connectivity to azure resources, here a few sample operations:
Minimum API Version Required 2019-02-01
Swagger Link https://github.com/Azure/azure-rest-api-specs/pull/5860 Pending for merge to master
Target Date June release
###########################################
Private Endpoints CLI operations
###########################################
###########################################
Listing available endpoint types
API: GET "https://management.azure.com/subscriptions/{SUBSCRIPTION}/providers/Microsoft.Network/locations/{LOCATION}/availablePrivateEndpointTypes"
###########################################
az network list-private-endpoint-types -l "West US" { "value": [ { "name": "Microsoft.DocumentDB.databaseAccounts", "id": "/subscriptions/e05dbbce-79c2-45a2-a7ef-f1058856feb3/providers/Microsoft.Network/availablePrivateEndpointTypes/Microsoft.DocumentDB.databaseAccounts", "type": "Microsoft.Network/availablePrivateEndpointTypes", "resourceName": "Microsoft.DocumentDB/databaseAccounts" }, { "name": "Microsoft.Sql.servers", "id": "/subscriptions/e05dbbce-79c2-45a2-a7ef-f1058856feb3/providers/Microsoft.Network/availablePrivateEndpointTypes/Microsoft.Sql.servers", "type": "Microsoft.Network/availablePrivateEndpointTypes", "resourceName": "Microsoft.Sql/servers" }, { "name": "Microsoft.Network.privateLinkServers", "id": "/subscriptions/e05dbbce-79c2-45a2-a7ef-f1058856feb3/providers/Microsoft.Network/availablePrivateEndpointTypes/Microsoft.Network.privateLinkServers", "type": "Microsoft.Network/availablePrivateEndpointTypes", "resourceName": "Microsoft.Network/privateLinkServers" }, { "name": "Microsoft.Web.sites", "id": "/subscriptions/e05dbbce-79c2-45a2-a7ef-f1058856feb3/providers/Microsoft.Network/availablePrivateEndpointTypes/Microsoft.Web.sites", "type": "Microsoft.Network/availablePrivateEndpointTypes", "resourceName": "Microsoft.Web/sites" }, { "name": "Microsoft.Web.hostingEnvironments", "id": "/subscriptions/e05dbbce-79c2-45a2-a7ef-f1058856feb3/providers/Microsoft.Network/availablePrivateEndpointTypes/Microsoft.Web.hostingEnvironments", "type": "Microsoft.Network/availablePrivateEndpointTypes", "resourceName": "Microsoft.Web/hostingEnvironments" } ] }
###########################################
Private Endpoint CRUD
API: PUT/GET/DELETE "https://management.azure.com/subscriptions/{SUBSCRIPTION}/resourceGroups/{RESOURCE_GROUP}/providers/Microsoft.Network/privateEndpoints/{NAME}"
###########################################
az network private-endpoint create -g "MyResourceGroup" -n "MyPrivateEndpoint" -l "West US" --resourceId "$resourceId" --subnetId "$subnetId" az network private-endpoint create -g "MyResourceGroup" -n "MyPrivateEndpoint" -l "West US" --resourceId "$resourceId" --subnetId "$subnetId" --requestMethod Manual az network private-endpoint show -g "MyResourceGroup" -n "MyPrivateEndpoint" az network private-endpoint list az network private-endpoint delete -g "MyResourceGroup" -n "MyPrivateEndpoint"
az network private-endpoint list-required-FQDNs -g "MyResourceGroup" -n "MyPrivateEndpoint"
###########################################
Private Resource show
API: GET "https://management.azure.com/subscriptions/{SUBSCRIPTION}/resourceGroups/{RESOURCE_GROUP}/providers/Microsoft.{RP_NAME}/{NAME}/privateLinkResources"
###########################################
az network private-resource show -g "MyResourceGroup" -n "MySQL" --ResourceProviderName "Microsoft.Sql/server"
az network private-resource show --id "subscriptions/..../Microsoft.Sql/server/MySQL"
###########################################
Private Resource Connections list/show/approve/reject/delete
API: GET "https://management.azure.com/subscriptions/{SUBSCRIPTION}/resourceGroups/{RESOURCE_GROUP}/providers/Microsoft.{RP_NAME}/{NAME}/privateEndpointConnections"
###########################################
az network private-resource connections list -g "MyResourceGroup" -n "MySQL" --ResourceProviderName "Microsoft.Sql/server"
az network private-resource connections list --id "subscriptions/..../Microsoft.Sql/server/MySQL"
az network private-resource connections approve --id "subscriptions/..../Microsoft.Sql/server/MySQL" -n "MyConnectionName" --response-message "Welcome" az network private-resource connections reject --id "subscriptions/..../Microsoft.Sql/server/MySQL" -n "MyConnectionName" --response-message "Sorry" az network private-resource connections delete --id "subscriptions/..../Microsoft.Sql/server/MySQL" -n "MyConnectionName"
"name": "Microsoft.Network.privateLinkServers", "id": "/subscriptions/e05dbbce-79c2-45a2-a7ef-f1058856feb3/providers/Microsoft.Network/availablePrivateEndpointTypes/Microsoft.Network.privateLinkServers", "type": "Microsoft.Network/availablePrivateEndpointTypes", "resourceName": "Microsoft.Network/privateLinkServers"
This should be - "Microsoft.Network/privatelinkservices" not "Microsoft.Network.privateLinkServers"
@malopMSFT I don't see any support for "Private Resource show" or "Private Resource Connections list/show/approve/reject/delete" in the referenced swagger.
Moving to the backlog as this item is not ready to be worked.
@malopMSFT Hi. Recently, I'm working on this issue. I have a few questions and need your help.
- I don't fully understand the private-resources, especially the Private Resource Connections. In another issue https://github.com/Azure/azure-cli/issues/9475, private-link-service will have a command called
private-endpoint-connectionwhich can setprivate-link-service-connection-state. Here for the private resource connections, we have similar commands likeprivate-resource connections approve/reject. Do they manipulate the same resource or not? Based on the service name, I think there should beprivate-endpoint connections approve/reject. What's the relationship between the private-resource and private-endpoint? - Will the
private-resource connections approve/rejectcreate the connection? Because there is a command calledprivate-resource connections delete
@malopMSFT Besides, now, is our minimal API Version still 2019-02-01 or 2019-04-01?
@MyronFanQiu please use 2019-04-01, let's have a meeting to discuss the implementation of those options on the private endpoint connections area, is basically a generic method to list, approve and reject on multiple resource APIs
@malopMSFT Sounds good. Let's have a meeting tomorrow.