# Cloud SQL Administration API . instances

## Instance Methods

Creates a Cloud SQL instance as a clone of a source instance.

Deletes a Cloud SQL instance.

Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.

Retrieves information about a Cloud SQL instance.

Imports data into a Cloud SQL instance from a MySQL dump file stored in a Google Cloud Storage bucket.

Creates a new Cloud SQL instance.

Lists instances for a given project, in alphabetical order by instance name.

Retrieves the next page of results.

Updates the settings of a Cloud SQL instance. This method supports patch semantics.

Promotes the read replica instance to be a stand-alone Cloud SQL instance.

Deletes all client certificates and generates a new server SSL certificate for a Cloud SQL instance.

Restarts a Cloud SQL instance.

Restores a backup of a Cloud SQL instance.

Sets the password for the root user of the specified Cloud SQL instance.

Updates the settings of a Cloud SQL instance.

### Method Details

`clone(project, body)`

    Creates a Cloud SQL instance as a clone of a source instance.

    Args:
      project: string, Project ID of the source as well as the clone Cloud SQL instance. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # Database instance clone request.
        "cloneContext": { # Database instance clone context. # Contains details about the clone operation.
          "sourceInstanceName": "A String", # Name of the Cloud SQL instance to be cloned.
          "binLogCoordinates": { # Binary log coordinates. # Binary log coordinates, if specified, indentify the position up to which the source instance should be cloned. If not specified, the source instance is cloned up to the most recent binary log coordinates.
            "binLogPosition": "A String", # Position (offset) within the binary log file.
            "kind": "sql#binLogCoordinates", # This is always sql#binLogCoordinates.
            "binLogFileName": "A String", # Name of the binary log file for a Cloud SQL instance.
          },
          "kind": "sql#cloneContext", # This is always sql#cloneContext.
          "destinationInstanceName": "A String", # Name of the Cloud SQL instance to be created as a clone.
        },
      }

    Returns:
      An object of the form:

        { # Database instance clone response.
        "kind": "sql#instancesClone", # This is always sql#instancesClone.
        "operation": "A String", # An unique identifier for the operation associated with the cloned instance. You can use this identifier to retrieve the Operations resource, which has information about the operation.
      }

`delete(project, instance)`

    Deletes a Cloud SQL instance.

    Args:
      project: string, Project ID of the project that contains the instance to be deleted. (required)
      instance: string, Cloud SQL instance ID. This does not include the project ID. (required)

    Returns:
      An object of the form:

        { # Database instance delete response.
        "kind": "sql#instancesDelete", # This is always sql#instancesDelete.
        "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
      }

`export(project, instance, body)`

    Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.

    Args:
      project: string, Project ID of the project that contains the instance to be exported. (required)
      instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # Database instance export request.
        "exportContext": { # Database instance export context. # Contains details about the export operation.
          "table": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
            "A String",
          ],
          "kind": "sql#exportContext", # This is always sql#exportContext.
          "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored, or where it was already stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If the filename ends with .gz, the contents are compressed.
          "database": [ # Databases (for example, guestbook) from which the export is made. If unspecified, all databases are exported.
            "A String",
          ],
        },
      }

    Returns:
      An object of the form:

        { # Database instance export response.
        "kind": "sql#instancesExport", # This is always sql#instancesExport.
        "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
      }

