Create a copy of a file or folder in the cloud drive.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecd:CopyCdsFile |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| CdsId |
string |
Yes |
The ID of the cloud disk. |
cn-hangzhou+cds-352282**** |
| FileId |
string |
Yes |
The file ID. You can call the CreateCdsFile operation to query the file ID. |
640985a0ca2f71f489d2497682ca0bf468de**** |
| EndUserId |
string |
No |
The user ID that you want to use to access the cloud disk. |
user01 |
| ParentFolderId |
string |
Yes |
The ID of the parent folder of the folder to which you want to copy the file. If you want to copy the file to the root directory, set this parameter to root. |
root |
| AutoRename |
boolean |
No |
Specifies whether to automatically rename the file if a file that has the same name exists in the folder to which you want to copy the file. Default value: false. Valid values:
Valid values:
|
true |
| FileReceiverId |
string |
No |
目标复制文件所在的个人空间 ID(即 UserId,您可以在 DescribeCloudDriveUsers 接口返回的报文中获取。)或者目标复制文件所在的团队空间 ID(即 GroupId,您可以在 DescribeCloudDriveGroups 接口返回的报文中获取。) Note
FileReceiverId 和 FileReceiverType 都为空时,默认复制到文件所在的个人空间。 |
user02 |
| FileReceiverType |
string |
No |
文件所属的空间类型。 Valid values:
|
user |
| GroupId |
string |
No |
The team Space ID. |
cg-hs3i1w39o68ma**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
93AD30C1-16B8-5C54-AD23-A51FF53F**** |
| Code |
string |
The operation result. The value success indicates that the operation is successful. If the operation failed, an error message is returned. |
success |
| Message |
string |
The error message that is returned. This parameter is not returned if the value of Code is success. |
success |
| Success |
string |
Indicates whether the request is successful. Valid values:
Valid values:
|
true |
| CopyCdsFileModel |
object |
The details about the file copying. |
|
| AsyncTaskId |
string |
The ID of the asynchronous task. This parameter is not returned if you copy a file. This parameter is returned if you copy a folder in the backend in an asynchronous manner. You can call the GetAsyncTask operation to obtain the ID and details of an asynchronous task. |
4221bf6e6ab43a255edc4463bffa6f5f5d31**** |
| FileId |
string |
The ID of the copied file or folder. |
6400727cb878821bcb414615a609b4072463**** |
Examples
Success response
JSON format
{
"RequestId": "93AD30C1-16B8-5C54-AD23-A51FF53F****",
"Code": "success",
"Message": "success",
"Success": "true",
"CopyCdsFileModel": {
"AsyncTaskId": "4221bf6e6ab43a255edc4463bffa6f5f5d31****",
"FileId": "6400727cb878821bcb414615a609b4072463****"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.