Method: folders.move

Moves a Folder under a new resource parent. Returns an Operation which can be used to track the progress of the folder move workflow. Upon success the Operation.response field will be populated with the moved Folder. Upon failure, a FolderOperationError categorizing the failure cause will be returned - if the failure occurs synchronously then the FolderOperationError will be returned via the Status.details field and if it occurs asynchronously then the FolderOperation will be returned via the the Operation.error field. In addition, the Operation.metadata field will be populated with a FolderOperation message as an aid to stateless clients. Folder moves will be rejected if they violate either the naming, height or fanout constraints described in the folders.create documentation. The caller must have resourcemanager.folders.move permission on the folder's current and proposed new parent.

HTTP request

POST https://cloudresourcemanager.googleapis.com/v2beta1/{name=folders/*}:move

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

The resource name of the Folder to move. Must be of the form folders/{folder_id}

Authorization requires the following IAM permission on the specified resource name:

  • resourcemanager.folders.move

Request body

The request body contains data with the following structure:

JSON representation
{
  "destinationParent": string
}
Fields
destinationParent

string

The resource name of the Folder or Organization to reparent the folder under. Must be of the form folders/{folder_id} or organizations/{org_id}.

Authorization requires the following IAM permission on the specified resource destinationParent:

  • resourcemanager.folders.move

Response body

If successful, the response body contains an instance of Operation.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloudplatformfolders

For more information, see the Authentication Overview.