Skip to content

Commit 64893e3

Browse files
authored
Merge pull request #207488 from linda33wj/purview
Add example for creating Synapse scan via API
2 parents 046ebd5 + bfde1e5 commit 64893e3

File tree

1 file changed

+42
-5
lines changed

1 file changed

+42
-5
lines changed

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

Lines changed: 42 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,14 @@ 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. Refer to [this example](#set-up-scan-using-api).
248246

249247
### Create and run scan
250248

@@ -275,6 +273,45 @@ To create and run a new scan, do the following:
275273

276274
[!INCLUDE [create and manage scans](includes/view-and-manage-scans.md)]
277275

276+
### Set up scan using API
277+
278+
Here is an 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.
279+
280+
```http
281+
PUT https://{purview_account_name}.purview.azure.com/scan/datasources/<data_source_name>/scans/{scan_name}?api-version=2022-02-01-preview
282+
```
283+
284+
```json
285+
{
286+
"properties":{
287+
"resourceTypes":{
288+
"AzureSynapseServerlessSql":{
289+
"scanRulesetName":"AzureSynapseSQL",
290+
"scanRulesetType":"System",
291+
"resourceNameFilter":{
292+
"resources":[ "{serverless_database_name_1}", "{serverless_database_name_2}", ...]
293+
}
294+
}
295+
},
296+
"credential":{
297+
"referenceName":"{credential_name}",
298+
"credentialType":"SqlAuth | ServicePrincipal | ManagedIdentity (if UAMI authentication)"
299+
},
300+
"collection":{
301+
"referenceName":"{collection_name}",
302+
"type":"CollectionReference"
303+
},
304+
"connectedVia":{
305+
"referenceName":"{integration_runtime_name}",
306+
"integrationRuntimeType":"SelfHosted (if self-hosted IR) | Managed (if VNet IR)"
307+
}
308+
},
309+
"kind":"AzureSynapseWorkspaceCredential | AzureSynapseWorkspaceMsi (if system-assigned managed identity authentication)"
310+
}
311+
```
312+
313+
To schedule the scan, additionally create a trigger for it after scan creation, refer to [Triggers - Create Trigger](/rest/api/purview/scanningdataplane/triggers/create-trigger).
314+
278315
## Next steps
279316

280317
Now that you've registered your source, follow the below guides to learn more about Microsoft Purview and your data.

0 commit comments

Comments
 (0)