`get(project, instance)`

    Retrieves information about a Cloud SQL instance.

    Args:
      project: string, Project ID of the project that contains the instance. (required)
      instance: string, Database instance ID. This does not include the project ID. (required)

    Returns:
      An object of the form:

        { # A Cloud SQL instance resource.
          "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
          "kind": "sql#instance", # This is always sql#instance.
          "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
          "ipv6Address": "A String", # The IPv6 address assigned to the instance.
          "serverCaCert": { # SslCerts Resource # SSL configuration.
            "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
            "kind": "sql#sslCert", # This is always sql#sslCert.
            "sha1Fingerprint": "A String", # Sha1 Fingerprint.
            "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
            "instance": "A String", # Name of the database instance.
            "cert": "A String", # PEM representation.
            "expirationTime": "A String", # Time when the certificate expires.
            "createTime": "A String", # Time when the certificate was created.
          },
          "replicaNames": [ # The replicas of the instance.
            "A String",
          ],
          "region": "A String", # The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
          "settings": { # Database instance settings. # The user settings.
            "databaseFlags": [ # The database flags passed to the instance at startup.
              { # MySQL flags for Cloud SQL instances.
                "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. For more information, see Configuring MySQL Flags in the Google Cloud SQL documentation, as well as the official MySQL documentation for server options and system variables.
                "value": "A String", # The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.
              },
            ],
            "kind": "sql#settings", # This is always sql#settings.
            "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
              "A String",
            ],
            "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
                # ALWAYS: The instance should always be active.
                # NEVER: The instance should never be activated.
                # ON_DEMAND: The instance is activated upon receiving requests.
            "backupConfiguration": [ # The daily backup configuration for the instance.
              { # Database instance backup configuration.
                "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
                "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
                "enabled": True or False, # Whether this configuration is enabled.
                "id": "A String", # Identifier for this configuration. This gets generated automatically when a backup configuration is created.
                "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
              },
            ],
            "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance.
              "enabled": True or False, # Whether the instance should be assigned an IP address or not.
              "kind": "sql#ipConfiguration", # This is always sql#ipConfiguration.
              "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
              "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
                "A String",
              ],
            },
            "databaseReplicationEnabled": True or False, # Configuration specific to read replica instance. Indicates whether replication is enabled or not.
            "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
            "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
            "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
            "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
            "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance.
              "kind": "sql#locationPreference", # This is always sql#locationPreference.
              "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
              "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
            },
          },
          "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
          "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
          "instance": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
          "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
              # RUNNABLE: The instance is running, or is ready to run when accessed.
              # SUSPENDED: The instance is not available, for example due to problems with billing.
              # PENDING_CREATE: The instance is being created.
              # MAINTENANCE: The instance is down for maintenance.
              # UNKNOWN_STATE: The state of the instance is unknown.
          "etag": "A String", # HTTP 1.1 Entity tag for the resource.
          "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
          "ipAddresses": [ # The assigned IP addresses for the instance.
            { # Database instance IP Mapping.
              "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.
              "ipAddress": "A String", # The IP address assigned.
            },
          ],
          "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
          "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion cannot be changed after instance creation.
          "instanceType": "A String", # The instance type. This can be one of the following.
              # CLOUD_SQL_INSTANCE: Regular Cloud SQL instance.
              # READ_REPLICA_INSTANCE: Cloud SQL instance acting as a read-replica.
        }

`import_(project, instance, body)`

    Imports data into a Cloud SQL instance from a MySQL dump file stored in a Google Cloud Storage bucket.

    Args:
      project: string, Project ID of the project that contains the instance. (required)
      instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # Database instance import request.
        "importContext": { # Database instance import context. # Contains details about the import operation.
          "kind": "sql#importContext", # This is always sql#importContext.
          "uri": [ # 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.
            "A String",
          ],
          "database": "A 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.
        },
      }

    Returns:
      An object of the form:

        { # Database instance import response.
        "kind": "sql#instancesImport", # This is always sql#instancesImport.
        "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
      }

