Filtered List in AWS console

0

New to the Workspace admin console, how can I see a filtered list of just unhealthy workspaces ?

已提問 2 年前檢視次數 395 次
2 個答案
0

It is not possible to filter by state using the AWS Console however this can be achieved with the AWS CLI and the jq library

aws workspaces describe-workspaces | jq '.Workspaces[] | select(.State == "UNHEALTHY")'
profile pictureAWS
已回答 2 年前
0

You can sort the console output by Status, but you cannot filter by it. As suggested, the best way to get this information is via the CLI or API. In PowerShell it would be

Get-WKSWorkspace | Where-Oject {$_.State -like "Unhealthy"}

and in python it would be something like

import boto3
client = boto3.client('workspaces')
wks = client.describe_workspaces()
for wk in wks['Workspaces']:
   if wk['State'] == 'UNHEALTHY':
      print(wk)
專家
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南