|
| InstanceAdmin (std::shared_ptr< bigtable_admin::BigtableInstanceAdminConnection > connection, std::string project) |
|
| InstanceAdmin (std::shared_ptr< InstanceAdminClient > client) |
|
template<typename... Policies> |
| InstanceAdmin (std::shared_ptr< InstanceAdminClient > client, Policies &&... policies) |
| Create a new InstanceAdmin using explicit policies to handle RPC errors. More...
|
|
std::string const & | project_name () const |
| The full name (projects/<project_id> ) of the project. More...
|
|
std::string const & | project_id () const |
| The project id, i.e., project_name() without the projects/ prefix. More...
|
|
InstanceAdmin | WithNewTarget (std::string project_id) const |
| Returns an InstanceAdmin that reuses the connection and configuration of this InstanceAdmin, but with a different resource name. More...
|
|
std::string | InstanceName (std::string const &instance_id) const |
| Return the fully qualified name of the given instance_id. More...
|
|
std::string | ClusterName (std::string const &instance_id, std::string const &cluster_id) const |
| Return the fully qualified name of the given cluster_id in give instance_id. More...
|
|
std::string | AppProfileName (std::string const &instance_id, std::string const &profile_id) const |
|
future< StatusOr< google::bigtable::admin::v2::Instance > > | CreateInstance (InstanceConfig instance_config) |
| Create a new instance of Cloud Bigtable. More...
|
|
future< StatusOr< google::bigtable::admin::v2::Cluster > > | CreateCluster (ClusterConfig cluster_config, std::string const &instance_id, std::string const &cluster_id) |
| Create a new Cluster of Cloud Bigtable. More...
|
|
future< StatusOr< google::bigtable::admin::v2::Instance > > | UpdateInstance (InstanceUpdateConfig instance_update_config) |
| Update an existing instance of Cloud Bigtable. More...
|
|
StatusOr< InstanceList > | ListInstances () |
| Obtain the list of instances in the project. More...
|
|
StatusOr< google::bigtable::admin::v2::Instance > | GetInstance (std::string const &instance_id) |
| Return the details of instance_id . More...
|
|
Status | DeleteInstance (std::string const &instance_id) |
| Deletes the instances in the project. More...
|
|
StatusOr< ClusterList > | ListClusters () |
| Obtain the list of clusters in an instance. More...
|
|
StatusOr< ClusterList > | ListClusters (std::string const &instance_id) |
| Obtain the list of clusters in an instance. More...
|
|
future< StatusOr< google::bigtable::admin::v2::Cluster > > | UpdateCluster (ClusterConfig cluster_config) |
| Update an existing cluster of Cloud Bigtable. More...
|
|
Status | DeleteCluster (std::string const &instance_id, std::string const &cluster_id) |
| Deletes the specified cluster of an instance in the project. More...
|
|
StatusOr< google::bigtable::admin::v2::Cluster > | GetCluster (std::string const &instance_id, std::string const &cluster_id) |
| Gets the specified cluster of an instance in the project. More...
|
|
StatusOr< google::bigtable::admin::v2::AppProfile > | CreateAppProfile (std::string const &instance_id, AppProfileConfig config) |
| Create a new application profile. More...
|
|
StatusOr< google::bigtable::admin::v2::AppProfile > | GetAppProfile (std::string const &instance_id, std::string const &profile_id) |
| Fetch the detailed information about an existing application profile. More...
|
|
future< StatusOr< google::bigtable::admin::v2::AppProfile > > | UpdateAppProfile (std::string const &instance_id, std::string const &profile_id, AppProfileUpdateConfig config) |
| Updates an existing application profile. More...
|
|
StatusOr< std::vector< google::bigtable::admin::v2::AppProfile > > | ListAppProfiles (std::string const &instance_id) |
| List the application profiles in an instance. More...
|
|
Status | DeleteAppProfile (std::string const &instance_id, std::string const &profile_id, bool ignore_warnings=true) |
| Delete an existing application profile. More...
|
|
StatusOr< google::iam::v1::Policy > | GetNativeIamPolicy (std::string const &instance_id) |
| Gets the native policy for instance_id . More...
|
|
StatusOr< google::iam::v1::Policy > | SetIamPolicy (std::string const &instance_id, google::iam::v1::Policy const &iam_policy) |
| Sets the IAM policy for an instance. More...
|
|
StatusOr< std::vector< std::string > > | TestIamPermissions (std::string const &instance_id, std::vector< std::string > const &permissions) |
| Returns a permission set that the caller has on the specified instance. More...
|
|
Implements the APIs to administer Cloud Bigtable instances.
- Thread-safety
- Instances of this class created via copy-construction or copy-assignment share the underlying pool of connections. Access to these copies via multiple threads is guaranteed to work. Two threads operating concurrently on the same instance of this class is not guaranteed to work.
- Cost
- Creating a new object of type
InstanceAdmin
is comparable to creating a few objects of type std::string
or a few objects of type std::shared_ptr<int>
. The class represents a shallow handle to a remote object.
- Error Handling
- This class uses
StatusOr<T>
to report errors. When an operation fails to perform its work the returned StatusOr<T>
contains the error details. If the ok()
member function in the StatusOr<T>
returns true
then it contains the expected result. Operations that do not return a value simply return a google::cloud::Status
indicating success or the details of the error Please consult the `StatusOr<T>` documentation for more details.
namespace btadmin = google::bigtable::admin::v2;
cbt::InstanceAdmin admin = ...;
if (!instance) {
std::cerr << "Error fetching instance\n";
return;
}
std::cout << "The full instance name is " << instance->name() << "\n";
Contains all the Cloud Bigtable C++ client APIs.
Definition: admin_client.h:28
In addition, the main page contains examples using StatusOr<T>
to handle errors.
- Retry, Backoff, and Idempotency Policies
- The library automatically retries requests that fail with transient errors, and uses truncated exponential backoff to backoff between retries. The default policies are to continue retrying for up to 10 minutes. On each transient failure the backoff period is doubled, starting with an initial backoff of 100 milliseconds. The backoff period growth is truncated at 60 seconds. The default idempotency policy is to only retry idempotent operations. Note that most operations that change state are not idempotent.
The application can override these policies when constructing objects of this class. The documentation for the constructors show examples of this in action.
- See also
- https://cloud.google.com/bigtable/ for an overview of Cloud Bigtable.
-
https://cloud.google.com/bigtable/docs/overview for an overview of the Cloud Bigtable data model.
-
https://cloud.google.com/bigtable/docs/instances-clusters-nodes for an introduction of the main APIs into Cloud Bigtable.
-
https://cloud.google.com/bigtable/docs/reference/service-apis-overview for an overview of the underlying Cloud Bigtable API.
-
google::cloud::StatusOr for a description of the error reporting class used by this library.
-
LimitedTimeRetryPolicy
and LimitedErrorCountRetryPolicy
for alternative retry policies.
-
ExponentialBackoffPolicy
to configure different parameters for the exponential backoff policy.
-
SafeIdempotentMutationPolicy
and AlwaysRetryMutationPolicy
for alternative idempotency policies.