View a markdown version of this page

将 DeleteBucketTagging 与 CLI 配合使用 - Amazon Simple Storage Service
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

DeleteBucketTagging 与 CLI 配合使用

以下代码示例演示如何使用 DeleteBucketTagging

CLI
Amazon CLI

以下命令从名为 amzn-s3-demo-bucket 的存储桶中删除标记配置:

aws s3api delete-bucket-tagging --bucket amzn-s3-demo-bucket
  • 有关 API 详细信息,请参阅《Amazon CLI 命令参考》中的 DeleteBucketTagging

PowerShell
适用于 PowerShell V4 的工具

示例 1:此命令移除与给定 S3 存储桶关联的所有标签。

Remove-S3BucketTagging -BucketName 'amzn-s3-demo-bucket'

输出:

Confirm Are you sure you want to perform this action? Performing the operation "Remove-S3BucketTagging (DeleteBucketTagging)" on target "amzn-s3-demo-bucket". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
  • 有关 API 详细信息,请参阅《Amazon Tools for PowerShell Cmdlet Reference (V4)》中的 DeleteBucketTagging

适用于 PowerShell V5 的工具

示例 1:此命令移除与给定 S3 存储桶关联的所有标签。

Remove-S3BucketTagging -BucketName 'amzn-s3-demo-bucket'

输出:

Confirm Are you sure you want to perform this action? Performing the operation "Remove-S3BucketTagging (DeleteBucketTagging)" on target "amzn-s3-demo-bucket". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
  • 有关 API 详细信息,请参阅《Amazon Tools for PowerShell Cmdlet Reference (V5)》中的 DeleteBucketTagging

有关 Amazon SDK 开发人员指南和代码示例的完整列表,请参阅 使用 Amazon SDK 通过 Amazon S3 进行开发。本主题还包括有关入门的信息以及有关先前的 SDK 版本的详细信息。