你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Microsoft.Web sites/sourcecontrols 2021-03-01

Bicep 资源定义

可以使用面向以下操作部署 sites/sourcecontrols 资源类型:

有关每个 API 版本中更改的属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Web/sites/sourcecontrols 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.Web/sites/sourcecontrols@2021-03-01' = {
  name: 'web'
  kind: 'string'
  parent: resourceSymbolicName
  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'
  }
}

属性值

sites/sourcecontrols

名称 说明
name 资源名称

了解如何在 Bicep 中为子资源设置名称和类型。
“Web”
kind 资源类型。 string
父级 (parent) 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源之外的子资源
类型为“站点”的资源的符号名称
properties SiteSourceControl 资源特定的属性 SiteSourceControlProperties

SiteSourceControlProperties

名称 说明
branch 用于部署的分支的名称。 string
deploymentRollbackEnabled true 启用部署回滚;否则为 false bool
gitHubActionConfiguration 如果选择了“GitHub 操作”,则为关联的配置。 GitHubActionConfiguration
isGitHubAction true 如果通过 GitHub 操作进行部署,则为 。 bool
isManualIntegration true 限制为手动集成; false 启用持续集成 (将 Webhook 配置为 GitHub) 等联机存储库。 bool
isMercurial true 对于 Mercurial 存储库; false 用于 Git 存储库。 bool
repoUrl 存储库或源代码管理 URL。 字符串

GitHubActionConfiguration

名称 说明
codeConfiguration GitHub 操作代码配置。 GitHubActionCodeConfiguration
containerConfiguration GitHub 操作容器配置。 GitHubActionContainerConfiguration
generateWorkflowFile 用于确定是否应生成工作流文件并将其写入存储库的工作流选项。 bool
isLinux 这将有助于确定要选择的工作流配置。 bool

GitHubActionCodeConfiguration

名称 说明
runtimeStack 运行时堆栈用于确定代码基础应用的工作流文件内容。 string
runtimeVersion 运行时版本用于确定在工作流文件中设置的生成版本。 字符串

GitHubActionContainerConfiguration

名称 说明
imageName 生成的映像名称。 string
password 用于将映像上传到容器注册表的密码。 字符串
serverUrl 将托管生成的容器注册表的服务器 URL。 字符串
username 用于将映像上传到容器注册表的用户名。 string

快速入门模板

以下快速入门模板部署此资源类型。

模板 说明
适用于 Azure 事件中心 的 PubNub 实时网关

部署到 Azure
适用于 Azure 的 PubNub 实时网关在 PubNub 数据流网络和Azure 事件中心之间提供实时数据流网桥。 - 将其视为 PubNub 和 Azure 之间的双向桥梁!
App 服务上的 WordPress 与 MySQL In App 配合使用

部署到 Azure
此模板使用应用中的 MySQL 在 Windows App 服务上部署 WordPress Web 应用
使用 ILB ASE 的 eShop 网站

部署到 Azure
应用服务环境是 Azure 应用服务的一项高级服务计划选项,可提供完全隔离的专用环境来安全地大规模运行 Azure 应用服务应用,包括 Web 应用、移动应用和 API 应用。
创建零接触 Azure Cosmos 帐户和 Azure Web 应用

部署到 Azure
此模板创建 Azure Cosmos 帐户,将 Cosmos DB 终结点和密钥注入 Azure Web 应用设置,然后从 GitHub 部署 ASP MVC Web 应用。
具有函数的 Azure 逻辑应用

部署到 Azure
此模板使用逻辑应用和 Functions 在 Azure 中创建无服务器应用。 逻辑应用在 HTTP POST 上触发,调用 Azure 函数并返回响应。
App 服务快速入门 - Linux 应用

部署到 Azure
此模板将用于 /azure/app-service/quickstart-arm-template
App 服务快速入门 - Windows 应用

部署到 Azure
此模板将用于 /azure/app-service/quickstart-arm-template
使用从 GitHub 部署的源预配函数应用

部署到 Azure
此模板部署在新的专用App 服务计划中托管的函数应用。 函数应用具有一个子资源,用于实现连续集成,并从 GitHub 存储库部署函数代码。
从 GitHub 部署 Web 应用

部署到 Azure
此模板允许你创建一个 WebApp,其中包含链接的 GitHub 存储库。
App 服务快速入门 - Windows 应用

部署到 Azure
此模板将用于 /azure/app-service/quickstart-arm-template

ARM 模板资源定义

可以使用面向以下操作部署 sites/sourcecontrols 资源类型:

有关每个 API 版本中更改的属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Web/sites/sourcecontrols 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.Web/sites/sourcecontrols",
  "apiVersion": "2021-03-01",
  "name": "web",
  "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"
  }
}

属性值

sites/sourcecontrols

名称 说明 Value
type 资源类型 “Microsoft.Web/sites/sourcecontrols”
apiVersion 资源 API 版本 '2021-03-01'
name 资源名称

了解如何在 JSON ARM 模板中为子资源设置名称和类型。
“Web”
kind 资源类型。 string
properties SiteSourceControl 资源特定的属性 SiteSourceControlProperties

SiteSourceControlProperties

名称 说明
branch 用于部署的分支的名称。 字符串
deploymentRollbackEnabled true 启用部署回滚;否则为 false bool
gitHubActionConfiguration 如果选择了“GitHub 操作”,则为关联的配置。 GitHubActionConfiguration
isGitHubAction true 如果通过 GitHub 操作进行部署,则为 。 bool
isManualIntegration true 限制为手动集成; false 启用持续集成 (将 Webhook 配置为 GitHub) 等联机存储库。 bool
isMercurial true 对于 Mercurial 存储库; false 用于 Git 存储库。 bool
repoUrl 存储库或源代码管理 URL。 string

