

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 定义应用标签的规则
<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 （[自动标记](https://github.com/GorillaStack/auto-tag)） |    [Cloud Custodian](https://cloudcustodian.io/)   GorillaStack （[复古标签）](https://github.com/GorillaStack/retro-tag)   [Graffiti Monkey](https://github.com/Answers4AWS/graffiti-monkey)（标签传播）   | 

[AWS Organizations** AWS 账户 **](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html)通过创建名为组织单位 (OUs) 的逻辑账户分组，集中管理多个账户的策略。这样，该组织就有多项策略附加到其中一些账户 OUs 或直接关联到账户。

例如，您可能有两个 OUs （B2B 产品和内部工具）关联账户（包括生产和开发环境）。使用 AWS Organizations，您可以附加 B2B 产品和内部工具的政策 OUs。