I need to stop a WorkSpace now and I don’t want to login to AWS WorkSpace console.
The following is the steps I’m literally taking to achieve this goal.
Find out the WorkSpace ID, assuming that my AWS CLI has been setup correctly. ❯ aws workspaces describe-workspaces { "Workspaces": [ { "WorkspaceId": "ws-9xm222222", "DirectoryId": "d-9767555555", "UserName": "kenno", "IpAddress": "172.xx.x.xx", "State": "AVAILABLE", "BundleId": "wsb-clj855555", "SubnetId": "subnet-0a4ae4b324a799999", "ComputerName": "A-2B99WV33TITAN", "WorkspaceProperties": { "RunningMode": "AUTO_STOP", "RunningModeAutoStopTimeoutInMinutes": 60, "RootVolumeSizeGib": 80, "UserVolumeSizeGib": 50, "ComputeTypeName": "STANDARD", "Protocols": [ "PCOIP" ] }, "ModificationStates": [] } ] } We can see that the WorkSpace ‘ws-9xm222222’ is in AVAILABLE state. To stop this workspace now, run the following command: ❯ aws workspaces stop-workspaces --stop-workspace-requests WorkSpaceId=ws-9xm222222 Parameter validation failed: Unknown parameter in StopWorkspaceRequests[0]: "WorkSpaceId", must be one of: WorkspaceId ❯ aws workspaces stop-workspaces --stop-workspace-requests WorkspaceId=ws-9xm222222 { "FailedRequests": [] } Notice that the CLI option is case sensitive, and I “deliberately” made a mistake with WorkSpaceId to demonstrate this. Hahaha.
...