ApplyTempStorageLease - Request temporary file upload authorization
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.
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 |
Endpoint
/{WorkspaceId}/datacenterPath parameters
WorkspaceIdstringRequiredThe Model Studio workspace ID.
Request body
FileNamestringRequiredThe file name, which must include the file extension.
SizeInByteslongRequiredThe file size in bytes.
Response fields
Schema of Response
CodestringThe error status code.
DataobjectThe business data returned by the operation.
TempStorageLeaseIdstringThe unique lease ID. This parameter is required when the application retrieves the uploaded file later.
ParamobjectThe HTTP parameters used to upload the file.
HeadersanyThe key-value pairs to place in the headers. Both keys and values are strings.
MethodstringThe HTTP method. Valid values: PUT POST
UrlstringThe authorized URL for uploading the file.
MessagestringThe error message.
RequestIdstringThe request ID.
StatusstringThe status code returned by the operation.
SuccessbooleanIndicates whether the call succeeded.
Response example
Sample success response
JSON format
{
"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=YOUR_ACCESS_KEY_ID&Signature=YOUR_SIGNATURE"
}
},
"Message": "User not authorized to operate on the specified resource",
"RequestId": "778C0B3B-xxxx-5FC1-A947-36EDD13606AB",
"Status": 200,
"Success": true
}
Error codes
For more error codes, see Error Center.
Change history
| Change date | Change summary | Action |
|---|---|---|
| 2025-11-04 | New OpenAPI | View change details |