Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



Instances: import

Requires authorization

Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud Storage. Try it now .

Request

HTTP request

POST https://www.googleapis.com/sql/v1beta1/projects/project/instances/instance/import

Parameters

Parameter name Value Description
Required parameters
instance string Cloud SQL instance ID. This does not include the project ID.
project string Project ID of the project that contains the instance.

Authorization

This request requires authorization with the following scope ( read more about authentication and authorization ).

Scope
https://www.googleapis.com/auth/cloud-platform

Request body

In the request body, supply data with the following structure:

{
  "importContext": {
    "kind": "sql#importContext",
    "uri": [
      string
    ],
    "database": string
  }
}
Property name Value Description Notes
importContext nested object Contains details about the import operation.
importContext. kind string This is always sql#importContext .
importContext. uri[] list A path to the MySQL dump file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName . Compressed gzip files (.gz) are also supported.
importContext. database string The database (for example, guestbook ) to which the import is made. If not set, it is assumed that the database is specified in the file to be imported.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "sql#instancesImport",
  "operation": string
}
Property name Value Description Notes
kind string This is always sql#instancesImport .
operation string An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.

Try it!

Use the APIs Explorer below to call this method on live data and see the response. Alternatively, try the standalone Explorer .

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.