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

Microsoft.App containerApps/sourcecontrols

Bicep 资源定义

可以使用目标操作部署 containerApps/sourcecontrols 资源类型:

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

资源格式

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

resource symbolicname 'Microsoft.App/containerApps/sourcecontrols@2024-10-02-preview' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    branch: 'string'
    githubActionConfiguration: {
      azureCredentials: {
        clientId: 'string'
        clientSecret: 'string'
        kind: 'string'
        subscriptionId: 'string'
        tenantId: 'string'
      }
      buildEnvironmentVariables: [
        {
          name: 'string'
          value: 'string'
        }
      ]
      contextPath: 'string'
      dockerfilePath: 'string'
      githubPersonalAccessToken: 'string'
      image: 'string'
      os: 'string'
      publishType: 'string'
      registryInfo: {
        registryPassword: 'string'
        registryUrl: 'string'
        registryUserName: 'string'
      }
      runtimeStack: 'string'
      runtimeVersion: 'string'
    }
    repoUrl: 'string'
  }
}

属性值

AzureCredentials

名字 描述 价值
clientId 客户端 ID。 字符串

约束:
敏感值。 以安全参数的形式传入。
clientSecret 客户端密码。 字符串

约束:
敏感值。 以安全参数的形式传入。
用于部署模板的身份验证 github 类型 字符串
subscriptionId 订阅 ID。 字符串
tenantId 租户 ID。 字符串

约束:
敏感值。 以安全参数的形式传入。

EnvironmentVariable

名字 描述 价值
名字 环境变量名称。 string (必需)
价值 环境变量值。 string (必需)

GithubActionConfiguration

名字 描述 价值
azureCredentials AzureCredentials 配置。 AzureCredentials
buildEnvironmentVariables 要传递给生成的环境变量的列表。 EnvironmentVariable[]
contextPath 上下文路径 字符串
dockerfilePath Dockerfile 路径 字符串
githubPersonalAccessToken 一次性配置 github 环境的 Github PAT 字符串

约束:
敏感值。 以安全参数的形式传入。
图像 映像名称 字符串
操作系统 操作系统 字符串
publishType 代码或图像 字符串
registryInfo 注册表配置。 RegistryInfo
runtimeStack 运行时堆栈 字符串
runtimeVersion 运行时版本 字符串

Microsoft.App/containerApps/sourcecontrols

名字 描述 价值
名字 资源名称 string (必需)
父母 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源外部的子资源
类型资源的符号名称:containerApps
性能 SourceControl 资源特定属性 SourceControlProperties

RegistryInfo

名字 描述 价值
registryPassword 注册表机密。 字符串

约束:
敏感值。 以安全参数的形式传入。
registryUrl 注册表服务器 URL。 字符串
registryUserName 注册表用户名。 字符串

SourceControlProperties

名字 描述 价值
分支 将触发自动部署的分支 字符串
githubActionConfiguration 包含所有可能设置和 的容器应用修订模板
如果用户未提供它们,则默认值为 。 默认值已填充
在创建时一样
GithubActionConfiguration
repoUrl 要集成到 ContainerApp 的存储库 URL。 字符串

ARM 模板资源定义

可以使用目标操作部署 containerApps/sourcecontrols 资源类型:

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

资源格式

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

{
  "type": "Microsoft.App/containerApps/sourcecontrols",
  "apiVersion": "2024-10-02-preview",
  "name": "string",
  "properties": {
    "branch": "string",
    "githubActionConfiguration": {
      "azureCredentials": {
        "clientId": "string",
        "clientSecret": "string",
        "kind": "string",
        "subscriptionId": "string",
        "tenantId": "string"
      },
      "buildEnvironmentVariables": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "contextPath": "string",
      "dockerfilePath": "string",
      "githubPersonalAccessToken": "string",
      "image": "string",
      "os": "string",
      "publishType": "string",
      "registryInfo": {
        "registryPassword": "string",
        "registryUrl": "string",
        "registryUserName": "string"
      },
      "runtimeStack": "string",
      "runtimeVersion": "string"
    },
    "repoUrl": "string"
  }
}

属性值

AzureCredentials

名字 描述 价值
clientId 客户端 ID。 字符串

约束:
敏感值。 以安全参数的形式传入。
clientSecret 客户端密码。 字符串

约束:
敏感值。 以安全参数的形式传入。
用于部署模板的身份验证 github 类型 字符串
subscriptionId 订阅 ID。 字符串
tenantId 租户 ID。 字符串

约束:
敏感值。 以安全参数的形式传入。

EnvironmentVariable

名字 描述 价值
名字 环境变量名称。 string (必需)
价值 环境变量值。 string (必需)

GithubActionConfiguration

