Documentation

Google_Service_SQLAdmin_Resource_Instances extends Google_Service_Resource
in package

The "instances" collection of methods.

Typical usage is: $sqladminService = new Google_Service_SQLAdmin(...); $instances = $sqladminService->instances;

Table of Contents

$client  : Google_Client
$methods  : array<string|int, mixed>
$resourceName  : string
$rootUrl  : string
$serviceName  : string
$servicePath  : string
$stackParameters  : mixed
__construct()  : mixed
addServerCa()  : Google_Service_SQLAdmin_Operation
Add 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. (instances.addServerCa)
call()  : Google_Http_Request|expectedClass
TODO: This function needs simplifying.
cloneInstances()  : Google_Service_SQLAdmin_Operation
Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart. (instances.cloneInstances)
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
delete()  : Google_Service_SQLAdmin_Operation
Deletes a Cloud SQL instance. (instances.delete)
demoteMaster()  : Google_Service_SQLAdmin_Operation
Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server. (instances.demoteMaster)
export()  : Google_Service_SQLAdmin_Operation
Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file. (instances.export)
failover()  : Google_Service_SQLAdmin_Operation
Failover the instance to its failover replica instance. Using this operation might cause your instance to restart. (instances.failover)
get()  : Google_Service_SQLAdmin_DatabaseInstance
Retrieves a resource containing information about a Cloud SQL instance.
import()  : Google_Service_SQLAdmin_Operation
Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage. (instances.import)
insert()  : Google_Service_SQLAdmin_Operation
Creates a new Cloud SQL instance. (instances.insert)
listInstances()  : Google_Service_SQLAdmin_InstancesListResponse
Lists instances under a given project. (instances.listInstances)
listServerCas()  : Google_Service_SQLAdmin_InstancesListServerCasResponse
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)
patch()  : Google_Service_SQLAdmin_Operation
Updates settings of a Cloud SQL instance. This method supports patch semantics. (instances.patch)
promoteReplica()  : Google_Service_SQLAdmin_Operation
Promotes the read replica instance to be a stand-alone Cloud SQL instance.
resetSslConfig()  : Google_Service_SQLAdmin_Operation
Deletes all client certificates and generates a new server SSL certificate for the instance. (instances.resetSslConfig)
restart()  : Google_Service_SQLAdmin_Operation
Restarts a Cloud SQL instance. (instances.restart)
restoreBackup()  : Google_Service_SQLAdmin_Operation
Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart. (instances.restoreBackup)
rotateServerCa()  : Google_Service_SQLAdmin_Operation
Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.
startReplica()  : Google_Service_SQLAdmin_Operation
Starts the replication in the read replica instance. (instances.startReplica)
stopReplica()  : Google_Service_SQLAdmin_Operation
Stops the replication in the read replica instance. (instances.stopReplica)
truncateLog()  : Google_Service_SQLAdmin_Operation
Truncate MySQL general and slow query log tables (instances.truncateLog)
update()  : Google_Service_SQLAdmin_Operation
Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart. (instances.update)
convertToArrayAndStripNulls()  : mixed

Properties

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$serviceName

private string $serviceName

$servicePath

private string $servicePath

$stackParameters

private mixed $stackParameters = array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))

Methods

__construct()

public __construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
$service : mixed
$serviceName : mixed
$resourceName : mixed
$resource : mixed
Return values
mixed

addServerCa()

Add 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. (instances.addServerCa)

