Scans - Create Or Update

Creates an instance of a scan

PUT {Endpoint}/scan/datasources/{dataSourceName}/scans/{scanName}?api-version=2022-02-01-preview

URI Parameters

Name In Required Type Description
dataSourceName
path True
  • string
Endpoint
path True
  • string

The scanning endpoint of your purview account. Example: https://{accountName}.purview.azure.com

scanName
path True
  • string
api-version
query True
  • string

The api version to use.

Request Body

The request body can be one of the following:

Name Description
AdlsGen1CredentialScan
AdlsGen1MsiScan
AdlsGen2CredentialScan
AdlsGen2MsiScan
AmazonAccountCredentialScan
AmazonPostgreSqlCredentialScan
AmazonPostgreSqlRoleARNScan
AmazonS3CredentialScan
AmazonS3RoleARNScan
AmazonSqlCredentialScan
AzureCosmosDbCredentialScan
AzureDataExplorerCredentialScan
AzureDataExplorerMsiScan
AzureFileServiceCredentialScan
AzureMySqlCredentialScan
AzurePostgreSqlCredentialScan
AzureResourceGroupCredentialScan
AzureResourceGroupMsiScan
AzureSqlDatabaseCredentialScan
AzureSqlDatabaseManagedInstanceCredentialScan
AzureSqlDatabaseManagedInstanceMsiScan
AzureSqlDatabaseMsiScan
AzureSqlDataWarehouseCredentialScan
AzureSqlDataWarehouseMsiScan
AzureStorageCredentialScan
AzureStorageMsiScan
AzureSubscriptionCredentialScan
AzureSubscriptionMsiScan
AzureSynapseCredentialScan
AzureSynapseMsiScan
AzureSynapseWorkspaceCredentialScan
AzureSynapseWorkspaceMsiScan
OracleOracleCredentialScan
OracleOracleUserPassScan
PowerBIDelegatedScan
PowerBIMsiScan
SapEccSapEccCredentialScan
SapEccSapEccUserPassScan
SapS4HanaSapS4HanaCredentialScan
SapS4HanaSapS4HanaUserPassScan
SqlServerDatabaseCredentialScan
TeradataTeradataCredentialScan
TeradataTeradataUserPassScan
TeradataUserPassScan

AdlsGen1CredentialScan

Name Required Type Description
kind True string:
  • AdlsGen1Credential
properties

AdlsGen1MsiScan

Name Required Type Description
kind True string:
  • AdlsGen1Msi
properties

AdlsGen2CredentialScan

Name Required Type Description
kind True string:
  • AdlsGen2Credential
properties

AdlsGen2MsiScan

Name Required Type Description
kind True string:
  • AdlsGen2Msi
properties

AmazonAccountCredentialScan

Name Required Type Description
kind True string:
  • AmazonAccountCredential
properties

AmazonPostgreSqlCredentialScan

Name Required Type Description
kind True string:
  • AmazonPostgreSqlCredential
properties

AmazonPostgreSqlRoleARNScan

Name Required Type Description
kind True string:
  • AmazonPostgreSqlRoleARN
properties

AmazonS3CredentialScan

Name Required Type Description
kind True string:
  • AmazonS3Credential
properties

AmazonS3RoleARNScan

Name Required Type Description
kind True string:
  • AmazonS3RoleARN
properties

AmazonSqlCredentialScan

Name Required Type Description
kind True string:
  • AmazonSqlCredential
properties

AzureCosmosDbCredentialScan

Name Required Type Description
kind True string:
  • AzureCosmosDbCredential
properties

AzureDataExplorerCredentialScan

Name Required Type Description
kind True string:
  • AzureDataExplorerCredential
properties

AzureDataExplorerMsiScan

Name Required Type Description
kind True string:
  • AzureDataExplorerMsi
properties

AzureFileServiceCredentialScan

Name Required Type Description
kind True string:
  • AzureFileServiceCredential
properties

AzureMySqlCredentialScan

Name Required Type Description
kind True string:
  • AzureMySqlCredential
properties

AzurePostgreSqlCredentialScan

Name Required Type Description
kind True string:
  • AzurePostgreSqlCredential
