Use ModifyWorkspaceProperties with a CLI - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use ModifyWorkspaceProperties with a CLI

The following code examples show how to use ModifyWorkspaceProperties.

CLI
AWS CLI

To modify the running mode of a WorkSpace

The following modify-workspace-properties example sets the running mode of the specified WorkSpace to AUTO_STOP.

aws workspaces modify-workspace-properties \ --workspace-id ws-dk1xzr417 \ --workspace-properties RunningMode=AUTO_STOP

This command produces no output.

For more information, see Modify a WorkSpace in the Amazon WorkSpaces Administration Guide.

PowerShell
Tools for PowerShell

Example 1: This Sample changes the Workspace Running Mode Property to Auto Stop for the specified Workspace

Edit-WKSWorkspaceProperty -WorkspaceId ws-w361s100v -Region us-west-2 -WorkspaceProperties_RunningMode AUTO_STOP