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

Microsoft.Web sites/slots/sourcecontrols 2021-01-01

Bicep 资源定义

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

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

资源格式

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

resource symbolicname 'Microsoft.Web/sites/slots/sourcecontrols@2021-01-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/slots/sourcecontrols

名称 说明
name 资源名称

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

有关详细信息,请参阅 父资源之外的子资源
类型为:的资源的符号名称
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 运行时堆栈用于确定代码基应用的工作流文件内容。 字符串
runtimeVersion 运行时版本用于确定在工作流文件中设置的内部版本。 string

GitHubActionContainerConfiguration

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

ARM 模板资源定义

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

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

资源格式

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

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

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

了解如何在 JSON ARM 模板中设置子资源的名称和类型。
'web'
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 运行时堆栈用于确定代码基应用的工作流文件内容。 字符串
runtimeVersion 运行时版本用于确定在工作流文件中设置的内部版本。 string

GitHubActionContainerConfiguration

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

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

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

  • 资源组

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

资源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Web/sites/slots/sourcecontrols@2021-01-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/slots/sourcecontrols

名称 说明 Value
type 资源类型 “Microsoft.Web/sites/slots/sourcecontrols@2021-01-01”
name 资源名称 “Web”
parent_id 此资源的父资源 ID。 类型为“”的资源的 ID
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。 字符串

GitHubActionConfiguration

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

GitHubActionCodeConfiguration

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

GitHubActionContainerConfiguration

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