KEMBAR78
Disable logging from bucket is not working · Issue #389 · googleapis/java-storage · GitHub
Skip to content

Disable logging from bucket is not working #389

@athakor

Description

@athakor

I was successfully able to add the logging to a bucket.

BucketInfo.Logging logging =
          BucketInfo.Logging.newBuilder()
              .setLogBucket(logsBucket)
              .setLogObjectPrefix("test-logs")
              .build();
      Bucket bucket =
          storage.create(
              BucketInfo.newBuilder(loggingBucket).setLocation("us").setLogging(logging).build());

But seems there is no way to disable the logging from bucket

Bucket updatedBucket = bucket.toBuilder().setLogging(null).build().update();

Looks like there is no support in SDK for PATCH update where as Rest API for Disabling logging.

https://cloud.google.com/storage/docs/access-logs#disabling

PATCH /example-bucket?logging HTTP/1.1
Host: storage.googleapis.com

{
 "logging": null
}

~cc: @frankyn

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/java-storage API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions