Class InstancesResource
The "instances" collection of methods.
Inherited Members
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
AcquireSsrsLease(InstancesAcquireSsrsLeaseRequest, string, string)
Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
Declaration
public virtual InstancesResource.AcquireSsrsLeaseRequest AcquireSsrsLease(InstancesAcquireSsrsLeaseRequest body, string project, string instance)
Parameters
Type | Name | Description |
---|---|---|
InstancesAcquireSsrsLeaseRequest | body | The body of the request. |
string | project | Required. ID of the project that contains the instance (Example: project-id). |
string | instance | Required. Cloud SQL instance ID. This doesn't include the project ID. It's composed of lowercase letters, numbers, and hyphens, and it must start with a letter. The total length must be 98 characters or less (Example: instance-id). |
Returns
Type | Description |
---|---|
InstancesResource.AcquireSsrsLeaseRequest |
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. For instances that have enabled Certificate Authority Service (CAS) based server CA, use AddServerCertificate to add a new server certificate.
Declaration
public virtual InstancesResource.AddServerCaRequest AddServerCa(string project, string instance)
Parameters
Type | Name | Description |
---|---|---|
string | project | Project ID of the project that contains the instance. |
string | instance | Cloud SQL instance ID. This does not include the project ID. |
Returns
Type | Description |
---|---|
InstancesResource.AddServerCaRequest |
AddServerCertificate(string, string)
Add a new trusted server certificate version for the specified instance using Certificate Authority Service (CAS) server CA. Required to prepare for a certificate rotation. If a server certificate version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one certificate version waiting to be rotated in. For instances not using CAS server CA, use AddServerCa instead.
Declaration
public virtual InstancesResource.AddServerCertificateRequest AddServerCertificate(string project, string instance)
Parameters
Type | Name | Description |
---|---|---|
string | project | Required. Project ID of the project that contains the instance. |
string | instance | Required. Cloud SQL instance ID. This does not include the project ID. |
Returns
Type | Description |
---|---|
InstancesResource.AddServerCertificateRequest |
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. |
string | project | Project ID of the source as well as the clone Cloud SQL instance. |
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 |
---|---|---|
string | project | Project ID of the project that contains the instance to be deleted. |
string | instance | Cloud SQL instance ID. This does not include the project ID. |
Returns
Type | Description |
---|---|
InstancesResource.DeleteRequest |
Demote(InstancesDemoteRequest, string, string)
Demotes an existing standalone instance to be a Cloud SQL read replica for an external database server.
Declaration
public virtual InstancesResource.DemoteRequest Demote(InstancesDemoteRequest body, string project, string instance)
Parameters
Type | Name | Description |
---|---|---|
InstancesDemoteRequest | body | The body of the request. |
string | project | Required. The project ID of the project that contains the instance. |
string | instance | Required. The name of the Cloud SQL instance. |
Returns
Type | Description |
---|---|
InstancesResource.DemoteRequest |
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. |
string | project | ID of the project that contains the instance. |
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. |
string | project | Project ID of the project that contains the instance to be exported. |
string | instance | The Cloud SQL instance ID. This doesn't 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. |
string | project | ID of the project that contains the read replica. |
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 |
---|---|---|
string | project | Project ID of the project that contains the instance. |
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. |
string | project | Project ID of the project that contains the instance. |
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. |
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 |
---|---|---|
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 |
---|---|---|
string | project | Project ID of the project that contains the instance. |
string | instance | Cloud SQL instance ID. This does not include the project ID. |
Returns
Type | Description |
---|---|
InstancesResource.ListServerCasRequest |
ListServerCertificates(string, string)
Lists all versions of server certificates and certificate authorities (CAs) for the specified instance. There can be up to three sets of certs listed: the certificate that is currently in use, a future that has been added but not yet used to sign a certificate, and a certificate that has been rotated out. For instances not using Certificate Authority Service (CAS) server CA, use ListServerCas instead.
Declaration
public virtual InstancesResource.ListServerCertificatesRequest ListServerCertificates(string project, string instance)
Parameters
Type | Name | Description |
---|---|---|
string | project | Required. Project ID of the project that contains the instance. |
string | instance | Required. Cloud SQL instance ID. This does not include the project ID. |
Returns
Type | Description |
---|---|
InstancesResource.ListServerCertificatesRequest |
Patch(DatabaseInstance, string, string)
Partially updates settings of a Cloud SQL instance by merging the request with the current configuration. 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. |
string | project | Project ID of the project that contains the instance. |
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 an independent Cloud SQL primary instance. Using this operation might cause your instance to restart.
Declaration
public virtual InstancesResource.PromoteReplicaRequest PromoteReplica(string project, string instance)
Parameters
Type | Name | Description |
---|---|---|
string | project | ID of the project that contains the read replica. |
string | instance | Cloud SQL read replica instance name. |
Returns
Type | Description |
---|---|
InstancesResource.PromoteReplicaRequest |
Reencrypt(InstancesReencryptRequest, string, string)
Reencrypt CMEK instance with latest key version.
Declaration
public virtual InstancesResource.ReencryptRequest Reencrypt(InstancesReencryptRequest body, string project, string instance)
Parameters
Type | Name | Description |
---|---|---|
InstancesReencryptRequest | body | The body of the request. |
string | project | ID of the project that contains the instance. |
string | instance | Cloud SQL instance ID. This does not include the project ID. |
Returns
Type | Description |
---|---|
InstancesResource.ReencryptRequest |
ReleaseSsrsLease(string, string)
Release a lease for the setup of SQL Server Reporting Services (SSRS).
Declaration
public virtual InstancesResource.ReleaseSsrsLeaseRequest ReleaseSsrsLease(string project, string instance)
Parameters
Type | Name | Description |
---|---|---|
string | project | Required. The ID of the project that contains the instance (Example: project-id). |
string | instance | Required. The Cloud SQL instance ID. This doesn't include the project ID. It's composed of lowercase letters, numbers, and hyphens, and it must start with a letter. The total length must be 98 characters or less (Example: instance-id). |
Returns
Type | Description |
---|---|
InstancesResource.ReleaseSsrsLeaseRequest |
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 |
---|---|---|
string | project | Project ID of the project that contains the instance. |
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 |
---|---|---|
string | project | Project ID of the project that contains the instance to be restarted. |
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. |
string | project | Project ID of the project that contains the instance. |
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. For instances that have enabled Certificate Authority Service (CAS) based server CA, use RotateServerCertificate to rotate the server certificate.
Declaration
public virtual InstancesResource.RotateServerCaRequest RotateServerCa(InstancesRotateServerCaRequest body, string project, string instance)
Parameters
Type | Name | Description |
---|---|---|
InstancesRotateServerCaRequest | body | The body of the request. |
string | project | Project ID of the project that contains the instance. |
string | instance | Cloud SQL instance ID. This does not include the project ID. |
Returns
Type | Description |
---|---|
InstancesResource.RotateServerCaRequest |
RotateServerCertificate(InstancesRotateServerCertificateRequest, string, string)
Rotates the server certificate version to one previously added with the addServerCertificate method. For instances not using Certificate Authority Service (CAS) server CA, use RotateServerCa instead.
Declaration
public virtual InstancesResource.RotateServerCertificateRequest RotateServerCertificate(InstancesRotateServerCertificateRequest body, string project, string instance)
Parameters
Type | Name | Description |
---|---|---|
InstancesRotateServerCertificateRequest | body | The body of the request. |
string | project | Required. Project ID of the project that contains the instance. |
string | instance | Required. Cloud SQL instance ID. This does not include the project ID. |
Returns
Type | Description |
---|---|
InstancesResource.RotateServerCertificateRequest |
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 |
---|---|---|
string | project | ID of the project that contains the read replica. |
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 |
---|---|---|
string | project | ID of the project that contains the read replica. |
string | instance | Cloud SQL read replica instance name. |
Returns
Type | Description |
---|---|
InstancesResource.StopReplicaRequest |
Switchover(string, string)
Switches over from the primary instance to the designated DR replica instance.
Declaration
public virtual InstancesResource.SwitchoverRequest Switchover(string project, string instance)
Parameters
Type | Name | Description |
---|---|---|
string | project | ID of the project that contains the replica. |
string | instance | Cloud SQL read replica instance name. |
Returns
Type | Description |
---|---|
InstancesResource.SwitchoverRequest |
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. |
string | project | Project ID of the Cloud SQL project. |
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. |
string | project | Project ID of the project that contains the instance. |
string | instance | Cloud SQL instance ID. This does not include the project ID. |
Returns
Type | Description |
---|---|
InstancesResource.UpdateRequest |