I need to be able to send data from GCE (Google compute engine) to a Table in Google Cloud SQL
Reding the documentation i found:
from pprint import pprint
from googleapiclient import discovery
from oauth2client.client import GoogleCredentials
credentials = GoogleCredentials.get_application_default()
service = discovery.build('sqladmin', 'v1beta4', credentials=credentials)
project = 'xx1' # TODO: Update placeholder value.
instance = 'xx2' # TODO: Update placeholder value.
database = 'xx3' # TODO: Update placeholder value.
And with this documentation
link , i did could get the information of users and all database created in Google Cloud SQL (It worked)
users = service.users().list(project=project, instance=instance).execute()
pprint(users) # List of user
all_databases = service.databases().list(project=project, instance=instance).execute()
pprint(all_databases)
My question is:
I have a Database created in Google Cloud SQL
I have a Table created in the Database
How can i insert data to the Table from Google Compute Engine? I cannot find documentation. Could anyone help me?
Regards....