`insert(project, body)`

    Creates a new Cloud SQL instance.

    Args:
      project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # A Cloud SQL instance resource.
        "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
        "kind": "sql#instance", # This is always sql#instance.
        "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
        "ipv6Address": "A String", # The IPv6 address assigned to the instance.
        "serverCaCert": { # SslCerts Resource # SSL configuration.
          "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
          "kind": "sql#sslCert", # This is always sql#sslCert.
          "sha1Fingerprint": "A String", # Sha1 Fingerprint.
          "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
          "instance": "A String", # Name of the database instance.
          "cert": "A String", # PEM representation.
          "expirationTime": "A String", # Time when the certificate expires.
          "createTime": "A String", # Time when the certificate was created.
        },
        "replicaNames": [ # The replicas of the instance.
          "A String",
        ],
        "region": "A String", # The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
        "settings": { # Database instance settings. # The user settings.
          "databaseFlags": [ # The database flags passed to the instance at startup.
            { # MySQL flags for Cloud SQL instances.
              "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. For more information, see Configuring MySQL Flags in the Google Cloud SQL documentation, as well as the official MySQL documentation for server options and system variables.
              "value": "A String", # The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.
            },
          ],
          "kind": "sql#settings", # This is always sql#settings.
          "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
            "A String",
          ],
          "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
              # ALWAYS: The instance should always be active.
              # NEVER: The instance should never be activated.
              # ON_DEMAND: The instance is activated upon receiving requests.
          "backupConfiguration": [ # The daily backup configuration for the instance.
            { # Database instance backup configuration.
              "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
              "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
              "enabled": True or False, # Whether this configuration is enabled.
              "id": "A String", # Identifier for this configuration. This gets generated automatically when a backup configuration is created.
              "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
            },
          ],
          "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance.
            "enabled": True or False, # Whether the instance should be assigned an IP address or not.
            "kind": "sql#ipConfiguration", # This is always sql#ipConfiguration.
            "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
            "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
              "A String",
            ],
          },
          "databaseReplicationEnabled": True or False, # Configuration specific to read replica instance. Indicates whether replication is enabled or not.
          "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
          "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
          "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
          "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
          "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance.
            "kind": "sql#locationPreference", # This is always sql#locationPreference.
            "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
            "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
          },
        },
        "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
        "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
        "instance": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
        "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
            # RUNNABLE: The instance is running, or is ready to run when accessed.
            # SUSPENDED: The instance is not available, for example due to problems with billing.
            # PENDING_CREATE: The instance is being created.
            # MAINTENANCE: The instance is down for maintenance.
            # UNKNOWN_STATE: The state of the instance is unknown.
        "etag": "A String", # HTTP 1.1 Entity tag for the resource.
        "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
        "ipAddresses": [ # The assigned IP addresses for the instance.
          { # Database instance IP Mapping.
            "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.
            "ipAddress": "A String", # The IP address assigned.
          },
        ],
        "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
        "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion cannot be changed after instance creation.
        "instanceType": "A String", # The instance type. This can be one of the following.
            # CLOUD_SQL_INSTANCE: Regular Cloud SQL instance.
            # READ_REPLICA_INSTANCE: Cloud SQL instance acting as a read-replica.
      }

    Returns:
      An object of the form:

        { # Database instance insert response.
        "kind": "sql#instancesInsert", # This is always sql#instancesInsert.
        "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
      }

`list(project, pageToken=None, maxResults=None)`

    Lists instances for a given project, in alphabetical order by instance name.

    Args:
      project: string, Project ID of the project for which to list Cloud SQL instances. (required)
      pageToken: string, A previously-returned page token representing part of the larger set of results to view.
      maxResults: integer, The maximum number of results to return per response.

    Returns:
      An object of the form:

        { # Database instances list response.
        "nextPageToken": "A String", # The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
        "items": [ # List of database instance resources.
          { # A Cloud SQL instance resource.
              "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
              "kind": "sql#instance", # This is always sql#instance.
              "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
              "ipv6Address": "A String", # The IPv6 address assigned to the instance.
              "serverCaCert": { # SslCerts Resource # SSL configuration.
                "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
                "kind": "sql#sslCert", # This is always sql#sslCert.
                "sha1Fingerprint": "A String", # Sha1 Fingerprint.
                "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
                "instance": "A String", # Name of the database instance.
                "cert": "A String", # PEM representation.
                "expirationTime": "A String", # Time when the certificate expires.
                "createTime": "A String", # Time when the certificate was created.
              },
              "replicaNames": [ # The replicas of the instance.
                "A String",
              ],
              "region": "A String", # The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
              "settings": { # Database instance settings. # The user settings.
                "databaseFlags": [ # The database flags passed to the instance at startup.
                  { # MySQL flags for Cloud SQL instances.
                    "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. For more information, see Configuring MySQL Flags in the Google Cloud SQL documentation, as well as the official MySQL documentation for server options and system variables.
                    "value": "A String", # The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.
                  },
                ],
                "kind": "sql#settings", # This is always sql#settings.
                "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
                  "A String",
                ],
                "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
                    # ALWAYS: The instance should always be active.
                    # NEVER: The instance should never be activated.
                    # ON_DEMAND: The instance is activated upon receiving requests.
                "backupConfiguration": [ # The daily backup configuration for the instance.
                  { # Database instance backup configuration.
                    "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
                    "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
                    "enabled": True or False, # Whether this configuration is enabled.
                    "id": "A String", # Identifier for this configuration. This gets generated automatically when a backup configuration is created.
                    "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
                  },
                ],
                "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance.
                  "enabled": True or False, # Whether the instance should be assigned an IP address or not.
                  "kind": "sql#ipConfiguration", # This is always sql#ipConfiguration.
                  "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
                  "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
                    "A String",
                  ],
                },
                "databaseReplicationEnabled": True or False, # Configuration specific to read replica instance. Indicates whether replication is enabled or not.
                "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
                "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
                "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
                "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
                "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance.
                  "kind": "sql#locationPreference", # This is always sql#locationPreference.
                  "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
                  "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
                },
              },
              "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
              "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
              "instance": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
              "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
                  # RUNNABLE: The instance is running, or is ready to run when accessed.
                  # SUSPENDED: The instance is not available, for example due to problems with billing.
                  # PENDING_CREATE: The instance is being created.
                  # MAINTENANCE: The instance is down for maintenance.
                  # UNKNOWN_STATE: The state of the instance is unknown.
              "etag": "A String", # HTTP 1.1 Entity tag for the resource.
              "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
              "ipAddresses": [ # The assigned IP addresses for the instance.
                { # Database instance IP Mapping.
                  "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.
                  "ipAddress": "A String", # The IP address assigned.
                },
              ],
              "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
              "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion cannot be changed after instance creation.
              "instanceType": "A String", # The instance type. This can be one of the following.
                  # CLOUD_SQL_INSTANCE: Regular Cloud SQL instance.
                  # READ_REPLICA_INSTANCE: Cloud SQL instance acting as a read-replica.
            },
        ],
        "kind": "sql#instancesList", # This is always sql#instancesList.
      }

