文件 AWS 開發套件範例 GitHub 儲存庫中有更多可用的 AWS SDK 範例
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
搭配使用 DeleteBucketTagging 與 CLI
下列程式碼範例示範如何使用 DeleteBucketTagging。
- CLI
-
- AWS CLI
-
下列命令會從名為
amzn-s3-demo-bucket的儲存貯體中刪除標記組態:aws s3api delete-bucket-tagging --bucketamzn-s3-demo-bucket-
如需 API 詳細資訊,請參閱《AWS CLI 命令參考》中的 DeleteBucketTagging
。
-
- PowerShell
-
- Tools for 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 詳細資訊,請參閱《AWS Tools for PowerShell Cmdlet 參考 (V4)》中的 DeleteBucketTagging。
-
- Tools for 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 詳細資訊,請參閱《AWS Tools for PowerShell Cmdlet 參考 (V5)》中的 DeleteBucketTagging。
-
DeleteBucketReplication
DeleteBucketWebsite