Namespace google::cloud::bigtable (2.31.0)

Contains all the Cloud Bigtable C++ client APIs.

Classes

AdminClient

Creates a bigtable_admin::BigtableTableAdminConnection and a CompletionQueue for bigtable::TableAdmin to use.

AlwaysRetryMutationPolicy

Implements a policy that retries all mutations.

AppProfileConfig

Specify the initial configuration for an application profile.

AppProfileUpdateConfig

Build a proto to update an Application Profile configuration.

AsyncRowReader<Unused1, Unused2>

BulkMutation

Represent a set of mutations across multiple rows.

Cell

The in-memory representation of a Bigtable cell.

ClientOptions

Configuration options for the Bigtable Client.

ClusterConfig

Specify the initial configuration for a new cluster.

ColumnFamilyModification

Define the interfaces to create column family modifications.

DataClient

Connects to Cloud Bigtable's data manipulation APIs.

DataConnection

A connection to the Cloud Bigtable Data API.

DataLimitedErrorCountRetryPolicy

A retry policy for bigtable::DataConnection based on counting errors.

DataLimitedTimeRetryPolicy

A retry policy for bigtable::DataConnection based on elapsed time.

DataRetryPolicy

The retry policy for bigtable::DataConnection.

ExponentialBackoffPolicy

Implement a simple exponential backoff policy.

FailedMutation

A SingleRowMutation that failed.

Filter

Define the interfaces to create filter expressions.

GcRule

Implement a thin wrapper around google::bigtable::admin::v2::GcRule.

GenericPollingPolicy<Retry, Backoff>

Construct a polling policy from existing Retry and Backoff policies.

IdempotentMutationPolicy

Defines the interface to control which mutations are idempotent and therefore can be re-tried.

InstanceAdmin

Implements the APIs to administer Cloud Bigtable instances.

InstanceAdminClient

Creates a bigtable_admin::BigtableInstanceAdminConnection for bigtable::InstanceAdmin to use.

InstanceConfig

Specify the initial configuration for a new instance.

InstanceResource

This class identifies a Cloud Bigtable Instance.

InstanceUpdateConfig

Specify the initial configuration for updating an instance.

LimitedErrorCountRetryPolicy

Implement a simple "count errors and then stop" retry policy.

LimitedTimeRetryPolicy

Implement a simple "keep trying for this time" retry policy.

MetadataParamTypes

Define the class for governing x-goog-request-params metadata value.

MetadataUpdatePolicy

MetadataUpdatePolicy holds supported metadata and setup ClientContext.

MutationBatcher

Objects of this class pack single row mutations into bulk mutations.

PermanentMutationFailure

Report unrecoverable errors in a partially completed mutation.

PollingPolicy

Define the interface for providing asynchronous repetitive call rules.

ReadModifyWriteRule

Define the interfaces to create ReadWriteModifyRule operations.

Row

The in-memory representation of a Bigtable row.

RowRange

Define the interfaces to create row key ranges.

RowReader

Object returned by Table::ReadRows(), enumerates rows in the response.

RowSet

Represent a (possibly non-continuous) set of row keys.

RPCBackoffPolicy

Define the interface for controlling how the Bigtable client backsoff from failed RPC operations.

RPCRetryPolicy

Define the interface for controlling how the Bigtable client retries RPC operations.

SafeIdempotentMutationPolicy

Implements a policy that only accepts truly idempotent mutations.

SingleRowMutation

Represent a single row mutation.

Table

The main interface to interact with data in a Cloud Bigtable table.

TableAdmin

Implements the API to administer tables in a Cloud Bigtable instance.

TableConfig

Specify the initial schema for a new table.

TableResource

This class identifies a Cloud Bigtable Table.

Structs

AdminEndpointOption

The endpoint for table admin operations.

AppProfileIdOption

The application profile id.

ClusterList

The response for an asynchronous request listing all the clusters.

DataBackoffPolicyOption

Option to configure the backoff policy used by Table.

DataEndpointOption

The endpoint for data operations.

DataRetryPolicyOption

Option to configure the retry policy used by Table.

IdempotentMutationPolicyOption

Option to configure the idempotency policy used by Table.

InstanceAdminEndpointOption

The endpoint for instance admin operations.

InstanceList

The response for an asynchronous request listing all the instances.

MaxConnectionRefreshOption

Maximum time in ms to refresh connections.

MinConnectionRefreshOption

Minimum time in ms to refresh connections.

Mutation

Represent a single change to a specific row in a Table.

ReadRowsParams

Wrap the arguments to ReadRows().

ReverseScanOption

Read rows in reverse order.

RowKeySample

A simple wrapper to represent the response from Table::SampleRowKeys().

Enums

MutationBranch

The branch taken by a Table::CheckAndMutateRow operation.

Consistency

The result of checking replication against a given token.

Functions

DeleteFromColumn(std::string, ColumnType &&, std::chrono::duration< Rep1, Period1 >, std::chrono::duration< Rep2, Period2 >)

Create mutations to delete a range of cells from a column.

The following functions create a mutation that deletes all the cells in the given column family and, column within the given timestamp in the range.

The function accepts any instantiation of std::chrono::duration<> for the timestamp_begin and timestamp_end parameters. For example:

using namespace std::chrono_literals; // C++14
bigtable::DeleteFromColumn("fam", "col", 0us, 10us)

The ending timestamp is exclusive, while the beginning timestamp is inclusive. That is, the interval is [timestamp_begin, timestamp_end). The value 0 is special and treated as "unbounded" for both the begin and end endpoints of the time range. The Cloud Bigtable server rejects invalid and empty ranges, i.e., any range where the endpoint is smaller or equal than to the initial endpoint unless either endpoint is 0.

Parameters
Name Description
family
column
timestamp_begin
timestamp_end
typename Rep1
typename Period1
typename Rep2
typename Period2
typename ColumnType
Returns
Type Description
Mutation

DeleteFromColumnStartingFrom(std::string, ColumnType &&, std::chrono::duration< Rep1, Period1 >)

Delete all the values for the column.

cells in the given column family and column, Delete up to timestamp_end, but excluding, timestamp_end.

The function accepts any instantiation of std::chrono::duration<> for the timestamp_end For example:

using namespace std::chrono_literals; // C++14
bigtable::DeleteFromColumn("fam", "col", 10us)
Parameters
Name Description
family
column
timestamp_begin
typename Rep1
typename Period1
typename ColumnType
Returns
Type Description
Mutation

DeleteFromColumnEndingAt(std::string, ColumnType &&, std::chrono::duration< Rep2, Period2 >)

Delete all the values for the column.

cells in the given column family and column, Delete up to timestamp_end, but excluding, timestamp_end.

The function accepts any instantiation of std::chrono::duration<> for the timestamp_end For example:

using namespace std::chrono_literals; // C++14
bigtable::DeleteFromColumn("fam", "col", 10us)
Parameters
Name Description
family
column
timestamp_end
typename Rep2
typename Period2
typename ColumnType
Returns
Type Description
Mutation

DeleteFromColumn(std::string, ColumnType &&)

Delete all the values for the column.

cells in the given column family and column, Delete up to timestamp_end, but excluding, timestamp_end.

The function accepts any instantiation of std::chrono::duration<> for the timestamp_end For example:

using namespace std::chrono_literals; // C++14
bigtable::DeleteFromColumn("fam", "col", 10us)
Parameters
Name Description
family
column
typename ColumnType
Returns
Type Description
Mutation

MakeAdminClient(std::string, Options)

Create a new table admin client configured via options.

Parameters
Name Description
project
options
Returns
Type Description
std::shared_ptr< AdminClient >

CreateDefaultAdminClient(std::string, ClientOptions)

Create a new table admin client configured via options.

Parameters
Name Description
project
options
Returns
Type Description
std::shared_ptr< AdminClient >

SetCell(Cell)

Create a mutation to set a cell value based on a bigtable::Cell.

These mutations are not idempotent and not retried by default.

Parameter
Name Description
cell
Returns
Type Description
Mutation

MakeDataClient(std::string, std::string, Options)

Create a new data client configured via options.

Parameters
Name Description
project_id
instance_id
options
Returns
Type Description
std::shared_ptr< DataClient >

CreateDefaultDataClient(std::string, std::string, ClientOptions)

Create a new data client configured via options.

Parameters
Name Description
project_id
instance_id
options
Returns
Type Description
std::shared_ptr< DataClient >

InstanceName(std::shared_ptr< DataClient > const &)

Return the fully qualified instance name for the client.

Compute the full path of the instance associated with the client, i.e., projects/instances/<client->project_id()>/instances/<client->instance_id()>

Parameter
Name Description
client
Returns
Type Description
std::string

