Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@google-cloud/redis

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/redis - npm Package Compare versions

Comparing version 2.4.0 to 3.0.0

10

build/src/v1/cloud_redis_client_config.json

@@ -33,2 +33,7 @@ {

},
"GetInstanceAuthString": {
"timeout_millis": 600000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
},
"CreateInstance": {

@@ -68,2 +73,7 @@ "timeout_millis": 600000,

"retry_params_name": "default"
},
"RescheduleMaintenance": {
"timeout_millis": 600000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
}

@@ -70,0 +80,0 @@ }

452

build/src/v1/cloud_redis_client.d.ts

@@ -119,6 +119,104 @@ /// <reference types="node" />

getProjectId(callback: Callback<string, undefined, undefined>): void;
getInstance(request?: protos.google.cloud.redis.v1.IGetInstanceRequest, options?: CallOptions): Promise<[protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IGetInstanceRequest | undefined, {} | undefined]>;
/**
* 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 [Instance]{@link google.cloud.redis.v1.Instance}.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
* @example <caption>include:samples/generated/v1/cloud_redis.get_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_GetInstance_async
*/
getInstance(request?: protos.google.cloud.redis.v1.IGetInstanceRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.v1.IInstance,
protos.google.cloud.redis.v1.IGetInstanceRequest | undefined,
{} | undefined
]>;
getInstance(request: protos.google.cloud.redis.v1.IGetInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
getInstance(request: protos.google.cloud.redis.v1.IGetInstanceRequest, callback: Callback<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
createInstance(request?: protos.google.cloud.redis.v1.ICreateInstanceRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
/**
* 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 [InstanceAuthString]{@link google.cloud.redis.v1.InstanceAuthString}.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
* @example <caption>include:samples/generated/v1/cloud_redis.get_instance_auth_string.js</caption>
* region_tag:redis_v1_generated_CloudRedis_GetInstanceAuthString_async
*/
getInstanceAuthString(request?: protos.google.cloud.redis.v1.IGetInstanceAuthStringRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.v1.IInstanceAuthString,
protos.google.cloud.redis.v1.IGetInstanceAuthStringRequest | undefined,
{} | undefined
]>;
getInstanceAuthString(request: protos.google.cloud.redis.v1.IGetInstanceAuthStringRequest, options: CallOptions, callback: Callback<protos.google.cloud.redis.v1.IInstanceAuthString, protos.google.cloud.redis.v1.IGetInstanceAuthStringRequest | null | undefined, {} | null | undefined>): void;
getInstanceAuthString(request: protos.google.cloud.redis.v1.IGetInstanceAuthStringRequest, callback: Callback<protos.google.cloud.redis.v1.IInstanceAuthString, protos.google.cloud.redis.v1.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. 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.v1.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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example <caption>include:samples/generated/v1/cloud_redis.create_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_CreateInstance_async
*/
createInstance(request?: protos.google.cloud.redis.v1.ICreateInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
createInstance(request: protos.google.cloud.redis.v1.ICreateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

@@ -135,10 +233,45 @@ createInstance(request: protos.google.cloud.redis.v1.ICreateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

* for more details and examples.
* @example
* const decodedOperation = await checkCreateInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1/cloud_redis.create_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_CreateInstance_async
*/
checkCreateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.redis.v1.Instance, protos.google.cloud.redis.v1.OperationMetadata>>;
updateInstance(request?: protos.google.cloud.redis.v1.IUpdateInstanceRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
/**
* 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 google.cloud.redis.v1.Instance|Instance}:
*
* * `displayName`
* * `labels`
* * `memorySizeGb`
* * `redisConfig`
* * `replica_count`
* @param {google.cloud.redis.v1.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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example <caption>include:samples/generated/v1/cloud_redis.update_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_UpdateInstance_async
*/
updateInstance(request?: protos.google.cloud.redis.v1.IUpdateInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
updateInstance(request: protos.google.cloud.redis.v1.IUpdateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

@@ -155,10 +288,35 @@ updateInstance(request: protos.google.cloud.redis.v1.IUpdateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

* for more details and examples.
* @example
* const decodedOperation = await checkUpdateInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1/cloud_redis.update_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_UpdateInstance_async
*/
checkUpdateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.redis.v1.Instance, protos.google.cloud.redis.v1.OperationMetadata>>;
upgradeInstance(request?: protos.google.cloud.redis.v1.IUpgradeInstanceRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
/**
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example <caption>include:samples/generated/v1/cloud_redis.upgrade_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_UpgradeInstance_async
*/
upgradeInstance(request?: protos.google.cloud.redis.v1.IUpgradeInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
upgradeInstance(request: protos.google.cloud.redis.v1.IUpgradeInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

@@ -175,10 +333,41 @@ upgradeInstance(request: protos.google.cloud.redis.v1.IUpgradeInstanceRequest, callback: Callback<LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

* for more details and examples.
* @example
* const decodedOperation = await checkUpgradeInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1/cloud_redis.upgrade_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_UpgradeInstance_async
*/
checkUpgradeInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.redis.v1.Instance, protos.google.cloud.redis.v1.OperationMetadata>>;
importInstance(request?: protos.google.cloud.redis.v1.IImportInstanceRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
/**
* 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.v1.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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example <caption>include:samples/generated/v1/cloud_redis.import_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_ImportInstance_async
*/
importInstance(request?: protos.google.cloud.redis.v1.IImportInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
importInstance(request: protos.google.cloud.redis.v1.IImportInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

@@ -195,10 +384,39 @@ importInstance(request: protos.google.cloud.redis.v1.IImportInstanceRequest, callback: Callback<LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

* for more details and examples.
* @example
* const decodedOperation = await checkImportInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1/cloud_redis.import_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_ImportInstance_async
*/
checkImportInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.redis.v1.Instance, protos.google.cloud.redis.v1.OperationMetadata>>;
exportInstance(request?: protos.google.cloud.redis.v1.IExportInstanceRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
/**
* 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.v1.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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example <caption>include:samples/generated/v1/cloud_redis.export_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_ExportInstance_async
*/
exportInstance(request?: protos.google.cloud.redis.v1.IExportInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
exportInstance(request: protos.google.cloud.redis.v1.IExportInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

@@ -215,10 +433,36 @@ exportInstance(request: protos.google.cloud.redis.v1.IExportInstanceRequest, callback: Callback<LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

* for more details and examples.
* @example
* const decodedOperation = await checkExportInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1/cloud_redis.export_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_ExportInstance_async
*/
checkExportInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.redis.v1.Instance, protos.google.cloud.redis.v1.OperationMetadata>>;
failoverInstance(request?: protos.google.cloud.redis.v1.IFailoverInstanceRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
/**
* 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.v1.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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example <caption>include:samples/generated/v1/cloud_redis.failover_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_FailoverInstance_async
*/
failoverInstance(request?: protos.google.cloud.redis.v1.IFailoverInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
failoverInstance(request: protos.google.cloud.redis.v1.IFailoverInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

@@ -235,10 +479,33 @@ failoverInstance(request: protos.google.cloud.redis.v1.IFailoverInstanceRequest, callback: Callback<LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

* for more details and examples.
* @example
* const decodedOperation = await checkFailoverInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1/cloud_redis.failover_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_FailoverInstance_async
*/
checkFailoverInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.redis.v1.Instance, protos.google.cloud.redis.v1.OperationMetadata>>;
deleteInstance(request?: protos.google.cloud.redis.v1.IDeleteInstanceRequest, options?: CallOptions): Promise<[LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
/**
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example <caption>include:samples/generated/v1/cloud_redis.delete_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_DeleteInstance_async
*/
deleteInstance(request?: protos.google.cloud.redis.v1.IDeleteInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
deleteInstance(request: protos.google.cloud.redis.v1.IDeleteInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

@@ -255,10 +522,100 @@ deleteInstance(request: protos.google.cloud.redis.v1.IDeleteInstanceRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

* for more details and examples.
* @example
* const decodedOperation = await checkDeleteInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1/cloud_redis.delete_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_DeleteInstance_async
*/
checkDeleteInstanceProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.redis.v1.OperationMetadata>>;
listInstances(request?: protos.google.cloud.redis.v1.IListInstancesRequest, options?: CallOptions): Promise<[protos.google.cloud.redis.v1.IInstance[], protos.google.cloud.redis.v1.IListInstancesRequest | null, protos.google.cloud.redis.v1.IListInstancesResponse]>;
/**
* 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.v1.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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example <caption>include:samples/generated/v1/cloud_redis.reschedule_maintenance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_RescheduleMaintenance_async
*/
rescheduleMaintenance(request?: protos.google.cloud.redis.v1.IRescheduleMaintenanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
rescheduleMaintenance(request: protos.google.cloud.redis.v1.IRescheduleMaintenanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
rescheduleMaintenance(request: protos.google.cloud.redis.v1.IRescheduleMaintenanceRequest, callback: Callback<LROperation<protos.google.cloud.redis.v1.IInstance, protos.google.cloud.redis.v1.IOperationMetadata>, 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example <caption>include:samples/generated/v1/cloud_redis.reschedule_maintenance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_RescheduleMaintenance_async
*/
checkRescheduleMaintenanceProgress(name: string): Promise<LROperation<protos.google.cloud.redis.v1.Instance, protos.google.cloud.redis.v1.OperationMetadata>>;
/**
* 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 google.cloud.redis.v1.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 google.cloud.redis.v1.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 [Instance]{@link google.cloud.redis.v1.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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
listInstances(request?: protos.google.cloud.redis.v1.IListInstancesRequest, options?: CallOptions): Promise<[
protos.google.cloud.redis.v1.IInstance[],
protos.google.cloud.redis.v1.IListInstancesRequest | null,
protos.google.cloud.redis.v1.IListInstancesResponse
]>;
listInstances(request: protos.google.cloud.redis.v1.IListInstancesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.redis.v1.IListInstancesRequest, protos.google.cloud.redis.v1.IListInstancesResponse | null | undefined, protos.google.cloud.redis.v1.IInstance>): void;

@@ -329,7 +686,4 @@ listInstances(request: protos.google.cloud.redis.v1.IListInstancesRequest, callback: PaginationCallback<protos.google.cloud.redis.v1.IListInstancesRequest, protos.google.cloud.redis.v1.IListInstancesResponse | null | undefined, protos.google.cloud.redis.v1.IInstance>): void;

* for more details and examples.
* @example
* const iterable = client.listInstancesAsync(request);
* for await (const response of iterable) {
* // process response
* }
* @example <caption>include:samples/generated/v1/cloud_redis.list_instances.js</caption>
* region_tag:redis_v1_generated_CloudRedis_ListInstances_async
*/

@@ -336,0 +690,0 @@ listInstancesAsync(request?: protos.google.cloud.redis.v1.IListInstancesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.redis.v1.IInstance>;

390

build/src/v1/cloud_redis_client.js
"use strict";
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//

@@ -179,2 +179,4 @@ // Licensed under the Apache License, Version 2.0 (the "License");

const deleteInstanceMetadata = protoFilesRoot.lookup('.google.cloud.redis.v1.OperationMetadata');
const rescheduleMaintenanceResponse = protoFilesRoot.lookup('.google.cloud.redis.v1.Instance');
const rescheduleMaintenanceMetadata = protoFilesRoot.lookup('.google.cloud.redis.v1.OperationMetadata');
this.descriptors.longrunning = {

@@ -188,2 +190,3 @@ createInstance: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createInstanceResponse.decode.bind(createInstanceResponse), createInstanceMetadata.decode.bind(createInstanceMetadata)),

deleteInstance: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteInstanceResponse.decode.bind(deleteInstanceResponse), deleteInstanceMetadata.decode.bind(deleteInstanceMetadata)),
rescheduleMaintenance: new this._gaxModule.LongrunningDescriptor(this.operationsClient, rescheduleMaintenanceResponse.decode.bind(rescheduleMaintenanceResponse), rescheduleMaintenanceMetadata.decode.bind(rescheduleMaintenanceMetadata)),
};

@@ -226,2 +229,3 @@ // Put together the default options sent with requests.

'getInstance',
'getInstanceAuthString',
'createInstance',

@@ -234,2 +238,3 @@ 'updateInstance',

'deleteInstance',
'rescheduleMaintenance',
];

@@ -295,21 +300,2 @@ for (const methodName of cloudRedisStubMethods) {

}
/**
* 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 [Instance]{@link google.cloud.redis.v1.Instance}.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
* @example
* const [response] = await client.getInstance(request);
*/
getInstance(request, optionsOrCallback, callback) {

@@ -335,46 +321,22 @@ request = request || {};

}
/**
* 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. 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.v1.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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example
* const [operation] = await client.createInstance(request);
* const [response] = await operation.promise();
*/
getInstanceAuthString(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
return this.innerApiCalls.getInstanceAuthString(request, options, callback);
}
createInstance(request, optionsOrCallback, callback) {

@@ -409,7 +371,4 @@ request = request || {};

* for more details and examples.
* @example
* const decodedOperation = await checkCreateInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1/cloud_redis.create_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_CreateInstance_async
*/

@@ -422,37 +381,2 @@ async checkCreateInstanceProgress(name) {

}
/**
* 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 google.cloud.redis.v1.Instance|Instance}:
*
* * `displayName`
* * `labels`
* * `memorySizeGb`
* * `redisConfig`
* * `replica_count`
* @param {google.cloud.redis.v1.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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example
* const [operation] = await client.updateInstance(request);
* const [response] = await operation.promise();
*/
updateInstance(request, optionsOrCallback, callback) {

@@ -487,7 +411,4 @@ request = request || {};

* for more details and examples.
* @example
* const decodedOperation = await checkUpdateInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1/cloud_redis.update_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_UpdateInstance_async
*/

@@ -500,27 +421,2 @@ async checkUpdateInstanceProgress(name) {

}
/**
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example
* const [operation] = await client.upgradeInstance(request);
* const [response] = await operation.promise();
*/
upgradeInstance(request, optionsOrCallback, callback) {

@@ -555,7 +451,4 @@ request = request || {};

* for more details and examples.
* @example
* const decodedOperation = await checkUpgradeInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1/cloud_redis.upgrade_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_UpgradeInstance_async
*/

@@ -568,33 +461,2 @@ async checkUpgradeInstanceProgress(name) {

}
/**
* 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.v1.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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example
* const [operation] = await client.importInstance(request);
* const [response] = await operation.promise();
*/
importInstance(request, optionsOrCallback, callback) {

@@ -629,7 +491,4 @@ request = request || {};

* for more details and examples.
* @example
* const decodedOperation = await checkImportInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1/cloud_redis.import_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_ImportInstance_async
*/

@@ -642,31 +501,2 @@ async checkImportInstanceProgress(name) {

}
/**
* 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.v1.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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example
* const [operation] = await client.exportInstance(request);
* const [response] = await operation.promise();
*/
exportInstance(request, optionsOrCallback, callback) {

@@ -701,7 +531,4 @@ request = request || {};

* for more details and examples.
* @example
* const decodedOperation = await checkExportInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1/cloud_redis.export_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_ExportInstance_async
*/

@@ -714,28 +541,2 @@ async checkExportInstanceProgress(name) {

}
/**
* 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.v1.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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example
* const [operation] = await client.failoverInstance(request);
* const [response] = await operation.promise();
*/
failoverInstance(request, optionsOrCallback, callback) {

@@ -770,7 +571,4 @@ request = request || {};

* for more details and examples.
* @example
* const decodedOperation = await checkFailoverInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1/cloud_redis.failover_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_FailoverInstance_async
*/

@@ -783,25 +581,2 @@ async checkFailoverInstanceProgress(name) {

}
/**
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example
* const [operation] = await client.deleteInstance(request);
* const [response] = await operation.promise();
*/
deleteInstance(request, optionsOrCallback, callback) {

@@ -836,7 +611,4 @@ request = request || {};

* for more details and examples.
* @example
* const decodedOperation = await checkDeleteInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1/cloud_redis.delete_instance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_DeleteInstance_async
*/

@@ -849,43 +621,40 @@ async checkDeleteInstanceProgress(name) {

}
rescheduleMaintenance(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
return this.innerApiCalls.rescheduleMaintenance(request, options, callback);
}
/**
* 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 google.cloud.redis.v1.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 google.cloud.redis.v1.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 [Instance]{@link google.cloud.redis.v1.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.
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example <caption>include:samples/generated/v1/cloud_redis.reschedule_maintenance.js</caption>
* region_tag:redis_v1_generated_CloudRedis_RescheduleMaintenance_async
*/
async checkRescheduleMaintenanceProgress(name) {
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
const [operation] = await this.operationsClient.getOperation(request);
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.rescheduleMaintenance, gax.createDefaultBackoffSettings());
return decodeOperation;
}
listInstances(request, optionsOrCallback, callback) {

@@ -987,7 +756,4 @@ request = request || {};

* for more details and examples.
* @example
* const iterable = client.listInstancesAsync(request);
* for await (const response of iterable) {
* // process response
* }
* @example <caption>include:samples/generated/v1/cloud_redis.list_instances.js</caption>
* region_tag:redis_v1_generated_CloudRedis_ListInstances_async
*/

@@ -1003,3 +769,2 @@ listInstancesAsync(request, options) {

});
options = options || {};
const defaultCallSettings = this._defaults['listInstances'];

@@ -1098,4 +863,3 @@ const callSettings = defaultCallSettings.merge(options);

close() {
this.initialize();
if (!this._terminated) {
if (this.cloudRedisStub && !this._terminated) {
return this.cloudRedisStub.then(stub => {

@@ -1102,0 +866,0 @@ this._terminated = true;

"use strict";
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//

@@ -20,4 +20,5 @@ // Licensed under the Apache License, Version 2.0 (the "License");

Object.defineProperty(exports, "__esModule", { value: true });
exports.CloudRedisClient = void 0;
var cloud_redis_client_1 = require("./cloud_redis_client");
Object.defineProperty(exports, "CloudRedisClient", { enumerable: true, get: function () { return cloud_redis_client_1.CloudRedisClient; } });
//# sourceMappingURL=index.js.map

@@ -33,2 +33,7 @@ {

},
"GetInstanceAuthString": {
"timeout_millis": 600000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
},
"CreateInstance": {

@@ -68,2 +73,6 @@ "timeout_millis": 600000,

"retry_params_name": "default"
},
"RescheduleMaintenance": {
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
}

@@ -70,0 +79,0 @@ }

@@ -20,3 +20,3 @@ /// <reference types="node" />

*
* Note that location_id must be refering to a GCP `region`; for example:
* Note that location_id must be referring to a GCP `region`; for example:
* * `projects/redpepper-1290/locations/us-central1/instances/my-redis`

@@ -120,6 +120,104 @@ * @class

getProjectId(callback: Callback<string, undefined, undefined>): void;
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]>;
/**
* 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 [Instance]{@link google.cloud.redis.v1beta1.Instance}.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* 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;
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]>;
/**
* 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 [InstanceAuthString]{@link google.cloud.redis.v1beta1.InstanceAuthString}.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* 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;

@@ -136,10 +234,45 @@ 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;

* for more details and examples.
* @example
* const decodedOperation = await checkCreateInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @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>>;
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]>;
/**
* 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 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* 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;

@@ -156,10 +289,35 @@ 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;

* for more details and examples.
* @example
* const decodedOperation = await checkUpdateInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @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>>;
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]>;
/**
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* 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;

@@ -176,10 +334,41 @@ 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;

* for more details and examples.
* @example
* const decodedOperation = await checkUpgradeInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @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>>;
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]>;
/**
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* 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;

@@ -196,10 +385,39 @@ 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;

* for more details and examples.
* @example
* const decodedOperation = await checkImportInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @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>>;
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]>;
/**
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* 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;

@@ -216,10 +434,36 @@ 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;

* for more details and examples.
* @example
* const decodedOperation = await checkExportInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @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>>;
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]>;
/**
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* 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;

@@ -236,10 +480,33 @@ 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;

* for more details and examples.
* @example
* const decodedOperation = await checkFailoverInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @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>>;
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]>;
/**
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* 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;

@@ -256,10 +523,100 @@ 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;

* for more details and examples.
* @example
* const decodedOperation = await checkDeleteInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @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>>;
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]>;
/**
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* 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 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 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 [Instance]{@link google.cloud.redis.v1beta1.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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* 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;

@@ -330,7 +687,4 @@ 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;

* for more details and examples.
* @example
* const iterable = client.listInstancesAsync(request);
* for await (const response of iterable) {
* // process response
* }
* @example <caption>include:samples/generated/v1beta1/cloud_redis.list_instances.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_ListInstances_async
*/

@@ -337,0 +691,0 @@ listInstancesAsync(request?: protos.google.cloud.redis.v1beta1.IListInstancesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.redis.v1beta1.IInstance>;

"use strict";
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//

@@ -46,3 +46,3 @@ // Licensed under the Apache License, Version 2.0 (the "License");

*
* Note that location_id must be refering to a GCP `region`; for example:
* Note that location_id must be referring to a GCP `region`; for example:
* * `projects/redpepper-1290/locations/us-central1/instances/my-redis`

@@ -180,2 +180,4 @@ * @class

const deleteInstanceMetadata = protoFilesRoot.lookup('.google.protobuf.Any');
const rescheduleMaintenanceResponse = protoFilesRoot.lookup('.google.cloud.redis.v1beta1.Instance');
const rescheduleMaintenanceMetadata = protoFilesRoot.lookup('.google.protobuf.Any');
this.descriptors.longrunning = {

@@ -189,2 +191,3 @@ createInstance: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createInstanceResponse.decode.bind(createInstanceResponse), createInstanceMetadata.decode.bind(createInstanceMetadata)),

deleteInstance: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteInstanceResponse.decode.bind(deleteInstanceResponse), deleteInstanceMetadata.decode.bind(deleteInstanceMetadata)),
rescheduleMaintenance: new this._gaxModule.LongrunningDescriptor(this.operationsClient, rescheduleMaintenanceResponse.decode.bind(rescheduleMaintenanceResponse), rescheduleMaintenanceMetadata.decode.bind(rescheduleMaintenanceMetadata)),
};

@@ -227,2 +230,3 @@ // Put together the default options sent with requests.

'getInstance',
'getInstanceAuthString',
'createInstance',

@@ -235,2 +239,3 @@ 'updateInstance',

'deleteInstance',
'rescheduleMaintenance',
];

@@ -296,21 +301,2 @@ for (const methodName of cloudRedisStubMethods) {

}
/**
* 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 [Instance]{@link google.cloud.redis.v1beta1.Instance}.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
* @example
* const [response] = await client.getInstance(request);
*/
getInstance(request, optionsOrCallback, callback) {

@@ -336,46 +322,22 @@ request = request || {};

}
/**
* 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. 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example
* const [operation] = await client.createInstance(request);
* const [response] = await operation.promise();
*/
getInstanceAuthString(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
return this.innerApiCalls.getInstanceAuthString(request, options, callback);
}
createInstance(request, optionsOrCallback, callback) {

@@ -410,7 +372,4 @@ request = request || {};

* for more details and examples.
* @example
* const decodedOperation = await checkCreateInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1beta1/cloud_redis.create_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_CreateInstance_async
*/

@@ -423,36 +382,2 @@ async checkCreateInstanceProgress(name) {

}
/**
* 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 google.cloud.redis.v1beta1.Instance|Instance}:
*
* * `displayName`
* * `labels`
* * `memorySizeGb`
* * `redisConfig`
* @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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example
* const [operation] = await client.updateInstance(request);
* const [response] = await operation.promise();
*/
updateInstance(request, optionsOrCallback, callback) {

@@ -487,7 +412,4 @@ request = request || {};

* for more details and examples.
* @example
* const decodedOperation = await checkUpdateInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1beta1/cloud_redis.update_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_UpdateInstance_async
*/

@@ -500,27 +422,2 @@ async checkUpdateInstanceProgress(name) {

}
/**
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example
* const [operation] = await client.upgradeInstance(request);
* const [response] = await operation.promise();
*/
upgradeInstance(request, optionsOrCallback, callback) {

@@ -555,7 +452,4 @@ request = request || {};

* for more details and examples.
* @example
* const decodedOperation = await checkUpgradeInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1beta1/cloud_redis.upgrade_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_UpgradeInstance_async
*/

@@ -568,33 +462,2 @@ async checkUpgradeInstanceProgress(name) {

}
/**
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example
* const [operation] = await client.importInstance(request);
* const [response] = await operation.promise();
*/
importInstance(request, optionsOrCallback, callback) {

@@ -629,7 +492,4 @@ request = request || {};

* for more details and examples.
* @example
* const decodedOperation = await checkImportInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1beta1/cloud_redis.import_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_ImportInstance_async
*/

@@ -642,31 +502,2 @@ async checkImportInstanceProgress(name) {

}
/**
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example
* const [operation] = await client.exportInstance(request);
* const [response] = await operation.promise();
*/
exportInstance(request, optionsOrCallback, callback) {

@@ -701,7 +532,4 @@ request = request || {};

* for more details and examples.
* @example
* const decodedOperation = await checkExportInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1beta1/cloud_redis.export_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_ExportInstance_async
*/

@@ -714,28 +542,2 @@ async checkExportInstanceProgress(name) {

}
/**
* Initiates a failover of the master 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example
* const [operation] = await client.failoverInstance(request);
* const [response] = await operation.promise();
*/
failoverInstance(request, optionsOrCallback, callback) {

@@ -770,7 +572,4 @@ request = request || {};

* for more details and examples.
* @example
* const decodedOperation = await checkFailoverInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1beta1/cloud_redis.failover_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_FailoverInstance_async
*/

@@ -783,25 +582,2 @@ async checkFailoverInstanceProgress(name) {

}
/**
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example
* const [operation] = await client.deleteInstance(request);
* const [response] = await operation.promise();
*/
deleteInstance(request, optionsOrCallback, callback) {

@@ -836,7 +612,4 @@ request = request || {};

* for more details and examples.
* @example
* const decodedOperation = await checkDeleteInstanceProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
* @example <caption>include:samples/generated/v1beta1/cloud_redis.delete_instance.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_DeleteInstance_async
*/

@@ -849,43 +622,40 @@ async checkDeleteInstanceProgress(name) {

}
rescheduleMaintenance(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
return this.innerApiCalls.rescheduleMaintenance(request, options, callback);
}
/**
* 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 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 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 [Instance]{@link google.cloud.redis.v1beta1.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.
* 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
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* 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
*/
async checkRescheduleMaintenanceProgress(name) {
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
const [operation] = await this.operationsClient.getOperation(request);
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.rescheduleMaintenance, gax.createDefaultBackoffSettings());
return decodeOperation;
}
listInstances(request, optionsOrCallback, callback) {

@@ -987,7 +757,4 @@ request = request || {};

* for more details and examples.
* @example
* const iterable = client.listInstancesAsync(request);
* for await (const response of iterable) {
* // process response
* }
* @example <caption>include:samples/generated/v1beta1/cloud_redis.list_instances.js</caption>
* region_tag:redis_v1beta1_generated_CloudRedis_ListInstances_async
*/

@@ -1003,3 +770,2 @@ listInstancesAsync(request, options) {

});
options = options || {};
const defaultCallSettings = this._defaults['listInstances'];

@@ -1098,4 +864,3 @@ const callSettings = defaultCallSettings.merge(options);

close() {
this.initialize();
if (!this._terminated) {
if (this.cloudRedisStub && !this._terminated) {
return this.cloudRedisStub.then(stub => {

@@ -1102,0 +867,0 @@ this._terminated = true;

"use strict";
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//

@@ -20,4 +20,5 @@ // Licensed under the Apache License, Version 2.0 (the "License");

Object.defineProperty(exports, "__esModule", { value: true });
exports.CloudRedisClient = void 0;
var cloud_redis_client_1 = require("./cloud_redis_client");
Object.defineProperty(exports, "CloudRedisClient", { enumerable: true, get: function () { return cloud_redis_client_1.CloudRedisClient; } });
//# sourceMappingURL=index.js.map

@@ -7,2 +7,23 @@ # Changelog

## [3.0.0](https://github.com/googleapis/nodejs-redis/compare/v2.4.0...v3.0.0) (2022-05-17)
### ⚠ BREAKING CHANGES
* update library to use Node 12 (#567)
### Features
* [Cloud Memorystore for Redis] Support Maintenance Window ([13dc45b](https://github.com/googleapis/nodejs-redis/commit/13dc45b62d6a6a2934d8062619e135ab8b52d7ec))
* Add automated RDB (AKA persistence) ([#544](https://github.com/googleapis/nodejs-redis/issues/544)) ([3fe6859](https://github.com/googleapis/nodejs-redis/commit/3fe68596d177436d56f626757536cc63dc045ea7))
* add secondary_ip_range field ([13dc45b](https://github.com/googleapis/nodejs-redis/commit/13dc45b62d6a6a2934d8062619e135ab8b52d7ec))
* add secondary_ip_range field ([#549](https://github.com/googleapis/nodejs-redis/issues/549)) ([c454a54](https://github.com/googleapis/nodejs-redis/commit/c454a542480628c655b1fcfcab52b8f9457cdcb4))
* add support for AUTH functionality ([13dc45b](https://github.com/googleapis/nodejs-redis/commit/13dc45b62d6a6a2934d8062619e135ab8b52d7ec))
* add support for TLS functionality ([13dc45b](https://github.com/googleapis/nodejs-redis/commit/13dc45b62d6a6a2934d8062619e135ab8b52d7ec))
### Build System
* update library to use Node 12 ([#567](https://github.com/googleapis/nodejs-redis/issues/567)) ([c75ad13](https://github.com/googleapis/nodejs-redis/commit/c75ad1301968cbe59fad267bebed6610ddf07657))
## [2.4.0](https://www.github.com/googleapis/nodejs-redis/compare/v2.3.1...v2.4.0) (2021-11-10)

@@ -9,0 +30,0 @@

{
"name": "@google-cloud/redis",
"description": "Google Cloud Memorystore for Redis API client for Node.js",
"version": "2.4.0",
"version": "3.0.0",
"license": "Apache-2.0",
"author": "Google LLC",
"engines": {
"node": ">=10"
"node": ">=12.0.0"
},

@@ -47,6 +47,6 @@ "repository": "googleapis/nodejs-redis",

"dependencies": {
"google-gax": "^2.24.1"
"google-gax": "^3.0.1"
},
"devDependencies": {
"@types/mocha": "^8.0.0",
"@types/mocha": "^9.0.0",
"@types/node": "^16.0.0",

@@ -56,3 +56,3 @@ "@types/sinon": "^10.0.0",

"codecov": "^3.1.0",
"gts": "^2.0.0",
"gts": "^3.1.0",
"jsdoc": "^3.5.5",

@@ -62,8 +62,8 @@ "jsdoc-fresh": "^1.0.1",

"linkinator": "^2.0.0",
"mocha": "^8.0.0",
"mocha": "^9.2.2",
"null-loader": "^4.0.0",
"pack-n-play": "^1.0.0-2",
"sinon": "^12.0.0",
"sinon": "^14.0.0",
"ts-loader": "^9.0.0",
"typescript": "^3.8.3",
"typescript": "^4.6.4",
"webpack": "^5.0.0",

@@ -70,0 +70,0 @@ "webpack-cli": "^4.0.0"

@@ -7,5 +7,4 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost."

[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![npm version](https://img.shields.io/npm/v/@google-cloud/redis.svg)](https://www.npmjs.org/package/@google-cloud/redis)
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-redis/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-redis)

@@ -100,18 +99,18 @@

Node.js.
If you are using an end-of-life version of Node.js, we recommend that you update
as soon as possible to an actively supported LTS version.
Google's client libraries support legacy versions of Node.js runtimes on a
best-efforts basis with the following warnings:
* Legacy versions are not tested in continuous integration.
* Some security patches and features cannot be backported.
* Dependencies cannot be kept up-to-date.
Client libraries targeting some end-of-life versions of Node.js are available, and
can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
The dist-tags follow the naming convention `legacy-(version)`.
For example, `npm install @google-cloud/redis@legacy-8` installs client libraries
for versions compatible with Node.js 8.
_Legacy Node.js versions are supported as a best effort:_
* Legacy versions will not be tested in continuous integration.
* Some security patches may not be able to be backported.
* Dependencies will not be kept up-to-date, and features will not be backported.
#### Legacy tags available
* `legacy-8`: install client libraries from this dist-tag for versions
compatible with Node.js 8.
## Versioning

@@ -122,6 +121,6 @@

This library is considered to be **General Availability (GA)**. This means it
is stable; the code surface will not change in backwards-incompatible ways
This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
unless absolutely necessary (e.g. because of critical security issues) or with
an extensive deprecation period. Issues and requests against **GA** libraries
an extensive deprecation period. Issues and requests against **stable** libraries
are addressed with the highest priority.

@@ -133,2 +132,3 @@

More Information: [Google Cloud Platform Launch Stages][launch_stages]

@@ -135,0 +135,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc