Constructor
new BigtableInstanceAdminClient(optionsopt)
Construct an instance of BigtableInstanceAdminClient.
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
appProfilePath(project, instance, appProfile) → {String}
Return a fully-qualified app_profile resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
String | |
instance |
String | |
appProfile |
String |
clusterPath(project, instance, cluster) → {String}
Return a fully-qualified cluster resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
String | |
instance |
String | |
cluster |
String |
createAppProfile(request, optionsopt, callbackopt) → {Promise}
Creates an app profile within an instance.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing AppProfile. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedParent = client.instancePath('[PROJECT]', '[INSTANCE]');
const appProfileId = '';
const appProfile = {};
const request = {
parent: formattedParent,
appProfileId: appProfileId,
appProfile: appProfile,
};
client.createAppProfile(request)
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
createCluster(request, optionsopt, callbackopt) → {Promise}
Creates a cluster within an instance.
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is a gax.Operation object. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedParent = client.instancePath('[PROJECT]', '[INSTANCE]');
const clusterId = '';
const cluster = {};
const request = {
parent: formattedParent,
clusterId: clusterId,
cluster: cluster,
};
// Handle the operation using the promise pattern.
client.createCluster(request)
.then(responses => {
const [operation, initialApiResponse] = responses;
// Operation#promise starts polling for the completion of the LRO.
return operation.promise();
})
.then(responses => {
const result = responses[0];
const metadata = responses[1];
const finalApiResponse = responses[2];
})
.catch(err => {
console.error(err);
});
const formattedParent = client.instancePath('[PROJECT]', '[INSTANCE]');
const clusterId = '';
const cluster = {};
const request = {
parent: formattedParent,
clusterId: clusterId,
cluster: cluster,
};
// Handle the operation using the event emitter pattern.
client.createCluster(request)
.then(responses => {
const [operation, initialApiResponse] = responses;
// Adding a listener for the "complete" event starts polling for the
// completion of the operation.
operation.on('complete', (result, metadata, finalApiResponse) => {
// doSomethingWith(result);
});
// Adding a listener for the "progress" event causes the callback to be
// called on any change in metadata when the operation is polled.
operation.on('progress', (metadata, apiResponse) => {
// doSomethingWith(metadata)
});
// Adding a listener for the "error" event handles any errors found during polling.
operation.on('error', err => {
// throw(err);
});
})
.catch(err => {
console.error(err);
});
const formattedParent = client.instancePath('[PROJECT]', '[INSTANCE]');
const clusterId = '';
const cluster = {};
const request = {
parent: formattedParent,
clusterId: clusterId,
cluster: cluster,
};
// Handle the operation using the await pattern.
const [operation] = await client.createCluster(request);
const [response] = await operation.promise();
createInstance(request, optionsopt, callbackopt) → {Promise}
Create an instance within a project.
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
|||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is a gax.Operation object. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedParent = client.projectPath('[PROJECT]');
const instanceId = '';
const instance = {};
const clusters = {};
const request = {
parent: formattedParent,
instanceId: instanceId,
instance: instance,
clusters: clusters,
};
// Handle the operation using the promise pattern.
client.createInstance(request)
.then(responses => {
const [operation, initialApiResponse] = responses;
// Operation#promise starts polling for the completion of the LRO.
return operation.promise();
})
.then(responses => {
const result = responses[0];
const metadata = responses[1];
const finalApiResponse = responses[2];
})
.catch(err => {
console.error(err);
});
const formattedParent = client.projectPath('[PROJECT]');
const instanceId = '';
const instance = {};
const clusters = {};
const request = {
parent: formattedParent,
instanceId: instanceId,
instance: instance,
clusters: clusters,
};
// Handle the operation using the event emitter pattern.
client.createInstance(request)
.then(responses => {
const [operation, initialApiResponse] = responses;
// Adding a listener for the "complete" event starts polling for the
// completion of the operation.
operation.on('complete', (result, metadata, finalApiResponse) => {
// doSomethingWith(result);
});
// Adding a listener for the "progress" event causes the callback to be
// called on any change in metadata when the operation is polled.
operation.on('progress', (metadata, apiResponse) => {
// doSomethingWith(metadata)
});
// Adding a listener for the "error" event handles any errors found during polling.
operation.on('error', err => {
// throw(err);
});
})
.catch(err => {
console.error(err);
});
const formattedParent = client.projectPath('[PROJECT]');
const instanceId = '';
const instance = {};
const clusters = {};
const request = {
parent: formattedParent,
instanceId: instanceId,
instance: instance,
clusters: clusters,
};
// Handle the operation using the await pattern.
const [operation] = await client.createInstance(request);
const [response] = await operation.promise();
deleteAppProfile(request, optionsopt, callbackopt) → {Promise}
Deletes an app profile from an instance.
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
|||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedName = client.appProfilePath('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]');
const ignoreWarnings = false;
const request = {
name: formattedName,
ignoreWarnings: ignoreWarnings,
};
client.deleteAppProfile(request).catch(err => {
console.error(err);
});
deleteCluster(request, optionsopt, callbackopt) → {Promise}
Deletes a cluster from an instance.
Parameters:
Name | Type | Attributes | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedName = client.clusterPath('[PROJECT]', '[INSTANCE]', '[CLUSTER]');
client.deleteCluster({name: formattedName}).catch(err => {
console.error(err);
});
deleteInstance(request, optionsopt, callbackopt) → {Promise}
Delete an instance from a project.
Parameters:
Name | Type | Attributes | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedName = client.instancePath('[PROJECT]', '[INSTANCE]');
client.deleteInstance({name: formattedName}).catch(err => {
console.error(err);
});
getAppProfile(request, optionsopt, callbackopt) → {Promise}
Gets information about an app profile.
Parameters:
Name | Type | Attributes | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing AppProfile. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedName = client.appProfilePath('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]');
client.getAppProfile({name: formattedName})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
getCluster(request, optionsopt, callbackopt) → {Promise}
Gets information about a cluster.
Parameters:
Name | Type | Attributes | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing Cluster. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedName = client.clusterPath('[PROJECT]', '[INSTANCE]', '[CLUSTER]');
client.getCluster({name: formattedName})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
getIamPolicy(request, optionsopt, callbackopt) → {Promise}
Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing Policy. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedResource = client.instancePath('[PROJECT]', '[INSTANCE]');
client.getIamPolicy({resource: formattedResource})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
getInstance(request, optionsopt, callbackopt) → {Promise}
Gets information about an instance.
Parameters:
Name | Type | Attributes | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing Instance. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedName = client.instancePath('[PROJECT]', '[INSTANCE]');
client.getInstance({name: formattedName})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
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. |
instancePath(project, instance) → {String}
Return a fully-qualified instance resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
String | |
instance |
String |
listAppProfiles(request, optionsopt, callbackopt) → {Promise}
Lists information about app profiles in an instance.
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is Array of AppProfile. When autoPaginate: false is specified through options, it contains the result in a single response. If the response indicates the next page exists, the third parameter is set to be used for the next request object. The fourth parameter keeps the raw response object of an object representing ListAppProfilesResponse. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
// Iterate over all elements.
const formattedParent = client.instancePath('[PROJECT]', '[INSTANCE]');
client.listAppProfiles({parent: formattedParent})
.then(responses => {
const resources = responses[0];
for (const resource of resources) {
// doThingsWith(resource)
}
})
.catch(err => {
console.error(err);
});
// Or obtain the paged response.
const formattedParent = client.instancePath('[PROJECT]', '[INSTANCE]');
const options = {autoPaginate: false};
const callback = responses => {
// The actual resources in a response.
const resources = responses[0];
// The next request if the response shows that there are more responses.
const nextRequest = responses[1];
// The actual response object, if necessary.
// const rawResponse = responses[2];
for (const resource of resources) {
// doThingsWith(resource);
}
if (nextRequest) {
// Fetch the next page.
return client.listAppProfiles(nextRequest, options).then(callback);
}
}
client.listAppProfiles({parent: formattedParent}, options)
.then(callback)
.catch(err => {
console.error(err);
});
listAppProfilesStream(request, optionsopt) → {Stream}
Equivalent to listAppProfiles, but returns a NodeJS Stream object.
This fetches the paged responses for listAppProfiles 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> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedParent = client.instancePath('[PROJECT]', '[INSTANCE]');
client.listAppProfilesStream({parent: formattedParent})
.on('data', element => {
// doThingsWith(element)
}).on('error', err => {
console.log(err);
});
listClusters(request, optionsopt, callbackopt) → {Promise}
Lists information about clusters in an instance.
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing ListClustersResponse. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedParent = client.instancePath('[PROJECT]', '[INSTANCE]');
client.listClusters({parent: formattedParent})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
listInstances(request, optionsopt, callbackopt) → {Promise}
Lists information about instances in a project.
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing ListInstancesResponse. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedParent = client.projectPath('[PROJECT]');
client.listInstances({parent: formattedParent})
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
locationPath(project, location) → {String}
Return a fully-qualified location resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
String | |
location |
String |
matchAppProfileFromAppProfileName(appProfileName) → {String}
Parse the appProfileName from a app_profile resource.
Parameters:
Name | Type | Description |
---|---|---|
appProfileName |
String |
A fully-qualified path representing a app_profile resources. |
matchClusterFromClusterName(clusterName) → {String}
Parse the clusterName from a cluster resource.
Parameters:
Name | Type | Description |
---|---|---|
clusterName |
String |
A fully-qualified path representing a cluster resources. |
matchInstanceFromAppProfileName(appProfileName) → {String}
Parse the appProfileName from a app_profile resource.
Parameters:
Name | Type | Description |
---|---|---|
appProfileName |
String |
A fully-qualified path representing a app_profile resources. |
matchInstanceFromClusterName(clusterName) → {String}
Parse the clusterName from a cluster resource.
Parameters:
Name | Type | Description |
---|---|---|
clusterName |
String |
A fully-qualified path representing a cluster resources. |
matchInstanceFromInstanceName(instanceName) → {String}
Parse the instanceName from a instance resource.
Parameters:
Name | Type | Description |
---|---|---|
instanceName |
String |
A fully-qualified path representing a instance resources. |
matchLocationFromLocationName(locationName) → {String}
Parse the locationName from a location resource.
Parameters:
Name | Type | Description |
---|---|---|
locationName |
String |
A fully-qualified path representing a location resources. |
matchProjectFromAppProfileName(appProfileName) → {String}
Parse the appProfileName from a app_profile resource.
Parameters:
Name | Type | Description |
---|---|---|
appProfileName |
String |
A fully-qualified path representing a app_profile resources. |
matchProjectFromClusterName(clusterName) → {String}
Parse the clusterName from a cluster resource.
Parameters:
Name | Type | Description |
---|---|---|
clusterName |
String |
A fully-qualified path representing a cluster resources. |
matchProjectFromInstanceName(instanceName) → {String}
Parse the instanceName from a instance resource.
Parameters:
Name | Type | Description |
---|---|---|
instanceName |
String |
A fully-qualified path representing a instance resources. |
matchProjectFromLocationName(locationName) → {String}
Parse the locationName from a location resource.
Parameters:
Name | Type | Description |
---|---|---|
locationName |
String |
A fully-qualified path representing a location resources. |
matchProjectFromProjectName(projectName) → {String}
Parse the projectName from a project resource.
Parameters:
Name | Type | Description |
---|---|---|
projectName |
String |
A fully-qualified path representing a project resources. |
partialUpdateInstance(request, optionsopt, callbackopt) → {Promise}
Partially updates an instance within a project.
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
|||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is a gax.Operation object. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const instance = {};
const updateMask = {};
const request = {
instance: instance,
updateMask: updateMask,
};
// Handle the operation using the promise pattern.
client.partialUpdateInstance(request)
.then(responses => {
const [operation, initialApiResponse] = responses;
// Operation#promise starts polling for the completion of the LRO.
return operation.promise();
})
.then(responses => {
const result = responses[0];
const metadata = responses[1];
const finalApiResponse = responses[2];
})
.catch(err => {
console.error(err);
});
const instance = {};
const updateMask = {};
const request = {
instance: instance,
updateMask: updateMask,
};
// Handle the operation using the event emitter pattern.
client.partialUpdateInstance(request)
.then(responses => {
const [operation, initialApiResponse] = responses;
// Adding a listener for the "complete" event starts polling for the
// completion of the operation.
operation.on('complete', (result, metadata, finalApiResponse) => {
// doSomethingWith(result);
});
// Adding a listener for the "progress" event causes the callback to be
// called on any change in metadata when the operation is polled.
operation.on('progress', (metadata, apiResponse) => {
// doSomethingWith(metadata)
});
// Adding a listener for the "error" event handles any errors found during polling.
operation.on('error', err => {
// throw(err);
});
})
.catch(err => {
console.error(err);
});
const instance = {};
const updateMask = {};
const request = {
instance: instance,
updateMask: updateMask,
};
// Handle the operation using the await pattern.
const [operation] = await client.partialUpdateInstance(request);
const [response] = await operation.promise();
projectPath(project) → {String}
Return a fully-qualified project resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
String |
setIamPolicy(request, optionsopt, callbackopt) → {Promise}
Sets the access control policy on an instance resource. Replaces any existing policy.
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
|||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing Policy. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedResource = client.instancePath('[PROJECT]', '[INSTANCE]');
const policy = {};
const request = {
resource: formattedResource,
policy: policy,
};
client.setIamPolicy(request)
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
testIamPermissions(request, optionsopt, callbackopt) → {Promise}
Returns permissions that the caller has on the specified instance resource.
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
|||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing TestIamPermissionsResponse. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedResource = client.instancePath('[PROJECT]', '[INSTANCE]');
const permissions = [];
const request = {
resource: formattedResource,
permissions: permissions,
};
client.testIamPermissions(request)
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});
updateAppProfile(request, optionsopt, callbackopt) → {Promise}
Updates an app profile within an instance.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is a gax.Operation object. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const appProfile = {};
const updateMask = {};
const request = {
appProfile: appProfile,
updateMask: updateMask,
};
// Handle the operation using the promise pattern.
client.updateAppProfile(request)
.then(responses => {
const [operation, initialApiResponse] = responses;
// Operation#promise starts polling for the completion of the LRO.
return operation.promise();
})
.then(responses => {
const result = responses[0];
const metadata = responses[1];
const finalApiResponse = responses[2];
})
.catch(err => {
console.error(err);
});
const appProfile = {};
const updateMask = {};
const request = {
appProfile: appProfile,
updateMask: updateMask,
};
// Handle the operation using the event emitter pattern.
client.updateAppProfile(request)
.then(responses => {
const [operation, initialApiResponse] = responses;
// Adding a listener for the "complete" event starts polling for the
// completion of the operation.
operation.on('complete', (result, metadata, finalApiResponse) => {
// doSomethingWith(result);
});
// Adding a listener for the "progress" event causes the callback to be
// called on any change in metadata when the operation is polled.
operation.on('progress', (metadata, apiResponse) => {
// doSomethingWith(metadata)
});
// Adding a listener for the "error" event handles any errors found during polling.
operation.on('error', err => {
// throw(err);
});
})
.catch(err => {
console.error(err);
});
const appProfile = {};
const updateMask = {};
const request = {
appProfile: appProfile,
updateMask: updateMask,
};
// Handle the operation using the await pattern.
const [operation] = await client.updateAppProfile(request);
const [response] = await operation.promise();
updateCluster(request, optionsopt, callbackopt) → {Promise}
Updates a cluster within an instance.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is a gax.Operation object. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedName = client.clusterPath('[PROJECT]', '[INSTANCE]', '[CLUSTER]');
const serveNodes = 0;
const request = {
name: formattedName,
serveNodes: serveNodes,
};
// Handle the operation using the promise pattern.
client.updateCluster(request)
.then(responses => {
const [operation, initialApiResponse] = responses;
// Operation#promise starts polling for the completion of the LRO.
return operation.promise();
})
.then(responses => {
const result = responses[0];
const metadata = responses[1];
const finalApiResponse = responses[2];
})
.catch(err => {
console.error(err);
});
const formattedName = client.clusterPath('[PROJECT]', '[INSTANCE]', '[CLUSTER]');
const serveNodes = 0;
const request = {
name: formattedName,
serveNodes: serveNodes,
};
// Handle the operation using the event emitter pattern.
client.updateCluster(request)
.then(responses => {
const [operation, initialApiResponse] = responses;
// Adding a listener for the "complete" event starts polling for the
// completion of the operation.
operation.on('complete', (result, metadata, finalApiResponse) => {
// doSomethingWith(result);
});
// Adding a listener for the "progress" event causes the callback to be
// called on any change in metadata when the operation is polled.
operation.on('progress', (metadata, apiResponse) => {
// doSomethingWith(metadata)
});
// Adding a listener for the "error" event handles any errors found during polling.
operation.on('error', err => {
// throw(err);
});
})
.catch(err => {
console.error(err);
});
const formattedName = client.clusterPath('[PROJECT]', '[INSTANCE]', '[CLUSTER]');
const serveNodes = 0;
const request = {
name: formattedName,
serveNodes: serveNodes,
};
// Handle the operation using the await pattern.
const [operation] = await client.updateCluster(request);
const [response] = await operation.promise();
updateInstance(request, optionsopt, callbackopt) → {Promise}
Updates an instance within a project.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||
options |
Object |
<optional> |
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
||||||||||||||||||||||||
callback |
function |
<optional> |
The function which will be called with the result of the API call. The second parameter to the callback is an object representing Instance. |
Example
const admin = require('admin.v2');
const client = new admin.v2.BigtableInstanceAdminClient({
// optional auth parameters.
});
const formattedName = client.instancePath('[PROJECT]', '[INSTANCE]');
const displayName = '';
const type = 'TYPE_UNSPECIFIED';
const labels = {};
const request = {
name: formattedName,
displayName: displayName,
type: type,
labels: labels,
};
client.updateInstance(request)
.then(responses => {
const response = responses[0];
// doThingsWith(response)
})
.catch(err => {
console.error(err);
});