MakeDataConnection(Options)

Returns a DataConnection object that can be used for interacting with the Cloud Bigtable Data API.

The returned connection object should not be used directly; instead it should be given to a Table instance, and methods should be invoked on Table.

The optional opts argument may be used to configure aspects of the returned DataConnection. Expected options are any of the following options or types in the option lists.

Parameter
Name Description
options

(optional) Configure the DataConnection created by this function.

Returns
Type Description
std::shared_ptr< DataConnection >

Expression(std::string, std::string, std::string, std::string)

Create a google::type::Expr.

This is a textual representation of an expression in Common Expression Language (CEL) syntax.

Parameters
Name Description
expression

the expression in Common Expression Language.

title

an optional title for the expression, i.e. a short string describing its purpose.

description

an optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.

location

an optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.

Returns
Type Description
google::type::Expr

IamBinding(std::string, InputIt, InputIt)

Create a google::iam::v1::Binding.

See Also

https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.

Parameters
Name Description
role

the role which is assigned to members

begin

iterator pointing to the first member

end

iterator pointing to past last member

class InputIt
Returns
Type Description
google::iam::v1::Binding

The binding

IamBinding(std::string, InputIt, InputIt, google::type::Expr)

Create a google::iam::v1::Binding.

See Also

https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.

Parameters
Name Description
role

the role which is assigned to members

begin

iterator pointing to the first member

end

iterator pointing to past last member

condition

expression indicating when the binding is effective

class InputIt
Returns
Type Description
google::iam::v1::Binding

The binding

IamBinding(std::string, std::initializer_list< std::string >)

Create a google::iam::v1::Binding.

See Also

https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.

Parameters
Name Description
role

the role which is assigned to members

members

initializer_list of members

Returns
Type Description
google::iam::v1::Binding

The binding

IamBinding(std::string, std::initializer_list< std::string >, google::type::Expr)

Create a google::iam::v1::Binding.

See Also

https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.

Parameters
Name Description
role

the role which is assigned to members

members

initializer_list of members

condition

expression indicating when the binding is effective

Returns
Type Description
google::iam::v1::Binding

The binding

IamBinding(std::string, std::vector< std::string >)

Create a google::iam::v1::Binding.

See Also

https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.

Parameters
Name Description
role

the role which is assigned to members

members

vector of members

Returns
Type Description
google::iam::v1::Binding

The binding

IamBinding(std::string, std::vector< std::string >, google::type::Expr)

Create a google::iam::v1::Binding.

See Also

https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.

Parameters
Name Description
role

the role which is assigned to members

members

vector of members

condition

expression indicating when the binding is effective

Returns
Type Description
google::iam::v1::Binding

The binding

IamBindingAppendMembers(google::iam::v1::Binding, InputIt, InputIt)

Append members to a google::iam::v1::Binding.

Parameters
Name Description
binding

the role which is assigned to members

begin

iterator pointing to the first member

end

iterator pointing to past last member

class InputIt
Returns
Type Description
google::iam::v1::Binding

The binding with appended members

IamBindingSetCondition(google::iam::v1::Binding, google::type::Expr)

Set a condition to an google::iam::v1::Binding.

Parameters
Name Description
binding

the binding to which the condition is added

condition

the added condition

Returns
Type Description
google::iam::v1::Binding

the binding with the condition set

IamPolicy(InputIt, InputIt, std::string, std::int32_t)

Create a google::iam::v1::Policy.

See Also

https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.

See Also

https://tools.ietf.org/html/rfc7232#section-2.3 for more information about ETags.

Parameters
Name Description
first_binding

iterator pointing to the first google::iam::v1::Binding

last_binding

iterator pointing to past last google::iam::v1::Binding

etag

used for optimistic concurrency control

version

currently unused

class InputIt
Returns
Type Description
google::iam::v1::Policy

The policy

IamPolicy(std::initializer_list< google::iam::v1::Binding >, std::string, std::int32_t)

Create a google::iam::v1::Policy.

See Also

https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.

See Also

https://tools.ietf.org/html/rfc7232#section-2.3 for more information about ETags.

Parameters
Name Description
bindings

initializer_list of google::iam::v1::Binding

etag

used for optimistic concurrency control

version

currently unused

Returns
Type Description
google::iam::v1::Policy

The policy

IamPolicy(std::vector< google::iam::v1::Binding >, std::string, std::int32_t)

