There are more AWS SDK examples available in the AWS Doc SDK Examples
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-propertiesexample enables theEnableInternetAccessproperty 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-idd-926722edaf\ --workspace-creation-propertiesEnableInternetAccess=trueThis command produces no output.
For more information, see Update directory details for your WorkSpaces in the Amazon WorkSpaces Administration Guide.
-
For API details, see ModifyWorkspaceCreationProperties
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell V4
-
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-
For API details, see ModifyWorkspaceCreationProperties in AWS Tools for PowerShell Cmdlet Reference (V4).
-
- Tools for PowerShell V5
-
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-
For API details, see ModifyWorkspaceCreationProperties in AWS Tools for PowerShell Cmdlet Reference (V5).
-