There are more AWS SDK examples available in the AWS Doc SDK Examples
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-propertiesexample sets the running mode of the specified WorkSpace toAUTO_STOP.aws workspaces modify-workspace-properties \ --workspace-idws-dk1xzr417\ --workspace-propertiesRunningMode=AUTO_STOPThis command produces no output.
For more information, see Modify a WorkSpace in the Amazon WorkSpaces Administration Guide.
-
For API details, see ModifyWorkspaceProperties
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell V4
-
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-
For API details, see ModifyWorkspaceProperties in AWS Tools for PowerShell Cmdlet Reference (V4).
-
- Tools for PowerShell V5
-
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-
For API details, see ModifyWorkspaceProperties in AWS Tools for PowerShell Cmdlet Reference (V5).
-