ApplyTempStorageLease - Request temporary file upload authorization

Updated at:

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

  1. This operation is used for code-based deployment. Other scenarios are not supported.
  2. 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.

ActionAccess levelResource typeCondition keyDependent action

sfm:ApplyTempStorageLease

none

*All resources*

None

None

Request syntax

POST /{WorkspaceId}/datacenter HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample

FileName

string

Yes

The file name, including the extension.

example.txt

SizeInBytes

long

Yes

The file size in bytes.

1024

WorkspaceId

string

Yes

The Alibaba Cloud Model Studio workspace ID.

llm-mbhn96xxxx

Response parameters

NameTypeDescriptionExample

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. Use this parameter to access the uploaded file in subsequent application calls.

1e6a159107384782be5e45ac4759b247.1719325231035

Param

object

The HTTP parameters for uploading the file.

Headers

any

The key-value pairs to include in the HTTP headers. Both keys and values are strings.

Content-Type: application/json

Method

string

The HTTP method. Valid values: PUT and 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 API call succeeded.

Examples

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 dateChange summaryAction

2025-11-04

New API operation

View change details