Use DeleteBucketWebsite
with an AWS SDK or CLI
The following code examples show how to use DeleteBucketWebsite
.
- SDK for C++
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. bool AwsDoc::S3::deleteBucketWebsite(const Aws::String &bucketName, const Aws::S3::S3ClientConfiguration &clientConfig) { Aws::S3::S3Client client(clientConfig); Aws::S3::Model::DeleteBucketWebsiteRequest request; request.SetBucket(bucketName); Aws::S3::Model::DeleteBucketWebsiteOutcome outcome = client.DeleteBucketWebsite(request); if (!outcome.IsSuccess()) { auto err = outcome.GetError(); std::cerr << "Error: deleteBucketWebsite: " << err.GetExceptionName() << ": " << err.GetMessage() << std::endl; } else { std::cout << "Website configuration was removed." << std::endl; } return outcome.IsSuccess(); }
-
For API details, see DeleteBucketWebsite in AWS SDK for C++ API Reference.
-
For a complete list of AWS SDK developer guides and code examples, see Developing with Amazon S3 using the AWS SDKs. This topic also includes information about getting started and details about previous SDK versions.