

• Amazon Systems Manager CloudWatch 控制面板在 2026 年 4 月 30 日之后将不再可用。客户可以像现在一样继续使用 Amazon CloudWatch 控制台来查看、创建和管理其 Amazon CloudWatch 控制面板。有关更多信息，请参阅 [Amazon CloudWatch 控制面板文档](https://docs.amazonaws.cn/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html)。

# 将 `RemoveTagsFromResource` 与 CLI 配合使用
<a name="example_ssm_RemoveTagsFromResource_section"></a>

以下代码示例演示如何使用 `RemoveTagsFromResource`。

------
#### [ CLI ]

**Amazon CLI**  
**从补丁基准删除标签**  
以下 `remove-tags-from-resource` 示例将从补丁基准中删除标签。  

```
aws ssm remove-tags-from-resource \
    --resource-type {{"PatchBaseline"}} \
    --resource-id {{"pb-0123456789abcdef0"}} \
    --tag-keys {{"Region"}}
```
此命令不生成任何输出。  
有关更多信息，请参阅《Amazon 一般参考》**中的[标记 Amazon 资源](https://docs.amazonaws.cn/general/latest/gr/aws_tagging.html)。  
+  有关 API 详细信息，请参阅《Amazon CLI Command Reference》**中的 [RemoveTagsFromResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ssm/remove-tags-from-resource.html)。

------
#### [ PowerShell ]

**适用于 PowerShell V4 的工具**  
**示例 1：此示例从维护时段中删除标签。如果此命令成功，则无任何输出。**  

```
Remove-SSMResourceTag -ResourceId "mw-03eb9db42890fb82d" -ResourceType "MaintenanceWindow" -TagKey "Production"
```
+  有关 API 详细信息，请参阅《Amazon Tools for PowerShell Cmdlet Reference（V4）》中的 [RemoveTagsFromResource](https://docs.amazonaws.cn/powershell/v4/reference)**。

**适用于 PowerShell V5 的工具**  
**示例 1：此示例从维护时段中删除标签。如果此命令成功，则无任何输出。**  

```
Remove-SSMResourceTag -ResourceId "mw-03eb9db42890fb82d" -ResourceType "MaintenanceWindow" -TagKey "Production"
```
+  有关 API 详细信息，请参阅《*Amazon Tools for PowerShell Cmdlet 参考 (V5)*》中的 [RemoveTagsFromResource](https://docs.amazonaws.cn/powershell/v5/reference)。

------

有关 Amazon SDK 开发人员指南和代码示例的完整列表，请参阅 [将此服务与 Amazon SDK 结合使用](sdk-general-information-section.md)。本主题还包括有关入门的信息以及有关先前的 SDK 版本的详细信息。