GetUploadInfo
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
Test
RAM authorization
|
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 |
| 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.