Create a google::iam::v1::Policy.

See Also

https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about a IAM policies.

See Also

https://tools.ietf.org/html/rfc7232#section-2.3 for more information about ETags.

Parameters
Name Description
bindings

vector of google::iam::v1::Binding

etag

used for optimistic concurrency control

version

currently unused

Returns
Type Description
google::iam::v1::Policy

The policy

RemoveBindingsFromPolicyIf(google::iam::v1::Policy &, Functor)

Remove all bindings matching a predicate from a policy.

Parameters
Name Description
policy

the policy to remove from

pred

predicate indicating whether to remove a binding

typename Functor

the type of the predicate; it should be invocable with google::iam::v1::Binding const& and return a bool.

Returns
Type Description
size_t

number of bindings removed.

RemoveBindingFromPolicy(google::iam::v1::Policy &, google::protobuf::RepeatedPtrField< google::iam::v1::Binding >::iterator)

Remove a specific binding from a policy.

Parameters
Name Description
policy

the policy to remove from

to_remove

the iterator indicating the binding; it should be retrieved from the mutable_bindings() member

Returns
Type Description
void

DefaultIdempotentMutationPolicy()

Return an instance of the default IdempotentMutationPolicy.

Returns
Type Description
std::unique_ptr< IdempotentMutationPolicy >

MakeInstanceAdminClient(std::string, Options)

Create a new instance admin client configured via options.

Parameters
Name Description
project
options
Returns
Type Description
std::shared_ptr< InstanceAdminClient >

CreateDefaultInstanceAdminClient(std::string, ClientOptions)

Create a new instance admin client configured via options.

Parameters
Name Description
project
options
Returns
Type Description
std::shared_ptr< InstanceAdminClient >

MakeInstanceResource(std::string const &)

Constructs an InstanceResource from the given full_name.

Returns a non-OK Status if full_name is improperly formed.

Parameter
Name Description
full_name
Returns
Type Description
StatusOr< InstanceResource >

ServerSetTimestamp()

A magic value where the server sets the timestamp.

Notice that using this value in a SetCell() mutation makes it non-idempotent, and by default the client will not retry such mutations.

Returns
Type Description
std::int64_t

SetCell(std::string, ColumnType &&, std::chrono::milliseconds, ValueType &&)

Create a mutation to set a cell value.

Parameters
Name Description
family
column
timestamp
value
typename ColumnType
typename ValueType
Returns
Type Description
Mutation

SetCell(std::string, ColumnType &&, std::chrono::milliseconds, std::int64_t)

Create a mutation to store a 64-bit big endian integer value.

Parameters
Name Description
family
column
timestamp
value
typename ColumnType
Returns
Type Description
Mutation

SetCell(std::string, ColumnType &&, ValueType &&)

Create a mutation to set a cell value where the server sets the time.

These mutations are not idempotent and not retried by default.

Parameters
Name Description
family
column
value
typename ColumnType
typename ValueType
Returns
Type Description
Mutation

SetCell(std::string, ColumnType &&, std::int64_t)

Create a mutation to store a 64-bit big endian integer value.

Parameters
Name Description
family
column
value
typename ColumnType
Returns
Type Description
Mutation

DeleteFromFamily(std::string)

Create a mutation to delete all the cells in a column family.

Parameter
Name Description
family
Returns
Type Description
Mutation

DeleteFromRow()

Create a mutation to delete all the cells in a row.

Returns
Type Description
Mutation

DefaultPollingPolicy(internal::RPCPolicyParameters)

Parameter
Name Description
defaults
Returns
Type Description
std::unique_ptr< PollingPolicy >

InstanceName(std::string const &, std::string const &)

Parameters
Name Description
project_id
instance_id
Returns
Type Description
std::string

TableName(std::string const &, std::string const &, std::string const &)

Parameters
Name Description
project_id
instance_id
table_id
Returns
Type Description
std::string

ClusterName(std::string const &, std::string const &, std::string const &)

Parameters
Name Description
project_id
instance_id
cluster_id
Returns
Type Description
std::string

AppProfileName(std::string const &, std::string const &, std::string const &)

Parameters
Name Description
project_id
instance_id
app_profile_id
Returns
Type Description
std::string

BackupName(std::string const &, std::string const &, std::string const &, std::string const &)

Parameters
Name Description
project_id
instance_id
cluster_id
backup_id
Returns
Type Description
std::string

