Mengunggah file yang berisi sumber daya untuk di-purge atau di-prefetch.
Deskripsi operasi
Ukuran file maksimal 10 MB.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
esa:UploadFile |
create |
*Site
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| SiteId |
integer |
Yes |
ID website. Anda dapat memanggil operasi ListSites untuk mendapatkan ID tersebut. |
123456789**** |
| Url |
string |
Yes |
URL OSS dari file yang berisi sumber daya yang akan di-purge atau di-prefetch. |
https://xxxxx.oss-cn-shenzhen.aliyuncs.com/test_oss_file?Expires=1708659191&OSSAccessKeyId=**********&Signature=********** |
| Type |
string |
Yes |
Jenis tugas purge atau prefetch. Nilai yang valid:
|
file |
| UploadTaskName |
string |
Yes |
Nama tugas unggah. |
purge_task_2024_11_11 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Skema Respons |
||
| RequestId |
string |
ID permintaan. |
3C6CCEC4-6B88-4D4A-93E4-D47B3D92CF8F |
| UploadId |
integer |
ID tugas unggah file. Anda dapat menggunakan ID ini untuk pengiriman atau kueri tugas selanjutnya. |
159253299357**** |
Contoh
Respons sukses
JSONformat
{
"RequestId": "3C6CCEC4-6B88-4D4A-93E4-D47B3D92CF8F",
"UploadId": 0
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidTime | The query time cannot exceed the last 3 days. | The query time cannot exceed the last 3 days. |
| 400 | MissingParameter.ObjectType | The ObjectType parameter is required if DomainName or ObjectType is specified. | Specify the ObjectType parameter. |
| 400 | InvalidParameters | The specified parameters are invalid. | Parameter is illegal. |
| 400 | ExceedFileUpload | The size of the uploaded file exceeds the upper limit. Select a file less than 10 MB. | The size of the uploaded file exceeds the upper limit. Select a file less than 10 MB. |
| 400 | TooManyRequests | Too many requests.Please try again later. | Requests are too frequent, please try again later. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.