There are more AWS SDK examples available in the AWS Doc SDK Examples
Use DeleteTags with a CLI
The following code examples show how to use DeleteTags.
- CLI
-
- AWS CLI
-
To delete a tag from a WorkSpace
The following
delete-tagsexample deletes the specified tag from the specified WorkSpace.aws workspaces delete-tags \ --resource-idws-dk1xzr417\ --tag-keysDepartmentThis command produces no output.
For more information, see Tag WorkSpaces resources in the Amazon WorkSpaces Administration Guide.
-
For API details, see DeleteTags
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell V4
-
Example 1: This sample removes the tag associated with the Workspace
Remove-WKSTag -ResourceId ws-w10b3abcd -TagKey "Type"Output:
Confirm Are you sure you want to perform this action? Performing the operation "Remove-WKSTag (DeleteTags)" on target "ws-w10b3abcd". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y-
For API details, see DeleteTags in AWS Tools for PowerShell Cmdlet Reference (V4).
-
- Tools for PowerShell V5
-
Example 1: This sample removes the tag associated with the Workspace
Remove-WKSTag -ResourceId ws-w10b3abcd -TagKey "Type"Output:
Confirm Are you sure you want to perform this action? Performing the operation "Remove-WKSTag (DeleteTags)" on target "ws-w10b3abcd". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y-
For API details, see DeleteTags in AWS Tools for PowerShell Cmdlet Reference (V5).
-