你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Web Apps - Create Or Update Source Control
更新应用的源代码管理配置的说明。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web?api-version=2024-04-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
name
|
path | True |
string |
应用的名称。 |
resource
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[-\w\._\(\)]+[^\.]$ |
资源所属的资源组的名称。 |
subscription
|
path | True |
string |
Azure 订阅 ID。 这是 GUID 格式的字符串(例如 000000000-0000-0000-0000-00000000000000)。 |
api-version
|
query | True |
string |
API 版本 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
kind |
string |
资源类型。 |
properties.branch |
string |
要用于部署的分支的名称。 |
properties.deploymentRollbackEnabled |
boolean |
|
properties.gitHubActionConfiguration |
如果选择 GitHub Action,则为关联的配置。 |
|
properties.isGitHubAction |
boolean |
如果是通过 GitHub作部署的,则 |
properties.isManualIntegration |
boolean |
|
properties.isMercurial |
boolean |
水星存储库的 |
properties.repoUrl |
string |
存储库或源代码管理 URL。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
已成功为 Web 应用创建或更新源代码管理。 |
|
201 Created |
正在为 Web 应用创建或更新源代码管理。 |
|
202 Accepted |
正在为 Web 应用创建或更新源代码管理。 |
|
Other Status Codes |
应用服务错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
定义
名称 | 说明 |
---|---|
Default |
应用服务错误响应。 |
Details | |
Error |
错误模型。 |
Git |
GitHub作代码配置。 |
Git |
GitHub作配置。 |
Git |
GitHub作容器配置。 |
Site |
应用的源代码管理配置。 |
DefaultErrorResponse
应用服务错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
错误模型。 |
Details
名称 | 类型 | 说明 |
---|---|---|
code |
string |
标准化字符串,以编程方式标识错误。 |
message |
string |
详细的错误说明和调试信息。 |
target |
string |
详细的错误说明和调试信息。 |
Error
错误模型。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
标准化字符串,以编程方式标识错误。 |
details |
Details[] |
详细错误。 |
innererror |
string |
调试错误的详细信息。 |
message |
string |
详细的错误说明和调试信息。 |
target |
string |
详细的错误说明和调试信息。 |
GitHubActionCodeConfiguration
GitHub作代码配置。
名称 | 类型 | 说明 |
---|---|---|
runtimeStack |
string |
运行时堆栈用于确定代码基应用的工作流文件内容。 |
runtimeVersion |
string |
运行时版本用于确定要在工作流文件中设置的生成版本。 |
GitHubActionConfiguration
GitHub作配置。
名称 | 类型 | 说明 |
---|---|---|
codeConfiguration |
GitHub Action 代码配置。 |
|
containerConfiguration |
GitHub Action 容器配置。 |
|
generateWorkflowFile |
boolean |
用于确定是否应生成工作流文件并将其写入存储库的工作流选项。 |
isLinux |
boolean |
这有助于确定要选择的工作流配置。 |
GitHubActionContainerConfiguration
GitHub作容器配置。
名称 | 类型 | 说明 |
---|---|---|
imageName |
string |
生成的映像名称。 |
password |
string |
用于将映像上传到容器注册表的密码。 |
serverUrl |
string |
将托管生成的容器注册表的服务器 URL。 |
username |
string |
用于将映像上传到容器注册表的用户名。 |
SiteSourceControl
应用的源代码管理配置。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源 ID。 |
kind |
string |
资源类型。 |
name |
string |
资源名称。 |
properties.branch |
string |
要用于部署的分支的名称。 |
properties.deploymentRollbackEnabled |
boolean |
|
properties.gitHubActionConfiguration |
如果选择 GitHub Action,则为关联的配置。 |
|
properties.isGitHubAction |
boolean |
如果是通过 GitHub作部署的,则 |
properties.isManualIntegration |
boolean |
|
properties.isMercurial |
boolean |
水星存储库的 |
properties.repoUrl |
string |
存储库或源代码管理 URL。 |
type |
string |
资源类型。 |