@google-cloud/redis
Version:
Google Cloud Memorystore for Redis API client for Node.js
740 lines (739 loc) • 47.2 kB
TypeScript
import type * as gax from 'google-gax';
import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
import { Transform } from 'stream';
import * as protos from '../../protos/protos';
/**
* Configures and manages Cloud Memorystore for Redis instances
*
* Google Cloud Memorystore for Redis v1beta1
*
* The `redis.googleapis.com` service implements the Google Cloud Memorystore
* for Redis API and defines the following resource model for managing Redis
* instances:
* * The service works with a collection of cloud projects, named: `/projects/*`
* * Each project has a collection of available locations, named: `/locations/*`
* * Each location has a collection of Redis instances, named: `/instances/*`
* * As such, Redis instances are resources of the form:
* `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
*
* Note that location_id must be referring to a GCP `region`; for example:
* * `projects/redpepper-1290/locations/us-central1/instances/my-redis`
* @class
* @memberof v1beta1
*/
export declare class CloudRedisClient {
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;
};
pathTemplates: {
[name: string]: gax.PathTemplate;
};
operationsClient: gax.OperationsClient;
cloudRedisStub?: Promise<{
[name: string]: Function;
}>;
/**
* Construct an instance of CloudRedisClient.
*
* @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 CloudRedisClient({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;
/**
* Gets the details of a specific Redis instance.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Redis instance resource name using the form:
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
* where `location_id` refers to a GCP region.
* @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.redis.v1beta1.Instance|Instance}.
* 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/v1beta1/cloud_redis.get_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_GetInstance_async
*/
getInstance(request?: protos.google.cloud.redis.v1beta1.IGetInstanceRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.v1beta1.IInstance,
protos.google.cloud.redis.v1beta1.IGetInstanceRequest | undefined,
{} | undefined
]>;
getInstance(request: protos.google.cloud.redis.v1beta1.IGetInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.redis.v1beta1.IInstance, protos.google.cloud.redis.v1beta1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
getInstance(request: protos.google.cloud.redis.v1beta1.IGetInstanceRequest, callback: Callback<protos.google.cloud.redis.v1beta1.IInstance, protos.google.cloud.redis.v1beta1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
/**
* Gets the AUTH string for a Redis instance. If AUTH is not enabled for the
* instance the response will be empty. This information is not included in
* the details returned to GetInstance.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Redis instance resource name using the form:
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
* where `location_id` refers to a GCP region.
* @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.redis.v1beta1.InstanceAuthString|InstanceAuthString}.
* 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/v1beta1/cloud_redis.get_instance_auth_string.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_GetInstanceAuthString_async
*/
getInstanceAuthString(request?: protos.google.cloud.redis.v1beta1.IGetInstanceAuthStringRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.v1beta1.IInstanceAuthString,
(protos.google.cloud.redis.v1beta1.IGetInstanceAuthStringRequest | undefined),
{} | undefined
]>;
getInstanceAuthString(request: protos.google.cloud.redis.v1beta1.IGetInstanceAuthStringRequest, options: CallOptions, callback: Callback<protos.google.cloud.redis.v1beta1.IInstanceAuthString, protos.google.cloud.redis.v1beta1.IGetInstanceAuthStringRequest | null | undefined, {} | null | undefined>): void;
getInstanceAuthString(request: protos.google.cloud.redis.v1beta1.IGetInstanceAuthStringRequest, callback: Callback<protos.google.cloud.redis.v1beta1.IInstanceAuthString, protos.google.cloud.redis.v1beta1.IGetInstanceAuthStringRequest | null | undefined, {} | null | undefined>): void;
/**
* Creates a Redis instance based on the specified tier and memory size.
*
* By default, the instance is accessible from the project's
* [default network](https://cloud.google.com/vpc/docs/vpc).
*
* The creation is executed asynchronously and callers may check the returned
* operation to track its progress. Once the operation is completed the Redis
* instance will be fully functional. The completed longrunning.Operation will
* contain the new instance object in the response field.
*
* The returned operation is automatically deleted after a few hours, so there
* is no need to call DeleteOperation.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The resource name of the instance location using the form:
* `projects/{project_id}/locations/{location_id}`
* where `location_id` refers to a GCP region.
* @param {string} request.instanceId
* Required. The logical name of the Redis instance in the customer project
* with the following restrictions:
*
* * Must contain only lowercase letters, numbers, and hyphens.
* * Must start with a letter.
* * Must be between 1-40 characters.
* * Must end with a number or a letter.
* * Must be unique within the customer project / location
* @param {google.cloud.redis.v1beta1.Instance} request.instance
* Required. A Redis [Instance] resource
* @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
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.create_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_CreateInstance_async
*/
createInstance(request?: protos.google.cloud.redis.v1beta1.ICreateInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
createInstance(request: protos.google.cloud.redis.v1beta1.ICreateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
createInstance(request: protos.google.cloud.redis.v1beta1.ICreateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `createInstance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.create_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_CreateInstance_async
*/
checkCreateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.redis.v1beta1.Instance, protos.google.protobuf.Any>>;
/**
* Updates the metadata and configuration of a specific Redis instance.
*
* Completed longrunning.Operation will contain the new instance object
* in the response field. The returned operation is automatically deleted
* after a few hours, so there is no need to call DeleteOperation.
*
* @param {Object} request
* The request object that will be sent.
* @param {google.protobuf.FieldMask} request.updateMask
* Required. Mask of fields to update. At least one path must be supplied in
* this field. The elements of the repeated paths field may only include these
* fields from {@link protos.google.cloud.redis.v1beta1.Instance|Instance}:
*
* * `displayName`
* * `labels`
* * `memorySizeGb`
* * `redisConfig`
* * `replica_count`
* @param {google.cloud.redis.v1beta1.Instance} request.instance
* Required. Update description.
* Only fields specified in update_mask are updated.
* @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
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.update_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_UpdateInstance_async
*/
updateInstance(request?: protos.google.cloud.redis.v1beta1.IUpdateInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
updateInstance(request: protos.google.cloud.redis.v1beta1.IUpdateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
updateInstance(request: protos.google.cloud.redis.v1beta1.IUpdateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `updateInstance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.update_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_UpdateInstance_async
*/
checkUpdateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.redis.v1beta1.Instance, protos.google.protobuf.Any>>;
/**
* Upgrades Redis instance to the newer Redis version specified in the
* request.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Redis instance resource name using the form:
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
* where `location_id` refers to a GCP region.
* @param {string} request.redisVersion
* Required. Specifies the target version of Redis software to upgrade to.
* @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
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.upgrade_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_UpgradeInstance_async
*/
upgradeInstance(request?: protos.google.cloud.redis.v1beta1.IUpgradeInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
upgradeInstance(request: protos.google.cloud.redis.v1beta1.IUpgradeInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
upgradeInstance(request: protos.google.cloud.redis.v1beta1.IUpgradeInstanceRequest, callback: Callback<LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `upgradeInstance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.upgrade_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_UpgradeInstance_async
*/
checkUpgradeInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.redis.v1beta1.Instance, protos.google.protobuf.Any>>;
/**
* Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.
*
* Redis may stop serving during this operation. Instance state will be
* IMPORTING for entire operation. When complete, the instance will contain
* only data from the imported file.
*
* The returned operation is automatically deleted after a few hours, so
* there is no need to call DeleteOperation.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Redis instance resource name using the form:
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
* where `location_id` refers to a GCP region.
* @param {google.cloud.redis.v1beta1.InputConfig} request.inputConfig
* Required. Specify data to be imported.
* @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
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.import_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_ImportInstance_async
*/
importInstance(request?: protos.google.cloud.redis.v1beta1.IImportInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
importInstance(request: protos.google.cloud.redis.v1beta1.IImportInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
importInstance(request: protos.google.cloud.redis.v1beta1.IImportInstanceRequest, callback: Callback<LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `importInstance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.import_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_ImportInstance_async
*/
checkImportInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.redis.v1beta1.Instance, protos.google.protobuf.Any>>;
/**
* Export Redis instance data into a Redis RDB format file in Cloud Storage.
*
* Redis will continue serving during this operation.
*
* The returned operation is automatically deleted after a few hours, so
* there is no need to call DeleteOperation.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Redis instance resource name using the form:
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
* where `location_id` refers to a GCP region.
* @param {google.cloud.redis.v1beta1.OutputConfig} request.outputConfig
* Required. Specify data to be exported.
* @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
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.export_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_ExportInstance_async
*/
exportInstance(request?: protos.google.cloud.redis.v1beta1.IExportInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
exportInstance(request: protos.google.cloud.redis.v1beta1.IExportInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
exportInstance(request: protos.google.cloud.redis.v1beta1.IExportInstanceRequest, callback: Callback<LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `exportInstance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.export_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_ExportInstance_async
*/
checkExportInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.redis.v1beta1.Instance, protos.google.protobuf.Any>>;
/**
* Initiates a failover of the primary node to current replica node for a
* specific STANDARD tier Cloud Memorystore for Redis instance.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Redis instance resource name using the form:
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
* where `location_id` refers to a GCP region.
* @param {google.cloud.redis.v1beta1.FailoverInstanceRequest.DataProtectionMode} [request.dataProtectionMode]
* Optional. Available data protection modes that the user can choose. If it's
* unspecified, data protection mode will be LIMITED_DATA_LOSS by default.
* @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
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.failover_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_FailoverInstance_async
*/
failoverInstance(request?: protos.google.cloud.redis.v1beta1.IFailoverInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
failoverInstance(request: protos.google.cloud.redis.v1beta1.IFailoverInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
failoverInstance(request: protos.google.cloud.redis.v1beta1.IFailoverInstanceRequest, callback: Callback<LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `failoverInstance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.failover_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_FailoverInstance_async
*/
checkFailoverInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.redis.v1beta1.Instance, protos.google.protobuf.Any>>;
/**
* Deletes a specific Redis instance. Instance stops serving and data is
* deleted.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Redis instance resource name using the form:
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
* where `location_id` refers to a GCP region.
* @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
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.delete_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_DeleteInstance_async
*/
deleteInstance(request?: protos.google.cloud.redis.v1beta1.IDeleteInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
deleteInstance(request: protos.google.cloud.redis.v1beta1.IDeleteInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
deleteInstance(request: protos.google.cloud.redis.v1beta1.IDeleteInstanceRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `deleteInstance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.delete_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_DeleteInstance_async
*/
checkDeleteInstanceProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.protobuf.Any>>;
/**
* Reschedule maintenance for a given instance in a given project and
* location.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Redis instance resource name using the form:
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
* where `location_id` refers to a GCP region.
* @param {google.cloud.redis.v1beta1.RescheduleMaintenanceRequest.RescheduleType} request.rescheduleType
* Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
* @param {google.protobuf.Timestamp} [request.scheduleTime]
* Optional. Timestamp when the maintenance shall be rescheduled to if
* reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for
* example `2012-11-15T16:19:00.094Z`.
* @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
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.reschedule_maintenance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_RescheduleMaintenance_async
*/
rescheduleMaintenance(request?: protos.google.cloud.redis.v1beta1.IRescheduleMaintenanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
rescheduleMaintenance(request: protos.google.cloud.redis.v1beta1.IRescheduleMaintenanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
rescheduleMaintenance(request: protos.google.cloud.redis.v1beta1.IRescheduleMaintenanceRequest, callback: Callback<LROperation<protos.google.cloud.redis.v1beta1.IInstance, protos.google.protobuf.IAny>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `rescheduleMaintenance()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.reschedule_maintenance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_RescheduleMaintenance_async
*/
checkRescheduleMaintenanceProgress(name: string): Promise<LROperation<protos.google.cloud.redis.v1beta1.Instance, protos.google.protobuf.Any>>;
/**
* Lists all Redis instances owned by a project in either the specified
* location (region) or all locations.
*
* The location should have the following format:
*
* * `projects/{project_id}/locations/{location_id}`
*
* If `location_id` is specified as `-` (wildcard), then all regions
* available to the project are queried, and the results are aggregated.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The resource name of the instance location using the form:
* `projects/{project_id}/locations/{location_id}`
* where `location_id` refers to a GCP region.
* @param {number} request.pageSize
* The maximum number of items to return.
*
* If not specified, a default value of 1000 will be used by the service.
* Regardless of the page_size value, the response may include a partial list
* and a caller should only rely on response's
* {@link protos.google.cloud.redis.v1beta1.ListInstancesResponse.next_page_token|`next_page_token`}
* to determine if there are more instances left to be queried.
* @param {string} request.pageToken
* The `next_page_token` value returned from a previous
* {@link protos.google.cloud.redis.v1beta1.CloudRedis.ListInstances|ListInstances} request, if any.
* @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 Array of {@link protos.google.cloud.redis.v1beta1.Instance|Instance}.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed and will merge results from all the pages into this array.
* Note that it can affect your quota.
* We recommend using `listInstancesAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listInstances(request?: protos.google.cloud.redis.v1beta1.IListInstancesRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.v1beta1.IInstance[],
protos.google.cloud.redis.v1beta1.IListInstancesRequest | null,
protos.google.cloud.redis.v1beta1.IListInstancesResponse
]>;
listInstances(request: protos.google.cloud.redis.v1beta1.IListInstancesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.redis.v1beta1.IListInstancesRequest, protos.google.cloud.redis.v1beta1.IListInstancesResponse | null | undefined, protos.google.cloud.redis.v1beta1.IInstance>): void;
listInstances(request: protos.google.cloud.redis.v1beta1.IListInstancesRequest, callback: PaginationCallback<protos.google.cloud.redis.v1beta1.IListInstancesRequest, protos.google.cloud.redis.v1beta1.IListInstancesResponse | null | undefined, protos.google.cloud.redis.v1beta1.IInstance>): void;
/**
* Equivalent to `listInstances`, but returns a NodeJS Stream object.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The resource name of the instance location using the form:
* `projects/{project_id}/locations/{location_id}`
* where `location_id` refers to a GCP region.
* @param {number} request.pageSize
* The maximum number of items to return.
*
* If not specified, a default value of 1000 will be used by the service.
* Regardless of the page_size value, the response may include a partial list
* and a caller should only rely on response's
* {@link protos.google.cloud.redis.v1beta1.ListInstancesResponse.next_page_token|`next_page_token`}
* to determine if there are more instances left to be queried.
* @param {string} request.pageToken
* The `next_page_token` value returned from a previous
* {@link protos.google.cloud.redis.v1beta1.CloudRedis.ListInstances|ListInstances} request, if any.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Stream}
* An object stream which emits an object representing {@link protos.google.cloud.redis.v1beta1.Instance|Instance} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listInstancesAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listInstancesStream(request?: protos.google.cloud.redis.v1beta1.IListInstancesRequest, options?: CallOptions): Transform;
/**
* Equivalent to `listInstances`, but returns an iterable object.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The resource name of the instance location using the form:
* `projects/{project_id}/locations/{location_id}`
* where `location_id` refers to a GCP region.
* @param {number} request.pageSize
* The maximum number of items to return.
*
* If not specified, a default value of 1000 will be used by the service.
* Regardless of the page_size value, the response may include a partial list
* and a caller should only rely on response's
* {@link protos.google.cloud.redis.v1beta1.ListInstancesResponse.next_page_token|`next_page_token`}
* to determine if there are more instances left to be queried.
* @param {string} request.pageToken
* The `next_page_token` value returned from a previous
* {@link protos.google.cloud.redis.v1beta1.CloudRedis.ListInstances|ListInstances} request, if any.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Object}
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
* When you iterate the returned iterable, each element will be an object representing
* {@link protos.google.cloud.redis.v1beta1.Instance|Instance}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v1beta1/cloud_redis.list_instances.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_ListInstances_async
*/
listInstancesAsync(request?: protos.google.cloud.redis.v1beta1.IListInstancesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.redis.v1beta1.IInstance>;
/**
* Return a fully-qualified instance resource name string.
*
* @param {string} project
* @param {string} location
* @param {string} instance
* @returns {string} Resource name string.
*/
instancePath(project: string, location: string, instance: string): string;
/**
* Parse the project from Instance resource.
*
* @param {string} instanceName
* A fully-qualified path representing Instance resource.
* @returns {string} A string representing the project.
*/
matchProjectFromInstanceName(instanceName: string): string | number;
/**
* Parse the location from Instance resource.
*
* @param {string} instanceName
* A fully-qualified path representing Instance resource.
* @returns {string} A string representing the location.
*/
matchLocationFromInstanceName(instanceName: string): string | number;
/**
* Parse the instance from Instance resource.
*
* @param {string} instanceName
* A fully-qualified path representing Instance resource.
* @returns {string} A string representing the instance.
*/
matchInstanceFromInstanceName(instanceName: string): string | number;
/**
* Return a fully-qualified location resource name string.
*
* @param {string} project
* @param {string} location
* @returns {string} Resource name string.
*/
locationPath(project: string, location: string): string;
/**
* Parse the project from Location resource.
*
* @param {string} locationName
* A fully-qualified path representing Location resource.
* @returns {string} A string representing the project.
*/
matchProjectFromLocationName(locationName: string): string | number;
/**
* Parse the location from Location resource.
*
* @param {string} locationName
* A fully-qualified path representing Location resource.
* @returns {string} A string representing the location.
*/
matchLocationFromLocationName(locationName: string): string | number;
/**
* Terminate the gRPC channel and close the client.
*
* The client will no longer be usable and all future behavior is undefined.
* @returns {Promise} A promise that resolves when the client is closed.
*/
close(): Promise<void>;
}