serviceusage.proto 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787
  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. // 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.api.serviceusage.v1beta1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/serviceusage/v1beta1/resources.proto";
  20. import "google/longrunning/operations.proto";
  21. import "google/protobuf/field_mask.proto";
  22. option csharp_namespace = "Google.Api.ServiceUsage.V1Beta1";
  23. option go_package = "google.golang.org/genproto/googleapis/api/serviceusage/v1beta1;serviceusage";
  24. option java_multiple_files = true;
  25. option java_outer_classname = "ServiceUsageProto";
  26. option java_package = "com.google.api.serviceusage.v1beta1";
  27. option php_namespace = "Google\\Api\\ServiceUsage\\V1beta1";
  28. option ruby_package = "Google::Api::ServiceUsage::V1beta1";
  29. // [Service Usage API](https://cloud.google.com/service-usage/docs/overview)
  30. service ServiceUsage {
  31. option (google.api.default_host) = "serviceusage.googleapis.com";
  32. option (google.api.oauth_scopes) =
  33. "https://www.googleapis.com/auth/cloud-platform,"
  34. "https://www.googleapis.com/auth/cloud-platform.read-only,"
  35. "https://www.googleapis.com/auth/service.management";
  36. // Enables a service so that it can be used with a project.
  37. //
  38. // Operation response type: `google.protobuf.Empty`
  39. rpc EnableService(EnableServiceRequest) returns (google.longrunning.Operation) {
  40. option deprecated = true;
  41. option (google.api.http) = {
  42. post: "/v1beta1/{name=*/*/services/*}:enable"
  43. body: "*"
  44. };
  45. option (google.longrunning.operation_info) = {
  46. response_type: "google.protobuf.Empty"
  47. metadata_type: "OperationMetadata"
  48. };
  49. }
  50. // Disables a service so that it can no longer be used with a project.
  51. // This prevents unintended usage that may cause unexpected billing
  52. // charges or security leaks.
  53. //
  54. // It is not valid to call the disable method on a service that is not
  55. // currently enabled. Callers will receive a `FAILED_PRECONDITION` status if
  56. // the target service is not currently enabled.
  57. //
  58. // Operation response type: `google.protobuf.Empty`
  59. rpc DisableService(DisableServiceRequest) returns (google.longrunning.Operation) {
  60. option deprecated = true;
  61. option (google.api.http) = {
  62. post: "/v1beta1/{name=*/*/services/*}:disable"
  63. body: "*"
  64. };
  65. option (google.longrunning.operation_info) = {
  66. response_type: "google.protobuf.Empty"
  67. metadata_type: "OperationMetadata"
  68. };
  69. }
  70. // Returns the service configuration and enabled state for a given service.
  71. rpc GetService(GetServiceRequest) returns (Service) {
  72. option deprecated = true;
  73. option (google.api.http) = {
  74. get: "/v1beta1/{name=*/*/services/*}"
  75. };
  76. }
  77. // Lists all services available to the specified project, and the current
  78. // state of those services with respect to the project. The list includes
  79. // all public services, all services for which the calling user has the
  80. // `servicemanagement.services.bind` permission, and all services that have
  81. // already been enabled on the project. The list can be filtered to
  82. // only include services in a specific state, for example to only include
  83. // services enabled on the project.
  84. rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
  85. option deprecated = true;
  86. option (google.api.http) = {
  87. get: "/v1beta1/{parent=*/*}/services"
  88. };
  89. }
  90. // Enables multiple services on a project. The operation is atomic: if
  91. // enabling any service fails, then the entire batch fails, and no state
  92. // changes occur.
  93. //
  94. // Operation response type: `google.protobuf.Empty`
  95. rpc BatchEnableServices(BatchEnableServicesRequest) returns (google.longrunning.Operation) {
  96. option deprecated = true;
  97. option (google.api.http) = {
  98. post: "/v1beta1/{parent=*/*}/services:batchEnable"
  99. body: "*"
  100. };
  101. option (google.longrunning.operation_info) = {
  102. response_type: "google.protobuf.Empty"
  103. metadata_type: "OperationMetadata"
  104. };
  105. }
  106. // Retrieves a summary of all quota information visible to the service
  107. // consumer, organized by service metric. Each metric includes information
  108. // about all of its defined limits. Each limit includes the limit
  109. // configuration (quota unit, preciseness, default value), the current
  110. // effective limit value, and all of the overrides applied to the limit.
  111. rpc ListConsumerQuotaMetrics(ListConsumerQuotaMetricsRequest) returns (ListConsumerQuotaMetricsResponse) {
  112. option (google.api.http) = {
  113. get: "/v1beta1/{parent=*/*/services/*}/consumerQuotaMetrics"
  114. };
  115. }
  116. // Retrieves a summary of quota information for a specific quota metric
  117. rpc GetConsumerQuotaMetric(GetConsumerQuotaMetricRequest) returns (ConsumerQuotaMetric) {
  118. option (google.api.http) = {
  119. get: "/v1beta1/{name=*/*/services/*/consumerQuotaMetrics/*}"
  120. };
  121. }
  122. // Retrieves a summary of quota information for a specific quota limit.
  123. rpc GetConsumerQuotaLimit(GetConsumerQuotaLimitRequest) returns (ConsumerQuotaLimit) {
  124. option (google.api.http) = {
  125. get: "/v1beta1/{name=*/*/services/*/consumerQuotaMetrics/*/limits/*}"
  126. };
  127. }
  128. // Creates an admin override.
  129. // An admin override is applied by an administrator of a parent folder or
  130. // parent organization of the consumer receiving the override. An admin
  131. // override is intended to limit the amount of quota the consumer can use out
  132. // of the total quota pool allocated to all children of the folder or
  133. // organization.
  134. rpc CreateAdminOverride(CreateAdminOverrideRequest) returns (google.longrunning.Operation) {
  135. option (google.api.http) = {
  136. post: "/v1beta1/{parent=*/*/services/*/consumerQuotaMetrics/*/limits/*}/adminOverrides"
  137. body: "override"
  138. };
  139. option (google.longrunning.operation_info) = {
  140. response_type: "QuotaOverride"
  141. metadata_type: "OperationMetadata"
  142. };
  143. }
  144. // Updates an admin override.
  145. rpc UpdateAdminOverride(UpdateAdminOverrideRequest) returns (google.longrunning.Operation) {
  146. option (google.api.http) = {
  147. patch: "/v1beta1/{name=*/*/services/*/consumerQuotaMetrics/*/limits/*/adminOverrides/*}"
  148. body: "override"
  149. };
  150. option (google.longrunning.operation_info) = {
  151. response_type: "QuotaOverride"
  152. metadata_type: "OperationMetadata"
  153. };
  154. }
  155. // Deletes an admin override.
  156. rpc DeleteAdminOverride(DeleteAdminOverrideRequest) returns (google.longrunning.Operation) {
  157. option (google.api.http) = {
  158. delete: "/v1beta1/{name=*/*/services/*/consumerQuotaMetrics/*/limits/*/adminOverrides/*}"
  159. };
  160. option (google.longrunning.operation_info) = {
  161. response_type: "google.protobuf.Empty"
  162. metadata_type: "OperationMetadata"
  163. };
  164. }
  165. // Lists all admin overrides on this limit.
  166. rpc ListAdminOverrides(ListAdminOverridesRequest) returns (ListAdminOverridesResponse) {
  167. option (google.api.http) = {
  168. get: "/v1beta1/{parent=*/*/services/*/consumerQuotaMetrics/*/limits/*}/adminOverrides"
  169. };
  170. }
  171. // Creates or updates multiple admin overrides atomically, all on the
  172. // same consumer, but on many different metrics or limits.
  173. // The name field in the quota override message should not be set.
  174. rpc ImportAdminOverrides(ImportAdminOverridesRequest) returns (google.longrunning.Operation) {
  175. option (google.api.http) = {
  176. post: "/v1beta1/{parent=*/*/services/*}/consumerQuotaMetrics:importAdminOverrides"
  177. body: "*"
  178. };
  179. option (google.longrunning.operation_info) = {
  180. response_type: "ImportAdminOverridesResponse"
  181. metadata_type: "ImportAdminOverridesMetadata"
  182. };
  183. }
  184. // Creates a consumer override.
  185. // A consumer override is applied to the consumer on its own authority to
  186. // limit its own quota usage. Consumer overrides cannot be used to grant more
  187. // quota than would be allowed by admin overrides, producer overrides, or the
  188. // default limit of the service.
  189. rpc CreateConsumerOverride(CreateConsumerOverrideRequest) returns (google.longrunning.Operation) {
  190. option (google.api.http) = {
  191. post: "/v1beta1/{parent=*/*/services/*/consumerQuotaMetrics/*/limits/*}/consumerOverrides"
  192. body: "override"
  193. };
  194. option (google.longrunning.operation_info) = {
  195. response_type: "QuotaOverride"
  196. metadata_type: "OperationMetadata"
  197. };
  198. }
  199. // Updates a consumer override.
  200. rpc UpdateConsumerOverride(UpdateConsumerOverrideRequest) returns (google.longrunning.Operation) {
  201. option (google.api.http) = {
  202. patch: "/v1beta1/{name=*/*/services/*/consumerQuotaMetrics/*/limits/*/consumerOverrides/*}"
  203. body: "override"
  204. };
  205. option (google.longrunning.operation_info) = {
  206. response_type: "QuotaOverride"
  207. metadata_type: "OperationMetadata"
  208. };
  209. }
  210. // Deletes a consumer override.
  211. rpc DeleteConsumerOverride(DeleteConsumerOverrideRequest) returns (google.longrunning.Operation) {
  212. option (google.api.http) = {
  213. delete: "/v1beta1/{name=*/*/services/*/consumerQuotaMetrics/*/limits/*/consumerOverrides/*}"
  214. };
  215. option (google.longrunning.operation_info) = {
  216. response_type: "google.protobuf.Empty"
  217. metadata_type: "OperationMetadata"
  218. };
  219. }
  220. // Lists all consumer overrides on this limit.
  221. rpc ListConsumerOverrides(ListConsumerOverridesRequest) returns (ListConsumerOverridesResponse) {
  222. option (google.api.http) = {
  223. get: "/v1beta1/{parent=*/*/services/*/consumerQuotaMetrics/*/limits/*}/consumerOverrides"
  224. };
  225. }
  226. // Creates or updates multiple consumer overrides atomically, all on the
  227. // same consumer, but on many different metrics or limits.
  228. // The name field in the quota override message should not be set.
  229. rpc ImportConsumerOverrides(ImportConsumerOverridesRequest) returns (google.longrunning.Operation) {
  230. option (google.api.http) = {
  231. post: "/v1beta1/{parent=*/*/services/*}/consumerQuotaMetrics:importConsumerOverrides"
  232. body: "*"
  233. };
  234. option (google.longrunning.operation_info) = {
  235. response_type: "ImportConsumerOverridesResponse"
  236. metadata_type: "ImportConsumerOverridesMetadata"
  237. };
  238. }
  239. // Generates service identity for service.
  240. rpc GenerateServiceIdentity(GenerateServiceIdentityRequest) returns (google.longrunning.Operation) {
  241. option (google.api.http) = {
  242. post: "/v1beta1/{parent=*/*/services/*}:generateServiceIdentity"
  243. };
  244. option (google.longrunning.operation_info) = {
  245. response_type: "ServiceIdentity"
  246. metadata_type: "google.protobuf.Empty"
  247. };
  248. }
  249. }
  250. // Request message for the `EnableService` method.
  251. message EnableServiceRequest {
  252. // Name of the consumer and service to enable the service on.
  253. //
  254. // The `EnableService` and `DisableService` methods currently only support
  255. // projects.
  256. //
  257. // Enabling a service requires that the service is public or is shared with
  258. // the user enabling the service.
  259. //
  260. // An example name would be:
  261. // `projects/123/services/serviceusage.googleapis.com`
  262. // where `123` is the project number (not project ID).
  263. string name = 1;
  264. }
  265. // Request message for the `DisableService` method.
  266. message DisableServiceRequest {
  267. // Name of the consumer and service to disable the service on.
  268. //
  269. // The enable and disable methods currently only support projects.
  270. //
  271. // An example name would be:
  272. // `projects/123/services/serviceusage.googleapis.com`
  273. // where `123` is the project number (not project ID).
  274. string name = 1;
  275. }
  276. // Request message for the `GetService` method.
  277. message GetServiceRequest {
  278. // Name of the consumer and service to get the `ConsumerState` for.
  279. //
  280. // An example name would be:
  281. // `projects/123/services/serviceusage.googleapis.com`
  282. // where `123` is the project number (not project ID).
  283. string name = 1;
  284. }
  285. // Request message for the `ListServices` method.
  286. message ListServicesRequest {
  287. // Parent to search for services on.
  288. //
  289. // An example name would be:
  290. // `projects/123`
  291. // where `123` is the project number (not project ID).
  292. string parent = 1;
  293. // Requested size of the next page of data.
  294. // Requested page size cannot exceed 200.
  295. // If not set, the default page size is 50.
  296. int32 page_size = 2;
  297. // Token identifying which result to start with, which is returned by a
  298. // previous list call.
  299. string page_token = 3;
  300. // Only list services that conform to the given filter.
  301. // The allowed filter strings are `state:ENABLED` and `state:DISABLED`.
  302. string filter = 4;
  303. }
  304. // Response message for the `ListServices` method.
  305. message ListServicesResponse {
  306. // The available services for the requested project.
  307. repeated Service services = 1;
  308. // Token that can be passed to `ListServices` to resume a paginated
  309. // query.
  310. string next_page_token = 2;
  311. }
  312. // Request message for the `BatchEnableServices` method.
  313. message BatchEnableServicesRequest {
  314. // Parent to enable services on.
  315. //
  316. // An example name would be:
  317. // `projects/123`
  318. // where `123` is the project number (not project ID).
  319. //
  320. // The `BatchEnableServices` method currently only supports projects.
  321. string parent = 1;
  322. // The identifiers of the services to enable on the project.
  323. //
  324. // A valid identifier would be:
  325. // serviceusage.googleapis.com
  326. //
  327. // Enabling services requires that each service is public or is shared with
  328. // the user enabling the service.
  329. //
  330. // Two or more services must be specified. To enable a single service,
  331. // use the `EnableService` method instead.
  332. //
  333. // A single request can enable a maximum of 20 services at a time. If more
  334. // than 20 services are specified, the request will fail, and no state changes
  335. // will occur.
  336. repeated string service_ids = 2;
  337. }
  338. // Request message for ListConsumerQuotaMetrics
  339. message ListConsumerQuotaMetricsRequest {
  340. // Parent of the quotas resource.
  341. //
  342. // Some example names would be:
  343. // `projects/123/services/serviceconsumermanagement.googleapis.com`
  344. // `folders/345/services/serviceconsumermanagement.googleapis.com`
  345. // `organizations/456/services/serviceconsumermanagement.googleapis.com`
  346. string parent = 1;
  347. // Requested size of the next page of data.
  348. int32 page_size = 2;
  349. // Token identifying which result to start with; returned by a previous list
  350. // call.
  351. string page_token = 3;
  352. // Specifies the level of detail for quota information in the response.
  353. QuotaView view = 4;
  354. }
  355. // Response message for ListConsumerQuotaMetrics
  356. message ListConsumerQuotaMetricsResponse {
  357. // Quota settings for the consumer, organized by quota metric.
  358. repeated ConsumerQuotaMetric metrics = 1;
  359. // Token identifying which result to start with; returned by a previous list
  360. // call.
  361. string next_page_token = 2;
  362. }
  363. // Request message for GetConsumerQuotaMetric
  364. message GetConsumerQuotaMetricRequest {
  365. // The resource name of the quota limit.
  366. //
  367. // An example name would be:
  368. // `projects/123/services/serviceusage.googleapis.com/quotas/metrics/serviceusage.googleapis.com%2Fmutate_requests`
  369. string name = 1;
  370. // Specifies the level of detail for quota information in the response.
  371. QuotaView view = 2;
  372. }
  373. // Request message for GetConsumerQuotaLimit
  374. message GetConsumerQuotaLimitRequest {
  375. // The resource name of the quota limit.
  376. //
  377. // Use the quota limit resource name returned by previous
  378. // ListConsumerQuotaMetrics and GetConsumerQuotaMetric API calls.
  379. string name = 1;
  380. // Specifies the level of detail for quota information in the response.
  381. QuotaView view = 2;
  382. }
  383. // Request message for CreateAdminOverride.
  384. message CreateAdminOverrideRequest {
  385. // The resource name of the parent quota limit, returned by a
  386. // ListConsumerQuotaMetrics or GetConsumerQuotaMetric call.
  387. //
  388. // An example name would be:
  389. // `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`
  390. string parent = 1;
  391. // The admin override to create.
  392. QuotaOverride override = 2;
  393. // Whether to force the creation of the quota override.
  394. // Setting the force parameter to 'true' ignores all quota safety checks that
  395. // would fail the request. QuotaSafetyCheck lists all such validations.
  396. bool force = 3;
  397. // The list of quota safety checks to ignore before the override mutation.
  398. // Unlike 'force' field that ignores all the quota safety checks, the
  399. // 'force_only' field ignores only the specified checks; other checks are
  400. // still enforced. The 'force' and 'force_only' fields cannot both be set.
  401. repeated QuotaSafetyCheck force_only = 4;
  402. }
  403. // Request message for UpdateAdminOverride.
  404. message UpdateAdminOverrideRequest {
  405. // The resource name of the override to update.
  406. //
  407. // An example name would be:
  408. // `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminOverrides/4a3f2c1d`
  409. string name = 1;
  410. // The new override.
  411. // Only the override_value is updated; all other fields are ignored.
  412. QuotaOverride override = 2;
  413. // Whether to force the update of the quota override.
  414. // Setting the force parameter to 'true' ignores all quota safety checks that
  415. // would fail the request. QuotaSafetyCheck lists all such validations.
  416. bool force = 3;
  417. // Update only the specified fields of the override.
  418. // If unset, all fields will be updated.
  419. google.protobuf.FieldMask update_mask = 4;
  420. // The list of quota safety checks to ignore before the override mutation.
  421. // Unlike 'force' field that ignores all the quota safety checks, the
  422. // 'force_only' field ignores only the specified checks; other checks are
  423. // still enforced. The 'force' and 'force_only' fields cannot both be set.
  424. repeated QuotaSafetyCheck force_only = 5;
  425. }
  426. // Request message for DeleteAdminOverride.
  427. message DeleteAdminOverrideRequest {
  428. // The resource name of the override to delete.
  429. //
  430. // An example name would be:
  431. // `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminOverrides/4a3f2c1d`
  432. string name = 1;
  433. // Whether to force the deletion of the quota override.
  434. // Setting the force parameter to 'true' ignores all quota safety checks that
  435. // would fail the request. QuotaSafetyCheck lists all such validations.
  436. bool force = 2;
  437. // The list of quota safety checks to ignore before the override mutation.
  438. // Unlike 'force' field that ignores all the quota safety checks, the
  439. // 'force_only' field ignores only the specified checks; other checks are
  440. // still enforced. The 'force' and 'force_only' fields cannot both be set.
  441. repeated QuotaSafetyCheck force_only = 3;
  442. }
  443. // Request message for ListAdminOverrides
  444. message ListAdminOverridesRequest {
  445. // The resource name of the parent quota limit, returned by a
  446. // ListConsumerQuotaMetrics or GetConsumerQuotaMetric call.
  447. //
  448. // An example name would be:
  449. // `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`
  450. string parent = 1;
  451. // Requested size of the next page of data.
  452. int32 page_size = 2;
  453. // Token identifying which result to start with; returned by a previous list
  454. // call.
  455. string page_token = 3;
  456. }
  457. // Response message for ListAdminOverrides.
  458. message ListAdminOverridesResponse {
  459. // Admin overrides on this limit.
  460. repeated QuotaOverride overrides = 1;
  461. // Token identifying which result to start with; returned by a previous list
  462. // call.
  463. string next_page_token = 2;
  464. }
  465. // Response message for BatchCreateAdminOverrides
  466. message BatchCreateAdminOverridesResponse {
  467. // The overrides that were created.
  468. repeated QuotaOverride overrides = 1;
  469. }
  470. // Request message for ImportAdminOverrides
  471. message ImportAdminOverridesRequest {
  472. // The resource name of the consumer.
  473. //
  474. // An example name would be:
  475. // `projects/123/services/compute.googleapis.com`
  476. string parent = 1;
  477. // Source of import data
  478. oneof source {
  479. // The import data is specified in the request message itself
  480. OverrideInlineSource inline_source = 2;
  481. }
  482. // Whether to force the creation of the quota overrides.
  483. // Setting the force parameter to 'true' ignores all quota safety checks that
  484. // would fail the request. QuotaSafetyCheck lists all such validations.
  485. bool force = 3;
  486. // The list of quota safety checks to ignore before the override mutation.
  487. // Unlike 'force' field that ignores all the quota safety checks, the
  488. // 'force_only' field ignores only the specified checks; other checks are
  489. // still enforced. The 'force' and 'force_only' fields cannot both be set.
  490. repeated QuotaSafetyCheck force_only = 4;
  491. }
  492. // Response message for ImportAdminOverrides
  493. message ImportAdminOverridesResponse {
  494. // The overrides that were created from the imported data.
  495. repeated QuotaOverride overrides = 1;
  496. }
  497. // Metadata message that provides information such as progress,
  498. // partial failures, and similar information on each GetOperation call
  499. // of LRO returned by ImportAdminOverrides.
  500. message ImportAdminOverridesMetadata {
  501. }
  502. // Request message for CreateConsumerOverride.
  503. message CreateConsumerOverrideRequest {
  504. // The resource name of the parent quota limit, returned by a
  505. // ListConsumerQuotaMetrics or GetConsumerQuotaMetric call.
  506. //
  507. // An example name would be:
  508. // `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`
  509. string parent = 1;
  510. // The override to create.
  511. QuotaOverride override = 2;
  512. // Whether to force the creation of the quota override.
  513. // Setting the force parameter to 'true' ignores all quota safety checks that
  514. // would fail the request. QuotaSafetyCheck lists all such validations.
  515. bool force = 3;
  516. // The list of quota safety checks to ignore before the override mutation.
  517. // Unlike 'force' field that ignores all the quota safety checks, the
  518. // 'force_only' field ignores only the specified checks; other checks are
  519. // still enforced. The 'force' and 'force_only' fields cannot both be set.
  520. repeated QuotaSafetyCheck force_only = 4;
  521. }
  522. // Request message for UpdateConsumerOverride.
  523. message UpdateConsumerOverrideRequest {
  524. // The resource name of the override to update.
  525. //
  526. // An example name would be:
  527. // `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/consumerOverrides/4a3f2c1d`
  528. string name = 1;
  529. // The new override.
  530. // Only the override_value is updated; all other fields are ignored.
  531. QuotaOverride override = 2;
  532. // Whether to force the update of the quota override.
  533. // Setting the force parameter to 'true' ignores all quota safety checks that
  534. // would fail the request. QuotaSafetyCheck lists all such validations.
  535. bool force = 3;
  536. // Update only the specified fields of the override.
  537. // If unset, all fields will be updated.
  538. google.protobuf.FieldMask update_mask = 4;
  539. // The list of quota safety checks to ignore before the override mutation.
  540. // Unlike 'force' field that ignores all the quota safety checks, the
  541. // 'force_only' field ignores only the specified checks; other checks are
  542. // still enforced. The 'force' and 'force_only' fields cannot both be set.
  543. repeated QuotaSafetyCheck force_only = 5;
  544. }
  545. // Request message for DeleteConsumerOverride.
  546. message DeleteConsumerOverrideRequest {
  547. // The resource name of the override to delete.
  548. //
  549. // An example name would be:
  550. // `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/consumerOverrides/4a3f2c1d`
  551. string name = 1;
  552. // Whether to force the deletion of the quota override.
  553. // Setting the force parameter to 'true' ignores all quota safety checks that
  554. // would fail the request. QuotaSafetyCheck lists all such validations.
  555. bool force = 2;
  556. // The list of quota safety checks to ignore before the override mutation.
  557. // Unlike 'force' field that ignores all the quota safety checks, the
  558. // 'force_only' field ignores only the specified checks; other checks are
  559. // still enforced. The 'force' and 'force_only' fields cannot both be set.
  560. repeated QuotaSafetyCheck force_only = 3;
  561. }
  562. // Request message for ListConsumerOverrides
  563. message ListConsumerOverridesRequest {
  564. // The resource name of the parent quota limit, returned by a
  565. // ListConsumerQuotaMetrics or GetConsumerQuotaMetric call.
  566. //
  567. // An example name would be:
  568. // `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`
  569. string parent = 1;
  570. // Requested size of the next page of data.
  571. int32 page_size = 2;
  572. // Token identifying which result to start with; returned by a previous list
  573. // call.
  574. string page_token = 3;
  575. }
  576. // Response message for ListConsumerOverrides.
  577. message ListConsumerOverridesResponse {
  578. // Consumer overrides on this limit.
  579. repeated QuotaOverride overrides = 1;
  580. // Token identifying which result to start with; returned by a previous list
  581. // call.
  582. string next_page_token = 2;
  583. }
  584. // Response message for BatchCreateConsumerOverrides
  585. message BatchCreateConsumerOverridesResponse {
  586. // The overrides that were created.
  587. repeated QuotaOverride overrides = 1;
  588. }
  589. // Request message for ImportConsumerOverrides
  590. message ImportConsumerOverridesRequest {
  591. // The resource name of the consumer.
  592. //
  593. // An example name would be:
  594. // `projects/123/services/compute.googleapis.com`
  595. string parent = 1;
  596. // Source of import data
  597. oneof source {
  598. // The import data is specified in the request message itself
  599. OverrideInlineSource inline_source = 2;
  600. }
  601. // Whether to force the creation of the quota overrides.
  602. // Setting the force parameter to 'true' ignores all quota safety checks that
  603. // would fail the request. QuotaSafetyCheck lists all such validations.
  604. bool force = 3;
  605. // The list of quota safety checks to ignore before the override mutation.
  606. // Unlike 'force' field that ignores all the quota safety checks, the
  607. // 'force_only' field ignores only the specified checks; other checks are
  608. // still enforced. The 'force' and 'force_only' fields cannot both be set.
  609. repeated QuotaSafetyCheck force_only = 4;
  610. }
  611. // Response message for ImportConsumerOverrides
  612. message ImportConsumerOverridesResponse {
  613. // The overrides that were created from the imported data.
  614. repeated QuotaOverride overrides = 1;
  615. }
  616. // Metadata message that provides information such as progress,
  617. // partial failures, and similar information on each GetOperation call
  618. // of LRO returned by ImportConsumerOverrides.
  619. message ImportConsumerOverridesMetadata {
  620. }
  621. // Response message for ImportAdminQuotaPolicies
  622. message ImportAdminQuotaPoliciesResponse {
  623. // The policies that were created from the imported data.
  624. repeated AdminQuotaPolicy policies = 1;
  625. }
  626. // Metadata message that provides information such as progress,
  627. // partial failures, and similar information on each GetOperation call
  628. // of LRO returned by ImportAdminQuotaPolicies.
  629. message ImportAdminQuotaPoliciesMetadata {
  630. }
  631. // Metadata message that provides information such as progress,
  632. // partial failures, and similar information on each GetOperation call
  633. // of LRO returned by CreateAdminQuotaPolicy.
  634. message CreateAdminQuotaPolicyMetadata {
  635. }
  636. // Metadata message that provides information such as progress,
  637. // partial failures, and similar information on each GetOperation call
  638. // of LRO returned by UpdateAdminQuotaPolicy.
  639. message UpdateAdminQuotaPolicyMetadata {
  640. }
  641. // Metadata message that provides information such as progress,
  642. // partial failures, and similar information on each GetOperation call
  643. // of LRO returned by DeleteAdminQuotaPolicy.
  644. message DeleteAdminQuotaPolicyMetadata {
  645. }
  646. // Request message for generating service identity.
  647. message GenerateServiceIdentityRequest {
  648. // Name of the consumer and service to generate an identity for.
  649. //
  650. // The `GenerateServiceIdentity` methods currently only support projects.
  651. //
  652. // An example name would be:
  653. // `projects/123/services/example.googleapis.com` where `123` is the
  654. // project number.
  655. string parent = 1;
  656. }
  657. // Response message for getting service identity.
  658. message GetServiceIdentityResponse {
  659. // Enum for service identity state.
  660. enum IdentityState {
  661. // Default service identity state. This value is used if the state is
  662. // omitted.
  663. IDENTITY_STATE_UNSPECIFIED = 0;
  664. // Service identity has been created and can be used.
  665. ACTIVE = 1;
  666. }
  667. // Service identity that service producer can use to access consumer
  668. // resources. If exists is true, it contains email and unique_id. If exists is
  669. // false, it contains pre-constructed email and empty unique_id.
  670. ServiceIdentity identity = 1;
  671. // Service identity state.
  672. IdentityState state = 2;
  673. }
  674. // Metadata for the `GetServiceIdentity` method.
  675. message GetServiceIdentityMetadata {
  676. }