Show / Hide Table of Contents

Class InstancesResource

The "instances" collection of methods.

Inheritance
System.Object
InstancesResource
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Google.Apis.SQLAdmin.v1beta4
Assembly: Google.Apis.SQLAdmin.v1beta4.dll
Syntax
public class InstancesResource

Constructors

InstancesResource(IClientService)

Constructs a new resource.

Declaration
public InstancesResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

AddServerCa(String, String)

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.

Declaration
public virtual InstancesResource.AddServerCaRequest AddServerCa(string project, string instance)
Parameters
Type Name Description
System.String project

Project ID of the project that contains the instance.

System.String instance

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

Returns
Type Description
InstancesResource.AddServerCaRequest

Clone(InstancesCloneRequest, String, String)

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

Declaration
public virtual InstancesResource.CloneRequest Clone(InstancesCloneRequest body, string project, string instance)
Parameters
Type Name Description
InstancesCloneRequest body

The body of the request.

System.String project

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

System.String instance

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

Returns
Type Description
InstancesResource.CloneRequest

Delete(String, String)

Deletes a Cloud SQL instance.

Declaration
public virtual InstancesResource.DeleteRequest Delete(string project, string instance)
Parameters
Type Name Description
System.String project

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

System.String instance

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

Returns
Type Description
InstancesResource.DeleteRequest

DemoteMaster(InstancesDemoteMasterRequest, String, String)

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

Declaration
public virtual InstancesResource.DemoteMasterRequest DemoteMaster(InstancesDemoteMasterRequest body, string project, string instance)
Parameters
Type Name Description
InstancesDemoteMasterRequest body

The body of the request.

System.String project

ID of the project that contains the instance.

System.String instance

Cloud SQL instance name.

Returns
Type Description
InstancesResource.DemoteMasterRequest

Export(InstancesExportRequest, String, String)

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

Declaration
public virtual InstancesResource.ExportRequest Export(InstancesExportRequest body, string project, string instance)
Parameters
Type Name Description
InstancesExportRequest body

The body of the request.

System.String project

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

System.String instance

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

Returns
Type Description
InstancesResource.ExportRequest

Failover(InstancesFailoverRequest, String, String)

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.

Declaration
public virtual InstancesResource.FailoverRequest Failover(InstancesFailoverRequest body, string project, string instance)
Parameters
Type Name Description
InstancesFailoverRequest body

The body of the request.

System.String project

ID of the project that contains the read replica.

System.String instance

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

Returns
Type Description
InstancesResource.FailoverRequest

Get(String, String)

Retrieves a resource containing information about a Cloud SQL instance.

Declaration
public virtual InstancesResource.GetRequest Get(string project, string instance)
Parameters
Type Name Description
System.String project

Project ID of the project that contains the instance.

System.String instance

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

Returns
Type Description
InstancesResource.GetRequest

Import(InstancesImportRequest, String, String)

Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.

Declaration
public virtual InstancesResource.ImportRequest Import(InstancesImportRequest body, string project, string instance)
Parameters
Type Name Description
InstancesImportRequest body

The body of the request.

System.String project

Project ID of the project that contains the instance.

System.String instance

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

Returns
Type Description
InstancesResource.ImportRequest

Insert(DatabaseInstance, String)

Creates a new Cloud SQL instance.

Declaration
public virtual InstancesResource.InsertRequest Insert(DatabaseInstance body, string project)
Parameters
Type Name Description
DatabaseInstance body

The body of the request.

System.String project

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

Returns
Type Description
InstancesResource.InsertRequest

List(String)

Lists instances under a given project.

Declaration
public virtual InstancesResource.ListRequest List(string project)
Parameters
Type Name Description
System.String project

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

Returns
Type Description
InstancesResource.ListRequest

ListServerCas(String, String)

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.

Declaration
public virtual InstancesResource.ListServerCasRequest ListServerCas(string project, string instance)
Parameters
Type Name Description
System.String project