properties

AzureResourceGroupCredentialScan

Name Required Type Description
kind True string:
  • AzureResourceGroupCredential
properties

AzureResourceGroupMsiScan

Name Required Type Description
kind True string:
  • AzureResourceGroupMsi
properties

AzureSqlDatabaseCredentialScan

Name Required Type Description
kind True string:
  • AzureSqlDatabaseCredential
properties

AzureSqlDatabaseManagedInstanceCredentialScan

Name Required Type Description
kind True string:
  • AzureSqlDatabaseManagedInstanceCredential
properties

AzureSqlDatabaseManagedInstanceMsiScan

Name Required Type Description
kind True string:
  • AzureSqlDatabaseManagedInstanceMsi
properties

AzureSqlDatabaseMsiScan

Name Required Type Description
kind True string:
  • AzureSqlDatabaseMsi
properties

AzureSqlDataWarehouseCredentialScan

Name Required Type Description
kind True string:
  • AzureSqlDataWarehouseCredential
properties

AzureSqlDataWarehouseMsiScan

Name Required Type Description
kind True string:
  • AzureSqlDataWarehouseMsi
properties

AzureStorageCredentialScan

Name Required Type Description
kind True string:
  • AzureStorageCredential
properties

AzureStorageMsiScan

Name Required Type Description
kind True string:
  • AzureStorageMsi
properties

AzureSubscriptionCredentialScan

Name Required Type Description
kind True string:
  • AzureSubscriptionCredential
properties

AzureSubscriptionMsiScan

Name Required Type Description
kind True string:
  • AzureSubscriptionMsi
properties

AzureSynapseCredentialScan

Name Required Type Description
kind True string:
  • AzureSynapseCredential
properties

AzureSynapseMsiScan

Name Required Type Description
kind True string:
  • AzureSynapseMsi
properties

AzureSynapseWorkspaceCredentialScan

Name Required Type Description
kind True string:
  • AzureSynapseWorkspaceCredential
properties

AzureSynapseWorkspaceMsiScan

Name Required Type Description
kind True string:
  • AzureSynapseWorkspaceMsi
properties

OracleOracleCredentialScan

Name Required Type Description
kind True string:
  • OracleOracleCredential
properties

OracleOracleUserPassScan

Name Required Type Description
kind True string:
  • OracleOracleUserPass
properties

PowerBIDelegatedScan

Name Required Type Description
kind True string:
  • PowerBIDelegated
properties

PowerBIMsiScan

Name Required Type Description
kind True string:
  • PowerBIMsi
properties

SapEccSapEccCredentialScan

Name Required Type Description
kind True string:
  • SapEccSapEccCredential
properties

SapEccSapEccUserPassScan

Name Required Type Description
kind True string:
  • SapEccSapEccUserPass
properties

SapS4HanaSapS4HanaCredentialScan

Name Required Type Description
kind True string:
  • SapS4HanaSapS4HanaCredential
properties

SapS4HanaSapS4HanaUserPassScan

Name Required Type Description
kind True string:
  • SapS4HanaSapS4HanaUserPass
properties

SqlServerDatabaseCredentialScan

Name Required Type Description
kind True string:
  • SqlServerDatabaseCredential
properties

TeradataTeradataCredentialScan

Name Required Type Description
kind True string:
  • TeradataTeradataCredential
properties

TeradataTeradataUserPassScan

Name Required Type Description
kind True string:
  • TeradataTeradataUserPass
properties

TeradataUserPassScan

Name Required Type Description
kind True string:
  • TeradataUserPass
properties

Responses

Name Type Description
200 OK Scan:

Success

201 Created Scan:

Success

Other Status Codes

An error response received from the Scanning Service

Examples

Scans_CreateOrUpdate

Sample Request

PUT {Endpoint}/scan/datasources/myDataSource/scans/myScanName?api-version=2022-02-01-preview

{
  "kind": "AzureStorageCredential",
  "properties": {
    "credential": {
      "referenceName": "CredentialAKV",
      "credentialType": "AccountKey"
    },
    "connectedVia": null,
    "scanRulesetName": "AzureStorage",
    "scanRulesetType": "System",
    "collection": {
      "referenceName": "Collection-rZX",
      "type": "CollectionReference"
    }
  }
}

