public abstract class BigtableTableAdminClient
Reference documentation and code samples for the Google Cloud Bigtable Administration v2 API class BigtableTableAdminClient.
BigtableTableAdmin client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Bigtable.Admin.V2Assembly
Google.Cloud.Bigtable.Admin.V2.dll
Remarks
Service for creating, configuring, and deleting Cloud Bigtable tables.
Provides access to the table schemas only, not the data stored within the tables.
Properties
CreateBackupOperationsClient
public virtual OperationsClient CreateBackupOperationsClient { get; }
The long-running operations client for CreateBackup
.
Type | Description |
OperationsClient |
CreateTableFromSnapshotOperationsClient
public virtual OperationsClient CreateTableFromSnapshotOperationsClient { get; }
The long-running operations client for CreateTableFromSnapshot
.
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the BigtableTableAdmin service, which is a host of "bigtableadmin.googleapis.com" and a port of 443.
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default BigtableTableAdmin scopes.
Type | Description |
IReadOnlyList<String> |
The default BigtableTableAdmin scopes are:
- https://www.googleapis.com/auth/bigtable.admin
- https://www.googleapis.com/auth/bigtable.admin.table
- https://www.googleapis.com/auth/cloud-bigtable.admin
- https://www.googleapis.com/auth/cloud-bigtable.admin.table
- https://www.googleapis.com/auth/cloud-platform
- https://www.googleapis.com/auth/cloud-platform.read-only
GrpcClient
public virtual BigtableTableAdmin.BigtableTableAdminClient GrpcClient { get; }
The underlying gRPC BigtableTableAdmin client
Type | Description |
BigtableTableAdmin.BigtableTableAdminClient |
RestoreTableOperationsClient
public virtual OperationsClient RestoreTableOperationsClient { get; }
The long-running operations client for RestoreTable
.
Type | Description |
OperationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Type | Description |
ServiceMetadata |
SnapshotTableOperationsClient
public virtual OperationsClient SnapshotTableOperationsClient { get; }
The long-running operations client for SnapshotTable
.
Type | Description |
OperationsClient |
UndeleteTableOperationsClient
public virtual OperationsClient UndeleteTableOperationsClient { get; }
The long-running operations client for UndeleteTable
.
Type | Description |
OperationsClient |
UpdateTableOperationsClient
public virtual OperationsClient UpdateTableOperationsClient { get; }
The long-running operations client for UpdateTable
.
Type | Description |
OperationsClient |
Methods
CheckConsistency(CheckConsistencyRequest, CallSettings)
public virtual CheckConsistencyResponse CheckConsistency(CheckConsistencyRequest request, CallSettings callSettings = null)
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.
Name | Description |
request | CheckConsistencyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
CheckConsistencyResponse | The RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
CheckConsistencyRequest request = new CheckConsistencyRequest
{
TableName = TableName.FromProjectInstanceTable("[PROJECT]", "[INSTANCE]", "[TABLE]"),
ConsistencyToken = "",
};
// Make the request
CheckConsistencyResponse response = bigtableTableAdminClient.CheckConsistency(request);
CheckConsistency(TableName, String, CallSettings)
public virtual CheckConsistencyResponse CheckConsistency(TableName name, string consistencyToken, CallSettings callSettings = null)
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.
Name | Description |
name | TableName Required. The unique name of the Table for which to check replication consistency.
Values are of the form
|
consistencyToken | String Required. The token created using GenerateConsistencyToken for the Table. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
CheckConsistencyResponse | The RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
TableName name = TableName.FromProjectInstanceTable("[PROJECT]", "[INSTANCE]", "[TABLE]");
string consistencyToken = "";
// Make the request
CheckConsistencyResponse response = bigtableTableAdminClient.CheckConsistency(name, consistencyToken);
CheckConsistency(String, String, CallSettings)
public virtual CheckConsistencyResponse CheckConsistency(string name, string consistencyToken, CallSettings callSettings = null)
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.
Name | Description |
name | String Required. The unique name of the Table for which to check replication consistency.
Values are of the form
|
consistencyToken | String Required. The token created using GenerateConsistencyToken for the Table. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
CheckConsistencyResponse | The RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instances/[INSTANCE]/tables/[TABLE]";
string consistencyToken = "";
// Make the request
CheckConsistencyResponse response = bigtableTableAdminClient.CheckConsistency(name, consistencyToken);
CheckConsistencyAsync(CheckConsistencyRequest, CallSettings)
public virtual Task<CheckConsistencyResponse> CheckConsistencyAsync(CheckConsistencyRequest request, CallSettings callSettings = null)
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.
Name | Description |
request | CheckConsistencyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<CheckConsistencyResponse> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
CheckConsistencyRequest request = new CheckConsistencyRequest
{
TableName = TableName.FromProjectInstanceTable("[PROJECT]", "[INSTANCE]", "[TABLE]"),
ConsistencyToken = "",
};
// Make the request
CheckConsistencyResponse response = await bigtableTableAdminClient.CheckConsistencyAsync(request);
CheckConsistencyAsync(CheckConsistencyRequest, CancellationToken)
public virtual Task<CheckConsistencyResponse> CheckConsistencyAsync(CheckConsistencyRequest request, CancellationToken cancellationToken)
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.
Name | Description |
request | CheckConsistencyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<CheckConsistencyResponse> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
CheckConsistencyRequest request = new CheckConsistencyRequest
{
TableName = TableName.FromProjectInstanceTable("[PROJECT]", "[INSTANCE]", "[TABLE]"),
ConsistencyToken = "",
};
// Make the request
CheckConsistencyResponse response = await bigtableTableAdminClient.CheckConsistencyAsync(request);
CheckConsistencyAsync(TableName, String, CallSettings)
public virtual Task<CheckConsistencyResponse> CheckConsistencyAsync(TableName name, string consistencyToken, CallSettings callSettings = null)
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.
Name | Description |
name | TableName Required. The unique name of the Table for which to check replication consistency.
Values are of the form
|
consistencyToken | String Required. The token created using GenerateConsistencyToken for the Table. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<CheckConsistencyResponse> | A Task containing the RPC response. |
BigtableTableAdminClient adminClient = await BigtableTableAdminClient.CreateAsync();
BigtableTableAdminSettings settings = BigtableTableAdminSettings.GetDefault();
CallSettings generateSettings = settings.GenerateConsistencyTokenSettings;
CallSettings checkConsistencySettings = settings.CheckConsistencySettings;
// Create a consistency token for the table.
TableName tableName = new TableName("[PROJECT]", "[INSTANCE]", "[TABLE]");
GenerateConsistencyTokenResponse generateResponse =
await adminClient.GenerateConsistencyTokenAsync(tableName, generateSettings);
string consistencyToken = generateResponse.ConsistencyToken;
// Check for consistency for 60 seconds at 10 second intervals.
TimeSpan pollingTimeout = TimeSpan.FromSeconds(60);
TimeSpan pollingInterval = TimeSpan.FromSeconds(10);
CheckConsistencyResponse checkConsistencyResponse =
await Polling.PollRepeatedlyAsync(
deadline => adminClient.CheckConsistencyAsync(
tableName,
consistencyToken,
checkConsistencySettings.WithEarlierDeadline(deadline, settings.Clock)),
response => response.Consistent,
settings.Clock,
settings.Scheduler,
new PollSettings(Expiration.FromTimeout(pollingTimeout), pollingInterval),
checkConsistencySettings.CancellationToken ?? CancellationToken.None);
if (checkConsistencyResponse.Consistent)
{
// Replication has caught up.
}
CheckConsistencyAsync(TableName, String, CancellationToken)
public virtual Task<CheckConsistencyResponse> CheckConsistencyAsync(TableName name, string consistencyToken, CancellationToken cancellationToken)
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.
Name | Description |
name | TableName Required. The unique name of the Table for which to check replication consistency.
Values are of the form
|
consistencyToken | String Required. The token created using GenerateConsistencyToken for the Table. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<CheckConsistencyResponse> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
TableName name = TableName.FromProjectInstanceTable("[PROJECT]", "[INSTANCE]", "[TABLE]");
string consistencyToken = "";
// Make the request
CheckConsistencyResponse response = await bigtableTableAdminClient.CheckConsistencyAsync(name, consistencyToken);
CheckConsistencyAsync(String, String, CallSettings)
public virtual Task<CheckConsistencyResponse> CheckConsistencyAsync(string name, string consistencyToken, CallSettings callSettings = null)
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.
Name | Description |
name | String Required. The unique name of the Table for which to check replication consistency.
Values are of the form
|
consistencyToken | String Required. The token created using GenerateConsistencyToken for the Table. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<CheckConsistencyResponse> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instances/[INSTANCE]/tables/[TABLE]";
string consistencyToken = "";
// Make the request
CheckConsistencyResponse response = await bigtableTableAdminClient.CheckConsistencyAsync(name, consistencyToken);
CheckConsistencyAsync(String, String, CancellationToken)
public virtual Task<CheckConsistencyResponse> CheckConsistencyAsync(string name, string consistencyToken, CancellationToken cancellationToken)
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.
Name | Description |
name | String Required. The unique name of the Table for which to check replication consistency.
Values are of the form
|
consistencyToken | String Required. The token created using GenerateConsistencyToken for the Table. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<CheckConsistencyResponse> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instances/[INSTANCE]/tables/[TABLE]";
string consistencyToken = "";
// Make the request
CheckConsistencyResponse response = await bigtableTableAdminClient.CheckConsistencyAsync(name, consistencyToken);
Create()
public static BigtableTableAdminClient Create()
Synchronously creates a BigtableTableAdminClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use BigtableTableAdminClientBuilder .
Type | Description |
BigtableTableAdminClient | The created BigtableTableAdminClient. |
CreateAsync(CancellationToken)
public static Task<BigtableTableAdminClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a BigtableTableAdminClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use BigtableTableAdminClientBuilder .
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Type | Description |
Task<BigtableTableAdminClient> | The task representing the created BigtableTableAdminClient. |
CreateBackup(ClusterName, String, Backup, CallSettings)
public virtual Operation<Backup, CreateBackupMetadata> CreateBackup(ClusterName parent, string backupId, Backup backup, CallSettings callSettings = null)
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.
Name | Description |
parent | ClusterName 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 |
backupId | String Required. The id of the backup to be created. The |
backup | Backup Required. The backup to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Operation<Backup, CreateBackupMetadata> | The RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectInstanceCluster("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
string backupId = "";
Backup backup = new Backup();
// Make the request
Operation<Backup, CreateBackupMetadata> response = bigtableTableAdminClient.CreateBackup(parent, backupId, backup);
// Poll until the returned long-running operation is complete
Operation<Backup, CreateBackupMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Backup result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Backup, CreateBackupMetadata> retrievedResponse = bigtableTableAdminClient.PollOnceCreateBackup(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateBackup(CreateBackupRequest, CallSettings)
public virtual Operation<Backup, CreateBackupMetadata> CreateBackup(CreateBackupRequest request, CallSettings callSettings = null)
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.
Name | Description |
request | CreateBackupRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Operation<Backup, CreateBackupMetadata> | The RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
CreateBackupRequest request = new CreateBackupRequest
{
ParentAsClusterName = ClusterName.FromProjectInstanceCluster("[PROJECT]", "[INSTANCE]", "[CLUSTER]"),
BackupId = "",
Backup = new Backup(),
};
// Make the request
Operation<Backup, CreateBackupMetadata> response = bigtableTableAdminClient.CreateBackup(request);
// Poll until the returned long-running operation is complete
Operation<Backup, CreateBackupMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Backup result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Backup, CreateBackupMetadata> retrievedResponse = bigtableTableAdminClient.PollOnceCreateBackup(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateBackup(String, String, Backup, CallSettings)
public virtual Operation<Backup, CreateBackupMetadata> CreateBackup(string parent, string backupId, Backup backup, CallSettings callSettings = null)
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.
Name | Description |
parent | String 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 |
backupId | String Required. The id of the backup to be created. The |
backup | Backup Required. The backup to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Operation<Backup, CreateBackupMetadata> | The RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/instances/[INSTANCE]/clusters/[CLUSTER]";
string backupId = "";
Backup backup = new Backup();
// Make the request
Operation<Backup, CreateBackupMetadata> response = bigtableTableAdminClient.CreateBackup(parent, backupId, backup);
// Poll until the returned long-running operation is complete
Operation<Backup, CreateBackupMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Backup result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Backup, CreateBackupMetadata> retrievedResponse = bigtableTableAdminClient.PollOnceCreateBackup(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateBackupAsync(ClusterName, String, Backup, CallSettings)
public virtual Task<Operation<Backup, CreateBackupMetadata>> CreateBackupAsync(ClusterName parent, string backupId, Backup backup, CallSettings callSettings = null)
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.
Name | Description |
parent | ClusterName 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 |
backupId | String Required. The id of the backup to be created. The |
backup | Backup Required. The backup to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<Operation<Backup, CreateBackupMetadata>> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectInstanceCluster("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
string backupId = "";
Backup backup = new Backup();
// Make the request
Operation<Backup, CreateBackupMetadata> response = await bigtableTableAdminClient.CreateBackupAsync(parent, backupId, backup);
// Poll until the returned long-running operation is complete
Operation<Backup, CreateBackupMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Backup result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Backup, CreateBackupMetadata> retrievedResponse = await bigtableTableAdminClient.PollOnceCreateBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateBackupAsync(ClusterName, String, Backup, CancellationToken)
public virtual Task<Operation<Backup, CreateBackupMetadata>> CreateBackupAsync(ClusterName parent, string backupId, Backup backup, CancellationToken cancellationToken)
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.
Name | Description |
parent | ClusterName 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 |
backupId | String Required. The id of the backup to be created. The |
backup | Backup Required. The backup to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<Operation<Backup, CreateBackupMetadata>> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectInstanceCluster("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
string backupId = "";
Backup backup = new Backup();
// Make the request
Operation<Backup, CreateBackupMetadata> response = await bigtableTableAdminClient.CreateBackupAsync(parent, backupId, backup);
// Poll until the returned long-running operation is complete
Operation<Backup, CreateBackupMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Backup result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Backup, CreateBackupMetadata> retrievedResponse = await bigtableTableAdminClient.PollOnceCreateBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateBackupAsync(CreateBackupRequest, CallSettings)
public virtual Task<Operation<Backup, CreateBackupMetadata>> CreateBackupAsync(CreateBackupRequest request, CallSettings callSettings = null)
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.
Name | Description |
request | CreateBackupRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<Operation<Backup, CreateBackupMetadata>> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
CreateBackupRequest request = new CreateBackupRequest
{
ParentAsClusterName = ClusterName.FromProjectInstanceCluster("[PROJECT]", "[INSTANCE]", "[CLUSTER]"),
BackupId = "",
Backup = new Backup(),
};
// Make the request
Operation<Backup, CreateBackupMetadata> response = await bigtableTableAdminClient.CreateBackupAsync(request);
// Poll until the returned long-running operation is complete
Operation<Backup, CreateBackupMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Backup result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Backup, CreateBackupMetadata> retrievedResponse = await bigtableTableAdminClient.PollOnceCreateBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateBackupAsync(CreateBackupRequest, CancellationToken)
public virtual Task<Operation<Backup, CreateBackupMetadata>> CreateBackupAsync(CreateBackupRequest request, CancellationToken cancellationToken)
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.
Name | Description |
request | CreateBackupRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<Operation<Backup, CreateBackupMetadata>> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
CreateBackupRequest request = new CreateBackupRequest
{
ParentAsClusterName = ClusterName.FromProjectInstanceCluster("[PROJECT]", "[INSTANCE]", "[CLUSTER]"),
BackupId = "",
Backup = new Backup(),
};
// Make the request
Operation<Backup, CreateBackupMetadata> response = await bigtableTableAdminClient.CreateBackupAsync(request);
// Poll until the returned long-running operation is complete
Operation<Backup, CreateBackupMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Backup result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Backup, CreateBackupMetadata> retrievedResponse = await bigtableTableAdminClient.PollOnceCreateBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateBackupAsync(String, String, Backup, CallSettings)
public virtual Task<Operation<Backup, CreateBackupMetadata>> CreateBackupAsync(string parent, string backupId, Backup backup, CallSettings callSettings = null)
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.
Name | Description |
parent | String 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 |
backupId | String Required. The id of the backup to be created. The |
backup | Backup Required. The backup to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<Operation<Backup, CreateBackupMetadata>> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/instances/[INSTANCE]/clusters/[CLUSTER]";
string backupId = "";
Backup backup = new Backup();
// Make the request
Operation<Backup, CreateBackupMetadata> response = await bigtableTableAdminClient.CreateBackupAsync(parent, backupId, backup);
// Poll until the returned long-running operation is complete
Operation<Backup, CreateBackupMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Backup result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Backup, CreateBackupMetadata> retrievedResponse = await bigtableTableAdminClient.PollOnceCreateBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateBackupAsync(String, String, Backup, CancellationToken)
public virtual Task<Operation<Backup, CreateBackupMetadata>> CreateBackupAsync(string parent, string backupId, Backup backup, CancellationToken cancellationToken)
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.
Name | Description |
parent | String 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 |
backupId | String Required. The id of the backup to be created. The |
backup | Backup Required. The backup to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<Operation<Backup, CreateBackupMetadata>> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/instances/[INSTANCE]/clusters/[CLUSTER]";
string backupId = "";
Backup backup = new Backup();
// Make the request
Operation<Backup, CreateBackupMetadata> response = await bigtableTableAdminClient.CreateBackupAsync(parent, backupId, backup);
// Poll until the returned long-running operation is complete
Operation<Backup, CreateBackupMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Backup result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Backup, CreateBackupMetadata> retrievedResponse = await bigtableTableAdminClient.PollOnceCreateBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Backup retrievedResult = retrievedResponse.Result;
}
CreateTable(CreateTableRequest, CallSettings)
public virtual Table CreateTable(CreateTableRequest request, CallSettings callSettings = null)
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.
Name | Description |
request | CreateTableRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Table | The RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
CreateTableRequest request = new CreateTableRequest
{
ParentAsInstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
TableId = "",
Table = new Table(),
InitialSplits =
{
new CreateTableRequest.Types.Split(),
},
};
// Make the request
Table response = bigtableTableAdminClient.CreateTable(request);
CreateTable(InstanceName, String, Table, CallSettings)
public virtual Table CreateTable(InstanceName parent, string tableId, Table table, CallSettings callSettings = null)
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.
Name | Description |
parent | InstanceName Required. The unique name of the instance in which to create the table.
Values are of the form |
tableId | String Required. The name by which the new table should be referred to within the parent
instance, e.g., |
table | Table Required. The Table to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Table | The RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
string tableId = "";
Table table = new Table();
// Make the request
Table response = bigtableTableAdminClient.CreateTable(parent, tableId, table);
CreateTable(String, String, Table, CallSettings)
public virtual Table CreateTable(string parent, string tableId, Table table, CallSettings callSettings = null)
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.
Name | Description |
parent | String Required. The unique name of the instance in which to create the table.
Values are of the form |
tableId | String Required. The name by which the new table should be referred to within the parent
instance, e.g., |
table | Table Required. The Table to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Table | The RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/instances/[INSTANCE]";
string tableId = "";
Table table = new Table();
// Make the request
Table response = bigtableTableAdminClient.CreateTable(parent, tableId, table);
CreateTableAsync(CreateTableRequest, CallSettings)
public virtual Task<Table> CreateTableAsync(CreateTableRequest request, CallSettings callSettings = null)
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.
Name | Description |
request | CreateTableRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<Table> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
CreateTableRequest request = new CreateTableRequest
{
ParentAsInstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
TableId = "",
Table = new Table(),
InitialSplits =
{
new CreateTableRequest.Types.Split(),
},
};
// Make the request
Table response = await bigtableTableAdminClient.CreateTableAsync(request);
CreateTableAsync(CreateTableRequest, CancellationToken)
public virtual Task<Table> CreateTableAsync(CreateTableRequest request, CancellationToken cancellationToken)
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.
Name | Description |
request | CreateTableRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<Table> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
CreateTableRequest request = new CreateTableRequest
{
ParentAsInstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
TableId = "",
Table = new Table(),
InitialSplits =
{
new CreateTableRequest.Types.Split(),
},
};
// Make the request
Table response = await bigtableTableAdminClient.CreateTableAsync(request);
CreateTableAsync(InstanceName, String, Table, CallSettings)
public virtual Task<Table> CreateTableAsync(InstanceName parent, string tableId, Table table, CallSettings callSettings = null)
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.
Name | Description |
parent | InstanceName Required. The unique name of the instance in which to create the table.
Values are of the form |
tableId | String Required. The name by which the new table should be referred to within the parent
instance, e.g., |
table | Table Required. The Table to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<Table> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
string tableId = "";
Table table = new Table();
// Make the request
Table response = await bigtableTableAdminClient.CreateTableAsync(parent, tableId, table);
CreateTableAsync(InstanceName, String, Table, CancellationToken)
public virtual Task<Table> CreateTableAsync(InstanceName parent, string tableId, Table table, CancellationToken cancellationToken)
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.
Name | Description |
parent | InstanceName Required. The unique name of the instance in which to create the table.
Values are of the form |
tableId | String Required. The name by which the new table should be referred to within the parent
instance, e.g., |
table | Table Required. The Table to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<Table> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
string tableId = "";
Table table = new Table();
// Make the request
Table response = await bigtableTableAdminClient.CreateTableAsync(parent, tableId, table);
CreateTableAsync(String, String, Table, CallSettings)
public virtual Task<Table> CreateTableAsync(string parent, string tableId, Table table, CallSettings callSettings = null)
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.
Name | Description |
parent | String Required. The unique name of the instance in which to create the table.
Values are of the form |
tableId | String Required. The name by which the new table should be referred to within the parent
instance, e.g., |
table | Table Required. The Table to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<Table> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/instances/[INSTANCE]";
string tableId = "";
Table table = new Table();
// Make the request
Table response = await bigtableTableAdminClient.CreateTableAsync(parent, tableId, table);
CreateTableAsync(String, String, Table, CancellationToken)
public virtual Task<Table> CreateTableAsync(string parent, string tableId, Table table, CancellationToken cancellationToken)
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.
Name | Description |
parent | String Required. The unique name of the instance in which to create the table.
Values are of the form |
tableId | String Required. The name by which the new table should be referred to within the parent
instance, e.g., |
table | Table Required. The Table to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<Table> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/instances/[INSTANCE]";
string tableId = "";
Table table = new Table();
// Make the request
Table response = await bigtableTableAdminClient.CreateTableAsync(parent, tableId, table);
CreateTableFromSnapshot(CreateTableFromSnapshotRequest, CallSettings)
public virtual Operation<Table, CreateTableFromSnapshotMetadata> CreateTableFromSnapshot(CreateTableFromSnapshotRequest request, CallSettings callSettings = null)
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.
Name | Description |
request | CreateTableFromSnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Operation<Table, CreateTableFromSnapshotMetadata> | The RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
CreateTableFromSnapshotRequest request = new CreateTableFromSnapshotRequest
{
ParentAsInstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
TableId = "",
SourceSnapshotAsSnapshotName = SnapshotName.FromProjectInstanceClusterSnapshot("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]"),
};
// Make the request
Operation<Table, CreateTableFromSnapshotMetadata> response = bigtableTableAdminClient.CreateTableFromSnapshot(request);
// Poll until the returned long-running operation is complete
Operation<Table, CreateTableFromSnapshotMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Table result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Table, CreateTableFromSnapshotMetadata> retrievedResponse = bigtableTableAdminClient.PollOnceCreateTableFromSnapshot(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Table retrievedResult = retrievedResponse.Result;
}
CreateTableFromSnapshot(InstanceName, String, SnapshotName, CallSettings)
public virtual Operation<Table, CreateTableFromSnapshotMetadata> CreateTableFromSnapshot(InstanceName parent, string tableId, SnapshotName sourceSnapshot, CallSettings callSettings = null)
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.
Name | Description |
parent | InstanceName Required. The unique name of the instance in which to create the table.
Values are of the form |
tableId | String Required. The name by which the new table should be referred to within the parent
instance, e.g., |
sourceSnapshot | SnapshotName 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
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Operation<Table, CreateTableFromSnapshotMetadata> | The RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
string tableId = "";
SnapshotName sourceSnapshot = SnapshotName.FromProjectInstanceClusterSnapshot("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
// Make the request
Operation<Table, CreateTableFromSnapshotMetadata> response = bigtableTableAdminClient.CreateTableFromSnapshot(parent, tableId, sourceSnapshot);
// Poll until the returned long-running operation is complete
Operation<Table, CreateTableFromSnapshotMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Table result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Table, CreateTableFromSnapshotMetadata> retrievedResponse = bigtableTableAdminClient.PollOnceCreateTableFromSnapshot(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Table retrievedResult = retrievedResponse.Result;
}
CreateTableFromSnapshot(String, String, String, CallSettings)
public virtual Operation<Table, CreateTableFromSnapshotMetadata> CreateTableFromSnapshot(string parent, string tableId, string sourceSnapshot, CallSettings callSettings = null)
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.
Name | Description |
parent | String Required. The unique name of the instance in which to create the table.
Values are of the form |
tableId | String Required. The name by which the new table should be referred to within the parent
instance, e.g., |
sourceSnapshot | String 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
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Operation<Table, CreateTableFromSnapshotMetadata> | The RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/instances/[INSTANCE]";
string tableId = "";
string sourceSnapshot = "projects/[PROJECT]/instances/[INSTANCE]/clusters/[CLUSTER]/snapshots/[SNAPSHOT]";
// Make the request
Operation<Table, CreateTableFromSnapshotMetadata> response = bigtableTableAdminClient.CreateTableFromSnapshot(parent, tableId, sourceSnapshot);
// Poll until the returned long-running operation is complete
Operation<Table, CreateTableFromSnapshotMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Table result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Table, CreateTableFromSnapshotMetadata> retrievedResponse = bigtableTableAdminClient.PollOnceCreateTableFromSnapshot(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Table retrievedResult = retrievedResponse.Result;
}
CreateTableFromSnapshotAsync(CreateTableFromSnapshotRequest, CallSettings)
public virtual Task<Operation<Table, CreateTableFromSnapshotMetadata>> CreateTableFromSnapshotAsync(CreateTableFromSnapshotRequest request, CallSettings callSettings = null)
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.
Name | Description |
request | CreateTableFromSnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<Operation<Table, CreateTableFromSnapshotMetadata>> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
CreateTableFromSnapshotRequest request = new CreateTableFromSnapshotRequest
{
ParentAsInstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
TableId = "",
SourceSnapshotAsSnapshotName = SnapshotName.FromProjectInstanceClusterSnapshot("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]"),
};
// Make the request
Operation<Table, CreateTableFromSnapshotMetadata> response = await bigtableTableAdminClient.CreateTableFromSnapshotAsync(request);
// Poll until the returned long-running operation is complete
Operation<Table, CreateTableFromSnapshotMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Table result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Table, CreateTableFromSnapshotMetadata> retrievedResponse = await bigtableTableAdminClient.PollOnceCreateTableFromSnapshotAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Table retrievedResult = retrievedResponse.Result;
}
CreateTableFromSnapshotAsync(CreateTableFromSnapshotRequest, CancellationToken)
public virtual Task<Operation<Table, CreateTableFromSnapshotMetadata>> CreateTableFromSnapshotAsync(CreateTableFromSnapshotRequest request, CancellationToken cancellationToken)
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.
Name | Description |
request | CreateTableFromSnapshotRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<Operation<Table, CreateTableFromSnapshotMetadata>> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
CreateTableFromSnapshotRequest request = new CreateTableFromSnapshotRequest
{
ParentAsInstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
TableId = "",
SourceSnapshotAsSnapshotName = SnapshotName.FromProjectInstanceClusterSnapshot("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]"),
};
// Make the request
Operation<Table, CreateTableFromSnapshotMetadata> response = await bigtableTableAdminClient.CreateTableFromSnapshotAsync(request);
// Poll until the returned long-running operation is complete
Operation<Table, CreateTableFromSnapshotMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Table result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Table, CreateTableFromSnapshotMetadata> retrievedResponse = await bigtableTableAdminClient.PollOnceCreateTableFromSnapshotAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Table retrievedResult = retrievedResponse.Result;
}
CreateTableFromSnapshotAsync(InstanceName, String, SnapshotName, CallSettings)
public virtual Task<Operation<Table, CreateTableFromSnapshotMetadata>> CreateTableFromSnapshotAsync(InstanceName parent, string tableId, SnapshotName sourceSnapshot, CallSettings callSettings = null)
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.
Name | Description |
parent | InstanceName Required. The unique name of the instance in which to create the table.
Values are of the form |
tableId | String Required. The name by which the new table should be referred to within the parent
instance, e.g., |
sourceSnapshot | SnapshotName 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
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<Operation<Table, CreateTableFromSnapshotMetadata>> | A Task containing the RPC response. |
// Create client
BigtableTableAdminClient bigtableTableAdminClient = await BigtableTableAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
string tableId = "";
SnapshotName sourceSnapshot = SnapshotName.FromProjectInstanceClusterSnapshot("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
// Make the request
Operation<Table, CreateTableFromSnapshotMetadata> response = await bigtableTableAdminClient.CreateTableFromSnapshotAsync(parent, tableId, sourceSnapshot);
// Poll until the returned long-running operation is complete
Operation<Table, CreateTableFromSnapshotMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Table result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Table, CreateTableFromSnapshotMetadata> retrievedResponse = await bigtableTableAdminClient.PollOnceCreateTableFromSnapshotAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Table retrievedResult = retrievedResponse.Result;
}
CreateTableFromSnapshotAsync(InstanceName, String, SnapshotName, CancellationToken)
public virtual Task<Operation<Table, CreateTableFromSnapshotMetadata>> CreateTableFromSnapshotAsync(InstanceName parent, string tableId, SnapshotName sourceSnapshot, CancellationToken cancellationToken)
<