Constructor
new BigtableInstanceAdminClient(optionsopt, gaxInstanceopt)
Construct an instance of BigtableInstanceAdminClient.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
The configuration object. The options accepted by the constructor are described in detail in this document. The common options are: Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||
gaxInstance |
gax |
<optional> |
loaded instance of |
Members
apiEndpoint
The DNS address for this API service.
apiEndpoint
The DNS address for this API service - same as servicePath.
port
The port for this API service.
scopes
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
The DNS address for this API service.
Methods
appProfilePath(project, instance, app_profile) → {string}
Return a fully-qualified appProfile resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string | |
instance |
string | |
app_profile |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |
authorizedViewPath(project, instance, table, authorized_view) → {string}
Return a fully-qualified authorizedView resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string | |
instance |
string | |
table |
string | |
authorized_view |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |
backupPath(project, instance, cluster, backup) → {string}
Return a fully-qualified backup resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string | |
instance |
string | |
cluster |
string | |
backup |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |
(async) checkCreateClusterProgress(name) → {Promise}
Check the status of the long running operation returned by createCluster()
.
Parameters:
Name | Type | Description |
---|---|---|
name |
String |
The operation name that will be passed. |
Returns:
Type | Description |
---|---|
Promise |
|
Example
/**
* 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 unique name of the instance in which to create the new
* cluster. Values are of the form `projects/{project}/instances/{instance}`.
*/
// const parent = 'abc123'
/**
* Required. The ID to be used when referring to the new cluster within its
* instance, e.g., just `mycluster` rather than
* `projects/myproject/instances/myinstance/clusters/mycluster`.
*/
// const clusterId = 'abc123'
/**
* Required. The cluster to be created.
* Fields marked `OutputOnly` must be left blank.
*/
// const cluster = {}
// Imports the Admin library
const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;
// Instantiates a client
const adminClient = new BigtableInstanceAdminClient();
async function callCreateCluster() {
// Construct request
const request = {
parent,
clusterId,
cluster,
};
// Run request
const [operation] = await adminClient.createCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateCluster();
(async) checkCreateInstanceProgress(name) → {Promise}
Check the status of the long running operation returned by createInstance()
.
Parameters:
Name | Type | Description |
---|---|---|
name |
String |
The operation name that will be passed. |
Returns:
Type | Description |
---|---|
Promise |
|
Example
/**
* 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 unique name of the project in which to create the new
* instance. Values are of the form `projects/{project}`.
*/
// const parent = 'abc123'
/**
* Required. The ID to be used when referring to the new instance within its
* project, e.g., just `myinstance` rather than
* `projects/myproject/instances/myinstance`.
*/
// const instanceId = 'abc123'
/**
* Required. The instance to create.
* Fields marked `OutputOnly` must be left blank.
*/
// const instance = {}
/**
* Required. The clusters to be created within the instance, mapped by desired
* cluster ID, e.g., just `mycluster` rather than
* `projects/myproject/instances/myinstance/clusters/mycluster`.
* Fields marked `OutputOnly` must be left blank.
*/
// const clusters = [1,2,3,4]
// Imports the Admin library
const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;
// Instantiates a client
const adminClient = new BigtableInstanceAdminClient();
async function callCreateInstance() {
// Construct request
const request = {
parent,
instanceId,
instance,
clusters,
};
// Run request
const [operation] = await adminClient.createInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateInstance();
(async) checkCreateLogicalViewProgress(name) → {Promise}
Check the status of the long running operation returned by createLogicalView()
.
Parameters:
Name | Type | Description |
---|---|---|
name |
String |
The operation name that will be passed. |
Returns:
Type | Description |
---|---|
Promise |
|
Example
/**
* 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 instance where this logical view will be created.
* Format: `projects/{project}/instances/{instance}`.
*/
// const parent = 'abc123'
/**
* Required. The ID to use for the logical view, which will become the final
* component of the logical view's resource name.
*/
// const logicalViewId = 'abc123'
/**
* Required. The logical view to create.
*/
// const logicalView = {}
// Imports the Admin library
const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;
// Instantiates a client
const adminClient = new BigtableInstanceAdminClient();
async function callCreateLogicalView() {
// Construct request
const request = {
parent,
logicalViewId,
logicalView,
};
// Run request
const [operation] = await adminClient.createLogicalView(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateLogicalView();
(async) checkCreateMaterializedViewProgress(name) → {Promise}
Check the status of the long running operation returned by createMaterializedView()
.
Parameters:
Name | Type | Description |
---|---|---|
name |
String |
The operation name that will be passed. |
Returns:
Type | Description |
---|---|
Promise |
|
Example
/**
* 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 instance where this materialized view will be created.
* Format: `projects/{project}/instances/{instance}`.
*/
// const parent = 'abc123'
/**
* Required. The ID to use for the materialized view, which will become the
* final component of the materialized view's resource name.
*/
// const materializedViewId = 'abc123'
/**
* Required. The materialized view to create.
*/
// const materializedView = {}
// Imports the Admin library
const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;
// Instantiates a client
const adminClient = new BigtableInstanceAdminClient();
async function callCreateMaterializedView() {
// Construct request
const request = {
parent,
materializedViewId,
materializedView,
};
// Run request
const [operation] = await adminClient.createMaterializedView(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateMaterializedView();
(async) checkPartialUpdateClusterProgress(name) → {Promise}
Check the status of the long running operation returned by partialUpdateCluster()
.
Parameters:
Name | Type | Description |
---|---|---|
name |
String |
The operation name that will be passed. |
Returns:
Type | Description |
---|---|
Promise |
|
Example
/**
* 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 Cluster which contains the partial updates to be applied,
* subject to the update_mask.
*/
// const cluster = {}
/**
* Required. The subset of Cluster fields which should be replaced.
*/
// const updateMask = {}
// Imports the Admin library
const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;
// Instantiates a client
const adminClient = new BigtableInstanceAdminClient();
async function callPartialUpdateCluster() {
// Construct request
const request = {
cluster,
updateMask,
};
// Run request
const [operation] = await adminClient.partialUpdateCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callPartialUpdateCluster();
(async) checkPartialUpdateInstanceProgress(name) → {Promise}
Check the status of the long running operation returned by partialUpdateInstance()
.
Parameters:
Name | Type | Description |
---|---|---|
name |
String |
The operation name that will be passed. |
Returns:
Type | Description |
---|---|
Promise |
|
Example
/**
* 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 Instance which will (partially) replace the current value.
*/
// const instance = {}
/**
* Required. The subset of Instance fields which should be replaced.
* Must be explicitly set.
*/
// const updateMask = {}
// Imports the Admin library
const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;
// Instantiates a client
const adminClient = new BigtableInstanceAdminClient();
async function callPartialUpdateInstance() {
// Construct request
const request = {
instance,
updateMask,
};
// Run request
const [operation] = await adminClient.partialUpdateInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callPartialUpdateInstance();
(async) checkUpdateAppProfileProgress(name) → {Promise}
Check the status of the long running operation returned by updateAppProfile()
.
Parameters:
Name | Type | Description |
---|---|---|
name |
String |
The operation name that will be passed. |
Returns:
Type | Description |
---|---|
Promise |
|
Example
/**
* 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 app profile which will (partially) replace the current value.
*/
// const appProfile = {}
/**
* Required. The subset of app profile fields which should be replaced.
* If unset, all fields will be replaced.
*/
// const updateMask = {}
/**
* If true, ignore safety checks when updating the app profile.
*/
// const ignoreWarnings = true
// Imports the Admin library
const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;
// Instantiates a client
const adminClient = new BigtableInstanceAdminClient();
async function callUpdateAppProfile() {
// Construct request
const request = {
appProfile,
updateMask,
};
// Run request
const [operation] = await adminClient.updateAppProfile(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateAppProfile();
(async) checkUpdateClusterProgress(name) → {Promise}
Check the status of the long running operation returned by updateCluster()
.
Parameters:
Name | Type | Description |
---|---|---|
name |
String |
The operation name that will be passed. |
Returns:
Type | Description |
---|---|
Promise |
|
Example
/**
* 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.
*/
/**
* The unique name of the cluster. Values are of the form
* `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`.
*/
// const name = 'abc123'
/**
* Immutable. The location where this cluster's nodes and storage reside. For
* best performance, clients should be located as close as possible to this
* cluster. Currently only zones are supported, so values should be of the
* form `projects/{project}/locations/{zone}`.
*/
// const location = 'abc123'
/**
* Output only. The current state of the cluster.
*/
// const state = {}
/**
* The number of nodes in the cluster. If no value is set,
* Cloud Bigtable automatically allocates nodes based on your data footprint
* and optimized for 50% storage utilization.
*/
// const serveNodes = 1234
/**
* Immutable. The node scaling factor of this cluster.
*/
// const nodeScalingFactor = {}
/**
* Configuration for this cluster.
*/
// const clusterConfig = {}
/**
* Immutable. The type of storage used by this cluster to serve its
* parent instance's tables, unless explicitly overridden.
*/
// const defaultStorageType = {}
/**
* Immutable. The encryption configuration for CMEK-protected clusters.
*/
// const encryptionConfig = {}
// Imports the Admin library
const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;
// Instantiates a client
const adminClient = new BigtableInstanceAdminClient();
async function callUpdateCluster() {
// Construct request
const request = {
location,
state,
nodeScalingFactor,
defaultStorageType,
encryptionConfig,
};
// Run request
const [operation] = await adminClient.updateCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateCluster();
(async) checkUpdateLogicalViewProgress(name) → {Promise}
Check the status of the long running operation returned by updateLogicalView()
.
Parameters:
Name | Type | Description |
---|---|---|
name |
String |
The operation name that will be passed. |
Returns:
Type | Description |
---|---|
Promise |
|
Example
/**
* 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 logical view to update.
* The logical view's `name` field is used to identify the view to update.
* Format:
* `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
*/
// const logicalView = {}
/**
* Optional. The list of fields to update.
*/
// const updateMask = {}
// Imports the Admin library
const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;
// Instantiates a client
const adminClient = new BigtableInstanceAdminClient();
async function callUpdateLogicalView() {
// Construct request
const request = {
logicalView,
};
// Run request
const [operation] = await adminClient.updateLogicalView(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateLogicalView();
(async) checkUpdateMaterializedViewProgress(name) → {Promise}
Check the status of the long running operation returned by updateMaterializedView()
.
Parameters:
Name | Type | Description |
---|---|---|
name |
String |
The operation name that will be passed. |
Returns:
Type | Description |
---|---|
Promise |
|
Example
/**
* 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 materialized view to update.
* The materialized view's `name` field is used to identify the view to
* update. Format:
* `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
*/
// const materializedView = {}
/**
* Optional. The list of fields to update.
*/
// const updateMask = {}
// Imports the Admin library
const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;
// Instantiates a client
const adminClient = new BigtableInstanceAdminClient();
async function callUpdateMaterializedView() {
// Construct request
const request = {
materializedView,
};
// Run request
const [operation] = await adminClient.updateMaterializedView(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateMaterializedView();
close() → {Promise}
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 |
A promise that resolves when the client is closed. |
clusterPath(project, instance, cluster) → {string}
Return a fully-qualified cluster resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string | |
instance |
string | |
cluster |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |
getProjectId() → {Promise}
Return the project ID used by this class.
Returns:
Type | Description |
---|---|
Promise |
A promise that resolves to string containing the project ID. |
hotTabletPath(project, instance, cluster, hot_tablet) → {string}
Return a fully-qualified hotTablet resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string | |
instance |
string | |
cluster |
string | |
hot_tablet |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |
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.
Returns:
Type | Description |
---|---|
Promise |
A promise that resolves to an authenticated service stub. |
instancePath(project, instance) → {string}
Return a fully-qualified instance resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string | |
instance |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |
listAppProfilesAsync(request, optionsopt) → {Object}
Equivalent to listAppProfiles
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements 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. |
Returns:
Type | Description |
---|---|
Object |
An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing AppProfile. 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. |
Example
/**
* 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 unique name of the instance for which a list of app profiles
* is requested. Values are of the form
* `projects/{project}/instances/{instance}`.
* Use `{instance} = '-'` to list AppProfiles for all Instances in a project,
* e.g., `projects/myproject/instances/-`.
*/
// const parent = 'abc123'
/**
* Maximum number of results per page.
* A page_size of zero lets the server choose the number of items to return.
* A page_size which is strictly positive will return at most that many items.
* A negative page_size will cause an error.
* Following the first request, subsequent paginated calls are not required
* to pass a page_size. If a page_size is set in subsequent calls, it must
* match the page_size given in the first request.
*/
// const pageSize = 1234
/**
* The value of `next_page_token` returned by a previous call.
*/
// const pageToken = 'abc123'
// Imports the Admin library
const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;
// Instantiates a client
const adminClient = new BigtableInstanceAdminClient();
async function callListAppProfiles() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = adminClient.listAppProfilesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListAppProfiles();
listAppProfilesStream(request, optionsopt) → {Stream}
Equivalent to listAppProfiles
, but returns a NodeJS Stream object.
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. |
Returns:
Type | Description |
---|---|
Stream |
An object stream which emits an object representing AppProfile 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 |
listHotTabletsAsync(request, optionsopt) → {Object}
Equivalent to listHotTablets
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements 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. |
Returns:
Type | Description |
---|---|
Object |
An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing HotTablet. 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. |
Example
/**
* 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 cluster name to list hot tablets.
* Value is in the following form:
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
*/
// const parent = 'abc123'
/**
* The start time to list hot tablets. The hot tablets in the response will
* have start times between the requested start time and end time. Start time
* defaults to Now if it is unset, and end time defaults to Now - 24 hours if
* it is unset. The start time should be less than the end time, and the
* maximum allowed time range between start time and end time is 48 hours.
* Start time and end time should have values between Now and Now - 14 days.
*/
// const startTime = {}
/**
* The end time to list hot tablets.
*/
// const endTime = {}
/**
* Maximum number of results per page.
* A page_size that is empty or zero lets the server choose the number of
* items to return. A page_size which is strictly positive will return at most
* that many items. A negative page_size will cause an error.
* Following the first request, subsequent paginated calls do not need a
* page_size field. If a page_size is set in subsequent calls, it must match
* the page_size given in the first request.
*/
// const pageSize = 1234
/**
* The value of `next_page_token` returned by a previous call.
*/
// const pageToken = 'abc123'
// Imports the Admin library
const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;
// Instantiates a client
const adminClient = new BigtableInstanceAdminClient();
async function callListHotTablets() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = adminClient.listHotTabletsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListHotTablets();
listHotTabletsStream(request, optionsopt) → {Stream}
Equivalent to listHotTablets
, but returns a NodeJS Stream object.
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. |
Returns:
Type | Description |
---|---|
Stream |
An object stream which emits an object representing HotTablet 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 |
listLogicalViewsAsync(request, optionsopt) → {Object}
Equivalent to listLogicalViews
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements 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. |
Returns:
Type | Description |
---|---|
Object |
An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing LogicalView. 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. |
Example
/**
* 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 unique name of the instance for which the list of logical
* views is requested. Values are of the form
* `projects/{project}/instances/{instance}`.
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of logical views to return. The service may
* return fewer than this value
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous `ListLogicalViews` call.
* Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListLogicalViews` must
* match the call that provided the page token.
*/
// const pageToken = 'abc123'
// Imports the Admin library
const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;
// Instantiates a client
const adminClient = new BigtableInstanceAdminClient();
async function callListLogicalViews() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = adminClient.listLogicalViewsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListLogicalViews();
listLogicalViewsStream(request, optionsopt) → {Stream}
Equivalent to listLogicalViews
, but returns a NodeJS Stream object.
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. |
Returns:
Type | Description |
---|---|
Stream |
An object stream which emits an object representing LogicalView 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 |
listMaterializedViewsAsync(request, optionsopt) → {Object}
Equivalent to listMaterializedViews
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements 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. |
Returns:
Type | Description |
---|---|
Object |
An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing MaterializedView. 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. |
Example
/**
* 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 unique name of the instance for which the list of
* materialized views is requested. Values are of the form
* `projects/{project}/instances/{instance}`.
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of materialized views to return. The service
* may return fewer than this value
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous `ListMaterializedViews`
* call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListMaterializedViews`
* must match the call that provided the page token.
*/
// const pageToken = 'abc123'
// Imports the Admin library
const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;
// Instantiates a client
const adminClient = new BigtableInstanceAdminClient();
async function callListMaterializedViews() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = adminClient.listMaterializedViewsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListMaterializedViews();
listMaterializedViewsStream(request, optionsopt) → {Stream}
Equivalent to listMaterializedViews
, but returns a NodeJS Stream object.
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. |
Returns:
Type | Description |
---|---|
Stream |
An object stream which emits an object representing MaterializedView 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 |
logicalViewPath(project, instance, logical_view) → {string}
Return a fully-qualified logicalView resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string | |
instance |
string | |
logical_view |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |
matchAppProfileFromAppProfileName(appProfileName) → {string}
Parse the app_profile from AppProfile resource.
Parameters:
Name | Type | Description |
---|---|---|
appProfileName |
string |
A fully-qualified path representing AppProfile resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the app_profile. |
matchAuthorizedViewFromAuthorizedViewName(authorizedViewName) → {string}
Parse the authorized_view from AuthorizedView resource.
Parameters:
Name | Type | Description |
---|---|---|
authorizedViewName |
string |
A fully-qualified path representing AuthorizedView resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the authorized_view. |
matchBackupFromBackupName(backupName) → {string}
Parse the backup from Backup resource.
Parameters:
Name | Type | Description |
---|---|---|
backupName |
string |
A fully-qualified path representing Backup resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the backup. |
matchClusterFromBackupName(backupName) → {string}
Parse the cluster from Backup resource.
Parameters:
Name | Type | Description |
---|---|---|
backupName |
string |
A fully-qualified path representing Backup resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the cluster. |
matchClusterFromClusterName(clusterName) → {string}
Parse the cluster from Cluster resource.
Parameters:
Name | Type | Description |
---|---|---|
clusterName |
string |
A fully-qualified path representing Cluster resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the cluster. |
matchClusterFromHotTabletName(hotTabletName) → {string}
Parse the cluster from HotTablet resource.
Parameters:
Name | Type | Description |
---|---|---|
hotTabletName |
string |
A fully-qualified path representing HotTablet resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the cluster. |
matchClusterFromSnapshotName(snapshotName) → {string}
Parse the cluster from Snapshot resource.
Parameters:
Name | Type | Description |
---|---|---|
snapshotName |
string |
A fully-qualified path representing Snapshot resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the cluster. |
matchHotTabletFromHotTabletName(hotTabletName) → {string}
Parse the hot_tablet from HotTablet resource.
Parameters:
Name | Type | Description |
---|---|---|
hotTabletName |
string |
A fully-qualified path representing HotTablet resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the hot_tablet. |
matchInstanceFromAppProfileName(appProfileName) → {string}
Parse the instance from AppProfile resource.
Parameters:
Name | Type | Description |
---|---|---|
appProfileName |
string |
A fully-qualified path representing AppProfile resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the instance. |
matchInstanceFromAuthorizedViewName(authorizedViewName) → {string}
Parse the instance from AuthorizedView resource.
Parameters:
Name | Type | Description |
---|---|---|
authorizedViewName |
string |
A fully-qualified path representing AuthorizedView resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the instance. |
matchInstanceFromBackupName(backupName) → {string}
Parse the instance from Backup resource.
Parameters:
Name | Type | Description |
---|---|---|
backupName |
string |
A fully-qualified path representing Backup resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the instance. |
matchInstanceFromClusterName(clusterName) → {string}
Parse the instance from Cluster resource.
Parameters:
Name | Type | Description |
---|---|---|
clusterName |
string |
A fully-qualified path representing Cluster resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the instance. |
matchInstanceFromHotTabletName(hotTabletName) → {string}
Parse the instance from HotTablet resource.
Parameters:
Name | Type | Description |
---|---|---|
hotTabletName |
string |
A fully-qualified path representing HotTablet resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the instance. |
matchInstanceFromInstanceName(instanceName) → {string}
Parse the instance from Instance resource.
Parameters:
Name | Type | Description |
---|---|---|
instanceName |
string |
A fully-qualified path representing Instance resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the instance. |
matchInstanceFromLogicalViewName(logicalViewName) → {string}
Parse the instance from LogicalView resource.
Parameters:
Name | Type | Description |
---|---|---|
logicalViewName |
string |
A fully-qualified path representing LogicalView resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the instance. |
matchInstanceFromMaterializedViewName(materializedViewName) → {string}
Parse the instance from MaterializedView resource.
Parameters:
Name | Type | Description |
---|---|---|
materializedViewName |
string |
A fully-qualified path representing MaterializedView resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the instance. |
matchInstanceFromSnapshotName(snapshotName) → {string}
Parse the instance from Snapshot resource.
Parameters:
Name | Type | Description |
---|---|---|
snapshotName |
string |
A fully-qualified path representing Snapshot resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the instance. |
matchInstanceFromTableName(tableName) → {string}
Parse the instance from Table resource.
Parameters:
Name | Type | Description |
---|---|---|
tableName |
string |
A fully-qualified path representing Table resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the instance. |
matchLogicalViewFromLogicalViewName(logicalViewName) → {string}
Parse the logical_view from LogicalView resource.
Parameters:
Name | Type | Description |
---|---|---|
logicalViewName |
string |
A fully-qualified path representing LogicalView resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the logical_view. |
matchMaterializedViewFromMaterializedViewName(materializedViewName) → {string}
Parse the materialized_view from MaterializedView resource.
Parameters:
Name | Type | Description |
---|---|---|
materializedViewName |
string |
A fully-qualified path representing MaterializedView resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the materialized_view. |
matchProjectFromAppProfileName(appProfileName) → {string}
Parse the project from AppProfile resource.
Parameters:
Name | Type | Description |
---|---|---|
appProfileName |
string |
A fully-qualified path representing AppProfile resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchProjectFromAuthorizedViewName(authorizedViewName) → {string}
Parse the project from AuthorizedView resource.
Parameters:
Name | Type | Description |
---|---|---|
authorizedViewName |
string |
A fully-qualified path representing AuthorizedView resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchProjectFromBackupName(backupName) → {string}
Parse the project from Backup resource.
Parameters:
Name | Type | Description |
---|---|---|
backupName |
string |
A fully-qualified path representing Backup resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchProjectFromClusterName(clusterName) → {string}
Parse the project from Cluster resource.
Parameters:
Name | Type | Description |
---|---|---|
clusterName |
string |
A fully-qualified path representing Cluster resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchProjectFromHotTabletName(hotTabletName) → {string}
Parse the project from HotTablet resource.
Parameters:
Name | Type | Description |
---|---|---|
hotTabletName |
string |
A fully-qualified path representing HotTablet resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchProjectFromInstanceName(instanceName) → {string}
Parse the project from Instance resource.
Parameters:
Name | Type | Description |
---|---|---|
instanceName |
string |
A fully-qualified path representing Instance resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchProjectFromLogicalViewName(logicalViewName) → {string}
Parse the project from LogicalView resource.
Parameters:
Name | Type | Description |
---|---|---|
logicalViewName |
string |
A fully-qualified path representing LogicalView resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchProjectFromMaterializedViewName(materializedViewName) → {string}
Parse the project from MaterializedView resource.
Parameters:
Name | Type | Description |
---|---|---|
materializedViewName |
string |
A fully-qualified path representing MaterializedView resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchProjectFromProjectName(projectName) → {string}
Parse the project from Project resource.
Parameters:
Name | Type | Description |
---|---|---|
projectName |
string |
A fully-qualified path representing Project resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchProjectFromSnapshotName(snapshotName) → {string}
Parse the project from Snapshot resource.
Parameters:
Name | Type | Description |
---|---|---|
snapshotName |
string |
A fully-qualified path representing Snapshot resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchProjectFromTableName(tableName) → {string}
Parse the project from Table resource.
Parameters:
Name | Type | Description |
---|---|---|
tableName |
string |
A fully-qualified path representing Table resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchSnapshotFromSnapshotName(snapshotName) → {string}
Parse the snapshot from Snapshot resource.
Parameters:
Name | Type | Description |
---|---|---|
snapshotName |
string |
A fully-qualified path representing Snapshot resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the snapshot. |
matchTableFromAuthorizedViewName(authorizedViewName) → {string}
Parse the table from AuthorizedView resource.
Parameters:
Name | Type | Description |
---|---|---|
authorizedViewName |
string |
A fully-qualified path representing AuthorizedView resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the table. |
matchTableFromTableName(tableName) → {string}
Parse the table from Table resource.
Parameters:
Name | Type | Description |
---|---|---|
tableName |
string |
A fully-qualified path representing Table resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the table. |
materializedViewPath(project, instance, materialized_view) → {string}
Return a fully-qualified materializedView resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string | |
instance |
string | |
materialized_view |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |
projectPath(project) → {string}
Return a fully-qualified project resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |
snapshotPath(project, instance, cluster, snapshot) → {string}
Return a fully-qualified snapshot resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string | |
instance |
string | |
cluster |
string | |
snapshot |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |
tablePath(project, instance, table) → {string}
Return a fully-qualified table resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string | |
instance |
string | |
table |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |