When I use the Python to call the services() API, it returns:
"Request contains an invalid argument."
While call to projects() API works fine.
Do I need include any special argument for
service.services().list().execute()
From the document, can't see any must have argument for it.
here are the code:
credentials = GoogleCredentials.get_application_default()
service = build('cloudbilling', 'v1', credentials=credentials)
name = 'projects/project-1'
billing_request = service.projects().getBillingInfo(name=name)
billing_response = billing_request.execute()# this one no issue
data = billing_response
print(json.dumps(data))
servicelist=service.services().list().execute() # this one return error
print(json.dumps(servicelist))
Any one know why? can give an example on how to call the services function ?
You may find information about getting started with the Google Cloud Billing API using the Google API Client Library for Python via this link, and The method signatures for using List are here as well.
I should note that Google Groups are reserved for general Google Cloud Platform-end product discussions and not for technical questions. For technical questions, I recommend that you post your full detailed question to Stack Overflow.
You may take a look on this thread which seems to be similar to your issue. If the issue still persists, you may create a new issue there as well.