Constructor
new CloudMemcacheClient(optionsopt)
Construct an instance of CloudMemcacheClient.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
The configuration object. See the subsequent parameters for more details. Properties
|
Members
(static) apiEndpoint
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
(static) port
The port for this API service.
(static) scopes
The scopes needed to make gRPC calls for every method defined in this service.
(static) servicePath
The DNS address for this API service.
Methods
applyParameters(request, optionsopt) → {Promise}
ApplyParameters will update current set of Parameters to the set of specified nodes of the Memcached Instance.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
(async) checkApplyParametersProgress(name) → {Promise}
Check the status of the long running operation returned by the applyParameters() method.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String |
The operation name that will be passed. |
(async) checkCreateInstanceProgress(name) → {Promise}
Check the status of the long running operation returned by the createInstance() method.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String |
The operation name that will be passed. |
(async) checkDeleteInstanceProgress(name) → {Promise}
Check the status of the long running operation returned by the deleteInstance() method.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String |
The operation name that will be passed. |
(async) checkUpdateInstanceProgress(name) → {Promise}
Check the status of the long running operation returned by the updateInstance() method.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String |
The operation name that will be passed. |
(async) checkUpdateParametersProgress(name) → {Promise}
Check the status of the long running operation returned by the updateParameters() method.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String |
The operation name that will be passed. |
close()
Terminate the GRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
createInstance(request, optionsopt) → {Promise}
Creates a new Instance in a given project and location.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
deleteInstance(request, optionsopt) → {Promise}
Deletes a single Instance.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
getInstance(request, optionsopt) → {Promise}
Gets details of a single Instance.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
getProjectId(callback)
Return the project ID used by this class.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function |
the callback to be called with the current project Id. |
initialize() → {Promise}
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.
instancePath(project, location, instance) → {string}
Return a fully-qualified instance resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
location |
string | |
instance |
string |
listInstances(request, optionsopt) → {Promise}
Lists Instances in a given project and location.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
listInstancesAsync(request, optionsopt) → {Object}
Equivalent to listInstances, but returns an iterable object.
for-await-of syntax is used with the iterable to recursively get response element on-demand.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
listInstancesStream(request, optionsopt) → {Stream}
Equivalent to listInstances, but returns a NodeJS Stream object.
This fetches the paged responses for listInstances continuously and invokes the callback registered for 'data' event for each element in the responses.
The returned object has 'end' method when no more elements are required.
autoPaginate option will be ignored.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
locationPath(project, location) → {string}
Return a fully-qualified location resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
location |
string |
matchInstanceFromInstanceName(instanceName) → {string}
Parse the instance from Instance resource.
Parameters:
| Name | Type | Description |
|---|---|---|
instanceName |
string |
A fully-qualified path representing Instance resource. |
matchLocationFromInstanceName(instanceName) → {string}
Parse the location from Instance resource.
Parameters:
| Name | Type | Description |
|---|---|---|
instanceName |
string |
A fully-qualified path representing Instance resource. |
matchLocationFromLocationName(locationName) → {string}
Parse the location from Location resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationName |
string |
A fully-qualified path representing Location resource. |
matchProjectFromInstanceName(instanceName) → {string}
Parse the project from Instance resource.
Parameters:
| Name | Type | Description |
|---|---|---|
instanceName |
string |
A fully-qualified path representing Instance resource. |
matchProjectFromLocationName(locationName) → {string}
Parse the project from Location resource.
Parameters:
| Name | Type | Description |
|---|---|---|
locationName |
string |
A fully-qualified path representing Location resource. |
updateInstance(request, optionsopt) → {Promise}
Updates an existing Instance in a given project and location.
Parameters:
| Name | Type | Attributes | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
updateParameters(request, optionsopt) → {Promise}
Updates the defined Memcached Parameters for an existing Instance. This method only stages the parameters, it must be followed by ApplyParameters to apply the parameters to nodes of the Memcached Instance.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |