Web Apps - Restore Snapshot
从快照还原 Web 应用的说明。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot?api-version=2025-03-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
name
|
path | True |
string |
Web 应用的名称。 |
|
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.overwrite | True |
boolean |
如果还原作可以覆盖源应用程序;否则, |
| kind |
string |
资源类型。 |
|
| properties.ignoreConflictingHostNames |
boolean |
如果为 true,则恢复到目标 Web 应用时,将忽略自定义主机名冲突。 仅当启用 RecoverConfiguration 时,才需要此设置。 |
|
| properties.recoverConfiguration |
boolean |
如果为 true,则除了内容外,站点配置也会还原。 |
|
| properties.recoverySource |
可选。 指定将从中检索快照内容的 Web 应用。 如果为空,则目标 Web 应用程序将用作源。 |
||
| properties.snapshotTime |
string |
应用还原应在该时间点完成,格式为 DateTime 字符串。 |
|
| properties.useDRSecondary |
boolean |
如果为 true,则从 DRSecondary 端点检索快照。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
恢复作已启动。 |
|
| 202 Accepted |
恢复作已启动。 |
|
| Other Status Codes |
应用服务错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 冒充您的用户帐户 |
定义
| 名称 | 说明 |
|---|---|
|
Default |
应用服务错误响应。 |
| Details | |
| Error |
错误模型。 |
|
Snapshot |
指定将从中检索快照内容的 Web 应用。 |
|
Snapshot |
有关应用程序恢复作的详细信息。 |
DefaultErrorResponse
应用服务错误响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误模型。 |
Details
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
标准化字符串,以编程方式识别错误。 |
| message |
string |
详细的错误描述和调试信息。 |
| target |
string |
详细的错误描述和调试信息。 |
Error
错误模型。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
标准化字符串,以编程方式识别错误。 |
| details |
Details[] |
详细错误。 |
| innererror |
string |
调试错误的更多信息。 |
| message |
string |
详细的错误描述和调试信息。 |
| target |
string |
详细的错误描述和调试信息。 |
SnapshotRecoverySource
指定将从中检索快照内容的 Web 应用。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
源应用的 ARM 资源 ID。 /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} 用于生产槽位,/subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} 用于其他槽位。 |
| location |
string |
源 Web 应用程序的地理位置,例如 SoutheastAsia、SouthCentralUS |
SnapshotRestoreRequest
有关应用程序恢复作的详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源 ID。 |
| kind |
string |
资源类型。 |
| name |
string |
资源名称。 |
| properties.ignoreConflictingHostNames |
boolean |
如果为 true,则恢复到目标 Web 应用时,将忽略自定义主机名冲突。 仅当启用 RecoverConfiguration 时,才需要此设置。 |
| properties.overwrite |
boolean |
如果还原作可以覆盖源应用程序;否则, |
| properties.recoverConfiguration |
boolean |
如果为 true,则除了内容外,站点配置也会还原。 |
| properties.recoverySource |
可选。 指定将从中检索快照内容的 Web 应用。 如果为空,则目标 Web 应用程序将用作源。 |
|
| properties.snapshotTime |
string |
应用还原应在该时间点完成,格式为 DateTime 字符串。 |
| properties.useDRSecondary |
boolean |
如果为 true,则从 DRSecondary 端点检索快照。 |
| type |
string |
资源类型。 |