

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

# 使用 API 在 Neptune 中添加标签
<a name="tagging-api"></a>

您可使用 Neptune API 为数据库实例添加、列出或删除标签。
+ 要向 Neptune 资源添加标签，请使用 [API_AddTagsToResource.html](API_AddTagsToResource.html) 操作。
+ 要列出分配给 Neptune 资源的标签，请使用 [API_ListTagsForResource.html](API_ListTagsForResource.html)。
+ 要从 Neptune 资源删除标签，请使用 [API_RemoveTagsFromResource.html](API_RemoveTagsFromResource.html) 操作。

要了解有关如何构建所需 ARN 的更多信息，请参阅[为 Neptune 构建 ARN](tagging-arns-constructing.md)。

在通过 Neptune API 使用 XML 时，标签会使用如下架构：

```
 1. <Tagging>
 2.     <TagSet>
 3.         <Tag>
 4.             <Key>Project</Key>
 5.             <Value>Trinity</Value>
 6.         </Tag>
 7.         <Tag>
 8.             <Key>User</Key>
 9.             <Value>Jones</Value>
10.         </Tag>
11.     </TagSet>
12. </Tagging>
```

下表提供了允许使用的 XML 标签及其特征的列表。`Key` 和 `Value` 的值都区分大小写。例如，`project=Trinity` 和 `PROJECT=Trinity` 是两个不同的标签。


****  
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/neptune/latest/userguide/tagging-api.html)