Open
Description
Environment details
- OS: MacOS 12.5
- Python version: 3.9.16
- pip version: 22.0.4
google-api-python-client
version: 2.79.0
Steps to reproduce
- Run the following code to get
operation
def get_operation_progress():
response = client.projects().zones().operations().get(
name="projects/<projectId>/locations/<locationId>/operations/<operationId>"
).execute()
print(json.dumps(response))
It throws the following error
TypeError: Missing required parameter "operationId"
- When trying to run the code with deprecated parameters the following API error is thrown
def get_operation_progress():
response = client.projects().zones().operations().get(
projectId="<project>",
zone="<zone>",
operationId="<operation>",
).execute()
print(json.dumps(response))
googleapiclient.errors.HttpError: <HttpError 400 when requesting https://container.googleapis.com/v1/projects/<project>/zones/<location>/operations/<operation>?alt=json returned "'zone' field cannot be used to access GKE regional clusters. Use 'name' field instead.". Details: "'zone' field cannot be used to access GKE regional clusters. Use 'name' field instead.">