DefaultRPCBackoffPolicy(internal::RPCPolicyParameters)

Return an instance of the default RPCBackoffPolicy.

Parameter
Name Description
defaults
Returns
Type Description
std::unique_ptr< RPCBackoffPolicy >

DefaultRPCRetryPolicy(internal::RPCPolicyParameters)

Return an instance of the default RPCRetryPolicy.

Parameter
Name Description
defaults
Returns
Type Description
std::unique_ptr< RPCRetryPolicy >

TableName(std::shared_ptr< DataClient > const &, std::string const &)

Return the full table name.

The full table name is:

projects/<PROJECT_ID>/instances/<INSTANCE_ID>/tables/<table_id>

Where the project id and instance id come from the client parameter.

Parameters
Name Description
client
table_id
Returns
Type Description
std::string

MakeTableResource(std::string const &)

Constructs a TableResource from the given full_name.

Returns a non-OK Status if full_name is improperly formed.

Parameter
Name Description
full_name
Returns
Type Description
StatusOr< TableResource >

version_major()

The Cloud Bigtable C++ Client major version.

Returns
Type Description
int constexpr

version_minor()

The Cloud Bigtable C++ Client minor version.

Returns
Type Description
int constexpr

version_patch()

The Cloud Bigtable C++ Client patch version.

Returns
Type Description
int constexpr

version_pre_release()

The Cloud Bigtable C++ Client pre-release version.

Returns
Type Description
char const *

version()

A single integer representing the Major/Minor/Patch version.

Returns
Type Description
int constexpr

version_string()

The version as a string, in MAJOR.MINOR.PATCH[-PRE][+gitrev] format.

Returns
Type Description
std::string

Type Aliases

ColumnQualifierType

Alias Of: std::decay_t< decltype(std::declval< google::bigtable::v2::Column >().qualifier())>

Defines the type for column qualifiers.

Inside Google some protobuf fields of type bytes are mapped to a different type than std::string. This is the case for column qualifiers. We use this type to automatically detect what is the representation for this field and use the correct mapping.

External users of the Cloud Bigtable C++ client library should treat this as a complicated typedef for std::string. We have no plans to change the type in the external version of the C++ client library for the foreseeable future. In the eventuality that we do decide to change the type, this would be a reason update the library major version number, and we would give users time to migrate.

In other words, external users of the Cloud Bigtable C++ client should simply write std::string where this type appears. For Google projects that must compile both inside and outside Google, this alias may be convenient.

CellValueType

Alias Of: std::decay_t< decltype(std::declval< google::bigtable::v2::Cell >().value())>

Defines the type for cell values.

Inside Google some protobuf fields of type bytes are mapped to a different type than std::string. This is the case for column qualifiers. We use this type to automatically detect what is the representation for this field and use the correct mapping.

External users of the Cloud Bigtable C++ client library should treat this as a complicated typedef for std::string. We have no plans to change the type in the external version of the C++ client library for the foreseeable future. In the eventuality that we do decide to change the type, this would be a reason update the library major version number, and we would give users time to migrate.

In other words, external users of the Cloud Bigtable C++ client should simply write std::string where this type appears. For Google projects that must compile both inside and outside Google, this alias may be convenient.

Instance

Alias Of: ::google::bigtable::admin::v2::Instance

ClientOptionList

Alias Of: OptionList< DataEndpointOption, AdminEndpointOption, InstanceAdminEndpointOption, MinConnectionRefreshOption, MaxConnectionRefreshOption >

The complete list of options accepted by bigtable::*Client

DataPolicyOptionList

Alias Of: OptionList< DataRetryPolicyOption, DataBackoffPolicyOption, IdempotentMutationPolicyOption >

RowKeyType

Alias Of: std::decay_t< decltype(std::declval< google::bigtable::v2::Row >().key())>

Defines the type for row keys.

Inside Google some protobuf fields of type bytes are mapped to a different type than std::string. This is the case for row keys. We use this type to automatically detect what is the representation for this field and use the correct mapping.

External users of the Cloud Bigtable C++ client library should treat this as a complicated typedef for std::string. We have no plans to change the type in the external version of the C++ client library for the foreseeable future. In the eventuality that we do decide to change the type, this would be a reason update the library major version number, and we would give users time to migrate.

In other words, external users of the Cloud Bigtable C++ client should simply write std::string where this type appears. For Google projects that must compile both inside and outside Google, this alias may be convenient.