View a markdown version of this page

搭配使用 DeleteBucketInventoryConfiguration 與 CLI - Amazon Simple Storage Service

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

搭配使用 DeleteBucketInventoryConfiguration 與 CLI

下列程式碼範例示範如何使用 DeleteBucketInventoryConfiguration

CLI
AWS CLI

刪除儲存貯體的庫存組態

下列 delete-bucket-inventory-configuration 範例會刪除具有指定儲存貯體 ID 1 的庫存組態。

aws s3api delete-bucket-inventory-configuration \ --bucket amzn-s3-demo-bucket \ --id 1

此命令不會產生輸出。

PowerShell
Tools for PowerShell V4

範例 1:此命令會移除與給定 S3 儲存貯體對應之名為 'testInventoryName' 的庫存。

Remove-S3BucketInventoryConfiguration -BucketName 'amzn-s3-demo-bucket' -InventoryId 'testInventoryName'

輸出:

Confirm Are you sure you want to perform this action? Performing the operation "Remove-S3BucketInventoryConfiguration (DeleteBucketInventoryConfiguration)" 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
Tools for PowerShell V5

範例 1:此命令會移除與給定 S3 儲存貯體對應之名為 'testInventoryName' 的庫存。

Remove-S3BucketInventoryConfiguration -BucketName 'amzn-s3-demo-bucket' -InventoryId 'testInventoryName'

輸出:

Confirm Are you sure you want to perform this action? Performing the operation "Remove-S3BucketInventoryConfiguration (DeleteBucketInventoryConfiguration)" 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

如需 AWS SDK 開發人員指南和程式碼範例的完整清單,請參閱 使用 AWS SDKs 使用 Amazon S3 進行開發。此主題也包含有關入門的資訊和舊版 SDK 的詳細資訊。