There are more AWS SDK examples available in the AWS Doc SDK Examples
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-tagsexample describes the tags for the specified WorkSpace.aws workspaces describe-tags \ --resource-idws-dk1xzr417Output:
{ "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-2Output:
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-2Output:
Key Value --- ----- auto-delete no purpose Workbench-
For API details, see DescribeTags in AWS Tools for PowerShell Cmdlet Reference (V5).
-