GetConnectionTicket
Retrieves the connection credentials for cloud applications.
Operation description
It is a time-consuming operation to issue connection credentials. Therefore, you may need to invoke this API operation multiple times to obtain the connection credentials.
-
When you invoke the API for the first time, an application instance is allocated to the specified convenience account, and the application is started. The start node ID (
TaskId) is returned. -
When you invoke the API subsequently, you must pass the
TaskIdparameter as a request parameter to check whether the node is completed. When the returned node status (TaskStatus) isFinished, the connection ticket (Ticket) is also returned.
If the startup process is fast enough, the connection ticket (
Ticket) may also be returned when you invoke the API for the first time.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProductType |
string |
Yes |
The product type. Valid values:
|
CloudApp |
| BizRegionId |
string |
No |
The region ID. Note
When this parameter is passed, an application instance is assigned only from the delivery groups in the specified region. |
cn-hangzhou |
| LoginToken |
string |
No |
The logon token. Obtained by calling the GetLoginToken or GetStsToken API operation. The GetLoginToken and GetStsToken API operations belong to the client logon authentication APIs of the 2021-02-20 version of WUYING Cloud App (product code: appstream-center). These two API operations are not provided in the 2021-09-03 version. OpenAPI Explorer links: https://api.aliyun.com/api/appstream-center/2021-02-20/GetLoginToken and https://api.aliyun.com/api/appstream-center/2021-02-20/GetStsToken. Note: This parameter is required. If it is not provided, the API returns InvalidParameter.loginToken(400). |
v2c4e2ef03d62****** |
| EndUserId |
string |
No |
The username of the convenience account. |
alice |
| SessionId |
string |
No |
The logon session ID. Obtained by calling the GetLoginToken or GetStsToken API operation. This parameter is used together with LoginToken. The GetLoginToken and GetStsToken API operations belong to the client logon authentication APIs of the 2021-02-20 version of WUYING Cloud App (product code: appstream-center). These two API operations are not provided in the 2021-09-03 version. OpenAPI Explorer links: https://api.aliyun.com/api/appstream-center/2021-02-20/GetLoginToken and https://api.aliyun.com/api/appstream-center/2021-02-20/GetStsToken. Note: This parameter is required. If it is not provided, the API returns InvalidParameter.sessionId(400). This parameter must be used together with LoginToken. |
09e2b2e6-3181****** |
| LoginRegionId |
string |
No |
The logon region ID. When a user logs on to a workspace, this parameter specifies the ID of the region to which the workspace belongs. |
cn-hangzhou |
| Uuid |
string |
No |
The unique identifier of the logon device. |
A8B35215993FBF283F28D61****** |
| ClientId |
string |
No |
The client ID. |
f2463208-ec89-4309-8e8c-8b1****** |
| ClientType |
string |
No |
The client type. |
html5 |
| ClientOS |
string |
No |
The client operating system. |
windows_"Windows 10 Enterprise LTSC 2019" 10.0 (Build 17763) |
| ClientVersion |
string |
No |
The client version. |
2.0.1-D-20211008.101607 |
| ClientIp |
string |
No |
The client IP address. |
22.21.*.* |
| TaskId |
string |
No |
The node ID. Note
Required when you invoke the API not for the first time. Use this parameter query to check the node status and connection credentials. |
6f41731b-7091-4****** |
| AppInstanceGroupId |
string |
No |
The delivery group ID. Note
|
aig-bw1o1gcwv****** |
| AppInstanceId |
string |
No |
The application instance ID. Note
|
ai-ij4a6kd4bn2****** |
| AppId |
string |
No |
The application ID. Note
Required for the first call, and optional for subsequent calls. |
ca-etn4zizga****** |
| AppVersion |
string |
No |
The application version number. |
1.0.1 |
| Param |
string |
No |
The application startup parameters. |
/q /n |
| TenantId |
string |
No |
The tenant ID, which is the Alibaba Cloud account UID. |
1126819517****** |
| ResourceId |
string |
No |
The resource ID. Note
Used when connecting to a cloud phone. Pass the persistent session ID that corresponds to the cloud phone instance. When connecting to a cloud browser, pass the cloud browser ID. When connecting to a cloud application, pass the application ID for the application authorization scenario, the delivery group ID for the delivery group authorization scenario, or the persistent session ID for the persistent session authorization scenario. |
p-0cdr5c9kl****** |
| ConnectionProperties |
string |
No |
The connection properties in JSON format. The following parameters are supported:
Note
Used when connecting to a cloud phone. Pass the fixed value |
{"authMode":"Session"} |
| EnvironmentConfig |
string |
No |
The environment configuration. |
{"screenWidth":2560,"screenHeight":1564} |
| AutoConnectInQueue |
boolean |
No |
Specifies whether to automatically connect when the turn is reached. Note
This parameter is not available. Valid values:
|
true |
| AccessType |
string |
No |
The access type. If this parameter is not passed, both types are displayed. Valid values: INTERNET (Internet) and VPC (Express Connect circuit). Valid values:
|
INTERNET |
| AppPolicyId |
string |
No |
The policy ID. |
pg-0clfzcy0adpcf**** |
| RequireUuidValidation |
boolean |
No |
Specifies whether UUID validation is required. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response information. |
||
| RequestId |
string |
The request ID. |
AD2D0761-1FE5-549D-B169****** |
| Ticket |
string |
The connection ticket. |
n7n9bqZlPrvgUOPY0tOfVYGBBcdoPoH3****** |
| TaskId |
string |
The task ID. |
f3d1b31c-605e-****** |
| TaskStatus |
string |
The task status. Valid values:
|
Running |
| RetryTimes |
integer |
The number of retries. |
3 |
| Code |
string |
The error code. |
InternalError.TicketGenInternalError |
| Message |
string |
The error message. |
reenter app instance failed |
| AppInstanceGroupId |
string |
The delivery group ID. |
aig-53fvrq1oa****** |
| AppInstancePersistentId |
string |
The persistent session ID. |
p-0cdr5c9kl****** |
| AppInstanceId |
string |
The application instance ID. |
ai-gc1gemx6vp****** |
| OsType |
string |
The operating system type. Valid values:
|
Windows |
| RegionId |
string |
The ID of the region to which the delivery group belongs. |
cn-hangzhou |
| LoginToken |
string |
The logon token. |
v2c4e2ef03d62****** |
| TenantId |
integer |
The tenant ID, which is the Alibaba Cloud account UID. |
1126819517****** |
| Policy |
object |
The session policy. |
|
| ResolutionAdaptive |
string |
Specifies whether to use adaptive resolution. Note
Valid values:
|
true |
| ResolutionWidth |
integer |
The resolution width, in pixels. |
1920 |
| ResolutionHeight |
integer |
The resolution height, in pixels. |
1080 |
| BindQueueInfo |
object |
The queue information. Note
This parameter is not available. |
|
| RequestKey |
string |
The queue request key. |
alice****** |
| TargetId |
string |
The queue ID. |
aig-53fvrq1oa****** |
| QueueStatus |
string |
The queue task status. Valid values:
|
Waiting |
| ReadyTimeout |
integer |
The timeout period for manual connection after the turn is reached. |
120 |
| Rank |
integer |
The ranking information. |
1 |
| WaitTime |
integer |
The time already waited in the queue. Unit: seconds. |
100 |
| RemainingTime |
integer |
The remaining wait time. Unit: seconds. |
100 |
| AvatarId |
string |
The user avatar ID. |
abc |
| NextPollIntervalMs |
integer |
The next polling interval, in milliseconds. If this parameter is empty, the value is 1000 ms. |
500 |
Examples
Success response
JSON format
{
"RequestId": "AD2D0761-1FE5-549D-B169******",
"Ticket": "n7n9bqZlPrvgUOPY0tOfVYGBBcdoPoH3******",
"TaskId": "f3d1b31c-605e-******",
"TaskStatus": "Running",
"RetryTimes": 3,
"Code": "InternalError.TicketGenInternalError",
"Message": "reenter app instance failed",
"AppInstanceGroupId": "aig-53fvrq1oa******",
"AppInstancePersistentId": "p-0cdr5c9kl******",
"AppInstanceId": "ai-gc1gemx6vp******",
"OsType": "Windows",
"RegionId": "cn-hangzhou",
"LoginToken": "v2c4e2ef03d62******\n",
"TenantId": 0,
"Policy": {
"ResolutionAdaptive": "true",
"ResolutionWidth": 1920,
"ResolutionHeight": 1080
},
"BindQueueInfo": {
"RequestKey": "alice******",
"TargetId": "aig-53fvrq1oa******\n",
"QueueStatus": "Waiting",
"ReadyTimeout": 120,
"Rank": 1,
"WaitTime": 100,
"RemainingTime": 100
},
"AvatarId": "abc",
"NextPollIntervalMs": 500
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.