All Products
Search
Document Center

Alibaba Cloud Model Studio:ApplyTempStorageLease

Last Updated:Dec 22, 2025

This interface is intended for pro-code deployment only; other scenarios are currently not supported. It is used to apply for a temporary file upload lease. After obtaining the lease, you must upload the file manually.

Operation description

1. This interface is intended for pro-code deployment only; other scenarios are currently not supported. 2. After obtaining the temporary file upload lease via this interface, upload the file manually.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
sfm:ApplyTempStorageLeasenone
*All Resources
*
    none
none

Request syntax

POST /{WorkspaceId}/datacenter HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
FileNamestringYes

The file name, including the file extension.

example.txt
SizeInByteslongYes

The size of the file, in bytes.

1024
WorkspaceIdstringYes

The Model Studio workspace ID.

llm-mbhn96xxxx

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

Codestring

The status code.

DataCenter.FileTooLarge
Dataobject

The returned data fields.

TempStorageLeaseIdstring

Unique lease ID. This parameter is required when retrieving the uploaded file within the application later.

1e6a159107384782be5e45ac4759b247.1719325231035
Paramobject

HTTP parameters used for uploading the file.

Headersany

K-V fields to be included in the Header; both Key and Value are strings.

Content-Type: application/json
Methodstring

HTTP method for the call. Valid values: PUT POST

PUT
Urlstring

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
Messagestring

The error message.

User not authorized to operate on the specified resource
RequestIdstring

The request ID.

778C0B3B-xxxx-5FC1-A947-36EDD13606AB
Statusstring

The HTTP status code returned.

200
Successboolean

Indicates whether the request was successful.

Examples

Sample success responses

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": true
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-11-04Add OperationView Change Details