Web Apps - Create Or Update Site Container
创建或更新站点的站点容器或部署槽。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName}?api-version=2025-03-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
container
|
path | True |
string pattern: (^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]$) |
站点容器名称 |
|
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 版本 |
请求正文
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| properties.image | True |
string |
映像名称 |
| properties.isMain | True |
boolean |
|
| kind |
string |
资源类型。 |
|
| properties.authType |
身份验证类型 |
||
| properties.environmentVariables |
环境变量列表 |
||
| properties.inheritAppSettingsAndConnectionStrings |
boolean |
|
|
| properties.passwordSecret |
string |
密码密码 |
|
| properties.startUpCommand |
string |
StartUp 命令 |
|
| properties.targetPort |
string |
目标端口 |
|
| properties.userManagedIdentityClientId |
string |
UserManagedIdentity 客户端 ID |
|
| properties.userName |
string |
用户名 |
|
| properties.volumeMounts |
卷装载列表 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
站点容器已更新。 |
|
| 201 Created |
站点容器已创建。 |
|
| Other Status Codes |
应用服务错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
定义
| 名称 | 说明 |
|---|---|
|
Auth |
身份验证类型 |
|
Default |
应用服务错误响应。 |
| Details | |
|
Environment |
|
| Error |
错误模型。 |
|
Site |
站点的容器 |
|
Volume |
AuthType
身份验证类型
| 值 | 说明 |
|---|---|
| Anonymous | |
| UserCredentials | |
| SystemIdentity | |
| UserAssigned |
DefaultErrorResponse
应用服务错误响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误模型。 |
Details
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
标准化字符串,以编程方式识别错误。 |
| message |
string |
详细的错误描述和调试信息。 |
| target |
string |
详细的错误描述和调试信息。 |
EnvironmentVariable
| 名称 | 类型 | 说明 |
|---|---|---|
| name |
string |
环境变量名称 |
| value |
string |
此环境变量的值必须是 AppSetting 的名称。 容器中环境变量的实际值将在运行时从指定的 AppSetting 中检索。 如果未找到 AppSetting,则在运行时将该值设置为容器中的空字符串。 |
Error
错误模型。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
标准化字符串,以编程方式识别错误。 |
| details |
Details[] |
详细错误。 |
| innererror |
string |
调试错误的更多信息。 |
| message |
string |
详细的错误描述和调试信息。 |
| target |
string |
详细的错误描述和调试信息。 |
SiteContainer
站点的容器
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源 ID。 |
| kind |
string |
资源类型。 |
| name |
string |
资源名称。 |
| properties.authType |
身份验证类型 |
|
| properties.createdTime |
string (date-time) |
创建时间 |
| properties.environmentVariables |
环境变量列表 |
|
| properties.image |
string |
映像名称 |
| properties.inheritAppSettingsAndConnectionStrings |
boolean |
|
| properties.isMain |
boolean |
|
| properties.lastModifiedTime |
string (date-time) |
上次修改时间 |
| properties.passwordSecret |
string |
密码密码 |
| properties.startUpCommand |
string |
StartUp 命令 |
| properties.targetPort |
string |
目标端口 |
| properties.userManagedIdentityClientId |
string |
UserManagedIdentity 客户端 ID |
| properties.userName |
string |
用户名 |
| properties.volumeMounts |
卷装载列表 |
|
| type |
string |
资源类型。 |
VolumeMount
| 名称 | 类型 | 说明 |
|---|---|---|
| containerMountPath |
string |
装载卷的容器上的目标路径 |
| data |
string |
配置要装载在卷上的数据 |
| readOnly |
boolean |
指定装载是否在容器上为只读的布尔值 |
| volumeSubPath |
string |
卷中装载卷的子路径。 |