Dart
Dart
S3 Delete Bucket
See more Amazon S3 Examples
Demonstrates how to delete a bucket.Chilkat Dart Downloads
import 'package:chilkat/chilkat.dart';
void main() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
final http = CkHttp();
// Insert your access key here:
http.awsAccessKey = 'ABQXXABC83ABCDEFVQXX';
// Insert your secret key here:
http.awsSecretKey = 'XXXXYYYYabcdABCD12345678xxxxyyyyzzzz';
http.keepResponseBody = true;
try {
http.s3DeleteBucket('chilkattestbucket');
print('Bucket deleted.');
} on ChilkatException catch (e) {
print(e.lastErrorText);
// Also examine the error response body from AWS:
print(http.lastResponseBody);
}
}