`list_next(previous_request, previous_response)`

    Retrieves the next page of results.

    Args:
      previous_request: The request for the previous page. (required)
      previous_response: The response from the request for the previous page. (required)

    Returns:
      A request object that you can call 'execute()' on to request the next
      page. Returns None if there are no more items in the collection.

`patch(project, instance, body)`

    Updates the settings of a Cloud SQL instance. This method supports patch semantics.

    Args:
      project: string, Project ID of the project that contains the instance. (required)
      instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # A Cloud SQL instance resource.
        "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
        "kind": "sql#instance", # This is always sql#instance.
        "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
        "ipv6Address": "A String", # The IPv6 address assigned to the instance.
        "serverCaCert": { # SslCerts Resource # SSL configuration.
          "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
          "kind": "sql#sslCert", # This is always sql#sslCert.
          "sha1Fingerprint": "A String", # Sha1 Fingerprint.
          "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
          "instance": "A String", # Name of the database instance.
          "cert": "A String", # PEM representation.
          "expirationTime": "A String", # Time when the certificate expires.
          "createTime": "A String", # Time when the certificate was created.
        },
        "replicaNames": [ # The replicas of the instance.
          "A String",
        ],
        "region": "A String", # The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
        "settings": { # Database instance settings. # The user settings.
          "databaseFlags": [ # The database flags passed to the instance at startup.
            { # MySQL flags for Cloud SQL instances.
              "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. For more information, see Configuring MySQL Flags in the Google Cloud SQL documentation, as well as the official MySQL documentation for server options and system variables.
              "value": "A String", # The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.
            },
          ],
          "kind": "sql#settings", # This is always sql#settings.
          "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
            "A String",
          ],
          "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
              # ALWAYS: The instance should always be active.
              # NEVER: The instance should never be activated.
              # ON_DEMAND: The instance is activated upon receiving requests.
          "backupConfiguration": [ # The daily backup configuration for the instance.
            { # Database instance backup configuration.
              "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
              "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
              "enabled": True or False, # Whether this configuration is enabled.
              "id": "A String", # Identifier for this configuration. This gets generated automatically when a backup configuration is created.
              "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
            },
          ],
          "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance.
            "enabled": True or False, # Whether the instance should be assigned an IP address or not.
            "kind": "sql#ipConfiguration", # This is always sql#ipConfiguration.
            "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
            "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
              "A String",
            ],
          },
          "databaseReplicationEnabled": True or False, # Configuration specific to read replica instance. Indicates whether replication is enabled or not.
          "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
          "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
          "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
          "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
          "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance.
            "kind": "sql#locationPreference", # This is always sql#locationPreference.
            "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
            "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
          },
        },
        "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
        "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
        "instance": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
        "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
            # RUNNABLE: The instance is running, or is ready to run when accessed.
            # SUSPENDED: The instance is not available, for example due to problems with billing.
            # PENDING_CREATE: The instance is being created.
            # MAINTENANCE: The instance is down for maintenance.
            # UNKNOWN_STATE: The state of the instance is unknown.
        "etag": "A String", # HTTP 1.1 Entity tag for the resource.
        "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
        "ipAddresses": [ # The assigned IP addresses for the instance.
          { # Database instance IP Mapping.
            "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.
            "ipAddress": "A String", # The IP address assigned.
          },
        ],
        "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
        "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion cannot be changed after instance creation.
        "instanceType": "A String", # The instance type. This can be one of the following.
            # CLOUD_SQL_INSTANCE: Regular Cloud SQL instance.
            # READ_REPLICA_INSTANCE: Cloud SQL instance acting as a read-replica.
      }

    Returns:
      An object of the form:

        { # Database instance update response.
        "kind": "sql#instancesUpdate", # This is always sql#instancesUpdate.
        "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve information about the operation.
      }