public addServerCa(string $project, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation
Parameters
$project : string

Project ID of the project that contains the instance.

$instance : string

Cloud SQL instance ID. This does not include the project ID.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

call()

TODO: This function needs simplifying.

public call( $name,  $arguments[,  $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
Return values
Google_Http_Request|expectedClass

cloneInstances()

Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart. (instances.cloneInstances)

public cloneInstances(string $project, string $instance, Google_Service_SQLAdmin_InstancesCloneRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation
Parameters
$project : string

Project ID of the source as well as the clone Cloud SQL instance.

$instance : string

The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID.

$postBody : Google_Service_SQLAdmin_InstancesCloneRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

createRequestUri()

Parse/expand request parameters and create a fully qualified request uri.

public createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
$restPath : string
$params : array<string|int, mixed>
Tags
static
Return values
string

$requestUrl

delete()

Deletes a Cloud SQL instance. (instances.delete)

public delete(string $project, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation
Parameters
$project : string

Project ID of the project that contains the instance to be deleted.

$instance : string

Cloud SQL instance ID. This does not include the project ID.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

demoteMaster()

Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server. (instances.demoteMaster)

public demoteMaster(string $project, string $instance, Google_Service_SQLAdmin_InstancesDemoteMasterRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation
Parameters
$project : string

ID of the project that contains the instance.

$instance : string

Cloud SQL instance name.

$postBody : Google_Service_SQLAdmin_InstancesDemoteMasterRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

export()

Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file. (instances.export)

public export(string $project, string $instance, Google_Service_SQLAdmin_InstancesExportRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation
Parameters
$project : string

Project ID of the project that contains the instance to be exported.

$instance : string

Cloud SQL instance ID. This does not include the project ID.

$postBody : Google_Service_SQLAdmin_InstancesExportRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

failover()

Failover the instance to its failover replica instance. Using this operation might cause your instance to restart. (instances.failover)

public failover(string $project, string $instance, Google_Service_SQLAdmin_InstancesFailoverRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation
Parameters
$project : string

ID of the project that contains the read replica.

$instance : string

Cloud SQL instance ID. This does not include the project ID.

$postBody : Google_Service_SQLAdmin_InstancesFailoverRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

get()

Retrieves a resource containing information about a Cloud SQL instance.

public get(string $project, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_DatabaseInstance

(instances.get)

Parameters
$project : string

Project ID of the project that contains the instance.

$instance : string

Database instance ID. This does not include the project ID.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_DatabaseInstance

import()

Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage. (instances.import)

public import(string $project, string $instance, Google_Service_SQLAdmin_InstancesImportRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation
Parameters
$project : string

Project ID of the project that contains the instance.

$instance : string

Cloud SQL instance ID. This does not include the project ID.

$postBody : Google_Service_SQLAdmin_InstancesImportRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

insert()

Creates a new Cloud SQL instance. (instances.insert)

public insert(string $project, Google_Service_SQLAdmin_DatabaseInstance $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation
Parameters
$project : string

Project ID of the project to which the newly created Cloud SQL instances should belong.

$postBody : Google_Service_SQLAdmin_DatabaseInstance
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

listInstances()

Lists instances under a given project. (instances.listInstances)

public listInstances(string $project[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_InstancesListResponse
Parameters
$project : string

Project ID of the project for which to list Cloud SQL instances.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string filter A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly.

opt_param

string pageToken A previously-returned page token representing part of the larger set of results to view.

opt_param

string maxResults The maximum number of results to return per response.

Return values
Google_Service_SQLAdmin_InstancesListResponse

listServerCas()

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)

public listServerCas(string $project, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_InstancesListServerCasResponse
Parameters
$project : string

Project ID of the project that contains the instance.

$instance : string

Cloud SQL instance ID. This does not include the project ID.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_InstancesListServerCasResponse

patch()

Updates settings of a Cloud SQL instance. This method supports patch semantics. (instances.patch)

public patch(string $project, string $instance, Google_Service_SQLAdmin_DatabaseInstance $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation
Parameters
$project : string

Project ID of the project that contains the instance.

$instance : string

Cloud SQL instance ID. This does not include the project ID.

$postBody : Google_Service_SQLAdmin_DatabaseInstance
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

promoteReplica()

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

public promoteReplica(string $project, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation

Using this operation might cause your instance to restart. (instances.promoteReplica)

Parameters
$project : string

ID of the project that contains the read replica.

$instance : string

Cloud SQL read replica instance name.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

resetSslConfig()

Deletes all client certificates and generates a new server SSL certificate for the instance. (instances.resetSslConfig)

public resetSslConfig(string $project, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation
Parameters
$project : string

Project ID of the project that contains the instance.

$instance : string

Cloud SQL instance ID. This does not include the project ID.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

restart()

Restarts a Cloud SQL instance. (instances.restart)

public restart(string $project, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation
Parameters
$project : string

Project ID of the project that contains the instance to be restarted.

$instance : string

Cloud SQL instance ID. This does not include the project ID.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

restoreBackup()

Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart. (instances.restoreBackup)

public restoreBackup(string $project, string $instance, Google_Service_SQLAdmin_InstancesRestoreBackupRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation
Parameters
$project : string

Project ID of the project that contains the instance.

$instance : string

Cloud SQL instance ID. This does not include the project ID.

$postBody : Google_Service_SQLAdmin_InstancesRestoreBackupRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

rotateServerCa()

Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.

public rotateServerCa(string $project, string $instance, Google_Service_SQLAdmin_InstancesRotateServerCaRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation

(instances.rotateServerCa)

Parameters
$project : string

Project ID of the project that contains the instance.

$instance : string

Cloud SQL instance ID. This does not include the project ID.

$postBody : Google_Service_SQLAdmin_InstancesRotateServerCaRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

startReplica()

Starts the replication in the read replica instance. (instances.startReplica)

public startReplica(string $project, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation
Parameters
$project : string

ID of the project that contains the read replica.

$instance : string

Cloud SQL read replica instance name.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

stopReplica()

Stops the replication in the read replica instance. (instances.stopReplica)

public stopReplica(string $project, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation
Parameters
$project : string

ID of the project that contains the read replica.

$instance : string

Cloud SQL read replica instance name.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

truncateLog()

Truncate MySQL general and slow query log tables (instances.truncateLog)

public truncateLog(string $project, string $instance, Google_Service_SQLAdmin_InstancesTruncateLogRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation
Parameters
$project : string

Project ID of the Cloud SQL project.

$instance : string

Cloud SQL instance ID. This does not include the project ID.

$postBody : Google_Service_SQLAdmin_InstancesTruncateLogRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

update()

Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart. (instances.update)

public update(string $project, string $instance, Google_Service_SQLAdmin_DatabaseInstance $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_SQLAdmin_Operation
Parameters
$project : string

Project ID of the project that contains the instance.

$instance : string

Cloud SQL instance ID. This does not include the project ID.

$postBody : Google_Service_SQLAdmin_DatabaseInstance
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_SQLAdmin_Operation

convertToArrayAndStripNulls()

protected convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
$o : mixed
Return values
mixed

Search results