

# 将 `DeleteBucketEncryption` 与 CLI 配合使用
<a name="s3_example_s3_DeleteBucketEncryption_section"></a>

以下代码示例演示如何使用 `DeleteBucketEncryption`。

------
#### [ CLI ]

**Amazon CLI**  
**删除存储桶的服务器端加密配置**  
以下 `delete-bucket-encryption` 示例删除指定存储桶的服务器端加密配置。  

```
aws s3api delete-bucket-encryption \
    --bucket {{amzn-s3-demo-bucket}}
```
此命令不生成任何输出。  
+  有关 API 详细信息，请参阅《Amazon CLI 命令参考》**中的 [DeleteBucketEncryption](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/delete-bucket-encryption.html)。

------
#### [ PowerShell ]

**适用于 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 详细信息，请参阅《Amazon Tools for PowerShell Cmdlet Reference (V4)》**中的 [DeleteBucketEncryption](https://docs.amazonaws.cn/powershell/v4/reference)。

**适用于 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 详细信息，请参阅《Amazon Tools for PowerShell Cmdlet Reference (V5)》**中的 [DeleteBucketEncryption](https://docs.amazonaws.cn/powershell/v5/reference)。

------

有关 Amazon SDK 开发人员指南和代码示例的完整列表，请参阅 [使用 Amazon SDK 通过 Amazon S3 进行开发](sdk-general-information-section.md)。本主题还包括有关入门的信息以及有关先前的 SDK 版本的详细信息。