Obtains a temporary account and password that are used to log on to an instance.
A temporary account and password is valid for one hour. If you log on to an instance by using Security Token Service (STS), you can access the instance resources within the validity period of an STS token.
- If you log on to an instance by using the temporary password obtained through an Alibaba Cloud account, you have the same permissions on resources as the user of the Alibaba Cloud account.
- If you log on to an instance by using the temporary password obtained through a RAM user, you have the same permissions as the RAM user.
- If you log on to an instance by using the temporary password obtained through STS, you have the same permissions as the STS token.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
InstanceId | String | Yes | cri-kmsiwlxxdcvaduwb |
The ID of the instance. |
RegionId | String | Yes | cn-shanghai |
The ID of the region. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
IsSuccess | Boolean | true |
Indicates whether the operation is successful. |
Code | String | success |
The return value. |
RequestId | String | E069EB86-E6AD-4A98-ADDE-0E993390239A |
The ID of the request. |
TempUsername | String | temp_user_cr |
The username that was used to log on to the registry. |
AuthorizationToken | String | shaunadadakks:uuczxnjcyeyhdjadkkajsjdjadhyucb |
The password that was used to log on to the registry. |
ExpireTime | Long | 1571242083000 |
The timestamp when the temporary token expired. Unit: milliseconds. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=GetAuthorizationToken
&InstanceId=cri-kmsiwlxxdcvaduwb
&RegionId=cn-shanghai
&<Common request parameters>
Sample success responses
XML
format
<AuthorizationToken>shaunadadakks:uuczxnjcyeyhdjadkkajsjdjadhyucb</AuthorizationToken>
<Code>success</Code>
<ExpireTime/>
<IsSuccess>true</IsSuccess>
<RequestId>E069EB86-E6AD-4A98-ADDE-0E993390239A</RequestId>
<TempUsername>temp_user_cr</TempUsername>
JSON
format
{
"AuthorizationToken": "shaunadadakks:uuczxnjcyeyhdjadkkajsjdjadhyucb",
"Code": "success",
"ExpireTime": "1571242083000",
"IsSuccess": "true",
"RequestId": "E069EB86-E6AD-4A98-ADDE-0E993390239A",
"TempUsername": "temp_user_cr"
}
Error codes
For a list of error codes, visit the API Error Center.