`promoteReplica(project, instance)`

    Promotes the read replica instance to be a stand-alone Cloud SQL instance.

    Args:
      project: string, ID of the project that contains the read replica. (required)
      instance: string, Cloud SQL read replica instance name. (required)

    Returns:
      An object of the form:

        { # Database promote read replica response.
        "kind": "sql#instancesPromoteReplica", # This is always sql#instancesPromoteReplica.
        "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
      }

`resetSslConfig(project, instance)`

    Deletes all client certificates and generates a new server SSL certificate for a Cloud SQL instance.

    Args:
      project: string, Project ID of the project that contains the instance. (required)
      instance: string, Cloud SQL instance ID. This does not include the project ID. (required)

    Returns:
      An object of the form:

        { # Database instance resetSslConfig response.
        "kind": "sql#instancesResetSslConfig", # This is always sql#instancesResetSslConfig.
        "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. All ssl client certificates will be deleted and a new server certificate will be created. Does not take effect until the next instance restart.
      }

`restart(project, instance)`

    Restarts a Cloud SQL instance.

    Args:
      project: string, Project ID of the project that contains the instance to be restarted. (required)
      instance: string, Cloud SQL instance ID. This does not include the project ID. (required)

    Returns:
      An object of the form:

        { # Database instance restart response.
        "kind": "sql#instancesRestart", # This is always sql#instancesRestart.
        "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
      }

`restoreBackup(project, instance, backupConfiguration, dueTime)`

    Restores a backup of a Cloud SQL instance.

    Args:
      project: string, Project ID of the project that contains the instance. (required)
      instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
      backupConfiguration: string, The identifier of the backup configuration. This gets generated automatically when a backup configuration is created. (required)
      dueTime: string, The start time of the four-hour backup window. The backup can occur any time in the window. The time is in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. (required)

    Returns:
      An object of the form:

        { # Database instance restore backup response.
        "kind": "sql#instancesRestoreBackup", # This is always sql#instancesRestoreBackup.
        "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
      }

`setRootPassword(project, instance, body)`

    Sets the password for the root user of the specified Cloud SQL instance.

    Args:
      project: string, Project ID of the project that contains the instance. (required)
      instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # Database instance set root password request.
        "setRootPasswordContext": { # Database instance set root password context. # Set Root Password Context.
          "kind": "sql#setRootUserContext", # This is always sql#setRootUserContext.
          "password": "A String", # The password for the root user.
        },
      }

    Returns:
      An object of the form:

        { # Database instance set root password response.
        "kind": "sql#instancesSetRootPassword", # This is always sql#instancesSetRootPassword.
        "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
      }

