logging_config.proto 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567
  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.logging.v2;
  16. import "google/api/client.proto";
  17. import "google/api/field_behavior.proto";
  18. import "google/api/resource.proto";
  19. import "google/protobuf/duration.proto";
  20. import "google/protobuf/empty.proto";
  21. import "google/protobuf/field_mask.proto";
  22. import "google/protobuf/timestamp.proto";
  23. import "google/api/annotations.proto";
  24. option cc_enable_arenas = true;
  25. option csharp_namespace = "Google.Cloud.Logging.V2";
  26. option go_package = "google.golang.org/genproto/googleapis/logging/v2;logging";
  27. option java_multiple_files = true;
  28. option java_outer_classname = "LoggingConfigProto";
  29. option java_package = "com.google.logging.v2";
  30. option php_namespace = "Google\\Cloud\\Logging\\V2";
  31. option ruby_package = "Google::Cloud::Logging::V2";
  32. option (google.api.resource_definition) = {
  33. type: "logging.googleapis.com/OrganizationLocation"
  34. pattern: "organizations/{organization}/locations/{location}"
  35. };
  36. option (google.api.resource_definition) = {
  37. type: "logging.googleapis.com/FolderLocation"
  38. pattern: "folders/{folder}/locations/{location}"
  39. };
  40. option (google.api.resource_definition) = {
  41. type: "logging.googleapis.com/BillingAccountLocation"
  42. pattern: "billingAccounts/{billing_account}/locations/{location}"
  43. };
  44. // Service for configuring sinks used to route log entries.
  45. service ConfigServiceV2 {
  46. option (google.api.default_host) = "logging.googleapis.com";
  47. option (google.api.oauth_scopes) =
  48. "https://www.googleapis.com/auth/cloud-platform,"
  49. "https://www.googleapis.com/auth/cloud-platform.read-only,"
  50. "https://www.googleapis.com/auth/logging.admin,"
  51. "https://www.googleapis.com/auth/logging.read";
  52. // Lists buckets.
  53. rpc ListBuckets(ListBucketsRequest) returns (ListBucketsResponse) {
  54. option (google.api.http) = {
  55. get: "/v2/{parent=*/*/locations/*}/buckets"
  56. additional_bindings {
  57. get: "/v2/{parent=projects/*/locations/*}/buckets"
  58. }
  59. additional_bindings {
  60. get: "/v2/{parent=organizations/*/locations/*}/buckets"
  61. }
  62. additional_bindings {
  63. get: "/v2/{parent=folders/*/locations/*}/buckets"
  64. }
  65. additional_bindings {
  66. get: "/v2/{parent=billingAccounts/*/locations/*}/buckets"
  67. }
  68. };
  69. option (google.api.method_signature) = "parent";
  70. }
  71. // Gets a bucket.
  72. rpc GetBucket(GetBucketRequest) returns (LogBucket) {
  73. option (google.api.http) = {
  74. get: "/v2/{name=*/*/locations/*/buckets/*}"
  75. additional_bindings {
  76. get: "/v2/{name=projects/*/locations/*/buckets/*}"
  77. }
  78. additional_bindings {
  79. get: "/v2/{name=organizations/*/locations/*/buckets/*}"
  80. }
  81. additional_bindings {
  82. get: "/v2/{name=folders/*/locations/*/buckets/*}"
  83. }
  84. additional_bindings {
  85. get: "/v2/{name=billingAccounts/*/buckets/*}"
  86. }
  87. };
  88. }
  89. // Creates a bucket that can be used to store log entries. Once a bucket has
  90. // been created, the region cannot be changed.
  91. rpc CreateBucket(CreateBucketRequest) returns (LogBucket) {
  92. option (google.api.http) = {
  93. post: "/v2/{parent=*/*/locations/*}/buckets"
  94. body: "bucket"
  95. additional_bindings {
  96. post: "/v2/{parent=projects/*/locations/*}/buckets"
  97. body: "bucket"
  98. }
  99. additional_bindings {
  100. post: "/v2/{parent=organizations/*/locations/*}/buckets"
  101. body: "bucket"
  102. }
  103. additional_bindings {
  104. post: "/v2/{parent=folders/*/locations/*}/buckets"
  105. body: "bucket"
  106. }
  107. additional_bindings {
  108. post: "/v2/{parent=billingAccounts/*/locations/*}/buckets"
  109. body: "bucket"
  110. }
  111. };
  112. }
  113. // Updates a bucket. This method replaces the following fields in the
  114. // existing bucket with values from the new bucket: `retention_period`
  115. //
  116. // If the retention period is decreased and the bucket is locked,
  117. // FAILED_PRECONDITION will be returned.
  118. //
  119. // If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION
  120. // will be returned.
  121. //
  122. // A buckets region may not be modified after it is created.
  123. rpc UpdateBucket(UpdateBucketRequest) returns (LogBucket) {
  124. option (google.api.http) = {
  125. patch: "/v2/{name=*/*/locations/*/buckets/*}"
  126. body: "bucket"
  127. additional_bindings {
  128. patch: "/v2/{name=projects/*/locations/*/buckets/*}"
  129. body: "bucket"
  130. }
  131. additional_bindings {
  132. patch: "/v2/{name=organizations/*/locations/*/buckets/*}"
  133. body: "bucket"
  134. }
  135. additional_bindings {
  136. patch: "/v2/{name=folders/*/locations/*/buckets/*}"
  137. body: "bucket"
  138. }
  139. additional_bindings {
  140. patch: "/v2/{name=billingAccounts/*/locations/*/buckets/*}"
  141. body: "bucket"
  142. }
  143. };
  144. }
  145. // Deletes a bucket.
  146. // Moves the bucket to the DELETE_REQUESTED state. After 7 days, the
  147. // bucket will be purged and all logs in the bucket will be permanently
  148. // deleted.
  149. rpc DeleteBucket(DeleteBucketRequest) returns (google.protobuf.Empty) {
  150. option (google.api.http) = {
  151. delete: "/v2/{name=*/*/locations/*/buckets/*}"
  152. additional_bindings {
  153. delete: "/v2/{name=projects/*/locations/*/buckets/*}"
  154. }
  155. additional_bindings {
  156. delete: "/v2/{name=organizations/*/locations/*/buckets/*}"
  157. }
  158. additional_bindings {
  159. delete: "/v2/{name=folders/*/locations/*/buckets/*}"
  160. }
  161. additional_bindings {
  162. delete: "/v2/{name=billingAccounts/*/locations/*/buckets/*}"
  163. }
  164. };
  165. }
  166. // Undeletes a bucket. A bucket that has been deleted may be undeleted within
  167. // the grace period of 7 days.
  168. rpc UndeleteBucket(UndeleteBucketRequest) returns (google.protobuf.Empty) {
  169. option (google.api.http) = {
  170. post: "/v2/{name=*/*/locations/*/buckets/*}:undelete"
  171. body: "*"
  172. additional_bindings {
  173. post: "/v2/{name=projects/*/locations/*/buckets/*}:undelete"
  174. body: "*"
  175. }
  176. additional_bindings {
  177. post: "/v2/{name=organizations/*/locations/*/buckets/*}:undelete"
  178. body: "*"
  179. }
  180. additional_bindings {
  181. post: "/v2/{name=folders/*/locations/*/buckets/*}:undelete"
  182. body: "*"
  183. }
  184. additional_bindings {
  185. post: "/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete"
  186. body: "*"
  187. }
  188. };
  189. }
  190. // Lists views on a bucket.
  191. rpc ListViews(ListViewsRequest) returns (ListViewsResponse) {
  192. option (google.api.http) = {
  193. get: "/v2/{parent=*/*/locations/*/buckets/*}/views"
  194. additional_bindings {
  195. get: "/v2/{parent=projects/*/locations/*/buckets/*}/views"
  196. }
  197. additional_bindings {
  198. get: "/v2/{parent=organizations/*/locations/*/buckets/*}/views"
  199. }
  200. additional_bindings {
  201. get: "/v2/{parent=folders/*/locations/*/buckets/*}/views"
  202. }
  203. additional_bindings {
  204. get: "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views"
  205. }
  206. };
  207. option (google.api.method_signature) = "parent";
  208. }
  209. // Gets a view.
  210. rpc GetView(GetViewRequest) returns (LogView) {
  211. option (google.api.http) = {
  212. get: "/v2/{name=*/*/locations/*/buckets/*/views/*}"
  213. additional_bindings {
  214. get: "/v2/{name=projects/*/locations/*/buckets/*/views/*}"
  215. }
  216. additional_bindings {
  217. get: "/v2/{name=organizations/*/locations/*/buckets/*/views/*}"
  218. }
  219. additional_bindings {
  220. get: "/v2/{name=folders/*/locations/*/buckets/*/views/*}"
  221. }
  222. additional_bindings {
  223. get: "/v2/{name=billingAccounts/*/buckets/*/views/*}"
  224. }
  225. };
  226. }
  227. // Creates a view over logs in a bucket. A bucket may contain a maximum of
  228. // 50 views.
  229. rpc CreateView(CreateViewRequest) returns (LogView) {
  230. option (google.api.http) = {
  231. post: "/v2/{parent=*/*/locations/*/buckets/*}/views"
  232. body: "view"
  233. additional_bindings {
  234. post: "/v2/{parent=projects/*/locations/*/buckets/*}/views"
  235. body: "view"
  236. }
  237. additional_bindings {
  238. post: "/v2/{parent=organizations/*/locations/*/buckets/*}/views"
  239. body: "view"
  240. }
  241. additional_bindings {
  242. post: "/v2/{parent=folders/*/locations/*/buckets/*}/views"
  243. body: "view"
  244. }
  245. additional_bindings {
  246. post: "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views"
  247. body: "view"
  248. }
  249. };
  250. }
  251. // Updates a view. This method replaces the following fields in the existing
  252. // view with values from the new view: `filter`.
  253. rpc UpdateView(UpdateViewRequest) returns (LogView) {
  254. option (google.api.http) = {
  255. patch: "/v2/{name=*/*/locations/*/buckets/*/views/*}"
  256. body: "view"
  257. additional_bindings {
  258. patch: "/v2/{name=projects/*/locations/*/buckets/*/views/*}"
  259. body: "view"
  260. }
  261. additional_bindings {
  262. patch: "/v2/{name=organizations/*/locations/*/buckets/*/views/*}"
  263. body: "view"
  264. }
  265. additional_bindings {
  266. patch: "/v2/{name=folders/*/locations/*/buckets/*/views/*}"
  267. body: "view"
  268. }
  269. additional_bindings {
  270. patch: "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}"
  271. body: "view"
  272. }
  273. };
  274. }
  275. // Deletes a view from a bucket.
  276. rpc DeleteView(DeleteViewRequest) returns (google.protobuf.Empty) {
  277. option (google.api.http) = {
  278. delete: "/v2/{name=*/*/locations/*/buckets/*/views/*}"
  279. additional_bindings {
  280. delete: "/v2/{name=projects/*/locations/*/buckets/*/views/*}"
  281. }
  282. additional_bindings {
  283. delete: "/v2/{name=organizations/*/locations/*/buckets/*/views/*}"
  284. }
  285. additional_bindings {
  286. delete: "/v2/{name=folders/*/locations/*/buckets/*/views/*}"
  287. }
  288. additional_bindings {
  289. delete: "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}"
  290. }
  291. };
  292. }
  293. // Lists sinks.
  294. rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) {
  295. option (google.api.http) = {
  296. get: "/v2/{parent=*/*}/sinks"
  297. additional_bindings {
  298. get: "/v2/{parent=projects/*}/sinks"
  299. }
  300. additional_bindings {
  301. get: "/v2/{parent=organizations/*}/sinks"
  302. }
  303. additional_bindings {
  304. get: "/v2/{parent=folders/*}/sinks"
  305. }
  306. additional_bindings {
  307. get: "/v2/{parent=billingAccounts/*}/sinks"
  308. }
  309. };
  310. option (google.api.method_signature) = "parent";
  311. }
  312. // Gets a sink.
  313. rpc GetSink(GetSinkRequest) returns (LogSink) {
  314. option (google.api.http) = {
  315. get: "/v2/{sink_name=*/*/sinks/*}"
  316. additional_bindings {
  317. get: "/v2/{sink_name=projects/*/sinks/*}"
  318. }
  319. additional_bindings {
  320. get: "/v2/{sink_name=organizations/*/sinks/*}"
  321. }
  322. additional_bindings {
  323. get: "/v2/{sink_name=folders/*/sinks/*}"
  324. }
  325. additional_bindings {
  326. get: "/v2/{sink_name=billingAccounts/*/sinks/*}"
  327. }
  328. };
  329. option (google.api.method_signature) = "sink_name";
  330. }
  331. // Creates a sink that exports specified log entries to a destination. The
  332. // export of newly-ingested log entries begins immediately, unless the sink's
  333. // `writer_identity` is not permitted to write to the destination. A sink can
  334. // export log entries only from the resource owning the sink.
  335. rpc CreateSink(CreateSinkRequest) returns (LogSink) {
  336. option (google.api.http) = {
  337. post: "/v2/{parent=*/*}/sinks"
  338. body: "sink"
  339. additional_bindings {
  340. post: "/v2/{parent=projects/*}/sinks"
  341. body: "sink"
  342. }
  343. additional_bindings {
  344. post: "/v2/{parent=organizations/*}/sinks"
  345. body: "sink"
  346. }
  347. additional_bindings {
  348. post: "/v2/{parent=folders/*}/sinks"
  349. body: "sink"
  350. }
  351. additional_bindings {
  352. post: "/v2/{parent=billingAccounts/*}/sinks"
  353. body: "sink"
  354. }
  355. };
  356. option (google.api.method_signature) = "parent,sink";
  357. }
  358. // Updates a sink. This method replaces the following fields in the existing
  359. // sink with values from the new sink: `destination`, and `filter`.
  360. //
  361. // The updated sink might also have a new `writer_identity`; see the
  362. // `unique_writer_identity` field.
  363. rpc UpdateSink(UpdateSinkRequest) returns (LogSink) {
  364. option (google.api.http) = {
  365. put: "/v2/{sink_name=*/*/sinks/*}"
  366. body: "sink"
  367. additional_bindings {
  368. put: "/v2/{sink_name=projects/*/sinks/*}"
  369. body: "sink"
  370. }
  371. additional_bindings {
  372. put: "/v2/{sink_name=organizations/*/sinks/*}"
  373. body: "sink"
  374. }
  375. additional_bindings {
  376. put: "/v2/{sink_name=folders/*/sinks/*}"
  377. body: "sink"
  378. }
  379. additional_bindings {
  380. put: "/v2/{sink_name=billingAccounts/*/sinks/*}"
  381. body: "sink"
  382. }
  383. additional_bindings {
  384. patch: "/v2/{sink_name=projects/*/sinks/*}"
  385. body: "sink"
  386. }
  387. additional_bindings {
  388. patch: "/v2/{sink_name=organizations/*/sinks/*}"
  389. body: "sink"
  390. }
  391. additional_bindings {
  392. patch: "/v2/{sink_name=folders/*/sinks/*}"
  393. body: "sink"
  394. }
  395. additional_bindings {
  396. patch: "/v2/{sink_name=billingAccounts/*/sinks/*}"
  397. body: "sink"
  398. }
  399. };
  400. option (google.api.method_signature) = "sink_name,sink,update_mask";
  401. option (google.api.method_signature) = "sink_name,sink";
  402. }
  403. // Deletes a sink. If the sink has a unique `writer_identity`, then that
  404. // service account is also deleted.
  405. rpc DeleteSink(DeleteSinkRequest) returns (google.protobuf.Empty) {
  406. option (google.api.http) = {
  407. delete: "/v2/{sink_name=*/*/sinks/*}"
  408. additional_bindings {
  409. delete: "/v2/{sink_name=projects/*/sinks/*}"
  410. }
  411. additional_bindings {
  412. delete: "/v2/{sink_name=organizations/*/sinks/*}"
  413. }
  414. additional_bindings {
  415. delete: "/v2/{sink_name=folders/*/sinks/*}"
  416. }
  417. additional_bindings {
  418. delete: "/v2/{sink_name=billingAccounts/*/sinks/*}"
  419. }
  420. };
  421. option (google.api.method_signature) = "sink_name";
  422. }
  423. // Lists all the exclusions in a parent resource.
  424. rpc ListExclusions(ListExclusionsRequest) returns (ListExclusionsResponse) {
  425. option (google.api.http) = {
  426. get: "/v2/{parent=*/*}/exclusions"
  427. additional_bindings {
  428. get: "/v2/{parent=projects/*}/exclusions"
  429. }
  430. additional_bindings {
  431. get: "/v2/{parent=organizations/*}/exclusions"
  432. }
  433. additional_bindings {
  434. get: "/v2/{parent=folders/*}/exclusions"
  435. }
  436. additional_bindings {
  437. get: "/v2/{parent=billingAccounts/*}/exclusions"
  438. }
  439. };
  440. option (google.api.method_signature) = "parent";
  441. }
  442. // Gets the description of an exclusion.
  443. rpc GetExclusion(GetExclusionRequest) returns (LogExclusion) {
  444. option (google.api.http) = {
  445. get: "/v2/{name=*/*/exclusions/*}"
  446. additional_bindings {
  447. get: "/v2/{name=projects/*/exclusions/*}"
  448. }
  449. additional_bindings {
  450. get: "/v2/{name=organizations/*/exclusions/*}"
  451. }
  452. additional_bindings {
  453. get: "/v2/{name=folders/*/exclusions/*}"
  454. }
  455. additional_bindings {
  456. get: "/v2/{name=billingAccounts/*/exclusions/*}"
  457. }
  458. };
  459. option (google.api.method_signature) = "name";
  460. }
  461. // Creates a new exclusion in a specified parent resource.
  462. // Only log entries belonging to that resource can be excluded.
  463. // You can have up to 10 exclusions in a resource.
  464. rpc CreateExclusion(CreateExclusionRequest) returns (LogExclusion) {
  465. option (google.api.http) = {
  466. post: "/v2/{parent=*/*}/exclusions"
  467. body: "exclusion"
  468. additional_bindings {
  469. post: "/v2/{parent=projects/*}/exclusions"
  470. body: "exclusion"
  471. }
  472. additional_bindings {
  473. post: "/v2/{parent=organizations/*}/exclusions"
  474. body: "exclusion"
  475. }
  476. additional_bindings {
  477. post: "/v2/{parent=folders/*}/exclusions"
  478. body: "exclusion"
  479. }
  480. additional_bindings {
  481. post: "/v2/{parent=billingAccounts/*}/exclusions"
  482. body: "exclusion"
  483. }
  484. };
  485. option (google.api.method_signature) = "parent,exclusion";
  486. }
  487. // Changes one or more properties of an existing exclusion.
  488. rpc UpdateExclusion(UpdateExclusionRequest) returns (LogExclusion) {
  489. option (google.api.http) = {
  490. patch: "/v2/{name=*/*/exclusions/*}"
  491. body: "exclusion"
  492. additional_bindings {
  493. patch: "/v2/{name=projects/*/exclusions/*}"
  494. body: "exclusion"
  495. }
  496. additional_bindings {
  497. patch: "/v2/{name=organizations/*/exclusions/*}"
  498. body: "exclusion"
  499. }
  500. additional_bindings {
  501. patch: "/v2/{name=folders/*/exclusions/*}"
  502. body: "exclusion"
  503. }
  504. additional_bindings {
  505. patch: "/v2/{name=billingAccounts/*/exclusions/*}"
  506. body: "exclusion"
  507. }
  508. };
  509. option (google.api.method_signature) = "name,exclusion,update_mask";
  510. }
  511. // Deletes an exclusion.
  512. rpc DeleteExclusion(DeleteExclusionRequest) returns (google.protobuf.Empty) {
  513. option (google.api.http) = {
  514. delete: "/v2/{name=*/*/exclusions/*}"
  515. additional_bindings {
  516. delete: "/v2/{name=projects/*/exclusions/*}"
  517. }
  518. additional_bindings {
  519. delete: "/v2/{name=organizations/*/exclusions/*}"
  520. }
  521. additional_bindings {
  522. delete: "/v2/{name=folders/*/exclusions/*}"
  523. }
  524. additional_bindings {
  525. delete: "/v2/{name=billingAccounts/*/exclusions/*}"
  526. }
  527. };
  528. option (google.api.method_signature) = "name";
  529. }
  530. // Gets the Logs Router CMEK settings for the given resource.
  531. //
  532. // Note: CMEK for the Logs Router can currently only be configured for GCP
  533. // organizations. Once configured, it applies to all projects and folders in
  534. // the GCP organization.
  535. //
  536. // See [Enabling CMEK for Logs
  537. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  538. // for more information.
  539. rpc GetCmekSettings(GetCmekSettingsRequest) returns (CmekSettings) {
  540. option (google.api.http) = {
  541. get: "/v2/{name=*/*}/cmekSettings"
  542. additional_bindings {
  543. get: "/v2/{name=organizations/*}/cmekSettings"
  544. }
  545. };
  546. }
  547. // Updates the Logs Router CMEK settings for the given resource.
  548. //
  549. // Note: CMEK for the Logs Router can currently only be configured for GCP
  550. // organizations. Once configured, it applies to all projects and folders in
  551. // the GCP organization.
  552. //
  553. // [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]
  554. // will fail if 1) `kms_key_name` is invalid, or 2) the associated service
  555. // account does not have the required
  556. // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or
  557. // 3) access to the key is disabled.
  558. //
  559. // See [Enabling CMEK for Logs
  560. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  561. // for more information.
  562. rpc UpdateCmekSettings(UpdateCmekSettingsRequest) returns (CmekSettings) {
  563. option (google.api.http) = {
  564. patch: "/v2/{name=*/*}/cmekSettings"
  565. body: "cmek_settings"
  566. additional_bindings {
  567. patch: "/v2/{name=organizations/*}/cmekSettings"
  568. body: "cmek_settings"
  569. }
  570. };
  571. }
  572. }
  573. // Describes a repository of logs.
  574. message LogBucket {
  575. option (google.api.resource) = {
  576. type: "logging.googleapis.com/LogBucket"
  577. pattern: "projects/{project}/locations/{location}/buckets/{bucket}"
  578. pattern: "organizations/{organization}/locations/{location}/buckets/{bucket}"
  579. pattern: "folders/{folder}/locations/{location}/buckets/{bucket}"
  580. pattern: "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}"
  581. };
  582. // The resource name of the bucket.
  583. // For example:
  584. // "projects/my-project-id/locations/my-location/buckets/my-bucket-id The
  585. // supported locations are:
  586. // "global"
  587. //
  588. // For the location of `global` it is unspecified where logs are actually
  589. // stored.
  590. // Once a bucket has been created, the location can not be changed.
  591. string name = 1;
  592. // Describes this bucket.
  593. string description = 3;
  594. // Output only. The creation timestamp of the bucket. This is not set for any of the
  595. // default buckets.
  596. google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  597. // Output only. The last update timestamp of the bucket.
  598. google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  599. // Logs will be retained by default for this amount of time, after which they
  600. // will automatically be deleted. The minimum retention period is 1 day.
  601. // If this value is set to zero at bucket creation time, the default time of
  602. // 30 days will be used.
  603. int32 retention_days = 11;
  604. // Whether the bucket has been locked.
  605. // The retention period on a locked bucket may not be changed.
  606. // Locked buckets may only be deleted if they are empty.
  607. bool locked = 9;
  608. // Output only. The bucket lifecycle state.
  609. LifecycleState lifecycle_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  610. }
  611. // LogBucket lifecycle states.
  612. enum LifecycleState {
  613. // Unspecified state. This is only used/useful for distinguishing
  614. // unset values.
  615. LIFECYCLE_STATE_UNSPECIFIED = 0;
  616. // The normal and active state.
  617. ACTIVE = 1;
  618. // The bucket has been marked for deletion by the user.
  619. DELETE_REQUESTED = 2;
  620. }
  621. // Describes a view over logs in a bucket.
  622. message LogView {
  623. option (google.api.resource) = {
  624. type: "logging.googleapis.com/LogView"
  625. pattern: "projects/{project}/locations/{location}/buckets/{bucket}/views/{view}"
  626. pattern: "organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}"
  627. pattern: "folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}"
  628. pattern: "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}"
  629. };
  630. // The resource name of the view.
  631. // For example
  632. // "projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view
  633. string name = 1;
  634. // Describes this view.
  635. string description = 3;
  636. // Output only. The creation timestamp of the view.
  637. google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  638. // Output only. The last update timestamp of the view.
  639. google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  640. // Filter that restricts which log entries in a bucket are visible in this
  641. // view. Filters are restricted to be a logical AND of ==/!= of any of the
  642. // following:
  643. // originating project/folder/organization/billing account.
  644. // resource type
  645. // log id
  646. // Example: SOURCE("projects/myproject") AND resource.type = "gce_instance"
  647. // AND LOG_ID("stdout")
  648. string filter = 7;
  649. }
  650. // Describes a sink used to export log entries to one of the following
  651. // destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a
  652. // Cloud Pub/Sub topic. A logs filter controls which log entries are exported.
  653. // The sink must be created within a project, organization, billing account, or
  654. // folder.
  655. message LogSink {
  656. option (google.api.resource) = {
  657. type: "logging.googleapis.com/LogSink"
  658. pattern: "projects/{project}/sinks/{sink}"
  659. pattern: "organizations/{organization}/sinks/{sink}"
  660. pattern: "folders/{folder}/sinks/{sink}"
  661. pattern: "billingAccounts/{billing_account}/sinks/{sink}"
  662. };
  663. // Deprecated. This is unused.
  664. enum VersionFormat {
  665. // An unspecified format version that will default to V2.
  666. VERSION_FORMAT_UNSPECIFIED = 0;
  667. // `LogEntry` version 2 format.
  668. V2 = 1;
  669. // `LogEntry` version 1 format.
  670. V1 = 2;
  671. }
  672. // Required. The client-assigned sink identifier, unique within the project. Example:
  673. // `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited to 100
  674. // characters and can include only the following characters: upper and
  675. // lower-case alphanumeric characters, underscores, hyphens, and periods.
  676. // First character has to be alphanumeric.
  677. string name = 1 [(google.api.field_behavior) = REQUIRED];
  678. // Required. The export destination:
  679. //
  680. // "storage.googleapis.com/[GCS_BUCKET]"
  681. // "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
  682. // "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
  683. //
  684. // The sink's `writer_identity`, set when the sink is created, must
  685. // have permission to write to the destination or else the log
  686. // entries are not exported. For more information, see
  687. // [Exporting Logs with
  688. // Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
  689. string destination = 3 [
  690. (google.api.field_behavior) = REQUIRED,
  691. (google.api.resource_reference) = {
  692. type: "*"
  693. }
  694. ];
  695. // Optional. An [advanced logs
  696. // filter](https://cloud.google.com/logging/docs/view/advanced-queries). The
  697. // only exported log entries are those that are in the resource owning the
  698. // sink and that match the filter. For example:
  699. //
  700. // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
  701. string filter = 5 [(google.api.field_behavior) = OPTIONAL];
  702. // Optional. A description of this sink.
  703. // The maximum length of the description is 8000 characters.
  704. string description = 18 [(google.api.field_behavior) = OPTIONAL];
  705. // Optional. If set to True, then this sink is disabled and it does not
  706. // export any log entries.
  707. bool disabled = 19 [(google.api.field_behavior) = OPTIONAL];
  708. // Optional. Log entries that match any of the exclusion filters will not be exported.
  709. // If a log entry is matched by both `filter` and one of `exclusion_filters`
  710. // it will not be exported.
  711. repeated LogExclusion exclusions = 16 [(google.api.field_behavior) = OPTIONAL];
  712. // Deprecated. This field is unused.
  713. VersionFormat output_version_format = 6 [deprecated = true];
  714. // Output only. An IAM identity—a service account or group—under which Logging
  715. // writes the exported log entries to the sink's destination. This field is
  716. // set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and
  717. // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the
  718. // value of `unique_writer_identity` in those methods.
  719. //
  720. // Until you grant this identity write-access to the destination, log entry
  721. // exports from this sink will fail. For more information,
  722. // see [Granting Access for a
  723. // Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
  724. // Consult the destination service's documentation to determine the
  725. // appropriate IAM roles to assign to the identity.
  726. string writer_identity = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  727. // Optional. This field applies only to sinks owned by organizations and
  728. // folders. If the field is false, the default, only the logs owned by the
  729. // sink's parent resource are available for export. If the field is true, then
  730. // logs from all the projects, folders, and billing accounts contained in the
  731. // sink's parent resource are also available for export. Whether a particular
  732. // log entry from the children is exported depends on the sink's filter
  733. // expression. For example, if this field is true, then the filter
  734. // `resource.type=gce_instance` would export all Compute Engine VM instance
  735. // log entries from all projects in the sink's parent. To only export entries
  736. // from certain child projects, filter on the project part of the log name:
  737. //
  738. // logName:("projects/test-project1/" OR "projects/test-project2/") AND
  739. // resource.type=gce_instance
  740. bool include_children = 9 [(google.api.field_behavior) = OPTIONAL];
  741. // Destination dependent options.
  742. oneof options {
  743. // Optional. Options that affect sinks exporting data to BigQuery.
  744. BigQueryOptions bigquery_options = 12 [(google.api.field_behavior) = OPTIONAL];
  745. }
  746. // Output only. The creation timestamp of the sink.
  747. //
  748. // This field may not be present for older sinks.
  749. google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  750. // Output only. The last update timestamp of the sink.
  751. //
  752. // This field may not be present for older sinks.
  753. google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
  754. }
  755. // Options that change functionality of a sink exporting data to BigQuery.
  756. message BigQueryOptions {
  757. // Optional. Whether to use [BigQuery's partition
  758. // tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By
  759. // default, Logging creates dated tables based on the log entries' timestamps,
  760. // e.g. syslog_20170523. With partitioned tables the date suffix is no longer
  761. // present and [special query
  762. // syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables)
  763. // has to be used instead. In both cases, tables are sharded based on UTC
  764. // timezone.
  765. bool use_partitioned_tables = 1 [(google.api.field_behavior) = OPTIONAL];
  766. // Output only. True if new timestamp column based partitioning is in use,
  767. // false if legacy ingestion-time partitioning is in use.
  768. // All new sinks will have this field set true and will use timestamp column
  769. // based partitioning. If use_partitioned_tables is false, this value has no
  770. // meaning and will be false. Legacy sinks using partitioned tables will have
  771. // this field set to false.
  772. bool uses_timestamp_column_partitioning = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  773. }
  774. // The parameters to `ListBuckets`.
  775. message ListBucketsRequest {
  776. // Required. The parent resource whose buckets are to be listed:
  777. //
  778. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
  779. // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
  780. // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
  781. // "folders/[FOLDER_ID]/locations/[LOCATION_ID]"
  782. //
  783. // Note: The locations portion of the resource must be specified, but
  784. // supplying the character `-` in place of [LOCATION_ID] will return all
  785. // buckets.
  786. string parent = 1 [
  787. (google.api.field_behavior) = REQUIRED,
  788. (google.api.resource_reference) = {
  789. child_type: "logging.googleapis.com/LogBucket"
  790. }
  791. ];
  792. // Optional. If present, then retrieve the next batch of results from the
  793. // preceding call to this method. `pageToken` must be the value of
  794. // `nextPageToken` from the previous response. The values of other method
  795. // parameters should be identical to those in the previous call.
  796. string page_token = 2 [(google.api.field_behavior) = OPTIONAL];
  797. // Optional. The maximum number of results to return from this request.
  798. // Non-positive values are ignored. The presence of `nextPageToken` in the
  799. // response indicates that more results might be available.
  800. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
  801. }
  802. // The response from ListBuckets.
  803. message ListBucketsResponse {
  804. // A list of buckets.
  805. repeated LogBucket buckets = 1;
  806. // If there might be more results than appear in this response, then
  807. // `nextPageToken` is included. To get the next set of results, call the same
  808. // method again using the value of `nextPageToken` as `pageToken`.
  809. string next_page_token = 2;
  810. }
  811. // The parameters to `CreateBucket`.
  812. message CreateBucketRequest {
  813. // Required. The resource in which to create the bucket:
  814. //
  815. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
  816. //
  817. // Example: `"projects/my-logging-project/locations/global"`
  818. string parent = 1 [
  819. (google.api.field_behavior) = REQUIRED,
  820. (google.api.resource_reference) = {
  821. child_type: "logging.googleapis.com/LogBucket"
  822. }
  823. ];
  824. // Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are
  825. // limited to 100 characters and can include only letters, digits,
  826. // underscores, hyphens, and periods.
  827. string bucket_id = 2 [(google.api.field_behavior) = REQUIRED];
  828. // Required. The new bucket. The region specified in the new bucket must be compliant
  829. // with any Location Restriction Org Policy. The name field in the bucket is
  830. // ignored.
  831. LogBucket bucket = 3 [(google.api.field_behavior) = REQUIRED];
  832. }
  833. // The parameters to `UpdateBucket`.
  834. message UpdateBucketRequest {
  835. // Required. The full resource name of the bucket to update.
  836. //
  837. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  838. // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  839. // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  840. // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  841. //
  842. // Example:
  843. // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also
  844. // requires permission "resourcemanager.projects.updateLiens" to set the
  845. // locked property
  846. string name = 1 [
  847. (google.api.field_behavior) = REQUIRED,
  848. (google.api.resource_reference) = {
  849. type: "logging.googleapis.com/LogBucket"
  850. }
  851. ];
  852. // Required. The updated bucket.
  853. LogBucket bucket = 2 [(google.api.field_behavior) = REQUIRED];
  854. // Required. Field mask that specifies the fields in `bucket` that need an update. A
  855. // bucket field will be overwritten if, and only if, it is in the update
  856. // mask. `name` and output only fields cannot be updated.
  857. //
  858. // For a detailed `FieldMask` definition, see
  859. // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
  860. //
  861. // Example: `updateMask=retention_days`.
  862. google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED];
  863. }
  864. // The parameters to `GetBucket`.
  865. message GetBucketRequest {
  866. // Required. The resource name of the bucket:
  867. //
  868. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  869. // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  870. // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  871. // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  872. //
  873. // Example:
  874. // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`.
  875. string name = 1 [
  876. (google.api.field_behavior) = REQUIRED,
  877. (google.api.resource_reference) = {
  878. type: "logging.googleapis.com/LogBucket"
  879. }
  880. ];
  881. }
  882. // The parameters to `DeleteBucket`.
  883. message DeleteBucketRequest {
  884. // Required. The full resource name of the bucket to delete.
  885. //
  886. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  887. // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  888. // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  889. // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  890. //
  891. // Example:
  892. // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`.
  893. string name = 1 [
  894. (google.api.field_behavior) = REQUIRED,
  895. (google.api.resource_reference) = {
  896. type: "logging.googleapis.com/LogBucket"
  897. }
  898. ];
  899. }
  900. // The parameters to `UndeleteBucket`.
  901. message UndeleteBucketRequest {
  902. // Required. The full resource name of the bucket to undelete.
  903. //
  904. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  905. // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  906. // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  907. // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  908. //
  909. // Example:
  910. // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`.
  911. string name = 1 [
  912. (google.api.field_behavior) = REQUIRED,
  913. (google.api.resource_reference) = {
  914. type: "logging.googleapis.com/LogBucket"
  915. }
  916. ];
  917. }
  918. // The parameters to `ListViews`.
  919. message ListViewsRequest {
  920. // Required. The bucket whose views are to be listed:
  921. //
  922. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  923. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  924. // Optional. If present, then retrieve the next batch of results from the
  925. // preceding call to this method. `pageToken` must be the value of
  926. // `nextPageToken` from the previous response. The values of other method
  927. // parameters should be identical to those in the previous call.
  928. string page_token = 2 [(google.api.field_behavior) = OPTIONAL];
  929. // Optional. The maximum number of results to return from this request.
  930. // Non-positive values are ignored. The presence of `nextPageToken` in the
  931. // response indicates that more results might be available.
  932. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
  933. }
  934. // The response from ListViews.
  935. message ListViewsResponse {
  936. // A list of views.
  937. repeated LogView views = 1;
  938. // If there might be more results than appear in this response, then
  939. // `nextPageToken` is included. To get the next set of results, call the same
  940. // method again using the value of `nextPageToken` as `pageToken`.
  941. string next_page_token = 2;
  942. }
  943. // The parameters to `CreateView`.
  944. message CreateViewRequest {
  945. // Required. The bucket in which to create the view
  946. //
  947. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  948. //
  949. // Example:
  950. // `"projects/my-logging-project/locations/my-location/buckets/my-bucket"`
  951. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  952. // Required. The id to use for this view.
  953. string view_id = 2 [(google.api.field_behavior) = REQUIRED];
  954. // Required. The new view.
  955. LogView view = 3 [(google.api.field_behavior) = REQUIRED];
  956. }
  957. // The parameters to `UpdateView`.
  958. message UpdateViewRequest {
  959. // Required. The full resource name of the view to update
  960. //
  961. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
  962. //
  963. // Example:
  964. // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`.
  965. string name = 1 [(google.api.field_behavior) = REQUIRED];
  966. // Required. The updated view.
  967. LogView view = 2 [(google.api.field_behavior) = REQUIRED];
  968. // Optional. Field mask that specifies the fields in `view` that need
  969. // an update. A field will be overwritten if, and only if, it is
  970. // in the update mask. `name` and output only fields cannot be updated.
  971. //
  972. // For a detailed `FieldMask` definition, see
  973. // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
  974. //
  975. // Example: `updateMask=filter`.
  976. google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL];
  977. }
  978. // The parameters to `GetView`.
  979. message GetViewRequest {
  980. // Required. The resource name of the policy:
  981. //
  982. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
  983. //
  984. // Example:
  985. // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`.
  986. string name = 1 [
  987. (google.api.field_behavior) = REQUIRED,
  988. (google.api.resource_reference) = {
  989. type: "logging.googleapis.com/LogView"
  990. }
  991. ];
  992. }
  993. // The parameters to `DeleteView`.
  994. message DeleteViewRequest {
  995. // Required. The full resource name of the view to delete:
  996. //
  997. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
  998. //
  999. // Example:
  1000. // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id/views/my-view-id"`.
  1001. string name = 1 [
  1002. (google.api.field_behavior) = REQUIRED,
  1003. (google.api.resource_reference) = {
  1004. type: "logging.googleapis.com/LogView"
  1005. }
  1006. ];
  1007. }
  1008. // The parameters to `ListSinks`.
  1009. message ListSinksRequest {
  1010. // Required. The parent resource whose sinks are to be listed:
  1011. //
  1012. // "projects/[PROJECT_ID]"
  1013. // "organizations/[ORGANIZATION_ID]"
  1014. // "billingAccounts/[BILLING_ACCOUNT_ID]"
  1015. // "folders/[FOLDER_ID]"
  1016. string parent = 1 [
  1017. (google.api.field_behavior) = REQUIRED,
  1018. (google.api.resource_reference) = {
  1019. child_type: "logging.googleapis.com/LogSink"
  1020. }
  1021. ];
  1022. // Optional. If present, then retrieve the next batch of results from the
  1023. // preceding call to this method. `pageToken` must be the value of
  1024. // `nextPageToken` from the previous response. The values of other method
  1025. // parameters should be identical to those in the previous call.
  1026. string page_token = 2 [(google.api.field_behavior) = OPTIONAL];
  1027. // Optional. The maximum number of results to return from this request.
  1028. // Non-positive values are ignored. The presence of `nextPageToken` in the
  1029. // response indicates that more results might be available.
  1030. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
  1031. }
  1032. // Result returned from `ListSinks`.
  1033. message ListSinksResponse {
  1034. // A list of sinks.
  1035. repeated LogSink sinks = 1;
  1036. // If there might be more results than appear in this response, then
  1037. // `nextPageToken` is included. To get the next set of results, call the same
  1038. // method again using the value of `nextPageToken` as `pageToken`.
  1039. string next_page_token = 2;
  1040. }
  1041. // The parameters to `GetSink`.
  1042. message GetSinkRequest {
  1043. // Required. The resource name of the sink:
  1044. //
  1045. // "projects/[PROJECT_ID]/sinks/[SINK_ID]"
  1046. // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
  1047. // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
  1048. // "folders/[FOLDER_ID]/sinks/[SINK_ID]"
  1049. //
  1050. // Example: `"projects/my-project-id/sinks/my-sink-id"`.
  1051. string sink_name = 1 [
  1052. (google.api.field_behavior) = REQUIRED,
  1053. (google.api.resource_reference) = {
  1054. type: "logging.googleapis.com/LogSink"
  1055. }
  1056. ];
  1057. }
  1058. // The parameters to `CreateSink`.
  1059. message CreateSinkRequest {
  1060. // Required. The resource in which to create the sink:
  1061. //
  1062. // "projects/[PROJECT_ID]"
  1063. // "organizations/[ORGANIZATION_ID]"
  1064. // "billingAccounts/[BILLING_ACCOUNT_ID]"
  1065. // "folders/[FOLDER_ID]"
  1066. //
  1067. // Examples: `"projects/my-logging-project"`, `"organizations/123456789"`.
  1068. string parent = 1 [
  1069. (google.api.field_behavior) = REQUIRED,
  1070. (google.api.resource_reference) = {
  1071. child_type: "logging.googleapis.com/LogSink"
  1072. }
  1073. ];
  1074. // Required. The new sink, whose `name` parameter is a sink identifier that
  1075. // is not already in use.
  1076. LogSink sink = 2 [(google.api.field_behavior) = REQUIRED];
  1077. // Optional. Determines the kind of IAM identity returned as `writer_identity`
  1078. // in the new sink. If this value is omitted or set to false, and if the
  1079. // sink's parent is a project, then the value returned as `writer_identity` is
  1080. // the same group or service account used by Logging before the addition of
  1081. // writer identities to this API. The sink's destination must be in the same
  1082. // project as the sink itself.
  1083. //
  1084. // If this field is set to true, or if the sink is owned by a non-project
  1085. // resource such as an organization, then the value of `writer_identity` will
  1086. // be a unique service account used only for exports from the new sink. For
  1087. // more information, see `writer_identity` in [LogSink][google.logging.v2.LogSink].
  1088. bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL];
  1089. }
  1090. // The parameters to `UpdateSink`.
  1091. message UpdateSinkRequest {
  1092. // Required. The full resource name of the sink to update, including the parent
  1093. // resource and the sink identifier:
  1094. //
  1095. // "projects/[PROJECT_ID]/sinks/[SINK_ID]"
  1096. // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
  1097. // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
  1098. // "folders/[FOLDER_ID]/sinks/[SINK_ID]"
  1099. //
  1100. // Example: `"projects/my-project-id/sinks/my-sink-id"`.
  1101. string sink_name = 1 [
  1102. (google.api.field_behavior) = REQUIRED,
  1103. (google.api.resource_reference) = {
  1104. type: "logging.googleapis.com/LogSink"
  1105. }
  1106. ];
  1107. // Required. The updated sink, whose name is the same identifier that appears as part
  1108. // of `sink_name`.
  1109. LogSink sink = 2 [(google.api.field_behavior) = REQUIRED];
  1110. // Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
  1111. // for a description of this field. When updating a sink, the effect of this
  1112. // field on the value of `writer_identity` in the updated sink depends on both
  1113. // the old and new values of this field:
  1114. //
  1115. // + If the old and new values of this field are both false or both true,
  1116. // then there is no change to the sink's `writer_identity`.
  1117. // + If the old value is false and the new value is true, then
  1118. // `writer_identity` is changed to a unique service account.
  1119. // + It is an error if the old value is true and the new value is
  1120. // set to false or defaulted to false.
  1121. bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL];
  1122. // Optional. Field mask that specifies the fields in `sink` that need
  1123. // an update. A sink field will be overwritten if, and only if, it is
  1124. // in the update mask. `name` and output only fields cannot be updated.
  1125. //
  1126. // An empty updateMask is temporarily treated as using the following mask
  1127. // for backwards compatibility purposes:
  1128. // destination,filter,includeChildren
  1129. // At some point in the future, behavior will be removed and specifying an
  1130. // empty updateMask will be an error.
  1131. //
  1132. // For a detailed `FieldMask` definition, see
  1133. // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
  1134. //
  1135. // Example: `updateMask=filter`.
  1136. google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL];
  1137. }
  1138. // The parameters to `DeleteSink`.
  1139. message DeleteSinkRequest {
  1140. // Required. The full resource name of the sink to delete, including the parent
  1141. // resource and the sink identifier:
  1142. //
  1143. // "projects/[PROJECT_ID]/sinks/[SINK_ID]"
  1144. // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
  1145. // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
  1146. // "folders/[FOLDER_ID]/sinks/[SINK_ID]"
  1147. //
  1148. // Example: `"projects/my-project-id/sinks/my-sink-id"`.
  1149. string sink_name = 1 [
  1150. (google.api.field_behavior) = REQUIRED,
  1151. (google.api.resource_reference) = {
  1152. type: "logging.googleapis.com/LogSink"
  1153. }
  1154. ];
  1155. }
  1156. // Specifies a set of log entries that are not to be stored in
  1157. // Logging. If your GCP resource receives a large volume of logs, you can
  1158. // use exclusions to reduce your chargeable logs. Exclusions are
  1159. // processed after log sinks, so you can export log entries before they are
  1160. // excluded. Note that organization-level and folder-level exclusions don't
  1161. // apply to child resources, and that you can't exclude audit log entries.
  1162. message LogExclusion {
  1163. option (google.api.resource) = {
  1164. type: "logging.googleapis.com/LogExclusion"
  1165. pattern: "projects/{project}/exclusions/{exclusion}"
  1166. pattern: "organizations/{organization}/exclusions/{exclusion}"
  1167. pattern: "folders/{folder}/exclusions/{exclusion}"
  1168. pattern: "billingAccounts/{billing_account}/exclusions/{exclusion}"
  1169. };
  1170. // Required. A client-assigned identifier, such as `"load-balancer-exclusion"`.
  1171. // Identifiers are limited to 100 characters and can include only letters,
  1172. // digits, underscores, hyphens, and periods. First character has to be
  1173. // alphanumeric.
  1174. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1175. // Optional. A description of this exclusion.
  1176. string description = 2 [(google.api.field_behavior) = OPTIONAL];
  1177. // Required. An [advanced logs
  1178. // filter](https://cloud.google.com/logging/docs/view/advanced-queries) that
  1179. // matches the log entries to be excluded. By using the [sample
  1180. // function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
  1181. // you can exclude less than 100% of the matching log entries.
  1182. // For example, the following query matches 99% of low-severity log
  1183. // entries from Google Cloud Storage buckets:
  1184. //
  1185. // `"resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)"`
  1186. string filter = 3 [(google.api.field_behavior) = REQUIRED];
  1187. // Optional. If set to True, then this exclusion is disabled and it does not
  1188. // exclude any log entries. You can [update an
  1189. // exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] to change the
  1190. // value of this field.
  1191. bool disabled = 4 [(google.api.field_behavior) = OPTIONAL];
  1192. // Output only. The creation timestamp of the exclusion.
  1193. //
  1194. // This field may not be present for older exclusions.
  1195. google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  1196. // Output only. The last update timestamp of the exclusion.
  1197. //
  1198. // This field may not be present for older exclusions.
  1199. google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  1200. }
  1201. // The parameters to `ListExclusions`.
  1202. message ListExclusionsRequest {
  1203. // Required. The parent resource whose exclusions are to be listed.
  1204. //
  1205. // "projects/[PROJECT_ID]"
  1206. // "organizations/[ORGANIZATION_ID]"
  1207. // "billingAccounts/[BILLING_ACCOUNT_ID]"
  1208. // "folders/[FOLDER_ID]"
  1209. string parent = 1 [
  1210. (google.api.field_behavior) = REQUIRED,
  1211. (google.api.resource_reference) = {
  1212. child_type: "logging.googleapis.com/LogExclusion"
  1213. }
  1214. ];
  1215. // Optional. If present, then retrieve the next batch of results from the
  1216. // preceding call to this method. `pageToken` must be the value of
  1217. // `nextPageToken` from the previous response. The values of other method
  1218. // parameters should be identical to those in the previous call.
  1219. string page_token = 2 [(google.api.field_behavior) = OPTIONAL];
  1220. // Optional. The maximum number of results to return from this request.
  1221. // Non-positive values are ignored. The presence of `nextPageToken` in the
  1222. // response indicates that more results might be available.
  1223. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
  1224. }
  1225. // Result returned from `ListExclusions`.
  1226. message ListExclusionsResponse {
  1227. // A list of exclusions.
  1228. repeated LogExclusion exclusions = 1;
  1229. // If there might be more results than appear in this response, then
  1230. // `nextPageToken` is included. To get the next set of results, call the same
  1231. // method again using the value of `nextPageToken` as `pageToken`.
  1232. string next_page_token = 2;
  1233. }
  1234. // The parameters to `GetExclusion`.
  1235. message GetExclusionRequest {
  1236. // Required. The resource name of an existing exclusion:
  1237. //
  1238. // "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
  1239. // "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
  1240. // "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
  1241. // "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
  1242. //
  1243. // Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
  1244. string name = 1 [
  1245. (google.api.field_behavior) = REQUIRED,
  1246. (google.api.resource_reference) = {
  1247. type: "logging.googleapis.com/LogExclusion"
  1248. }
  1249. ];
  1250. }
  1251. // The parameters to `CreateExclusion`.
  1252. message CreateExclusionRequest {
  1253. // Required. The parent resource in which to create the exclusion:
  1254. //
  1255. // "projects/[PROJECT_ID]"
  1256. // "organizations/[ORGANIZATION_ID]"
  1257. // "billingAccounts/[BILLING_ACCOUNT_ID]"
  1258. // "folders/[FOLDER_ID]"
  1259. //
  1260. // Examples: `"projects/my-logging-project"`, `"organizations/123456789"`.
  1261. string parent = 1 [
  1262. (google.api.field_behavior) = REQUIRED,
  1263. (google.api.resource_reference) = {
  1264. child_type: "logging.googleapis.com/LogExclusion"
  1265. }
  1266. ];
  1267. // Required. The new exclusion, whose `name` parameter is an exclusion name
  1268. // that is not already used in the parent resource.
  1269. LogExclusion exclusion = 2 [(google.api.field_behavior) = REQUIRED];
  1270. }
  1271. // The parameters to `UpdateExclusion`.
  1272. message UpdateExclusionRequest {
  1273. // Required. The resource name of the exclusion to update:
  1274. //
  1275. // "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
  1276. // "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
  1277. // "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
  1278. // "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
  1279. //
  1280. // Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
  1281. string name = 1 [
  1282. (google.api.field_behavior) = REQUIRED,
  1283. (google.api.resource_reference) = {
  1284. type: "logging.googleapis.com/LogExclusion"
  1285. }
  1286. ];
  1287. // Required. New values for the existing exclusion. Only the fields specified in
  1288. // `update_mask` are relevant.
  1289. LogExclusion exclusion = 2 [(google.api.field_behavior) = REQUIRED];
  1290. // Required. A non-empty list of fields to change in the existing exclusion. New values
  1291. // for the fields are taken from the corresponding fields in the
  1292. // [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
  1293. // `update_mask` are not changed and are ignored in the request.
  1294. //
  1295. // For example, to change the filter and description of an exclusion,
  1296. // specify an `update_mask` of `"filter,description"`.
  1297. google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED];
  1298. }
  1299. // The parameters to `DeleteExclusion`.
  1300. message DeleteExclusionRequest {
  1301. // Required. The resource name of an existing exclusion to delete:
  1302. //
  1303. // "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
  1304. // "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
  1305. // "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
  1306. // "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
  1307. //
  1308. // Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
  1309. string name = 1 [
  1310. (google.api.field_behavior) = REQUIRED,
  1311. (google.api.resource_reference) = {
  1312. type: "logging.googleapis.com/LogExclusion"
  1313. }
  1314. ];
  1315. }
  1316. // The parameters to
  1317. // [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings].
  1318. //
  1319. // See [Enabling CMEK for Logs
  1320. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for
  1321. // more information.
  1322. message GetCmekSettingsRequest {
  1323. // Required. The resource for which to retrieve CMEK settings.
  1324. //
  1325. // "projects/[PROJECT_ID]/cmekSettings"
  1326. // "organizations/[ORGANIZATION_ID]/cmekSettings"
  1327. // "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
  1328. // "folders/[FOLDER_ID]/cmekSettings"
  1329. //
  1330. // Example: `"organizations/12345/cmekSettings"`.
  1331. //
  1332. // Note: CMEK for the Logs Router can currently only be configured for GCP
  1333. // organizations. Once configured, it applies to all projects and folders in
  1334. // the GCP organization.
  1335. string name = 1 [
  1336. (google.api.field_behavior) = REQUIRED,
  1337. (google.api.resource_reference) = {
  1338. type: "logging.googleapis.com/CmekSettings"
  1339. }
  1340. ];
  1341. }
  1342. // The parameters to
  1343. // [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings].
  1344. //
  1345. // See [Enabling CMEK for Logs
  1346. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for
  1347. // more information.
  1348. message UpdateCmekSettingsRequest {
  1349. // Required. The resource name for the CMEK settings to update.
  1350. //
  1351. // "projects/[PROJECT_ID]/cmekSettings"
  1352. // "organizations/[ORGANIZATION_ID]/cmekSettings"
  1353. // "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
  1354. // "folders/[FOLDER_ID]/cmekSettings"
  1355. //
  1356. // Example: `"organizations/12345/cmekSettings"`.
  1357. //
  1358. // Note: CMEK for the Logs Router can currently only be configured for GCP
  1359. // organizations. Once configured, it applies to all projects and folders in
  1360. // the GCP organization.
  1361. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1362. // Required. The CMEK settings to update.
  1363. //
  1364. // See [Enabling CMEK for Logs
  1365. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  1366. // for more information.
  1367. CmekSettings cmek_settings = 2 [(google.api.field_behavior) = REQUIRED];
  1368. // Optional. Field mask identifying which fields from `cmek_settings` should
  1369. // be updated. A field will be overwritten if and only if it is in the update
  1370. // mask. Output only fields cannot be updated.
  1371. //
  1372. // See [FieldMask][google.protobuf.FieldMask] for more information.
  1373. //
  1374. // Example: `"updateMask=kmsKeyName"`
  1375. google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL];
  1376. }
  1377. // Describes the customer-managed encryption key (CMEK) settings associated with
  1378. // a project, folder, organization, billing account, or flexible resource.
  1379. //
  1380. // Note: CMEK for the Logs Router can currently only be configured for GCP
  1381. // organizations. Once configured, it applies to all projects and folders in the
  1382. // GCP organization.
  1383. //
  1384. // See [Enabling CMEK for Logs
  1385. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for
  1386. // more information.
  1387. message CmekSettings {
  1388. option (google.api.resource) = {
  1389. type: "logging.googleapis.com/CmekSettings"
  1390. pattern: "projects/{project}/cmekSettings"
  1391. pattern: "organizations/{organization}/cmekSettings"
  1392. pattern: "folders/{folder}/cmekSettings"
  1393. pattern: "billingAccounts/{billing_account}/cmekSettings"
  1394. };
  1395. // Output only. The resource name of the CMEK settings.
  1396. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  1397. // The resource name for the configured Cloud KMS key.
  1398. //
  1399. // KMS key name format:
  1400. // "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
  1401. //
  1402. // For example:
  1403. // `"projects/my-project-id/locations/my-region/keyRings/key-ring-name/cryptoKeys/key-name"`
  1404. //
  1405. //
  1406. //
  1407. // To enable CMEK for the Logs Router, set this field to a valid
  1408. // `kms_key_name` for which the associated service account has the required
  1409. // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key.
  1410. //
  1411. // The Cloud KMS key used by the Log Router can be updated by changing the
  1412. // `kms_key_name` to a new valid key name. Encryption operations that are in
  1413. // progress will be completed with the key that was in use when they started.
  1414. // Decryption operations will be completed using the key that was used at the
  1415. // time of encryption unless access to that key has been revoked.
  1416. //
  1417. // To disable CMEK for the Logs Router, set this field to an empty string.
  1418. //
  1419. // See [Enabling CMEK for Logs
  1420. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  1421. // for more information.
  1422. string kms_key_name = 2;
  1423. // Output only. The service account that will be used by the Logs Router to access your
  1424. // Cloud KMS key.
  1425. //
  1426. // Before enabling CMEK for Logs Router, you must first assign the role
  1427. // `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
  1428. // the Logs Router will use to access your Cloud KMS key. Use
  1429. // [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to
  1430. // obtain the service account ID.
  1431. //
  1432. // See [Enabling CMEK for Logs
  1433. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  1434. // for more information.
  1435. string service_account_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  1436. }