Sample Response

x-ms-request-id: d5496da4-9c52-402f-b067-83cc9ddea888
{
  "name": "myScanName",
  "id": "datasources/myDataSource/scans/myScanName",
  "kind": "AzureStorageCredential",
  "properties": {
    "credential": {
      "referenceName": "CredentialAKV",
      "credentialType": "AccountKey"
    },
    "connectedVia": null,
    "scanRulesetName": "AzureStorage",
    "scanRulesetType": "System",
    "workers": null,
    "collection": {
      "lastModifiedAt": "2021-09-15T21:20:08.2944382Z",
      "referenceName": "Collection-rZX",
      "type": "CollectionReference"
    }
  },
  "scanResults": null
}
x-ms-request-id: d5496da4-9c52-402f-b067-83cc9ddea888
{
  "name": "myScanName",
  "id": "datasources/myDataSource/scans/myScanName",
  "kind": "AzureStorageCredential",
  "properties": {
    "credential": {
      "referenceName": "CredentialAKV",
      "credentialType": "AccountKey"
    },
    "scanRulesetName": "AzureStorage",
    "scanRulesetType": "System",
    "workers": null,
    "collection": {
      "lastModifiedAt": "2021-09-15T21:20:08.2944382Z",
      "referenceName": "Collection-rZX",
      "type": "CollectionReference"
    }
  },
  "scanResults": null
}

Definitions

AdlsGen1CredentialScan
AdlsGen1MsiScan
AdlsGen2CredentialScan
AdlsGen2MsiScan
AmazonAccountCredentialScan
AmazonPostgreSqlCredentialScan
AmazonPostgreSqlRoleARNScan
AmazonS3CredentialScan
AmazonS3RoleARNScan
AmazonSqlCredentialScan
AzureCosmosDbCredentialScan
AzureDataExplorerCredentialScan
AzureDataExplorerMsiScan
AzureFileServiceCredentialScan
AzureMySqlCredentialScan
AzurePostgreSqlCredentialScan
AzureResourceGroupCredentialScan
AzureResourceGroupMsiScan
AzureSqlDatabaseCredentialScan
AzureSqlDatabaseManagedInstanceCredentialScan
AzureSqlDatabaseManagedInstanceMsiScan
AzureSqlDatabaseMsiScan
AzureSqlDataWarehouseCredentialScan
AzureSqlDataWarehouseMsiScan
AzureStorageCredentialScan
AzureStorageMsiScan
AzureSubscriptionCredentialScan
AzureSubscriptionMsiScan
AzureSynapseCredentialScan
AzureSynapseMsiScan
AzureSynapseWorkspaceCredentialScan
AzureSynapseWorkspaceMsiScan
DataSourceType
Diagnostics
Error
ErrorModel
ErrorResponseModel
Notification
OracleOracleCredentialScan
OracleOracleUserPassScan
PowerBIDelegatedScan
PowerBIMsiScan
Properties
SapEccSapEccCredentialScan
SapEccSapEccUserPassScan
SapS4HanaSapS4HanaCredentialScan
SapS4HanaSapS4HanaUserPassScan
ScanLevelType
ScanResult
ScanRulesetType
SqlServerDatabaseCredentialScan
TeradataTeradataCredentialScan
TeradataTeradataUserPassScan
TeradataUserPassScan

AdlsGen1CredentialScan

Name Type Description
id
  • string
kind string:
  • AdlsGen1Credential
name
  • string
properties
scanResults

AdlsGen1MsiScan

Name Type Description
id
  • string
kind string:
  • AdlsGen1Msi
name
  • string
properties
scanResults

AdlsGen2CredentialScan

Name Type Description
id
  • string
kind string:
  • AdlsGen2Credential
name
  • string
properties
scanResults

AdlsGen2MsiScan

Name Type Description
id
  • string
kind string:
  • AdlsGen2Msi
name
  • string
properties
scanResults

AmazonAccountCredentialScan

