createBucket method

  1. @override
Future<LogBucket> createBucket(
  1. CreateBucketRequest request
)
override

Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.

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<LogBucket> createBucket(CreateBucketRequest request) async {
  if (isClosed) throw StateError('Service is closed');

  if (_createBucket case final createBucket?) {
    return createBucket(request);
  }
  throw UnsupportedError('createBucket');
}