All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.sqladmin.SQLAdmin.Instances.html Maven / Gradle / Ivy

There is a newer version: v1-rev20241108-2.0.0
Show newest version






SQLAdmin.Instances (Cloud SQL Admin API v1-rev20240925-2.0.0)












com.google.api.services.sqladmin

Class SQLAdmin.Instances

  • Enclosing class:
    SQLAdmin


    public class SQLAdmin.Instances
    extends Object
    The "instances" collection of methods.
    • Constructor Detail

      • Instances

        public Instances()
    • Method Detail

      • listServerCertificates

        public SQLAdmin.Instances.ListServerCertificates listServerCertificates(String project,
                                                                                String instance)
                                                                         throws IOException
        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. Create a request for the method "instances.ListServerCertificates". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Required. Project ID of the project that contains the instance.
        instance - Required. Cloud SQL instance ID. This does not include the project ID.
        Returns:
        the request
        Throws:
        IOException
      • rotateServerCertificate

        public SQLAdmin.Instances.RotateServerCertificate rotateServerCertificate(String project,
                                                                                  String instance,
                                                                                  InstancesRotateServerCertificateRequest content)
                                                                           throws IOException
        Rotates the server certificate version to one previously added with the addServerCertificate method. For instances not using Certificate Authority Service (CAS) server CA, please use RotateServerCa instead. Create a request for the method "instances.RotateServerCertificate". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Required. Project ID of the project that contains the instance.
        instance - Required. Cloud SQL instance ID. This does not include the project ID.
        content - the InstancesRotateServerCertificateRequest
        Returns:
        the request
        Throws:
        IOException
      • acquireSsrsLease

        public SQLAdmin.Instances.AcquireSsrsLease acquireSsrsLease(String project,
                                                                    String instance,
                                                                    InstancesAcquireSsrsLeaseRequest content)
                                                             throws IOException
        Acquire a lease for the setup of SQL Server Reporting Services (SSRS). Create a request for the method "instances.acquireSsrsLease". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Required. Project ID of the project that contains the instance (Example: project-id).
        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).
        content - the InstancesAcquireSsrsLeaseRequest
        Returns:
        the request
        Throws:
        IOException
      • addServerCa

        public SQLAdmin.Instances.AddServerCa addServerCa(String project,
                                                          String instance)
                                                   throws IOException
        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. Create a request for the method "instances.addServerCa". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the project that contains the instance.
        instance - Cloud SQL instance ID. This does not include the project ID.
        Returns:
        the request
        Throws:
        IOException
      • addServerCertificate

        public SQLAdmin.Instances.AddServerCertificate addServerCertificate(String project,
                                                                            String instance)
                                                                     throws IOException
        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, please use AddServerCa instead. Create a request for the method "instances.addServerCertificate". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the project that contains the instance.
        instance - Cloud SQL instance ID. This does not include the project ID.
        Returns:
        the request
        Throws:
        IOException
      • clone

        public SQLAdmin.Instances.Clone clone(String project,
                                              String instance,
                                              InstancesCloneRequest content)
                                       throws IOException
        Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart. Create a request for the method "instances.clone". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the source as well as the clone Cloud SQL instance.
        instance - The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID.
        content - the InstancesCloneRequest
        Returns:
        the request
        Throws:
        IOException
      • delete

        public SQLAdmin.Instances.Delete delete(String project,
                                                String instance)
                                         throws IOException
        Deletes a Cloud SQL instance. Create a request for the method "instances.delete". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the project that contains the instance to be deleted.
        instance - Cloud SQL instance ID. This does not include the project ID.
        Returns:
        the request
        Throws:
        IOException
      • demote

        public SQLAdmin.Instances.Demote demote(String project,
                                                String instance,
                                                InstancesDemoteRequest content)
                                         throws IOException
        Demotes an existing standalone instance to be a Cloud SQL read replica for an external database server. Create a request for the method "instances.demote". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Required. ID of the project that contains the instance.
        instance - Required. Cloud SQL instance name.
        content - the InstancesDemoteRequest
        Returns:
        the request
        Throws:
        IOException
      • demoteMaster

        public SQLAdmin.Instances.DemoteMaster demoteMaster(String project,
                                                            String instance,
                                                            InstancesDemoteMasterRequest content)
                                                     throws IOException
        Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server. Create a request for the method "instances.demoteMaster". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - ID of the project that contains the instance.
        instance - Cloud SQL instance name.
        content - the InstancesDemoteMasterRequest
        Returns:
        the request
        Throws:
        IOException
      • export

        public SQLAdmin.Instances.Export export(String project,
                                                String instance,
                                                InstancesExportRequest content)
                                         throws IOException
        Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file. Create a request for the method "instances.export". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the project that contains the instance to be exported.
        instance - Cloud SQL instance ID. This does not include the project ID.
        content - the InstancesExportRequest
        Returns:
        the request
        Throws:
        IOException
      • failover

        public SQLAdmin.Instances.Failover failover(String project,
                                                    String instance,
                                                    InstancesFailoverRequest content)
                                             throws IOException
        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](https://cloud.google.com/sql/docs/mysql/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. Create a request for the method "instances.failover". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - ID of the project that contains the read replica.
        instance - Cloud SQL instance ID. This does not include the project ID.
        content - the InstancesFailoverRequest
        Returns:
        the request
        Throws:
        IOException
      • get

        public SQLAdmin.Instances.Get get(String project,
                                          String instance)
                                   throws IOException
        Retrieves a resource containing information about a Cloud SQL instance. Create a request for the method "instances.get". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the project that contains the instance.
        instance - Database instance ID. This does not include the project ID.
        Returns:
        the request
        Throws:
        IOException
      • sqladminImport

        public SQLAdmin.Instances.SQLAdminImport sqladminImport(String project,
                                                                String instance,
                                                                InstancesImportRequest content)
                                                         throws IOException
        Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage. Create a request for the method "instances.import". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the project that contains the instance.
        instance - Cloud SQL instance ID. This does not include the project ID.
        content - the InstancesImportRequest
        Returns:
        the request
        Throws:
        IOException
      • insert

        public SQLAdmin.Instances.Insert insert(String project,
                                                DatabaseInstance content)
                                         throws IOException
        Creates a new Cloud SQL instance. Create a request for the method "instances.insert". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the project to which the newly created Cloud SQL instances should belong.
        content - the DatabaseInstance
        Returns:
        the request
        Throws:
        IOException
      • list

        public SQLAdmin.Instances.List list(String project)
                                     throws IOException
        Lists instances under a given project. Create a request for the method "instances.list". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the project for which to list Cloud SQL instances.
        Returns:
        the request
        Throws:
        IOException
      • listServerCas

        public SQLAdmin.Instances.ListServerCas listServerCas(String project,
                                                              String instance)
                                                       throws IOException
        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. Create a request for the method "instances.listServerCas". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the project that contains the instance.
        instance - Cloud SQL instance ID. This does not include the project ID.
        Returns:
        the request
        Throws:
        IOException
      • patch

        public SQLAdmin.Instances.Patch patch(String project,
                                              String instance,
                                              DatabaseInstance content)
                                       throws IOException
        Partially updates settings of a Cloud SQL instance by merging the request with the current configuration. This method supports patch semantics. Create a request for the method "instances.patch". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the project that contains the instance.
        instance - Cloud SQL instance ID. This does not include the project ID.
        content - the DatabaseInstance
        Returns:
        the request
        Throws:
        IOException
      • promoteReplica

        public SQLAdmin.Instances.PromoteReplica promoteReplica(String project,
                                                                String instance)
                                                         throws IOException
        Promotes the read replica instance to be an independent Cloud SQL primary instance. Using this operation might cause your instance to restart. Create a request for the method "instances.promoteReplica". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - ID of the project that contains the read replica.
        instance - Cloud SQL read replica instance name.
        Returns:
        the request
        Throws:
        IOException
      • reencrypt

        public SQLAdmin.Instances.Reencrypt reencrypt(String project,
                                                      String instance,
                                                      InstancesReencryptRequest content)
                                               throws IOException
        Reencrypt CMEK instance with latest key version. Create a request for the method "instances.reencrypt". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - ID of the project that contains the instance.
        instance - Cloud SQL instance ID. This does not include the project ID.
        content - the InstancesReencryptRequest
        Returns:
        the request
        Throws:
        IOException
      • releaseSsrsLease

        public SQLAdmin.Instances.ReleaseSsrsLease releaseSsrsLease(String project,
                                                                    String instance)
                                                             throws IOException
        Release a lease for the setup of SQL Server Reporting Services (SSRS). Create a request for the method "instances.releaseSsrsLease". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Required. The project ID that contains the instance.
        instance - Required. The Cloud SQL instance ID. This doesn't include the project ID. The instance ID contains lowercase letters, numbers, and hyphens, and it must start with a letter. This ID can have a maximum length of 98 characters.
        Returns:
        the request
        Throws:
        IOException
      • resetSslConfig

        public SQLAdmin.Instances.ResetSslConfig resetSslConfig(String project,
                                                                String instance)
                                                         throws IOException
        Deletes all client certificates and generates a new server SSL certificate for the instance. Create a request for the method "instances.resetSslConfig". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the project that contains the instance.
        instance - Cloud SQL instance ID. This does not include the project ID.
        Returns:
        the request
        Throws:
        IOException
      • restart

        public SQLAdmin.Instances.Restart restart(String project,
                                                  String instance)
                                           throws IOException
        Restarts a Cloud SQL instance. Create a request for the method "instances.restart". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the project that contains the instance to be restarted.
        instance - Cloud SQL instance ID. This does not include the project ID.
        Returns:
        the request
        Throws:
        IOException
      • restoreBackup

        public SQLAdmin.Instances.RestoreBackup restoreBackup(String project,
                                                              String instance,
                                                              InstancesRestoreBackupRequest content)
                                                       throws IOException
        Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart. Create a request for the method "instances.restoreBackup". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the project that contains the instance.
        instance - Cloud SQL instance ID. This does not include the project ID.
        content - the InstancesRestoreBackupRequest
        Returns:
        the request
        Throws:
        IOException
      • rotateServerCa

        public SQLAdmin.Instances.RotateServerCa rotateServerCa(String project,
                                                                String instance,
                                                                InstancesRotateServerCaRequest content)
                                                         throws IOException
        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. Create a request for the method "instances.rotateServerCa". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the project that contains the instance.
        instance - Cloud SQL instance ID. This does not include the project ID.
        content - the InstancesRotateServerCaRequest
        Returns:
        the request
        Throws:
        IOException
      • startReplica

        public SQLAdmin.Instances.StartReplica startReplica(String project,
                                                            String instance)
                                                     throws IOException
        Starts the replication in the read replica instance. Create a request for the method "instances.startReplica". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - ID of the project that contains the read replica.
        instance - Cloud SQL read replica instance name.
        Returns:
        the request
        Throws:
        IOException
      • stopReplica

        public SQLAdmin.Instances.StopReplica stopReplica(String project,
                                                          String instance)
                                                   throws IOException
        Stops the replication in the read replica instance. Create a request for the method "instances.stopReplica". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - ID of the project that contains the read replica.
        instance - Cloud SQL read replica instance name.
        Returns:
        the request
        Throws:
        IOException
      • switchover

        public SQLAdmin.Instances.Switchover switchover(String project,
                                                        String instance)
                                                 throws IOException
        Switches over from the primary instance to the designated DR replica instance. Create a request for the method "instances.switchover". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - ID of the project that contains the replica.
        instance - Cloud SQL read replica instance name.
        Returns:
        the request
        Throws:
        IOException
      • truncateLog

        public SQLAdmin.Instances.TruncateLog truncateLog(String project,
                                                          String instance,
                                                          InstancesTruncateLogRequest content)
                                                   throws IOException
        Truncate MySQL general and slow query log tables MySQL only. Create a request for the method "instances.truncateLog". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the Cloud SQL project.
        instance - Cloud SQL instance ID. This does not include the project ID.
        content - the InstancesTruncateLogRequest
        Returns:
        the request
        Throws:
        IOException
      • update

        public SQLAdmin.Instances.Update update(String project,
                                                String instance,
                                                DatabaseInstance content)
                                         throws IOException
        Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart. Create a request for the method "instances.update". This request holds the parameters needed by the sqladmin server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID of the project that contains the instance.
        instance - Cloud SQL instance ID. This does not include the project ID.
        content - the DatabaseInstance
        Returns:
        the request
        Throws:
        IOException

Copyright © 2011–2024 Google. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy