Use DescribeTags with a CLI - AWS SDK Code Examples

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

Use DescribeTags with a CLI

The following code examples show how to use DescribeTags.

CLI
AWS CLI

To describe the tags for a WorkSpace

The following describe-tags example describes the tags for the specified WorkSpace.

aws workspaces describe-tags \ --resource-id ws-dk1xzr417

Output:

{ "TagList": [ { "Key": "Department", "Value": "Finance" } ] }

For more information, see Tag WorkSpaces resources in the Amazon WorkSpaces Administration Guide.

  • For API details, see DescribeTags in AWS CLI Command Reference.

PowerShell
Tools for PowerShell V4

Example 1: This Sample fetches tag for the given Workspace

Get-WKSTag -WorkspaceId ws-w361s234r -Region us-west-2

Output:

Key Value --- ----- auto-delete no purpose Workbench
  • For API details, see DescribeTags in AWS Tools for PowerShell Cmdlet Reference (V4).

Tools for PowerShell V5

Example 1: This Sample fetches tag for the given Workspace

Get-WKSTag -WorkspaceId ws-w361s234r -Region us-west-2

Output:

Key Value --- ----- auto-delete no purpose Workbench
  • For API details, see DescribeTags in AWS Tools for PowerShell Cmdlet Reference (V5).