question

RomanPijacek-2221 avatar image
0 Votes"
RomanPijacek-2221 asked ShaikMaheer-MSFT commented

Azure Synapse: Managed Private Endpoints Deployment

Please, is there any way (ARM, CLI, PowerShell, etc.) how to deploy Managed Private Endpoints in Azure Synapse Analytics?
Currently, we create the Managed Private Endpoints in Azure Synapse Web Studio manually as a part of Post-Deployment Steps as described here: https://docs.microsoft.com/en-us/azure/synapse-analytics/security/how-to-create-managed-private-endpoints but ideally, we'd like to automate this and include in the existing Azure DevOps pipeline. Thanks a lot, Roman


azure-synapse-analytics
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @RomanPijacek-2221 ,

Following up to check is below provided answers helps you? If yes, Please Accept Answer. Accepting answer helps community too. Thank you.

0 Votes 0 ·

Hi @RomanPijacek-2221 ,

Just checking is below provided answers helps you? If yes, Please Accept Answer. Accepting answer helps community too. Please let us know if any further queries. Thank you.

0 Votes 0 ·

1 Answer

ShaikMaheer-MSFT avatar image
0 Votes"
ShaikMaheer-MSFT answered ShaikMaheer-MSFT commented

Hi @RomanPijacek-2221 ,

Thank you for posting your query in Microsoft Q&A Platform.

Below Rest API allows you to create managed end points programmatically. Can you utilize this REST API calls to automate your process.
https://docs.microsoft.com/en-us/rest/api/synapse/data-plane/managed-private-endpoints/create

Check below link to know about REST APIs for other operations on Managed private end points.
https://docs.microsoft.com/en-us/rest/api/synapse/data-plane/managed-private-endpoints

Hope this will help. Please let us know if any further queries. Thank you.


  • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

  • Want a reminder to come back and check responses? Here is how to subscribe to a notification.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @ShaikMaheer-MSFT

thank you for sharing the link to the Managed Private Endpoints REST API doc. I finally managed to test the REST API calls from our Azure DevOps pipeline, using PowerShell Invoke-RestMethod command. Sharing the PowerShell code snippet below:

 # Creating MPE to ADLSGen2
 $tokenObject = Get-AzAccessToken -ResourceUrl "https://dev.azuresynapse.net"
 $token = $tokenObject.Token
    
 $url = "https://my-synapse-ws.dev.azuresynapse.net/managedVirtualNetworks/default/managedPrivateEndpoints/mpe-name?api-version=2020-12-01"
 $headers = @{
     'Authorization' = "Bearer $token"
     'content-type'  = 'application/json; charset=utf-8'
 }
 $body = @'
     {
         "name": "mpe-name",
         "properties": {
             "privateLinkResourceId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/my-resource-group-name/providers/Microsoft.Storage/storageAccounts/myadlsname",
             "groupId": "dfs"
         }
     }
 '@
    
 Invoke-RestMethod -Uri $url -Method 'Put' -Headers $headers -Body $body -ContentType "application/json"

This script successfully creates a new managed private endpoint in Synapse Workspace:

124372-image.png

Thank you and have a good day,
Roman


0 Votes 0 ·
image.png (7.7 KiB)

Hi @RomanPijacek-2221 ,

Awesome. Thank you for sharing sample code. This will help community as well.

0 Votes 0 ·