Name Type Description
id
  • string
kind string:
  • AmazonAccountCredential
name
  • string
properties
scanResults

AmazonPostgreSqlCredentialScan

Name Type Description
id
  • string
kind string:
  • AmazonPostgreSqlCredential
name
  • string
properties
scanResults

AmazonPostgreSqlRoleARNScan

Name Type Description
id
  • string
kind string:
  • AmazonPostgreSqlRoleARN
name
  • string
properties
scanResults

AmazonS3CredentialScan

Name Type Description
id
  • string
kind string:
  • AmazonS3Credential
name
  • string
properties
scanResults

AmazonS3RoleARNScan

Name Type Description
id
  • string
kind string:
  • AmazonS3RoleARN
name
  • string
properties
scanResults

AmazonSqlCredentialScan

Name Type Description
id
  • string
kind string:
  • AmazonSqlCredential
name
  • string
properties
scanResults

AzureCosmosDbCredentialScan

Name Type Description
id
  • string
kind string:
  • AzureCosmosDbCredential
name
  • string
properties
scanResults

AzureDataExplorerCredentialScan

Name Type Description
id
  • string
kind string:
  • AzureDataExplorerCredential
name
  • string
properties
scanResults

AzureDataExplorerMsiScan

Name Type Description
id
  • string
kind string:
  • AzureDataExplorerMsi
name
  • string
properties
scanResults

AzureFileServiceCredentialScan

Name Type Description
id
  • string
kind string:
  • AzureFileServiceCredential
name
  • string
properties
scanResults

AzureMySqlCredentialScan

Name Type Description
id
  • string
kind string:
  • AzureMySqlCredential
name
  • string
properties
scanResults

AzurePostgreSqlCredentialScan

Name Type Description
id
  • string
kind string:
  • AzurePostgreSqlCredential
name
  • string
properties
scanResults

AzureResourceGroupCredentialScan

Name Type Description
id
  • string
kind string:
  • AzureResourceGroupCredential
name
  • string
properties
scanResults

AzureResourceGroupMsiScan

Name Type Description
id
  • string
kind string:
  • AzureResourceGroupMsi
name
  • string
properties
scanResults

AzureSqlDatabaseCredentialScan

Name Type Description
id
  • string
kind string:
  • AzureSqlDatabaseCredential
name
  • string
properties
scanResults

AzureSqlDatabaseManagedInstanceCredentialScan

Name Type Description
id
  • string
kind string:
  • AzureSqlDatabaseManagedInstanceCredential
name
  • string
properties
scanResults

AzureSqlDatabaseManagedInstanceMsiScan

Name Type Description
id
  • string
kind string:
  • AzureSqlDatabaseManagedInstanceMsi
name
  • string
properties
scanResults

AzureSqlDatabaseMsiScan

Name Type Description
id
  • string
kind string:
  • AzureSqlDatabaseMsi
name
  • string
properties
scanResults

AzureSqlDataWarehouseCredentialScan

Name Type Description
id
  • string
kind string:
  • AzureSqlDataWarehouseCredential
name
  • string
properties
scanResults

AzureSqlDataWarehouseMsiScan

Name Type Description
id
  • string
kind string:
  • AzureSqlDataWarehouseMsi
name
  • string
properties
scanResults

AzureStorageCredentialScan

Name Type Description
id
  • string
kind string:
  • AzureStorageCredential
name
  • string
properties
scanResults

AzureStorageMsiScan

Name Type Description
id
  • string
kind string:
  • AzureStorageMsi
name
  • string
properties
scanResults

AzureSubscriptionCredentialScan

Name Type Description
id
  • string
kind string:
  • AzureSubscriptionCredential
name
  • string
properties
scanResults

AzureSubscriptionMsiScan

Name Type Description
id
  • string
kind string:
  • AzureSubscriptionMsi
name
  • string
properties
scanResults

AzureSynapseCredentialScan

Name Type Description
id
  • string
kind string:
  • AzureSynapseCredential
name
  • string
properties
scanResults

AzureSynapseMsiScan

Name Type Description
id
  • string
kind string:
  • AzureSynapseMsi
