fabric-cli

managed private endpoint examples

Type: .ManagedPrivateEndpoint

Supported commands: fab desc .ManagedPrivateEndpoint

Navigate to a managed private endpoint using cd command. Managed private endpoints are included in .managedprivateendpoints within a workspace. You can use relative and absolute paths based on current context.

# use absolute path
fab:/ws1.Workspace$ cd .managedprivateendpoints
* Switched to '.managedprivateendpoints'

# use relative path
fab:/ws1.Workspace$ cd .managedprivateendpoints/mpe1.ManagedPrivateEndpoint
* Switched to 'mpe1.ManagedPrivateEndpoint'

Checking if a managed private endpoint exists

Verify if a managed private endpoint exists. Using exists on .managedprivateendpoints has no effect.

fab:/ws1.Workspace$ exists .managedprivateendpoints/mpe1.ManagedPrivateEndpoint
* true

fab:/ws1.Workspace$ exists .managedprivateendpoints/mpe1_.ManagedPrivateEndpoint
* false

Getting and querying managed private endpoint details

Retrieve and query managed private endpoint details with -q (JMESPath query). Output the result to a local path or Lakehouse/Files with -o.

# get JSON properties
fab:/ws1.Workspace$ get .managedprivateendpoints/mpe1.ManagedPrivateEndpoint

# export JMESPath query result
fab:/ws1.Workspace$ get .managedprivateendpoints/mpe1.ManagedPrivateEndpoint -q . -o /tmp

Listing managed private endpoints

List existing managed private endpoints and their details using -l.

fab:/ws1.Workspace$ ls .managedprivateendpoints
fab:/ws1.Workspace$ ls .managedprivateendpoints -l

Creating a managed private endpoint

Create a managed private endpoint (MPE) with required parameters -P. Check supported endpoints, resource ID formats, and subresource types.

# create a managed private endpoint to ADLS Gen2
fab:/ws1.Workspace$ create .managedprivateendpoints/mpe1.ManagedPrivateEndpoint -P targetprivatelinkresourceid=/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.Storage/storageAccounts/<storage_account_name>,targetsubresourcetype=dfs
Creating a new Managed Private Endpoint...
* 'mpe1.ManagedPrivateEndpoint' created

# create a managed private endpoint to SQL Server and Auto Approve it
fab:/ws1.Workspace$ create .managedprivateendpoints/mpe2.ManagedPrivateEndpoint -P targetprivatelinkresourceid=/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.Sql/servers/<sql_server_name>,targetsubresourcetype=sqlServer,autoApproveEnabled=true
Creating a new Managed Private Endpoint...
* 'mpe2.ManagedPrivateEndpoint' created
Approving the Managed Private Endpoint...
* 'mpe2.ManagedPrivateEndpoint' approved

Removing a managed private endpoint

Remove a managed private endpoint. MPE cannot be in Provisioning state for removal. Use -f to force.

fab:/ws1.Workspace$ rm .managedprivateendpoints/mpe1.ManagedPrivateEndpoint
fab:/ws1.Workspace$ rm .managedprivateendpoints/mpe1.ManagedPrivateEndpoint -f

See all examples