

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 編輯工作區的標籤
<a name="how-to-tag-workspace-update"></a>

您可以變更與工作區相關的標籤值。您也可以變更金鑰的名稱，這相當於移除目前的標籤，並新增具有新名稱和與其他金鑰相同值的不同標籤。

**重要**  
編輯 Amazon Managed Service for Prometheus 工作區標籤時，可影響該工作區存取權。編輯工作區標籤名稱 (金鑰) 或值之前，務必檢閱任何可能會使用標籤金鑰或值來控制資源存取權的 IAM 政策，例如儲存庫。

## 編輯 Amazon Managed Service for Prometheus 的標籤 (主控台)
<a name="how-to-tag-workspace-update-console"></a>

您可以使用主控台來編輯與 Amazon Managed Service for Prometheus 工作區相關聯的標籤。

1. 開啟 Amazon Managed Service for Prometheus 主控台，位於 [https://console.aws.amazon.com/prometheus/](https://console.aws.amazon.com/prometheus/home)。

1. 在導覽窗格中，選擇功能表圖示。

1. 選擇**所有工作區**。

1. 選擇您要管理工作區的工作區 ID。

1. 選擇 **Tags** (標籤) 索引標籤。

1. 若未將標籤新增至工作區，請選擇**建立標籤**。否則，請選擇**管理標籤**。

1. 在 **Key (金鑰)** 中，輸入標籤的名稱。您可以在 **Value (值)** 中為標籤新增選用值。

1. (選用) 若要新增另一個標籤，再選擇 **Add tag (新增標籤)** 一次。

1. 當您完成新增標籤時，請選擇**儲存變更**。

## 編輯 Amazon Managed Service for Prometheus 工作區的標籤 (AWS CLI)
<a name="how-to-tag-workspace-update-cli"></a>

請依照下列步驟使用 AWS CLI 來更新工作區的標籤。您可以變更現有索引鍵的值或新增其他索引鍵。

在終端機或命令列執行 **tag-resource** 命令，指定您要更新標籤之 Amazon Managed Service for Prometheus 工作區的 Amazon Resource Name (ARN)，並指定標籤索引鍵和標籤值：

```
aws amp tag-resource --resource-arn arn:aws:aps:us-west-2:123456789012:workspace/IDstring --tags Team=New-Team
```