Google Cloud Bigtable C++ Client 2.13.0
A C++ Client Library for Google Cloud Bigtable
Loading...
Searching...
No Matches
bigtable_instance_admin_client.h
1// Copyright 2021 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Generated by the Codegen C++ plugin.
16// If you make any local changes, they will be lost.
17// source: google/bigtable/admin/v2/bigtable_instance_admin.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_BIGTABLE_INSTANCE_ADMIN_CLIENT_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_BIGTABLE_INSTANCE_ADMIN_CLIENT_H
21
22#include "google/cloud/bigtable/admin/bigtable_instance_admin_connection.h"
23#include "google/cloud/future.h"
24#include "google/cloud/iam_updater.h"
25#include "google/cloud/options.h"
26#include "google/cloud/polling_policy.h"
27#include "google/cloud/status_or.h"
28#include "google/cloud/version.h"
29#include <google/longrunning/operations.grpc.pb.h>
30#include <map>
31#include <memory>
32
33namespace google {
34namespace cloud {
35namespace bigtable_admin {
36GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
37
38///
39/// Service for creating, configuring, and deleting Cloud Bigtable Instances and
40/// Clusters. Provides access to the Instance and Cluster schemas only, not the
41/// tables' metadata or data stored in those tables.
42///
43/// @par Equality
44///
45/// Instances of this class created via copy-construction or copy-assignment
46/// always compare equal. Instances created with equal
47/// `std::shared_ptr<*Connection>` objects compare equal. Objects that compare
48/// equal share the same underlying resources.
49///
50/// @par Performance
51///
52/// Creating a new instance of this class is a relatively expensive operation,
53/// new objects establish new connections to the service. In contrast,
54/// copy-construction, move-construction, and the corresponding assignment
55/// operations are relatively efficient as the copies share all underlying
56/// resources.
57///
58/// @par Thread Safety
59///
60/// Concurrent access to different instances of this class, even if they compare
61/// equal, is guaranteed to work. Two or more threads operating on the same
62/// instance of this class is not guaranteed to work. Since copy-construction
63/// and move-construction is a relatively efficient operation, consider using
64/// such a copy when using this class from multiple threads.
65///
67 public:
69 std::shared_ptr<BigtableInstanceAdminConnection> connection,
70 Options opts = {});
72
73 ///@{
74 /// @name Copy and move support
77 default;
80 default;
81 ///@}
82
83 ///@{
84 /// @name Equality
85 friend bool operator==(BigtableInstanceAdminClient const& a,
87 return a.connection_ == b.connection_;
88 }
89 friend bool operator!=(BigtableInstanceAdminClient const& a,
91 return !(a == b);
92 }
93 ///@}
94
95 // clang-format off
96 ///
97 /// Create an instance within a project.
98 ///
99 /// Note that exactly one of Cluster.serve_nodes and
100 /// Cluster.cluster_config.cluster_autoscaling_config can be set. If
101 /// serve_nodes is set to non-zero, then the cluster is manually scaled. If
102 /// cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is
103 /// enabled.
104 ///
105 /// @param parent Required. The unique name of the project in which to create the new instance.
106 /// Values are of the form `projects/{project}`.
107 /// @param instance_id Required. The ID to be used when referring to the new instance within its project,
108 /// e.g., just `myinstance` rather than
109 /// `projects/myproject/instances/myinstance`.
110 /// @param instance Required. The instance to create.
111 /// Fields marked `OutputOnly` must be left blank.
112 /// @param clusters Required. The clusters to be created within the instance, mapped by desired
113 /// cluster ID, e.g., just `mycluster` rather than
114 /// `projects/myproject/instances/myinstance/clusters/mycluster`.
115 /// Fields marked `OutputOnly` must be left blank.
116 /// Currently, at most four clusters can be specified.
117 /// @param opts Optional. Override the class-level options, such as retry and
118 /// backoff policies.
119 /// @return A [`future`] that becomes satisfied when the LRO
120 /// ([Long Running Operation]) completes or the polling policy in effect
121 /// for this call is exhausted. The future is satisfied with an error if
122 /// the LRO completes with an error or the polling policy is exhausted.
123 /// In this case the [`StatusOr`] returned by the future contains the
124 /// error. If the LRO completes successfully the value of the future
125 /// contains the LRO's result. For this RPC the result is a
126 /// [google.bigtable.admin.v2.Instance] proto message.
127 /// The C++ class representing this message is created by Protobuf, using
128 /// the [Protobuf mapping rules].
129 ///
130 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
131 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
132 /// [Long Running Operation]: https://google.aip.dev/151
133 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
134 /// [`future`]: @ref google::cloud::future
135 /// [`StatusOr`]: @ref google::cloud::StatusOr
136 /// [`Status`]: @ref google::cloud::Status
137 /// [google.bigtable.admin.v2.CreateInstanceRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L289}
138 /// [google.bigtable.admin.v2.Instance]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L40}
139 ///
140 // clang-format on
141 future<StatusOr<google::bigtable::admin::v2::Instance>> CreateInstance(
142 std::string const& parent, std::string const& instance_id,
143 google::bigtable::admin::v2::Instance const& instance,
144 std::map<std::string, google::bigtable::admin::v2::Cluster> const&
145 clusters,
146 Options opts = {});
147
148 // clang-format off
149 ///
150 /// Create an instance within a project.
151 ///
152 /// Note that exactly one of Cluster.serve_nodes and
153 /// Cluster.cluster_config.cluster_autoscaling_config can be set. If
154 /// serve_nodes is set to non-zero, then the cluster is manually scaled. If
155 /// cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is
156 /// enabled.
157 ///
158 /// @param request Unary RPCs, such as the one wrapped by this
159 /// function, receive a single `request` proto message which includes all
160 /// the inputs for the RPC. In this case, the proto message is a
161 /// [google.bigtable.admin.v2.CreateInstanceRequest].
162 /// Proto messages are converted to C++ classes by Protobuf, using the
163 /// [Protobuf mapping rules].
164 /// @param opts Optional. Override the class-level options, such as retry and
165 /// backoff policies.
166 /// @return A [`future`] that becomes satisfied when the LRO
167 /// ([Long Running Operation]) completes or the polling policy in effect
168 /// for this call is exhausted. The future is satisfied with an error if
169 /// the LRO completes with an error or the polling policy is exhausted.
170 /// In this case the [`StatusOr`] returned by the future contains the
171 /// error. If the LRO completes successfully the value of the future
172 /// contains the LRO's result. For this RPC the result is a
173 /// [google.bigtable.admin.v2.Instance] proto message.
174 /// The C++ class representing this message is created by Protobuf, using
175 /// the [Protobuf mapping rules].
176 ///
177 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
178 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
179 /// [Long Running Operation]: https://google.aip.dev/151
180 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
181 /// [`future`]: @ref google::cloud::future
182 /// [`StatusOr`]: @ref google::cloud::StatusOr
183 /// [`Status`]: @ref google::cloud::Status
184 /// [google.bigtable.admin.v2.CreateInstanceRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L289}
185 /// [google.bigtable.admin.v2.Instance]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L40}
186 ///
187 // clang-format on
188 future<StatusOr<google::bigtable::admin::v2::Instance>> CreateInstance(
189 google::bigtable::admin::v2::CreateInstanceRequest const& request,
190 Options opts = {});
191
192 // clang-format off
193 ///
194 /// Gets information about an instance.
195 ///
196 /// @param name Required. The unique name of the requested instance. Values are of the form
197 /// `projects/{project}/instances/{instance}`.
198 /// @param opts Optional. Override the class-level options, such as retry and
199 /// backoff policies.
200 /// @return the result of the RPC. The response message type
201 /// ([google.bigtable.admin.v2.Instance])
202 /// is mapped to a C++ class using the [Protobuf mapping rules].
203 /// If the request fails, the [`StatusOr`] contains the error details.
204 ///
205 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
206 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
207 /// [Long Running Operation]: https://google.aip.dev/151
208 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
209 /// [`future`]: @ref google::cloud::future
210 /// [`StatusOr`]: @ref google::cloud::StatusOr
211 /// [`Status`]: @ref google::cloud::Status
212 /// [google.bigtable.admin.v2.GetInstanceRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L317}
213 /// [google.bigtable.admin.v2.Instance]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L40}
214 ///
215 // clang-format on
216 StatusOr<google::bigtable::admin::v2::Instance> GetInstance(
217 std::string const& name, Options opts = {});
218
219 // clang-format off
220 ///
221 /// Gets information about an instance.
222 ///
223 /// @param request Unary RPCs, such as the one wrapped by this
224 /// function, receive a single `request` proto message which includes all
225 /// the inputs for the RPC. In this case, the proto message is a
226 /// [google.bigtable.admin.v2.GetInstanceRequest].
227 /// Proto messages are converted to C++ classes by Protobuf, using the
228 /// [Protobuf mapping rules].
229 /// @param opts Optional. Override the class-level options, such as retry and
230 /// backoff policies.
231 /// @return the result of the RPC. The response message type
232 /// ([google.bigtable.admin.v2.Instance])
233 /// is mapped to a C++ class using the [Protobuf mapping rules].
234 /// If the request fails, the [`StatusOr`] contains the error details.
235 ///
236 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
237 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
238 /// [Long Running Operation]: https://google.aip.dev/151
239 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
240 /// [`future`]: @ref google::cloud::future
241 /// [`StatusOr`]: @ref google::cloud::StatusOr
242 /// [`Status`]: @ref google::cloud::Status
243 /// [google.bigtable.admin.v2.GetInstanceRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L317}
244 /// [google.bigtable.admin.v2.Instance]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L40}
245 ///
246 // clang-format on
247 StatusOr<google::bigtable::admin::v2::Instance> GetInstance(
248 google::bigtable::admin::v2::GetInstanceRequest const& request,
249 Options opts = {});
250
251 // clang-format off
252 ///
253 /// Lists information about instances in a project.
254 ///
255 /// @param parent Required. The unique name of the project for which a list of instances is requested.
256 /// Values are of the form `projects/{project}`.
257 /// @param opts Optional. Override the class-level options, such as retry and
258 /// backoff policies.
259 /// @return the result of the RPC. The response message type
260 /// ([google.bigtable.admin.v2.ListInstancesResponse])
261 /// is mapped to a C++ class using the [Protobuf mapping rules].
262 /// If the request fails, the [`StatusOr`] contains the error details.
263 ///
264 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
265 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
266 /// [Long Running Operation]: https://google.aip.dev/151
267 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
268 /// [`future`]: @ref google::cloud::future
269 /// [`StatusOr`]: @ref google::cloud::StatusOr
270 /// [`Status`]: @ref google::cloud::Status
271 /// [google.bigtable.admin.v2.ListInstancesRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L329}
272 /// [google.bigtable.admin.v2.ListInstancesResponse]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L344}
273 ///
274 // clang-format on
275 StatusOr<google::bigtable::admin::v2::ListInstancesResponse> ListInstances(
276 std::string const& parent, Options opts = {});
277
278 // clang-format off
279 ///
280 /// Lists information about instances in a project.
281 ///
282 /// @param request Unary RPCs, such as the one wrapped by this
283 /// function, receive a single `request` proto message which includes all
284 /// the inputs for the RPC. In this case, the proto message is a
285 /// [google.bigtable.admin.v2.ListInstancesRequest].
286 /// Proto messages are converted to C++ classes by Protobuf, using the
287 /// [Protobuf mapping rules].
288 /// @param opts Optional. Override the class-level options, such as retry and
289 /// backoff policies.
290 /// @return the result of the RPC. The response message type
291 /// ([google.bigtable.admin.v2.ListInstancesResponse])
292 /// is mapped to a C++ class using the [Protobuf mapping rules].
293 /// If the request fails, the [`StatusOr`] contains the error details.
294 ///
295 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
296 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
297 /// [Long Running Operation]: https://google.aip.dev/151
298 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
299 /// [`future`]: @ref google::cloud::future
300 /// [`StatusOr`]: @ref google::cloud::StatusOr
301 /// [`Status`]: @ref google::cloud::Status
302 /// [google.bigtable.admin.v2.ListInstancesRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L329}
303 /// [google.bigtable.admin.v2.ListInstancesResponse]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L344}
304 ///
305 // clang-format on
306 StatusOr<google::bigtable::admin::v2::ListInstancesResponse> ListInstances(
307 google::bigtable::admin::v2::ListInstancesRequest const& request,
308 Options opts = {});
309
310 // clang-format off
311 ///
312 /// Updates an instance within a project. This method updates only the display
313 /// name and type for an Instance. To update other Instance properties, such as
314 /// labels, use PartialUpdateInstance.
315 ///
316 /// @param request Unary RPCs, such as the one wrapped by this
317 /// function, receive a single `request` proto message which includes all
318 /// the inputs for the RPC. In this case, the proto message is a
319 /// [google.bigtable.admin.v2.Instance].
320 /// Proto messages are converted to C++ classes by Protobuf, using the
321 /// [Protobuf mapping rules].
322 /// @param opts Optional. Override the class-level options, such as retry and
323 /// backoff policies.
324 /// @return the result of the RPC. The response message type
325 /// ([google.bigtable.admin.v2.Instance])
326 /// is mapped to a C++ class using the [Protobuf mapping rules].
327 /// If the request fails, the [`StatusOr`] contains the error details.
328 ///
329 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
330 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
331 /// [Long Running Operation]: https://google.aip.dev/151
332 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
333 /// [`future`]: @ref google::cloud::future
334 /// [`StatusOr`]: @ref google::cloud::StatusOr
335 /// [`Status`]: @ref google::cloud::Status
336 /// [google.bigtable.admin.v2.Instance]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L40}
337 ///
338 // clang-format on
339 StatusOr<google::bigtable::admin::v2::Instance> UpdateInstance(
340 google::bigtable::admin::v2::Instance const& request, Options opts = {});
341
342 // clang-format off
343 ///
344 /// Partially updates an instance within a project. This method can modify all
345 /// fields of an Instance and is the preferred way to update an Instance.
346 ///
347 /// @param instance Required. The Instance which will (partially) replace the current value.
348 /// @param update_mask Required. The subset of Instance fields which should be replaced.
349 /// Must be explicitly set.
350 /// @param opts Optional. Override the class-level options, such as retry and
351 /// backoff policies.
352 /// @return A [`future`] that becomes satisfied when the LRO
353 /// ([Long Running Operation]) completes or the polling policy in effect
354 /// for this call is exhausted. The future is satisfied with an error if
355 /// the LRO completes with an error or the polling policy is exhausted.
356 /// In this case the [`StatusOr`] returned by the future contains the
357 /// error. If the LRO completes successfully the value of the future
358 /// contains the LRO's result. For this RPC the result is a
359 /// [google.bigtable.admin.v2.Instance] proto message.
360 /// The C++ class representing this message is created by Protobuf, using
361 /// the [Protobuf mapping rules].
362 ///
363 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
364 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
365 /// [Long Running Operation]: https://google.aip.dev/151
366 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
367 /// [`future`]: @ref google::cloud::future
368 /// [`StatusOr`]: @ref google::cloud::StatusOr
369 /// [`Status`]: @ref google::cloud::Status
370 /// [google.bigtable.admin.v2.Instance]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L40}
371 /// [google.bigtable.admin.v2.PartialUpdateInstanceRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L361}
372 ///
373 // clang-format on
374 future<StatusOr<google::bigtable::admin::v2::Instance>> PartialUpdateInstance(
375 google::bigtable::admin::v2::Instance const& instance,
376 google::protobuf::FieldMask const& update_mask, Options opts = {});
377
378 // clang-format off
379 ///
380 /// Partially updates an instance within a project. This method can modify all
381 /// fields of an Instance and is the preferred way to update an Instance.
382 ///
383 /// @param request Unary RPCs, such as the one wrapped by this
384 /// function, receive a single `request` proto message which includes all
385 /// the inputs for the RPC. In this case, the proto message is a
386 /// [google.bigtable.admin.v2.PartialUpdateInstanceRequest].
387 /// Proto messages are converted to C++ classes by Protobuf, using the
388 /// [Protobuf mapping rules].
389 /// @param opts Optional. Override the class-level options, such as retry and
390 /// backoff policies.
391 /// @return A [`future`] that becomes satisfied when the LRO
392 /// ([Long Running Operation]) completes or the polling policy in effect
393 /// for this call is exhausted. The future is satisfied with an error if
394 /// the LRO completes with an error or the polling policy is exhausted.
395 /// In this case the [`StatusOr`] returned by the future contains the
396 /// error. If the LRO completes successfully the value of the future
397 /// contains the LRO's result. For this RPC the result is a
398 /// [google.bigtable.admin.v2.Instance] proto message.
399 /// The C++ class representing this message is created by Protobuf, using
400 /// the [Protobuf mapping rules].
401 ///
402 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
403 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
404 /// [Long Running Operation]: https://google.aip.dev/151
405 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
406 /// [`future`]: @ref google::cloud::future
407 /// [`StatusOr`]: @ref google::cloud::StatusOr
408 /// [`Status`]: @ref google::cloud::Status
409 /// [google.bigtable.admin.v2.Instance]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L40}
410 /// [google.bigtable.admin.v2.PartialUpdateInstanceRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L361}
411 ///
412 // clang-format on
413 future<StatusOr<google::bigtable::admin::v2::Instance>> PartialUpdateInstance(
414 google::bigtable::admin::v2::PartialUpdateInstanceRequest const& request,
415 Options opts = {});
416
417 // clang-format off
418 ///
419 /// Delete an instance from a project.
420 ///
421 /// @param name Required. The unique name of the instance to be deleted.
422 /// Values are of the form `projects/{project}/instances/{instance}`.
423 /// @param opts Optional. Override the class-level options, such as retry and
424 /// backoff policies.
425 /// @return a [`Status`] object. If the request failed, the
426 /// status contains the details of the failure.
427 ///
428 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
429 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
430 /// [Long Running Operation]: https://google.aip.dev/151
431 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
432 /// [`future`]: @ref google::cloud::future
433 /// [`StatusOr`]: @ref google::cloud::StatusOr
434 /// [`Status`]: @ref google::cloud::Status
435 /// [google.bigtable.admin.v2.DeleteInstanceRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L371}
436 ///
437 // clang-format on
438 Status DeleteInstance(std::string const& name, Options opts = {});
439
440 // clang-format off
441 ///
442 /// Delete an instance from a project.
443 ///
444 /// @param request Unary RPCs, such as the one wrapped by this
445 /// function, receive a single `request` proto message which includes all
446 /// the inputs for the RPC. In this case, the proto message is a
447 /// [google.bigtable.admin.v2.DeleteInstanceRequest].
448 /// Proto messages are converted to C++ classes by Protobuf, using the
449 /// [Protobuf mapping rules].
450 /// @param opts Optional. Override the class-level options, such as retry and
451 /// backoff policies.
452 /// @return a [`Status`] object. If the request failed, the
453 /// status contains the details of the failure.
454 ///
455 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
456 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
457 /// [Long Running Operation]: https://google.aip.dev/151
458 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
459 /// [`future`]: @ref google::cloud::future
460 /// [`StatusOr`]: @ref google::cloud::StatusOr
461 /// [`Status`]: @ref google::cloud::Status
462 /// [google.bigtable.admin.v2.DeleteInstanceRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L371}
463 ///
464 // clang-format on
466 google::bigtable::admin::v2::DeleteInstanceRequest const& request,
467 Options opts = {});
468
469 // clang-format off
470 ///
471 /// Creates a cluster within an instance.
472 ///
473 /// Note that exactly one of Cluster.serve_nodes and
474 /// Cluster.cluster_config.cluster_autoscaling_config can be set. If
475 /// serve_nodes is set to non-zero, then the cluster is manually scaled. If
476 /// cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is
477 /// enabled.
478 ///
479 /// @param parent Required. The unique name of the instance in which to create the new cluster.
480 /// Values are of the form
481 /// `projects/{project}/instances/{instance}`.
482 /// @param cluster_id Required. The ID to be used when referring to the new cluster within its instance,
483 /// e.g., just `mycluster` rather than
484 /// `projects/myproject/instances/myinstance/clusters/mycluster`.
485 /// @param cluster Required. The cluster to be created.
486 /// Fields marked `OutputOnly` must be left blank.
487 /// @param opts Optional. Override the class-level options, such as retry and
488 /// backoff policies.
489 /// @return A [`future`] that becomes satisfied when the LRO
490 /// ([Long Running Operation]) completes or the polling policy in effect
491 /// for this call is exhausted. The future is satisfied with an error if
492 /// the LRO completes with an error or the polling policy is exhausted.
493 /// In this case the [`StatusOr`] returned by the future contains the
494 /// error. If the LRO completes successfully the value of the future
495 /// contains the LRO's result. For this RPC the result is a
496 /// [google.bigtable.admin.v2.Cluster] proto message.
497 /// The C++ class representing this message is created by Protobuf, using
498 /// the [Protobuf mapping rules].
499 ///
500 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
501 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
502 /// [Long Running Operation]: https://google.aip.dev/151
503 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
504 /// [`future`]: @ref google::cloud::future
505 /// [`StatusOr`]: @ref google::cloud::StatusOr
506 /// [`Status`]: @ref google::cloud::Status
507 /// [google.bigtable.admin.v2.Cluster]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L143}
508 /// [google.bigtable.admin.v2.CreateClusterRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L383}
509 ///
510 // clang-format on
511 future<StatusOr<google::bigtable::admin::v2::Cluster>> CreateCluster(
512 std::string const& parent, std::string const& cluster_id,
513 google::bigtable::admin::v2::Cluster const& cluster, Options opts = {});
514
515 // clang-format off
516 ///
517 /// Creates a cluster within an instance.
518 ///
519 /// Note that exactly one of Cluster.serve_nodes and
520 /// Cluster.cluster_config.cluster_autoscaling_config can be set. If
521 /// serve_nodes is set to non-zero, then the cluster is manually scaled. If
522 /// cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is
523 /// enabled.
524 ///
525 /// @param request Unary RPCs, such as the one wrapped by this
526 /// function, receive a single `request` proto message which includes all
527 /// the inputs for the RPC. In this case, the proto message is a
528 /// [google.bigtable.admin.v2.CreateClusterRequest].
529 /// Proto messages are converted to C++ classes by Protobuf, using the
530 /// [Protobuf mapping rules].
531 /// @param opts Optional. Override the class-level options, such as retry and
532 /// backoff policies.
533 /// @return A [`future`] that becomes satisfied when the LRO
534 /// ([Long Running Operation]) completes or the polling policy in effect
535 /// for this call is exhausted. The future is satisfied with an error if
536 /// the LRO completes with an error or the polling policy is exhausted.
537 /// In this case the [`StatusOr`] returned by the future contains the
538 /// error. If the LRO completes successfully the value of the future
539 /// contains the LRO's result. For this RPC the result is a
540 /// [google.bigtable.admin.v2.Cluster] proto message.
541 /// The C++ class representing this message is created by Protobuf, using
542 /// the [Protobuf mapping rules].
543 ///
544 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
545 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
546 /// [Long Running Operation]: https://google.aip.dev/151
547 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
548 /// [`future`]: @ref google::cloud::future
549 /// [`StatusOr`]: @ref google::cloud::StatusOr
550 /// [`Status`]: @ref google::cloud::Status
551 /// [google.bigtable.admin.v2.Cluster]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L143}
552 /// [google.bigtable.admin.v2.CreateClusterRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L383}
553 ///
554 // clang-format on
555 future<StatusOr<google::bigtable::admin::v2::Cluster>> CreateCluster(
556 google::bigtable::admin::v2::CreateClusterRequest const& request,
557 Options opts = {});
558
559 // clang-format off
560 ///
561 /// Gets information about a cluster.
562 ///
563 /// @param name Required. The unique name of the requested cluster. Values are of the form
564 /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
565 /// @param opts Optional. Override the class-level options, such as retry and
566 /// backoff policies.
567 /// @return the result of the RPC. The response message type
568 /// ([google.bigtable.admin.v2.Cluster])
569 /// is mapped to a C++ class using the [Protobuf mapping rules].
570 /// If the request fails, the [`StatusOr`] contains the error details.
571 ///
572 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
573 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
574 /// [Long Running Operation]: https://google.aip.dev/151
575 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
576 /// [`future`]: @ref google::cloud::future
577 /// [`StatusOr`]: @ref google::cloud::StatusOr
578 /// [`Status`]: @ref google::cloud::Status
579 /// [google.bigtable.admin.v2.Cluster]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L143}
580 /// [google.bigtable.admin.v2.GetClusterRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L405}
581 ///
582 // clang-format on
583 StatusOr<google::bigtable::admin::v2::Cluster> GetCluster(
584 std::string const& name, Options opts = {});
585
586 // clang-format off
587 ///
588 /// Gets information about a cluster.
589 ///
590 /// @param request Unary RPCs, such as the one wrapped by this
591 /// function, receive a single `request` proto message which includes all
592 /// the inputs for the RPC. In this case, the proto message is a
593 /// [google.bigtable.admin.v2.GetClusterRequest].
594 /// Proto messages are converted to C++ classes by Protobuf, using the
595 /// [Protobuf mapping rules].
596 /// @param opts Optional. Override the class-level options, such as retry and
597 /// backoff policies.
598 /// @return the result of the RPC. The response message type
599 /// ([google.bigtable.admin.v2.Cluster])
600 /// is mapped to a C++ class using the [Protobuf mapping rules].
601 /// If the request fails, the [`StatusOr`] contains the error details.
602 ///
603 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
604 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
605 /// [Long Running Operation]: https://google.aip.dev/151
606 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
607 /// [`future`]: @ref google::cloud::future
608 /// [`StatusOr`]: @ref google::cloud::StatusOr
609 /// [`Status`]: @ref google::cloud::Status
610 /// [google.bigtable.admin.v2.Cluster]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L143}
611 /// [google.bigtable.admin.v2.GetClusterRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L405}
612 ///
613 // clang-format on
614 StatusOr<google::bigtable::admin::v2::Cluster> GetCluster(
615 google::bigtable::admin::v2::GetClusterRequest const& request,
616 Options opts = {});
617
618 // clang-format off
619 ///
620 /// Lists information about clusters in an instance.
621 ///
622 /// @param parent Required. The unique name of the instance for which a list of clusters is requested.
623 /// Values are of the form `projects/{project}/instances/{instance}`.
624 /// Use ``{instance} = '-'`` to list Clusters for all Instances in a project,
625 /// e.g., `projects/myproject/instances/-`.
626 /// @param opts Optional. Override the class-level options, such as retry and
627 /// backoff policies.
628 /// @return the result of the RPC. The response message type
629 /// ([google.bigtable.admin.v2.ListClustersResponse])
630 /// is mapped to a C++ class using the [Protobuf mapping rules].
631 /// If the request fails, the [`StatusOr`] contains the error details.
632 ///
633 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
634 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
635 /// [Long Running Operation]: https://google.aip.dev/151
636 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
637 /// [`future`]: @ref google::cloud::future
638 /// [`StatusOr`]: @ref google::cloud::StatusOr
639 /// [`Status`]: @ref google::cloud::Status
640 /// [google.bigtable.admin.v2.ListClustersRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L417}
641 /// [google.bigtable.admin.v2.ListClustersResponse]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L434}
642 ///
643 // clang-format on
644 StatusOr<google::bigtable::admin::v2::ListClustersResponse> ListClusters(
645 std::string const& parent, Options opts = {});
646
647 // clang-format off
648 ///
649 /// Lists information about clusters in an instance.
650 ///
651 /// @param request Unary RPCs, such as the one wrapped by this
652 /// function, receive a single `request` proto message which includes all
653 /// the inputs for the RPC. In this case, the proto message is a
654 /// [google.bigtable.admin.v2.ListClustersRequest].
655 /// Proto messages are converted to C++ classes by Protobuf, using the
656 /// [Protobuf mapping rules].
657 /// @param opts Optional. Override the class-level options, such as retry and
658 /// backoff policies.
659 /// @return the result of the RPC. The response message type
660 /// ([google.bigtable.admin.v2.ListClustersResponse])
661 /// is mapped to a C++ class using the [Protobuf mapping rules].
662 /// If the request fails, the [`StatusOr`] contains the error details.
663 ///
664 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
665 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
666 /// [Long Running Operation]: https://google.aip.dev/151
667 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
668 /// [`future`]: @ref google::cloud::future
669 /// [`StatusOr`]: @ref google::cloud::StatusOr
670 /// [`Status`]: @ref google::cloud::Status
671 /// [google.bigtable.admin.v2.ListClustersRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L417}
672 /// [google.bigtable.admin.v2.ListClustersResponse]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L434}
673 ///
674 // clang-format on
675 StatusOr<google::bigtable::admin::v2::ListClustersResponse> ListClusters(
676 google::bigtable::admin::v2::ListClustersRequest const& request,
677 Options opts = {});
678
679 // clang-format off
680 ///
681 /// Updates a cluster within an instance.
682 ///
683 /// Note that UpdateCluster does not support updating
684 /// cluster_config.cluster_autoscaling_config. In order to update it, you
685 /// must use PartialUpdateCluster.
686 ///
687 /// @param request Unary RPCs, such as the one wrapped by this
688 /// function, receive a single `request` proto message which includes all
689 /// the inputs for the RPC. In this case, the proto message is a
690 /// [google.bigtable.admin.v2.Cluster].
691 /// Proto messages are converted to C++ classes by Protobuf, using the
692 /// [Protobuf mapping rules].
693 /// @param opts Optional. Override the class-level options, such as retry and
694 /// backoff policies.
695 /// @return A [`future`] that becomes satisfied when the LRO
696 /// ([Long Running Operation]) completes or the polling policy in effect
697 /// for this call is exhausted. The future is satisfied with an error if
698 /// the LRO completes with an error or the polling policy is exhausted.
699 /// In this case the [`StatusOr`] returned by the future contains the
700 /// error. If the LRO completes successfully the value of the future
701 /// contains the LRO's result. For this RPC the result is a
702 /// [google.bigtable.admin.v2.Cluster] proto message.
703 /// The C++ class representing this message is created by Protobuf, using
704 /// the [Protobuf mapping rules].
705 ///
706 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
707 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
708 /// [Long Running Operation]: https://google.aip.dev/151
709 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
710 /// [`future`]: @ref google::cloud::future
711 /// [`StatusOr`]: @ref google::cloud::StatusOr
712 /// [`Status`]: @ref google::cloud::Status
713 /// [google.bigtable.admin.v2.Cluster]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L143}
714 ///
715 // clang-format on
716 future<StatusOr<google::bigtable::admin::v2::Cluster>> UpdateCluster(
717 google::bigtable::admin::v2::Cluster const& request, Options opts = {});
718
719 // clang-format off
720 ///
721 /// Partially updates a cluster within a project. This method is the preferred
722 /// way to update a Cluster.
723 ///
724 /// To enable and update autoscaling, set
725 /// cluster_config.cluster_autoscaling_config. When autoscaling is enabled,
726 /// serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it
727 /// are ignored. Note that an update cannot simultaneously set serve_nodes to
728 /// non-zero and cluster_config.cluster_autoscaling_config to non-empty, and
729 /// also specify both in the update_mask.
730 ///
731 /// To disable autoscaling, clear cluster_config.cluster_autoscaling_config,
732 /// and explicitly set a serve_node count via the update_mask.
733 ///
734 /// @param cluster Required. The Cluster which contains the partial updates to be applied, subject to
735 /// the update_mask.
736 /// @param update_mask Required. The subset of Cluster fields which should be replaced.
737 /// @param opts Optional. Override the class-level options, such as retry and
738 /// backoff policies.
739 /// @return A [`future`] that becomes satisfied when the LRO
740 /// ([Long Running Operation]) completes or the polling policy in effect
741 /// for this call is exhausted. The future is satisfied with an error if
742 /// the LRO completes with an error or the polling policy is exhausted.
743 /// In this case the [`StatusOr`] returned by the future contains the
744 /// error. If the LRO completes successfully the value of the future
745 /// contains the LRO's result. For this RPC the result is a
746 /// [google.bigtable.admin.v2.Cluster] proto message.
747 /// The C++ class representing this message is created by Protobuf, using
748 /// the [Protobuf mapping rules].
749 ///
750 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
751 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
752 /// [Long Running Operation]: https://google.aip.dev/151
753 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
754 /// [`future`]: @ref google::cloud::future
755 /// [`StatusOr`]: @ref google::cloud::StatusOr
756 /// [`Status`]: @ref google::cloud::Status
757 /// [google.bigtable.admin.v2.Cluster]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L143}
758 /// [google.bigtable.admin.v2.PartialUpdateClusterRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L563}
759 ///
760 // clang-format on
761 future<StatusOr<google::bigtable::admin::v2::Cluster>> PartialUpdateCluster(
762 google::bigtable::admin::v2::Cluster const& cluster,
763 google::protobuf::FieldMask const& update_mask, Options opts = {});
764
765 // clang-format off
766 ///
767 /// Partially updates a cluster within a project. This method is the preferred
768 /// way to update a Cluster.
769 ///
770 /// To enable and update autoscaling, set
771 /// cluster_config.cluster_autoscaling_config. When autoscaling is enabled,
772 /// serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it
773 /// are ignored. Note that an update cannot simultaneously set serve_nodes to
774 /// non-zero and cluster_config.cluster_autoscaling_config to non-empty, and
775 /// also specify both in the update_mask.
776 ///
777 /// To disable autoscaling, clear cluster_config.cluster_autoscaling_config,
778 /// and explicitly set a serve_node count via the update_mask.
779 ///
780 /// @param request Unary RPCs, such as the one wrapped by this
781 /// function, receive a single `request` proto message which includes all
782 /// the inputs for the RPC. In this case, the proto message is a
783 /// [google.bigtable.admin.v2.PartialUpdateClusterRequest].
784 /// Proto messages are converted to C++ classes by Protobuf, using the
785 /// [Protobuf mapping rules].
786 /// @param opts Optional. Override the class-level options, such as retry and
787 /// backoff policies.
788 /// @return A [`future`] that becomes satisfied when the LRO
789 /// ([Long Running Operation]) completes or the polling policy in effect
790 /// for this call is exhausted. The future is satisfied with an error if
791 /// the LRO completes with an error or the polling policy is exhausted.
792 /// In this case the [`StatusOr`] returned by the future contains the
793 /// error. If the LRO completes successfully the value of the future
794 /// contains the LRO's result. For this RPC the result is a
795 /// [google.bigtable.admin.v2.Cluster] proto message.
796 /// The C++ class representing this message is created by Protobuf, using
797 /// the [Protobuf mapping rules].
798 ///
799 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
800 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
801 /// [Long Running Operation]: https://google.aip.dev/151
802 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
803 /// [`future`]: @ref google::cloud::future
804 /// [`StatusOr`]: @ref google::cloud::StatusOr
805 /// [`Status`]: @ref google::cloud::Status
806 /// [google.bigtable.admin.v2.Cluster]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L143}
807 /// [google.bigtable.admin.v2.PartialUpdateClusterRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L563}
808 ///
809 // clang-format on
810 future<StatusOr<google::bigtable::admin::v2::Cluster>> PartialUpdateCluster(
811 google::bigtable::admin::v2::PartialUpdateClusterRequest const& request,
812 Options opts = {});
813
814 // clang-format off
815 ///
816 /// Deletes a cluster from an instance.
817 ///
818 /// @param name Required. The unique name of the cluster to be deleted. Values are of the form
819 /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
820 /// @param opts Optional. Override the class-level options, such as retry and
821 /// backoff policies.
822 /// @return a [`Status`] object. If the request failed, the
823 /// status contains the details of the failure.
824 ///
825 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
826 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
827 /// [Long Running Operation]: https://google.aip.dev/151
828 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
829 /// [`future`]: @ref google::cloud::future
830 /// [`StatusOr`]: @ref google::cloud::StatusOr
831 /// [`Status`]: @ref google::cloud::Status
832 /// [google.bigtable.admin.v2.DeleteClusterRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L450}
833 ///
834 // clang-format on
835 Status DeleteCluster(std::string const& name, Options opts = {});
836
837 // clang-format off
838 ///
839 /// Deletes a cluster from an instance.
840 ///
841 /// @param request Unary RPCs, such as the one wrapped by this
842 /// function, receive a single `request` proto message which includes all
843 /// the inputs for the RPC. In this case, the proto message is a
844 /// [google.bigtable.admin.v2.DeleteClusterRequest].
845 /// Proto messages are converted to C++ classes by Protobuf, using the
846 /// [Protobuf mapping rules].
847 /// @param opts Optional. Override the class-level options, such as retry and
848 /// backoff policies.
849 /// @return a [`Status`] object. If the request failed, the
850 /// status contains the details of the failure.
851 ///
852 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
853 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
854 /// [Long Running Operation]: https://google.aip.dev/151
855 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
856 /// [`future`]: @ref google::cloud::future
857 /// [`StatusOr`]: @ref google::cloud::StatusOr
858 /// [`Status`]: @ref google::cloud::Status
859 /// [google.bigtable.admin.v2.DeleteClusterRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L450}
860 ///
861 // clang-format on
863 google::bigtable::admin::v2::DeleteClusterRequest const& request,
864 Options opts = {});
865
866 // clang-format off
867 ///
868 /// Creates an app profile within an instance.
869 ///
870 /// @param parent Required. The unique name of the instance in which to create the new app profile.
871 /// Values are of the form
872 /// `projects/{project}/instances/{instance}`.
873 /// @param app_profile_id Required. The ID to be used when referring to the new app profile within its
874 /// instance, e.g., just `myprofile` rather than
875 /// `projects/myproject/instances/myinstance/appProfiles/myprofile`.
876 /// @param app_profile Required. The app profile to be created.
877 /// Fields marked `OutputOnly` will be ignored.
878 /// @param opts Optional. Override the class-level options, such as retry and
879 /// backoff policies.
880 /// @return the result of the RPC. The response message type
881 /// ([google.bigtable.admin.v2.AppProfile])
882 /// is mapped to a C++ class using the [Protobuf mapping rules].
883 /// If the request fails, the [`StatusOr`] contains the error details.
884 ///
885 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
886 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
887 /// [Long Running Operation]: https://google.aip.dev/151
888 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
889 /// [`future`]: @ref google::cloud::future
890 /// [`StatusOr`]: @ref google::cloud::StatusOr
891 /// [`Status`]: @ref google::cloud::Status
892 /// [google.bigtable.admin.v2.AppProfile]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L244}
893 /// [google.bigtable.admin.v2.CreateAppProfileRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L573}
894 ///
895 // clang-format on
896 StatusOr<google::bigtable::admin::v2::AppProfile> CreateAppProfile(
897 std::string const& parent, std::string const& app_profile_id,
898 google::bigtable::admin::v2::AppProfile const& app_profile,
899 Options opts = {});
900
901 // clang-format off
902 ///
903 /// Creates an app profile within an instance.
904 ///
905 /// @param request Unary RPCs, such as the one wrapped by this
906 /// function, receive a single `request` proto message which includes all
907 /// the inputs for the RPC. In this case, the proto message is a
908 /// [google.bigtable.admin.v2.CreateAppProfileRequest].
909 /// Proto messages are converted to C++ classes by Protobuf, using the
910 /// [Protobuf mapping rules].
911 /// @param opts Optional. Override the class-level options, such as retry and
912 /// backoff policies.
913 /// @return the result of the RPC. The response message type
914 /// ([google.bigtable.admin.v2.AppProfile])
915 /// is mapped to a C++ class using the [Protobuf mapping rules].
916 /// If the request fails, the [`StatusOr`] contains the error details.
917 ///
918 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
919 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
920 /// [Long Running Operation]: https://google.aip.dev/151
921 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
922 /// [`future`]: @ref google::cloud::future
923 /// [`StatusOr`]: @ref google::cloud::StatusOr
924 /// [`Status`]: @ref google::cloud::Status
925 /// [google.bigtable.admin.v2.AppProfile]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L244}
926 /// [google.bigtable.admin.v2.CreateAppProfileRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L573}
927 ///
928 // clang-format on
929 StatusOr<google::bigtable::admin::v2::AppProfile> CreateAppProfile(
930 google::bigtable::admin::v2::CreateAppProfileRequest const& request,
931 Options opts = {});
932
933 // clang-format off
934 ///
935 /// Gets information about an app profile.
936 ///
937 /// @param name Required. The unique name of the requested app profile. Values are of the form
938 /// `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
939 /// @param opts Optional. Override the class-level options, such as retry and
940 /// backoff policies.
941 /// @return the result of the RPC. The response message type
942 /// ([google.bigtable.admin.v2.AppProfile])
943 /// is mapped to a C++ class using the [Protobuf mapping rules].
944 /// If the request fails, the [`StatusOr`] contains the error details.
945 ///
946 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
947 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
948 /// [Long Running Operation]: https://google.aip.dev/151
949 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
950 /// [`future`]: @ref google::cloud::future
951 /// [`StatusOr`]: @ref google::cloud::StatusOr
952 /// [`Status`]: @ref google::cloud::Status
953 /// [google.bigtable.admin.v2.AppProfile]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L244}
954 /// [google.bigtable.admin.v2.GetAppProfileRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L598}
955 ///
956 // clang-format on
957 StatusOr<google::bigtable::admin::v2::AppProfile> GetAppProfile(
958 std::string const& name, Options opts = {});
959
960 // clang-format off
961 ///
962 /// Gets information about an app profile.
963 ///
964 /// @param request Unary RPCs, such as the one wrapped by this
965 /// function, receive a single `request` proto message which includes all
966 /// the inputs for the RPC. In this case, the proto message is a
967 /// [google.bigtable.admin.v2.GetAppProfileRequest].
968 /// Proto messages are converted to C++ classes by Protobuf, using the
969 /// [Protobuf mapping rules].
970 /// @param opts Optional. Override the class-level options, such as retry and
971 /// backoff policies.
972 /// @return the result of the RPC. The response message type
973 /// ([google.bigtable.admin.v2.AppProfile])
974 /// is mapped to a C++ class using the [Protobuf mapping rules].
975 /// If the request fails, the [`StatusOr`] contains the error details.
976 ///
977 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
978 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
979 /// [Long Running Operation]: https://google.aip.dev/151
980 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
981 /// [`future`]: @ref google::cloud::future
982 /// [`StatusOr`]: @ref google::cloud::StatusOr
983 /// [`Status`]: @ref google::cloud::Status
984 /// [google.bigtable.admin.v2.AppProfile]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L244}
985 /// [google.bigtable.admin.v2.GetAppProfileRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L598}
986 ///
987 // clang-format on
988 StatusOr<google::bigtable::admin::v2::AppProfile> GetAppProfile(
989 google::bigtable::admin::v2::GetAppProfileRequest const& request,
990 Options opts = {});
991
992 // clang-format off
993 ///
994 /// Lists information about app profiles in an instance.
995 ///
996 /// @param parent Required. The unique name of the instance for which a list of app profiles is
997 /// requested. Values are of the form
998 /// `projects/{project}/instances/{instance}`.
999 /// Use ``{instance} = '-'`` to list AppProfiles for all Instances in a project,
1000 /// e.g., `projects/myproject/instances/-`.
1001 /// @param opts Optional. Override the class-level options, such as retry and
1002 /// backoff policies.
1003 /// @return a [StreamRange](@ref google::cloud::StreamRange)
1004 /// to iterate of the results. See the documentation of this type for
1005 /// details. In brief, this class has `begin()` and `end()` member
1006 /// functions returning a iterator class meeting the
1007 /// [input iterator requirements]. The value type for this iterator is a
1008 /// [`StatusOr`] as the iteration may fail even after some values are
1009 /// retrieved successfully, for example, if there is a network disconnect.
1010 /// An empty set of results does not indicate an error, it indicates
1011 /// that there are no resources meeting the request criteria.
1012 /// On a successful iteration the `StatusOr<T>` contains elements of type
1013 /// [google.bigtable.admin.v2.AppProfile], or rather,
1014 /// the C++ class generated by Protobuf from that type. Please consult the
1015 /// Protobuf documentation for details on the [Protobuf mapping rules].
1016 ///
1017 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
1018 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
1019 /// [Long Running Operation]: https://google.aip.dev/151
1020 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
1021 /// [`future`]: @ref google::cloud::future
1022 /// [`StatusOr`]: @ref google::cloud::StatusOr
1023 /// [`Status`]: @ref google::cloud::Status
1024 /// [google.bigtable.admin.v2.AppProfile]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L244}
1025 /// [google.bigtable.admin.v2.ListAppProfilesRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L610}
1026 ///
1027 // clang-format on
1028 StreamRange<google::bigtable::admin::v2::AppProfile> ListAppProfiles(
1029 std::string const& parent, Options opts = {});
1030
1031 // clang-format off
1032 ///
1033 /// Lists information about app profiles in an instance.
1034 ///
1035 /// @param request Unary RPCs, such as the one wrapped by this
1036 /// function, receive a single `request` proto message which includes all
1037 /// the inputs for the RPC. In this case, the proto message is a
1038 /// [google.bigtable.admin.v2.ListAppProfilesRequest].
1039 /// Proto messages are converted to C++ classes by Protobuf, using the
1040 /// [Protobuf mapping rules].
1041 /// @param opts Optional. Override the class-level options, such as retry and
1042 /// backoff policies.
1043 /// @return a [StreamRange](@ref google::cloud::StreamRange)
1044 /// to iterate of the results. See the documentation of this type for
1045 /// details. In brief, this class has `begin()` and `end()` member
1046 /// functions returning a iterator class meeting the
1047 /// [input iterator requirements]. The value type for this iterator is a
1048 /// [`StatusOr`] as the iteration may fail even after some values are
1049 /// retrieved successfully, for example, if there is a network disconnect.
1050 /// An empty set of results does not indicate an error, it indicates
1051 /// that there are no resources meeting the request criteria.
1052 /// On a successful iteration the `StatusOr<T>` contains elements of type
1053 /// [google.bigtable.admin.v2.AppProfile], or rather,
1054 /// the C++ class generated by Protobuf from that type. Please consult the
1055 /// Protobuf documentation for details on the [Protobuf mapping rules].
1056 ///
1057 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
1058 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
1059 /// [Long Running Operation]: https://google.aip.dev/151
1060 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
1061 /// [`future`]: @ref google::cloud::future
1062 /// [`StatusOr`]: @ref google::cloud::StatusOr
1063 /// [`Status`]: @ref google::cloud::Status
1064 /// [google.bigtable.admin.v2.AppProfile]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L244}
1065 /// [google.bigtable.admin.v2.ListAppProfilesRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L610}
1066 ///
1067 // clang-format on
1068 StreamRange<google::bigtable::admin::v2::AppProfile> ListAppProfiles(
1069 google::bigtable::admin::v2::ListAppProfilesRequest request,
1070 Options opts = {});
1071
1072 // clang-format off
1073 ///
1074 /// Updates an app profile within an instance.
1075 ///
1076 /// @param app_profile Required. The app profile which will (partially) replace the current value.
1077 /// @param update_mask Required. The subset of app profile fields which should be replaced.
1078 /// If unset, all fields will be replaced.
1079 /// @param opts Optional. Override the class-level options, such as retry and
1080 /// backoff policies.
1081 /// @return A [`future`] that becomes satisfied when the LRO
1082 /// ([Long Running Operation]) completes or the polling policy in effect
1083 /// for this call is exhausted. The future is satisfied with an error if
1084 /// the LRO completes with an error or the polling policy is exhausted.
1085 /// In this case the [`StatusOr`] returned by the future contains the
1086 /// error. If the LRO completes successfully the value of the future
1087 /// contains the LRO's result. For this RPC the result is a
1088 /// [google.bigtable.admin.v2.AppProfile] proto message.
1089 /// The C++ class representing this message is created by Protobuf, using
1090 /// the [Protobuf mapping rules].
1091 ///
1092 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
1093 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
1094 /// [Long Running Operation]: https://google.aip.dev/151
1095 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
1096 /// [`future`]: @ref google::cloud::future
1097 /// [`StatusOr`]: @ref google::cloud::StatusOr
1098 /// [`Status`]: @ref google::cloud::Status
1099 /// [google.bigtable.admin.v2.AppProfile]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L244}
1100 /// [google.bigtable.admin.v2.UpdateAppProfileRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L656}
1101 ///
1102 // clang-format on
1103 future<StatusOr<google::bigtable::admin::v2::AppProfile>> UpdateAppProfile(
1104 google::bigtable::admin::v2::AppProfile const& app_profile,
1105 google::protobuf::FieldMask const& update_mask, Options opts = {});
1106
1107 // clang-format off
1108 ///
1109 /// Updates an app profile within an instance.
1110 ///
1111 /// @param request Unary RPCs, such as the one wrapped by this
1112 /// function, receive a single `request` proto message which includes all
1113 /// the inputs for the RPC. In this case, the proto message is a
1114 /// [google.bigtable.admin.v2.UpdateAppProfileRequest].
1115 /// Proto messages are converted to C++ classes by Protobuf, using the
1116 /// [Protobuf mapping rules].
1117 /// @param opts Optional. Override the class-level options, such as retry and
1118 /// backoff policies.
1119 /// @return A [`future`] that becomes satisfied when the LRO
1120 /// ([Long Running Operation]) completes or the polling policy in effect
1121 /// for this call is exhausted. The future is satisfied with an error if
1122 /// the LRO completes with an error or the polling policy is exhausted.
1123 /// In this case the [`StatusOr`] returned by the future contains the
1124 /// error. If the LRO completes successfully the value of the future
1125 /// contains the LRO's result. For this RPC the result is a
1126 /// [google.bigtable.admin.v2.AppProfile] proto message.
1127 /// The C++ class representing this message is created by Protobuf, using
1128 /// the [Protobuf mapping rules].
1129 ///
1130 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
1131 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
1132 /// [Long Running Operation]: https://google.aip.dev/151
1133 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
1134 /// [`future`]: @ref google::cloud::future
1135 /// [`StatusOr`]: @ref google::cloud::StatusOr
1136 /// [`Status`]: @ref google::cloud::Status
1137 /// [google.bigtable.admin.v2.AppProfile]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L244}
1138 /// [google.bigtable.admin.v2.UpdateAppProfileRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L656}
1139 ///
1140 // clang-format on
1141 future<StatusOr<google::bigtable::admin::v2::AppProfile>> UpdateAppProfile(
1142 google::bigtable::admin::v2::UpdateAppProfileRequest const& request,
1143 Options opts = {});
1144
1145 // clang-format off
1146 ///
1147 /// Deletes an app profile from an instance.
1148 ///
1149 /// @param request Unary RPCs, such as the one wrapped by this
1150 /// function, receive a single `request` proto message which includes all
1151 /// the inputs for the RPC. In this case, the proto message is a
1152 /// [google.bigtable.admin.v2.DeleteAppProfileRequest].
1153 /// Proto messages are converted to C++ classes by Protobuf, using the
1154 /// [Protobuf mapping rules].
1155 /// @param opts Optional. Override the class-level options, such as retry and
1156 /// backoff policies.
1157 /// @return a [`Status`] object. If the request failed, the
1158 /// status contains the details of the failure.
1159 ///
1160 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
1161 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
1162 /// [Long Running Operation]: https://google.aip.dev/151
1163 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
1164 /// [`future`]: @ref google::cloud::future
1165 /// [`StatusOr`]: @ref google::cloud::StatusOr
1166 /// [`Status`]: @ref google::cloud::Status
1167 /// [google.bigtable.admin.v2.DeleteAppProfileRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L669}
1168 ///
1169 // clang-format on
1171 google::bigtable::admin::v2::DeleteAppProfileRequest const& request,
1172 Options opts = {});
1173
1174 // clang-format off
1175 ///
1176 /// Gets the access control policy for an instance resource. Returns an empty
1177 /// policy if an instance exists but does not have a policy set.
1178 ///
1179 /// @param resource REQUIRED: The resource for which the policy is being requested.
1180 /// See the operation documentation for the appropriate value for this field.
1181 /// @param opts Optional. Override the class-level options, such as retry and
1182 /// backoff policies.
1183 /// @return the result of the RPC. The response message type
1184 /// ([google.iam.v1.Policy])
1185 /// is mapped to a C++ class using the [Protobuf mapping rules].
1186 /// If the request fails, the [`StatusOr`] contains the error details.
1187 ///
1188 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
1189 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
1190 /// [Long Running Operation]: https://google.aip.dev/151
1191 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
1192 /// [`future`]: @ref google::cloud::future
1193 /// [`StatusOr`]: @ref google::cloud::StatusOr
1194 /// [`Status`]: @ref google::cloud::Status
1195 /// [google.iam.v1.GetIamPolicyRequest]: @googleapis_reference_link{google/iam/v1/iam_policy.proto#L123}
1196 /// [google.iam.v1.Policy]: @googleapis_reference_link{google/iam/v1/policy.proto#L98}
1197 ///
1198 // clang-format on
1199 StatusOr<google::iam::v1::Policy> GetIamPolicy(std::string const& resource,
1200 Options opts = {});
1201
1202 // clang-format off
1203 ///
1204 /// Gets the access control policy for an instance resource. Returns an empty
1205 /// policy if an instance exists but does not have a policy set.
1206 ///
1207 /// @param request Unary RPCs, such as the one wrapped by this
1208 /// function, receive a single `request` proto message which includes all
1209 /// the inputs for the RPC. In this case, the proto message is a
1210 /// [google.iam.v1.GetIamPolicyRequest].
1211 /// Proto messages are converted to C++ classes by Protobuf, using the
1212 /// [Protobuf mapping rules].
1213 /// @param opts Optional. Override the class-level options, such as retry and
1214 /// backoff policies.
1215 /// @return the result of the RPC. The response message type
1216 /// ([google.iam.v1.Policy])
1217 /// is mapped to a C++ class using the [Protobuf mapping rules].
1218 /// If the request fails, the [`StatusOr`] contains the error details.
1219 ///
1220 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
1221 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
1222 /// [Long Running Operation]: https://google.aip.dev/151
1223 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
1224 /// [`future`]: @ref google::cloud::future
1225 /// [`StatusOr`]: @ref google::cloud::StatusOr
1226 /// [`Status`]: @ref google::cloud::Status
1227 /// [google.iam.v1.GetIamPolicyRequest]: @googleapis_reference_link{google/iam/v1/iam_policy.proto#L123}
1228 /// [google.iam.v1.Policy]: @googleapis_reference_link{google/iam/v1/policy.proto#L98}
1229 ///
1230 // clang-format on
1231 StatusOr<google::iam::v1::Policy> GetIamPolicy(
1232 google::iam::v1::GetIamPolicyRequest const& request, Options opts = {});
1233
1234 // clang-format off
1235 ///
1236 /// Sets the access control policy on an instance resource. Replaces any
1237 /// existing policy.
1238 ///
1239 /// @param resource REQUIRED: The resource for which the policy is being specified.
1240 /// See the operation documentation for the appropriate value for this field.
1241 /// @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of
1242 /// the policy is limited to a few 10s of KB. An empty policy is a
1243 /// valid policy but certain Cloud Platform services (such as Projects)
1244 /// might reject them.
1245 /// @param opts Optional. Override the class-level options, such as retry and
1246 /// backoff policies.
1247 /// @return the result of the RPC. The response message type
1248 /// ([google.iam.v1.Policy])
1249 /// is mapped to a C++ class using the [Protobuf mapping rules].
1250 /// If the request fails, the [`StatusOr`] contains the error details.
1251 ///
1252 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
1253 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
1254 /// [Long Running Operation]: https://google.aip.dev/151
1255 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
1256 /// [`future`]: @ref google::cloud::future
1257 /// [`StatusOr`]: @ref google::cloud::StatusOr
1258 /// [`Status`]: @ref google::cloud::Status
1259 /// [google.iam.v1.Policy]: @googleapis_reference_link{google/iam/v1/policy.proto#L98}
1260 /// [google.iam.v1.SetIamPolicyRequest]: @googleapis_reference_link{google/iam/v1/iam_policy.proto#L101}
1261 ///
1262 // clang-format on
1263 StatusOr<google::iam::v1::Policy> SetIamPolicy(
1264 std::string const& resource, google::iam::v1::Policy const& policy,
1265 Options opts = {});
1266
1267 /**
1268 * Updates the IAM policy for @p resource using an optimistic concurrency
1269 * control loop.
1270 *
1271 * The loop fetches the current policy for @p resource, and passes it to @p
1272 * updater, which should return the new policy. This new policy should use the
1273 * current etag so that the read-modify-write cycle can detect races and rerun
1274 * the update when there is a mismatch. If the new policy does not have an
1275 * etag, the existing policy will be blindly overwritten. If @p updater does
1276 * not yield a policy, the control loop is terminated and kCancelled is
1277 * returned.
1278 *
1279 * @param resource Required. The resource for which the policy is being
1280 * specified. See the operation documentation for the appropriate value for
1281 * this field.
1282 * @param updater Required. Functor to map the current policy to a new one.
1283 * @param opts Optional. Override the class-level options, such as retry and
1284 * backoff policies.
1285 * @return google::iam::v1::Policy
1286 */
1287 StatusOr<google::iam::v1::Policy> SetIamPolicy(std::string const& resource,
1288 IamUpdater const& updater,
1289 Options opts = {});
1290
1291 // clang-format off
1292 ///
1293 /// Sets the access control policy on an instance resource. Replaces any
1294 /// existing policy.
1295 ///
1296 /// @param request Unary RPCs, such as the one wrapped by this
1297 /// function, receive a single `request` proto message which includes all
1298 /// the inputs for the RPC. In this case, the proto message is a
1299 /// [google.iam.v1.SetIamPolicyRequest].
1300 /// Proto messages are converted to C++ classes by Protobuf, using the
1301 /// [Protobuf mapping rules].
1302 /// @param opts Optional. Override the class-level options, such as retry and
1303 /// backoff policies.
1304 /// @return the result of the RPC. The response message type
1305 /// ([google.iam.v1.Policy])
1306 /// is mapped to a C++ class using the [Protobuf mapping rules].
1307 /// If the request fails, the [`StatusOr`] contains the error details.
1308 ///
1309 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
1310 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
1311 /// [Long Running Operation]: https://google.aip.dev/151
1312 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
1313 /// [`future`]: @ref google::cloud::future
1314 /// [`StatusOr`]: @ref google::cloud::StatusOr
1315 /// [`Status`]: @ref google::cloud::Status
1316 /// [google.iam.v1.Policy]: @googleapis_reference_link{google/iam/v1/policy.proto#L98}
1317 /// [google.iam.v1.SetIamPolicyRequest]: @googleapis_reference_link{google/iam/v1/iam_policy.proto#L101}
1318 ///
1319 // clang-format on
1320 StatusOr<google::iam::v1::Policy> SetIamPolicy(
1321 google::iam::v1::SetIamPolicyRequest const& request, Options opts = {});
1322
1323 // clang-format off
1324 ///
1325 /// Returns permissions that the caller has on the specified instance resource.
1326 ///
1327 /// @param resource REQUIRED: The resource for which the policy detail is being requested.
1328 /// See the operation documentation for the appropriate value for this field.
1329 /// @param permissions The set of permissions to check for the `resource`. Permissions with
1330 /// wildcards (such as '*' or 'storage.*') are not allowed. For more
1331 /// information see
1332 /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
1333 /// @param opts Optional. Override the class-level options, such as retry and
1334 /// backoff policies.
1335 /// @return the result of the RPC. The response message type
1336 /// ([google.iam.v1.TestIamPermissionsResponse])
1337 /// is mapped to a C++ class using the [Protobuf mapping rules].
1338 /// If the request fails, the [`StatusOr`] contains the error details.
1339 ///
1340 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
1341 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
1342 /// [Long Running Operation]: https://google.aip.dev/151
1343 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
1344 /// [`future`]: @ref google::cloud::future
1345 /// [`StatusOr`]: @ref google::cloud::StatusOr
1346 /// [`Status`]: @ref google::cloud::Status
1347 /// [google.iam.v1.TestIamPermissionsRequest]: @googleapis_reference_link{google/iam/v1/iam_policy.proto#L136}
1348 /// [google.iam.v1.TestIamPermissionsResponse]: @googleapis_reference_link{google/iam/v1/iam_policy.proto#L151}
1349 ///
1350 // clang-format on
1351 StatusOr<google::iam::v1::TestIamPermissionsResponse> TestIamPermissions(
1352 std::string const& resource, std::vector<std::string> const& permissions,
1353 Options opts = {});
1354
1355 // clang-format off
1356 ///
1357 /// Returns permissions that the caller has on the specified instance resource.
1358 ///
1359 /// @param request Unary RPCs, such as the one wrapped by this
1360 /// function, receive a single `request` proto message which includes all
1361 /// the inputs for the RPC. In this case, the proto message is a
1362 /// [google.iam.v1.TestIamPermissionsRequest].
1363 /// Proto messages are converted to C++ classes by Protobuf, using the
1364 /// [Protobuf mapping rules].
1365 /// @param opts Optional. Override the class-level options, such as retry and
1366 /// backoff policies.
1367 /// @return the result of the RPC. The response message type
1368 /// ([google.iam.v1.TestIamPermissionsResponse])
1369 /// is mapped to a C++ class using the [Protobuf mapping rules].
1370 /// If the request fails, the [`StatusOr`] contains the error details.
1371 ///
1372 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
1373 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
1374 /// [Long Running Operation]: https://google.aip.dev/151
1375 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
1376 /// [`future`]: @ref google::cloud::future
1377 /// [`StatusOr`]: @ref google::cloud::StatusOr
1378 /// [`Status`]: @ref google::cloud::Status
1379 /// [google.iam.v1.TestIamPermissionsRequest]: @googleapis_reference_link{google/iam/v1/iam_policy.proto#L136}
1380 /// [google.iam.v1.TestIamPermissionsResponse]: @googleapis_reference_link{google/iam/v1/iam_policy.proto#L151}
1381 ///
1382 // clang-format on
1383 StatusOr<google::iam::v1::TestIamPermissionsResponse> TestIamPermissions(
1384 google::iam::v1::TestIamPermissionsRequest const& request,
1385 Options opts = {});
1386
1387 // clang-format off
1388 ///
1389 /// Lists hot tablets in a cluster, within the time range provided. Hot
1390 /// tablets are ordered based on CPU usage.
1391 ///
1392 /// @param parent Required. The cluster name to list hot tablets.
1393 /// Value is in the following form:
1394 /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
1395 /// @param opts Optional. Override the class-level options, such as retry and
1396 /// backoff policies.
1397 /// @return a [StreamRange](@ref google::cloud::StreamRange)
1398 /// to iterate of the results. See the documentation of this type for
1399 /// details. In brief, this class has `begin()` and `end()` member
1400 /// functions returning a iterator class meeting the
1401 /// [input iterator requirements]. The value type for this iterator is a
1402 /// [`StatusOr`] as the iteration may fail even after some values are
1403 /// retrieved successfully, for example, if there is a network disconnect.
1404 /// An empty set of results does not indicate an error, it indicates
1405 /// that there are no resources meeting the request criteria.
1406 /// On a successful iteration the `StatusOr<T>` contains elements of type
1407 /// [google.bigtable.admin.v2.HotTablet], or rather,
1408 /// the C++ class generated by Protobuf from that type. Please consult the
1409 /// Protobuf documentation for details on the [Protobuf mapping rules].
1410 ///
1411 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
1412 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
1413 /// [Long Running Operation]: https://google.aip.dev/151
1414 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
1415 /// [`future`]: @ref google::cloud::future
1416 /// [`StatusOr`]: @ref google::cloud::StatusOr
1417 /// [`Status`]: @ref google::cloud::Status
1418 /// [google.bigtable.admin.v2.HotTablet]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L307}
1419 /// [google.bigtable.admin.v2.ListHotTabletsRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L689}
1420 ///
1421 // clang-format on
1422 StreamRange<google::bigtable::admin::v2::HotTablet> ListHotTablets(
1423 std::string const& parent, Options opts = {});
1424
1425 // clang-format off
1426 ///
1427 /// Lists hot tablets in a cluster, within the time range provided. Hot
1428 /// tablets are ordered based on CPU usage.
1429 ///
1430 /// @param request Unary RPCs, such as the one wrapped by this
1431 /// function, receive a single `request` proto message which includes all
1432 /// the inputs for the RPC. In this case, the proto message is a
1433 /// [google.bigtable.admin.v2.ListHotTabletsRequest].
1434 /// Proto messages are converted to C++ classes by Protobuf, using the
1435 /// [Protobuf mapping rules].
1436 /// @param opts Optional. Override the class-level options, such as retry and
1437 /// backoff policies.
1438 /// @return a [StreamRange](@ref google::cloud::StreamRange)
1439 /// to iterate of the results. See the documentation of this type for
1440 /// details. In brief, this class has `begin()` and `end()` member
1441 /// functions returning a iterator class meeting the
1442 /// [input iterator requirements]. The value type for this iterator is a
1443 /// [`StatusOr`] as the iteration may fail even after some values are
1444 /// retrieved successfully, for example, if there is a network disconnect.
1445 /// An empty set of results does not indicate an error, it indicates
1446 /// that there are no resources meeting the request criteria.
1447 /// On a successful iteration the `StatusOr<T>` contains elements of type
1448 /// [google.bigtable.admin.v2.HotTablet], or rather,
1449 /// the C++ class generated by Protobuf from that type. Please consult the
1450 /// Protobuf documentation for details on the [Protobuf mapping rules].
1451 ///
1452 /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
1453 /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
1454 /// [Long Running Operation]: https://google.aip.dev/151
1455 /// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
1456 /// [`future`]: @ref google::cloud::future
1457 /// [`StatusOr`]: @ref google::cloud::StatusOr
1458 /// [`Status`]: @ref google::cloud::Status
1459 /// [google.bigtable.admin.v2.HotTablet]: @googleapis_reference_link{google/bigtable/admin/v2/instance.proto#L307}
1460 /// [google.bigtable.admin.v2.ListHotTabletsRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_instance_admin.proto#L689}
1461 ///
1462 // clang-format on
1463 StreamRange<google::bigtable::admin::v2::HotTablet> ListHotTablets(
1464 google::bigtable::admin::v2::ListHotTabletsRequest request,
1465 Options opts = {});
1466
1467 private:
1468 std::shared_ptr<BigtableInstanceAdminConnection> connection_;
1469 Options options_;
1470};
1471
1472GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
1473} // namespace bigtable_admin
1474} // namespace cloud
1475} // namespace google
1476
1477#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_BIGTABLE_INSTANCE_ADMIN_CLIENT_H
Service for creating, configuring, and deleting Cloud Bigtable Instances and Clusters.
Definition: bigtable_instance_admin_client.h:66
future< StatusOr< google::bigtable::admin::v2::Cluster > > CreateCluster(std::string const &parent, std::string const &cluster_id, google::bigtable::admin::v2::Cluster const &cluster, Options opts={})
Creates a cluster within an instance.
BigtableInstanceAdminClient(std::shared_ptr< BigtableInstanceAdminConnection > connection, Options opts={})
StreamRange< google::bigtable::admin::v2::HotTablet > ListHotTablets(std::string const &parent, Options opts={})
Lists hot tablets in a cluster, within the time range provided.
StatusOr< google::iam::v1::TestIamPermissionsResponse > TestIamPermissions(std::string const &resource, std::vector< std::string > const &permissions, Options opts={})
Returns permissions that the caller has on the specified instance resource.
StatusOr< google::bigtable::admin::v2::ListClustersResponse > ListClusters(google::bigtable::admin::v2::ListClustersRequest const &request, Options opts={})
Lists information about clusters in an instance.
StatusOr< google::bigtable::admin::v2::AppProfile > CreateAppProfile(std::string const &parent, std::string const &app_profile_id, google::bigtable::admin::v2::AppProfile const &app_profile, Options opts={})
Creates an app profile within an instance.
Status DeleteCluster(std::string const &name, Options opts={})
Deletes a cluster from an instance.
StreamRange< google::bigtable::admin::v2::AppProfile > ListAppProfiles(google::bigtable::admin::v2::ListAppProfilesRequest request, Options opts={})
Lists information about app profiles in an instance.
StatusOr< google::bigtable::admin::v2::AppProfile > CreateAppProfile(google::bigtable::admin::v2::CreateAppProfileRequest const &request, Options opts={})
Creates an app profile within an instance.
StatusOr< google::iam::v1::Policy > GetIamPolicy(google::iam::v1::GetIamPolicyRequest const &request, Options opts={})
Gets the access control policy for an instance resource.
StatusOr< google::bigtable::admin::v2::ListInstancesResponse > ListInstances(google::bigtable::admin::v2::ListInstancesRequest const &request, Options opts={})
Lists information about instances in a project.
future< StatusOr< google::bigtable::admin::v2::Cluster > > UpdateCluster(google::bigtable::admin::v2::Cluster const &request, Options opts={})
Updates a cluster within an instance.
BigtableInstanceAdminClient(BigtableInstanceAdminClient const &)=default
future< StatusOr< google::bigtable::admin::v2::Instance > > CreateInstance(google::bigtable::admin::v2::CreateInstanceRequest const &request, Options opts={})
Create an instance within a project.
friend bool operator==(BigtableInstanceAdminClient const &a, BigtableInstanceAdminClient const &b)
Definition: bigtable_instance_admin_client.h:85
future< StatusOr< google::bigtable::admin::v2::AppProfile > > UpdateAppProfile(google::bigtable::admin::v2::UpdateAppProfileRequest const &request, Options opts={})
Updates an app profile within an instance.
StatusOr< google::bigtable::admin::v2::AppProfile > GetAppProfile(google::bigtable::admin::v2::GetAppProfileRequest const &request, Options opts={})
Gets information about an app profile.
StreamRange< google::bigtable::admin::v2::AppProfile > ListAppProfiles(std::string const &parent, Options opts={})
Lists information about app profiles in an instance.
BigtableInstanceAdminClient & operator=(BigtableInstanceAdminClient const &)=default
future< StatusOr< google::bigtable::admin::v2::AppProfile > > UpdateAppProfile(google::bigtable::admin::v2::AppProfile const &app_profile, google::protobuf::FieldMask const &update_mask, Options opts={})
Updates an app profile within an instance.
future< StatusOr< google::bigtable::admin::v2::Cluster > > PartialUpdateCluster(google::bigtable::admin::v2::PartialUpdateClusterRequest const &request, Options opts={})
Partially updates a cluster within a project.
StatusOr< google::bigtable::admin::v2::Instance > UpdateInstance(google::bigtable::admin::v2::Instance const &request, Options opts={})
Updates an instance within a project.
future< StatusOr< google::bigtable::admin::v2::Cluster > > CreateCluster(google::bigtable::admin::v2::CreateClusterRequest const &request, Options opts={})
Creates a cluster within an instance.
StatusOr< google::bigtable::admin::v2::Cluster > GetCluster(std::string const &name, Options opts={})
Gets information about a cluster.
Status DeleteCluster(google::bigtable::admin::v2::DeleteClusterRequest const &request, Options opts={})
Deletes a cluster from an instance.
StatusOr< google::bigtable::admin::v2::Instance > GetInstance(std::string const &name, Options opts={})
Gets information about an instance.
StatusOr< google::iam::v1::Policy > GetIamPolicy(std::string const &resource, Options opts={})
Gets the access control policy for an instance resource.
StreamRange< google::bigtable::admin::v2::HotTablet > ListHotTablets(google::bigtable::admin::v2::ListHotTabletsRequest request, Options opts={})
Lists hot tablets in a cluster, within the time range provided.
BigtableInstanceAdminClient(BigtableInstanceAdminClient &&)=default
StatusOr< google::iam::v1::Policy > SetIamPolicy(google::iam::v1::SetIamPolicyRequest const &request, Options opts={})
Sets the access control policy on an instance resource.
Status DeleteInstance(google::bigtable::admin::v2::DeleteInstanceRequest const &request, Options opts={})
Delete an instance from a project.
StatusOr< google::iam::v1::TestIamPermissionsResponse > TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const &request, Options opts={})
Returns permissions that the caller has on the specified instance resource.
StatusOr< google::bigtable::admin::v2::ListInstancesResponse > ListInstances(std::string const &parent, Options opts={})
Lists information about instances in a project.
future< StatusOr< google::bigtable::admin::v2::Instance > > CreateInstance(std::string const &parent, std::string const &instance_id, google::bigtable::admin::v2::Instance const &instance, std::map< std::string, google::bigtable::admin::v2::Cluster > const &clusters, Options opts={})
Create an instance within a project.
StatusOr< google::iam::v1::Policy > SetIamPolicy(std::string const &resource, google::iam::v1::Policy const &policy, Options opts={})
Sets the access control policy on an instance resource.
StatusOr< google::bigtable::admin::v2::AppProfile > GetAppProfile(std::string const &name, Options opts={})
Gets information about an app profile.
StatusOr< google::bigtable::admin::v2::ListClustersResponse > ListClusters(std::string const &parent, Options opts={})
Lists information about clusters in an instance.
BigtableInstanceAdminClient & operator=(BigtableInstanceAdminClient &&)=default
Status DeleteAppProfile(google::bigtable::admin::v2::DeleteAppProfileRequest const &request, Options opts={})
Deletes an app profile from an instance.
future< StatusOr< google::bigtable::admin::v2::Instance > > PartialUpdateInstance(google::bigtable::admin::v2::Instance const &instance, google::protobuf::FieldMask const &update_mask, Options opts={})
Partially updates an instance within a project.
StatusOr< google::bigtable::admin::v2::Cluster > GetCluster(google::bigtable::admin::v2::GetClusterRequest const &request, Options opts={})
Gets information about a cluster.
friend bool operator!=(BigtableInstanceAdminClient const &a, BigtableInstanceAdminClient const &b)
Definition: bigtable_instance_admin_client.h:89
future< StatusOr< google::bigtable::admin::v2::Cluster > > PartialUpdateCluster(google::bigtable::admin::v2::Cluster const &cluster, google::protobuf::FieldMask const &update_mask, Options opts={})
Partially updates a cluster within a project.
StatusOr< google::bigtable::admin::v2::Instance > GetInstance(google::bigtable::admin::v2::GetInstanceRequest const &request, Options opts={})
Gets information about an instance.
Status DeleteInstance(std::string const &name, Options opts={})
Delete an instance from a project.
StatusOr< google::iam::v1::Policy > SetIamPolicy(std::string const &resource, IamUpdater const &updater, Options opts={})
Updates the IAM policy for resource using an optimistic concurrency control loop.
future< StatusOr< google::bigtable::admin::v2::Instance > > PartialUpdateInstance(google::bigtable::admin::v2::PartialUpdateInstanceRequest const &request, Options opts={})
Partially updates an instance within a project.
The BigtableInstanceAdminConnection object for BigtableInstanceAdminClient.
Definition: bigtable_instance_admin_connection.h:65
friend friend class future
Definition: bigtable_instance_admin_client.h:35