GetUploadInfo

Updated at:

Retrieves the OSS endpoint, directory, and STS temporary credentials required to upload image task files.

Operation description

FileType currently supports only TASK. Use the returned OSS endpoint, bucket, file directory, and temporary credentials to upload files. After the file is uploaded, you can pass the complete OSS object path to ImportImage. Expiration is not supported.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

appstreaming:GetUploadInfo

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

FileType

string

No

The type of the file to upload. Currently, only TASK is supported, which indicates an image task file.

TASK

BizRegionId

string

No

The ID of the business region where the file is uploaded. If this parameter is not specified, the default OSS region configured for the service is used.

cn-hangzhou

Response elements

Element

Type

Description

Example

object

The API call result.

Data

object

The file upload address and temporary credentials.

OssPoint

string

The OSS endpoint for public network access.

oss-cn-shanghai.aliyuncs.com

OssPointInternal

string

The internal OSS endpoint.

oss-cn-shanghai-internal.aliyuncs.com

BucketName

string

The name of the destination OSS bucket for the upload.

appstream-example

AccessKeyId

string

The AccessKey ID of the STS temporary access credential.

STS.NUexample****

AccessKeySecret

string

The AccessKey secret of the STS temporary access credential. This parameter is used together with AccessKeyId and StsToken.

secret-example****

StsToken

string

The STS temporary security token. This parameter is used together with AccessKeyId and AccessKeySecret for file upload.

CAISexample****

FilePath

string

The OSS directory prefix where files are allowed to be uploaded. The path of the uploaded object must be located in this directory.

tenant/100931896542****/task/

Expiration

string

Not supported.

123

Success

boolean

Indicates whether the API call is successful. Valid values:

  • true: Successful.

  • false: Failed.

true

Code

string

The response code of the API. A value of 200 indicates success. If the call fails, the corresponding error code is returned.

200

Message

string

The processing message returned by the API.

success

RequestId

string

The request ID, which is used to locate and troubleshoot the request.

8737D130-BFD0-5D51-96F6-C08EB1139A25

Examples

Success response

JSON format

{
  "Data": {
    "OssPoint": "oss-cn-shanghai.aliyuncs.com",
    "OssPointInternal": "oss-cn-shanghai-internal.aliyuncs.com",
    "BucketName": "appstream-example",
    "AccessKeyId": "STS.NUexample****",
    "AccessKeySecret": "secret-example****",
    "StsToken": "CAISexample****",
    "FilePath": "tenant/100931896542****/task/",
    "Expiration": "123"
  },
  "Success": true,
  "Code": "200",
  "Message": "success",
  "RequestId": "8737D130-BFD0-5D51-96F6-C08EB1139A25"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.