name
  • string
properties
scanResults

AzureSynapseWorkspaceCredentialScan

Name Type Description
id
  • string
kind string:
  • AzureSynapseWorkspaceCredential
name
  • string
properties
scanResults

AzureSynapseWorkspaceMsiScan

Name Type Description
id
  • string
kind string:
  • AzureSynapseWorkspaceMsi
name
  • string
properties
scanResults

DataSourceType

Name Type Description
AdlsGen1
  • string
AdlsGen2
  • string
AmazonAccount
  • string
AmazonPostgreSql
  • string
AmazonS3
  • string
AmazonSql
  • string
AzureCosmosDb
  • string
AzureDataExplorer
  • string
AzureFileService
  • string
AzureMySql
  • string
AzurePostgreSql
  • string
AzureResourceGroup
  • string
AzureSqlDataWarehouse
  • string
AzureSqlDatabase
  • string
AzureSqlDatabaseManagedInstance
  • string
AzureStorage
  • string
AzureSubscription
  • string
AzureSynapse
  • string
AzureSynapseWorkspace
  • string
None
  • string
Oracle
  • string
PowerBI
  • string
SapEcc
  • string
SapS4Hana
  • string
SqlServerDatabase
  • string
Teradata
  • string

Diagnostics

Name Type Description
exceptionCountMap
  • object
notifications

Error

Name Type Description
code
  • string
details
message
  • string
target
  • string

ErrorModel

Name Type Description
code
  • string
details
message
  • string
target
  • string

ErrorResponseModel

Name Type Description
error

Notification

Name Type Description
code
  • integer
message
  • string

OracleOracleCredentialScan

Name Type Description
id
  • string
kind string:
  • OracleOracleCredential
name
  • string
properties
scanResults

OracleOracleUserPassScan

Name Type Description
id
  • string
kind string:
  • OracleOracleUserPass
name
  • string
properties
scanResults

PowerBIDelegatedScan

Name Type Description
id
  • string
kind string:
  • PowerBIDelegated
name
  • string
properties
scanResults

PowerBIMsiScan

Name Type Description
id
  • string
kind string:
  • PowerBIMsi
name
  • string
properties
scanResults

Properties

Name Type Description
baseUrl
  • string
description
  • string

SapEccSapEccCredentialScan

Name Type Description
id
  • string
kind string:
  • SapEccSapEccCredential
name
  • string
properties
scanResults

SapEccSapEccUserPassScan

Name Type Description
id
  • string
kind string:
  • SapEccSapEccUserPass
name
  • string
properties
scanResults

SapS4HanaSapS4HanaCredentialScan

Name Type Description
id
  • string
kind string:
  • SapS4HanaSapS4HanaCredential
name
  • string
properties
scanResults

SapS4HanaSapS4HanaUserPassScan

Name Type Description
id
  • string
kind string:
  • SapS4HanaSapS4HanaUserPass
name
  • string
properties
scanResults

ScanLevelType

Name Type Description
Full
  • string
Incremental
  • string

ScanResult

Name Type Description
assetsClassified
  • integer
assetsDiscovered
  • integer
dataSourceType
diagnostics
endTime
  • string
error
errorMessage
  • string
id
  • string
parentId
  • string
pipelineStartTime
  • string
queuedTime
  • string
resourceId
  • string
runType
  • string
scanLevelType
scanRulesetType
scanRulesetVersion
  • integer
startTime
  • string
status
  • string

ScanRulesetType

Name Type Description
Custom
  • string
System
  • string

SqlServerDatabaseCredentialScan

Name Type Description
id
  • string
kind string:
  • SqlServerDatabaseCredential
name
  • string
properties
scanResults

TeradataTeradataCredentialScan

Name Type Description
id
  • string
kind string:
  • TeradataTeradataCredential
name
  • string
properties
scanResults

TeradataTeradataUserPassScan

Name Type Description
id
  • string
kind string:
  • TeradataTeradataUserPass
name
  • string
properties
scanResults

TeradataUserPassScan

Name Type Description
id
  • string
kind string:
  • TeradataUserPass
name
  • string
properties
scanResults