Bicep 資源定義
月臺/sourcecontrols 資源類型可以使用目標作業來部署:
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
使用範例
Azure 快速入門範例
下列 Azure 快速入門範本 包含用於部署此資源類型的 Bicep 範例。
若要建立 Microsoft.Web/sites/sourcecontrols 資源,請將下列 Bicep 新增至範本。
resource symbolicname 'Microsoft.Web/sites/sourcecontrols@2025-03-01' = {
parent: resourceSymbolicName
kind: 'string'
name: 'web'
properties: {
branch: 'string'
deploymentRollbackEnabled: bool
gitHubActionConfiguration: {
codeConfiguration: {
runtimeStack: 'string'
runtimeVersion: 'string'
}
containerConfiguration: {
imageName: 'string'
password: 'string'
serverUrl: 'string'
username: 'string'
}
generateWorkflowFile: bool
isLinux: bool
}
isGitHubAction: bool
isManualIntegration: bool
isMercurial: bool
repoUrl: 'string'
}
}
屬性值
Microsoft.Web/sites/sourcecontrols
GitHubActionCodeConfiguration
| 名字 |
描述 |
價值 |
| runtimeStack |
運行時間堆疊可用來判斷程式碼基底應用程式的工作流程檔案內容。 |
字串 |
| runtimeVersion (運行時版本) |
運行時間版本可用來判斷工作流程檔案中要設定的組建版本。 |
字串 |
GitHubActionConfiguration
GitHubActionContainerConfiguration
| 名字 |
描述 |
價值 |
| 圖像名稱 |
組建的映像名稱。 |
字串 |
| 密碼 |
用來將映像上傳至容器登錄的密碼。 |
字串
約束: 敏感性值。 以安全參數的形式傳入。 |
| 伺服器網址 |
將裝載組建之容器登錄的伺服器URL。 |
字串 |
| 使用者名稱 |
用來將映像上傳至容器登錄的用戶名稱。 |
字串 |
SiteSourceControlProperties
| 名字 |
描述 |
價值 |
| branch |
要用於部署的分支名稱。 |
字串 |
| deploymentRollback已啟用 |
<程式代碼>true</code> 啟用部署復原;否則,<程式代碼>false</code>。 |
布爾 (bool) |
| gitHubActionConfiguration |
如果已選取 GitHub Action,則比相關聯的組態還要多。 |
GitHubActionConfiguration |
| isGitHubAction |
如果這是透過 GitHub 動作部署,<程式代碼>true</code>。 |
布爾 (bool) |
| isManual集成 |
<程式代碼>true</code> 限制為手動整合;<程式代碼>false</code> 啟用持續整合(這會將 Webhook 設定為 GitHub 之類的在線存放庫)。 |
布爾 (bool) |
| isMercurial |
<程式代碼>mercurial 存放庫的 true</code>;<程式代碼>Git 存放庫的 false</code>。 |
布爾 (bool) |
| repoUrl 的 |
存放庫或原始檔控制 URL。 |
字串 |
ARM 樣本資源定義
月臺/sourcecontrols 資源類型可以使用目標作業來部署:
使用範例
Azure 快速入門範本
下列 Azure 快速入門範本 部署此資源類型。
若要建立 Microsoft.Web/sites/sourcecontrols 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.Web/sites/sourcecontrols",
"apiVersion": "2025-03-01",
"name": "string",
"kind": "string",
"properties": {
"branch": "string",
"deploymentRollbackEnabled": "bool",
"gitHubActionConfiguration": {
"codeConfiguration": {
"runtimeStack": "string",
"runtimeVersion": "string"
},
"containerConfiguration": {
"imageName": "string",
"password": "string",
"serverUrl": "string",
"username": "string"
},
"generateWorkflowFile": "bool",
"isLinux": "bool"
},
"isGitHubAction": "bool",
"isManualIntegration": "bool",
"isMercurial": "bool",
"repoUrl": "string"
}
}
屬性值
Microsoft.Web/sites/sourcecontrols
| 名字 |
描述 |
價值 |
| apiVersion |
API 版本 |
'2025-03-01' |
| 類 |
資源種類。 |
字串 |
| 名字 |
資源名稱 |
'web' (必要) |
| 性能 |
SiteSourceControl 資源特定屬性 |
SiteSourceControlProperties |
| 型別 |
資源類型 |
“Microsoft.Web/sites/sourcecontrols” |
GitHubActionCodeConfiguration
| 名字 |
描述 |
價值 |
| runtimeStack |
運行時間堆疊可用來判斷程式碼基底應用程式的工作流程檔案內容。 |
字串 |
| runtimeVersion (運行時版本) |
運行時間版本可用來判斷工作流程檔案中要設定的組建版本。 |
字串 |
GitHubActionConfiguration
GitHubActionContainerConfiguration
| 名字 |
描述 |
價值 |
| 圖像名稱 |
組建的映像名稱。 |
字串 |
| 密碼 |
用來將映像上傳至容器登錄的密碼。 |
字串
約束: 敏感性值。 以安全參數的形式傳入。 |
| 伺服器網址 |
將裝載組建之容器登錄的伺服器URL。 |
字串 |
| 使用者名稱 |
用來將映像上傳至容器登錄的用戶名稱。 |
字串 |
SiteSourceControlProperties
| 名字 |
描述 |
價值 |
| branch |
要用於部署的分支名稱。 |
字串 |
| deploymentRollback已啟用 |
<程式代碼>true</code> 啟用部署復原;否則,<程式代碼>false</code>。 |
布爾 (bool) |
| gitHubActionConfiguration |
如果已選取 GitHub Action,則比相關聯的組態還要多。 |
GitHubActionConfiguration |
| isGitHubAction |
如果這是透過 GitHub 動作部署,<程式代碼>true</code>。 |
布爾 (bool) |
| isManual集成 |
<程式代碼>true</code> 限制為手動整合;<程式代碼>false</code> 啟用持續整合(這會將 Webhook 設定為 GitHub 之類的在線存放庫)。 |
布爾 (bool) |
| isMercurial |
<程式代碼>mercurial 存放庫的 true</code>;<程式代碼>Git 存放庫的 false</code>。 |
布爾 (bool) |
| repoUrl 的 |
存放庫或原始檔控制 URL。 |
字串 |
月臺/sourcecontrols 資源類型可以使用目標作業來部署:
-
資源團體 關於每個 API 版本變更屬性的清單,請參見 變更日誌。
若要建立 Microsoft.Web/sites/sourcecontrols 資源,請將下列 Terraform 新增至範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Web/sites/sourcecontrols@2025-03-01"
name = "string"
parent_id = "string"
body = {
kind = "string"
properties = {
branch = "string"
deploymentRollbackEnabled = bool
gitHubActionConfiguration = {
codeConfiguration = {
runtimeStack = "string"
runtimeVersion = "string"
}
containerConfiguration = {
imageName = "string"
password = "string"
serverUrl = "string"
username = "string"
}
generateWorkflowFile = bool
isLinux = bool
}
isGitHubAction = bool
isManualIntegration = bool
isMercurial = bool
repoUrl = "string"
}
}
}
屬性值
Microsoft.Web/sites/sourcecontrols
| 名字 |
描述 |
價值 |
| 類 |
資源種類。 |
字串 |
| 名字 |
資源名稱 |
'web' (必要) |
| 父項識別碼 |
此資源為父系之資源的標識碼。 |
類型資源的標識碼:網站 |
| 性能 |
SiteSourceControl 資源特定屬性 |
SiteSourceControlProperties |
| 型別 |
資源類型 |
“Microsoft.網站/網站/sourcecontrols@2025-03-01” |
GitHubActionCodeConfiguration
| 名字 |
描述 |
價值 |
| runtimeStack |
運行時間堆疊可用來判斷程式碼基底應用程式的工作流程檔案內容。 |
字串 |
| runtimeVersion (運行時版本) |
運行時間版本可用來判斷工作流程檔案中要設定的組建版本。 |
字串 |
GitHubActionConfiguration
GitHubActionContainerConfiguration
| 名字 |
描述 |
價值 |
| 圖像名稱 |
組建的映像名稱。 |
字串 |
| 密碼 |
用來將映像上傳至容器登錄的密碼。 |
字串
約束: 敏感性值。 以安全參數的形式傳入。 |
| 伺服器網址 |
將裝載組建之容器登錄的伺服器URL。 |
字串 |
| 使用者名稱 |
用來將映像上傳至容器登錄的用戶名稱。 |
字串 |
SiteSourceControlProperties
| 名字 |
描述 |
價值 |
| branch |
要用於部署的分支名稱。 |
字串 |
| deploymentRollback已啟用 |
<程式代碼>true</code> 啟用部署復原;否則,<程式代碼>false</code>。 |
布爾 (bool) |
| gitHubActionConfiguration |
如果已選取 GitHub Action,則比相關聯的組態還要多。 |
GitHubActionConfiguration |
| isGitHubAction |
如果這是透過 GitHub 動作部署,<程式代碼>true</code>。 |
布爾 (bool) |
| isManual集成 |
<程式代碼>true</code> 限制為手動整合;<程式代碼>false</code> 啟用持續整合(這會將 Webhook 設定為 GitHub 之類的在線存放庫)。 |
布爾 (bool) |
| isMercurial |
<程式代碼>mercurial 存放庫的 true</code>;<程式代碼>Git 存放庫的 false</code>。 |
布爾 (bool) |
| repoUrl 的 |
存放庫或原始檔控制 URL。 |
字串 |