Scan Result - Run Scan
运行扫描
POST {endpoint}/scan/datasources/{dataSourceName}/scans/{scanName}:run?runId={runId}&api-version=2023-09-01
POST {endpoint}/scan/datasources/{dataSourceName}/scans/{scanName}:run?runId={runId}&scanLevel={scanLevel}&api-version=2023-09-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
data
|
path | True |
string minLength: 3maxLength: 63 pattern: ^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$ |
DataSource 名称。 |
endpoint
|
path | True |
string (url) |
purview 帐户的扫描终结点。 示例:https://{accountName}.purview.azure.com。 |
scan
|
path | True |
string minLength: 3maxLength: 63 pattern: ^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$ |
扫描名称。 |
api-version
|
query | True |
string |
要使用的 API 版本。 |
run
|
query | True |
string minLength: 36maxLength: 36 pattern: ^[{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$ |
扫描运行 ID。 |
scan
|
query |
扫描级别。 |
响应
名称 | 类型 | 说明 |
---|---|---|
202 Accepted |
成功 标头 Operation-Location: string |
|
Other Status Codes |
从扫描服务收到的错误响应 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
ScanResult_RunScan
示例请求
POST {endpoint}/scan/datasources/testDataSourceName/scans/scan1:run?runId=138301e4-f4f9-4ab5-b734-bac446b236e7&scanLevel=Full&api-version=2023-09-01
示例响应
x-ms-request-id: 00000000-0000-0000-0000-00000000000
Operation-Location: https://exampleaccountname.purview.azure.com/scan/datasources/myDataSource/scans/myScanName/runs/138301e4-f4f9-4ab5-b734-bac446b236e7
{
"parentId": null,
"id": "7bcde71f-4a4e-4e01-9226-c99d15fa0f30",
"ingestionJobId": "7bcde71f-4a4e-4e01-9226-c99d15fa0f30",
"resourceId": "/subscriptions/4ec8b4ae-b823-43c5-90d9-7ec52a84c0c5/resourceGroups/yongyu_scan_test/providers/Microsoft.Sql/servers/yongyu-sqlservers-0724",
"status": "Accepted",
"diagnostics": {
"notifications": [],
"exceptionCountMap": {}
},
"startTime": "2023-07-31T01:40:22.6764952Z",
"endTime": "2023-07-31T01:41:48.6834379Z",
"scanRulesetVersion": 4,
"scanRulesetType": "System",
"scanLevelType": "Incremental",
"errorMessage": null,
"error": null,
"runType": "Manual",
"dataSourceType": "AzureSqlDatabase",
"discoveryExecutionDetails": {
"discoveryStartTime": "2023-07-31T01:41:14Z",
"discoveryEndTime": "2023-07-31T01:41:14Z",
"status": "Succeeded",
"statistics": {
"assets": {
"discovered": 3,
"classified": 0,
"failed": 0
}
},
"isErrorLogAvailable": false
},
"ingestionExecutionDetails": {
"ingestionStartTime": "2023-07-31T01:41:10.8601338Z",
"ingestionEndTime": "2023-07-31T01:41:48.6834379Z",
"status": "Succeeded",
"statistics": {
"assets": {
"succeeded": 2,
"failed": 0,
"processing": 0
},
"relationships": {
"succeeded": 0,
"failed": 0,
"processing": 0
}
},
"estimatedTimeRemainingInSeconds": 12,
"isErrorLogAvailable": false
}
}
定义
名称 | 说明 |
---|---|
Data |
数据源类型。 |
Discovery |
发现执行详细信息。 |
Error |
错误模型。 |
Error |
错误响应模型。 |
Ingestion |
引入执行详细信息。 |
Ingestion |
引入状态。 |
Notification |
通知模型。 |
Scan |
扫描诊断。 |
Scan |
扫描级别类型。 |
Scan |
引入的扫描结果。 |
Scan |
扫描规则集类型。 |
Scan |
扫描结果状态。 |
Scan |
发现状态。 |
DataSourceType
数据源类型。
值 | 说明 |
---|---|
AdlsGen1 | |
AdlsGen2 | |
AmazonAccount | |
AmazonPostgreSql | |
AmazonRedShift | |
AmazonS3 | |
AmazonSql | |
ArcEnabledSqlServer | |
AzureCosmosDb | |
AzureDataExplorer | |
AzureFileService | |
AzureMySql | |
AzurePostgreSql | |
AzureResourceGroup | |
AzureSqlDataWarehouse | |
AzureSqlDatabase | |
AzureSqlDatabaseManagedInstance | |
AzureStorage | |
AzureSubscription | |
AzureSynapse | |
AzureSynapseWorkspace | |
Databricks | |
DatabricksHms | |
DatabricksUnityCatalog | |
Dataverse | |
Fabric | |
Hdfs | |
None | |
Oracle | |
PostgreSql | |
PowerBI | |
SapEcc | |
SapS4Hana | |
Snowflake | |
SqlServerDatabase | |
TableauServer | |
Teradata | |
Trident |
DiscoveryExecutionDetails
发现执行详细信息。
名称 | 类型 | 说明 |
---|---|---|
discoveryEndTime |
string (date-time) |
发现结束时间。 |
discoveryStartTime |
string (date-time) |
发现开始时间。 |
isErrorLogAvailable |
boolean |
指示错误日志是否可用。 |
statistics |
发现统计信息。 |
|
status |
发现状态。 |
ErrorModel
错误模型。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
用于标识特定错误的唯一错误代码。 |
details |
提供其他错误详细信息的嵌套 ErrorModel 对象的数组。 |
|
message |
string |
一条人工可读的错误消息,提供有关错误的详细信息。 |
target |
string |
错误关联的特定组件。 |
ErrorResponseModel
错误响应模型。
名称 | 类型 | 说明 |
---|---|---|
error |
错误模型。 |
IngestionExecutionDetails
引入执行详细信息。
名称 | 类型 | 说明 |
---|---|---|
estimatedTimeRemainingInSeconds |
integer (int64) |
剩余的估计时间(以秒为单位)。 |
ingestionEndTime |
string (date-time) |
引入结束时间。 |
ingestionStartTime |
string (date-time) |
引入开始时间。 |
isErrorLogAvailable |
boolean |
指示错误日志是否可用。 |
lastUpdatedAt |
string (date-time) |
上次更新的时间。 |
statistics |
引入统计信息。 |
|
status |
引入状态。 |
IngestionPhaseStatus
引入状态。
值 | 说明 |
---|---|
Canceled | |
Canceling | |
Failed | |
InProgress | |
None | |
PartialSucceeded | |
Queued | |
SourceUnknown | |
Succeeded |
Notification
通知模型。
名称 | 类型 | 说明 |
---|---|---|
code |
integer (int32) |
通知代码。 |
message |
string |
通知消息。 |
ScanDiagnostics
扫描诊断。
名称 | 类型 | 说明 |
---|---|---|
exceptionCountMap |
object |
异常计数映射。 |
notifications |
通知。 |
ScanLevelType
扫描级别类型。
值 | 说明 |
---|---|
Full |
扫描是完全扫描 |
Incremental |
扫描是增量扫描 |
ScanResultWithIngestion
引入的扫描结果。
名称 | 类型 | 说明 |
---|---|---|
dataSourceType |
数据源类型。 |
|
diagnostics |
扫描诊断。 |
|
discoveryExecutionDetails |
发现执行详细信息。 |
|
endTime |
string (date-time) |
扫描结束时间。 |
error |
错误。 |
|
errorMessage |
string |
错误消息。 |
id |
string |
扫描结果标识符。 |
ingestionExecutionDetails |
引入执行详细信息。 |
|
ingestionJobId |
string |
引入作业标识符。 |
parentId |
string |
父扫描结果标识符。 |
resourceId |
string |
资源标识符。 |
runType |
string |
运行类型。 |
scanLevelType |
扫描级别类型。 |
|
scanRulesetType |
扫描规则集类型。 |
|
scanRulesetVersion |
integer (int32) |
扫描规则集版本。 |
startTime |
string (date-time) |
扫描开始时间。 |
status |
扫描结果状态。 |
ScanRulesetType
扫描规则集类型。
值 | 说明 |
---|---|
Custom |
扫描规则集类型为自定义 |
System |
扫描规则集类型为系统默认值 |
ScanRunStatus
扫描结果状态。
值 | 说明 |
---|---|
Accepted |
接受扫描 |
Canceled |
扫描已取消 |
Failed |
扫描失败 |
InProgress |
扫描为 InProgress |
Succeeded |
扫描成功 |
TransientFailure |
扫描处于暂时性故障状态 |
ScanStatus
发现状态。
值 | 说明 |
---|---|
Cancelled | |
CompleteWithWarning | |
CompletedWithExceptions | |
Delayed | |
Failed | |
Queued | |
Running | |
Succeeded | |
Throttled |