-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: cloudresourcemanagerIssues related to the Resource Manager API.Issues related to the Resource Manager API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
The resource manager update fails when setting a label, in the style according to the docs.
>>> client = resource_manager.Client()
>>> project = client.fetch_project('purple-spaceship-124')
>>> project.labels['color'] = 'purple'
>>> project
<Project: None ('purple-spaceship-124')>
>>> project.update()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/waprin/.virtualenvs/resourcemanager/lib/python2.7/site-packages/google/cloud/resource_manager/project.py", line 207, in update
method='PUT', path=self.path, data=data)
File "/Users/waprin/.virtualenvs/resourcemanager/lib/python2.7/site-packages/google/cloud/_http.py", line 336, in api_request
error_info=method + ' ' + url)
google.cloud.exceptions.BadRequest: 400 Request contains an invalid argument. (PUT https://cloudresourcemanager.googleapis.com/v1beta1/projects/purple-spaceship-124)Will likely submit a PR to fix this myself, digging into it, making issue in case I'm doing something silly.
Metadata
Metadata
Assignees
Labels
api: cloudresourcemanagerIssues related to the Resource Manager API.Issues related to the Resource Manager API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.