Service describing handlers for resources v1
Package
@google-cloud/memorystoreConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);Construct an instance of MemorystoreClient.
| Parameters | |
|---|---|
| Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
Properties
apiEndpoint
get apiEndpoint(): string;The DNS address for this API service.
apiEndpoint
static get apiEndpoint(): string;The DNS address for this API service - same as servicePath.
auth
auth: gax.GoogleAuth;descriptors
descriptors: Descriptors;innerApiCalls
innerApiCalls: {
[name: string]: Function;
};locationsClient
locationsClient: LocationsClient;memorystoreStub
memorystoreStub?: Promise<{
[name: string]: Function;
}>;operationsClient
operationsClient: gax.OperationsClient;pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};port
static get port(): number;The port for this API service.
scopes
static get scopes(): string[];The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;The DNS address for this API service.
universeDomain
get universeDomain(): string;warn
warn: (code: string, message: string, warnType?: string) => void;Methods
backupCollectionPath(project, location, backupCollection)
backupCollectionPath(project: string, location: string, backupCollection: string): string;Return a fully-qualified backupCollection resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
backupCollection |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
backupInstance(request, options)
backupInstance(request?: protos.google.cloud.memorystore.v1.IBackupInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Backup Instance. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the instance's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.
| Parameters | |
|---|---|
| Name | Description |
request |
IBackupInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Instance resource name using the form:
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
* where `location_id` refers to a Google Cloud region.
*/
// const name = 'abc123'
/**
* Optional. TTL for the backup to expire. Value range is 1 day to 100 years.
* If not specified, the default value is 100 years.
*/
// const ttl = {}
/**
* Optional. The id of the backup to be created. If not specified, the
* default value (YYYYMMDDHHMMSS _Shortened Instance UID is used.
*/
// const backupId = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callBackupInstance() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await memorystoreClient.backupInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callBackupInstance();
backupInstance(request, options, callback)
backupInstance(request: protos.google.cloud.memorystore.v1.IBackupInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IBackupInstanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
backupInstance(request, callback)
backupInstance(request: protos.google.cloud.memorystore.v1.IBackupInstanceRequest, callback: Callback<LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IBackupInstanceRequest
|
callback |
Callback<LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
backupPath(project, location, backupCollection, backup)
backupPath(project: string, location: string, backupCollection: string, backup: string): string;Return a fully-qualified backup resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
backupCollection |
string
|
backup |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
cancelOperation(request, optionsOrCallback, callback)
cancelOperation(request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED.
| Parameters | |
|---|---|
| Name | Description |
request |
CancelOperationRequest
The request object that will be sent. |
optionsOrCallback |
CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
|
callback |
Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
| Returns | |
|---|---|
| Type | Description |
Promise<protos.google.protobuf.Empty> |
|
const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});
certificateAuthorityPath(project, location, instance)
certificateAuthorityPath(project: string, location: string, instance: string): string;Return a fully-qualified certificateAuthority resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
instance |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
checkBackupInstanceProgress(name)
checkBackupInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.memorystore.v1.Instance, protos.google.cloud.memorystore.v1.OperationMetadata>>;Check the status of the long running operation returned by backupInstance().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.memorystore.v1.Instance, protos.google.cloud.memorystore.v1.OperationMetadata>> |
{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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Instance resource name using the form:
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
* where `location_id` refers to a Google Cloud region.
*/
// const name = 'abc123'
/**
* Optional. TTL for the backup to expire. Value range is 1 day to 100 years.
* If not specified, the default value is 100 years.
*/
// const ttl = {}
/**
* Optional. The id of the backup to be created. If not specified, the
* default value (YYYYMMDDHHMMSS _Shortened Instance UID is used.
*/
// const backupId = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callBackupInstance() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await memorystoreClient.backupInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callBackupInstance();
checkCreateInstanceProgress(name)
checkCreateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.memorystore.v1.Instance, protos.google.cloud.memorystore.v1.OperationMetadata>>;Check the status of the long running operation returned by createInstance().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.memorystore.v1.Instance, protos.google.cloud.memorystore.v1.OperationMetadata>> |
{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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource where this instance will be created.
* Format: projects/{project}/locations/{location}
*/
// const parent = 'abc123'
/**
* Required. The ID to use for the instance, which will become the final
* component of the instance's resource name.
* This value is subject to the following restrictions:
* * Must be 4-63 characters in length
* * Must begin with a letter or digit
* * Must contain only lowercase letters, digits, and hyphens
* * Must not end with a hyphen
* * Must be unique within a location
*/
// const instanceId = 'abc123'
/**
* Required. The instance to create.
*/
// const instance = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callCreateInstance() {
// Construct request
const request = {
parent,
instanceId,
instance,
};
// Run request
const [operation] = await memorystoreClient.createInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateInstance();
checkDeleteBackupProgress(name)
checkDeleteBackupProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.memorystore.v1.OperationMetadata>>;Check the status of the long running operation returned by deleteBackup().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.memorystore.v1.OperationMetadata>> |
{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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Instance backup resource name using the form:
* `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
*/
// const name = 'abc123'
/**
* Optional. Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callDeleteBackup() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await memorystoreClient.deleteBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteBackup();
checkDeleteInstanceProgress(name)
checkDeleteInstanceProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.memorystore.v1.OperationMetadata>>;Check the status of the long running operation returned by deleteInstance().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.memorystore.v1.OperationMetadata>> |
{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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the instance to delete.
* Format: projects/{project}/locations/{location}/instances/{instance}
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callDeleteInstance() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await memorystoreClient.deleteInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteInstance();
checkExportBackupProgress(name)
checkExportBackupProgress(name: string): Promise<LROperation<protos.google.cloud.memorystore.v1.Backup, protos.google.cloud.memorystore.v1.OperationMetadata>>;Check the status of the long running operation returned by exportBackup().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.memorystore.v1.Backup, protos.google.cloud.memorystore.v1.OperationMetadata>> |
{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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Google Cloud Storage bucket, like "my-bucket".
*/
// const gcsBucket = 'abc123'
/**
* Required. Instance backup resource name using the form:
* `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
*/
// const name = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callExportBackup() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await memorystoreClient.exportBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callExportBackup();
checkRescheduleMaintenanceProgress(name)
checkRescheduleMaintenanceProgress(name: string): Promise<LROperation<protos.google.cloud.memorystore.v1.Instance, protos.google.cloud.memorystore.v1.OperationMetadata>>;Check the status of the long running operation returned by rescheduleMaintenance().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.memorystore.v1.Instance, protos.google.cloud.memorystore.v1.OperationMetadata>> |
{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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the instance to reschedule maintenance for:
* `projects/{project}/locations/{location_id}/instances/{instance}`
*/
// const name = 'abc123'
/**
* Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set.
*/
// const rescheduleType = {}
/**
* Optional. Timestamp when the maintenance shall be rescheduled to if
* reschedule_type=SPECIFIC_TIME, in RFC 3339 format.
* Example: `2012-11-15T16:19:00.094Z`.
*/
// const scheduleTime = {}
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callRescheduleMaintenance() {
// Construct request
const request = {
name,
rescheduleType,
};
// Run request
const [operation] = await memorystoreClient.rescheduleMaintenance(request);
const [response] = await operation.promise();
console.log(response);
}
callRescheduleMaintenance();
checkUpdateInstanceProgress(name)
checkUpdateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.memorystore.v1.Instance, protos.google.cloud.memorystore.v1.OperationMetadata>>;Check the status of the long running operation returned by updateInstance().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.memorystore.v1.Instance, protos.google.cloud.memorystore.v1.OperationMetadata>> |
{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 for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Optional. The list of fields to be updated on the instance. At least one
* field must be specified.
*/
// const updateMask = {}
/**
* Required. The instance to update.
*/
// const instance = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callUpdateInstance() {
// Construct request
const request = {
instance,
};
// Run request
const [operation] = await memorystoreClient.updateInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateInstance();
close()
close(): Promise<void>;Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
| Returns | |
|---|---|
| Type | Description |
Promise<void> |
{Promise} A promise that resolves when the client is closed. |
createInstance(request, options)
createInstance(request?: protos.google.cloud.memorystore.v1.ICreateInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Creates a new Instance in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource where this instance will be created.
* Format: projects/{project}/locations/{location}
*/
// const parent = 'abc123'
/**
* Required. The ID to use for the instance, which will become the final
* component of the instance's resource name.
* This value is subject to the following restrictions:
* * Must be 4-63 characters in length
* * Must begin with a letter or digit
* * Must contain only lowercase letters, digits, and hyphens
* * Must not end with a hyphen
* * Must be unique within a location
*/
// const instanceId = 'abc123'
/**
* Required. The instance to create.
*/
// const instance = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callCreateInstance() {
// Construct request
const request = {
parent,
instanceId,
instance,
};
// Run request
const [operation] = await memorystoreClient.createInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateInstance();
createInstance(request, options, callback)
createInstance(request: protos.google.cloud.memorystore.v1.ICreateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateInstanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createInstance(request, callback)
createInstance(request: protos.google.cloud.memorystore.v1.ICreateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateInstanceRequest
|
callback |
Callback<LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
cryptoKeyPath(project, location, keyRing, cryptoKey)
cryptoKeyPath(project: string, location: string, keyRing: string, cryptoKey: string): string;Return a fully-qualified cryptoKey resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
keyRing |
string
|
cryptoKey |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
cryptoKeyVersionPath(project, location, keyRing, cryptoKey, cryptoKeyVersion)
cryptoKeyVersionPath(project: string, location: string, keyRing: string, cryptoKey: string, cryptoKeyVersion: string): string;Return a fully-qualified cryptoKeyVersion resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
keyRing |
string
|
cryptoKey |
string
|
cryptoKeyVersion |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
deleteBackup(request, options)
deleteBackup(request?: protos.google.cloud.memorystore.v1.IDeleteBackupRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.memorystore.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Deletes a specific backup.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.memorystore.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Instance backup resource name using the form:
* `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
*/
// const name = 'abc123'
/**
* Optional. Idempotent request UUID.
*/
// const requestId = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callDeleteBackup() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await memorystoreClient.deleteBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteBackup();
deleteBackup(request, options, callback)
deleteBackup(request: protos.google.cloud.memorystore.v1.IDeleteBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteBackup(request, callback)
deleteBackup(request: protos.google.cloud.memorystore.v1.IDeleteBackupRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteInstance(request, options)
deleteInstance(request?: protos.google.cloud.memorystore.v1.IDeleteInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.memorystore.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Deletes a single Instance.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.memorystore.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the instance to delete.
* Format: projects/{project}/locations/{location}/instances/{instance}
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callDeleteInstance() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await memorystoreClient.deleteInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteInstance();
deleteInstance(request, options, callback)
deleteInstance(request: protos.google.cloud.memorystore.v1.IDeleteInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteInstanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteInstance(request, callback)
deleteInstance(request: protos.google.cloud.memorystore.v1.IDeleteInstanceRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteInstanceRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteOperation(request, optionsOrCallback, callback)
deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteOperationRequest
The request object that will be sent. |
optionsOrCallback |
CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
|
callback |
Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
| Returns | |
|---|---|
| Type | Description |
Promise<protos.google.protobuf.Empty> |
|
const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});
exportBackup(request, options)
exportBackup(request?: protos.google.cloud.memorystore.v1.IExportBackupRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.memorystore.v1.IBackup, protos.google.cloud.memorystore.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Exports a specific backup to a customer target Cloud Storage URI.
| Parameters | |
|---|---|
| Name | Description |
request |
IExportBackupRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.memorystore.v1.IBackup, protos.google.cloud.memorystore.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Google Cloud Storage bucket, like "my-bucket".
*/
// const gcsBucket = 'abc123'
/**
* Required. Instance backup resource name using the form:
* `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
*/
// const name = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callExportBackup() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await memorystoreClient.exportBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callExportBackup();
exportBackup(request, options, callback)
exportBackup(request: protos.google.cloud.memorystore.v1.IExportBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.memorystore.v1.IBackup, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IExportBackupRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.memorystore.v1.IBackup, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
exportBackup(request, callback)
exportBackup(request: protos.google.cloud.memorystore.v1.IExportBackupRequest, callback: Callback<LROperation<protos.google.cloud.memorystore.v1.IBackup, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IExportBackupRequest
|
callback |
Callback<LROperation<protos.google.cloud.memorystore.v1.IBackup, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
forwardingRulePath(project, region, forwardingRule)
forwardingRulePath(project: string, region: string, forwardingRule: string): string;Return a fully-qualified forwardingRule resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
region |
string
|
forwardingRule |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
getBackup(request, options)
getBackup(request?: protos.google.cloud.memorystore.v1.IGetBackupRequest, options?: CallOptions): Promise<[
protos.google.cloud.memorystore.v1.IBackup,
protos.google.cloud.memorystore.v1.IGetBackupRequest | undefined,
{} | undefined
]>;Gets the details of a specific backup.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.memorystore.v1.IBackup,
protos.google.cloud.memorystore.v1.IGetBackupRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Instance backup resource name using the form:
* `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
*/
// const name = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callGetBackup() {
// Construct request
const request = {
name,
};
// Run request
const response = await memorystoreClient.getBackup(request);
console.log(response);
}
callGetBackup();
getBackup(request, options, callback)
getBackup(request: protos.google.cloud.memorystore.v1.IGetBackupRequest, options: CallOptions, callback: Callback<protos.google.cloud.memorystore.v1.IBackup, protos.google.cloud.memorystore.v1.IGetBackupRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.memorystore.v1.IBackup, protos.google.cloud.memorystore.v1.IGetBackupRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getBackup(request, callback)
getBackup(request: protos.google.cloud.memorystore.v1.IGetBackupRequest, callback: Callback<protos.google.cloud.memorystore.v1.IBackup, protos.google.cloud.memorystore.v1.IGetBackupRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupRequest
|
callback |
Callback<protos.google.cloud.memorystore.v1.IBackup, protos.google.cloud.memorystore.v1.IGetBackupRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getBackupCollection(request, options)
getBackupCollection(request?: protos.google.cloud.memorystore.v1.IGetBackupCollectionRequest, options?: CallOptions): Promise<[
protos.google.cloud.memorystore.v1.IBackupCollection,
protos.google.cloud.memorystore.v1.IGetBackupCollectionRequest | undefined,
{} | undefined
]>;Get a backup collection.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupCollectionRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.memorystore.v1.IBackupCollection,
protos.google.cloud.memorystore.v1.IGetBackupCollectionRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing BackupCollection. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Instance backupCollection resource name using the form:
* `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
* where `location_id` refers to a Google Cloud region.
*/
// const name = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callGetBackupCollection() {
// Construct request
const request = {
name,
};
// Run request
const response = await memorystoreClient.getBackupCollection(request);
console.log(response);
}
callGetBackupCollection();
getBackupCollection(request, options, callback)
getBackupCollection(request: protos.google.cloud.memorystore.v1.IGetBackupCollectionRequest, options: CallOptions, callback: Callback<protos.google.cloud.memorystore.v1.IBackupCollection, protos.google.cloud.memorystore.v1.IGetBackupCollectionRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupCollectionRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.memorystore.v1.IBackupCollection, protos.google.cloud.memorystore.v1.IGetBackupCollectionRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getBackupCollection(request, callback)
getBackupCollection(request: protos.google.cloud.memorystore.v1.IGetBackupCollectionRequest, callback: Callback<protos.google.cloud.memorystore.v1.IBackupCollection, protos.google.cloud.memorystore.v1.IGetBackupCollectionRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupCollectionRequest
|
callback |
Callback<protos.google.cloud.memorystore.v1.IBackupCollection, protos.google.cloud.memorystore.v1.IGetBackupCollectionRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getCertificateAuthority(request, options)
getCertificateAuthority(request?: protos.google.cloud.memorystore.v1.IGetCertificateAuthorityRequest, options?: CallOptions): Promise<[
protos.google.cloud.memorystore.v1.ICertificateAuthority,
protos.google.cloud.memorystore.v1.IGetCertificateAuthorityRequest | undefined,
{} | undefined
]>;Gets details about the certificate authority for an Instance.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetCertificateAuthorityRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.memorystore.v1.ICertificateAuthority,
protos.google.cloud.memorystore.v1.IGetCertificateAuthorityRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the certificate authority.
* Format:
* projects/{project}/locations/{location}/instances/{instance}/certificateAuthority
*/
// const name = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callGetCertificateAuthority() {
// Construct request
const request = {
name,
};
// Run request
const response = await memorystoreClient.getCertificateAuthority(request);
console.log(response);
}
callGetCertificateAuthority();
getCertificateAuthority(request, options, callback)
getCertificateAuthority(request: protos.google.cloud.memorystore.v1.IGetCertificateAuthorityRequest, options: CallOptions, callback: Callback<protos.google.cloud.memorystore.v1.ICertificateAuthority, protos.google.cloud.memorystore.v1.IGetCertificateAuthorityRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetCertificateAuthorityRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.memorystore.v1.ICertificateAuthority, protos.google.cloud.memorystore.v1.IGetCertificateAuthorityRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getCertificateAuthority(request, callback)
getCertificateAuthority(request: protos.google.cloud.memorystore.v1.IGetCertificateAuthorityRequest, callback: Callback<protos.google.cloud.memorystore.v1.ICertificateAuthority, protos.google.cloud.memorystore.v1.IGetCertificateAuthorityRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetCertificateAuthorityRequest
|
callback |
Callback<protos.google.cloud.memorystore.v1.ICertificateAuthority, protos.google.cloud.memorystore.v1.IGetCertificateAuthorityRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getInstance(request, options)
getInstance(request?: protos.google.cloud.memorystore.v1.IGetInstanceRequest, options?: CallOptions): Promise<[
protos.google.cloud.memorystore.v1.IInstance,
protos.google.cloud.memorystore.v1.IGetInstanceRequest | undefined,
{} | undefined
]>;Gets details of a single Instance.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.memorystore.v1.IInstance,
protos.google.cloud.memorystore.v1.IGetInstanceRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the instance to retrieve.
* Format: projects/{project}/locations/{location}/instances/{instance}
*/
// const name = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callGetInstance() {
// Construct request
const request = {
name,
};
// Run request
const response = await memorystoreClient.getInstance(request);
console.log(response);
}
callGetInstance();
getInstance(request, options, callback)
getInstance(request: protos.google.cloud.memorystore.v1.IGetInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetInstanceRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getInstance(request, callback)
getInstance(request: protos.google.cloud.memorystore.v1.IGetInstanceRequest, callback: Callback<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetInstanceRequest
|
callback |
Callback<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getLocation(request, options, callback)
getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;Gets information about a location.
| Parameters | |
|---|---|
| Name | Description |
request |
LocationProtos.google.cloud.location.IGetLocationRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Call options. See CallOptions for more details. |
callback |
Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
Promise<google.cloud.location.ILocation> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
const [response] = await client.getLocation(request);
getOperation(request, optionsOrCallback, callback)
getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
| Parameters | |
|---|---|
| Name | Description |
request |
GetOperationRequest
The request object that will be sent. |
optionsOrCallback |
CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
|
callback |
Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
| Returns | |
|---|---|
| Type | Description |
Promise<[protos.google.longrunning.Operation]> |
|
const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)
getProjectId()
getProjectId(): Promise<string>;| Returns | |
|---|---|
| Type | Description |
Promise<string> |
|
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;| Parameter | |
|---|---|
| Name | Description |
callback |
Callback<string, undefined, undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
| Returns | |
|---|---|
| Type | Description |
Promise<{
[name: string]: Function;
}> |
{Promise} A promise that resolves to an authenticated service stub. |
instancePath(project, location, instance)
instancePath(project: string, location: string, instance: string): string;Return a fully-qualified instance resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
instance |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
listBackupCollections(request, options)
listBackupCollections(request?: protos.google.cloud.memorystore.v1.IListBackupCollectionsRequest, options?: CallOptions): Promise<[
protos.google.cloud.memorystore.v1.IBackupCollection[],
protos.google.cloud.memorystore.v1.IListBackupCollectionsRequest | null,
protos.google.cloud.memorystore.v1.IListBackupCollectionsResponse
]>;Lists all backup collections owned by a consumer project in either the specified location (region) or all locations.
If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupCollectionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.memorystore.v1.IBackupCollection[],
protos.google.cloud.memorystore.v1.IListBackupCollectionsRequest | null,
protos.google.cloud.memorystore.v1.IListBackupCollectionsResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of BackupCollection. 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 |
listBackupCollections(request, options, callback)
listBackupCollections(request: protos.google.cloud.memorystore.v1.IListBackupCollectionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.memorystore.v1.IListBackupCollectionsRequest, protos.google.cloud.memorystore.v1.IListBackupCollectionsResponse | null | undefined, protos.google.cloud.memorystore.v1.IBackupCollection>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupCollectionsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.memorystore.v1.IListBackupCollectionsRequest, protos.google.cloud.memorystore.v1.IListBackupCollectionsResponse | null | undefined, protos.google.cloud.memorystore.v1.IBackupCollection>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackupCollections(request, callback)
listBackupCollections(request: protos.google.cloud.memorystore.v1.IListBackupCollectionsRequest, callback: PaginationCallback<protos.google.cloud.memorystore.v1.IListBackupCollectionsRequest, protos.google.cloud.memorystore.v1.IListBackupCollectionsResponse | null | undefined, protos.google.cloud.memorystore.v1.IBackupCollection>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupCollectionsRequest
|
callback |
PaginationCallback<protos.google.cloud.memorystore.v1.IListBackupCollectionsRequest, protos.google.cloud.memorystore.v1.IListBackupCollectionsResponse | null | undefined, protos.google.cloud.memorystore.v1.IBackupCollection>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackupCollectionsAsync(request, options)
listBackupCollectionsAsync(request?: protos.google.cloud.memorystore.v1.IListBackupCollectionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.memorystore.v1.IBackupCollection>;Equivalent to listBackupCollections, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupCollectionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.memorystore.v1.IBackupCollection> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing BackupCollection. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the backupCollection location using the
* form:
* `projects/{project_id}/locations/{location_id}`
* where `location_id` refers to a Google Cloud region.
*/
// const parent = 'abc123'
/**
* Optional. 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
* `next_page_token` google.cloud.memorystore.v1.ListBackupCollectionsResponse.next_page_token
* to determine if there are more clusters left to be queried.
*/
// const pageSize = 1234
/**
* Optional. The `next_page_token` value returned from a previous
* ListBackupCollections request, if any.
*/
// const pageToken = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callListBackupCollections() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = memorystoreClient.listBackupCollectionsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListBackupCollections();
listBackupCollectionsStream(request, options)
listBackupCollectionsStream(request?: protos.google.cloud.memorystore.v1.IListBackupCollectionsRequest, options?: CallOptions): Transform;Equivalent to listBackupCollections, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupCollectionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing BackupCollection on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listBackups(request, options)
listBackups(request?: protos.google.cloud.memorystore.v1.IListBackupsRequest, options?: CallOptions): Promise<[
protos.google.cloud.memorystore.v1.IBackup[],
protos.google.cloud.memorystore.v1.IListBackupsRequest | null,
protos.google.cloud.memorystore.v1.IListBackupsResponse
]>;Lists all backups owned by a backup collection.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.memorystore.v1.IBackup[],
protos.google.cloud.memorystore.v1.IListBackupsRequest | null,
protos.google.cloud.memorystore.v1.IListBackupsResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 |
listBackups(request, options, callback)
listBackups(request: protos.google.cloud.memorystore.v1.IListBackupsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.memorystore.v1.IListBackupsRequest, protos.google.cloud.memorystore.v1.IListBackupsResponse | null | undefined, protos.google.cloud.memorystore.v1.IBackup>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.memorystore.v1.IListBackupsRequest, protos.google.cloud.memorystore.v1.IListBackupsResponse | null | undefined, protos.google.cloud.memorystore.v1.IBackup>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackups(request, callback)
listBackups(request: protos.google.cloud.memorystore.v1.IListBackupsRequest, callback: PaginationCallback<protos.google.cloud.memorystore.v1.IListBackupsRequest, protos.google.cloud.memorystore.v1.IListBackupsResponse | null | undefined, protos.google.cloud.memorystore.v1.IBackup>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupsRequest
|
callback |
PaginationCallback<protos.google.cloud.memorystore.v1.IListBackupsRequest, protos.google.cloud.memorystore.v1.IListBackupsResponse | null | undefined, protos.google.cloud.memorystore.v1.IBackup>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackupsAsync(request, options)
listBackupsAsync(request?: protos.google.cloud.memorystore.v1.IListBackupsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.memorystore.v1.IBackup>;Equivalent to listBackups, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.memorystore.v1.IBackup> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the backupCollection using the form:
* `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
*/
// const parent = 'abc123'
/**
* Optional. 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
* `next_page_token` google.cloud.memorystore.v1.ListBackupsResponse.next_page_token
* to determine if there are more clusters left to be queried.
*/
// const pageSize = 1234
/**
* Optional. The `next_page_token` value returned from a previous
* ListBackupCollections request, if any.
*/
// const pageToken = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callListBackups() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = memorystoreClient.listBackupsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListBackups();
listBackupsStream(request, options)
listBackupsStream(request?: protos.google.cloud.memorystore.v1.IListBackupsRequest, options?: CallOptions): Transform;Equivalent to listBackups, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listInstances(request, options)
listInstances(request?: protos.google.cloud.memorystore.v1.IListInstancesRequest, options?: CallOptions): Promise<[
protos.google.cloud.memorystore.v1.IInstance[],
protos.google.cloud.memorystore.v1.IListInstancesRequest | null,
protos.google.cloud.memorystore.v1.IListInstancesResponse
]>;Lists Instances in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
IListInstancesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.memorystore.v1.IInstance[],
protos.google.cloud.memorystore.v1.IListInstancesRequest | null,
protos.google.cloud.memorystore.v1.IListInstancesResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 |
listInstances(request, options, callback)
listInstances(request: protos.google.cloud.memorystore.v1.IListInstancesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.memorystore.v1.IListInstancesRequest, protos.google.cloud.memorystore.v1.IListInstancesResponse | null | undefined, protos.google.cloud.memorystore.v1.IInstance>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListInstancesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.memorystore.v1.IListInstancesRequest, protos.google.cloud.memorystore.v1.IListInstancesResponse | null | undefined, protos.google.cloud.memorystore.v1.IInstance>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listInstances(request, callback)
listInstances(request: protos.google.cloud.memorystore.v1.IListInstancesRequest, callback: PaginationCallback<protos.google.cloud.memorystore.v1.IListInstancesRequest, protos.google.cloud.memorystore.v1.IListInstancesResponse | null | undefined, protos.google.cloud.memorystore.v1.IInstance>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListInstancesRequest
|
callback |
PaginationCallback<protos.google.cloud.memorystore.v1.IListInstancesRequest, protos.google.cloud.memorystore.v1.IListInstancesResponse | null | undefined, protos.google.cloud.memorystore.v1.IInstance>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listInstancesAsync(request, options)
listInstancesAsync(request?: protos.google.cloud.memorystore.v1.IListInstancesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.memorystore.v1.IInstance>;Equivalent to listInstances, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListInstancesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.memorystore.v1.IInstance> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent to list instances from.
* Format: projects/{project}/locations/{location}
*/
// const parent = 'abc123'
/**
* Optional. Requested page size. Server may return fewer items than
* requested. If unspecified, server will pick an appropriate default.
*/
// const pageSize = 1234
/**
* Optional. A token identifying a page of results the server should return.
*/
// const pageToken = 'abc123'
/**
* Optional. Expression for filtering results.
*/
// const filter = 'abc123'
/**
* Optional. Sort results by a defined order. Supported values: "name",
* "create_time".
*/
// const orderBy = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callListInstances() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = memorystoreClient.listInstancesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListInstances();
listInstancesStream(request, options)
listInstancesStream(request?: protos.google.cloud.memorystore.v1.IListInstancesRequest, options?: CallOptions): Transform;Equivalent to listInstances, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListInstancesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listLocationsAsync(request, options)
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;Lists information about the supported locations for this service. Returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
LocationProtos.google.cloud.location.IListLocationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<google.cloud.location.ILocation> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
// process response
}
listOperationsAsync(request, options)
listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.
For-await-of syntax is used with the iterable to recursively get response element on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
ListOperationsRequest
The request object that will be sent. |
options |
CallOptions
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.longrunning.IOperation> |
{Object} An iterable Object that conforms to iteration protocols. |
const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)
locationPath(project, location)
locationPath(project: string, location: string): string;Return a fully-qualified location resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
matchBackupCollectionFromBackupCollectionName(backupCollectionName)
matchBackupCollectionFromBackupCollectionName(backupCollectionName: string): string | number;Parse the backup_collection from BackupCollection resource.
| Parameter | |
|---|---|
| Name | Description |
backupCollectionName |
string
A fully-qualified path representing BackupCollection resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the backup_collection. |
matchBackupCollectionFromBackupName(backupName)
matchBackupCollectionFromBackupName(backupName: string): string | number;Parse the backup_collection from Backup resource.
| Parameter | |
|---|---|
| Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the backup_collection. |
matchBackupFromBackupName(backupName)
matchBackupFromBackupName(backupName: string): string | number;Parse the backup from Backup resource.
| Parameter | |
|---|---|
| Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the backup. |
matchCryptoKeyFromCryptoKeyName(cryptoKeyName)
matchCryptoKeyFromCryptoKeyName(cryptoKeyName: string): string | number;Parse the crypto_key from CryptoKey resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyName |
string
A fully-qualified path representing CryptoKey resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the crypto_key. |
matchCryptoKeyFromCryptoKeyVersionName(cryptoKeyVersionName)
matchCryptoKeyFromCryptoKeyVersionName(cryptoKeyVersionName: string): string | number;Parse the crypto_key from CryptoKeyVersion resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyVersionName |
string
A fully-qualified path representing CryptoKeyVersion resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the crypto_key. |
matchCryptoKeyVersionFromCryptoKeyVersionName(cryptoKeyVersionName)
matchCryptoKeyVersionFromCryptoKeyVersionName(cryptoKeyVersionName: string): string | number;Parse the crypto_key_version from CryptoKeyVersion resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyVersionName |
string
A fully-qualified path representing CryptoKeyVersion resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the crypto_key_version. |
matchForwardingRuleFromForwardingRuleName(forwardingRuleName)
matchForwardingRuleFromForwardingRuleName(forwardingRuleName: string): string | number;Parse the forwarding_rule from ForwardingRule resource.
| Parameter | |
|---|---|
| Name | Description |
forwardingRuleName |
string
A fully-qualified path representing ForwardingRule resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the forwarding_rule. |
matchInstanceFromCertificateAuthorityName(certificateAuthorityName)
matchInstanceFromCertificateAuthorityName(certificateAuthorityName: string): string | number;Parse the instance from CertificateAuthority resource.
| Parameter | |
|---|---|
| Name | Description |
certificateAuthorityName |
string
A fully-qualified path representing CertificateAuthority resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the instance. |
matchInstanceFromInstanceName(instanceName)
matchInstanceFromInstanceName(instanceName: string): string | number;Parse the instance from Instance resource.
| Parameter | |
|---|---|
| Name | Description |
instanceName |
string
A fully-qualified path representing Instance resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the instance. |
matchKeyRingFromCryptoKeyName(cryptoKeyName)
matchKeyRingFromCryptoKeyName(cryptoKeyName: string): string | number;Parse the key_ring from CryptoKey resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyName |
string
A fully-qualified path representing CryptoKey resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the key_ring. |
matchKeyRingFromCryptoKeyVersionName(cryptoKeyVersionName)
matchKeyRingFromCryptoKeyVersionName(cryptoKeyVersionName: string): string | number;Parse the key_ring from CryptoKeyVersion resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyVersionName |
string
A fully-qualified path representing CryptoKeyVersion resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the key_ring. |
matchLocationFromBackupCollectionName(backupCollectionName)
matchLocationFromBackupCollectionName(backupCollectionName: string): string | number;Parse the location from BackupCollection resource.
| Parameter | |
|---|---|
| Name | Description |
backupCollectionName |
string
A fully-qualified path representing BackupCollection resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromBackupName(backupName)
matchLocationFromBackupName(backupName: string): string | number;Parse the location from Backup resource.
| Parameter | |
|---|---|
| Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromCertificateAuthorityName(certificateAuthorityName)
matchLocationFromCertificateAuthorityName(certificateAuthorityName: string): string | number;Parse the location from CertificateAuthority resource.
| Parameter | |
|---|---|
| Name | Description |
certificateAuthorityName |
string
A fully-qualified path representing CertificateAuthority resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromCryptoKeyName(cryptoKeyName)
matchLocationFromCryptoKeyName(cryptoKeyName: string): string | number;Parse the location from CryptoKey resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyName |
string
A fully-qualified path representing CryptoKey resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromCryptoKeyVersionName(cryptoKeyVersionName)
matchLocationFromCryptoKeyVersionName(cryptoKeyVersionName: string): string | number;Parse the location from CryptoKeyVersion resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyVersionName |
string
A fully-qualified path representing CryptoKeyVersion resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromInstanceName(instanceName)
matchLocationFromInstanceName(instanceName: string): string | number;Parse the location from Instance resource.
| Parameter | |
|---|---|
| Name | Description |
instanceName |
string
A fully-qualified path representing Instance resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromLocationName(locationName)
matchLocationFromLocationName(locationName: string): string | number;Parse the location from Location resource.
| Parameter | |
|---|---|
| Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchNetworkFromNetworkName(networkName)
matchNetworkFromNetworkName(networkName: string): string | number;Parse the network from Network resource.
| Parameter | |
|---|---|
| Name | Description |
networkName |
string
A fully-qualified path representing Network resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the network. |
matchProjectFromBackupCollectionName(backupCollectionName)
matchProjectFromBackupCollectionName(backupCollectionName: string): string | number;Parse the project from BackupCollection resource.
| Parameter | |
|---|---|
| Name | Description |
backupCollectionName |
string
A fully-qualified path representing BackupCollection resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromBackupName(backupName)
matchProjectFromBackupName(backupName: string): string | number;Parse the project from Backup resource.
| Parameter | |
|---|---|
| Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromCertificateAuthorityName(certificateAuthorityName)
matchProjectFromCertificateAuthorityName(certificateAuthorityName: string): string | number;Parse the project from CertificateAuthority resource.
| Parameter | |
|---|---|
| Name | Description |
certificateAuthorityName |
string
A fully-qualified path representing CertificateAuthority resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromCryptoKeyName(cryptoKeyName)
matchProjectFromCryptoKeyName(cryptoKeyName: string): string | number;Parse the project from CryptoKey resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyName |
string
A fully-qualified path representing CryptoKey resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromCryptoKeyVersionName(cryptoKeyVersionName)
matchProjectFromCryptoKeyVersionName(cryptoKeyVersionName: string): string | number;Parse the project from CryptoKeyVersion resource.
| Parameter | |
|---|---|
| Name | Description |
cryptoKeyVersionName |
string
A fully-qualified path representing CryptoKeyVersion resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromForwardingRuleName(forwardingRuleName)
matchProjectFromForwardingRuleName(forwardingRuleName: string): string | number;Parse the project from ForwardingRule resource.
| Parameter | |
|---|---|
| Name | Description |
forwardingRuleName |
string
A fully-qualified path representing ForwardingRule resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromInstanceName(instanceName)
matchProjectFromInstanceName(instanceName: string): string | number;Parse the project from Instance resource.
| Parameter | |
|---|---|
| Name | Description |
instanceName |
string
A fully-qualified path representing Instance resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromLocationName(locationName)
matchProjectFromLocationName(locationName: string): string | number;Parse the project from Location resource.
| Parameter | |
|---|---|
| Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromNetworkName(networkName)
matchProjectFromNetworkName(networkName: string): string | number;Parse the project from Network resource.
| Parameter | |
|---|---|
| Name | Description |
networkName |
string
A fully-qualified path representing Network resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromProjectName(projectName)
matchProjectFromProjectName(projectName: string): string | number;Parse the project from Project resource.
| Parameter | |
|---|---|
| Name | Description |
projectName |
string
A fully-qualified path representing Project resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromServiceAttachmentName(serviceAttachmentName)
matchProjectFromServiceAttachmentName(serviceAttachmentName: string): string | number;Parse the project from ServiceAttachment resource.
| Parameter | |
|---|---|
| Name | Description |
serviceAttachmentName |
string
A fully-qualified path representing ServiceAttachment resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchRegionFromForwardingRuleName(forwardingRuleName)
matchRegionFromForwardingRuleName(forwardingRuleName: string): string | number;Parse the region from ForwardingRule resource.
| Parameter | |
|---|---|
| Name | Description |
forwardingRuleName |
string
A fully-qualified path representing ForwardingRule resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the region. |
matchRegionFromServiceAttachmentName(serviceAttachmentName)
matchRegionFromServiceAttachmentName(serviceAttachmentName: string): string | number;Parse the region from ServiceAttachment resource.
| Parameter | |
|---|---|
| Name | Description |
serviceAttachmentName |
string
A fully-qualified path representing ServiceAttachment resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the region. |
matchServiceAttachmentFromServiceAttachmentName(serviceAttachmentName)
matchServiceAttachmentFromServiceAttachmentName(serviceAttachmentName: string): string | number;Parse the service_attachment from ServiceAttachment resource.
| Parameter | |
|---|---|
| Name | Description |
serviceAttachmentName |
string
A fully-qualified path representing ServiceAttachment resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the service_attachment. |
networkPath(project, network)
networkPath(project: string, network: string): string;Return a fully-qualified network resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
network |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
projectPath(project)
projectPath(project: string): string;Return a fully-qualified project resource name string.
| Parameter | |
|---|---|
| Name | Description |
project |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
rescheduleMaintenance(request, options)
rescheduleMaintenance(request?: protos.google.cloud.memorystore.v1.IRescheduleMaintenanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Reschedules upcoming maintenance event.
| Parameters | |
|---|---|
| Name | Description |
request |
IRescheduleMaintenanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the instance to reschedule maintenance for:
* `projects/{project}/locations/{location_id}/instances/{instance}`
*/
// const name = 'abc123'
/**
* Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set.
*/
// const rescheduleType = {}
/**
* Optional. Timestamp when the maintenance shall be rescheduled to if
* reschedule_type=SPECIFIC_TIME, in RFC 3339 format.
* Example: `2012-11-15T16:19:00.094Z`.
*/
// const scheduleTime = {}
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callRescheduleMaintenance() {
// Construct request
const request = {
name,
rescheduleType,
};
// Run request
const [operation] = await memorystoreClient.rescheduleMaintenance(request);
const [response] = await operation.promise();
console.log(response);
}
callRescheduleMaintenance();
rescheduleMaintenance(request, options, callback)
rescheduleMaintenance(request: protos.google.cloud.memorystore.v1.IRescheduleMaintenanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IRescheduleMaintenanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
rescheduleMaintenance(request, callback)
rescheduleMaintenance(request: protos.google.cloud.memorystore.v1.IRescheduleMaintenanceRequest, callback: Callback<LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IRescheduleMaintenanceRequest
|
callback |
Callback<LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
serviceAttachmentPath(project, region, serviceAttachment)
serviceAttachmentPath(project: string, region: string, serviceAttachment: string): string;Return a fully-qualified serviceAttachment resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
region |
string
|
serviceAttachment |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
updateInstance(request, options)
updateInstance(request?: protos.google.cloud.memorystore.v1.IUpdateInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Updates the parameters of a single Instance.
| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Optional. The list of fields to be updated on the instance. At least one
* field must be specified.
*/
// const updateMask = {}
/**
* Required. The instance to update.
*/
// const instance = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Memorystore library
const {MemorystoreClient} = require('@google-cloud/memorystore').v1;
// Instantiates a client
const memorystoreClient = new MemorystoreClient();
async function callUpdateInstance() {
// Construct request
const request = {
instance,
};
// Run request
const [operation] = await memorystoreClient.updateInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateInstance();
updateInstance(request, options, callback)
updateInstance(request: protos.google.cloud.memorystore.v1.IUpdateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateInstanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateInstance(request, callback)
updateInstance(request: protos.google.cloud.memorystore.v1.IUpdateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateInstanceRequest
|
callback |
Callback<LROperation<protos.google.cloud.memorystore.v1.IInstance, protos.google.cloud.memorystore.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|