View a markdown version of this page

Use DescribeWorkspaceBundles with a CLI - AWS SDK Code Examples

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

Use DescribeWorkspaceBundles with a CLI

The following code examples show how to use DescribeWorkspaceBundles.

Action examples are code excerpts from larger programs and must be run in context. You can see this action in context in the following code example:

CLI
AWS CLI

To list the bundles provided by Amazon

The following describe-workspace-bundles example lists the names and IDs of the bundles provided by Amazon, in table format and sorted by name.

aws workspaces describe-workspace-bundles \ --owner AMAZON \ --query "Bundles[*].[Name, BundleId]"

Output:

[ [ "Standard with Amazon Linux 2", "wsb-clj85qzj1" ], [ "Performance with Windows 10 (Server 2016 based)", "wsb-gm4d5tx2v" ], [ "PowerPro with Windows 7", "wsb-1pzkp0bx4" ], [ "Power with Amazon Linux 2", "wsb-2bs6k5lgn" ], [ "Graphics with Windows 10 (Server 2019 based)", "wsb-03gyjnfyy" ], ... ]

For more information, see WorkSpaces bundles and images in the Amazon WorkSpaces Administration Guide.

PowerShell
Tools for PowerShell V4

Example 1: This sample fetches details of all the Workspace bundles in the current region

Get-WKSWorkspaceBundle

Output:

BundleId : wsb-sfhdgv342 ComputeType : Amazon.WorkSpaces.Model.ComputeType Description : This bundle is custom ImageId : wsi-235aeqges LastUpdatedTime : 12/26/2019 06:44:07 Name : CustomBundleTest Owner : 233816212345 RootStorage : Amazon.WorkSpaces.Model.RootStorage UserStorage : Amazon.WorkSpaces.Model.UserStorage
Tools for PowerShell V5

Example 1: This sample fetches details of all the Workspace bundles in the current region

Get-WKSWorkspaceBundle

Output:

BundleId : wsb-sfhdgv342 ComputeType : Amazon.WorkSpaces.Model.ComputeType Description : This bundle is custom ImageId : wsi-235aeqges LastUpdatedTime : 12/26/2019 06:44:07 Name : CustomBundleTest Owner : 233816212345 RootStorage : Amazon.WorkSpaces.Model.RootStorage UserStorage : Amazon.WorkSpaces.Model.UserStorage