CloudBilling API invalid argument

247 views
Skip to first unread message

jack....@maplequad.com

unread,
Jun 3, 2018, 12:04:28 PM6/3/18
to Google Cloud Developers

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 ?

jack....@maplequad.com

unread,
Jun 3, 2018, 12:04:28 PM6/3/18
to Google Cloud Developers

Katayoon (Cloud Platform Support)

unread,
Jun 4, 2018, 10:59:04 AM6/4/18
to Google Cloud Developers

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.


zheng jie

unread,
Jun 5, 2018, 10:08:19 AM6/5/18
to Google Cloud Developers
I notice there are similar questions on Stack Overflow, no one answered. and actually the link you provided can't answer my question either. Read all of them before raise my question. 

Katayoon (Cloud Platform Support)

unread,
Jun 6, 2018, 2:58:22 PM6/6/18
to google-c...@googlegroups.com

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.


Reply all
Reply to author
Forward
0 new messages