Reference documentation and code samples for the Cloud Bigtable Admin V2 API class Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.
Client for the BigtableTableAdmin service.
Service for creating, configuring, and deleting Cloud Bigtable tables.
Provides access to the table schemas only, not the data stored within the tables.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the BigtableTableAdmin Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all BigtableTableAdmin clients ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.configure do |config| config.timeout = 10.0 end
#check_consistency
def check_consistency(request, options = nil) -> ::Google::Cloud::Bigtable::Admin::V2::CheckConsistencyResponse
def check_consistency(name: nil, consistency_token: nil) -> ::Google::Cloud::Bigtable::Admin::V2::CheckConsistencyResponseChecks 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.
def check_consistency(request, options = nil) -> ::Google::Cloud::Bigtable::Admin::V2::CheckConsistencyResponsecheck_consistency via a request object, either of type
CheckConsistencyRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::CheckConsistencyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def check_consistency(name: nil, consistency_token: nil) -> ::Google::Cloud::Bigtable::Admin::V2::CheckConsistencyResponsecheck_consistency via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The unique name of the Table for which to check replication consistency.
Values are of the form
projects/{project}/instances/{instance}/tables/{table}. - consistency_token (::String) — Required. The token created using GenerateConsistencyToken for the Table.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Bigtable::Admin::V2::CheckConsistencyResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::CheckConsistencyRequest.new # Call the check_consistency method. result = client.check_consistency request # The returned object is of type Google::Cloud::Bigtable::Admin::V2::CheckConsistencyResponse. p result
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the BigtableTableAdmin Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_backup
def create_backup(request, options = nil) -> ::Gapic::Operation
def create_backup(parent: nil, backup_id: nil, backup: nil) -> ::Gapic::OperationStarts creating a new Cloud Bigtable Backup. The returned backup long-running operation can be used to track creation of the backup. The metadata field type is CreateBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the creation and delete the backup.
def create_backup(request, options = nil) -> ::Gapic::Operationcreate_backup via a request object, either of type
CreateBackupRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::CreateBackupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_backup(parent: nil, backup_id: nil, backup: nil) -> ::Gapic::Operationcreate_backup via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
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
projects/{project}/instances/{instance}/clusters/{cluster}. -
backup_id (::String) — Required. The id of the backup to be created. The
backup_idalong with the parentparentare 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 (::Google::Cloud::Bigtable::Admin::V2::Backup, ::Hash) — Required. The backup to create.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::CreateBackupRequest.new # Call the create_backup method. result = client.create_backup request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#create_table
def create_table(request, options = nil) -> ::Google::Cloud::Bigtable::Admin::V2::Table
def create_table(parent: nil, table_id: nil, table: nil, initial_splits: nil) -> ::Google::Cloud::Bigtable::Admin::V2::TableCreates a new table in the specified instance. The table can be created with a full set of initial column families, specified in the request.
def create_table(request, options = nil) -> ::Google::Cloud::Bigtable::Admin::V2::Tablecreate_table via a request object, either of type
CreateTableRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::CreateTableRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_table(parent: nil, table_id: nil, table: nil, initial_splits: nil) -> ::Google::Cloud::Bigtable::Admin::V2::Tablecreate_table via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The unique name of the instance in which to create the table.
Values are of the form
projects/{project}/instances/{instance}. -
table_id (::String) — Required. The name by which the new table should be referred to within the parent
instance, e.g.,
foobarrather than{parent}/tables/foobar. Maximum 50 characters. - table (::Google::Cloud::Bigtable::Admin::V2::Table, ::Hash) — Required. The Table to create.
-
initial_splits (::Array<::Google::Cloud::Bigtable::Admin::V2::CreateTableRequest::Split, ::Hash>) —
The optional list of row keys that will be used to initially split the table into several tablets (tablets are similar to HBase regions). Given two split keys,
s1ands2, three tablets will be created, spanning the key ranges:[, s1), [s1, s2), [s2, ).Example:
- Row keys :=
["a", "apple", "custom", "customer_1", "customer_2","other", "zz"] - initial_split_keys :=
["apple", "customer_1", "customer_2", "other"] - Key assignment:
- Tablet 1
[, apple) => {"a"}. - Tablet 2
[apple, customer_1) => {"apple", "custom"}. - Tablet 3
[customer_1, customer_2) => {"customer_1"}. - Tablet 4
[customer_2, other) => {"customer_2"}. - Tablet 5
[other, ) => {"other", "zz"}.
- Tablet 1
- Row keys :=
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Bigtable::Admin::V2::Table)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::CreateTableRequest.new # Call the create_table method. result = client.create_table request # The returned object is of type Google::Cloud::Bigtable::Admin::V2::Table. p result
#create_table_from_snapshot
def create_table_from_snapshot(request, options = nil) -> ::Gapic::Operation
def create_table_from_snapshot(parent: nil, table_id: nil, source_snapshot: nil) -> ::Gapic::OperationCreates 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.
def create_table_from_snapshot(request, options = nil) -> ::Gapic::Operationcreate_table_from_snapshot via a request object, either of type
CreateTableFromSnapshotRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::CreateTableFromSnapshotRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_table_from_snapshot(parent: nil, table_id: nil, source_snapshot: nil) -> ::Gapic::Operationcreate_table_from_snapshot via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The unique name of the instance in which to create the table.
Values are of the form
projects/{project}/instances/{instance}. -
table_id (::String) — Required. The name by which the new table should be referred to within the parent
instance, e.g.,
foobarrather than{parent}/tables/foobar. -
source_snapshot (::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
projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::CreateTableFromSnapshotRequest.new # Call the create_table_from_snapshot method. result = client.create_table_from_snapshot request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#delete_backup
def delete_backup(request, options = nil) -> ::Google::Protobuf::Empty
def delete_backup(name: nil) -> ::Google::Protobuf::EmptyDeletes a pending or completed Cloud Bigtable backup.
def delete_backup(request, options = nil) -> ::Google::Protobuf::Emptydelete_backup via a request object, either of type
DeleteBackupRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::DeleteBackupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_backup(name: nil) -> ::Google::Protobuf::Emptydelete_backup via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Name of the backup to delete.
Values are of the form
projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::DeleteBackupRequest.new # Call the delete_backup method. result = client.delete_backup request # The returned object is of type Google::Protobuf::Empty. p result
#delete_snapshot
def delete_snapshot(request, options = nil) -> ::Google::Protobuf::Empty
def delete_snapshot(name: nil) -> ::Google::Protobuf::EmptyPermanently 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.
def delete_snapshot(request, options = nil) -> ::Google::Protobuf::Emptydelete_snapshot via a request object, either of type
DeleteSnapshotRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::DeleteSnapshotRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_snapshot(name: nil) -> ::Google::Protobuf::Emptydelete_snapshot via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The unique name of the snapshot to be deleted.
Values are of the form
projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::DeleteSnapshotRequest.new # Call the delete_snapshot method. result = client.delete_snapshot request # The returned object is of type Google::Protobuf::Empty. p result
#delete_table
def delete_table(request, options = nil) -> ::Google::Protobuf::Empty
def delete_table(name: nil) -> ::Google::Protobuf::EmptyPermanently deletes a specified table and all of its data.
def delete_table(request, options = nil) -> ::Google::Protobuf::Emptydelete_table via a request object, either of type
DeleteTableRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::DeleteTableRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_table(name: nil) -> ::Google::Protobuf::Emptydelete_table via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The unique name of the table to be deleted.
Values are of the form
projects/{project}/instances/{instance}/tables/{table}.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::DeleteTableRequest.new # Call the delete_table method. result = client.delete_table request # The returned object is of type Google::Protobuf::Empty. p result
#drop_row_range
def drop_row_range(request, options = nil) -> ::Google::Protobuf::Empty
def drop_row_range(name: nil, row_key_prefix: nil, delete_all_data_from_table: nil) -> ::Google::Protobuf::EmptyPermanently 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.
def drop_row_range(request, options = nil) -> ::Google::Protobuf::Emptydrop_row_range via a request object, either of type
DropRowRangeRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::DropRowRangeRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def drop_row_range(name: nil, row_key_prefix: nil, delete_all_data_from_table: nil) -> ::Google::Protobuf::Emptydrop_row_range via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The unique name of the table on which to drop a range of rows.
Values are of the form
projects/{project}/instances/{instance}/tables/{table}. - row_key_prefix (::String) — Delete all rows that start with this row key prefix. Prefix cannot be zero length.
- delete_all_data_from_table (::Boolean) — Delete all rows in the table. Setting this to false is a no-op.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::DropRowRangeRequest.new # Call the drop_row_range method. result = client.drop_row_range request # The returned object is of type Google::Protobuf::Empty. p result
#generate_consistency_token
def generate_consistency_token(request, options = nil) -> ::Google::Cloud::Bigtable::Admin::V2::GenerateConsistencyTokenResponse
def generate_consistency_token(name: nil) -> ::Google::Cloud::Bigtable::Admin::V2::GenerateConsistencyTokenResponseGenerates 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.
def generate_consistency_token(request, options = nil) -> ::Google::Cloud::Bigtable::Admin::V2::GenerateConsistencyTokenResponsegenerate_consistency_token via a request object, either of type
GenerateConsistencyTokenRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::GenerateConsistencyTokenRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def generate_consistency_token(name: nil) -> ::Google::Cloud::Bigtable::Admin::V2::GenerateConsistencyTokenResponsegenerate_consistency_token via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — 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}.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Bigtable::Admin::V2::GenerateConsistencyTokenResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::GenerateConsistencyTokenRequest.new # Call the generate_consistency_token method. result = client.generate_consistency_token request # The returned object is of type Google::Cloud::Bigtable::Admin::V2::GenerateConsistencyTokenResponse. p result
#get_backup
def get_backup(request, options = nil) -> ::Google::Cloud::Bigtable::Admin::V2::Backup
def get_backup(name: nil) -> ::Google::Cloud::Bigtable::Admin::V2::BackupGets metadata on a pending or completed Cloud Bigtable Backup.
def get_backup(request, options = nil) -> ::Google::Cloud::Bigtable::Admin::V2::Backupget_backup via a request object, either of type
GetBackupRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::GetBackupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_backup(name: nil) -> ::Google::Cloud::Bigtable::Admin::V2::Backupget_backup via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Name of the backup.
Values are of the form
projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Bigtable::Admin::V2::Backup)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::GetBackupRequest.new # Call the get_backup method. result = client.get_backup request # The returned object is of type Google::Cloud::Bigtable::Admin::V2::Backup. p result
#get_iam_policy
def get_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy
def get_iam_policy(resource: nil, options: nil) -> ::Google::Iam::V1::PolicyGets the access control policy for a Table or Backup resource. Returns an empty policy if the resource exists but does not have a policy set.
def get_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policyget_iam_policy via a request object, either of type
Iam::V1::GetIamPolicyRequest or an equivalent Hash.
- request (::Google::Iam::V1::GetIamPolicyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_iam_policy(resource: nil, options: nil) -> ::Google::Iam::V1::Policyget_iam_policy via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- resource (::String) — REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
-
options (::Google::Iam::V1::GetPolicyOptions, ::Hash) — OPTIONAL: A
GetPolicyOptionsobject for specifying options toGetIamPolicy.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Iam::V1::Policy)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Iam::V1::GetIamPolicyRequest.new # Call the get_iam_policy method. result = client.get_iam_policy request # The returned object is of type Google::Iam::V1::Policy. p result
#get_snapshot
def get_snapshot(request, options = nil) -> ::Google::Cloud::Bigtable::Admin::V2::Snapshot
def get_snapshot(name: nil) -> ::Google::Cloud::Bigtable::Admin::V2::SnapshotGets 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.
def get_snapshot(request, options = nil) -> ::Google::Cloud::Bigtable::Admin::V2::Snapshotget_snapshot via a request object, either of type
GetSnapshotRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::GetSnapshotRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_snapshot(name: nil) -> ::Google::Cloud::Bigtable::Admin::V2::Snapshotget_snapshot via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The unique name of the requested snapshot.
Values are of the form
projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Bigtable::Admin::V2::Snapshot)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::GetSnapshotRequest.new # Call the get_snapshot method. result = client.get_snapshot request # The returned object is of type Google::Cloud::Bigtable::Admin::V2::Snapshot. p result
#get_table
def get_table(request, options = nil) -> ::Google::Cloud::Bigtable::Admin::V2::Table
def get_table(name: nil, view: nil) -> ::Google::Cloud::Bigtable::Admin::V2::TableGets metadata information about the specified table.
def get_table(request, options = nil) -> ::Google::Cloud::Bigtable::Admin::V2::Tableget_table via a request object, either of type
GetTableRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::GetTableRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_table(name: nil, view: nil) -> ::Google::Cloud::Bigtable::Admin::V2::Tableget_table via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The unique name of the requested table.
Values are of the form
projects/{project}/instances/{instance}/tables/{table}. -
view (::Google::Cloud::Bigtable::Admin::V2::Table::View) — The view to be applied to the returned table's fields.
Defaults to
SCHEMA_VIEWif unspecified.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Bigtable::Admin::V2::Table)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::GetTableRequest.new # Call the get_table method. result = client.get_table request # The returned object is of type Google::Cloud::Bigtable::Admin::V2::Table. p result
#initialize
def initialize() { |config| ... } -> ClientCreate a new BigtableTableAdmin client object.
- (config) — Configure the BigtableTableAdmin client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new do |config| config.timeout = 10.0 end
#list_backups
def list_backups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Backup>
def list_backups(parent: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Backup>Lists Cloud Bigtable backups. Returns both completed and pending backups.
def list_backups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Backup>list_backups via a request object, either of type
ListBackupsRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::ListBackupsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_backups(parent: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Backup>list_backups via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — 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/-. -
filter (::String) —
A filter expression that filters backups listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is roughly synonymous with equality. Filter rules are case insensitive.
The fields eligible for filtering are:
namesource_tablestatestart_time(and values are of the format YYYY-MM-DDTHH:MM:SSZ)end_time(and values are of the format YYYY-MM-DDTHH:MM:SSZ)expire_time(and values are of the format YYYY-MM-DDTHH:MM:SSZ)size_bytes
To filter on multiple expressions, provide each separate expression within parentheses. By default, each expression is an AND expression. However, you can include AND, OR, and NOT expressions explicitly.
Some examples of using filters are:
name:"exact"--> The backup's name is the string "exact".name:howl--> The backup's name contains the string "howl".source_table:prod--> The source_table's name contains the string "prod".state:CREATING--> The backup is pending creation.state:READY--> The backup is fully created and ready for use.(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")--> The backup name contains the string "howl" and start_time of the backup is before 2018-03-28T14:50:00Z.size_bytes > 10000000000--> The backup's size is greater than 10GB
-
order_by (::String) — An expression for specifying the sort order of the results of the request.
The string value should specify one or more fields in Backup. The full
syntax is described at https://aip.dev/132#ordering.
Fields supported are:
- name
- source_table
- expire_time
- start_time
- end_time
- size_bytes
- state
For example, "start_time". The default sorting order is ascending. To specify descending order for the field, a suffix " desc" should be appended to the field name. For example, "start_time desc". Redundant space characters in the syntax are insigificant.
If order_by is empty, results will be sorted by
start_timein descending order starting from the most recently created backup. - page_size (::Integer) — Number of backups to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.
-
page_token (::String) — If non-empty,
page_tokenshould contain a next_page_token from a previous ListBackupsResponse to the sameparentand with the samefilter.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Backup>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Backup>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::ListBackupsRequest.new # Call the list_backups method. result = client.list_backups request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::Bigtable::Admin::V2::Backup. p response end
#list_snapshots
def list_snapshots(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Snapshot>
def list_snapshots(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Snapshot>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.
def list_snapshots(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Snapshot>list_snapshots via a request object, either of type
ListSnapshotsRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::ListSnapshotsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_snapshots(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Snapshot>list_snapshots via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — 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/-. - page_size (::Integer) — The maximum number of snapshots to return per page. CURRENTLY UNIMPLEMENTED AND IGNORED.
-
page_token (::String) — The value of
next_page_tokenreturned by a previous call.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Snapshot>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Snapshot>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::ListSnapshotsRequest.new # Call the list_snapshots method. result = client.list_snapshots request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::Bigtable::Admin::V2::Snapshot. p response end
#list_tables
def list_tables(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Table>
def list_tables(parent: nil, view: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Table>Lists all tables served from a specified instance.
def list_tables(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Table>list_tables via a request object, either of type
ListTablesRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::ListTablesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_tables(parent: nil, view: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Table>list_tables via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The unique name of the instance for which tables should be listed.
Values are of the form
projects/{project}/instances/{instance}. - view (::Google::Cloud::Bigtable::Admin::V2::Table::View) — The view to be applied to the returned tables' fields. Only NAME_ONLY view (default) and REPLICATION_VIEW are supported.
-
page_size (::Integer) — Maximum number of results per page.
A page_size of zero lets the server choose the number of items to return. A page_size which is strictly positive will return at most that many items. A negative page_size will cause an error.
Following the first request, subsequent paginated calls are not required to pass a page_size. If a page_size is set in subsequent calls, it must match the page_size given in the first request.
-
page_token (::String) — The value of
next_page_tokenreturned by a previous call.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Table>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Table>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::ListTablesRequest.new # Call the list_tables method. result = client.list_tables request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::Bigtable::Admin::V2::Table. p response end
#modify_column_families
def modify_column_families(request, options = nil) -> ::Google::Cloud::Bigtable::Admin::V2::Table
def modify_column_families(name: nil, modifications: nil) -> ::Google::Cloud::Bigtable::Admin::V2::TablePerforms 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.
def modify_column_families(request, options = nil) -> ::Google::Cloud::Bigtable::Admin::V2::Tablemodify_column_families via a request object, either of type
ModifyColumnFamiliesRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def modify_column_families(name: nil, modifications: nil) -> ::Google::Cloud::Bigtable::Admin::V2::Tablemodify_column_families via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The unique name of the table whose families should be modified.
Values are of the form
projects/{project}/instances/{instance}/tables/{table}. - modifications (::Array<::Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification, ::Hash>) — 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).
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Bigtable::Admin::V2::Table)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest.new # Call the modify_column_families method. result = client.modify_column_families request # The returned object is of type Google::Cloud::Bigtable::Admin::V2::Table. p result
#operations_client
def operations_client() -> ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::OperationsGet the associated client for long-running operations.
#restore_table
def restore_table(request, options = nil) -> ::Gapic::Operation
def restore_table(parent: nil, table_id: nil, backup: nil) -> ::Gapic::OperationCreate a new table by restoring from a completed backup. The new table must be in the same project as the instance containing the backup. The returned table long-running operation can be used to track the progress of the operation, and to cancel it. The metadata field type is [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The response type is Table, if successful.
def restore_table(request, options = nil) -> ::Gapic::Operationrestore_table via a request object, either of type
RestoreTableRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::RestoreTableRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def restore_table(parent: nil, table_id: nil, backup: nil) -> ::Gapic::Operationrestore_table via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The name of the instance in which to create the restored
table. This instance must be in the same project as the source backup.
Values are of the form
projects/<project>/instances/<instance>. -
table_id (::String) — Required. The id of the table to create and restore to. This
table must not already exist. The
table_idappended toparentforms the full table name of the formprojects/<project>/instances/<instance>/tables/<table_id>. -
backup (::String) — Name of the backup from which to restore. Values are of the form
projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::RestoreTableRequest.new # Call the restore_table method. result = client.restore_table request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#set_iam_policy
def set_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy
def set_iam_policy(resource: nil, policy: nil, update_mask: nil) -> ::Google::Iam::V1::PolicySets the access control policy on a Table or Backup resource. Replaces any existing policy.
def set_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policyset_iam_policy via a request object, either of type
Iam::V1::SetIamPolicyRequest or an equivalent Hash.
- request (::Google::Iam::V1::SetIamPolicyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def set_iam_policy(resource: nil, policy: nil, update_mask: nil) -> ::Google::Iam::V1::Policyset_iam_policy via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- resource (::String) — REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
-
policy (::Google::Iam::V1::Policy, ::Hash) — 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. -
update_mask (::Google::Protobuf::FieldMask, ::Hash) — OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
the fields in the mask will be modified. If no mask is provided, the
following default mask is used:
paths: "bindings, etag"
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Iam::V1::Policy)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Iam::V1::SetIamPolicyRequest.new # Call the set_iam_policy method. result = client.set_iam_policy request # The returned object is of type Google::Iam::V1::Policy. p result
#snapshot_table
def snapshot_table(request, options = nil) -> ::Gapic::Operation
def snapshot_table(name: nil, cluster: nil, snapshot_id: nil, ttl: nil, description: nil) -> ::Gapic::OperationCreates 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.
def snapshot_table(request, options = nil) -> ::Gapic::Operationsnapshot_table via a request object, either of type
SnapshotTableRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::SnapshotTableRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def snapshot_table(name: nil, cluster: nil, snapshot_id: nil, ttl: nil, description: nil) -> ::Gapic::Operationsnapshot_table via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The unique name of the table to have the snapshot taken.
Values are of the form
projects/{project}/instances/{instance}/tables/{table}. -
cluster (::String) — Required. The name of the cluster where the snapshot will be created in.
Values are of the form
projects/{project}/instances/{instance}/clusters/{cluster}. -
snapshot_id (::String) — Required. The ID by which the new snapshot should be referred to within the parent
cluster, e.g.,
mysnapshotof the form:[_a-zA-Z0-9][-_.a-zA-Z0-9]*rather thanprojects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot. - ttl (::Google::Protobuf::Duration, ::Hash) — The amount of time that the new snapshot can stay active after it is created. Once 'ttl' expires, the snapshot will get deleted. The maximum amount of time a snapshot can stay active is 7 days. If 'ttl' is not specified, the default value of 24 hours will be used.
- description (::String) — Description of the snapshot.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::SnapshotTableRequest.new # Call the snapshot_table method. result = client.snapshot_table request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#test_iam_permissions
def test_iam_permissions(request, options = nil) -> ::Google::Iam::V1::TestIamPermissionsResponse
def test_iam_permissions(resource: nil, permissions: nil) -> ::Google::Iam::V1::TestIamPermissionsResponseReturns permissions that the caller has on the specified Table or Backup resource.
def test_iam_permissions(request, options = nil) -> ::Google::Iam::V1::TestIamPermissionsResponsetest_iam_permissions via a request object, either of type
Iam::V1::TestIamPermissionsRequest or an equivalent Hash.
- request (::Google::Iam::V1::TestIamPermissionsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def test_iam_permissions(resource: nil, permissions: nil) -> ::Google::Iam::V1::TestIamPermissionsResponsetest_iam_permissions via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- resource (::String) — REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
-
permissions (::Array<::String>) — 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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Iam::V1::TestIamPermissionsResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Iam::V1::TestIamPermissionsRequest.new # Call the test_iam_permissions method. result = client.test_iam_permissions request # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. p result
#undelete_table
def undelete_table(request, options = nil) -> ::Gapic::Operation
def undelete_table(name: nil) -> ::Gapic::OperationRestores a specified table which was accidentally deleted.
def undelete_table(request, options = nil) -> ::Gapic::Operationundelete_table via a request object, either of type
UndeleteTableRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::UndeleteTableRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def undelete_table(name: nil) -> ::Gapic::Operationundelete_table via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The unique name of the table to be restored.
Values are of the form
projects/{project}/instances/{instance}/tables/{table}.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::UndeleteTableRequest.new # Call the undelete_table method. result = client.undelete_table request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#update_backup
def update_backup(request, options = nil) -> ::Google::Cloud::Bigtable::Admin::V2::Backup
def update_backup(backup: nil, update_mask: nil) -> ::Google::Cloud::Bigtable::Admin::V2::BackupUpdates a pending or completed Cloud Bigtable Backup.
def update_backup(request, options = nil) -> ::Google::Cloud::Bigtable::Admin::V2::Backupupdate_backup via a request object, either of type
UpdateBackupRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::UpdateBackupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_backup(backup: nil, update_mask: nil) -> ::Google::Cloud::Bigtable::Admin::V2::Backupupdate_backup via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
backup (::Google::Cloud::Bigtable::Admin::V2::Backup, ::Hash) —
Required. The backup to update.
backup.name, and the fields to be updated as specified byupdate_maskare required. Other fields are ignored. Update is only supported for the following fields:backup.expire_time.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — 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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Bigtable::Admin::V2::Backup)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::UpdateBackupRequest.new # Call the update_backup method. result = client.update_backup request # The returned object is of type Google::Cloud::Bigtable::Admin::V2::Backup. p result
#update_table
def update_table(request, options = nil) -> ::Gapic::Operation
def update_table(table: nil, update_mask: nil) -> ::Gapic::OperationUpdates a specified table.
def update_table(request, options = nil) -> ::Gapic::Operationupdate_table via a request object, either of type
UpdateTableRequest or an equivalent Hash.
- request (::Google::Cloud::Bigtable::Admin::V2::UpdateTableRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_table(table: nil, update_mask: nil) -> ::Gapic::Operationupdate_table via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
table (::Google::Cloud::Bigtable::Admin::V2::Table, ::Hash) — Required. The table to update.
The table's
namefield is used to identify the table to update. Format:projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]* -
update_mask (::Google::Protobuf::FieldMask, ::Hash) —
Required. The list of fields to update. A mask specifying which fields (e.g.
deletion_protection) in thetablefield should be updated. This mask is relative to thetablefield, not to the request message. The wildcard (*) path is currently not supported. Currently UpdateTable is only supported for the following field:deletion_protectionIfcolumn_familiesis set inupdate_mask, it will return an UNIMPLEMENTED error.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/bigtable/admin/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigtable::Admin::V2::UpdateTableRequest.new # Call the update_table method. result = client.update_table request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end