Instances
class Instances extends Resource (View source)
The "instances" collection of methods.
Typical usage is:
$sqladminService = new Google\Service\SQLAdmin(...);
$instances = $sqladminService->instances;
Methods
Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
Adds a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in. For instances that have enabled Certificate Authority Service (CAS) based server CA, please use AddServerCertificate to add a new server certificate. (instances.addServerCa)
Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart. (instances.cloneInstances)
Deletes a Cloud SQL instance. (instances.delete)
Demotes an existing standalone instance to be a Cloud SQL read replica for an external database server. (instances.demote)
Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server. (instances.demoteMaster)
Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file. (instances.export)
Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the Overview of high availability page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance.
Retrieves a resource containing information about a Cloud SQL instance.
Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage. (instances.import)
Creates a new Cloud SQL instance. (instances.insert)
Lists instances under a given project. (instances.listInstances)
Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out. (instances.listServerCas)
Partially updates settings of a Cloud SQL instance by merging the request with the current configuration. This method supports patch semantics.
Promotes the read replica instance to be an independent Cloud SQL primary instance. Using this operation might cause your instance to restart.
Reencrypt CMEK instance with latest key version. (instances.reencrypt)
Release a lease for the setup of SQL Server Reporting Services (SSRS).
Deletes all client certificates and generates a new server SSL certificate for the instance. (instances.resetSslConfig)
Restarts a Cloud SQL instance. (instances.restart)
Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart. (instances.restoreBackup)
Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method. For instances that have enabled Certificate Authority Service (CAS) based server CA, please use RotateServerCertificate to rotate the server certificate.
Starts the replication in the read replica instance. (instances.startReplica)
Stops the replication in the read replica instance. (instances.stopReplica)
Switches over from the primary instance to the designated DR replica instance. (instances.switchover)
Truncate MySQL general and slow query log tables MySQL only.
Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart. (instances.update)
Details
SqlInstancesAcquireSsrsLeaseResponse
acquireSsrsLease(string $project, string $instance, InstancesAcquireSsrsLeaseRequest $postBody, array $optParams = [])
Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
(instances.acquireSsrsLease)
Operation
addServerCa(string $project, string $instance, array $optParams = [])
Adds a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in. For instances that have enabled Certificate Authority Service (CAS) based server CA, please use AddServerCertificate to add a new server certificate. (instances.addServerCa)
Operation
cloneInstances(string $project, string $instance, InstancesCloneRequest $postBody, array $optParams = [])
Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart. (instances.cloneInstances)
Operation
delete(string $project, string $instance, array $optParams = [])
Deletes a Cloud SQL instance. (instances.delete)
Operation
demote(string $project, string $instance, InstancesDemoteRequest $postBody, array $optParams = [])
Demotes an existing standalone instance to be a Cloud SQL read replica for an external database server. (instances.demote)
Operation
demoteMaster(string $project, string $instance, InstancesDemoteMasterRequest $postBody, array $optParams = [])
Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server. (instances.demoteMaster)
Operation
export(string $project, string $instance, InstancesExportRequest $postBody, array $optParams = [])
Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file. (instances.export)
Operation
failover(string $project, string $instance, InstancesFailoverRequest $postBody, array $optParams = [])
Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the Overview of high availability page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance.
(instances.failover)
DatabaseInstance
get(string $project, string $instance, array $optParams = [])
Retrieves a resource containing information about a Cloud SQL instance.
(instances.get)
Operation
import(string $project, string $instance, InstancesImportRequest $postBody, array $optParams = [])
Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage. (instances.import)
Operation
insert(string $project, DatabaseInstance $postBody, array $optParams = [])
Creates a new Cloud SQL instance. (instances.insert)
InstancesListResponse
listInstances(string $project, array $optParams = [])
Lists instances under a given project. (instances.listInstances)
InstancesListServerCasResponse
listServerCas(string $project, string $instance, array $optParams = [])
Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out. (instances.listServerCas)
Operation
patch(string $project, string $instance, DatabaseInstance $postBody, array $optParams = [])
Partially updates settings of a Cloud SQL instance by merging the request with the current configuration. This method supports patch semantics.
(instances.patch)
Operation
promoteReplica(string $project, string $instance, array $optParams = [])
Promotes the read replica instance to be an independent Cloud SQL primary instance. Using this operation might cause your instance to restart.
(instances.promoteReplica)
Operation
reencrypt(string $project, string $instance, InstancesReencryptRequest $postBody, array $optParams = [])
Reencrypt CMEK instance with latest key version. (instances.reencrypt)
SqlInstancesReleaseSsrsLeaseResponse
releaseSsrsLease(string $project, string $instance, array $optParams = [])
Release a lease for the setup of SQL Server Reporting Services (SSRS).
(instances.releaseSsrsLease)
Operation
resetSslConfig(string $project, string $instance, array $optParams = [])
Deletes all client certificates and generates a new server SSL certificate for the instance. (instances.resetSslConfig)
Operation
restart(string $project, string $instance, array $optParams = [])
Restarts a Cloud SQL instance. (instances.restart)
Operation
restoreBackup(string $project, string $instance, InstancesRestoreBackupRequest $postBody, array $optParams = [])
Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart. (instances.restoreBackup)
Operation
rotateServerCa(string $project, string $instance, InstancesRotateServerCaRequest $postBody, array $optParams = [])
Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method. For instances that have enabled Certificate Authority Service (CAS) based server CA, please use RotateServerCertificate to rotate the server certificate.
(instances.rotateServerCa)
Operation
startReplica(string $project, string $instance, array $optParams = [])
Starts the replication in the read replica instance. (instances.startReplica)
Operation
stopReplica(string $project, string $instance, array $optParams = [])
Stops the replication in the read replica instance. (instances.stopReplica)
Operation
switchover(string $project, string $instance, array $optParams = [])
Switches over from the primary instance to the designated DR replica instance. (instances.switchover)
Operation
truncateLog(string $project, string $instance, InstancesTruncateLogRequest $postBody, array $optParams = [])
Truncate MySQL general and slow query log tables MySQL only.
(instances.truncateLog)
Operation
update(string $project, string $instance, DatabaseInstance $postBody, array $optParams = [])
Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart. (instances.update)