serviceusage.proto 29 KB

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