`update(project, instance, body)`

    Updates the settings of a Cloud SQL instance.

    Args:
      project: string, Project ID of the project that contains the instance. (required)
      instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # A Cloud SQL instance resource.
        "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
        "kind": "sql#instance", # This is always sql#instance.
        "maxDiskSize": "A String", # The maximum disk size of the instance in bytes.
        "ipv6Address": "A String", # The IPv6 address assigned to the instance.
        "serverCaCert": { # SslCerts Resource # SSL configuration.
          "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
          "kind": "sql#sslCert", # This is always sql#sslCert.
          "sha1Fingerprint": "A String", # Sha1 Fingerprint.
          "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
          "instance": "A String", # Name of the database instance.
          "cert": "A String", # PEM representation.
          "expirationTime": "A String", # Time when the certificate expires.
          "createTime": "A String", # Time when the certificate was created.
        },
        "replicaNames": [ # The replicas of the instance.
          "A String",
        ],
        "region": "A String", # The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation.
        "settings": { # Database instance settings. # The user settings.
          "databaseFlags": [ # The database flags passed to the instance at startup.
            { # MySQL flags for Cloud SQL instances.
              "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. For more information, see Configuring MySQL Flags in the Google Cloud SQL documentation, as well as the official MySQL documentation for server options and system variables.
              "value": "A String", # The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value.
            },
          ],
          "kind": "sql#settings", # This is always sql#settings.
          "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance.
            "A String",
          ],
          "activationPolicy": "A String", # The activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is RUNNABLE. This can be one of the following.
              # ALWAYS: The instance should always be active.
              # NEVER: The instance should never be activated.
              # ON_DEMAND: The instance is activated upon receiving requests.
          "backupConfiguration": [ # The daily backup configuration for the instance.
            { # Database instance backup configuration.
              "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - HH:MM.
              "kind": "sql#backupConfiguration", # This is always sql#backupConfiguration.
              "enabled": True or False, # Whether this configuration is enabled.
              "id": "A String", # Identifier for this configuration. This gets generated automatically when a backup configuration is created.
              "binaryLogEnabled": True or False, # Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well.
            },
          ],
          "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance.
            "enabled": True or False, # Whether the instance should be assigned an IP address or not.
            "kind": "sql#ipConfiguration", # This is always sql#ipConfiguration.
            "requireSsl": True or False, # Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP.
            "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).
              "A String",
            ],
          },
          "databaseReplicationEnabled": True or False, # Configuration specific to read replica instance. Indicates whether replication is enabled or not.
          "replicationType": "A String", # The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS.
          "tier": "A String", # The tier of service for this instance, for example D1, D2. For more information, see pricing.
          "pricingPlan": "A String", # The pricing plan for this instance. This can be either PER_USE or PACKAGE.
          "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.
          "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or GCE zone for better performance.
            "kind": "sql#locationPreference", # This is always sql#locationPreference.
            "zone": "A String", # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
            "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance.
          },
        },
        "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup.
        "currentDiskSize": "A String", # The current disk usage of the instance in bytes.
        "instance": "A String", # Name of the Cloud SQL instance. This does not include the project ID.
        "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following.
            # RUNNABLE: The instance is running, or is ready to run when accessed.
            # SUSPENDED: The instance is not available, for example due to problems with billing.
            # PENDING_CREATE: The instance is being created.
            # MAINTENANCE: The instance is down for maintenance.
            # UNKNOWN_STATE: The state of the instance is unknown.
        "etag": "A String", # HTTP 1.1 Entity tag for the resource.
        "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance.
        "ipAddresses": [ # The assigned IP addresses for the instance.
          { # Database instance IP Mapping.
            "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.
            "ipAddress": "A String", # The IP address assigned.
          },
        ],
        "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings.
        "databaseVersion": "A String", # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion cannot be changed after instance creation.
        "instanceType": "A String", # The instance type. This can be one of the following.
            # CLOUD_SQL_INSTANCE: Regular Cloud SQL instance.
            # READ_REPLICA_INSTANCE: Cloud SQL instance acting as a read-replica.
      }

    Returns:
      An object of the form:

        { # Database instance update response.
        "kind": "sql#instancesUpdate", # This is always sql#instancesUpdate.
        "operation": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve information about the operation.
      }