Requests temporary file upload authorization for code-based deployment. Other scenarios are not supported. After obtaining authorization, you must upload the file yourself.
Usage notes
- This operation is used for code-based deployment. Other scenarios are not supported.
- After obtaining a temporary file upload authorization with this operation, you must upload the file yourself.
Try it out
You can call this operation in OpenAPI Explorer without calculating a signature. After a successful call, OpenAPI Explorer can automatically generate SDK code examples.
Try it out
Authorization information
The following table describes the authorization information for this API operation. You can use this information in the Action element of a RAM policy statement to grant a RAM user or RAM role permission to call the operation. The columns are described as follows:
- Action: a specific permission.
- Access level: the access level of an action. Valid values: Write, Read, and List.
-
Resource type: the types of resources for which the action supports authorization:
- Required resource types are marked with an asterisk (*).
- Actions that do not support resource-level authorization use
All resources.
- Condition key: a condition key defined by the cloud service.
- Dependent action: an additional permission required to perform the action. The caller must also have permission to perform the dependent action.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| sfm:ApplyTempStorageLease | none | *All resources * |
| None |
Request syntax
Request parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| FileName | string | Yes | The file name, which must include the file extension. | example.txt |
| SizeInBytes | long | Yes | The file size in bytes. | 1024 |
| WorkspaceId | string | Yes | The Model Studio workspace ID. | llm-mbhn96xxxx |
Response parameters
| Name | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| Code | string | The error status code. | DataCenter.FileTooLarge |
| Data | object | The business data returned by the operation. | |
| TempStorageLeaseId | string | The unique lease ID. This parameter is required when the application retrieves the uploaded file later. | 1e6a159107384782be5e45ac4759b247.1719325231035 |
| Param | object | The HTTP parameters used to upload the file. | |
| Headers | any | The key-value pairs to place in the headers. Both keys and values are strings. | Content-Type: application/json |
| Method | string | The HTTP method. Valid values: PUT POST | PUT |
| Url | string | The authorized URL for uploading the file. | https://bailian-datahub-data-origin-prod.oss-cn-hangzhou.aliyuncs.com/1005426495169178/10024405/68abd1dea7b6404d8f7d7b9f7fbd332d.1716698936847.pdf?Expires=1716699536&OSSAccessKeyId=YOUR_ACCESS_KEY_ID&Signature=YOUR_SIGNATURE |
| Message | string | The error message. | User not authorized to operate on the specified resource |
| RequestId | string | The request ID. | 778C0B3B-xxxx-5FC1-A947-36EDD13606AB |
| Status | string | The status code returned by the operation. | 200 |
| Success | boolean | Indicates whether the call succeeded. |
Examples
Sample success response
JSON format
Error codes
For more error codes, see Error Center.
Change history
| Change date | Change summary | Action |
|---|---|---|
| 2025-11-04 | New OpenAPI | View change details |