文件 AWS 開發套件範例 GitHub 儲存庫中有更多可用的 AWS SDK 範例
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
搭配使用 DeleteBucketInventoryConfiguration 與 CLI
下列程式碼範例示範如何使用 DeleteBucketInventoryConfiguration。
- CLI
-
- AWS CLI
-
刪除儲存貯體的庫存組態
下列
delete-bucket-inventory-configuration範例會刪除具有指定儲存貯1體 ID 的庫存組態。aws s3api delete-bucket-inventory-configuration \ --bucketamzn-s3-demo-bucket\ --id1此命令不會產生輸出。
-
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DeleteBucketInventoryConfiguration
。
-
- PowerShell
-
- 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-
如需 API 詳細資訊,請參閱 AWS Tools for PowerShell Cmdlet 參考 (V4) 中的 DeleteBucketInventoryConfiguration。
-
- 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-
如需 API 詳細資訊,請參閱 AWS Tools for PowerShell Cmdlet 參考 (V5) 中的 DeleteBucketInventoryConfiguration。
-
DeleteBucketEncryption
DeleteBucketLifecycle