UNPKG

@google-cloud/sql

Version:
706 lines 84.1 kB
import type * as gax from 'google-gax'; import type { Callback, CallOptions, Descriptors, ClientOptions, LocationsClient, LocationProtos } from 'google-gax'; import * as protos from '../../protos/protos'; /** * @class * @memberof v1beta4 */ export declare class SqlInstancesServiceClient { private _terminated; private _opts; private _providedCustomServicePath; private _gaxModule; private _gaxGrpc; private _protos; private _defaults; private _universeDomain; private _servicePath; private _log; auth: gax.GoogleAuth; descriptors: Descriptors; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: { [name: string]: Function; }; locationsClient: LocationsClient; sqlInstancesServiceStub?: Promise<{ [name: string]: Function; }>; /** * Construct an instance of SqlInstancesServiceClient. * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] * @param {string} [options.credentials.private_key] * @param {string} [options.email] - Account email address. Required when * using a .pem or .p12 keyFilename. * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or * .p12 key downloaded from the Google Developers Console. If you provide * a path to a JSON file, the projectId option below is not necessary. * NOTE: .pem and .p12 require you to specify options.email as well. * @param {number} [options.port] - The port on which to connect to * the remote host. * @param {string} [options.projectId] - The project ID from the Google * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you * need to avoid loading the default gRPC version and want to use the fallback * HTTP implementation. Load only fallback version and pass it to the constructor: * ``` * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC * const client = new SqlInstancesServiceClient({fallback: true}, gax); * ``` */ constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback); /** * Initialize the client. * Performs asynchronous operations (such as authentication) and prepares the client. * This function will be called automatically when any class method is called for the * first time, but if you need to initialize it before calling an actual method, * feel free to call initialize() directly. * * You can await on this method if you want to make sure the client is initialized. * * @returns {Promise} A promise that resolves to an authenticated service stub. */ initialize(): Promise<{ [name: string]: Function; }>; /** * The DNS address for this API service. * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get servicePath(): string; /** * The DNS address for this API service - same as servicePath. * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get apiEndpoint(): string; /** * The DNS address for this API service. * @returns {string} The DNS address for this service. */ get apiEndpoint(): string; get universeDomain(): string; /** * The port for this API service. * @returns {number} The default port for this service. */ static get port(): number; /** * The scopes needed to make gRPC calls for every method defined * in this service. * @returns {string[]} List of default scopes. */ static get scopes(): string[]; getProjectId(): Promise<string>; getProjectId(callback: Callback<string, undefined, undefined>): void; /** * 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. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Cloud SQL instance ID. This does not include the project ID. * @param {string} request.project * Project ID of the project that contains the instance. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.add_server_ca.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_AddServerCa_async */ addServerCa(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesAddServerCaRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesAddServerCaRequest | undefined, {} | undefined ]>; addServerCa(request: protos.google.cloud.sql.v1beta4.ISqlInstancesAddServerCaRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesAddServerCaRequest | null | undefined, {} | null | undefined>): void; addServerCa(request: protos.google.cloud.sql.v1beta4.ISqlInstancesAddServerCaRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesAddServerCaRequest | null | undefined, {} | null | undefined>): void; /** * Creates a Cloud SQL instance as a clone of the source instance. Using this * operation might cause your instance to restart. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * The ID of the Cloud SQL instance to be cloned (source). This does not * include the project ID. * @param {string} request.project * Project ID of the source as well as the clone Cloud SQL instance. * @param {google.cloud.sql.v1beta4.InstancesCloneRequest} request.body * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.clone.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_Clone_async */ clone(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesCloneRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesCloneRequest | undefined, {} | undefined ]>; clone(request: protos.google.cloud.sql.v1beta4.ISqlInstancesCloneRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesCloneRequest | null | undefined, {} | null | undefined>): void; clone(request: protos.google.cloud.sql.v1beta4.ISqlInstancesCloneRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesCloneRequest | null | undefined, {} | null | undefined>): void; /** * Deletes a Cloud SQL instance. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Cloud SQL instance ID. This does not include the project ID. * @param {string} request.project * Project ID of the project that contains the instance to be deleted. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.delete.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_Delete_async */ delete(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesDeleteRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesDeleteRequest | undefined, {} | undefined ]>; delete(request: protos.google.cloud.sql.v1beta4.ISqlInstancesDeleteRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesDeleteRequest | null | undefined, {} | null | undefined>): void; delete(request: protos.google.cloud.sql.v1beta4.ISqlInstancesDeleteRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesDeleteRequest | null | undefined, {} | null | undefined>): void; /** * Demotes the stand-alone instance to be a Cloud SQL read replica for an * external database server. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Cloud SQL instance name. * @param {string} request.project * ID of the project that contains the instance. * @param {google.cloud.sql.v1beta4.InstancesDemoteMasterRequest} request.body * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.demote_master.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_DemoteMaster_async */ demoteMaster(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteMasterRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteMasterRequest | undefined, {} | undefined ]>; demoteMaster(request: protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteMasterRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteMasterRequest | null | undefined, {} | null | undefined>): void; demoteMaster(request: protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteMasterRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteMasterRequest | null | undefined, {} | null | undefined>): void; /** * Demotes an existing standalone instance to be a Cloud SQL read replica * for an external database server. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Required. The name of the Cloud SQL instance. * @param {string} request.project * Required. The project ID of the project that contains the instance. * @param {google.cloud.sql.v1beta4.InstancesDemoteRequest} request.body * The request body. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.demote.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_Demote_async */ demote(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteRequest | undefined, {} | undefined ]>; demote(request: protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteRequest | null | undefined, {} | null | undefined>): void; demote(request: protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteRequest | null | undefined, {} | null | undefined>): void; /** * Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL * dump or CSV file. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * The Cloud SQL instance ID. This doesn't include the project ID. * @param {string} request.project * Project ID of the project that contains the instance to be exported. * @param {google.cloud.sql.v1beta4.InstancesExportRequest} request.body * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.export.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_Export_async */ export(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesExportRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesExportRequest | undefined, {} | undefined ]>; export(request: protos.google.cloud.sql.v1beta4.ISqlInstancesExportRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesExportRequest | null | undefined, {} | null | undefined>): void; export(request: protos.google.cloud.sql.v1beta4.ISqlInstancesExportRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesExportRequest | null | undefined, {} | null | undefined>): void; /** * 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. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Cloud SQL instance ID. This does not include the project ID. * @param {string} request.project * ID of the project that contains the read replica. * @param {google.cloud.sql.v1beta4.InstancesFailoverRequest} request.body * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.failover.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_Failover_async */ failover(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesFailoverRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesFailoverRequest | undefined, {} | undefined ]>; failover(request: protos.google.cloud.sql.v1beta4.ISqlInstancesFailoverRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesFailoverRequest | null | undefined, {} | null | undefined>): void; failover(request: protos.google.cloud.sql.v1beta4.ISqlInstancesFailoverRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesFailoverRequest | null | undefined, {} | null | undefined>): void; /** * Reencrypt CMEK instance with latest key version. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Cloud SQL instance ID. This does not include the project ID. * @param {string} request.project * ID of the project that contains the instance. * @param {google.cloud.sql.v1beta4.InstancesReencryptRequest} request.body * Reencrypt body that users request * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.reencrypt.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_Reencrypt_async */ reencrypt(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesReencryptRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesReencryptRequest | undefined, {} | undefined ]>; reencrypt(request: protos.google.cloud.sql.v1beta4.ISqlInstancesReencryptRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesReencryptRequest | null | undefined, {} | null | undefined>): void; reencrypt(request: protos.google.cloud.sql.v1beta4.ISqlInstancesReencryptRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesReencryptRequest | null | undefined, {} | null | undefined>): void; /** * Retrieves a resource containing information about a Cloud SQL instance. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Database instance ID. This does not include the project ID. * @param {string} request.project * Project ID of the project that contains the instance. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.DatabaseInstance|DatabaseInstance}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.get.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_Get_async */ get(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesGetRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IDatabaseInstance, protos.google.cloud.sql.v1beta4.ISqlInstancesGetRequest | undefined, {} | undefined ]>; get(request: protos.google.cloud.sql.v1beta4.ISqlInstancesGetRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IDatabaseInstance, protos.google.cloud.sql.v1beta4.ISqlInstancesGetRequest | null | undefined, {} | null | undefined>): void; get(request: protos.google.cloud.sql.v1beta4.ISqlInstancesGetRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IDatabaseInstance, protos.google.cloud.sql.v1beta4.ISqlInstancesGetRequest | null | undefined, {} | null | undefined>): void; /** * Imports data into a Cloud SQL instance from a SQL dump or CSV file in * Cloud Storage. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Cloud SQL instance ID. This does not include the project ID. * @param {string} request.project * Project ID of the project that contains the instance. * @param {google.cloud.sql.v1beta4.InstancesImportRequest} request.body * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.import.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_Import_async */ import(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesImportRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesImportRequest | undefined, {} | undefined ]>; import(request: protos.google.cloud.sql.v1beta4.ISqlInstancesImportRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesImportRequest | null | undefined, {} | null | undefined>): void; import(request: protos.google.cloud.sql.v1beta4.ISqlInstancesImportRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesImportRequest | null | undefined, {} | null | undefined>): void; /** * Creates a new Cloud SQL instance. * * @param {Object} request * The request object that will be sent. * @param {string} request.project * Project ID of the project to which the newly created Cloud SQL instances * should belong. * @param {google.cloud.sql.v1beta4.DatabaseInstance} request.body * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.insert.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_Insert_async */ insert(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesInsertRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesInsertRequest | undefined, {} | undefined ]>; insert(request: protos.google.cloud.sql.v1beta4.ISqlInstancesInsertRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesInsertRequest | null | undefined, {} | null | undefined>): void; insert(request: protos.google.cloud.sql.v1beta4.ISqlInstancesInsertRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesInsertRequest | null | undefined, {} | null | undefined>): void; /** * Lists instances under a given project. * * @param {Object} request * The request object that will be sent. * @param {string} request.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. * @param {number} request.maxResults * The maximum number of instances to return. The service may return fewer * than this value. * If unspecified, at most 500 instances are returned. * The maximum value is 1000; values above 1000 are coerced to 1000. * @param {string} request.pageToken * A previously-returned page token representing part of the larger set of * results to view. * @param {string} request.project * Project ID of the project for which to list Cloud SQL instances. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.InstancesListResponse|InstancesListResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.list.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_List_async */ list(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesListRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IInstancesListResponse, protos.google.cloud.sql.v1beta4.ISqlInstancesListRequest | undefined, {} | undefined ]>; list(request: protos.google.cloud.sql.v1beta4.ISqlInstancesListRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IInstancesListResponse, protos.google.cloud.sql.v1beta4.ISqlInstancesListRequest | null | undefined, {} | null | undefined>): void; list(request: protos.google.cloud.sql.v1beta4.ISqlInstancesListRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IInstancesListResponse, protos.google.cloud.sql.v1beta4.ISqlInstancesListRequest | null | undefined, {} | null | undefined>): void; /** * 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. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Cloud SQL instance ID. This does not include the project ID. * @param {string} request.project * Project ID of the project that contains the instance. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.InstancesListServerCasResponse|InstancesListServerCasResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.list_server_cas.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_ListServerCas_async */ listServerCas(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesListServerCasRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IInstancesListServerCasResponse, protos.google.cloud.sql.v1beta4.ISqlInstancesListServerCasRequest | undefined, {} | undefined ]>; listServerCas(request: protos.google.cloud.sql.v1beta4.ISqlInstancesListServerCasRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IInstancesListServerCasResponse, protos.google.cloud.sql.v1beta4.ISqlInstancesListServerCasRequest | null | undefined, {} | null | undefined>): void; listServerCas(request: protos.google.cloud.sql.v1beta4.ISqlInstancesListServerCasRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IInstancesListServerCasResponse, protos.google.cloud.sql.v1beta4.ISqlInstancesListServerCasRequest | null | undefined, {} | null | undefined>): void; /** * Partially updates settings of a Cloud SQL instance by merging the request * with the current configuration. This method supports patch semantics. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Cloud SQL instance ID. This does not include the project ID. * @param {string} request.project * Project ID of the project that contains the instance. * @param {google.cloud.sql.v1beta4.DatabaseInstance} request.body * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.patch.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_Patch_async */ patch(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesPatchRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesPatchRequest | undefined, {} | undefined ]>; patch(request: protos.google.cloud.sql.v1beta4.ISqlInstancesPatchRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesPatchRequest | null | undefined, {} | null | undefined>): void; patch(request: protos.google.cloud.sql.v1beta4.ISqlInstancesPatchRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesPatchRequest | null | undefined, {} | null | undefined>): void; /** * Promotes the read replica instance to be an independent Cloud SQL * primary instance. * Using this operation might cause your instance to restart. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Cloud SQL read replica instance name. * @param {string} request.project * ID of the project that contains the read replica. * @param {boolean} request.failover * Set to true to invoke a replica failover to the designated DR replica. * As part of replica failover, the promote operation attempts * to add the original primary instance as a replica of the promoted * DR replica when the original primary instance comes back online. * If set to false or not specified, then the original primary * instance becomes an independent Cloud SQL primary instance. * Only applicable to MySQL. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.promote_replica.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_PromoteReplica_async */ promoteReplica(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesPromoteReplicaRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesPromoteReplicaRequest | undefined, {} | undefined ]>; promoteReplica(request: protos.google.cloud.sql.v1beta4.ISqlInstancesPromoteReplicaRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesPromoteReplicaRequest | null | undefined, {} | null | undefined>): void; promoteReplica(request: protos.google.cloud.sql.v1beta4.ISqlInstancesPromoteReplicaRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesPromoteReplicaRequest | null | undefined, {} | null | undefined>): void; /** * Switches over from the primary instance to the designated DR replica * instance. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Cloud SQL read replica instance name. * @param {string} request.project * ID of the project that contains the replica. * @param {google.protobuf.Duration} [request.dbTimeout] * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a * sum of all database operations. Default value is 10 minutes and can be * modified to a maximum value of 24 hours. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.switchover.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_Switchover_async */ switchover(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesSwitchoverRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesSwitchoverRequest | undefined, {} | undefined ]>; switchover(request: protos.google.cloud.sql.v1beta4.ISqlInstancesSwitchoverRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesSwitchoverRequest | null | undefined, {} | null | undefined>): void; switchover(request: protos.google.cloud.sql.v1beta4.ISqlInstancesSwitchoverRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesSwitchoverRequest | null | undefined, {} | null | undefined>): void; /** * Deletes all client certificates and generates a new server SSL certificate * for the instance. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Cloud SQL instance ID. This does not include the project ID. * @param {string} request.project * Project ID of the project that contains the instance. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.reset_ssl_config.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_ResetSslConfig_async */ resetSslConfig(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesResetSslConfigRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesResetSslConfigRequest | undefined, {} | undefined ]>; resetSslConfig(request: protos.google.cloud.sql.v1beta4.ISqlInstancesResetSslConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesResetSslConfigRequest | null | undefined, {} | null | undefined>): void; resetSslConfig(request: protos.google.cloud.sql.v1beta4.ISqlInstancesResetSslConfigRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesResetSslConfigRequest | null | undefined, {} | null | undefined>): void; /** * Restarts a Cloud SQL instance. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Cloud SQL instance ID. This does not include the project ID. * @param {string} request.project * Project ID of the project that contains the instance to be restarted. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.restart.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_Restart_async */ restart(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesRestartRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesRestartRequest | undefined, {} | undefined ]>; restart(request: protos.google.cloud.sql.v1beta4.ISqlInstancesRestartRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesRestartRequest | null | undefined, {} | null | undefined>): void; restart(request: protos.google.cloud.sql.v1beta4.ISqlInstancesRestartRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesRestartRequest | null | undefined, {} | null | undefined>): void; /** * Restores a backup of a Cloud SQL instance. Using this operation might cause * your instance to restart. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Cloud SQL instance ID. This does not include the project ID. * @param {string} request.project * Project ID of the project that contains the instance. * @param {google.cloud.sql.v1beta4.InstancesRestoreBackupRequest} request.body * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.restore_backup.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_RestoreBackup_async */ restoreBackup(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesRestoreBackupRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesRestoreBackupRequest | undefined, {} | undefined ]>; restoreBackup(request: protos.google.cloud.sql.v1beta4.ISqlInstancesRestoreBackupRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesRestoreBackupRequest | null | undefined, {} | null | undefined>): void; restoreBackup(request: protos.google.cloud.sql.v1beta4.ISqlInstancesRestoreBackupRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesRestoreBackupRequest | null | undefined, {} | null | undefined>): void; /** * Rotates the server certificate to one signed by the Certificate Authority * (CA) version previously added with the addServerCA method. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Cloud SQL instance ID. This does not include the project ID. * @param {string} request.project * Project ID of the project that contains the instance. * @param {google.cloud.sql.v1beta4.InstancesRotateServerCaRequest} request.body * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.rotate_server_ca.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_RotateServerCa_async */ rotateServerCa(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesRotateServerCaRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesRotateServerCaRequest | undefined, {} | undefined ]>; rotateServerCa(request: protos.google.cloud.sql.v1beta4.ISqlInstancesRotateServerCaRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesRotateServerCaRequest | null | undefined, {} | null | undefined>): void; rotateServerCa(request: protos.google.cloud.sql.v1beta4.ISqlInstancesRotateServerCaRequest, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesRotateServerCaRequest | null | undefined, {} | null | undefined>): void; /** * Starts the replication in the read replica instance. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Cloud SQL read replica instance name. * @param {string} request.project * ID of the project that contains the read replica. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.sql.v1beta4.Operation|Operation}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta4/sql_instances_service.start_replica.js</caption> * region_tag:sqladmin_v1beta4_generated_SqlInstancesService_StartReplica_async */ startReplica(request?: protos.google.cloud.sql.v1beta4.ISqlInstancesStartReplicaRequest, options?: CallOptions): Promise<[ protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesStartReplicaRequest | undefined, {} | undefined ]>; startReplica(request: protos.google.cloud.sql.v1beta4.ISqlInstancesStartReplicaRequest, options: CallOptions, callback: Callback<protos.google.cloud.sql.v1beta4.IOperation, protos.google.cloud.sql.v1beta4.ISqlInstancesStartReplicaRequest | null | undefined, {} | null | undefined>): void; s