1

I'm not able to find a way to simply start and stop a Cloud SQL instance using java mysql admin-api.

I found this official google documentation that explain how to start and stop the Cloud SQL instance via gcloud: https://cloud.google.com/sql/docs/mysql/start-stop-restart-instance But I'm not able to obtain the same things via java using mysql admin-api,

Anybody can help me?

1 Answer 1

1

To add visibility posting Yandrak3's answer on Stackoverflow which suggests changing the activation policy of the instance.

"I have tried running the API with the NEVER and ALWAYS states, and my Cloud SQL instance stopped and started accordingly. So in your case, and going back to the Admin API for Java, you should be looking at the Settings of your instance, specifically at this method:

public Settings setActivationPolicy(java.lang.String activationPolicy)

Changing the Activation Policy to NEVER or ALWAYS should be what you need here, although you can have a look at the other possible instance states in case they fit your requirements better."

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .