Title: `storage.bucket.Bucket`: add direct support for additional resource fields · Issue #314 · googleapis/google-cloud-python · GitHub
Open Graph Title: `storage.bucket.Bucket`: add direct support for additional resource fields · Issue #314 · googleapis/google-cloud-python
X Title: `storage.bucket.Bucket`: add direct support for additional resource fields · Issue #314 · googleapis/google-cloud-python
Description: The Bucket API resource representation defines a number of fields as "writable", but which we don't already map: cors[] lifecycle{} location logging{} versioning{} The support for the website{} field is slightly odd (Bucket.configure_web...
Open Graph Description: The Bucket API resource representation defines a number of fields as "writable", but which we don't already map: cors[] lifecycle{} location logging{} versioning{} The support for the website{} fie...
X Description: The Bucket API resource representation defines a number of fields as "writable", but which we don't already map: cors[] lifecycle{} location logging{} versioning{} The support for the...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/314
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`storage.bucket.Bucket`: add direct support for additional resource fields","articleBody":"The [Bucket API resource representation](https://cloud.google.com/storage/docs/json_api/v1/buckets) defines a number of fields as \"writable\", but which we don't already map:\n- `cors[]`\n- `lifecycle{}`\n- `location`\n- `logging{}`\n- `versioning{}`\n\nThe support for the `website{}` field is slightly odd (`Bucket.configure_website` / `Bucket.disable_website`), and should likely be normalized with support for the other fields.\n\n`Bucket.from_dict` currently captures them all in the key's metadata attribute, but that name creates confusion with its metadata key (which stores application-defined key-value pairs).\n\nI think it would be cleaner to map each the non-user-defined fields onto separate attributes, and propagate them to the server via the [insert](https://cloud.google.com/storage/docs/json_api/v1/buckets/insert), and [patch](https://cloud.google.com/storage/docs/json_api/v1/buckets/patch) or [update](https://cloud.google.com/storage/docs/json_api/v1/buckets/update) endpoints.\n\n`Bucket` should also expose read-only properties for the non-writable resource fields not already mapped, and which aren't constants:\n- `etag`\n- `id`\n- `metageneration`\n- `name`\n- `owner{}`\n- `projectNumber`\n- `selfLink`\n- `storageClass`\n- `timeCreated`\n","author":{"url":"https://github.com/tseaver","@type":"Person","name":"tseaver"},"datePublished":"2014-10-29T16:36:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/314/google-cloud-python/issues/314"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9e1899c3-9ddf-16ce-0be0-9759d6dde825 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C9C6:3217ED:D9D59C:128F2AE:6A4DCDFF |
| html-safe-nonce | d5fe526a11b829abba7f22f96cdb94e4818910d34df2d6292483219c0f2a6f58 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUM2OjMyMTdFRDpEOUQ1OUM6MTI4RjJBRTo2QTREQ0RGRiIsInZpc2l0b3JfaWQiOiIxODY5MDU3NzUxOTYwNjM2OTI3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9e0d60d1209343551d8061b6d5733b8b642f950d32f106dd6fcbe9bba80b1ca4 |
| hovercard-subject-tag | issue:47171497 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/314/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b244ecd9c172ef1f193af0dfebf0fbc0a539b9003bcd1748e4082de43a4db214/googleapis/google-cloud-python/issues/314 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b244ecd9c172ef1f193af0dfebf0fbc0a539b9003bcd1748e4082de43a4db214/googleapis/google-cloud-python/issues/314 |
| og:image:alt | The Bucket API resource representation defines a number of fields as "writable", but which we don't already map: cors[] lifecycle{} location logging{} versioning{} The support for the website{} fie... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tseaver |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width