GitHubActionConfiguration

名称 说明
codeConfiguration GitHub 操作代码配置。 GitHubActionCodeConfiguration
containerConfiguration GitHub Action 容器配置。 GitHubActionContainerConfiguration
generateWorkflowFile 用于确定是否应生成工作流文件并将其写入存储库的工作流选项。 bool
isLinux 这将有助于确定要选择的工作流配置。 bool

GitHubActionCodeConfiguration

名称 说明
runtimeStack 运行时堆栈用于确定代码基应用的工作流文件内容。 字符串
runtimeVersion 运行时版本用于确定在工作流文件中设置的内部版本。 string

GitHubActionContainerConfiguration

名称 说明
imageName 生成的映像名称。 string
password 用于将映像上传到容器注册表的密码。 字符串
serverUrl 将托管生成的容器注册表的服务器 URL。 字符串
username 用于将映像上传到容器注册表的用户名。 string

快速入门模板

以下快速入门模板部署此资源类型。

模板 说明
适用于 Azure 事件中心 的 PubNub 实时网关

部署到 Azure
适用于 Azure 的 PubNub 实时网关在 PubNub 数据流网络和Azure 事件中心之间提供实时数据流桥。 - 将其视为 PubNub 和 Azure 之间的双向桥梁!
App 服务上的 WordPress 与应用内 MySQL 配合使用

部署到 Azure
此模板使用应用中的 MySQL 在 Windows App 服务上部署 WordPress Web 应用
使用 ILB ASE 的 eShop 网站

部署到 Azure
应用服务环境是 Azure 应用服务的一项高级服务计划选项,可提供完全隔离的专用环境来安全地大规模运行 Azure 应用服务应用,包括 Web 应用、移动应用和 API 应用。
创建零接触 Azure Cosmos 帐户和 Azure Web 应用

部署到 Azure
此模板创建 Azure Cosmos 帐户,将 Cosmos DB 终结点和密钥注入 Azure Web 应用设置,然后从 GitHub 部署 ASP MVC Web 应用。
具有函数的 Azure 逻辑应用

部署到 Azure
此模板使用逻辑应用和 Functions 在 Azure 中创建无服务器应用。 逻辑应用在 HTTP POST 上触发,调用 Azure 函数并返回响应。
App 服务 快速入门 - Linux 应用

部署到 Azure
此模板与 /azure/app-service/quickstart-arm-template 一起使用
App 服务快速入门 - Windows 应用

部署到 Azure
此模板与 /azure/app-service/quickstart-arm-template 一起使用
使用从 GitHub 部署的源预配函数应用

部署到 Azure
此模板部署托管在新专用App 服务计划中的函数应用。 函数应用有一个子资源,用于实现连续集成,并从 GitHub 存储库部署函数代码。
从 GitHub 部署 Web 应用

部署到 Azure
此模板允许你创建一个 WebApp,其中包含链接的 GitHub 存储库。
App 服务快速入门 - Windows 应用

部署到 Azure
此模板与 /azure/app-service/quickstart-arm-template 一起使用

Terraform (AzAPI 提供程序) 资源定义

可以使用面向以下操作部署 sites/sourcecontrols 资源类型:

  • 资源组

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Web/sites/sourcecontrols 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Web/sites/sourcecontrols@2021-03-01"
  name = "web"
  parent_id = "string"
  body = jsonencode({
    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"
    }
    kind = "string"
  })
}

属性值

sites/sourcecontrols

名称 说明 Value
type 资源类型 “Microsoft.Web/sites/sourcecontrols@2021-03-01”
name 资源名称 “web”
parent_id 此资源的父资源的 ID。 类型为的资源的 ID: 站点
kind 资源类型。 string
properties SiteSourceControl 资源特定的属性 SiteSourceControlProperties

SiteSourceControlProperties

名称 说明
branch 用于部署的分支的名称。 字符串
deploymentRollbackEnabled true 启用部署回滚;否则为 false bool
gitHubActionConfiguration 如果选择了 GitHub Action,则比关联的配置。 GitHubActionConfiguration
isGitHubAction true 如果通过 GitHub 操作部署,则为 。 bool
isManualIntegration true 限制为手动集成; false 启用持续集成 (将 Webhook 配置为联机存储库(如 GitHub) )。 bool
isMercurial true 对于 Mercurial 存储库; false 用于 Git 存储库。 bool
repoUrl 存储库或源代码管理 URL。 string

GitHubActionConfiguration

名称 说明
codeConfiguration GitHub 操作代码配置。 GitHubActionCodeConfiguration
containerConfiguration GitHub Action 容器配置。 GitHubActionContainerConfiguration
generateWorkflowFile 用于确定是否应生成工作流文件并将其写入存储库的工作流选项。 bool
isLinux 这将有助于确定要选择的工作流配置。 bool

GitHubActionCodeConfiguration

名称 说明
runtimeStack 运行时堆栈用于确定代码基应用的工作流文件内容。 string
runtimeVersion 运行时版本用于确定在工作流文件中设置的内部版本。 字符串

GitHubActionContainerConfiguration

名称 说明
imageName 生成的映像名称。 string
password 用于将映像上传到容器注册表的密码。 string
serverUrl 将托管生成的容器注册表的服务器 URL。 字符串
username 用于将映像上传到容器注册表的用户名。 字符串