@Generated(value="by gapic-generator-java") public class BaseBigtableTableAdminClient extends Object implements com.google.api.gax.core.BackgroundResource
Provides access to the table schemas only, not the data stored within the tables.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
String tableId = "tableId-1552905847";
Table table = Table.newBuilder().build();
Table response = baseBigtableTableAdminClient.createTable(parent, tableId, table);
}
Note: close() needs to be called on the BaseBigtableTableAdminClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
CreateTable |
Creates a new table in the specified instance. The table can be created with a full set of initial column families, specified in the request. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateTableFromSnapshot |
Creates a new table from the specified snapshot. The target table must not exist. The snapshot and the table must be in the same instance. Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListTables |
Lists all tables served from a specified instance. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetTable |
Gets metadata information about the specified table. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateTable |
Updates a specified table. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTable |
Permanently deletes a specified table and all of its data. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UndeleteTable |
Restores a specified table which was accidentally deleted. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateAuthorizedView |
Creates a new AuthorizedView in a table. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListAuthorizedViews |
Lists all AuthorizedViews from a specific table. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetAuthorizedView |
Gets information from a specified AuthorizedView. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateAuthorizedView |
Updates an AuthorizedView in a table. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteAuthorizedView |
Permanently deletes a specified AuthorizedView. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ModifyColumnFamilies |
Performs a series of column family modifications on the specified table. Either all or none of the modifications will occur before this method returns, but data requests received prior to that point may see a table where only some modifications have taken effect. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DropRowRange |
Permanently drop/delete a row range from a specified table. The request can specify whether to delete all rows in a table, or only those that match a particular prefix. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GenerateConsistencyToken |
Generates a consistency token for a Table, which can be used in CheckConsistency to check whether mutations to the table that finished before this call started have been replicated. The tokens will be available for 90 days. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CheckConsistency |
Checks replication consistency based on a consistency token, that is, if replication has caught up based on the conditions specified in the token and the check request. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SnapshotTable |
Creates a new snapshot in the specified cluster from the specified source table. The cluster and the table must be in the same instance. Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetSnapshot |
Gets metadata information about the specified snapshot. Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListSnapshots |
Lists all snapshots associated with the specified cluster. Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteSnapshot |
Permanently deletes the specified snapshot. Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateBackup |
Starts creating a new Cloud Bigtable Backup. The returned backup [long-running operation][google.longrunning.Operation] can be used to track creation of the backup. The [metadata][google.longrunning.Operation.metadata] field type is [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The [response][google.longrunning.Operation.response] field type is [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the returned operation will stop the creation and delete the backup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetBackup |
Gets metadata on a pending or completed Cloud Bigtable Backup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateBackup |
Updates a pending or completed Cloud Bigtable Backup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteBackup |
Deletes a pending or completed Cloud Bigtable backup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListBackups |
Lists Cloud Bigtable backups. Returns both completed and pending backups. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RestoreTable |
Create a new table by restoring from a completed backup. The returned table [long-running operation][google.longrunning.Operation] can be used to track the progress of the operation, and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The [response][google.longrunning.Operation.response] type is [Table][google.bigtable.admin.v2.Table], if successful. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CopyBackup |
Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the destination instance and project. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIamPolicy |
Gets the access control policy for a Bigtable resource. Returns an empty policy if the resource exists but does not have a policy set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on a Bigtable resource. Replaces any existing policy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
Returns permissions that the caller has on the specified Bigtable resource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateSchemaBundle |
Creates a new schema bundle in the specified table. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateSchemaBundle |
Updates a schema bundle in the specified table. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetSchemaBundle |
Gets metadata information about the specified schema bundle. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListSchemaBundles |
Lists all schema bundles associated with the specified table. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteSchemaBundle |
Deletes a schema bundle in the specified table. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of BaseBigtableTableAdminSettings to create(). For example:
To customize credentials:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
BaseBigtableTableAdminSettings baseBigtableTableAdminSettings =
BaseBigtableTableAdminSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create(baseBigtableTableAdminSettings);
To customize the endpoint:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
BaseBigtableTableAdminSettings baseBigtableTableAdminSettings =
BaseBigtableTableAdminSettings.newBuilder().setEndpoint(myEndpoint).build();
BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create(baseBigtableTableAdminSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier | Constructor and Description |
|---|---|
protected |
BaseBigtableTableAdminClient(BaseBigtableTableAdminSettings settings)
Constructs an instance of BaseBigtableTableAdminClient, using the given settings.
|
protected |
BaseBigtableTableAdminClient(BigtableTableAdminStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
CheckConsistencyResponse |
checkConsistency(CheckConsistencyRequest request)
Checks replication consistency based on a consistency token, that is, if replication has caught
up based on the conditions specified in the token and the check request.
|
CheckConsistencyResponse |
checkConsistency(String name,
String consistencyToken)
Checks replication consistency based on a consistency token, that is, if replication has caught
up based on the conditions specified in the token and the check request.
|
CheckConsistencyResponse |
checkConsistency(TableName name,
String consistencyToken)
Checks replication consistency based on a consistency token, that is, if replication has caught
up based on the conditions specified in the token and the check request.
|
com.google.api.gax.rpc.UnaryCallable<CheckConsistencyRequest,CheckConsistencyResponse> |
checkConsistencyCallable()
Checks replication consistency based on a consistency token, that is, if replication has caught
up based on the conditions specified in the token and the check request.
|
void |
close() |
com.google.api.gax.longrunning.OperationFuture<Backup,CopyBackupMetadata> |
copyBackupAsync(ClusterName parent,
String backupId,
BackupName sourceBackup,
com.google.protobuf.Timestamp expireTime)
Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the
destination instance and project.
|
com.google.api.gax.longrunning.OperationFuture<Backup,CopyBackupMetadata> |
copyBackupAsync(ClusterName parent,
String backupId,
String sourceBackup,
com.google.protobuf.Timestamp expireTime)
Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the
destination instance and project.
|
com.google.api.gax.longrunning.OperationFuture<Backup,CopyBackupMetadata> |
copyBackupAsync(CopyBackupRequest request)
Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the
destination instance and project.
|
com.google.api.gax.longrunning.OperationFuture<Backup,CopyBackupMetadata> |
copyBackupAsync(String parent,
String backupId,
BackupName sourceBackup,
com.google.protobuf.Timestamp expireTime)
Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the
destination instance and project.
|
com.google.api.gax.longrunning.OperationFuture<Backup,CopyBackupMetadata> |
copyBackupAsync(String parent,
String backupId,
String sourceBackup,
com.google.protobuf.Timestamp expireTime)
Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the
destination instance and project.
|
com.google.api.gax.rpc.UnaryCallable<CopyBackupRequest,com.google.longrunning.Operation> |
copyBackupCallable()
Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the
destination instance and project.
|
com.google.api.gax.rpc.OperationCallable<CopyBackupRequest,Backup,CopyBackupMetadata> |
copyBackupOperationCallable()
Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the
destination instance and project.
|
protected static BaseBigtableTableAdminClient |
create()
Constructs an instance of BaseBigtableTableAdminClient with default settings.
|
protected static BaseBigtableTableAdminClient |
create(BaseBigtableTableAdminSettings settings)
Constructs an instance of BaseBigtableTableAdminClient, using the given settings.
|
protected static BaseBigtableTableAdminClient |
create(BigtableTableAdminStub stub)
Constructs an instance of BaseBigtableTableAdminClient, using the given stub for making calls.
|
com.google.api.gax.longrunning.OperationFuture<AuthorizedView,CreateAuthorizedViewMetadata> |
createAuthorizedViewAsync(CreateAuthorizedViewRequest request)
Creates a new AuthorizedView in a table.
|
com.google.api.gax.longrunning.OperationFuture<AuthorizedView,CreateAuthorizedViewMetadata> |
createAuthorizedViewAsync(String parent,
AuthorizedView authorizedView,
String authorizedViewId)
Creates a new AuthorizedView in a table.
|
com.google.api.gax.longrunning.OperationFuture<AuthorizedView,CreateAuthorizedViewMetadata> |
createAuthorizedViewAsync(TableName parent,
AuthorizedView authorizedView,
String authorizedViewId)
Creates a new AuthorizedView in a table.
|
com.google.api.gax.rpc.UnaryCallable<CreateAuthorizedViewRequest,com.google.longrunning.Operation> |
createAuthorizedViewCallable()
Creates a new AuthorizedView in a table.
|
com.google.api.gax.rpc.OperationCallable<CreateAuthorizedViewRequest,AuthorizedView,CreateAuthorizedViewMetadata> |
createAuthorizedViewOperationCallable()
Creates a new AuthorizedView in a table.
|
com.google.api.gax.longrunning.OperationFuture<Backup,CreateBackupMetadata> |
createBackupAsync(ClusterName parent,
String backupId,
Backup backup)
Starts creating a new Cloud Bigtable Backup.
|
com.google.api.gax.longrunning.OperationFuture<Backup,CreateBackupMetadata> |
createBackupAsync(CreateBackupRequest request)
Starts creating a new Cloud Bigtable Backup.
|
com.google.api.gax.longrunning.OperationFuture<Backup,CreateBackupMetadata> |
createBackupAsync(String parent,
String backupId,
Backup backup)
Starts creating a new Cloud Bigtable Backup.
|
com.google.api.gax.rpc.UnaryCallable<CreateBackupRequest,com.google.longrunning.Operation> |
createBackupCallable()
Starts creating a new Cloud Bigtable Backup.
|
com.google.api.gax.rpc.OperationCallable<CreateBackupRequest,Backup,CreateBackupMetadata> |
createBackupOperationCallable()
Starts creating a new Cloud Bigtable Backup.
|
com.google.api.gax.longrunning.OperationFuture<SchemaBundle,CreateSchemaBundleMetadata> |
createSchemaBundleAsync(CreateSchemaBundleRequest request)
Creates a new schema bundle in the specified table.
|
com.google.api.gax.longrunning.OperationFuture<SchemaBundle,CreateSchemaBundleMetadata> |
createSchemaBundleAsync(String parent,
String schemaBundleId,
SchemaBundle schemaBundle)
Creates a new schema bundle in the specified table.
|
com.google.api.gax.longrunning.OperationFuture<SchemaBundle,CreateSchemaBundleMetadata> |
createSchemaBundleAsync(TableName parent,
String schemaBundleId,
SchemaBundle schemaBundle)
Creates a new schema bundle in the specified table.
|
com.google.api.gax.rpc.UnaryCallable<CreateSchemaBundleRequest,com.google.longrunning.Operation> |
createSchemaBundleCallable()
Creates a new schema bundle in the specified table.
|
com.google.api.gax.rpc.OperationCallable<CreateSchemaBundleRequest,SchemaBundle,CreateSchemaBundleMetadata> |
createSchemaBundleOperationCallable()
Creates a new schema bundle in the specified table.
|
Table |
createTable(CreateTableRequest request)
Creates a new table in the specified instance.
|
Table |
createTable(InstanceName parent,
String tableId,
Table table)
Creates a new table in the specified instance.
|
Table |
createTable(String parent,
String tableId,
Table table)
Creates a new table in the specified instance.
|
com.google.api.gax.rpc.UnaryCallable<CreateTableRequest,Table> |
createTableCallable()
Creates a new table in the specified instance.
|
com.google.api.gax.longrunning.OperationFuture<Table,CreateTableFromSnapshotMetadata> |
createTableFromSnapshotAsync(CreateTableFromSnapshotRequest request)
Creates a new table from the specified snapshot.
|
com.google.api.gax.longrunning.OperationFuture<Table,CreateTableFromSnapshotMetadata> |
createTableFromSnapshotAsync(InstanceName parent,
String tableId,
SnapshotName sourceSnapshot)
Creates a new table from the specified snapshot.
|
com.google.api.gax.longrunning.OperationFuture<Table,CreateTableFromSnapshotMetadata> |
createTableFromSnapshotAsync(InstanceName parent,
String tableId,
String sourceSnapshot)
Creates a new table from the specified snapshot.
|
com.google.api.gax.longrunning.OperationFuture<Table,CreateTableFromSnapshotMetadata> |
createTableFromSnapshotAsync(String parent,
String tableId,
SnapshotName sourceSnapshot)
Creates a new table from the specified snapshot.
|
com.google.api.gax.longrunning.OperationFuture<Table,CreateTableFromSnapshotMetadata> |
createTableFromSnapshotAsync(String parent,
String tableId,
String sourceSnapshot)
Creates a new table from the specified snapshot.
|
com.google.api.gax.rpc.UnaryCallable<CreateTableFromSnapshotRequest,com.google.longrunning.Operation> |
createTableFromSnapshotCallable()
Creates a new table from the specified snapshot.
|
com.google.api.gax.rpc.OperationCallable<CreateTableFromSnapshotRequest,Table,CreateTableFromSnapshotMetadata> |
createTableFromSnapshotOperationCallable()
Creates a new table from the specified snapshot.
|
void |
deleteAuthorizedView(AuthorizedViewName name)
Permanently deletes a specified AuthorizedView.
|
void |
deleteAuthorizedView(DeleteAuthorizedViewRequest request)
Permanently deletes a specified AuthorizedView.
|
void |
deleteAuthorizedView(String name)
Permanently deletes a specified AuthorizedView.
|
com.google.api.gax.rpc.UnaryCallable<DeleteAuthorizedViewRequest,com.google.protobuf.Empty> |
deleteAuthorizedViewCallable()
Permanently deletes a specified AuthorizedView.
|
void |
deleteBackup(BackupName name)
Deletes a pending or completed Cloud Bigtable backup.
|
void |
deleteBackup(DeleteBackupRequest request)
Deletes a pending or completed Cloud Bigtable backup.
|
void |
deleteBackup(String name)
Deletes a pending or completed Cloud Bigtable backup.
|
com.google.api.gax.rpc.UnaryCallable<DeleteBackupRequest,com.google.protobuf.Empty> |
deleteBackupCallable()
Deletes a pending or completed Cloud Bigtable backup.
|
void |
deleteSchemaBundle(DeleteSchemaBundleRequest request)
Deletes a schema bundle in the specified table.
|
void |
deleteSchemaBundle(SchemaBundleName name)
Deletes a schema bundle in the specified table.
|
void |
deleteSchemaBundle(String name)
Deletes a schema bundle in the specified table.
|
com.google.api.gax.rpc.UnaryCallable<DeleteSchemaBundleRequest,com.google.protobuf.Empty> |
deleteSchemaBundleCallable()
Deletes a schema bundle in the specified table.
|
void |
deleteSnapshot(DeleteSnapshotRequest request)
Permanently deletes the specified snapshot.
|
void |
deleteSnapshot(SnapshotName name)
Permanently deletes the specified snapshot.
|
void |
deleteSnapshot(String name)
Permanently deletes the specified snapshot.
|
com.google.api.gax.rpc.UnaryCallable<DeleteSnapshotRequest,com.google.protobuf.Empty> |
deleteSnapshotCallable()
Permanently deletes the specified snapshot.
|
void |
deleteTable(DeleteTableRequest request)
Permanently deletes a specified table and all of its data.
|
void |
deleteTable(String name)
Permanently deletes a specified table and all of its data.
|
void |
deleteTable(TableName name)
Permanently deletes a specified table and all of its data.
|
com.google.api.gax.rpc.UnaryCallable<DeleteTableRequest,com.google.protobuf.Empty> |
deleteTableCallable()
Permanently deletes a specified table and all of its data.
|
void |
dropRowRange(DropRowRangeRequest request)
Permanently drop/delete a row range from a specified table.
|
com.google.api.gax.rpc.UnaryCallable<DropRowRangeRequest,com.google.protobuf.Empty> |
dropRowRangeCallable()
Permanently drop/delete a row range from a specified table.
|
GenerateConsistencyTokenResponse |
generateConsistencyToken(GenerateConsistencyTokenRequest request)
Generates a consistency token for a Table, which can be used in CheckConsistency to check
whether mutations to the table that finished before this call started have been replicated.
|
GenerateConsistencyTokenResponse |
generateConsistencyToken(String name)
Generates a consistency token for a Table, which can be used in CheckConsistency to check
whether mutations to the table that finished before this call started have been replicated.
|
GenerateConsistencyTokenResponse |
generateConsistencyToken(TableName name)
Generates a consistency token for a Table, which can be used in CheckConsistency to check
whether mutations to the table that finished before this call started have been replicated.
|
com.google.api.gax.rpc.UnaryCallable<GenerateConsistencyTokenRequest,GenerateConsistencyTokenResponse> |
generateConsistencyTokenCallable()
Generates a consistency token for a Table, which can be used in CheckConsistency to check
whether mutations to the table that finished before this call started have been replicated.
|
AuthorizedView |
getAuthorizedView(AuthorizedViewName name)
Gets information from a specified AuthorizedView.
|
AuthorizedView |
getAuthorizedView(GetAuthorizedViewRequest request)
Gets information from a specified AuthorizedView.
|
AuthorizedView |
getAuthorizedView(String name)
Gets information from a specified AuthorizedView.
|
com.google.api.gax.rpc.UnaryCallable<GetAuthorizedViewRequest,AuthorizedView> |
getAuthorizedViewCallable()
Gets information from a specified AuthorizedView.
|
Backup |
getBackup(BackupName name)
Gets metadata on a pending or completed Cloud Bigtable Backup.
|
Backup |
getBackup(GetBackupRequest request)
Gets metadata on a pending or completed Cloud Bigtable Backup.
|
Backup |
getBackup(String name)
Gets metadata on a pending or completed Cloud Bigtable Backup.
|
com.google.api.gax.rpc.UnaryCallable<GetBackupRequest,Backup> |
getBackupCallable()
Gets metadata on a pending or completed Cloud Bigtable Backup.
|
com.google.iam.v1.Policy |
getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
Gets the access control policy for a Bigtable resource.
|
com.google.iam.v1.Policy |
getIamPolicy(com.google.api.resourcenames.ResourceName resource)
Gets the access control policy for a Bigtable resource.
|
com.google.iam.v1.Policy |
getIamPolicy(String resource)
Gets the access control policy for a Bigtable resource.
|
com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> |
getIamPolicyCallable()
Gets the access control policy for a Bigtable resource.
|
com.google.longrunning.OperationsClient |
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
SchemaBundle |
getSchemaBundle(GetSchemaBundleRequest request)
Gets metadata information about the specified schema bundle.
|
SchemaBundle |
getSchemaBundle(SchemaBundleName name)
Gets metadata information about the specified schema bundle.
|
SchemaBundle |
getSchemaBundle(String name)
Gets metadata information about the specified schema bundle.
|
com.google.api.gax.rpc.UnaryCallable<GetSchemaBundleRequest,SchemaBundle> |
getSchemaBundleCallable()
Gets metadata information about the specified schema bundle.
|
BaseBigtableTableAdminSettings |
getSettings() |
Snapshot |
getSnapshot(GetSnapshotRequest request)
Gets metadata information about the specified snapshot.
|
Snapshot |
getSnapshot(SnapshotName name)
Gets metadata information about the specified snapshot.
|
Snapshot |
getSnapshot(String name)
Gets metadata information about the specified snapshot.
|
com.google.api.gax.rpc.UnaryCallable<GetSnapshotRequest,Snapshot> |
getSnapshotCallable()
Gets metadata information about the specified snapshot.
|
BigtableTableAdminStub |
getStub() |
Table |
getTable(GetTableRequest request)
Gets metadata information about the specified table.
|
Table |
getTable(String name)
Gets metadata information about the specified table.
|
Table |
getTable(TableName name)
Gets metadata information about the specified table.
|
com.google.api.gax.rpc.UnaryCallable<GetTableRequest,Table> |
getTableCallable()
Gets metadata information about the specified table.
|
boolean |
isShutdown() |
boolean |
isTerminated() |
BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse |
listAuthorizedViews(ListAuthorizedViewsRequest request)
Lists all AuthorizedViews from a specific table.
|
BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse |
listAuthorizedViews(String parent)
Lists all AuthorizedViews from a specific table.
|
BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse |
listAuthorizedViews(TableName parent)
Lists all AuthorizedViews from a specific table.
|
com.google.api.gax.rpc.UnaryCallable<ListAuthorizedViewsRequest,ListAuthorizedViewsResponse> |
listAuthorizedViewsCallable()
Lists all AuthorizedViews from a specific table.
|
com.google.api.gax.rpc.UnaryCallable<ListAuthorizedViewsRequest,BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse> |
listAuthorizedViewsPagedCallable()
Lists all AuthorizedViews from a specific table.
|
BaseBigtableTableAdminClient.ListBackupsPagedResponse |
listBackups(ClusterName parent)
Lists Cloud Bigtable backups.
|
BaseBigtableTableAdminClient.ListBackupsPagedResponse |
listBackups(ListBackupsRequest request)
Lists Cloud Bigtable backups.
|
BaseBigtableTableAdminClient.ListBackupsPagedResponse |
listBackups(String parent)
Lists Cloud Bigtable backups.
|
com.google.api.gax.rpc.UnaryCallable<ListBackupsRequest,ListBackupsResponse> |
listBackupsCallable()
Lists Cloud Bigtable backups.
|
com.google.api.gax.rpc.UnaryCallable<ListBackupsRequest,BaseBigtableTableAdminClient.ListBackupsPagedResponse> |
listBackupsPagedCallable()
Lists Cloud Bigtable backups.
|
BaseBigtableTableAdminClient.ListSchemaBundlesPagedResponse |
listSchemaBundles(ListSchemaBundlesRequest request)
Lists all schema bundles associated with the specified table.
|
BaseBigtableTableAdminClient.ListSchemaBundlesPagedResponse |
listSchemaBundles(String parent)
Lists all schema bundles associated with the specified table.
|
BaseBigtableTableAdminClient.ListSchemaBundlesPagedResponse |
listSchemaBundles(TableName parent)
Lists all schema bundles associated with the specified table.
|
com.google.api.gax.rpc.UnaryCallable<ListSchemaBundlesRequest,ListSchemaBundlesResponse> |
listSchemaBundlesCallable()
Lists all schema bundles associated with the specified table.
|
com.google.api.gax.rpc.UnaryCallable<ListSchemaBundlesRequest,BaseBigtableTableAdminClient.ListSchemaBundlesPagedResponse> |
listSchemaBundlesPagedCallable()
Lists all schema bundles associated with the specified table.
|
BaseBigtableTableAdminClient.ListSnapshotsPagedResponse |
listSnapshots(ClusterName parent)
Lists all snapshots associated with the specified cluster.
|
BaseBigtableTableAdminClient.ListSnapshotsPagedResponse |
listSnapshots(ListSnapshotsRequest request)
Lists all snapshots associated with the specified cluster.
|
BaseBigtableTableAdminClient.ListSnapshotsPagedResponse |
listSnapshots(String parent)
Lists all snapshots associated with the specified cluster.
|
com.google.api.gax.rpc.UnaryCallable<ListSnapshotsRequest,ListSnapshotsResponse> |
listSnapshotsCallable()
Lists all snapshots associated with the specified cluster.
|
com.google.api.gax.rpc.UnaryCallable<ListSnapshotsRequest,BaseBigtableTableAdminClient.ListSnapshotsPagedResponse> |
listSnapshotsPagedCallable()
Lists all snapshots associated with the specified cluster.
|
BaseBigtableTableAdminClient.ListTablesPagedResponse |
listTables(InstanceName parent)
Lists all tables served from a specified instance.
|
BaseBigtableTableAdminClient.ListTablesPagedResponse |
listTables(ListTablesRequest request)
Lists all tables served from a specified instance.
|
BaseBigtableTableAdminClient.ListTablesPagedResponse |
listTables(String parent)
Lists all tables served from a specified instance.
|
com.google.api.gax.rpc.UnaryCallable<ListTablesRequest,ListTablesResponse> |
listTablesCallable()
Lists all tables served from a specified instance.
|
com.google.api.gax.rpc.UnaryCallable<ListTablesRequest,BaseBigtableTableAdminClient.ListTablesPagedResponse> |
listTablesPagedCallable()
Lists all tables served from a specified instance.
|
Table |
modifyColumnFamilies(ModifyColumnFamiliesRequest request)
Performs a series of column family modifications on the specified table.
|
Table |
modifyColumnFamilies(String name,
List<ModifyColumnFamiliesRequest.Modification> modifications)
Performs a series of column family modifications on the specified table.
|
Table |
modifyColumnFamilies(TableName name,
List<ModifyColumnFamiliesRequest.Modification> modifications)
Performs a series of column family modifications on the specified table.
|
com.google.api.gax.rpc.UnaryCallable<ModifyColumnFamiliesRequest,Table> |
modifyColumnFamiliesCallable()
Performs a series of column family modifications on the specified table.
|
com.google.api.gax.longrunning.OperationFuture<Table,RestoreTableMetadata> |
restoreTableAsync(RestoreTableRequest request)
Create a new table by restoring from a completed backup.
|
com.google.api.gax.rpc.UnaryCallable<RestoreTableRequest,com.google.longrunning.Operation> |
restoreTableCallable()
Create a new table by restoring from a completed backup.
|
com.google.api.gax.rpc.OperationCallable<RestoreTableRequest,Table,RestoreTableMetadata> |
restoreTableOperationCallable()
Create a new table by restoring from a completed backup.
|
com.google.iam.v1.Policy |
setIamPolicy(com.google.api.resourcenames.ResourceName resource,
com.google.iam.v1.Policy policy)
Sets the access control policy on a Bigtable resource.
|
com.google.iam.v1.Policy |
setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
Sets the access control policy on a Bigtable resource.
|
com.google.iam.v1.Policy |
setIamPolicy(String resource,
com.google.iam.v1.Policy policy)
Sets the access control policy on a Bigtable resource.
|
com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> |
setIamPolicyCallable()
Sets the access control policy on a Bigtable resource.
|
void |
shutdown() |
void |
shutdownNow() |
com.google.api.gax.longrunning.OperationFuture<Snapshot,SnapshotTableMetadata> |
snapshotTableAsync(SnapshotTableRequest request)
Creates a new snapshot in the specified cluster from the specified source table.
|
com.google.api.gax.longrunning.OperationFuture<Snapshot,SnapshotTableMetadata> |
snapshotTableAsync(String name,
ClusterName cluster,
String snapshotId,
String description)
Creates a new snapshot in the specified cluster from the specified source table.
|
com.google.api.gax.longrunning.OperationFuture<Snapshot,SnapshotTableMetadata> |
snapshotTableAsync(String name,
String cluster,
String snapshotId,
String description)
Creates a new snapshot in the specified cluster from the specified source table.
|
com.google.api.gax.longrunning.OperationFuture<Snapshot,SnapshotTableMetadata> |
snapshotTableAsync(TableName name,
ClusterName cluster,
String snapshotId,
String description)
Creates a new snapshot in the specified cluster from the specified source table.
|
com.google.api.gax.longrunning.OperationFuture<Snapshot,SnapshotTableMetadata> |
snapshotTableAsync(TableName name,
String cluster,
String snapshotId,
String description)
Creates a new snapshot in the specified cluster from the specified source table.
|
com.google.api.gax.rpc.UnaryCallable<SnapshotTableRequest,com.google.longrunning.Operation> |
snapshotTableCallable()
Creates a new snapshot in the specified cluster from the specified source table.
|
com.google.api.gax.rpc.OperationCallable<SnapshotTableRequest,Snapshot,SnapshotTableMetadata> |
snapshotTableOperationCallable()
Creates a new snapshot in the specified cluster from the specified source table.
|
com.google.iam.v1.TestIamPermissionsResponse |
testIamPermissions(com.google.api.resourcenames.ResourceName resource,
List<String> permissions)
Returns permissions that the caller has on the specified Bigtable resource.
|
com.google.iam.v1.TestIamPermissionsResponse |
testIamPermissions(String resource,
List<String> permissions)
Returns permissions that the caller has on the specified Bigtable resource.
|
com.google.iam.v1.TestIamPermissionsResponse |
testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
Returns permissions that the caller has on the specified Bigtable resource.
|
com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
testIamPermissionsCallable()
Returns permissions that the caller has on the specified Bigtable resource.
|
com.google.api.gax.longrunning.OperationFuture<Table,UndeleteTableMetadata> |
undeleteTableAsync(String name)
Restores a specified table which was accidentally deleted.
|
com.google.api.gax.longrunning.OperationFuture<Table,UndeleteTableMetadata> |
undeleteTableAsync(TableName name)
Restores a specified table which was accidentally deleted.
|
com.google.api.gax.longrunning.OperationFuture<Table,UndeleteTableMetadata> |
undeleteTableAsync(UndeleteTableRequest request)
Restores a specified table which was accidentally deleted.
|
com.google.api.gax.rpc.UnaryCallable<UndeleteTableRequest,com.google.longrunning.Operation> |
undeleteTableCallable()
Restores a specified table which was accidentally deleted.
|
com.google.api.gax.rpc.OperationCallable<UndeleteTableRequest,Table,UndeleteTableMetadata> |
undeleteTableOperationCallable()
Restores a specified table which was accidentally deleted.
|
com.google.api.gax.longrunning.OperationFuture<AuthorizedView,UpdateAuthorizedViewMetadata> |
updateAuthorizedViewAsync(AuthorizedView authorizedView,
com.google.protobuf.FieldMask updateMask)
Updates an AuthorizedView in a table.
|
com.google.api.gax.longrunning.OperationFuture<AuthorizedView,UpdateAuthorizedViewMetadata> |
updateAuthorizedViewAsync(UpdateAuthorizedViewRequest request)
Updates an AuthorizedView in a table.
|
com.google.api.gax.rpc.UnaryCallable<UpdateAuthorizedViewRequest,com.google.longrunning.Operation> |
updateAuthorizedViewCallable()
Updates an AuthorizedView in a table.
|
com.google.api.gax.rpc.OperationCallable<UpdateAuthorizedViewRequest,AuthorizedView,UpdateAuthorizedViewMetadata> |
updateAuthorizedViewOperationCallable()
Updates an AuthorizedView in a table.
|
Backup |
updateBackup(Backup backup,
com.google.protobuf.FieldMask updateMask)
Updates a pending or completed Cloud Bigtable Backup.
|
Backup |
updateBackup(UpdateBackupRequest request)
Updates a pending or completed Cloud Bigtable Backup.
|
com.google.api.gax.rpc.UnaryCallable<UpdateBackupRequest,Backup> |
updateBackupCallable()
Updates a pending or completed Cloud Bigtable Backup.
|
com.google.api.gax.longrunning.OperationFuture<SchemaBundle,UpdateSchemaBundleMetadata> |
updateSchemaBundleAsync(SchemaBundle schemaBundle,
com.google.protobuf.FieldMask updateMask)
Updates a schema bundle in the specified table.
|
com.google.api.gax.longrunning.OperationFuture<SchemaBundle,UpdateSchemaBundleMetadata> |
updateSchemaBundleAsync(UpdateSchemaBundleRequest request)
Updates a schema bundle in the specified table.
|
com.google.api.gax.rpc.UnaryCallable<UpdateSchemaBundleRequest,com.google.longrunning.Operation> |
updateSchemaBundleCallable()
Updates a schema bundle in the specified table.
|
com.google.api.gax.rpc.OperationCallable<UpdateSchemaBundleRequest,SchemaBundle,UpdateSchemaBundleMetadata> |
updateSchemaBundleOperationCallable()
Updates a schema bundle in the specified table.
|
com.google.api.gax.longrunning.OperationFuture<Table,UpdateTableMetadata> |
updateTableAsync(Table table,
com.google.protobuf.FieldMask updateMask)
Updates a specified table.
|
com.google.api.gax.longrunning.OperationFuture<Table,UpdateTableMetadata> |
updateTableAsync(UpdateTableRequest request)
Updates a specified table.
|
com.google.api.gax.rpc.UnaryCallable<UpdateTableRequest,com.google.longrunning.Operation> |
updateTableCallable()
Updates a specified table.
|
com.google.api.gax.rpc.OperationCallable<UpdateTableRequest,Table,UpdateTableMetadata> |
updateTableOperationCallable()
Updates a specified table.
|
protected BaseBigtableTableAdminClient(BaseBigtableTableAdminSettings settings) throws IOException
IOExceptionprotected BaseBigtableTableAdminClient(BigtableTableAdminStub stub)
protected static BaseBigtableTableAdminClient create() throws IOException
IOExceptionprotected static BaseBigtableTableAdminClient create(BaseBigtableTableAdminSettings settings) throws IOException
IOExceptionprotected static BaseBigtableTableAdminClient create(BigtableTableAdminStub stub)
public final BaseBigtableTableAdminSettings getSettings()
public BigtableTableAdminStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
public final Table createTable(InstanceName parent, String tableId, Table table)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
String tableId = "tableId-1552905847";
Table table = Table.newBuilder().build();
Table response = baseBigtableTableAdminClient.createTable(parent, tableId, table);
}
parent - Required. The unique name of the instance in which to create the table. Values
are of the form `projects/{project}/instances/{instance}`.tableId - Required. The name by which the new table should be referred to within the
parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. Maximum 50
characters.table - Required. The Table to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Table createTable(String parent, String tableId, Table table)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
String tableId = "tableId-1552905847";
Table table = Table.newBuilder().build();
Table response = baseBigtableTableAdminClient.createTable(parent, tableId, table);
}
parent - Required. The unique name of the instance in which to create the table. Values
are of the form `projects/{project}/instances/{instance}`.tableId - Required. The name by which the new table should be referred to within the
parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. Maximum 50
characters.table - Required. The Table to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Table createTable(CreateTableRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CreateTableRequest request =
CreateTableRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setTableId("tableId-1552905847")
.setTable(Table.newBuilder().build())
.addAllInitialSplits(new ArrayList<CreateTableRequest.Split>())
.build();
Table response = baseBigtableTableAdminClient.createTable(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateTableRequest,Table> createTableCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CreateTableRequest request =
CreateTableRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setTableId("tableId-1552905847")
.setTable(Table.newBuilder().build())
.addAllInitialSplits(new ArrayList<CreateTableRequest.Split>())
.build();
ApiFuture<Table> future =
baseBigtableTableAdminClient.createTableCallable().futureCall(request);
// Do something.
Table response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Table,CreateTableFromSnapshotMetadata> createTableFromSnapshotAsync(InstanceName parent, String tableId, SnapshotName sourceSnapshot)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
String tableId = "tableId-1552905847";
SnapshotName sourceSnapshot =
SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
Table response =
baseBigtableTableAdminClient
.createTableFromSnapshotAsync(parent, tableId, sourceSnapshot)
.get();
}
parent - Required. The unique name of the instance in which to create the table. Values
are of the form `projects/{project}/instances/{instance}`.tableId - Required. The name by which the new table should be referred to within the
parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.sourceSnapshot - Required. The unique name of the snapshot from which to restore the
table. The snapshot and the table must be in the same instance. Values are of the form
`projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Table,CreateTableFromSnapshotMetadata> createTableFromSnapshotAsync(InstanceName parent, String tableId, String sourceSnapshot)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
String tableId = "tableId-1552905847";
String sourceSnapshot =
SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString();
Table response =
baseBigtableTableAdminClient
.createTableFromSnapshotAsync(parent, tableId, sourceSnapshot)
.get();
}
parent - Required. The unique name of the instance in which to create the table. Values
are of the form `projects/{project}/instances/{instance}`.tableId - Required. The name by which the new table should be referred to within the
parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.sourceSnapshot - Required. The unique name of the snapshot from which to restore the
table. The snapshot and the table must be in the same instance. Values are of the form
`projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Table,CreateTableFromSnapshotMetadata> createTableFromSnapshotAsync(String parent, String tableId, SnapshotName sourceSnapshot)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
String tableId = "tableId-1552905847";
SnapshotName sourceSnapshot =
SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
Table response =
baseBigtableTableAdminClient
.createTableFromSnapshotAsync(parent, tableId, sourceSnapshot)
.get();
}
parent - Required. The unique name of the instance in which to create the table. Values
are of the form `projects/{project}/instances/{instance}`.tableId - Required. The name by which the new table should be referred to within the
parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.sourceSnapshot - Required. The unique name of the snapshot from which to restore the
table. The snapshot and the table must be in the same instance. Values are of the form
`projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Table,CreateTableFromSnapshotMetadata> createTableFromSnapshotAsync(String parent, String tableId, String sourceSnapshot)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
String tableId = "tableId-1552905847";
String sourceSnapshot =
SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString();
Table response =
baseBigtableTableAdminClient
.createTableFromSnapshotAsync(parent, tableId, sourceSnapshot)
.get();
}
parent - Required. The unique name of the instance in which to create the table. Values
are of the form `projects/{project}/instances/{instance}`.tableId - Required. The name by which the new table should be referred to within the
parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.sourceSnapshot - Required. The unique name of the snapshot from which to restore the
table. The snapshot and the table must be in the same instance. Values are of the form
`projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Table,CreateTableFromSnapshotMetadata> createTableFromSnapshotAsync(CreateTableFromSnapshotRequest request)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CreateTableFromSnapshotRequest request =
CreateTableFromSnapshotRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setTableId("tableId-1552905847")
.setSourceSnapshot(
SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString())
.build();
Table response = baseBigtableTableAdminClient.createTableFromSnapshotAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateTableFromSnapshotRequest,Table,CreateTableFromSnapshotMetadata> createTableFromSnapshotOperationCallable()
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CreateTableFromSnapshotRequest request =
CreateTableFromSnapshotRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setTableId("tableId-1552905847")
.setSourceSnapshot(
SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString())
.build();
OperationFuture<Table, CreateTableFromSnapshotMetadata> future =
baseBigtableTableAdminClient
.createTableFromSnapshotOperationCallable()
.futureCall(request);
// Do something.
Table response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateTableFromSnapshotRequest,com.google.longrunning.Operation> createTableFromSnapshotCallable()
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CreateTableFromSnapshotRequest request =
CreateTableFromSnapshotRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setTableId("tableId-1552905847")
.setSourceSnapshot(
SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString())
.build();
ApiFuture<Operation> future =
baseBigtableTableAdminClient.createTableFromSnapshotCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final BaseBigtableTableAdminClient.ListTablesPagedResponse listTables(InstanceName parent)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
for (Table element : baseBigtableTableAdminClient.listTables(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The unique name of the instance for which tables should be listed.
Values are of the form `projects/{project}/instances/{instance}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BaseBigtableTableAdminClient.ListTablesPagedResponse listTables(String parent)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
for (Table element : baseBigtableTableAdminClient.listTables(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The unique name of the instance for which tables should be listed.
Values are of the form `projects/{project}/instances/{instance}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BaseBigtableTableAdminClient.ListTablesPagedResponse listTables(ListTablesRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ListTablesRequest request =
ListTablesRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Table element : baseBigtableTableAdminClient.listTables(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListTablesRequest,BaseBigtableTableAdminClient.ListTablesPagedResponse> listTablesPagedCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ListTablesRequest request =
ListTablesRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Table> future =
baseBigtableTableAdminClient.listTablesPagedCallable().futureCall(request);
// Do something.
for (Table element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListTablesRequest,ListTablesResponse> listTablesCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ListTablesRequest request =
ListTablesRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListTablesResponse response =
baseBigtableTableAdminClient.listTablesCallable().call(request);
for (Table element : response.getTablesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Table getTable(TableName name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
Table response = baseBigtableTableAdminClient.getTable(name);
}
name - Required. The unique name of the requested table. Values are of the form
`projects/{project}/instances/{instance}/tables/{table}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Table getTable(String name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
Table response = baseBigtableTableAdminClient.getTable(name);
}
name - Required. The unique name of the requested table. Values are of the form
`projects/{project}/instances/{instance}/tables/{table}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Table getTable(GetTableRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
GetTableRequest request =
GetTableRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.build();
Table response = baseBigtableTableAdminClient.getTable(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetTableRequest,Table> getTableCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
GetTableRequest request =
GetTableRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.build();
ApiFuture<Table> future = baseBigtableTableAdminClient.getTableCallable().futureCall(request);
// Do something.
Table response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Table,UpdateTableMetadata> updateTableAsync(Table table, com.google.protobuf.FieldMask updateMask)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
Table table = Table.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Table response = baseBigtableTableAdminClient.updateTableAsync(table, updateMask).get();
}
table - Required. The table to update. The table's `name` field is used to identify the
table to update.updateMask - Required. The list of fields to update. A mask specifying which fields (e.g.
`change_stream_config`) in the `table` field should be updated. This mask is relative to
the `table` field, not to the request message. The wildcard (*) path is currently not
supported. Currently UpdateTable is only supported for the following fields:
If `column_families` is set in `update_mask`, it will return an UNIMPLEMENTED error.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Table,UpdateTableMetadata> updateTableAsync(UpdateTableRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
UpdateTableRequest request =
UpdateTableRequest.newBuilder()
.setTable(Table.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setIgnoreWarnings(true)
.build();
Table response = baseBigtableTableAdminClient.updateTableAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateTableRequest,Table,UpdateTableMetadata> updateTableOperationCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
UpdateTableRequest request =
UpdateTableRequest.newBuilder()
.setTable(Table.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setIgnoreWarnings(true)
.build();
OperationFuture<Table, UpdateTableMetadata> future =
baseBigtableTableAdminClient.updateTableOperationCallable().futureCall(request);
// Do something.
Table response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateTableRequest,com.google.longrunning.Operation> updateTableCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
UpdateTableRequest request =
UpdateTableRequest.newBuilder()
.setTable(Table.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setIgnoreWarnings(true)
.build();
ApiFuture<Operation> future =
baseBigtableTableAdminClient.updateTableCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final void deleteTable(TableName name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
baseBigtableTableAdminClient.deleteTable(name);
}
name - Required. The unique name of the table to be deleted. Values are of the form
`projects/{project}/instances/{instance}/tables/{table}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteTable(String name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
baseBigtableTableAdminClient.deleteTable(name);
}
name - Required. The unique name of the table to be deleted. Values are of the form
`projects/{project}/instances/{instance}/tables/{table}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteTable(DeleteTableRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
DeleteTableRequest request =
DeleteTableRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.build();
baseBigtableTableAdminClient.deleteTable(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteTableRequest,com.google.protobuf.Empty> deleteTableCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
DeleteTableRequest request =
DeleteTableRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.build();
ApiFuture<Empty> future =
baseBigtableTableAdminClient.deleteTableCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Table,UndeleteTableMetadata> undeleteTableAsync(TableName name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
Table response = baseBigtableTableAdminClient.undeleteTableAsync(name).get();
}
name - Required. The unique name of the table to be restored. Values are of the form
`projects/{project}/instances/{instance}/tables/{table}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Table,UndeleteTableMetadata> undeleteTableAsync(String name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
Table response = baseBigtableTableAdminClient.undeleteTableAsync(name).get();
}
name - Required. The unique name of the table to be restored. Values are of the form
`projects/{project}/instances/{instance}/tables/{table}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Table,UndeleteTableMetadata> undeleteTableAsync(UndeleteTableRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
UndeleteTableRequest request =
UndeleteTableRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.build();
Table response = baseBigtableTableAdminClient.undeleteTableAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UndeleteTableRequest,Table,UndeleteTableMetadata> undeleteTableOperationCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
UndeleteTableRequest request =
UndeleteTableRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.build();
OperationFuture<Table, UndeleteTableMetadata> future =
baseBigtableTableAdminClient.undeleteTableOperationCallable().futureCall(request);
// Do something.
Table response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UndeleteTableRequest,com.google.longrunning.Operation> undeleteTableCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
UndeleteTableRequest request =
UndeleteTableRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.build();
ApiFuture<Operation> future =
baseBigtableTableAdminClient.undeleteTableCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<AuthorizedView,CreateAuthorizedViewMetadata> createAuthorizedViewAsync(TableName parent, AuthorizedView authorizedView, String authorizedViewId)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
TableName parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
AuthorizedView authorizedView = AuthorizedView.newBuilder().build();
String authorizedViewId = "authorizedViewId-2074136549";
AuthorizedView response =
baseBigtableTableAdminClient
.createAuthorizedViewAsync(parent, authorizedView, authorizedViewId)
.get();
}
parent - Required. This is the name of the table the AuthorizedView belongs to. Values are
of the form `projects/{project}/instances/{instance}/tables/{table}`.authorizedView - Required. The AuthorizedView to create.authorizedViewId - Required. The id of the AuthorizedView to create. This AuthorizedView
must not already exist. The `authorized_view_id` appended to `parent` forms the full
AuthorizedView name of the form
`projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AuthorizedView,CreateAuthorizedViewMetadata> createAuthorizedViewAsync(String parent, AuthorizedView authorizedView, String authorizedViewId)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
AuthorizedView authorizedView = AuthorizedView.newBuilder().build();
String authorizedViewId = "authorizedViewId-2074136549";
AuthorizedView response =
baseBigtableTableAdminClient
.createAuthorizedViewAsync(parent, authorizedView, authorizedViewId)
.get();
}
parent - Required. This is the name of the table the AuthorizedView belongs to. Values are
of the form `projects/{project}/instances/{instance}/tables/{table}`.authorizedView - Required. The AuthorizedView to create.authorizedViewId - Required. The id of the AuthorizedView to create. This AuthorizedView
must not already exist. The `authorized_view_id` appended to `parent` forms the full
AuthorizedView name of the form
`projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AuthorizedView,CreateAuthorizedViewMetadata> createAuthorizedViewAsync(CreateAuthorizedViewRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CreateAuthorizedViewRequest request =
CreateAuthorizedViewRequest.newBuilder()
.setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setAuthorizedViewId("authorizedViewId-2074136549")
.setAuthorizedView(AuthorizedView.newBuilder().build())
.build();
AuthorizedView response =
baseBigtableTableAdminClient.createAuthorizedViewAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateAuthorizedViewRequest,AuthorizedView,CreateAuthorizedViewMetadata> createAuthorizedViewOperationCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CreateAuthorizedViewRequest request =
CreateAuthorizedViewRequest.newBuilder()
.setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setAuthorizedViewId("authorizedViewId-2074136549")
.setAuthorizedView(AuthorizedView.newBuilder().build())
.build();
OperationFuture<AuthorizedView, CreateAuthorizedViewMetadata> future =
baseBigtableTableAdminClient.createAuthorizedViewOperationCallable().futureCall(request);
// Do something.
AuthorizedView response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateAuthorizedViewRequest,com.google.longrunning.Operation> createAuthorizedViewCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CreateAuthorizedViewRequest request =
CreateAuthorizedViewRequest.newBuilder()
.setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setAuthorizedViewId("authorizedViewId-2074136549")
.setAuthorizedView(AuthorizedView.newBuilder().build())
.build();
ApiFuture<Operation> future =
baseBigtableTableAdminClient.createAuthorizedViewCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse listAuthorizedViews(TableName parent)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
TableName parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
for (AuthorizedView element :
baseBigtableTableAdminClient.listAuthorizedViews(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The unique name of the table for which AuthorizedViews should be
listed. Values are of the form `projects/{project}/instances/{instance}/tables/{table}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse listAuthorizedViews(String parent)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
for (AuthorizedView element :
baseBigtableTableAdminClient.listAuthorizedViews(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The unique name of the table for which AuthorizedViews should be
listed. Values are of the form `projects/{project}/instances/{instance}/tables/{table}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse listAuthorizedViews(ListAuthorizedViewsRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ListAuthorizedViewsRequest request =
ListAuthorizedViewsRequest.newBuilder()
.setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (AuthorizedView element :
baseBigtableTableAdminClient.listAuthorizedViews(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListAuthorizedViewsRequest,BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse> listAuthorizedViewsPagedCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ListAuthorizedViewsRequest request =
ListAuthorizedViewsRequest.newBuilder()
.setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<AuthorizedView> future =
baseBigtableTableAdminClient.listAuthorizedViewsPagedCallable().futureCall(request);
// Do something.
for (AuthorizedView element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAuthorizedViewsRequest,ListAuthorizedViewsResponse> listAuthorizedViewsCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ListAuthorizedViewsRequest request =
ListAuthorizedViewsRequest.newBuilder()
.setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListAuthorizedViewsResponse response =
baseBigtableTableAdminClient.listAuthorizedViewsCallable().call(request);
for (AuthorizedView element : response.getAuthorizedViewsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final AuthorizedView getAuthorizedView(AuthorizedViewName name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
AuthorizedViewName name =
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]");
AuthorizedView response = baseBigtableTableAdminClient.getAuthorizedView(name);
}
name - Required. The unique name of the requested AuthorizedView. Values are of the form
`projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final AuthorizedView getAuthorizedView(String name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String name =
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
.toString();
AuthorizedView response = baseBigtableTableAdminClient.getAuthorizedView(name);
}
name - Required. The unique name of the requested AuthorizedView. Values are of the form
`projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final AuthorizedView getAuthorizedView(GetAuthorizedViewRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
GetAuthorizedViewRequest request =
GetAuthorizedViewRequest.newBuilder()
.setName(
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
.toString())
.build();
AuthorizedView response = baseBigtableTableAdminClient.getAuthorizedView(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetAuthorizedViewRequest,AuthorizedView> getAuthorizedViewCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
GetAuthorizedViewRequest request =
GetAuthorizedViewRequest.newBuilder()
.setName(
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
.toString())
.build();
ApiFuture<AuthorizedView> future =
baseBigtableTableAdminClient.getAuthorizedViewCallable().futureCall(request);
// Do something.
AuthorizedView response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<AuthorizedView,UpdateAuthorizedViewMetadata> updateAuthorizedViewAsync(AuthorizedView authorizedView, com.google.protobuf.FieldMask updateMask)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
AuthorizedView authorizedView = AuthorizedView.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
AuthorizedView response =
baseBigtableTableAdminClient.updateAuthorizedViewAsync(authorizedView, updateMask).get();
}
authorizedView - Required. The AuthorizedView to update. The `name` in `authorized_view`
is used to identify the AuthorizedView. AuthorizedView name must in this format:
`projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.updateMask - Optional. The list of fields to update. A mask specifying which fields in the
AuthorizedView resource should be updated. This mask is relative to the AuthorizedView
resource, not to the request message. A field will be overwritten if it is in the mask. If
empty, all fields set in the request will be overwritten. A special value `*` means to
overwrite all fields (including fields not set in the request).com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AuthorizedView,UpdateAuthorizedViewMetadata> updateAuthorizedViewAsync(UpdateAuthorizedViewRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
UpdateAuthorizedViewRequest request =
UpdateAuthorizedViewRequest.newBuilder()
.setAuthorizedView(AuthorizedView.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setIgnoreWarnings(true)
.build();
AuthorizedView response =
baseBigtableTableAdminClient.updateAuthorizedViewAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateAuthorizedViewRequest,AuthorizedView,UpdateAuthorizedViewMetadata> updateAuthorizedViewOperationCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
UpdateAuthorizedViewRequest request =
UpdateAuthorizedViewRequest.newBuilder()
.setAuthorizedView(AuthorizedView.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setIgnoreWarnings(true)
.build();
OperationFuture<AuthorizedView, UpdateAuthorizedViewMetadata> future =
baseBigtableTableAdminClient.updateAuthorizedViewOperationCallable().futureCall(request);
// Do something.
AuthorizedView response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateAuthorizedViewRequest,com.google.longrunning.Operation> updateAuthorizedViewCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
UpdateAuthorizedViewRequest request =
UpdateAuthorizedViewRequest.newBuilder()
.setAuthorizedView(AuthorizedView.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setIgnoreWarnings(true)
.build();
ApiFuture<Operation> future =
baseBigtableTableAdminClient.updateAuthorizedViewCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final void deleteAuthorizedView(AuthorizedViewName name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
AuthorizedViewName name =
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]");
baseBigtableTableAdminClient.deleteAuthorizedView(name);
}
name - Required. The unique name of the AuthorizedView to be deleted. Values are of the
form
`projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteAuthorizedView(String name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String name =
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
.toString();
baseBigtableTableAdminClient.deleteAuthorizedView(name);
}
name - Required. The unique name of the AuthorizedView to be deleted. Values are of the
form
`projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteAuthorizedView(DeleteAuthorizedViewRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
DeleteAuthorizedViewRequest request =
DeleteAuthorizedViewRequest.newBuilder()
.setName(
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
.toString())
.setEtag("etag3123477")
.build();
baseBigtableTableAdminClient.deleteAuthorizedView(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteAuthorizedViewRequest,com.google.protobuf.Empty> deleteAuthorizedViewCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
DeleteAuthorizedViewRequest request =
DeleteAuthorizedViewRequest.newBuilder()
.setName(
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
.toString())
.setEtag("etag3123477")
.build();
ApiFuture<Empty> future =
baseBigtableTableAdminClient.deleteAuthorizedViewCallable().futureCall(request);
// Do something.
future.get();
}
public final Table modifyColumnFamilies(TableName name, List<ModifyColumnFamiliesRequest.Modification> modifications)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
List<ModifyColumnFamiliesRequest.Modification> modifications = new ArrayList<>();
Table response = baseBigtableTableAdminClient.modifyColumnFamilies(name, modifications);
}
name - Required. The unique name of the table whose families should be modified. Values
are of the form `projects/{project}/instances/{instance}/tables/{table}`.modifications - Required. Modifications to be atomically applied to the specified table's
families. Entries are applied in order, meaning that earlier modifications can be masked by
later ones (in the case of repeated updates to the same family, for example).com.google.api.gax.rpc.ApiException - if the remote call failspublic final Table modifyColumnFamilies(String name, List<ModifyColumnFamiliesRequest.Modification> modifications)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
List<ModifyColumnFamiliesRequest.Modification> modifications = new ArrayList<>();
Table response = baseBigtableTableAdminClient.modifyColumnFamilies(name, modifications);
}
name - Required. The unique name of the table whose families should be modified. Values
are of the form `projects/{project}/instances/{instance}/tables/{table}`.modifications - Required. Modifications to be atomically applied to the specified table's
families. Entries are applied in order, meaning that earlier modifications can be masked by
later ones (in the case of repeated updates to the same family, for example).com.google.api.gax.rpc.ApiException - if the remote call failspublic final Table modifyColumnFamilies(ModifyColumnFamiliesRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ModifyColumnFamiliesRequest request =
ModifyColumnFamiliesRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.addAllModifications(new ArrayList<ModifyColumnFamiliesRequest.Modification>())
.setIgnoreWarnings(true)
.build();
Table response = baseBigtableTableAdminClient.modifyColumnFamilies(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ModifyColumnFamiliesRequest,Table> modifyColumnFamiliesCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ModifyColumnFamiliesRequest request =
ModifyColumnFamiliesRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.addAllModifications(new ArrayList<ModifyColumnFamiliesRequest.Modification>())
.setIgnoreWarnings(true)
.build();
ApiFuture<Table> future =
baseBigtableTableAdminClient.modifyColumnFamiliesCallable().futureCall(request);
// Do something.
Table response = future.get();
}
public final void dropRowRange(DropRowRangeRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
DropRowRangeRequest request =
DropRowRangeRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.build();
baseBigtableTableAdminClient.dropRowRange(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DropRowRangeRequest,com.google.protobuf.Empty> dropRowRangeCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
DropRowRangeRequest request =
DropRowRangeRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.build();
ApiFuture<Empty> future =
baseBigtableTableAdminClient.dropRowRangeCallable().futureCall(request);
// Do something.
future.get();
}
public final GenerateConsistencyTokenResponse generateConsistencyToken(TableName name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
GenerateConsistencyTokenResponse response =
baseBigtableTableAdminClient.generateConsistencyToken(name);
}
name - Required. The unique name of the Table for which to create a consistency token.
Values are of the form `projects/{project}/instances/{instance}/tables/{table}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final GenerateConsistencyTokenResponse generateConsistencyToken(String name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
GenerateConsistencyTokenResponse response =
baseBigtableTableAdminClient.generateConsistencyToken(name);
}
name - Required. The unique name of the Table for which to create a consistency token.
Values are of the form `projects/{project}/instances/{instance}/tables/{table}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final GenerateConsistencyTokenResponse generateConsistencyToken(GenerateConsistencyTokenRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
GenerateConsistencyTokenRequest request =
GenerateConsistencyTokenRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.build();
GenerateConsistencyTokenResponse response =
baseBigtableTableAdminClient.generateConsistencyToken(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GenerateConsistencyTokenRequest,GenerateConsistencyTokenResponse> generateConsistencyTokenCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
GenerateConsistencyTokenRequest request =
GenerateConsistencyTokenRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.build();
ApiFuture<GenerateConsistencyTokenResponse> future =
baseBigtableTableAdminClient.generateConsistencyTokenCallable().futureCall(request);
// Do something.
GenerateConsistencyTokenResponse response = future.get();
}
public final CheckConsistencyResponse checkConsistency(TableName name, String consistencyToken)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
String consistencyToken = "consistencyToken-1985152319";
CheckConsistencyResponse response =
baseBigtableTableAdminClient.checkConsistency(name, consistencyToken);
}
name - Required. The unique name of the Table for which to check replication consistency.
Values are of the form `projects/{project}/instances/{instance}/tables/{table}`.consistencyToken - Required. The token created using GenerateConsistencyToken for the
Table.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CheckConsistencyResponse checkConsistency(String name, String consistencyToken)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
String consistencyToken = "consistencyToken-1985152319";
CheckConsistencyResponse response =
baseBigtableTableAdminClient.checkConsistency(name, consistencyToken);
}
name - Required. The unique name of the Table for which to check replication consistency.
Values are of the form `projects/{project}/instances/{instance}/tables/{table}`.consistencyToken - Required. The token created using GenerateConsistencyToken for the
Table.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CheckConsistencyResponse checkConsistency(CheckConsistencyRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CheckConsistencyRequest request =
CheckConsistencyRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setConsistencyToken("consistencyToken-1985152319")
.build();
CheckConsistencyResponse response = baseBigtableTableAdminClient.checkConsistency(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CheckConsistencyRequest,CheckConsistencyResponse> checkConsistencyCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CheckConsistencyRequest request =
CheckConsistencyRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setConsistencyToken("consistencyToken-1985152319")
.build();
ApiFuture<CheckConsistencyResponse> future =
baseBigtableTableAdminClient.checkConsistencyCallable().futureCall(request);
// Do something.
CheckConsistencyResponse response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Snapshot,SnapshotTableMetadata> snapshotTableAsync(TableName name, ClusterName cluster, String snapshotId, String description)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
ClusterName cluster = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
String snapshotId = "snapshotId-1113817601";
String description = "description-1724546052";
Snapshot response =
baseBigtableTableAdminClient
.snapshotTableAsync(name, cluster, snapshotId, description)
.get();
}
name - Required. The unique name of the table to have the snapshot taken. Values are of
the form `projects/{project}/instances/{instance}/tables/{table}`.cluster - Required. The name of the cluster where the snapshot will be created in. Values
are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.snapshotId - Required. The ID by which the new snapshot should be referred to within the
parent cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather
than `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.description - Description of the snapshot.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Snapshot,SnapshotTableMetadata> snapshotTableAsync(TableName name, String cluster, String snapshotId, String description)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
String cluster = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
String snapshotId = "snapshotId-1113817601";
String description = "description-1724546052";
Snapshot response =
baseBigtableTableAdminClient
.snapshotTableAsync(name, cluster, snapshotId, description)
.get();
}
name - Required. The unique name of the table to have the snapshot taken. Values are of
the form `projects/{project}/instances/{instance}/tables/{table}`.cluster - Required. The name of the cluster where the snapshot will be created in. Values
are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.snapshotId - Required. The ID by which the new snapshot should be referred to within the
parent cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather
than `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.description - Description of the snapshot.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Snapshot,SnapshotTableMetadata> snapshotTableAsync(String name, ClusterName cluster, String snapshotId, String description)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
ClusterName cluster = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
String snapshotId = "snapshotId-1113817601";
String description = "description-1724546052";
Snapshot response =
baseBigtableTableAdminClient
.snapshotTableAsync(name, cluster, snapshotId, description)
.get();
}
name - Required. The unique name of the table to have the snapshot taken. Values are of
the form `projects/{project}/instances/{instance}/tables/{table}`.cluster - Required. The name of the cluster where the snapshot will be created in. Values
are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.snapshotId - Required. The ID by which the new snapshot should be referred to within the
parent cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather
than `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.description - Description of the snapshot.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Snapshot,SnapshotTableMetadata> snapshotTableAsync(String name, String cluster, String snapshotId, String description)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
String cluster = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
String snapshotId = "snapshotId-1113817601";
String description = "description-1724546052";
Snapshot response =
baseBigtableTableAdminClient
.snapshotTableAsync(name, cluster, snapshotId, description)
.get();
}
name - Required. The unique name of the table to have the snapshot taken. Values are of
the form `projects/{project}/instances/{instance}/tables/{table}`.cluster - Required. The name of the cluster where the snapshot will be created in. Values
are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.snapshotId - Required. The ID by which the new snapshot should be referred to within the
parent cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather
than `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.description - Description of the snapshot.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Snapshot,SnapshotTableMetadata> snapshotTableAsync(SnapshotTableRequest request)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
SnapshotTableRequest request =
SnapshotTableRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setCluster(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
.setSnapshotId("snapshotId-1113817601")
.setTtl(Duration.newBuilder().build())
.setDescription("description-1724546052")
.build();
Snapshot response = baseBigtableTableAdminClient.snapshotTableAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<SnapshotTableRequest,Snapshot,SnapshotTableMetadata> snapshotTableOperationCallable()
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
SnapshotTableRequest request =
SnapshotTableRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setCluster(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
.setSnapshotId("snapshotId-1113817601")
.setTtl(Duration.newBuilder().build())
.setDescription("description-1724546052")
.build();
OperationFuture<Snapshot, SnapshotTableMetadata> future =
baseBigtableTableAdminClient.snapshotTableOperationCallable().futureCall(request);
// Do something.
Snapshot response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<SnapshotTableRequest,com.google.longrunning.Operation> snapshotTableCallable()
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
SnapshotTableRequest request =
SnapshotTableRequest.newBuilder()
.setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setCluster(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
.setSnapshotId("snapshotId-1113817601")
.setTtl(Duration.newBuilder().build())
.setDescription("description-1724546052")
.build();
ApiFuture<Operation> future =
baseBigtableTableAdminClient.snapshotTableCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final Snapshot getSnapshot(SnapshotName name)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
Snapshot response = baseBigtableTableAdminClient.getSnapshot(name);
}
name - Required. The unique name of the requested snapshot. Values are of the form
`projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Snapshot getSnapshot(String name)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String name =
SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString();
Snapshot response = baseBigtableTableAdminClient.getSnapshot(name);
}
name - Required. The unique name of the requested snapshot. Values are of the form
`projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Snapshot getSnapshot(GetSnapshotRequest request)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
GetSnapshotRequest request =
GetSnapshotRequest.newBuilder()
.setName(
SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString())
.build();
Snapshot response = baseBigtableTableAdminClient.getSnapshot(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetSnapshotRequest,Snapshot> getSnapshotCallable()
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
GetSnapshotRequest request =
GetSnapshotRequest.newBuilder()
.setName(
SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString())
.build();
ApiFuture<Snapshot> future =
baseBigtableTableAdminClient.getSnapshotCallable().futureCall(request);
// Do something.
Snapshot response = future.get();
}
public final BaseBigtableTableAdminClient.ListSnapshotsPagedResponse listSnapshots(ClusterName parent)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
for (Snapshot element : baseBigtableTableAdminClient.listSnapshots(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The unique name of the cluster for which snapshots should be listed.
Values are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. Use
`{cluster} = '-'` to list snapshots for all clusters in an instance, e.g.,
`projects/{project}/instances/{instance}/clusters/-`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BaseBigtableTableAdminClient.ListSnapshotsPagedResponse listSnapshots(String parent)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
for (Snapshot element : baseBigtableTableAdminClient.listSnapshots(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The unique name of the cluster for which snapshots should be listed.
Values are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. Use
`{cluster} = '-'` to list snapshots for all clusters in an instance, e.g.,
`projects/{project}/instances/{instance}/clusters/-`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BaseBigtableTableAdminClient.ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest request)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ListSnapshotsRequest request =
ListSnapshotsRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Snapshot element : baseBigtableTableAdminClient.listSnapshots(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListSnapshotsRequest,BaseBigtableTableAdminClient.ListSnapshotsPagedResponse> listSnapshotsPagedCallable()
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ListSnapshotsRequest request =
ListSnapshotsRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Snapshot> future =
baseBigtableTableAdminClient.listSnapshotsPagedCallable().futureCall(request);
// Do something.
for (Snapshot element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListSnapshotsRequest,ListSnapshotsResponse> listSnapshotsCallable()
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ListSnapshotsRequest request =
ListSnapshotsRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListSnapshotsResponse response =
baseBigtableTableAdminClient.listSnapshotsCallable().call(request);
for (Snapshot element : response.getSnapshotsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final void deleteSnapshot(SnapshotName name)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
baseBigtableTableAdminClient.deleteSnapshot(name);
}
name - Required. The unique name of the snapshot to be deleted. Values are of the form
`projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteSnapshot(String name)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String name =
SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString();
baseBigtableTableAdminClient.deleteSnapshot(name);
}
name - Required. The unique name of the snapshot to be deleted. Values are of the form
`projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteSnapshot(DeleteSnapshotRequest request)
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
DeleteSnapshotRequest request =
DeleteSnapshotRequest.newBuilder()
.setName(
SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString())
.build();
baseBigtableTableAdminClient.deleteSnapshot(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteSnapshotRequest,com.google.protobuf.Empty> deleteSnapshotCallable()
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
DeleteSnapshotRequest request =
DeleteSnapshotRequest.newBuilder()
.setName(
SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString())
.build();
ApiFuture<Empty> future =
baseBigtableTableAdminClient.deleteSnapshotCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Backup,CreateBackupMetadata> createBackupAsync(ClusterName parent, String backupId, Backup backup)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
String backupId = "backupId2121930365";
Backup backup = Backup.newBuilder().build();
Backup response =
baseBigtableTableAdminClient.createBackupAsync(parent, backupId, backup).get();
}
parent - Required. This must be one of the clusters in the instance in which this table is
located. The backup will be stored in this cluster. Values are of the form
`projects/{project}/instances/{instance}/clusters/{cluster}`.backupId - Required. The id of the backup to be created. The `backup_id` along with the
parent `parent` are combined as {parent}/backups/{backup_id} to create the full backup
name, of the form:
`projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. This
string must be between 1 and 50 characters in length and match the regex
[_a-zA-Z0-9][-_.a-zA-Z0-9]*.backup - Required. The backup to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Backup,CreateBackupMetadata> createBackupAsync(String parent, String backupId, Backup backup)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
String backupId = "backupId2121930365";
Backup backup = Backup.newBuilder().build();
Backup response =
baseBigtableTableAdminClient.createBackupAsync(parent, backupId, backup).get();
}
parent - Required. This must be one of the clusters in the instance in which this table is
located. The backup will be stored in this cluster. Values are of the form
`projects/{project}/instances/{instance}/clusters/{cluster}`.backupId - Required. The id of the backup to be created. The `backup_id` along with the
parent `parent` are combined as {parent}/backups/{backup_id} to create the full backup
name, of the form:
`projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. This
string must be between 1 and 50 characters in length and match the regex
[_a-zA-Z0-9][-_.a-zA-Z0-9]*.backup - Required. The backup to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Backup,CreateBackupMetadata> createBackupAsync(CreateBackupRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CreateBackupRequest request =
CreateBackupRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
.setBackupId("backupId2121930365")
.setBackup(Backup.newBuilder().build())
.build();
Backup response = baseBigtableTableAdminClient.createBackupAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateBackupRequest,Backup,CreateBackupMetadata> createBackupOperationCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CreateBackupRequest request =
CreateBackupRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
.setBackupId("backupId2121930365")
.setBackup(Backup.newBuilder().build())
.build();
OperationFuture<Backup, CreateBackupMetadata> future =
baseBigtableTableAdminClient.createBackupOperationCallable().futureCall(request);
// Do something.
Backup response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateBackupRequest,com.google.longrunning.Operation> createBackupCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CreateBackupRequest request =
CreateBackupRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
.setBackupId("backupId2121930365")
.setBackup(Backup.newBuilder().build())
.build();
ApiFuture<Operation> future =
baseBigtableTableAdminClient.createBackupCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final Backup getBackup(BackupName name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
BackupName name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
Backup response = baseBigtableTableAdminClient.getBackup(name);
}
name - Required. Name of the backup. Values are of the form
`projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Backup getBackup(String name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString();
Backup response = baseBigtableTableAdminClient.getBackup(name);
}
name - Required. Name of the backup. Values are of the form
`projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Backup getBackup(GetBackupRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
GetBackupRequest request =
GetBackupRequest.newBuilder()
.setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString())
.build();
Backup response = baseBigtableTableAdminClient.getBackup(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetBackupRequest,Backup> getBackupCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
GetBackupRequest request =
GetBackupRequest.newBuilder()
.setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString())
.build();
ApiFuture<Backup> future =
baseBigtableTableAdminClient.getBackupCallable().futureCall(request);
// Do something.
Backup response = future.get();
}
public final Backup updateBackup(Backup backup, com.google.protobuf.FieldMask updateMask)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
Backup backup = Backup.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Backup response = baseBigtableTableAdminClient.updateBackup(backup, updateMask);
}
backup - Required. The backup to update. `backup.name`, and the fields to be updated as
specified by `update_mask` are required. Other fields are ignored. Update is only supported
for the following fields:
* `backup.expire_time`.
updateMask - Required. A mask specifying which fields (e.g. `expire_time`) in the Backup
resource should be updated. This mask is relative to the Backup resource, not to the
request message. The field mask must always be specified; this prevents any future fields
from being erased accidentally by clients that do not know about them.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Backup updateBackup(UpdateBackupRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
UpdateBackupRequest request =
UpdateBackupRequest.newBuilder()
.setBackup(Backup.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Backup response = baseBigtableTableAdminClient.updateBackup(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateBackupRequest,Backup> updateBackupCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
UpdateBackupRequest request =
UpdateBackupRequest.newBuilder()
.setBackup(Backup.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Backup> future =
baseBigtableTableAdminClient.updateBackupCallable().futureCall(request);
// Do something.
Backup response = future.get();
}
public final void deleteBackup(BackupName name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
BackupName name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
baseBigtableTableAdminClient.deleteBackup(name);
}
name - Required. Name of the backup to delete. Values are of the form
`projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteBackup(String name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString();
baseBigtableTableAdminClient.deleteBackup(name);
}
name - Required. Name of the backup to delete. Values are of the form
`projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteBackup(DeleteBackupRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
DeleteBackupRequest request =
DeleteBackupRequest.newBuilder()
.setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString())
.build();
baseBigtableTableAdminClient.deleteBackup(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteBackupRequest,com.google.protobuf.Empty> deleteBackupCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
DeleteBackupRequest request =
DeleteBackupRequest.newBuilder()
.setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString())
.build();
ApiFuture<Empty> future =
baseBigtableTableAdminClient.deleteBackupCallable().futureCall(request);
// Do something.
future.get();
}
public final BaseBigtableTableAdminClient.ListBackupsPagedResponse listBackups(ClusterName parent)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
for (Backup element : baseBigtableTableAdminClient.listBackups(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The cluster to list backups from. Values are of the form
`projects/{project}/instances/{instance}/clusters/{cluster}`. Use `{cluster} = '-'` to list
backups for all clusters in an instance, e.g.,
`projects/{project}/instances/{instance}/clusters/-`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BaseBigtableTableAdminClient.ListBackupsPagedResponse listBackups(String parent)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
for (Backup element : baseBigtableTableAdminClient.listBackups(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The cluster to list backups from. Values are of the form
`projects/{project}/instances/{instance}/clusters/{cluster}`. Use `{cluster} = '-'` to list
backups for all clusters in an instance, e.g.,
`projects/{project}/instances/{instance}/clusters/-`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BaseBigtableTableAdminClient.ListBackupsPagedResponse listBackups(ListBackupsRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ListBackupsRequest request =
ListBackupsRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Backup element : baseBigtableTableAdminClient.listBackups(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListBackupsRequest,BaseBigtableTableAdminClient.ListBackupsPagedResponse> listBackupsPagedCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ListBackupsRequest request =
ListBackupsRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Backup> future =
baseBigtableTableAdminClient.listBackupsPagedCallable().futureCall(request);
// Do something.
for (Backup element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListBackupsRequest,ListBackupsResponse> listBackupsCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ListBackupsRequest request =
ListBackupsRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListBackupsResponse response =
baseBigtableTableAdminClient.listBackupsCallable().call(request);
for (Backup element : response.getBackupsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<Table,RestoreTableMetadata> restoreTableAsync(RestoreTableRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
RestoreTableRequest request =
RestoreTableRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setTableId("tableId-1552905847")
.build();
Table response = baseBigtableTableAdminClient.restoreTableAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<RestoreTableRequest,Table,RestoreTableMetadata> restoreTableOperationCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
RestoreTableRequest request =
RestoreTableRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setTableId("tableId-1552905847")
.build();
OperationFuture<Table, RestoreTableMetadata> future =
baseBigtableTableAdminClient.restoreTableOperationCallable().futureCall(request);
// Do something.
Table response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<RestoreTableRequest,com.google.longrunning.Operation> restoreTableCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
RestoreTableRequest request =
RestoreTableRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setTableId("tableId-1552905847")
.build();
ApiFuture<Operation> future =
baseBigtableTableAdminClient.restoreTableCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Backup,CopyBackupMetadata> copyBackupAsync(ClusterName parent, String backupId, BackupName sourceBackup, com.google.protobuf.Timestamp expireTime)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
String backupId = "backupId2121930365";
BackupName sourceBackup = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
Timestamp expireTime = Timestamp.newBuilder().build();
Backup response =
baseBigtableTableAdminClient
.copyBackupAsync(parent, backupId, sourceBackup, expireTime)
.get();
}
parent - Required. The name of the destination cluster that will contain the backup copy.
The cluster must already exist. Values are of the form:
`projects/{project}/instances/{instance}/clusters/{cluster}`.backupId - Required. The id of the new backup. The `backup_id` along with `parent` are
combined as {parent}/backups/{backup_id} to create the full backup name, of the form:
`projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. This
string must be between 1 and 50 characters in length and match the regex
[_a-zA-Z0-9][-_.a-zA-Z0-9]*.sourceBackup - Required. The source backup to be copied from. The source backup needs to
be in READY state for it to be copied. Copying a copied backup is not allowed. Once
CopyBackup is in progress, the source backup cannot be deleted or cleaned up on expiration
until CopyBackup is finished. Values are of the form:
`projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.expireTime - Required. Required. The expiration time of the copied backup with microsecond
granularity that must be at least 6 hours and at most 30 days from the time the request is
received. Once the `expire_time` has passed, Cloud Bigtable will delete the backup and free
the resources used by the backup.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Backup,CopyBackupMetadata> copyBackupAsync(ClusterName parent, String backupId, String sourceBackup, com.google.protobuf.Timestamp expireTime)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
String backupId = "backupId2121930365";
String sourceBackup =
BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString();
Timestamp expireTime = Timestamp.newBuilder().build();
Backup response =
baseBigtableTableAdminClient
.copyBackupAsync(parent, backupId, sourceBackup, expireTime)
.get();
}
parent - Required. The name of the destination cluster that will contain the backup copy.
The cluster must already exist. Values are of the form:
`projects/{project}/instances/{instance}/clusters/{cluster}`.backupId - Required. The id of the new backup. The `backup_id` along with `parent` are
combined as {parent}/backups/{backup_id} to create the full backup name, of the form:
`projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. This
string must be between 1 and 50 characters in length and match the regex
[_a-zA-Z0-9][-_.a-zA-Z0-9]*.sourceBackup - Required. The source backup to be copied from. The source backup needs to
be in READY state for it to be copied. Copying a copied backup is not allowed. Once
CopyBackup is in progress, the source backup cannot be deleted or cleaned up on expiration
until CopyBackup is finished. Values are of the form:
`projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.expireTime - Required. Required. The expiration time of the copied backup with microsecond
granularity that must be at least 6 hours and at most 30 days from the time the request is
received. Once the `expire_time` has passed, Cloud Bigtable will delete the backup and free
the resources used by the backup.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Backup,CopyBackupMetadata> copyBackupAsync(String parent, String backupId, BackupName sourceBackup, com.google.protobuf.Timestamp expireTime)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
String backupId = "backupId2121930365";
BackupName sourceBackup = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
Timestamp expireTime = Timestamp.newBuilder().build();
Backup response =
baseBigtableTableAdminClient
.copyBackupAsync(parent, backupId, sourceBackup, expireTime)
.get();
}
parent - Required. The name of the destination cluster that will contain the backup copy.
The cluster must already exist. Values are of the form:
`projects/{project}/instances/{instance}/clusters/{cluster}`.backupId - Required. The id of the new backup. The `backup_id` along with `parent` are
combined as {parent}/backups/{backup_id} to create the full backup name, of the form:
`projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. This
string must be between 1 and 50 characters in length and match the regex
[_a-zA-Z0-9][-_.a-zA-Z0-9]*.sourceBackup - Required. The source backup to be copied from. The source backup needs to
be in READY state for it to be copied. Copying a copied backup is not allowed. Once
CopyBackup is in progress, the source backup cannot be deleted or cleaned up on expiration
until CopyBackup is finished. Values are of the form:
`projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.expireTime - Required. Required. The expiration time of the copied backup with microsecond
granularity that must be at least 6 hours and at most 30 days from the time the request is
received. Once the `expire_time` has passed, Cloud Bigtable will delete the backup and free
the resources used by the backup.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Backup,CopyBackupMetadata> copyBackupAsync(String parent, String backupId, String sourceBackup, com.google.protobuf.Timestamp expireTime)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
String backupId = "backupId2121930365";
String sourceBackup =
BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString();
Timestamp expireTime = Timestamp.newBuilder().build();
Backup response =
baseBigtableTableAdminClient
.copyBackupAsync(parent, backupId, sourceBackup, expireTime)
.get();
}
parent - Required. The name of the destination cluster that will contain the backup copy.
The cluster must already exist. Values are of the form:
`projects/{project}/instances/{instance}/clusters/{cluster}`.backupId - Required. The id of the new backup. The `backup_id` along with `parent` are
combined as {parent}/backups/{backup_id} to create the full backup name, of the form:
`projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. This
string must be between 1 and 50 characters in length and match the regex
[_a-zA-Z0-9][-_.a-zA-Z0-9]*.sourceBackup - Required. The source backup to be copied from. The source backup needs to
be in READY state for it to be copied. Copying a copied backup is not allowed. Once
CopyBackup is in progress, the source backup cannot be deleted or cleaned up on expiration
until CopyBackup is finished. Values are of the form:
`projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.expireTime - Required. Required. The expiration time of the copied backup with microsecond
granularity that must be at least 6 hours and at most 30 days from the time the request is
received. Once the `expire_time` has passed, Cloud Bigtable will delete the backup and free
the resources used by the backup.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Backup,CopyBackupMetadata> copyBackupAsync(CopyBackupRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CopyBackupRequest request =
CopyBackupRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
.setBackupId("backupId2121930365")
.setSourceBackup(
BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString())
.setExpireTime(Timestamp.newBuilder().build())
.build();
Backup response = baseBigtableTableAdminClient.copyBackupAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CopyBackupRequest,Backup,CopyBackupMetadata> copyBackupOperationCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CopyBackupRequest request =
CopyBackupRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
.setBackupId("backupId2121930365")
.setSourceBackup(
BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString())
.setExpireTime(Timestamp.newBuilder().build())
.build();
OperationFuture<Backup, CopyBackupMetadata> future =
baseBigtableTableAdminClient.copyBackupOperationCallable().futureCall(request);
// Do something.
Backup response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CopyBackupRequest,com.google.longrunning.Operation> copyBackupCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CopyBackupRequest request =
CopyBackupRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
.setBackupId("backupId2121930365")
.setSourceBackup(
BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString())
.setExpireTime(Timestamp.newBuilder().build())
.build();
ApiFuture<Operation> future =
baseBigtableTableAdminClient.copyBackupCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.iam.v1.Policy getIamPolicy(com.google.api.resourcenames.ResourceName resource)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ResourceName resource =
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]");
Policy response = baseBigtableTableAdminClient.getIamPolicy(resource);
}
resource - REQUIRED: The resource for which the policy is being requested. See the
operation documentation for the appropriate value for this field.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.iam.v1.Policy getIamPolicy(String resource)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString();
Policy response = baseBigtableTableAdminClient.getIamPolicy(resource);
}
resource - REQUIRED: The resource for which the policy is being requested. See the
operation documentation for the appropriate value for this field.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
.toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
Policy response = baseBigtableTableAdminClient.getIamPolicy(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> getIamPolicyCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
.toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
ApiFuture<Policy> future =
baseBigtableTableAdminClient.getIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
public final com.google.iam.v1.Policy setIamPolicy(com.google.api.resourcenames.ResourceName resource,
com.google.iam.v1.Policy policy)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ResourceName resource =
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]");
Policy policy = Policy.newBuilder().build();
Policy response = baseBigtableTableAdminClient.setIamPolicy(resource, policy);
}
resource - REQUIRED: The resource for which the policy is being specified. See the
operation documentation for the appropriate value for this field.policy - REQUIRED: The complete policy to be applied to the `resource`. The size of the
policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
Platform services (such as Projects) might reject them.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.iam.v1.Policy setIamPolicy(String resource, com.google.iam.v1.Policy policy)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString();
Policy policy = Policy.newBuilder().build();
Policy response = baseBigtableTableAdminClient.setIamPolicy(resource, policy);
}
resource - REQUIRED: The resource for which the policy is being specified. See the
operation documentation for the appropriate value for this field.policy - REQUIRED: The complete policy to be applied to the `resource`. The size of the
policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
Platform services (such as Projects) might reject them.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Policy response = baseBigtableTableAdminClient.setIamPolicy(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> setIamPolicyCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Policy> future =
baseBigtableTableAdminClient.setIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
public final com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(com.google.api.resourcenames.ResourceName resource,
List<String> permissions)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ResourceName resource =
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]");
List<String> permissions = new ArrayList<>();
TestIamPermissionsResponse response =
baseBigtableTableAdminClient.testIamPermissions(resource, permissions);
}
resource - REQUIRED: The resource for which the policy detail is being requested. See the
operation documentation for the appropriate value for this field.permissions - The set of permissions to check for the `resource`. Permissions with
wildcards (such as '*' or 'storage.*') are not allowed. For more information see
[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(String resource, List<String> permissions)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString();
List<String> permissions = new ArrayList<>();
TestIamPermissionsResponse response =
baseBigtableTableAdminClient.testIamPermissions(resource, permissions);
}
resource - REQUIRED: The resource for which the policy detail is being requested. See the
operation documentation for the appropriate value for this field.permissions - The set of permissions to check for the `resource`. Permissions with
wildcards (such as '*' or 'storage.*') are not allowed. For more information see
[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
.toString())
.addAllPermissions(new ArrayList<String>())
.build();
TestIamPermissionsResponse response =
baseBigtableTableAdminClient.testIamPermissions(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> testIamPermissionsCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
.toString())
.addAllPermissions(new ArrayList<String>())
.build();
ApiFuture<TestIamPermissionsResponse> future =
baseBigtableTableAdminClient.testIamPermissionsCallable().futureCall(request);
// Do something.
TestIamPermissionsResponse response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<SchemaBundle,CreateSchemaBundleMetadata> createSchemaBundleAsync(TableName parent, String schemaBundleId, SchemaBundle schemaBundle)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
TableName parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
String schemaBundleId = "schemaBundleId2039843326";
SchemaBundle schemaBundle = SchemaBundle.newBuilder().build();
SchemaBundle response =
baseBigtableTableAdminClient
.createSchemaBundleAsync(parent, schemaBundleId, schemaBundle)
.get();
}
parent - Required. The parent resource where this schema bundle will be created. Values
are of the form `projects/{project}/instances/{instance}/tables/{table}`.schemaBundleId - Required. The unique ID to use for the schema bundle, which will become
the final component of the schema bundle's resource name.schemaBundle - Required. The schema bundle to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<SchemaBundle,CreateSchemaBundleMetadata> createSchemaBundleAsync(String parent, String schemaBundleId, SchemaBundle schemaBundle)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
String schemaBundleId = "schemaBundleId2039843326";
SchemaBundle schemaBundle = SchemaBundle.newBuilder().build();
SchemaBundle response =
baseBigtableTableAdminClient
.createSchemaBundleAsync(parent, schemaBundleId, schemaBundle)
.get();
}
parent - Required. The parent resource where this schema bundle will be created. Values
are of the form `projects/{project}/instances/{instance}/tables/{table}`.schemaBundleId - Required. The unique ID to use for the schema bundle, which will become
the final component of the schema bundle's resource name.schemaBundle - Required. The schema bundle to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<SchemaBundle,CreateSchemaBundleMetadata> createSchemaBundleAsync(CreateSchemaBundleRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CreateSchemaBundleRequest request =
CreateSchemaBundleRequest.newBuilder()
.setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setSchemaBundleId("schemaBundleId2039843326")
.setSchemaBundle(SchemaBundle.newBuilder().build())
.build();
SchemaBundle response = baseBigtableTableAdminClient.createSchemaBundleAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateSchemaBundleRequest,SchemaBundle,CreateSchemaBundleMetadata> createSchemaBundleOperationCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CreateSchemaBundleRequest request =
CreateSchemaBundleRequest.newBuilder()
.setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setSchemaBundleId("schemaBundleId2039843326")
.setSchemaBundle(SchemaBundle.newBuilder().build())
.build();
OperationFuture<SchemaBundle, CreateSchemaBundleMetadata> future =
baseBigtableTableAdminClient.createSchemaBundleOperationCallable().futureCall(request);
// Do something.
SchemaBundle response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateSchemaBundleRequest,com.google.longrunning.Operation> createSchemaBundleCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
CreateSchemaBundleRequest request =
CreateSchemaBundleRequest.newBuilder()
.setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setSchemaBundleId("schemaBundleId2039843326")
.setSchemaBundle(SchemaBundle.newBuilder().build())
.build();
ApiFuture<Operation> future =
baseBigtableTableAdminClient.createSchemaBundleCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<SchemaBundle,UpdateSchemaBundleMetadata> updateSchemaBundleAsync(SchemaBundle schemaBundle, com.google.protobuf.FieldMask updateMask)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
SchemaBundle schemaBundle = SchemaBundle.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
SchemaBundle response =
baseBigtableTableAdminClient.updateSchemaBundleAsync(schemaBundle, updateMask).get();
}
schemaBundle - Required. The schema bundle to update.
The schema bundle's `name` field is used to identify the schema bundle to update. Values are of the form `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
updateMask - Optional. The list of fields to update.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<SchemaBundle,UpdateSchemaBundleMetadata> updateSchemaBundleAsync(UpdateSchemaBundleRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
UpdateSchemaBundleRequest request =
UpdateSchemaBundleRequest.newBuilder()
.setSchemaBundle(SchemaBundle.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setIgnoreWarnings(true)
.build();
SchemaBundle response = baseBigtableTableAdminClient.updateSchemaBundleAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateSchemaBundleRequest,SchemaBundle,UpdateSchemaBundleMetadata> updateSchemaBundleOperationCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
UpdateSchemaBundleRequest request =
UpdateSchemaBundleRequest.newBuilder()
.setSchemaBundle(SchemaBundle.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setIgnoreWarnings(true)
.build();
OperationFuture<SchemaBundle, UpdateSchemaBundleMetadata> future =
baseBigtableTableAdminClient.updateSchemaBundleOperationCallable().futureCall(request);
// Do something.
SchemaBundle response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateSchemaBundleRequest,com.google.longrunning.Operation> updateSchemaBundleCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
UpdateSchemaBundleRequest request =
UpdateSchemaBundleRequest.newBuilder()
.setSchemaBundle(SchemaBundle.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setIgnoreWarnings(true)
.build();
ApiFuture<Operation> future =
baseBigtableTableAdminClient.updateSchemaBundleCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final SchemaBundle getSchemaBundle(SchemaBundleName name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
SchemaBundleName name =
SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]");
SchemaBundle response = baseBigtableTableAdminClient.getSchemaBundle(name);
}
name - Required. The unique name of the schema bundle to retrieve. Values are of the form
`projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final SchemaBundle getSchemaBundle(String name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String name =
SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]").toString();
SchemaBundle response = baseBigtableTableAdminClient.getSchemaBundle(name);
}
name - Required. The unique name of the schema bundle to retrieve. Values are of the form
`projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final SchemaBundle getSchemaBundle(GetSchemaBundleRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
GetSchemaBundleRequest request =
GetSchemaBundleRequest.newBuilder()
.setName(
SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]")
.toString())
.build();
SchemaBundle response = baseBigtableTableAdminClient.getSchemaBundle(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetSchemaBundleRequest,SchemaBundle> getSchemaBundleCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
GetSchemaBundleRequest request =
GetSchemaBundleRequest.newBuilder()
.setName(
SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]")
.toString())
.build();
ApiFuture<SchemaBundle> future =
baseBigtableTableAdminClient.getSchemaBundleCallable().futureCall(request);
// Do something.
SchemaBundle response = future.get();
}
public final BaseBigtableTableAdminClient.ListSchemaBundlesPagedResponse listSchemaBundles(TableName parent)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
TableName parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
for (SchemaBundle element :
baseBigtableTableAdminClient.listSchemaBundles(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent, which owns this collection of schema bundles. Values are of
the form `projects/{project}/instances/{instance}/tables/{table}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BaseBigtableTableAdminClient.ListSchemaBundlesPagedResponse listSchemaBundles(String parent)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
for (SchemaBundle element :
baseBigtableTableAdminClient.listSchemaBundles(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent, which owns this collection of schema bundles. Values are of
the form `projects/{project}/instances/{instance}/tables/{table}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BaseBigtableTableAdminClient.ListSchemaBundlesPagedResponse listSchemaBundles(ListSchemaBundlesRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ListSchemaBundlesRequest request =
ListSchemaBundlesRequest.newBuilder()
.setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (SchemaBundle element :
baseBigtableTableAdminClient.listSchemaBundles(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListSchemaBundlesRequest,BaseBigtableTableAdminClient.ListSchemaBundlesPagedResponse> listSchemaBundlesPagedCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ListSchemaBundlesRequest request =
ListSchemaBundlesRequest.newBuilder()
.setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<SchemaBundle> future =
baseBigtableTableAdminClient.listSchemaBundlesPagedCallable().futureCall(request);
// Do something.
for (SchemaBundle element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListSchemaBundlesRequest,ListSchemaBundlesResponse> listSchemaBundlesCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
ListSchemaBundlesRequest request =
ListSchemaBundlesRequest.newBuilder()
.setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListSchemaBundlesResponse response =
baseBigtableTableAdminClient.listSchemaBundlesCallable().call(request);
for (SchemaBundle element : response.getSchemaBundlesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final void deleteSchemaBundle(SchemaBundleName name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
SchemaBundleName name =
SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]");
baseBigtableTableAdminClient.deleteSchemaBundle(name);
}
name - Required. The unique name of the schema bundle to delete. Values are of the form
`projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteSchemaBundle(String name)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
String name =
SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]").toString();
baseBigtableTableAdminClient.deleteSchemaBundle(name);
}
name - Required. The unique name of the schema bundle to delete. Values are of the form
`projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteSchemaBundle(DeleteSchemaBundleRequest request)
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
DeleteSchemaBundleRequest request =
DeleteSchemaBundleRequest.newBuilder()
.setName(
SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]")
.toString())
.setEtag("etag3123477")
.build();
baseBigtableTableAdminClient.deleteSchemaBundle(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteSchemaBundleRequest,com.google.protobuf.Empty> deleteSchemaBundleCallable()
Sample code:
// 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.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
BaseBigtableTableAdminClient.create()) {
DeleteSchemaBundleRequest request =
DeleteSchemaBundleRequest.newBuilder()
.setName(
SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]")
.toString())
.setEtag("etag3123477")
.build();
ApiFuture<Empty> future =
baseBigtableTableAdminClient.deleteSchemaBundleCallable().futureCall(request);
// Do something.
future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2026 Google LLC. All rights reserved.