google-cloud-rust icon indicating copy to clipboard operation
google-cloud-rust copied to clipboard

Support User Project option for StorageControl API

Open suzmue opened this issue 4 months ago • 2 comments

Attempting to run the samples for disabling and getting status on a requester pays enabled object (#3291) reveal that we should have a way to provide an option (like the C++ library does) to set the x-goog-user-project header for storage control requests.

Related to #3189 and they should likely use the same design.

suzmue avatar Sep 09 '25 23:09 suzmue

Should we add user project to RequestOptions, RequestOptionsBuilder ?

https://github.com/googleapis/google-cloud-rust/blob/e40933ae224e4f7db2c0aadd6bb1f70216958e18/src/gax/src/options.rs#L43

and handle it in the gaxi clients

https://github.com/googleapis/google-cloud-rust/blob/e40933ae224e4f7db2c0aadd6bb1f70216958e18/src/gax-internal/src/grpc.rs#L215

https://github.com/googleapis/google-cloud-rust/blob/e40933ae224e4f7db2c0aadd6bb1f70216958e18/src/gax-internal/src/http.rs#L96

dbolduc avatar Sep 11 '25 19:09 dbolduc

Should we add user project to RequestOptions, RequestOptionsBuilder ?

I agree that seems like the right place for it.

suzmue avatar Sep 11 '25 20:09 suzmue