15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INSTANCE_ADMIN_CONNECTION_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INSTANCE_ADMIN_CONNECTION_H
18#include "google/cloud/spanner/backoff_policy.h"
19#include "google/cloud/spanner/internal/instance_admin_stub.h"
20#include "google/cloud/spanner/polling_policy.h"
21#include "google/cloud/spanner/retry_policy.h"
22#include "google/cloud/spanner/version.h"
23#include "google/cloud/backoff_policy.h"
24#include "google/cloud/internal/pagination_range.h"
25#include "google/cloud/options.h"
26#include <google/spanner/admin/instance/v1/spanner_instance_admin.pb.h>
34GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
37
38
39
40
41
42
43
44
45using ListInstancesRange = ::
google::
cloud::internal::PaginationRange<
46 google::spanner::admin::instance::v1::Instance>;
49
50
51
52
53
54
55
56
57using ListInstanceConfigsRange = ::
google::
cloud::internal::PaginationRange<
58 google::spanner::admin::instance::v1::InstanceConfig>;
61
62
63
64
65
66
67
68
69
70
71
72
73
81
82
83
84
85
86
87
88
98 google::spanner::admin::instance::v1::CreateInstanceRequest
request;
103 google::spanner::admin::instance::v1::UpdateInstanceRequest
request;
122
123
126
127
128
129
133
134
135
136
137
138
139
140
141
169 virtual future<StatusOr<
google::spanner::admin::instance::v1::Instance>>
172 virtual future<StatusOr<
google::spanner::admin::instance::v1::Instance>>
178 virtual StatusOr<
google::spanner::admin::instance::v1::InstanceConfig>
182
183
188
189
190
205 virtual StatusOr<
google::iam::v1::TestIamPermissionsResponse>
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
234
235
236
237
238
239
240
241
242
243
244
245
246
247
250 ConnectionOptions
const& options);
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
276 ConnectionOptions
const& options, std::unique_ptr<RetryPolicy> retry_policy,
277 std::unique_ptr<BackoffPolicy> backoff_policy,
278 std::unique_ptr<PollingPolicy> polling_policy);
280GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
283namespace spanner_internal {
284GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
288MakeInstanceAdminConnectionForTesting(
289 std::shared_ptr<InstanceAdminStub> base_stub,
Options opts);
291GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
friend friend class future
A connection to the Cloud Spanner instance administration service.
Definition: instance_admin_connection.h:75
virtual ListInstancesRange ListInstances(ListInstancesParams params)=0
Returns a one-pass input range with all the instances meeting the requirements in params.
virtual StatusOr< google::spanner::admin::instance::v1::Instance > GetInstance(GetInstanceParams)=0
Return the metadata for the given instance.
virtual ~InstanceAdminConnection()=0
virtual StatusOr< google::spanner::admin::instance::v1::InstanceConfig > GetInstanceConfig(GetInstanceConfigParams)=0
Return the InstanceConfig with the given name.
virtual future< StatusOr< google::spanner::admin::instance::v1::Instance > > CreateInstance(CreateInstanceParams p)=0
virtual ListInstanceConfigsRange ListInstanceConfigs(ListInstanceConfigsParams)=0
Returns a one-pass input range with all the instance configs.
virtual Status DeleteInstance(DeleteInstanceParams p)=0
virtual StatusOr< google::iam::v1::Policy > SetIamPolicy(SetIamPolicyParams)=0
Define the interface for a google.spanner.v1.DatabaseAdmin.SetIamPolicy RPC.
virtual StatusOr< google::iam::v1::TestIamPermissionsResponse > TestIamPermissions(TestIamPermissionsParams)=0
Define the interface for a google.spanner.v1.DatabaseAdmin.TestIamPermissions RPC.
virtual Options options()
Definition: instance_admin_connection.h:163
virtual StatusOr< google::iam::v1::Policy > GetIamPolicy(GetIamPolicyParams)=0
Define the interface for a google.spanner.v1.DatabaseAdmin.GetIamPolicy RPC.
virtual future< StatusOr< google::spanner::admin::instance::v1::Instance > > UpdateInstance(UpdateInstanceParams p)=0
Contains all the Cloud Spanner C++ client types and functions.
Definition: backoff_policy.h:23
std::shared_ptr< spanner::InstanceAdminConnection > MakeInstanceAdminConnection(Options opts={})
Returns an InstanceAdminConnection object that can be used for interacting with Cloud Spanner's admin...
std::shared_ptr< InstanceAdminConnection > MakeInstanceAdminConnection(ConnectionOptions const &options)
Returns an InstanceAdminConnection object that can be used for interacting with Cloud Spanner's admin...
std::shared_ptr< InstanceAdminConnection > MakeInstanceAdminConnection(ConnectionOptions const &options, std::unique_ptr< RetryPolicy > retry_policy, std::unique_ptr< BackoffPolicy > backoff_policy, std::unique_ptr< PollingPolicy > polling_policy)
Returns an InstanceAdminConnection object that can be used for interacting with Cloud Spanner's admin...
Wrap the arguments for CreateInstance().
Definition: instance_admin_connection.h:97
google::spanner::admin::instance::v1::CreateInstanceRequest request
Definition: instance_admin_connection.h:98
Wrap the arguments for DeleteInstance().
Definition: instance_admin_connection.h:107
std::string instance_name
Definition: instance_admin_connection.h:108
Wrap the arguments for GetIamPolicy().
Definition: instance_admin_connection.h:146
std::string instance_name
Definition: instance_admin_connection.h:147
Wrap the arguments for GetInstanceConfig().
Definition: instance_admin_connection.h:112
std::string instance_config_name
Definition: instance_admin_connection.h:113
Wrap the arguments for GetInstance().
Definition: instance_admin_connection.h:90
std::string instance_name
The full name of the instance in projects/<project-id>/instances/<instance-id> format.
Definition: instance_admin_connection.h:93
Wrap the arguments for ListInstanceConfigs().
Definition: instance_admin_connection.h:117
std::string project_id
Definition: instance_admin_connection.h:118
Wrap the arguments for ListInstances().
Definition: instance_admin_connection.h:124
std::string filter
A filtering expression to restrict the set of instances included in the response.
Definition: instance_admin_connection.h:142
std::string project_id
Query the instances in this project.
Definition: instance_admin_connection.h:130
Wrap the arguments for SetIamPolicy().
Definition: instance_admin_connection.h:151
std::string instance_name
Definition: instance_admin_connection.h:152
google::iam::v1::Policy policy
Definition: instance_admin_connection.h:153
Wrap the arguments for TestIamPermissions().
Definition: instance_admin_connection.h:157
std::vector< std::string > permissions
Definition: instance_admin_connection.h:159
std::string instance_name
Definition: instance_admin_connection.h:158
Wrap the arguments for UpdateInstance().
Definition: instance_admin_connection.h:102
google::spanner::admin::instance::v1::UpdateInstanceRequest request
Definition: instance_admin_connection.h:103
#define GOOGLE_CLOUD_CPP_SPANNER_ADMIN_API_DEPRECATED(name)
Definition: version.h:23