Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable logging from bucket is not working #389

Closed
athakor opened this issue Jun 22, 2020 · 0 comments · Fixed by #390
Closed

Disable logging from bucket is not working #389

athakor opened this issue Jun 22, 2020 · 0 comments · Fixed by #390
Assignees
Labels
api: storage Issues related to the googleapis/java-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@athakor
Copy link
Contributor

athakor commented Jun 22, 2020

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

@athakor athakor added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: storage Issues related to the googleapis/java-storage API. labels Jun 22, 2020
@athakor athakor self-assigned this Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/java-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant