

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

# 定義套用標籤的規則
<a name="define-rules"></a>

有效的標記策略使用標準化標籤，並以一致且程式設計的方式跨 AWS 資源套用它們。您可以使用主動和被動** **方法來管理 AWS 環境中的標籤。


|  |  |  | 
| --- |--- |--- |
|   | **主動式強制執行** | **被動式強制執行** | 
| **方法** | 根據利害關係人核准的標記政策和字典套用標籤。 | 具有不合規標籤的資源會停止或終止。 | 
| **AWS** |   AWS Organizations ([SCPs](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples.html))   [AWS 標籤政策](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) （適用於[支援的 服務](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_supported-resources-enforcement.html))   AWS CloudFormation ([標籤做為程式碼](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html))   AWS Service Catalog ([TagOptions](https://docs.aws.amazon.com/servicecatalog/latest/adminguide/tagoptions.html))   |   AWS Config ([必要標籤規則](https://docs.aws.amazon.com/config/latest/developerguide/required-tags.html))   | 
| **開放原始碼** | GorillaStack ([auto-tag](https://github.com/GorillaStack/auto-tag)) |    [Cloud Custodian](https://cloudcustodian.io/)   GorillaStack ([retro-tag](https://github.com/GorillaStack/retro-tag))   [Graffiti Monkey](https://github.com/Answers4AWS/graffiti-monkey)(標籤傳播)   | 

[AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html)** **透過建立稱為組織單位 (OUs) 的帳戶邏輯群組 AWS 帳戶 ，集中管理多個政策。如此一來，組織具有數個政策附接至其中部分 OU 或直接連接至帳戶。

例如，您可以具有兩個 OU (B2B 產品和內部工具) 與連結的帳戶 (包括生產和開發環境)。使用 AWS Organizations，您可以連接 B2B 產品和內部工具 OUs 的政策。