Resources - Move Resources

將資源從一個資源群組移至另一個資源群組。
要移動的資源必須位於所使用來源訂用帳戶中的相同來源資源群組中。 目標資源群組可能位於不同的訂用帳戶中。 移動資源時,來源群組和目標群組都會在作業期間鎖定。 群組上的寫入和刪除作業將會封鎖,直到移動完成。

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources?api-version=2021-04-01

URI 參數

名稱 位於 必要 類型 Description
sourceResourceGroupName
path True

string

來源訂用帳戶中要移動之資源的資源群組名稱。

Regex pattern: ^[-\w\._\(\)]+$

subscriptionId
path True

string

Microsoft Azure 訂用帳戶標識碼。

api-version
query True

string

用於此作業的 API 版本。

要求本文

名稱 類型 Description
resources

string[]

資源的標識碼。

targetResourceGroup

string

目標資源群組。

回應

名稱 類型 Description
202 Accepted

已接受

204 No Content

沒有內容

Other Status Codes

CloudError

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

定義

名稱 Description
CloudError

資源管理要求的錯誤回應。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorResponse

錯誤回應

ResourcesMoveInfo

移動資源的參數。

CloudError

資源管理要求的錯誤回應。

名稱 類型 Description
error

ErrorResponse

錯誤回應
所有 Azure Resource Manager API 的常見錯誤回應,以傳回失敗作業的錯誤詳細數據。 (這也會遵循 OData 錯誤回應格式。)

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorResponse

錯誤回應

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorResponse[]

錯誤詳細資料。

message

string

錯誤訊息。

target

string

錯誤目標。

ResourcesMoveInfo

移動資源的參數。

名稱 類型 Description
resources

string[]

資源的標識碼。

targetResourceGroup

string

目標資源群組。