Meminta lease unggah file sementara. Operasi ini hanya digunakan untuk penerapan pro-code dan tidak didukung dalam skenario lain. Setelah mendapatkan lease, Anda harus menyelesaikan unggahan file sendiri.
Deskripsi operasi
Operasi ini hanya digunakan untuk penerapan pro-code dan tidak didukung dalam skenario lain.
Setelah mendapatkan lease unggah file sementara melalui operasi ini, Anda harus menyelesaikan unggahan file sendiri.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sfm:ApplyTempStorageLease |
none |
*全部资源
|
None | None |
Sintaks permintaan
POST /{WorkspaceId}/datacenter HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| WorkspaceId |
string |
Yes |
ID ruang kerja Bailian. |
llm-mbhn96xxxx |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| FileName |
string |
Yes |
Nama file, termasuk ekstensi nama file. |
example.txt |
| SizeInBytes |
integer |
Yes |
Ukuran file dalam byte. |
1024 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Skema Respons. |
||
| Code |
string |
Kode status error. |
DataCenter.FileTooLarge |
| Data |
object |
Bidang data bisnis yang dikembalikan oleh operasi. |
|
| TempStorageLeaseId |
string |
ID unik lease. Parameter ini diperlukan saat mengambil file yang diunggah di dalam aplikasi. |
1e6a159107384782be5e45ac4759b247.1719325231035 |
| Param |
object |
Parameter HTTP yang digunakan untuk mengunggah file. |
|
| Headers |
any |
K-V fields to be included in the Header; both Key and Value are strings. |
Content-Type: application/json |
| Method |
string |
HTTP method for the call. Valid values: PUT POST |
PUT |
| Url |
string |
Authorized URL for the file upload. |
https://bailian-datahub-data-origin-prod.oss-cn-hangzhou.aliyuncs.com/1005426495169178/10024405/68abd1dea7b6404d8f7d7b9f7fbd332d.1716698936847.pdf?Expires=1716699536&OSSAccessKeyId=TestID&Signature=HfwPUZo4pR6DatSDym0zFKVh9Wg%3D |
| Message |
string |
Paket error. |
User not authorized to operate on the specified resource |
| RequestId |
string |
ID permintaan. |
778C0B3B-xxxx-5FC1-A947-36EDD13606AB |
| Status |
string |
Kode status yang dikembalikan oleh operasi. |
200 |
| Success |
boolean |
Apakah panggilan API berhasil. |
Contoh
Respons sukses
JSONformat
{
"Code": "DataCenter.FileTooLarge",
"Data": {
"TempStorageLeaseId": "1e6a159107384782be5e45ac4759b247.1719325231035",
"Param": {
"Headers": "Content-Type: application/json",
"Method": "PUT",
"Url": "https://bailian-datahub-data-origin-prod.oss-cn-hangzhou.aliyuncs.com/1005426495169178/10024405/68abd1dea7b6404d8f7d7b9f7fbd332d.1716698936847.pdf?Expires=1716699536&OSSAccessKeyId=TestID&Signature=HfwPUZo4pR6DatSDym0zFKVh9Wg%3D"
}
},
"Message": "User not authorized to operate on the specified resource",
"RequestId": "778C0B3B-xxxx-5FC1-A947-36EDD13606AB",
"Status": "200",
"Success": false
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.