Example usage for com.amazonaws.services.s3 AmazonS3 deleteBucketWebsiteConfiguration

List of usage examples for com.amazonaws.services.s3 AmazonS3 deleteBucketWebsiteConfiguration

Introduction

In this page you can find the example usage for com.amazonaws.services.s3 AmazonS3 deleteBucketWebsiteConfiguration.

Prototype

public void deleteBucketWebsiteConfiguration(
        DeleteBucketWebsiteConfigurationRequest deleteBucketWebsiteConfigurationRequest)
        throws SdkClientException, AmazonServiceException;

Source Link

Document

This operation removes the website configuration for a bucket.

Usage

From source file:aws.example.s3.DeleteWebsiteConfiguration.java

License:Open Source License

public static void deleteWebsiteConfig(String bucket_name) {
    final AmazonS3 s3 = AmazonS3ClientBuilder.defaultClient();
    try {//w  w w. ja  v  a2 s  .co m
        s3.deleteBucketWebsiteConfiguration(bucket_name);
    } catch (AmazonServiceException e) {
        System.err.println(e.getErrorMessage());
        System.out.println("Failed to delete website configuration!");
        System.exit(1);
    }
}

From source file:cloudExplorer.Acl.java

License:Open Source License

void removeBUCKETwebsite(String object, String access_key, String secret_key, String endpoint, String bucket) {
    try {//from w w w.jav a 2 s .  co m
        AWSCredentials credentials = new BasicAWSCredentials(access_key, secret_key);
        AmazonS3 s3Client = new AmazonS3Client(credentials,
                new ClientConfiguration().withSignerOverride("S3SignerType"));
        s3Client.setEndpoint(endpoint);
        s3Client.deleteBucketWebsiteConfiguration(bucket);
    } catch (Exception removeBUCKETwebsite) {
        mainFrame.jTextArea1.append("\nException occurred in ACL");
    }
}