Create a file share.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecd:CreateCdsFileShareLink |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CdsId |
string |
Yes |
The ID of the cloud disk. |
cn-shanghai+cds-135515**** |
| SharePwd |
string |
No |
The length of the access code. Valid values: 6 to 8. Unit: bytes. If you leave this parameter empty or set it to null, no access code is required. If you use a token to share files, you do not need to configure this parameter. The access code can contain only visible ASCII characters. |
12345678 |
| Expiration |
string |
No |
The time when the file sharing link expires. The value of this parameter follows the RFC 3339 standard. Example: "2020-06-28T11:33:00.000+08:00". If this parameter is set to "", the file sharing link never expires. |
2020-06-28T11:33:00.000+08:00 |
| Description |
string |
No |
The description of the file sharing task. The description must be 0 to 1,024 characters in length. |
SharedFile |
| ShareName |
string |
No |
The name of the file sharing task. If you leave this parameter empty, the file name that corresponds to the first ID in the file ID list is used. The name must be 0 to 128 characters in length. |
view.txt |
| DisablePreview |
boolean |
No |
Specifies whether to prohibit the preview of the files that are being shared. Valid values:
Valid values:
|
false |
| DisableSave |
boolean |
No |
Specifies whether to prohibit the dump of the files that are being shared. Valid values:
Valid values:
|
false |
| DisableDownload |
boolean |
No |
Specifies whether to prohibit the download of the files that are being shared. Valid values:
Valid values:
|
false |
| PreviewLimit |
integer |
No |
The limit on the number of times that the shared files can be previewed. The value of this parameter must be equal to or greater than 0. The value 0 specifies that no limit is imposed on the number of times that the shared files can be previewed. |
100 |
| SaveLimit |
integer |
No |
The limit on the number of times that the shared files can be dumped. The value of this parameter must be equal to or greater than 0. The value 0 specifies that no limit is imposed on the number of times that the shared files can be dumped. |
100 |
| DownloadLimit |
integer |
No |
The limit on the number of times that the shared files can be downloaded. The value of this parameter must be equal to or greater than 0. The value 0 specifies that no limit is imposed on the number of times that the shared files can be downloaded. |
100 |
| EndUserId |
string |
No |
The ID of the end user. |
alice |
| FileIds |
array |
No |
The file IDs. |
|
|
string |
No |
The file ID. |
[ "4221bf6e6ab43c255edc4463bf3a6f5f5d31****" ] |
|
| GroupId |
string |
No |
Team space ID. |
cg-i1ruuudp92qpj**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| 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 |
| Data | CdsFileShareLinkModel |
The data information. |
|
| RequestId |
string |
The request ID. |
51592A88-0F2C-55E6-AD2C-2AD9C10D**** |
| Success |
boolean |
Indicates whether the request is successful. Valid values:
Valid values:
|
true |
Examples
Success response
JSON format
{
"Code": "success",
"Message": "success",
"Data": {
"Description": "文件分享链接。",
"SaveLimit": 100,
"DownloadCount": 100,
"Creator": "user01",
"SaveCount": 100,
"DisableSave": false,
"SharePwd": "12345678",
"DisablePreview": false,
"AccessCount": 10000,
"ShareId": "7JQX1Fs****",
"DownloadLimit": 100,
"Status": "disabled",
"DriveId": "dri-g0877jp3hu1ox****",
"ModifiyTime": "2021-09-04T04:30:36Z",
"DisableDownload": false,
"Expiration": "2020-06-28T11:33:00.000+08:00",
"Expired": true,
"PreviewCount": 0,
"PreviewLimit": 100,
"VideoPreviewCount": 0,
"ReportCount": 0,
"FileIds": "[\\\"63886f1fe2014d9a5a3348768dcc27dfc57ee103\\\"]",
"ShareName": "view.txt",
"CreateTime": "2021-09-04T03:30:36Z",
"ShareLink": "https://stg109960.apps.aliyunpds.com/disk/s/7uLJanz****"
},
"RequestId": "51592A88-0F2C-55E6-AD2C-2AD9C10D****",
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.