//snippet-sourcedescription:[DeleteWebsiteConfiguration.java demonstrates how to delete the website configuration for an S3 bucket.]
//snippet-keyword:[SDK for Java 2.0]
//snippet-keyword:[Code Sample]
//snippet-service:[s3]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[2020-02-06]
//snippet-sourceauthor:[scmacdon-aws]

/*
   Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   This file is licensed under the Apache License, Version 2.0 (the "License").
   You may not use this file except in compliance with the License. A copy of
   the License is located at
    http://aws.amazon.com/apache2.0/
   This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
   CONDITIONS OF ANY KIND, either express or implied. See the License for the
   specific language governing permissions and limitations under the License.
*/

package com.example.s3;
// snippet-start:[s3.java2.delete_website_configuration.complete]

// snippet-start:[s3.java2.delete_website_configuration.import]
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.s3.S3Client;
import software.amazon.awssdk.services.s3.model.DeleteBucketWebsiteRequest;
import software.amazon.awssdk.services.s3.model.S3Exception;
// snippet-end:[s3.java2.delete_website_configuration.import]

/**
 * Delete the website configuration for an S3 bucket.
 *
 * This code expects that you have AWS credentials set up, as described here:
 * http://docs.aws.amazon.com/java-sdk/latest/developer-guide/deleteup-credentials.html
 */
// snippet-start:[s3.java2.delete_website_configuration.main]
public class DeleteWebsiteConfiguration {

    public static void main(String[] args) {
        final String USAGE = "\n" +
                "DeleteWebsiteConfiguration - delete the website configuration for an S3 bucket\n\n" +
                "Usage: DeleteWebsiteConfiguration <bucket>\n\n" +
                "Where:\n" +
                "   bucket   - the bucket to delete the website configuration from\n";

        if (args.length < 1) {
            System.out.println(USAGE);
            System.exit(1);
        }

        final String bucketName = args[0];

        System.out.format("Deleting website configuration for bucket: %s\n",
                bucketName);

        // Create a S3Client object
        Region region = Region.US_WEST_2;
        S3Client s3 = S3Client.builder().region(region).build();

        //Create a DeleteBucketWebsiteRequest object
        DeleteBucketWebsiteRequest delReq = DeleteBucketWebsiteRequest.builder()
                .bucket(bucketName)
                .build();
        try {
            s3.deleteBucketWebsite(delReq);

        } catch (S3Exception e) {
            System.err.println(e.awsErrorDetails().errorMessage());
            System.out.println("Failed to delete website configuration!");
            System.exit(1);
        }
        System.out.println("Done!");
    }
}
// snippet-end:[s3.java2.delete_website_configuration.main]
// snippet-end:[s3.java2.delete_website_configuration.complete]

@@ -106,32 +106,39 @@
 guration for an 
+Amazon 
 S3 bucket.%5D%0D%0A//s
@@ -134,16 +134,16 @@
 cket.%5D%0D%0A
-
 //snippe
@@ -224,17 +224,24 @@
 ervice:%5B
-s
+Amazon S
 3%5D%0D%0A//sn
@@ -300,17 +300,15 @@
 e:%5B2
-020-02-06
+/6/2020
 %5D%0D%0A/
@@ -368,18 +368,8 @@
 ght 
-2010-2020 
 Amaz
@@ -914,75 +914,8 @@
 s3;%0D
-%0A// snippet-start:%5Bs3.java2.delete_website_configuration.complete%5D%0D
 %0A%0D%0A/
@@ -1523,71 +1523,10 @@
 */%0D%0A
-// snippet-start:%5Bs3.java2.delete_website_configuration.main%5D
 %0D%0A
+
 publ
@@ -2356,16 +2356,176 @@
 uild();%0D
+%0A    %7D%0D%0A%0D%0A    // snippet-start:%5Bs3.java2.delete_website_configuration.main%5D%0D%0A    public static void deleteBucketWebsiteConfig(S3Client s3,String bucketName ) %7B%0D
 %0A%0D%0A     
@@ -3049,16 +3049,16 @@
   %7D%0D%0A%7D%0D%0A
+
 // snipp
@@ -3114,69 +3114,4 @@
 n%5D%0D%0A
-// snippet-end:%5Bs3.java2.delete_website_configuration.complete%5D%0D%0A

Update DeleteWebsiteConfiguration.java