google-cloud-python
google-cloud-python copied to clipboard
Feature Request: Add location parameter to TagBinding API in Python SDK
Determine this is the right repository
- [x] I determined this is the correct repository in which to report this feature request.
Summary of the feature request
Feature Request
The google.cloud.resourcemanager_v3.TagBinding API does not support specifying location, which is required when tagging regional resources (e.g., Cloud Storage buckets).
Problem
- The
gcloudCLI allows specifying--location, which is mandatory for tagging buckets. - The Python SDK lacks this parameter, making it impossible to create tag bindings for regional resources.
- Attempting to use the Python SDK results in an error:
"Must be a valid One Platform resource name of a tag-compatible global resource."
Example of Working gcloud Command:
gcloud resource-manager tags bindings create \
--tag-value=466574201342/datacompliance/pii \
--parent=//storage.googleapis.com/projects/_/buckets/dd-dv01-test-v105-6353 \
--location=us-east1
API client name and version
From Python SDK: google.cloud.resourcemanager_v3
Use case
Applying and listing existing tags to GCS buckets via the Python SDK
Proposed Fix
Add a location parameter to TagBinding in google.cloud.resourcemanager_v3.types
Update create_tag_binding() to accept and pass location to the API.
This change would align the Python SDK with the gcloud CLI and unblock regional tagging.