你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Resources - Move Resources
将资源从一个资源组移到另一个资源组。
要移动的资源必须位于正在使用的源订阅中的同一个源资源组中。 目标资源组可能位于不同的订阅中。 移动资源时,源组和目标组在操作期间处于锁定状态。 在完成移动之前,将阻止对组执行写入和删除操作。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources?api-version=2021-04-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
source
|
path | True |
string |
包含要移动的资源的源订阅中的资源组的名称。 Regex pattern: |
subscription
|
path | True |
string |
Microsoft Azure 订阅 ID。 |
api-version
|
query | True |
string |
要用于此操作的 API 版本。 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
resources |
string[] |
资源的 ID。 |
targetResourceGroup |
string |
目标资源组。 |
响应
名称 | 类型 | 说明 |
---|---|---|
202 Accepted |
已接受 |
|
204 No Content |
无内容 |
|
Other Status Codes |
描述操作失败原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
定义
名称 | 说明 |
---|---|
Cloud |
资源管理请求的错误响应。 |
Error |
资源管理错误附加信息。 |
Error |
错误响应 |
Resources |
移动资源的参数。 |
CloudError
资源管理请求的错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
错误响应 |
ErrorAdditionalInfo
资源管理错误附加信息。
名称 | 类型 | 说明 |
---|---|---|
info |
object |
其他信息。 |
type |
string |
其他信息类型。 |
ErrorResponse
错误响应
名称 | 类型 | 说明 |
---|---|---|
additionalInfo |
错误附加信息。 |
|
code |
string |
错误代码。 |
details |
错误详细信息。 |
|
message |
string |
错误消息。 |
target |
string |
错误目标。 |
ResourcesMoveInfo
移动资源的参数。
名称 | 类型 | 说明 |
---|---|---|
resources |
string[] |
资源的 ID。 |
targetResourceGroup |
string |
目标资源组。 |