Use ModifyWorkspaceCreationProperties with a CLI - AWS SDK Code Examples

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

Use ModifyWorkspaceCreationProperties with a CLI

The following code examples show how to use ModifyWorkspaceCreationProperties.

CLI
AWS CLI

To modify a WorkSpace creation property of a directory

The following modify-workspace-creation-properties example enables the EnableInternetAccess property for the specified directory. This enables automatic assignment of public IP addresses for the WorkSpaces created for the directory.

aws workspaces modify-workspace-creation-properties \ --resource-id d-926722edaf \ --workspace-creation-properties EnableInternetAccess=true

This command produces no output.

For more information, see Update directory details for your WorkSpaces in the Amazon WorkSpaces Administration Guide.

PowerShell
Tools for PowerShell

Example 1: This sample enables Internet Access and Maintenance Mode to true as default values while creating a Workspace

Edit-WKSWorkspaceCreationProperty -Region us-west-2 -ResourceId d-123454a369 -WorkspaceCreationProperties_EnableInternetAccess $true -WorkspaceCreationProperties_EnableMaintenanceMode $true