Project ID of the project that contains the instance.

System.String instance

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

Returns
Type Description
InstancesResource.ListServerCasRequest

Patch(DatabaseInstance, String, String)

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

Declaration
public virtual InstancesResource.PatchRequest Patch(DatabaseInstance body, string project, string instance)
Parameters
Type Name Description
DatabaseInstance body

The body of the request.

System.String project

Project ID of the project that contains the instance.

System.String instance

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

Returns
Type Description
InstancesResource.PatchRequest

PromoteReplica(String, String)

Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.

Declaration
public virtual InstancesResource.PromoteReplicaRequest PromoteReplica(string project, string instance)
Parameters
Type Name Description
System.String project

ID of the project that contains the read replica.

System.String instance

Cloud SQL read replica instance name.

Returns
Type Description
InstancesResource.PromoteReplicaRequest

ResetSslConfig(String, String)

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

Declaration
public virtual InstancesResource.ResetSslConfigRequest ResetSslConfig(string project, string instance)
Parameters
Type Name Description
System.String project

Project ID of the project that contains the instance.

System.String instance

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

Returns
Type Description
InstancesResource.ResetSslConfigRequest

Restart(String, String)

Restarts a Cloud SQL instance.

Declaration
public virtual InstancesResource.RestartRequest Restart(string project, string instance)
Parameters
Type Name Description
System.String project

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

System.String instance

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

Returns
Type Description
InstancesResource.RestartRequest

RestoreBackup(InstancesRestoreBackupRequest, String, String)

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

Declaration
public virtual InstancesResource.RestoreBackupRequest RestoreBackup(InstancesRestoreBackupRequest body, string project, string instance)
Parameters
Type Name Description
InstancesRestoreBackupRequest body

The body of the request.

System.String project

Project ID of the project that contains the instance.

System.String instance

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

Returns
Type Description
InstancesResource.RestoreBackupRequest

RotateServerCa(InstancesRotateServerCaRequest, String, String)

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

Declaration
public virtual InstancesResource.RotateServerCaRequest RotateServerCa(InstancesRotateServerCaRequest body, string project, string instance)
Parameters
Type Name Description
InstancesRotateServerCaRequest body

The body of the request.

System.String project

Project ID of the project that contains the instance.

System.String instance

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

Returns
Type Description
InstancesResource.RotateServerCaRequest

StartReplica(String, String)

Starts the replication in the read replica instance.

Declaration
public virtual InstancesResource.StartReplicaRequest StartReplica(string project, string instance)
Parameters
Type Name Description
System.String project

ID of the project that contains the read replica.

System.String instance

Cloud SQL read replica instance name.

Returns
Type Description
InstancesResource.StartReplicaRequest

StopReplica(String, String)

Stops the replication in the read replica instance.

Declaration
public virtual InstancesResource.StopReplicaRequest StopReplica(string project, string instance)
Parameters
Type Name Description
System.String project

ID of the project that contains the read replica.

System.String instance

Cloud SQL read replica instance name.

Returns
Type Description
InstancesResource.StopReplicaRequest

TruncateLog(InstancesTruncateLogRequest, String, String)

Truncate MySQL general and slow query log tables MySQL only.

Declaration
public virtual InstancesResource.TruncateLogRequest TruncateLog(InstancesTruncateLogRequest body, string project, string instance)
Parameters
Type Name Description
InstancesTruncateLogRequest body

The body of the request.

System.String project

Project ID of the Cloud SQL project.

System.String instance

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

Returns
Type Description
InstancesResource.TruncateLogRequest

Update(DatabaseInstance, String, String)

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

Declaration
public virtual InstancesResource.UpdateRequest Update(DatabaseInstance body, string project, string instance)
Parameters
Type Name Description
DatabaseInstance body

The body of the request.

System.String project

Project ID of the project that contains the instance.

System.String instance

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

Returns
Type Description
InstancesResource.UpdateRequest
In This Article
Back to top