View a markdown version of this page

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

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

搭配使用 DeleteBucketEncryption 與 CLI

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

CLI
AWS CLI

刪除儲存貯體的伺服器端加密組態

下列 delete-bucket-encryption 範例會刪除指定儲存貯體的伺服器端加密組態。

aws s3api delete-bucket-encryption \ --bucket amzn-s3-demo-bucket

此命令不會產生輸出。

PowerShell
Tools for PowerShell V4

範例 1:這會停用針對提供的 S3 儲存貯體啟用的加密。

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

輸出:

Confirm Are you sure you want to perform this action? Performing the operation "Remove-S3BucketEncryption (DeleteBucketEncryption)" on target "s3casetestbucket". [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)》中的 DeleteBucketEncryption

Tools for PowerShell V5

範例 1:這會停用針對提供的 S3 儲存貯體啟用的加密。

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

輸出:

Confirm Are you sure you want to perform this action? Performing the operation "Remove-S3BucketEncryption (DeleteBucketEncryption)" on target "s3casetestbucket". [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)》中的 DeleteBucketEncryption

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