Session Manager oturum geçmişini sorgular.
Operation description
Son 30 gün içinde oluşturulan Session Manager oturum kayıtlarını sorgulayabilirsiniz. En fazla 1.000 başarılı kayıt saklanır.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeTerminalSessions |
list |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
Bölge kimliği. |
cn-hangzhou |
| InstanceId |
string |
No |
Örnek kimliği. |
i-bp1i7gg30r52z2em**** |
| SessionId |
string |
No |
Oturum kimliği. |
s-hz023od0x9**** |
| MaxResults |
integer |
No |
Sayfalanmış bir sorgu için sayfa başına maksimum giriş sayısı. Maksimum değer: 100. Varsayılan değer: 10. |
10 |
| NextToken |
string |
No |
Sayfalama belirteci. Bu parametreyi, önceki API çağrısında döndürülen NextToken değerine ayarlayın. |
AAAAAdDWBF2**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
Bu çağrıda döndürülen sayfalama belirteci. |
AAAAAdDWBF2**** |
| RequestId |
string |
İstek kimliği. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| Sessions |
object |
||
| Session |
array<object> |
Oturum listesi. |
|
|
array<object> |
Oturum bilgileri. |
||
| ClientIP |
string |
Uzak bağlantının istemci IP adresi. |
192.168.1.1 |
| Connections |
object |
||
| Connection |
array<object> |
Bağlantı bilgileri listesi. |
|
|
object |
Bağlantı bilgileri. |
||
| ClosedReason |
string |
Bağlantının kapatılma nedeni. Bu parametre yalnızca durum Disconnected, Terminated veya Failed olduğunda döndürülür. Geçerli değerler:
|
AgentNeedUpgrade |
| EndTime |
string |
Bağlantının sona erdiği zaman. Zaman, UTC cinsinden ISO 8601 biçiminde görüntülenir. |
2024-01-19T09:16:46Z |
| FailedDetail |
string |
Bağlantı hatasının ayrıntıları. Bu parametre yalnızca durum Failed olduğunda döndürülür. |
The Session Manager is closed normally. |
| InstanceId |
string |
Örnek kimliği. |
i-bp1i7gg30r52z2em**** |
| StartTime |
string |
Bağlantının başladığı zaman. Zaman, UTC cinsinden ISO 8601 biçiminde görüntülenir. |
2024-01-19T09:16:40Z |
| Status |
string |
Oturum durumu. Geçerli değerler:
|
Connecting |
| CreationTime |
string |
Oturumun oluşturulduğu zaman. Zaman, UTC cinsinden ISO 8601 biçiminde görüntülenir. |
2024-01-19T09:15:46Z |
| IdentityType |
string |
Kimlik türü. Geçerli değerler:
|
RAMUser |
| PortNumber |
integer |
Veri yönlendirme için kullanılan ECS örneğinin port numarası. Veri yönlendirme için herhangi bir port numarası yapılandırılmamışsa, bu değer boştur. |
22 |
| PrincipalId |
string |
Kimlik tanımlayıcısı. Değer, IdentityType'a göre değişir:
|
123456xxxx |
| SessionId |
string |
Oturum kimliği. |
s-hz023od0x9**** |
| TargetServer |
string |
Örnek üzerinden erişilen VPC'deki hedef sunucunun adresi. |
192.168.0.246 |
| Username |
string |
Bağlantı için kullanılan kullanıcı adı. |
root |
Examples
Success response
JSON format
{
"NextToken": "AAAAAdDWBF2****",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"Sessions": {
"Session": [
{
"ClientIP": "192.168.1.1",
"Connections": {
"Connection": [
{
"ClosedReason": "AgentNeedUpgrade",
"EndTime": "2024-01-19T09:16:46Z",
"FailedDetail": "The Session Manager is closed normally.",
"InstanceId": "i-bp1i7gg30r52z2em****",
"StartTime": "2024-01-19T09:16:40Z",
"Status": "Connecting"
}
]
},
"CreationTime": "2024-01-19T09:15:46Z",
"IdentityType": "RAMUser",
"PortNumber": 22,
"PrincipalId": "123456xxxx",
"SessionId": "s-hz023od0x9****",
"TargetServer": "192.168.0.246",
"Username": "root"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.NextToken | The specified parameter NextToken is not valid. | |
| 400 | InvalidParameter.MaxResults | The specified parameter MaxResults is not valid. | |
| 500 | InternalError | An error occurred when you dispatched the request. | |
| 403 | InvalidParameterCharacter | The specified parameter %s contains illegal characters. | |
| 403 | Operation.Forbidden | The operation is not permitted. | |
| 404 | InvalidRegionId.NotFound | The specified parameter RegionId does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.