

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

# 檢視規則群組命名空間標籤
<a name="how-to-tag-rule-groups-namespace-list"></a>

標籤可協助您識別和組織 AWS 資源，並管理對資源的存取。如需標記策略的詳細資訊，請參閱[標記 AWS 資源](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html)。

## 檢視 Amazon Managed Service for Prometheus 規則群組命名空間 (主控台) 的標籤
<a name="how-to-tag-rule-groups-namespace-list-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. 選擇「**規則管理**」標籤。

1. 選擇命名空間名稱。

## 檢視 Amazon Managed Service for Prometheus 工作區的標籤 (AWS CLI)
<a name="how-to-tag-rule-groups-namespace-list-cli"></a>

請依照下列步驟使用 AWS CLI 檢視規則群組命名空間的 AWS 標籤。若未新增標籤，傳回的清單空白。

在終端機或命令列上執行 **list-tags-for-resource** 命令。例如，檢視規則群組命名空間的標籤索引鍵和標籤值清單：

```
aws amp list-tags-for-resource --resource-arn rn:aws:aps:us-west-2:123456789012:rulegroupsnamespace/IDstring/namespace_name
```

若成功，此命令會傳回類似如下的資訊：

```
{
    "tags": {
        "Status": "Secret",
        "Team": "My-Team"
    }
}
```