Everything worked out, Thanks very mach:)
On Monday, February 8, 2016 at 6:56:19 PM UTC+2, David Newgas wrote:
-- On Monday, February 8, 2016 at 6:56:19 PM UTC+2, David Newgas wrote:
Hi, It looks like you have only added the Google_service_Storage::DEVSTORAGE_FULL_CONTROL scope. This is used for Google Cloud Storage. If you want to use Google Cloud SQL export to GCS use the "https://www.googleapis.com/ auth/cloud-platform " scope as mentioned here. You can access this scope as Google_Service_SQLAdmin::CLOUD_PLATFORM. On Mon, Feb 8, 2016 at 12:55 AM, Sergey Gulidov <gulid...@gmail.com> wrote:--I have problem with authorization to google serviceI have instance where running php script which trying auth by json configI turn on next servicesBigQuery APICloud Debugger APIDebuglet Controller APIGoogle Cloud Dataflow APIGoogle Cloud Dataproc APIGoogle Cloud Deployment Manager APIGoogle Cloud Deployment Manager V2 APIGoogle Cloud Logging APIGoogle Cloud SQLGoogle Cloud SQL APIGoogle Cloud StorageGoogle Cloud Storage JSON APIGoogle Compute EngineGoogle Compute Engine Autoscaler APIGoogle Compute Engine Instance Group Manager APIGoogle Compute Engine Instance Group Updater APIGoogle Compute Engine Instance Groups APIGoogle Container Engine APII created service key and was generated json file on cloud instanceThis json file I used in function 'setAuthConfig'part of script:$instance = 'instance name where cloud sql';$project = 'octopus-bank-api';$client = new \Google_Client();//$client->useApplicationDefaultCredentia ls(); $client->setAuthConfig(path_to_file/file.json'); $client->addScope(\Google_Service_Storage::DEVSTORAGE_ FULL_CONTROL); $sqlAdmin = new \Google_Service_SQLAdmin($client); $postBody = new \Google_Service_SQLAdmin_InstancesExportRequest(); $sqlAdmin->instances->export($project, $instance, $postBody); Exception 'Google_Service_Exception' with message '{"error": {"errors": [{"domain": "global","reason": "insufficientPermissions","message": "Insufficient Permission"}],"code": 403,"message": "Insufficient Permission"}}'in /var/www/octopus/vendor/google/apiclient/src/Google/ Http/REST.php:123
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql- .discuss/644ffcfd-fc61-430e- bdce-8d4242bf888a% 40googlegroups.com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/6774f45a-fe0d-4f18-936e-6202a9045dcb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment