bigtable_instance_admin.proto 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574
  1. // Copyright 2020 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. // http://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. syntax = "proto3";
  15. package google.bigtable.admin.v2;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/bigtable/admin/v2/instance.proto";
  21. import "google/iam/v1/iam_policy.proto";
  22. import "google/iam/v1/policy.proto";
  23. import "google/longrunning/operations.proto";
  24. import "google/protobuf/empty.proto";
  25. import "google/protobuf/field_mask.proto";
  26. import "google/protobuf/timestamp.proto";
  27. option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2";
  28. option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin";
  29. option java_multiple_files = true;
  30. option java_outer_classname = "BigtableInstanceAdminProto";
  31. option java_package = "com.google.bigtable.admin.v2";
  32. option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2";
  33. option ruby_package = "Google::Cloud::Bigtable::Admin::V2";
  34. // Service for creating, configuring, and deleting Cloud Bigtable Instances and
  35. // Clusters. Provides access to the Instance and Cluster schemas only, not the
  36. // tables' metadata or data stored in those tables.
  37. service BigtableInstanceAdmin {
  38. option (google.api.default_host) = "bigtableadmin.googleapis.com";
  39. option (google.api.oauth_scopes) =
  40. "https://www.googleapis.com/auth/bigtable.admin,"
  41. "https://www.googleapis.com/auth/bigtable.admin.cluster,"
  42. "https://www.googleapis.com/auth/bigtable.admin.instance,"
  43. "https://www.googleapis.com/auth/cloud-bigtable.admin,"
  44. "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster,"
  45. "https://www.googleapis.com/auth/cloud-platform,"
  46. "https://www.googleapis.com/auth/cloud-platform.read-only";
  47. // Create an instance within a project.
  48. rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) {
  49. option (google.api.http) = {
  50. post: "/v2/{parent=projects/*}/instances"
  51. body: "*"
  52. };
  53. option (google.api.method_signature) = "parent,instance_id,instance,clusters";
  54. option (google.longrunning.operation_info) = {
  55. response_type: "Instance"
  56. metadata_type: "CreateInstanceMetadata"
  57. };
  58. }
  59. // Gets information about an instance.
  60. rpc GetInstance(GetInstanceRequest) returns (Instance) {
  61. option (google.api.http) = {
  62. get: "/v2/{name=projects/*/instances/*}"
  63. };
  64. option (google.api.method_signature) = "name";
  65. }
  66. // Lists information about instances in a project.
  67. rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
  68. option (google.api.http) = {
  69. get: "/v2/{parent=projects/*}/instances"
  70. };
  71. option (google.api.method_signature) = "parent";
  72. }
  73. // Updates an instance within a project. This method updates only the display
  74. // name and type for an Instance. To update other Instance properties, such as
  75. // labels, use PartialUpdateInstance.
  76. rpc UpdateInstance(Instance) returns (Instance) {
  77. option (google.api.http) = {
  78. put: "/v2/{name=projects/*/instances/*}"
  79. body: "*"
  80. };
  81. }
  82. // Partially updates an instance within a project. This method can modify all
  83. // fields of an Instance and is the preferred way to update an Instance.
  84. rpc PartialUpdateInstance(PartialUpdateInstanceRequest) returns (google.longrunning.Operation) {
  85. option (google.api.http) = {
  86. patch: "/v2/{instance.name=projects/*/instances/*}"
  87. body: "instance"
  88. };
  89. option (google.api.method_signature) = "instance,update_mask";
  90. option (google.longrunning.operation_info) = {
  91. response_type: "Instance"
  92. metadata_type: "UpdateInstanceMetadata"
  93. };
  94. }
  95. // Delete an instance from a project.
  96. rpc DeleteInstance(DeleteInstanceRequest) returns (google.protobuf.Empty) {
  97. option (google.api.http) = {
  98. delete: "/v2/{name=projects/*/instances/*}"
  99. };
  100. option (google.api.method_signature) = "name";
  101. }
  102. // Creates a cluster within an instance.
  103. rpc CreateCluster(CreateClusterRequest) returns (google.longrunning.Operation) {
  104. option (google.api.http) = {
  105. post: "/v2/{parent=projects/*/instances/*}/clusters"
  106. body: "cluster"
  107. };
  108. option (google.api.method_signature) = "parent,cluster_id,cluster";
  109. option (google.longrunning.operation_info) = {
  110. response_type: "Cluster"
  111. metadata_type: "CreateClusterMetadata"
  112. };
  113. }
  114. // Gets information about a cluster.
  115. rpc GetCluster(GetClusterRequest) returns (Cluster) {
  116. option (google.api.http) = {
  117. get: "/v2/{name=projects/*/instances/*/clusters/*}"
  118. };
  119. option (google.api.method_signature) = "name";
  120. }
  121. // Lists information about clusters in an instance.
  122. rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) {
  123. option (google.api.http) = {
  124. get: "/v2/{parent=projects/*/instances/*}/clusters"
  125. };
  126. option (google.api.method_signature) = "parent";
  127. }
  128. // Updates a cluster within an instance.
  129. rpc UpdateCluster(Cluster) returns (google.longrunning.Operation) {
  130. option (google.api.http) = {
  131. put: "/v2/{name=projects/*/instances/*/clusters/*}"
  132. body: "*"
  133. };
  134. option (google.longrunning.operation_info) = {
  135. response_type: "Cluster"
  136. metadata_type: "UpdateClusterMetadata"
  137. };
  138. }
  139. // Deletes a cluster from an instance.
  140. rpc DeleteCluster(DeleteClusterRequest) returns (google.protobuf.Empty) {
  141. option (google.api.http) = {
  142. delete: "/v2/{name=projects/*/instances/*/clusters/*}"
  143. };
  144. option (google.api.method_signature) = "name";
  145. }
  146. // Creates an app profile within an instance.
  147. rpc CreateAppProfile(CreateAppProfileRequest) returns (AppProfile) {
  148. option (google.api.http) = {
  149. post: "/v2/{parent=projects/*/instances/*}/appProfiles"
  150. body: "app_profile"
  151. };
  152. option (google.api.method_signature) = "parent,app_profile_id,app_profile";
  153. }
  154. // Gets information about an app profile.
  155. rpc GetAppProfile(GetAppProfileRequest) returns (AppProfile) {
  156. option (google.api.http) = {
  157. get: "/v2/{name=projects/*/instances/*/appProfiles/*}"
  158. };
  159. option (google.api.method_signature) = "name";
  160. }
  161. // Lists information about app profiles in an instance.
  162. rpc ListAppProfiles(ListAppProfilesRequest) returns (ListAppProfilesResponse) {
  163. option (google.api.http) = {
  164. get: "/v2/{parent=projects/*/instances/*}/appProfiles"
  165. };
  166. option (google.api.method_signature) = "parent";
  167. }
  168. // Updates an app profile within an instance.
  169. rpc UpdateAppProfile(UpdateAppProfileRequest) returns (google.longrunning.Operation) {
  170. option (google.api.http) = {
  171. patch: "/v2/{app_profile.name=projects/*/instances/*/appProfiles/*}"
  172. body: "app_profile"
  173. };
  174. option (google.api.method_signature) = "app_profile,update_mask";
  175. option (google.longrunning.operation_info) = {
  176. response_type: "AppProfile"
  177. metadata_type: "UpdateAppProfileMetadata"
  178. };
  179. }
  180. // Deletes an app profile from an instance.
  181. rpc DeleteAppProfile(DeleteAppProfileRequest) returns (google.protobuf.Empty) {
  182. option (google.api.http) = {
  183. delete: "/v2/{name=projects/*/instances/*/appProfiles/*}"
  184. };
  185. option (google.api.method_signature) = "name";
  186. }
  187. // Gets the access control policy for an instance resource. Returns an empty
  188. // policy if an instance exists but does not have a policy set.
  189. rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
  190. option (google.api.http) = {
  191. post: "/v2/{resource=projects/*/instances/*}:getIamPolicy"
  192. body: "*"
  193. };
  194. option (google.api.method_signature) = "resource";
  195. }
  196. // Sets the access control policy on an instance resource. Replaces any
  197. // existing policy.
  198. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
  199. option (google.api.http) = {
  200. post: "/v2/{resource=projects/*/instances/*}:setIamPolicy"
  201. body: "*"
  202. };
  203. option (google.api.method_signature) = "resource,policy";
  204. }
  205. // Returns permissions that the caller has on the specified instance resource.
  206. rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
  207. option (google.api.http) = {
  208. post: "/v2/{resource=projects/*/instances/*}:testIamPermissions"
  209. body: "*"
  210. };
  211. option (google.api.method_signature) = "resource,permissions";
  212. }
  213. }
  214. // Request message for BigtableInstanceAdmin.CreateInstance.
  215. message CreateInstanceRequest {
  216. // Required. The unique name of the project in which to create the new instance.
  217. // Values are of the form `projects/{project}`.
  218. string parent = 1 [
  219. (google.api.field_behavior) = REQUIRED,
  220. (google.api.resource_reference) = {
  221. type: "cloudresourcemanager.googleapis.com/Project"
  222. }
  223. ];
  224. // Required. The ID to be used when referring to the new instance within its project,
  225. // e.g., just `myinstance` rather than
  226. // `projects/myproject/instances/myinstance`.
  227. string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
  228. // Required. The instance to create.
  229. // Fields marked `OutputOnly` must be left blank.
  230. Instance instance = 3 [(google.api.field_behavior) = REQUIRED];
  231. // Required. The clusters to be created within the instance, mapped by desired
  232. // cluster ID, e.g., just `mycluster` rather than
  233. // `projects/myproject/instances/myinstance/clusters/mycluster`.
  234. // Fields marked `OutputOnly` must be left blank.
  235. // Currently, at most four clusters can be specified.
  236. map<string, Cluster> clusters = 4 [(google.api.field_behavior) = REQUIRED];
  237. }
  238. // Request message for BigtableInstanceAdmin.GetInstance.
  239. message GetInstanceRequest {
  240. // Required. The unique name of the requested instance. Values are of the form
  241. // `projects/{project}/instances/{instance}`.
  242. string name = 1 [
  243. (google.api.field_behavior) = REQUIRED,
  244. (google.api.resource_reference) = {
  245. type: "bigtable.googleapis.com/Instance"
  246. }
  247. ];
  248. }
  249. // Request message for BigtableInstanceAdmin.ListInstances.
  250. message ListInstancesRequest {
  251. // Required. The unique name of the project for which a list of instances is requested.
  252. // Values are of the form `projects/{project}`.
  253. string parent = 1 [
  254. (google.api.field_behavior) = REQUIRED,
  255. (google.api.resource_reference) = {
  256. type: "cloudresourcemanager.googleapis.com/Project"
  257. }
  258. ];
  259. // DEPRECATED: This field is unused and ignored.
  260. string page_token = 2;
  261. }
  262. // Response message for BigtableInstanceAdmin.ListInstances.
  263. message ListInstancesResponse {
  264. // The list of requested instances.
  265. repeated Instance instances = 1;
  266. // Locations from which Instance information could not be retrieved,
  267. // due to an outage or some other transient condition.
  268. // Instances whose Clusters are all in one of the failed locations
  269. // may be missing from `instances`, and Instances with at least one
  270. // Cluster in a failed location may only have partial information returned.
  271. // Values are of the form `projects/<project>/locations/<zone_id>`
  272. repeated string failed_locations = 2;
  273. // DEPRECATED: This field is unused and ignored.
  274. string next_page_token = 3;
  275. }
  276. // Request message for BigtableInstanceAdmin.PartialUpdateInstance.
  277. message PartialUpdateInstanceRequest {
  278. // Required. The Instance which will (partially) replace the current value.
  279. Instance instance = 1 [(google.api.field_behavior) = REQUIRED];
  280. // Required. The subset of Instance fields which should be replaced.
  281. // Must be explicitly set.
  282. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  283. }
  284. // Request message for BigtableInstanceAdmin.DeleteInstance.
  285. message DeleteInstanceRequest {
  286. // Required. The unique name of the instance to be deleted.
  287. // Values are of the form `projects/{project}/instances/{instance}`.
  288. string name = 1 [
  289. (google.api.field_behavior) = REQUIRED,
  290. (google.api.resource_reference) = {
  291. type: "bigtable.googleapis.com/Instance"
  292. }
  293. ];
  294. }
  295. // Request message for BigtableInstanceAdmin.CreateCluster.
  296. message CreateClusterRequest {
  297. // Required. The unique name of the instance in which to create the new cluster.
  298. // Values are of the form
  299. // `projects/{project}/instances/{instance}`.
  300. string parent = 1 [
  301. (google.api.field_behavior) = REQUIRED,
  302. (google.api.resource_reference) = {
  303. type: "bigtable.googleapis.com/Instance"
  304. }
  305. ];
  306. // Required. The ID to be used when referring to the new cluster within its instance,
  307. // e.g., just `mycluster` rather than
  308. // `projects/myproject/instances/myinstance/clusters/mycluster`.
  309. string cluster_id = 2 [(google.api.field_behavior) = REQUIRED];
  310. // Required. The cluster to be created.
  311. // Fields marked `OutputOnly` must be left blank.
  312. Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED];
  313. }
  314. // Request message for BigtableInstanceAdmin.GetCluster.
  315. message GetClusterRequest {
  316. // Required. The unique name of the requested cluster. Values are of the form
  317. // `projects/{project}/instances/{instance}/clusters/{cluster}`.
  318. string name = 1 [
  319. (google.api.field_behavior) = REQUIRED,
  320. (google.api.resource_reference) = {
  321. type: "bigtable.googleapis.com/Cluster"
  322. }
  323. ];
  324. }
  325. // Request message for BigtableInstanceAdmin.ListClusters.
  326. message ListClustersRequest {
  327. // Required. The unique name of the instance for which a list of clusters is requested.
  328. // Values are of the form `projects/{project}/instances/{instance}`.
  329. // Use `{instance} = '-'` to list Clusters for all Instances in a project,
  330. // e.g., `projects/myproject/instances/-`.
  331. string parent = 1 [
  332. (google.api.field_behavior) = REQUIRED,
  333. (google.api.resource_reference) = {
  334. type: "bigtable.googleapis.com/Instance"
  335. }
  336. ];
  337. // DEPRECATED: This field is unused and ignored.
  338. string page_token = 2;
  339. }
  340. // Response message for BigtableInstanceAdmin.ListClusters.
  341. message ListClustersResponse {
  342. // The list of requested clusters.
  343. repeated Cluster clusters = 1;
  344. // Locations from which Cluster information could not be retrieved,
  345. // due to an outage or some other transient condition.
  346. // Clusters from these locations may be missing from `clusters`,
  347. // or may only have partial information returned.
  348. // Values are of the form `projects/<project>/locations/<zone_id>`
  349. repeated string failed_locations = 2;
  350. // DEPRECATED: This field is unused and ignored.
  351. string next_page_token = 3;
  352. }
  353. // Request message for BigtableInstanceAdmin.DeleteCluster.
  354. message DeleteClusterRequest {
  355. // Required. The unique name of the cluster to be deleted. Values are of the form
  356. // `projects/{project}/instances/{instance}/clusters/{cluster}`.
  357. string name = 1 [
  358. (google.api.field_behavior) = REQUIRED,
  359. (google.api.resource_reference) = {
  360. type: "bigtable.googleapis.com/Cluster"
  361. }
  362. ];
  363. }
  364. // The metadata for the Operation returned by CreateInstance.
  365. message CreateInstanceMetadata {
  366. // The request that prompted the initiation of this CreateInstance operation.
  367. CreateInstanceRequest original_request = 1;
  368. // The time at which the original request was received.
  369. google.protobuf.Timestamp request_time = 2;
  370. // The time at which the operation failed or was completed successfully.
  371. google.protobuf.Timestamp finish_time = 3;
  372. }
  373. // The metadata for the Operation returned by UpdateInstance.
  374. message UpdateInstanceMetadata {
  375. // The request that prompted the initiation of this UpdateInstance operation.
  376. PartialUpdateInstanceRequest original_request = 1;
  377. // The time at which the original request was received.
  378. google.protobuf.Timestamp request_time = 2;
  379. // The time at which the operation failed or was completed successfully.
  380. google.protobuf.Timestamp finish_time = 3;
  381. }
  382. // The metadata for the Operation returned by CreateCluster.
  383. message CreateClusterMetadata {
  384. // The request that prompted the initiation of this CreateCluster operation.
  385. CreateClusterRequest original_request = 1;
  386. // The time at which the original request was received.
  387. google.protobuf.Timestamp request_time = 2;
  388. // The time at which the operation failed or was completed successfully.
  389. google.protobuf.Timestamp finish_time = 3;
  390. }
  391. // The metadata for the Operation returned by UpdateCluster.
  392. message UpdateClusterMetadata {
  393. // The request that prompted the initiation of this UpdateCluster operation.
  394. Cluster original_request = 1;
  395. // The time at which the original request was received.
  396. google.protobuf.Timestamp request_time = 2;
  397. // The time at which the operation failed or was completed successfully.
  398. google.protobuf.Timestamp finish_time = 3;
  399. }
  400. // Request message for BigtableInstanceAdmin.CreateAppProfile.
  401. message CreateAppProfileRequest {
  402. // Required. The unique name of the instance in which to create the new app profile.
  403. // Values are of the form
  404. // `projects/{project}/instances/{instance}`.
  405. string parent = 1 [
  406. (google.api.field_behavior) = REQUIRED,
  407. (google.api.resource_reference) = {
  408. type: "bigtable.googleapis.com/Instance"
  409. }
  410. ];
  411. // Required. The ID to be used when referring to the new app profile within its
  412. // instance, e.g., just `myprofile` rather than
  413. // `projects/myproject/instances/myinstance/appProfiles/myprofile`.
  414. string app_profile_id = 2 [(google.api.field_behavior) = REQUIRED];
  415. // Required. The app profile to be created.
  416. // Fields marked `OutputOnly` will be ignored.
  417. AppProfile app_profile = 3 [(google.api.field_behavior) = REQUIRED];
  418. // If true, ignore safety checks when creating the app profile.
  419. bool ignore_warnings = 4;
  420. }
  421. // Request message for BigtableInstanceAdmin.GetAppProfile.
  422. message GetAppProfileRequest {
  423. // Required. The unique name of the requested app profile. Values are of the form
  424. // `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
  425. string name = 1 [
  426. (google.api.field_behavior) = REQUIRED,
  427. (google.api.resource_reference) = {
  428. type: "bigtable.googleapis.com/AppProfile"
  429. }
  430. ];
  431. }
  432. // Request message for BigtableInstanceAdmin.ListAppProfiles.
  433. message ListAppProfilesRequest {
  434. // Required. The unique name of the instance for which a list of app profiles is
  435. // requested. Values are of the form
  436. // `projects/{project}/instances/{instance}`.
  437. // Use `{instance} = '-'` to list AppProfiles for all Instances in a project,
  438. // e.g., `projects/myproject/instances/-`.
  439. string parent = 1 [
  440. (google.api.field_behavior) = REQUIRED,
  441. (google.api.resource_reference) = {
  442. type: "bigtable.googleapis.com/Instance"
  443. }
  444. ];
  445. // Maximum number of results per page.
  446. //
  447. // A page_size of zero lets the server choose the number of items to return.
  448. // A page_size which is strictly positive will return at most that many items.
  449. // A negative page_size will cause an error.
  450. //
  451. // Following the first request, subsequent paginated calls are not required
  452. // to pass a page_size. If a page_size is set in subsequent calls, it must
  453. // match the page_size given in the first request.
  454. int32 page_size = 3;
  455. // The value of `next_page_token` returned by a previous call.
  456. string page_token = 2;
  457. }
  458. // Response message for BigtableInstanceAdmin.ListAppProfiles.
  459. message ListAppProfilesResponse {
  460. // The list of requested app profiles.
  461. repeated AppProfile app_profiles = 1;
  462. // Set if not all app profiles could be returned in a single response.
  463. // Pass this value to `page_token` in another request to get the next
  464. // page of results.
  465. string next_page_token = 2;
  466. // Locations from which AppProfile information could not be retrieved,
  467. // due to an outage or some other transient condition.
  468. // AppProfiles from these locations may be missing from `app_profiles`.
  469. // Values are of the form `projects/<project>/locations/<zone_id>`
  470. repeated string failed_locations = 3;
  471. }
  472. // Request message for BigtableInstanceAdmin.UpdateAppProfile.
  473. message UpdateAppProfileRequest {
  474. // Required. The app profile which will (partially) replace the current value.
  475. AppProfile app_profile = 1 [(google.api.field_behavior) = REQUIRED];
  476. // Required. The subset of app profile fields which should be replaced.
  477. // If unset, all fields will be replaced.
  478. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  479. // If true, ignore safety checks when updating the app profile.
  480. bool ignore_warnings = 3;
  481. }
  482. // Request message for BigtableInstanceAdmin.DeleteAppProfile.
  483. message DeleteAppProfileRequest {
  484. // Required. The unique name of the app profile to be deleted. Values are of the form
  485. // `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
  486. string name = 1 [
  487. (google.api.field_behavior) = REQUIRED,
  488. (google.api.resource_reference) = {
  489. type: "bigtable.googleapis.com/AppProfile"
  490. }
  491. ];
  492. // Required. If true, ignore safety checks when deleting the app profile.
  493. bool ignore_warnings = 2 [(google.api.field_behavior) = REQUIRED];
  494. }
  495. // The metadata for the Operation returned by UpdateAppProfile.
  496. message UpdateAppProfileMetadata {
  497. }