

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

# 使用 S3 存取點標記檔案
<a name="add-tag-set-ap"></a>

下列`put-object-tagging`範例命令顯示如何使用 透過存取點 AWS CLI 新增標籤集。每個標籤都是金鑰值對。如需詳細資訊，請參閱《*Amazon Simple Storage Service 使用者指南*》中的[使用標籤將儲存體分類](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html)。

此範例`my-image.jpg`使用存取點 將標籤集新增至現有檔案*`my-ontap-ap`*。

```
$ aws s3api put-object-tagging --bucket my-ontap-ap-hrzrlukc5m36ft7okagglf3gmwluquse1b-ext-s3alias --key my-image.jpg --tagging TagSet=[{Key="finance",Value="true"}] 
```

您也可以使用 REST API，透過存取點將標籤集新增至物件。如需詳細資訊，請參閱《Amazon Simple Storage Service API 參考》**中的 [https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html)。