共用方式為


Microsoft.SecurityInsights 源控件

Bicep 資源定義

sourcecontrols 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔

資源格式

若要建立 Microsoft.SecurityInsights/sourcecontrols 資源,請將下列 Bicep 新增至範本。

resource symbolicname 'Microsoft.SecurityInsights/sourcecontrols@2025-09-01' = {
  scope: resourceSymbolicName or scope
  etag: 'string'
  name: 'string'
  properties: {
    contentTypes: [
      'string'
    ]
    description: 'string'
    displayName: 'string'
    repository: {
      branch: 'string'
      displayUrl: 'string'
      url: 'string'
    }
    repositoryAccess: {
      clientId: 'string'
      code: 'string'
      installationId: 'string'
      kind: 'string'
      state: 'string'
      token: 'string'
    }
    repositoryResourceInfo: {
      webhook: {
        rotateWebhookSecret: bool
      }
    }
    repoType: 'string'
    servicePrincipal: {
      credentialsExpireOn: 'string'
    }
  }
}

屬性值

Microsoft.SecurityInsights/sourcecontrols

名字 描述 價值
ETAG Azure 資源的 Etag 字串
名字 資源名稱 字串 (必要)
性能 原始檔控制屬性 SourceControlProperties (必要)
範圍 在與部署範圍不同的範圍內建立資源時,請使用 。 將此屬性設定為資源的符號名稱,以套用 擴充資源

存儲庫

名字 描述 價值
branch 存放庫的分支名稱。 字串 (必要)
displayUrl 的 顯示存放庫的 URL。 字串
URL 存放庫的 URL。 字串 (必要)

存儲庫訪問

名字 描述 價值
用戶端ID OAuth ClientId。 kind OAuth 時需要 字串
字碼 OAuth 程式代碼。 kind OAuth 時需要 字串

約束:
敏感性值。 以安全參數的形式傳入。
installationId 安裝ID 應用程式安裝標識碼。 kind App 時為必要項。 僅 GitHub 支援。 字串
存放庫存取認證種類 '應用程式'
“OAuth”
'PAT' (必要)
狀態 OAuth 狀態。 kind OAuth 時需要 字串

約束:
敏感性值。 以安全參數的形式傳入。
Token 個人存取令牌。 kind PAT 時需要 字串

約束:
敏感性值。 以安全參數的形式傳入。

存儲庫資源資訊

名字 描述 價值
Webhook 為原始檔控制建立的 Webhook 物件。 Webhook

ServicePrincipal 服務

名字 描述 價值
credentialsExpireOn 服務主體認證的到期時間。 字串

SourceControl屬性

名字 描述 價值
contentTypes 原始檔控制內容類型的陣列。 包含任何的字串數組:
“AnalyticsRule”
“自動化規則”
“HuntingQuery”
“解析器”
'劇本'
'Workbook' (必要)
描述 原始檔控制的描述 字串
顯示名稱 原始檔控制的顯示名稱 字串 (必要)
存放庫 存放庫元數據。 存放庫 (必要)
repository訪問 存放庫存取認證。 這是唯寫物件,而且永遠不會傳回給使用者。 存儲庫訪問
repositoryResourceInfo 使用者存放庫中所建立之資源的相關信息。 存儲庫資源資訊
repoType 原始檔控制的存放庫類型 “AzureDevOps”
'Github' (必要)
servicePrincipal 服務 服務主體元數據。 ServicePrincipal 服務

Webhook

名字 描述 價值
rotateWebhookSecret 指示後端服務輪替 Webhook 秘密的旗標。 布爾 (bool)

ARM 樣本資源定義

sourcecontrols 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔

資源格式

若要建立 Microsoft.SecurityInsights/sourcecontrols 資源,請將下列 JSON 新增至範本。

{
  "type": "Microsoft.SecurityInsights/sourcecontrols",
  "apiVersion": "2025-09-01",
  "name": "string",
  "etag": "string",
  "properties": {
    "contentTypes": [ "string" ],
    "description": "string",
    "displayName": "string",
    "repository": {
      "branch": "string",
      "displayUrl": "string",
      "url": "string"
    },
    "repositoryAccess": {
      "clientId": "string",
      "code": "string",
      "installationId": "string",
      "kind": "string",
      "state": "string",
      "token": "string"
    },
    "repositoryResourceInfo": {
      "webhook": {
        "rotateWebhookSecret": "bool"
      }
    },
    "repoType": "string",
    "servicePrincipal": {
      "credentialsExpireOn": "string"
    }
  }
}

屬性值

Microsoft.SecurityInsights/sourcecontrols

名字 描述 價值
apiVersion API 版本 '2025-09-01'
ETAG Azure 資源的 Etag 字串
名字 資源名稱 字串 (必要)
性能 原始檔控制屬性 SourceControlProperties (必要)
型別 資源類型 “Microsoft.SecurityInsights/sourcecontrols”

存儲庫

名字 描述 價值
branch 存放庫的分支名稱。 字串 (必要)
displayUrl 的 顯示存放庫的 URL。 字串
URL 存放庫的 URL。 字串 (必要)

存儲庫訪問

名字 描述 價值
用戶端ID OAuth ClientId。 kind OAuth 時需要 字串
字碼 OAuth 程式代碼。 kind OAuth 時需要 字串