名字 描述 价值
azureCredentials AzureCredentials 配置。 AzureCredentials
buildEnvironmentVariables 要传递给生成的环境变量的列表。 EnvironmentVariable[]
contextPath 上下文路径 字符串
dockerfilePath Dockerfile 路径 字符串
githubPersonalAccessToken 一次性配置 github 环境的 Github PAT 字符串

约束:
敏感值。 以安全参数的形式传入。
图像 映像名称 字符串
操作系统 操作系统 字符串
publishType 代码或图像 字符串
registryInfo 注册表配置。 RegistryInfo
runtimeStack 运行时堆栈 字符串
runtimeVersion 运行时版本 字符串

Microsoft.App/containerApps/sourcecontrols

名字 描述 价值
apiVersion API 版本 '2024-10-02-preview'
名字 资源名称 string (必需)
性能 SourceControl 资源特定属性 SourceControlProperties
类型 资源类型 “Microsoft.App/containerApps/sourcecontrols”

RegistryInfo

名字 描述 价值
registryPassword 注册表机密。 字符串

约束:
敏感值。 以安全参数的形式传入。
registryUrl 注册表服务器 URL。 字符串
registryUserName 注册表用户名。 字符串

SourceControlProperties

名字 描述 价值
分支 将触发自动部署的分支 字符串
githubActionConfiguration 包含所有可能设置和 的容器应用修订模板
如果用户未提供它们,则默认值为 。 默认值已填充
在创建时一样
GithubActionConfiguration
repoUrl 要集成到 ContainerApp 的存储库 URL。 字符串

用法示例

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

可以使用目标操作部署 containerApps/sourcecontrols 资源类型:

  • 资源组

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

资源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.App/containerApps/sourcecontrols@2024-10-02-preview"
  name = "string"
  body = jsonencode({
    properties = {
      branch = "string"
      githubActionConfiguration = {
        azureCredentials = {
          clientId = "string"
          clientSecret = "string"
          kind = "string"
          subscriptionId = "string"
          tenantId = "string"
        }
        buildEnvironmentVariables = [
          {
            name = "string"
            value = "string"
          }
        ]
        contextPath = "string"
        dockerfilePath = "string"
        githubPersonalAccessToken = "string"
        image = "string"
        os = "string"
        publishType = "string"
        registryInfo = {
          registryPassword = "string"
          registryUrl = "string"
          registryUserName = "string"
        }
        runtimeStack = "string"
        runtimeVersion = "string"
      }
      repoUrl = "string"
    }
  })
}

属性值

AzureCredentials

名字 描述 价值
clientId 客户端 ID。 字符串

约束:
敏感值。 以安全参数的形式传入。
clientSecret 客户端密码。 字符串

约束:
敏感值。 以安全参数的形式传入。
用于部署模板的身份验证 github 类型 字符串
subscriptionId 订阅 ID。 字符串
tenantId 租户 ID。 字符串

约束:
敏感值。 以安全参数的形式传入。

EnvironmentVariable

名字 描述 价值
名字 环境变量名称。 string (必需)
价值 环境变量值。 string (必需)

GithubActionConfiguration

名字 描述 价值
azureCredentials AzureCredentials 配置。 AzureCredentials
buildEnvironmentVariables 要传递给生成的环境变量的列表。 EnvironmentVariable[]
contextPath 上下文路径 字符串
dockerfilePath Dockerfile 路径 字符串
githubPersonalAccessToken 一次性配置 github 环境的 Github PAT 字符串

约束:
敏感值。 以安全参数的形式传入。
图像 映像名称 字符串
操作系统 操作系统 字符串
publishType 代码或图像 字符串
registryInfo 注册表配置。 RegistryInfo
runtimeStack 运行时堆栈 字符串
runtimeVersion 运行时版本 字符串

Microsoft.App/containerApps/sourcecontrols

名字 描述 价值
名字 资源名称 string (必需)
parent_id 此资源的父资源的 ID。 类型资源的 ID:containerApps
性能 SourceControl 资源特定属性 SourceControlProperties
类型 资源类型 “Microsoft.App/containerApps/sourcecontrols@2024-10-02-preview”

RegistryInfo

名字 描述 价值
registryPassword 注册表机密。 字符串

约束:
敏感值。 以安全参数的形式传入。
registryUrl 注册表服务器 URL。 字符串
registryUserName 注册表用户名。 字符串

SourceControlProperties

名字 描述 价值
分支 将触发自动部署的分支 字符串
githubActionConfiguration 包含所有可能设置和 的容器应用修订模板
如果用户未提供它们,则默认值为 。 默认值已填充
在创建时一样
GithubActionConfiguration
repoUrl 要集成到 ContainerApp 的存储库 URL。 字符串