Skip to content

Commit 164a6a4

Browse files
committed
Add example for creating Synapse scan via API
1 parent 8b43bf7 commit 164a6a4

File tree

1 file changed

+40
-5
lines changed

1 file changed

+40
-5
lines changed

articles/purview/register-scan-synapse-workspace.md

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: viseshag
66
ms.service: purview
77
ms.subservice: purview-data-map
88
ms.topic: how-to
9-
ms.date: 03/14/2022
9+
ms.date: 08/10/2022
1010
ms.custom: template-how-to, ignite-fall-2021
1111
---
1212

@@ -235,16 +235,51 @@ GRANT REFERENCES ON DATABASE SCOPED CREDENTIAL::[scoped_credential] TO [PurviewA
235235

236236
1. In the Azure portal, go to the Azure Synapse workspace.
237237

238-
1. On the left pane, select **Firewalls**.
238+
1. On the left pane, select **Networking**.
239239

240240
1. For **Allow Azure services and resources to access this workspace** control, select **ON**.
241241

242242
1. Select **Save**.
243243

244244
> [!IMPORTANT]
245-
> Currently, we do not support setting up scans for an Azure Synapse workspace from the Microsoft Purview governance portal, if you cannot enable **Allow Azure services and resources to access this workspace** on your Azure Synapse workspaces. In this case:
246-
> - You can use [Microsoft Purview REST API - Scans - Create Or Update](/rest/api/purview/scanningdataplane/scans/create-or-update/) to create a new scan for your Synapse workspaces including dedicated and serverless pools.
247-
> - You must use **SQL Auth** as authentication mechanism.
245+
> Currently, if you cannot enable **Allow Azure services and resources to access this workspace** on your Azure Synapse workspaces, when set up scan on Microsoft Purview governance portal, you will hit serverless DB enumeration failure. In this case, to scan serverless DBs, you can use [Microsoft Purview REST API - Scans - Create Or Update](/rest/api/purview/scanningdataplane/scans/create-or-update/) to set up scan. See below example.
246+
247+
Example of creating scan for serverless DB using API, replace the `{place_holder}` and `enum_option_1 | enum_option_2 (note)` value with your actual settings:
248+
249+
```http
250+
PUT https://{purview_account_name}.purview.azure.com/scan/datasources/<data_source_name>/scans/{scan_name}?api-version=2022-02-01-preview
251+
```
252+
253+
```json
254+
{
255+
"properties":{
256+
"resourceTypes":{
257+
"AzureSynapseServerlessSql":{
258+
"scanRulesetName":"AzureSynapseSQL",
259+
"scanRulesetType":"System",
260+
"resourceNameFilter":{
261+
"resources":[ "{serverless_database_name_1}", "{serverless_database_name_2}", ...]
262+
}
263+
}
264+
},
265+
"credential":{
266+
"referenceName":"{credential_name}",
267+
"credentialType":"SqlAuth | ServicePrincipal | ManagedIdentity (if UAMI authentication)"
268+
},
269+
"collection":{
270+
"referenceName":"{collection_name}",
271+
"type":"CollectionReference"
272+
},
273+
"connectedVia":{
274+
"referenceName":"{integration_runtime_name}",
275+
"integrationRuntimeType":"SelfHosted (if self-hosted IR) | Managed (if VNet IR)"
276+
}
277+
},
278+
"kind":"AzureSynapseWorkspaceCredential | AzureSynapseWorkspaceMsi (if system-assigned managed identity authentication)"
279+
}
280+
```
281+
282+
To schedule the scan, additionally create a trigger for it after scan creation, refer to [Triggers - Create Trigger](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/triggers/create-trigger?tabs=HTTP).
248283

249284
### Create and run scan
250285

0 commit comments

Comments
 (0)