Triggers - Get

取得觸發程序資訊。

GET {endpoint}/scan/datasources/{dataSourceName}/scans/{scanName}/triggers/default?api-version=2023-09-01

URI 參數

名稱 位於 必要 類型 Description
dataSourceName
path True

string

minLength: 3
maxLength: 63
pattern: ^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$

dataSource 名稱。

endpoint
path True

string (url)

purview 帳戶的掃描端點。 範例:https://{accountName}.purview.azure.com。

scanName
path True

string

minLength: 3
maxLength: 63
pattern: ^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$

掃描名稱。

api-version
query True

string

要使用的 API 版本。

回應

名稱 類型 Description
200 OK

Trigger

成功。

Other Status Codes

ErrorResponseModel

從掃描服務收到的錯誤回應。

標題

x-ms-error-code: string

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

Triggers_Get

範例要求

GET {endpoint}/scan/datasources/myDataSourceName/scans/myScanName/triggers/default?api-version=2023-09-01

範例回覆

x-ms-request-id: d5496da4-9c52-402f-b067-83cc9ddea888
{
  "properties": {
    "recurrence": {
      "frequency": "Month",
      "interval": 1,
      "startTime": "2020-06-03T19:15:00Z",
      "endTime": "2020-06-03T19:22:00Z",
      "schedule": {
        "minutes": [
          56
        ],
        "hours": [
          23
        ],
        "weekDays": null,
        "monthDays": null,
        "monthlyOccurrences": [
          {
            "day": "Wednesday",
            "occurrence": 2
          }
        ]
      }
    },
    "recurrenceInterval": null,
    "createdAt": "2020-06-11T05:15:04.1940429Z",
    "lastModifiedAt": "2020-06-19T22:26:22.6514064Z",
    "lastScheduled": null,
    "scanLevel": "Incremental",
    "state": "Enabled"
  },
  "validationErrorInfo": "Trigger is invalid: monthDays or monthlyOccurrences is required."
}

定義

名稱 Description
DayOfWeek

週期排程發生的日期。

DaysOfWeek

週期排程的星期幾。

ErrorModel

錯誤模型。

ErrorResponseModel

錯誤回應模型。

RecurrenceSchedule

週期排程。

RecurrenceScheduleOccurrence

週期排程的發生次數。

ScanLevelType

掃描層級類型。

Trigger

觸發程序物件。

TriggerFrequency

觸發程式週期的頻率。

TriggerProperties

觸發程式的屬性詳細數據。

TriggerRecurrence

觸發程序的迴圈。

TriggerState

觸發程序的狀態。

DayOfWeek

週期排程發生的日期。

值 Description
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday

DaysOfWeek

週期排程的星期幾。

值 Description
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday

ErrorModel

錯誤模型。

名稱 類型 Description
code

string

識別特定錯誤的唯一錯誤碼。

details

ErrorModel[]

提供其他錯誤詳細數據的巢狀 ErrorModel 物件陣列。

message

string

人類可讀取的錯誤訊息,可提供錯誤的詳細數據。

target

string

錯誤相關聯的特定元件。

ErrorResponseModel

錯誤回應模型。

名稱 類型 Description
error

ErrorModel

錯誤模型。

RecurrenceSchedule

週期排程。

名稱 類型 Description
hours

integer[] (int32)

週期排程的時數。

minutes

integer[] (int32)

週期排程的分鐘數。

monthDays

integer[] (int32)

週期排程的月份天數。

monthlyOccurrences

RecurrenceScheduleOccurrence[]

週期排程的每月發生次數。

weekDays

DaysOfWeek[]

週期排程的星期幾。

RecurrenceScheduleOccurrence

週期排程的發生次數。

名稱 類型 Description
day

DayOfWeek

週期排程發生的日期。

occurrence

integer (int32)

ScanLevelType

掃描層級類型。

值 Description
Full

掃描是完整掃描

Incremental

掃描是累加掃描

Trigger

觸發程序物件。

名稱 類型 Description
id

string

資源標識碼。

name

string

資源名稱。

properties

TriggerProperties

觸發程序的屬性。

validationErrorInfo

string

觸發程式的驗證錯誤資訊。

TriggerFrequency

觸發程式週期的頻率。

值 Description
Week
Month
Day
Hour

TriggerProperties

觸發程式的屬性詳細數據。

名稱 類型 預設值 Description
createdAt

string (date-time)

觸發程式的建立時間。

incrementalScanStartTime

string (date-time)

觸發程式的累加掃描開始時間。

lastModifiedAt

string (date-time)

觸發程式上次修改的時間。

lastScheduled

string (date-time)

觸發程式的最後一個排程時間。

recurrence

TriggerRecurrence

觸發程序的迴圈。

recurrenceInterval

string

觸發程式的周期間隔。

scanLevel

ScanLevelType

觸發程式的掃描層級。

state

TriggerState

Enabled

觸發程序的狀態。

TriggerRecurrence

觸發程序的迴圈。

名稱 類型 Description
endTime

string (date-time)

觸發程式週期的結束時間。

frequency

TriggerFrequency

觸發程式週期的頻率。

interval

integer (int32)

觸發程式週期的間隔。

schedule

RecurrenceSchedule

觸發程式週期的排程。

startTime

string (date-time)

觸發程式週期的開始時間。

timeZone

string

觸發程式週期的時區。

TriggerState

觸發程序的狀態。

值 Description
Enabled
Disabled