deleteBucket method

  1. @override
Future<void> deleteBucket(
  1. DeleteBucketRequest request
)
override

Deletes a log bucket.

Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

@override
Future<void> deleteBucket(DeleteBucketRequest request) async {
  if (isClosed) throw StateError('Service is closed');

  if (_deleteBucket case final deleteBucket?) {
    return deleteBucket(request);
  }
  throw UnsupportedError('deleteBucket');
}