約束:
敏感性值。 以安全參數的形式傳入。
installationId 安裝ID 應用程式安裝標識碼。 kind App 時為必要項。 僅 GitHub 支援。 字串
存放庫存取認證種類 '應用程式'
“OAuth”
'PAT' (必要)
狀態 OAuth 狀態。 kind OAuth 時需要 字串

約束:
敏感性值。 以安全參數的形式傳入。
Token 個人存取令牌。 kind PAT 時需要 字串

約束:
敏感性值。 以安全參數的形式傳入。

存儲庫資源資訊

名字 描述 價值
Webhook 為原始檔控制建立的 Webhook 物件。 Webhook

ServicePrincipal 服務

名字 描述 價值
credentialsExpireOn 服務主體認證的到期時間。 字串

SourceControl屬性

名字 描述 價值
contentTypes 原始檔控制內容類型的陣列。 包含任何的字串數組:
“AnalyticsRule”
“自動化規則”
“HuntingQuery”
“解析器”
'劇本'
'Workbook' (必要)
描述 原始檔控制的描述 字串
顯示名稱 原始檔控制的顯示名稱 字串 (必要)
存放庫 存放庫元數據。 存放庫 (必要)
repository訪問 存放庫存取認證。 這是唯寫物件,而且永遠不會傳回給使用者。 存儲庫訪問
repositoryResourceInfo 使用者存放庫中所建立之資源的相關信息。 存儲庫資源資訊
repoType 原始檔控制的存放庫類型 “AzureDevOps”
'Github' (必要)
servicePrincipal 服務 服務主體元數據。 ServicePrincipal 服務

Webhook

名字 描述 價值
rotateWebhookSecret 指示後端服務輪替 Webhook 秘密的旗標。 布爾 (bool)

使用範例

Terraform (AzAPI 提供者) 資源定義

sourcecontrols 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔

資源格式

若要建立 Microsoft.SecurityInsights/sourcecontrols 資源,請將下列 Terraform 新增至範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.SecurityInsights/sourcecontrols@2025-09-01"
  name = "string"
  parent_id = "string"
  body = {
    etag = "string"
    properties = {
      contentTypes = [
        "string"
      ]
      description = "string"
      displayName = "string"
      repository = {
        branch = "string"
        displayUrl = "string"
        url = "string"
      }
      repositoryAccess = {
        clientId = "string"
        code = "string"
        installationId = "string"
        kind = "string"
        state = "string"
        token = "string"
      }
      repositoryResourceInfo = {
        webhook = {
          rotateWebhookSecret = bool
        }
      }
      repoType = "string"
      servicePrincipal = {
        credentialsExpireOn = "string"
      }
    }
  }
}

屬性值

Microsoft.SecurityInsights/sourcecontrols

名字 描述 價值
ETAG Azure 資源的 Etag 字串
名字 資源名稱 字串 (必要)
父項識別碼 要套用此延伸模組資源之資源的標識碼。 字串 (必要)
性能 原始檔控制屬性 SourceControlProperties (必要)
型別 資源類型 “Microsoft.SecurityInsights/sourcecontrols@2025-09-01”

存儲庫

名字 描述 價值
branch 存放庫的分支名稱。 字串 (必要)
displayUrl 的 顯示存放庫的 URL。 字串
URL 存放庫的 URL。 字串 (必要)

存儲庫訪問

名字 描述 價值
用戶端ID OAuth ClientId。 kind OAuth 時需要 字串
字碼 OAuth 程式代碼。 kind OAuth 時需要 字串

約束:
敏感性值。 以安全參數的形式傳入。
installationId 安裝ID 應用程式安裝標識碼。 kind App 時為必要項。 僅 GitHub 支援。 字串
存放庫存取認證種類 '應用程式'
“OAuth”
'PAT' (必要)
狀態 OAuth 狀態。 kind OAuth 時需要 字串

約束:
敏感性值。 以安全參數的形式傳入。
Token 個人存取令牌。 kind PAT 時需要 字串

約束:
敏感性值。 以安全參數的形式傳入。

存儲庫資源資訊

名字 描述 價值
Webhook 為原始檔控制建立的 Webhook 物件。 Webhook

ServicePrincipal 服務

名字 描述 價值
credentialsExpireOn 服務主體認證的到期時間。 字串

SourceControl屬性

名字 描述 價值
contentTypes 原始檔控制內容類型的陣列。 包含任何的字串數組:
“AnalyticsRule”
“自動化規則”
“HuntingQuery”
“解析器”
'劇本'
'Workbook' (必要)
描述 原始檔控制的描述 字串
顯示名稱 原始檔控制的顯示名稱 字串 (必要)
存放庫 存放庫元數據。 存放庫 (必要)
repository訪問 存放庫存取認證。 這是唯寫物件,而且永遠不會傳回給使用者。 存儲庫訪問
repositoryResourceInfo 使用者存放庫中所建立之資源的相關信息。 存儲庫資源資訊
repoType 原始檔控制的存放庫類型 “AzureDevOps”
'Github' (必要)
servicePrincipal 服務 服務主體元數據。 ServicePrincipal 服務

Webhook

名字 描述 價值
rotateWebhookSecret 指示後端服務輪替 Webhook 秘密的旗標。 布爾 (bool)