logging_config.proto 71 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957
  1. // Copyright 2022 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/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/longrunning/operations.proto";
  21. import "google/protobuf/empty.proto";
  22. import "google/protobuf/field_mask.proto";
  23. import "google/protobuf/timestamp.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 log 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 log 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 log bucket that can be used to store log entries. After a bucket
  90. // has been created, the bucket's location 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 log 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 `lifecycle_state` of `DELETE_REQUESTED`, then
  120. // `FAILED_PRECONDITION` will be returned.
  121. //
  122. // After a bucket has been created, the bucket's location cannot be changed.
  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 log bucket.
  146. //
  147. // Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state.
  148. // After 7 days, the bucket will be purged and all log entries in the bucket
  149. // will be permanently deleted.
  150. rpc DeleteBucket(DeleteBucketRequest) returns (google.protobuf.Empty) {
  151. option (google.api.http) = {
  152. delete: "/v2/{name=*/*/locations/*/buckets/*}"
  153. additional_bindings {
  154. delete: "/v2/{name=projects/*/locations/*/buckets/*}"
  155. }
  156. additional_bindings {
  157. delete: "/v2/{name=organizations/*/locations/*/buckets/*}"
  158. }
  159. additional_bindings {
  160. delete: "/v2/{name=folders/*/locations/*/buckets/*}"
  161. }
  162. additional_bindings {
  163. delete: "/v2/{name=billingAccounts/*/locations/*/buckets/*}"
  164. }
  165. };
  166. }
  167. // Undeletes a log bucket. A bucket that has been deleted can be undeleted
  168. // within the grace period of 7 days.
  169. rpc UndeleteBucket(UndeleteBucketRequest) returns (google.protobuf.Empty) {
  170. option (google.api.http) = {
  171. post: "/v2/{name=*/*/locations/*/buckets/*}:undelete"
  172. body: "*"
  173. additional_bindings {
  174. post: "/v2/{name=projects/*/locations/*/buckets/*}:undelete"
  175. body: "*"
  176. }
  177. additional_bindings {
  178. post: "/v2/{name=organizations/*/locations/*/buckets/*}:undelete"
  179. body: "*"
  180. }
  181. additional_bindings {
  182. post: "/v2/{name=folders/*/locations/*/buckets/*}:undelete"
  183. body: "*"
  184. }
  185. additional_bindings {
  186. post: "/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete"
  187. body: "*"
  188. }
  189. };
  190. }
  191. // Lists views on a log bucket.
  192. rpc ListViews(ListViewsRequest) returns (ListViewsResponse) {
  193. option (google.api.http) = {
  194. get: "/v2/{parent=*/*/locations/*/buckets/*}/views"
  195. additional_bindings {
  196. get: "/v2/{parent=projects/*/locations/*/buckets/*}/views"
  197. }
  198. additional_bindings {
  199. get: "/v2/{parent=organizations/*/locations/*/buckets/*}/views"
  200. }
  201. additional_bindings {
  202. get: "/v2/{parent=folders/*/locations/*/buckets/*}/views"
  203. }
  204. additional_bindings {
  205. get: "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views"
  206. }
  207. };
  208. option (google.api.method_signature) = "parent";
  209. }
  210. // Gets a view on a log bucket..
  211. rpc GetView(GetViewRequest) returns (LogView) {
  212. option (google.api.http) = {
  213. get: "/v2/{name=*/*/locations/*/buckets/*/views/*}"
  214. additional_bindings {
  215. get: "/v2/{name=projects/*/locations/*/buckets/*/views/*}"
  216. }
  217. additional_bindings {
  218. get: "/v2/{name=organizations/*/locations/*/buckets/*/views/*}"
  219. }
  220. additional_bindings {
  221. get: "/v2/{name=folders/*/locations/*/buckets/*/views/*}"
  222. }
  223. additional_bindings {
  224. get: "/v2/{name=billingAccounts/*/buckets/*/views/*}"
  225. }
  226. };
  227. }
  228. // Creates a view over log entries in a log bucket. A bucket may contain a
  229. // maximum of 30 views.
  230. rpc CreateView(CreateViewRequest) returns (LogView) {
  231. option (google.api.http) = {
  232. post: "/v2/{parent=*/*/locations/*/buckets/*}/views"
  233. body: "view"
  234. additional_bindings {
  235. post: "/v2/{parent=projects/*/locations/*/buckets/*}/views"
  236. body: "view"
  237. }
  238. additional_bindings {
  239. post: "/v2/{parent=organizations/*/locations/*/buckets/*}/views"
  240. body: "view"
  241. }
  242. additional_bindings {
  243. post: "/v2/{parent=folders/*/locations/*/buckets/*}/views"
  244. body: "view"
  245. }
  246. additional_bindings {
  247. post: "/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views"
  248. body: "view"
  249. }
  250. };
  251. }
  252. // Updates a view on a log bucket. This method replaces the following fields
  253. // in the existing view with values from the new view: `filter`.
  254. // If an `UNAVAILABLE` error is returned, this indicates that system is not in
  255. // a state where it can update the view. If this occurs, please try again in a
  256. // few minutes.
  257. rpc UpdateView(UpdateViewRequest) returns (LogView) {
  258. option (google.api.http) = {
  259. patch: "/v2/{name=*/*/locations/*/buckets/*/views/*}"
  260. body: "view"
  261. additional_bindings {
  262. patch: "/v2/{name=projects/*/locations/*/buckets/*/views/*}"
  263. body: "view"
  264. }
  265. additional_bindings {
  266. patch: "/v2/{name=organizations/*/locations/*/buckets/*/views/*}"
  267. body: "view"
  268. }
  269. additional_bindings {
  270. patch: "/v2/{name=folders/*/locations/*/buckets/*/views/*}"
  271. body: "view"
  272. }
  273. additional_bindings {
  274. patch: "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}"
  275. body: "view"
  276. }
  277. };
  278. }
  279. // Deletes a view on a log bucket.
  280. // If an `UNAVAILABLE` error is returned, this indicates that system is not in
  281. // a state where it can delete the view. If this occurs, please try again in a
  282. // few minutes.
  283. rpc DeleteView(DeleteViewRequest) returns (google.protobuf.Empty) {
  284. option (google.api.http) = {
  285. delete: "/v2/{name=*/*/locations/*/buckets/*/views/*}"
  286. additional_bindings {
  287. delete: "/v2/{name=projects/*/locations/*/buckets/*/views/*}"
  288. }
  289. additional_bindings {
  290. delete: "/v2/{name=organizations/*/locations/*/buckets/*/views/*}"
  291. }
  292. additional_bindings {
  293. delete: "/v2/{name=folders/*/locations/*/buckets/*/views/*}"
  294. }
  295. additional_bindings {
  296. delete: "/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}"
  297. }
  298. };
  299. }
  300. // Lists sinks.
  301. rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) {
  302. option (google.api.http) = {
  303. get: "/v2/{parent=*/*}/sinks"
  304. additional_bindings {
  305. get: "/v2/{parent=projects/*}/sinks"
  306. }
  307. additional_bindings {
  308. get: "/v2/{parent=organizations/*}/sinks"
  309. }
  310. additional_bindings {
  311. get: "/v2/{parent=folders/*}/sinks"
  312. }
  313. additional_bindings {
  314. get: "/v2/{parent=billingAccounts/*}/sinks"
  315. }
  316. };
  317. option (google.api.method_signature) = "parent";
  318. }
  319. // Gets a sink.
  320. rpc GetSink(GetSinkRequest) returns (LogSink) {
  321. option (google.api.http) = {
  322. get: "/v2/{sink_name=*/*/sinks/*}"
  323. additional_bindings {
  324. get: "/v2/{sink_name=projects/*/sinks/*}"
  325. }
  326. additional_bindings {
  327. get: "/v2/{sink_name=organizations/*/sinks/*}"
  328. }
  329. additional_bindings {
  330. get: "/v2/{sink_name=folders/*/sinks/*}"
  331. }
  332. additional_bindings {
  333. get: "/v2/{sink_name=billingAccounts/*/sinks/*}"
  334. }
  335. };
  336. option (google.api.method_signature) = "sink_name";
  337. }
  338. // Creates a sink that exports specified log entries to a destination. The
  339. // export of newly-ingested log entries begins immediately, unless the sink's
  340. // `writer_identity` is not permitted to write to the destination. A sink can
  341. // export log entries only from the resource owning the sink.
  342. rpc CreateSink(CreateSinkRequest) returns (LogSink) {
  343. option (google.api.http) = {
  344. post: "/v2/{parent=*/*}/sinks"
  345. body: "sink"
  346. additional_bindings {
  347. post: "/v2/{parent=projects/*}/sinks"
  348. body: "sink"
  349. }
  350. additional_bindings {
  351. post: "/v2/{parent=organizations/*}/sinks"
  352. body: "sink"
  353. }
  354. additional_bindings {
  355. post: "/v2/{parent=folders/*}/sinks"
  356. body: "sink"
  357. }
  358. additional_bindings {
  359. post: "/v2/{parent=billingAccounts/*}/sinks"
  360. body: "sink"
  361. }
  362. };
  363. option (google.api.method_signature) = "parent,sink";
  364. }
  365. // Updates a sink. This method replaces the following fields in the existing
  366. // sink with values from the new sink: `destination`, and `filter`.
  367. //
  368. // The updated sink might also have a new `writer_identity`; see the
  369. // `unique_writer_identity` field.
  370. rpc UpdateSink(UpdateSinkRequest) returns (LogSink) {
  371. option (google.api.http) = {
  372. put: "/v2/{sink_name=*/*/sinks/*}"
  373. body: "sink"
  374. additional_bindings {
  375. put: "/v2/{sink_name=projects/*/sinks/*}"
  376. body: "sink"
  377. }
  378. additional_bindings {
  379. put: "/v2/{sink_name=organizations/*/sinks/*}"
  380. body: "sink"
  381. }
  382. additional_bindings {
  383. put: "/v2/{sink_name=folders/*/sinks/*}"
  384. body: "sink"
  385. }
  386. additional_bindings {
  387. put: "/v2/{sink_name=billingAccounts/*/sinks/*}"
  388. body: "sink"
  389. }
  390. additional_bindings {
  391. patch: "/v2/{sink_name=projects/*/sinks/*}"
  392. body: "sink"
  393. }
  394. additional_bindings {
  395. patch: "/v2/{sink_name=organizations/*/sinks/*}"
  396. body: "sink"
  397. }
  398. additional_bindings {
  399. patch: "/v2/{sink_name=folders/*/sinks/*}"
  400. body: "sink"
  401. }
  402. additional_bindings {
  403. patch: "/v2/{sink_name=billingAccounts/*/sinks/*}"
  404. body: "sink"
  405. }
  406. };
  407. option (google.api.method_signature) = "sink_name,sink,update_mask";
  408. option (google.api.method_signature) = "sink_name,sink";
  409. }
  410. // Deletes a sink. If the sink has a unique `writer_identity`, then that
  411. // service account is also deleted.
  412. rpc DeleteSink(DeleteSinkRequest) returns (google.protobuf.Empty) {
  413. option (google.api.http) = {
  414. delete: "/v2/{sink_name=*/*/sinks/*}"
  415. additional_bindings {
  416. delete: "/v2/{sink_name=projects/*/sinks/*}"
  417. }
  418. additional_bindings {
  419. delete: "/v2/{sink_name=organizations/*/sinks/*}"
  420. }
  421. additional_bindings {
  422. delete: "/v2/{sink_name=folders/*/sinks/*}"
  423. }
  424. additional_bindings {
  425. delete: "/v2/{sink_name=billingAccounts/*/sinks/*}"
  426. }
  427. };
  428. option (google.api.method_signature) = "sink_name";
  429. }
  430. // Lists all the exclusions on the _Default sink in a parent resource.
  431. rpc ListExclusions(ListExclusionsRequest) returns (ListExclusionsResponse) {
  432. option (google.api.http) = {
  433. get: "/v2/{parent=*/*}/exclusions"
  434. additional_bindings {
  435. get: "/v2/{parent=projects/*}/exclusions"
  436. }
  437. additional_bindings {
  438. get: "/v2/{parent=organizations/*}/exclusions"
  439. }
  440. additional_bindings {
  441. get: "/v2/{parent=folders/*}/exclusions"
  442. }
  443. additional_bindings {
  444. get: "/v2/{parent=billingAccounts/*}/exclusions"
  445. }
  446. };
  447. option (google.api.method_signature) = "parent";
  448. }
  449. // Gets the description of an exclusion in the _Default sink.
  450. rpc GetExclusion(GetExclusionRequest) returns (LogExclusion) {
  451. option (google.api.http) = {
  452. get: "/v2/{name=*/*/exclusions/*}"
  453. additional_bindings {
  454. get: "/v2/{name=projects/*/exclusions/*}"
  455. }
  456. additional_bindings {
  457. get: "/v2/{name=organizations/*/exclusions/*}"
  458. }
  459. additional_bindings {
  460. get: "/v2/{name=folders/*/exclusions/*}"
  461. }
  462. additional_bindings {
  463. get: "/v2/{name=billingAccounts/*/exclusions/*}"
  464. }
  465. };
  466. option (google.api.method_signature) = "name";
  467. }
  468. // Creates a new exclusion in the _Default sink in a specified parent
  469. // resource. Only log entries belonging to that resource can be excluded. You
  470. // can have up to 10 exclusions in a resource.
  471. rpc CreateExclusion(CreateExclusionRequest) returns (LogExclusion) {
  472. option (google.api.http) = {
  473. post: "/v2/{parent=*/*}/exclusions"
  474. body: "exclusion"
  475. additional_bindings {
  476. post: "/v2/{parent=projects/*}/exclusions"
  477. body: "exclusion"
  478. }
  479. additional_bindings {
  480. post: "/v2/{parent=organizations/*}/exclusions"
  481. body: "exclusion"
  482. }
  483. additional_bindings {
  484. post: "/v2/{parent=folders/*}/exclusions"
  485. body: "exclusion"
  486. }
  487. additional_bindings {
  488. post: "/v2/{parent=billingAccounts/*}/exclusions"
  489. body: "exclusion"
  490. }
  491. };
  492. option (google.api.method_signature) = "parent,exclusion";
  493. }
  494. // Changes one or more properties of an existing exclusion in the _Default
  495. // sink.
  496. rpc UpdateExclusion(UpdateExclusionRequest) returns (LogExclusion) {
  497. option (google.api.http) = {
  498. patch: "/v2/{name=*/*/exclusions/*}"
  499. body: "exclusion"
  500. additional_bindings {
  501. patch: "/v2/{name=projects/*/exclusions/*}"
  502. body: "exclusion"
  503. }
  504. additional_bindings {
  505. patch: "/v2/{name=organizations/*/exclusions/*}"
  506. body: "exclusion"
  507. }
  508. additional_bindings {
  509. patch: "/v2/{name=folders/*/exclusions/*}"
  510. body: "exclusion"
  511. }
  512. additional_bindings {
  513. patch: "/v2/{name=billingAccounts/*/exclusions/*}"
  514. body: "exclusion"
  515. }
  516. };
  517. option (google.api.method_signature) = "name,exclusion,update_mask";
  518. }
  519. // Deletes an exclusion in the _Default sink.
  520. rpc DeleteExclusion(DeleteExclusionRequest) returns (google.protobuf.Empty) {
  521. option (google.api.http) = {
  522. delete: "/v2/{name=*/*/exclusions/*}"
  523. additional_bindings {
  524. delete: "/v2/{name=projects/*/exclusions/*}"
  525. }
  526. additional_bindings {
  527. delete: "/v2/{name=organizations/*/exclusions/*}"
  528. }
  529. additional_bindings {
  530. delete: "/v2/{name=folders/*/exclusions/*}"
  531. }
  532. additional_bindings {
  533. delete: "/v2/{name=billingAccounts/*/exclusions/*}"
  534. }
  535. };
  536. option (google.api.method_signature) = "name";
  537. }
  538. // Gets the Logging CMEK settings for the given resource.
  539. //
  540. // Note: CMEK for the Log Router can be configured for Google Cloud projects,
  541. // folders, organizations and billing accounts. Once configured for an
  542. // organization, it applies to all projects and folders in the Google Cloud
  543. // organization.
  544. //
  545. // See [Enabling CMEK for Log
  546. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  547. // for more information.
  548. rpc GetCmekSettings(GetCmekSettingsRequest) returns (CmekSettings) {
  549. option (google.api.http) = {
  550. get: "/v2/{name=*/*}/cmekSettings"
  551. additional_bindings {
  552. get: "/v2/{name=projects/*}/cmekSettings"
  553. }
  554. additional_bindings {
  555. get: "/v2/{name=organizations/*}/cmekSettings"
  556. }
  557. additional_bindings {
  558. get: "/v2/{name=folders/*}/cmekSettings"
  559. }
  560. additional_bindings {
  561. get: "/v2/{name=billingAccounts/*}/cmekSettings"
  562. }
  563. };
  564. }
  565. // Updates the Log Router CMEK settings for the given resource.
  566. //
  567. // Note: CMEK for the Log Router can currently only be configured for Google
  568. // Cloud organizations. Once configured, it applies to all projects and
  569. // folders in the Google Cloud organization.
  570. //
  571. // [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]
  572. // will fail if 1) `kms_key_name` is invalid, or 2) the associated service
  573. // account does not have the required
  574. // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or
  575. // 3) access to the key is disabled.
  576. //
  577. // See [Enabling CMEK for Log
  578. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  579. // for more information.
  580. rpc UpdateCmekSettings(UpdateCmekSettingsRequest) returns (CmekSettings) {
  581. option (google.api.http) = {
  582. patch: "/v2/{name=*/*}/cmekSettings"
  583. body: "cmek_settings"
  584. additional_bindings {
  585. patch: "/v2/{name=organizations/*}/cmekSettings"
  586. body: "cmek_settings"
  587. }
  588. };
  589. }
  590. // Gets the Log Router settings for the given resource.
  591. //
  592. // Note: Settings for the Log Router can be get for Google Cloud projects,
  593. // folders, organizations and billing accounts. Currently it can only be
  594. // configured for organizations. Once configured for an organization, it
  595. // applies to all projects and folders in the Google Cloud organization.
  596. //
  597. // See [Enabling CMEK for Log
  598. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  599. // for more information.
  600. rpc GetSettings(GetSettingsRequest) returns (Settings) {
  601. option (google.api.http) = {
  602. get: "/v2/{name=*/*}/settings"
  603. additional_bindings {
  604. get: "/v2/{name=projects/*}/settings"
  605. }
  606. additional_bindings {
  607. get: "/v2/{name=organizations/*}/settings"
  608. }
  609. additional_bindings {
  610. get: "/v2/{name=folders/*}/settings"
  611. }
  612. additional_bindings {
  613. get: "/v2/{name=billingAccounts/*}/settings"
  614. }
  615. };
  616. option (google.api.method_signature) = "name";
  617. }
  618. // Updates the Log Router settings for the given resource.
  619. //
  620. // Note: Settings for the Log Router can currently only be configured for
  621. // Google Cloud organizations. Once configured, it applies to all projects and
  622. // folders in the Google Cloud organization.
  623. //
  624. // [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings]
  625. // will fail if 1) `kms_key_name` is invalid, or 2) the associated service
  626. // account does not have the required
  627. // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or
  628. // 3) access to the key is disabled. 4) `location_id` is not supported by
  629. // Logging. 5) `location_id` violate OrgPolicy.
  630. //
  631. // See [Enabling CMEK for Log
  632. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  633. // for more information.
  634. rpc UpdateSettings(UpdateSettingsRequest) returns (Settings) {
  635. option (google.api.http) = {
  636. patch: "/v2/{name=*/*}/settings"
  637. body: "settings"
  638. additional_bindings {
  639. patch: "/v2/{name=organizations/*}/settings"
  640. body: "settings"
  641. }
  642. additional_bindings {
  643. patch: "/v2/{name=folders/*}/settings"
  644. body: "settings"
  645. }
  646. };
  647. option (google.api.method_signature) = "settings,update_mask";
  648. }
  649. // Copies a set of log entries from a log bucket to a Cloud Storage bucket.
  650. rpc CopyLogEntries(CopyLogEntriesRequest) returns (google.longrunning.Operation) {
  651. option (google.api.http) = {
  652. post: "/v2/entries:copy"
  653. body: "*"
  654. };
  655. option (google.longrunning.operation_info) = {
  656. response_type: "CopyLogEntriesResponse"
  657. metadata_type: "CopyLogEntriesMetadata"
  658. };
  659. }
  660. }
  661. // Describes a repository in which log entries are stored.
  662. message LogBucket {
  663. option (google.api.resource) = {
  664. type: "logging.googleapis.com/LogBucket"
  665. pattern: "projects/{project}/locations/{location}/buckets/{bucket}"
  666. pattern: "organizations/{organization}/locations/{location}/buckets/{bucket}"
  667. pattern: "folders/{folder}/locations/{location}/buckets/{bucket}"
  668. pattern: "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}"
  669. };
  670. // Output only. The resource name of the bucket.
  671. //
  672. // For example:
  673. //
  674. // `projects/my-project/locations/global/buckets/my-bucket`
  675. //
  676. // For a list of supported locations, see [Supported
  677. // Regions](https://cloud.google.com/logging/docs/region-support)
  678. //
  679. // For the location of `global` it is unspecified where log entries are
  680. // actually stored.
  681. //
  682. // After a bucket has been created, the location cannot be changed.
  683. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  684. // Describes this bucket.
  685. string description = 3;
  686. // Output only. The creation timestamp of the bucket. This is not set for any of the
  687. // default buckets.
  688. google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  689. // Output only. The last update timestamp of the bucket.
  690. google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  691. // Logs will be retained by default for this amount of time, after which they
  692. // will automatically be deleted. The minimum retention period is 1 day. If
  693. // this value is set to zero at bucket creation time, the default time of 30
  694. // days will be used.
  695. int32 retention_days = 11;
  696. // Whether the bucket is locked.
  697. //
  698. // The retention period on a locked bucket cannot be changed. Locked buckets
  699. // may only be deleted if they are empty.
  700. bool locked = 9;
  701. // Output only. The bucket lifecycle state.
  702. LifecycleState lifecycle_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  703. // Log entry field paths that are denied access in this bucket.
  704. //
  705. // The following fields and their children are eligible: `textPayload`,
  706. // `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`.
  707. //
  708. // Restricting a repeated field will restrict all values. Adding a parent will
  709. // block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`)
  710. repeated string restricted_fields = 15;
  711. // The CMEK settings of the log bucket. If present, new log entries written to
  712. // this log bucket are encrypted using the CMEK key provided in this
  713. // configuration. If a log bucket has CMEK settings, the CMEK settings cannot
  714. // be disabled later by updating the log bucket. Changing the KMS key is
  715. // allowed.
  716. CmekSettings cmek_settings = 19;
  717. }
  718. // Describes a view over log entries in a bucket.
  719. message LogView {
  720. option (google.api.resource) = {
  721. type: "logging.googleapis.com/LogView"
  722. pattern: "projects/{project}/locations/{location}/buckets/{bucket}/views/{view}"
  723. pattern: "organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}"
  724. pattern: "folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}"
  725. pattern: "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}"
  726. };
  727. // The resource name of the view.
  728. //
  729. // For example:
  730. //
  731. // `projects/my-project/locations/global/buckets/my-bucket/views/my-view`
  732. string name = 1;
  733. // Describes this view.
  734. string description = 3;
  735. // Output only. The creation timestamp of the view.
  736. google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  737. // Output only. The last update timestamp of the view.
  738. google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  739. // Filter that restricts which log entries in a bucket are visible in this
  740. // view.
  741. //
  742. // Filters are restricted to be a logical AND of ==/!= of any of the
  743. // following:
  744. //
  745. // - originating project/folder/organization/billing account.
  746. // - resource type
  747. // - log id
  748. //
  749. // For example:
  750. //
  751. // SOURCE("projects/myproject") AND resource.type = "gce_instance"
  752. // AND LOG_ID("stdout")
  753. string filter = 7;
  754. }
  755. // Describes a sink used to export log entries to one of the following
  756. // destinations in any project: a Cloud Storage bucket, a BigQuery dataset, a
  757. // Pub/Sub topic or a Cloud Logging log bucket. A logs filter controls which log
  758. // entries are exported. The sink must be created within a project,
  759. // organization, billing account, or folder.
  760. message LogSink {
  761. option (google.api.resource) = {
  762. type: "logging.googleapis.com/LogSink"
  763. pattern: "projects/{project}/sinks/{sink}"
  764. pattern: "organizations/{organization}/sinks/{sink}"
  765. pattern: "folders/{folder}/sinks/{sink}"
  766. pattern: "billingAccounts/{billing_account}/sinks/{sink}"
  767. };
  768. // Deprecated. This is unused.
  769. enum VersionFormat {
  770. // An unspecified format version that will default to V2.
  771. VERSION_FORMAT_UNSPECIFIED = 0;
  772. // `LogEntry` version 2 format.
  773. V2 = 1;
  774. // `LogEntry` version 1 format.
  775. V1 = 2;
  776. }
  777. // Required. The client-assigned sink identifier, unique within the project.
  778. //
  779. // For example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited
  780. // to 100 characters and can include only the following characters: upper and
  781. // lower-case alphanumeric characters, underscores, hyphens, and periods.
  782. // First character has to be alphanumeric.
  783. string name = 1 [(google.api.field_behavior) = REQUIRED];
  784. // Required. The export destination:
  785. //
  786. // "storage.googleapis.com/[GCS_BUCKET]"
  787. // "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
  788. // "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
  789. //
  790. // The sink's `writer_identity`, set when the sink is created, must have
  791. // permission to write to the destination or else the log entries are not
  792. // exported. For more information, see
  793. // [Exporting Logs with
  794. // Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).
  795. string destination = 3 [
  796. (google.api.field_behavior) = REQUIRED,
  797. (google.api.resource_reference) = {
  798. type: "*"
  799. }
  800. ];
  801. // Optional. An [advanced logs
  802. // filter](https://cloud.google.com/logging/docs/view/advanced-queries). The
  803. // only exported log entries are those that are in the resource owning the
  804. // sink and that match the filter.
  805. //
  806. // For example:
  807. //
  808. // `logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR`
  809. string filter = 5 [(google.api.field_behavior) = OPTIONAL];
  810. // Optional. A description of this sink.
  811. //
  812. // The maximum length of the description is 8000 characters.
  813. string description = 18 [(google.api.field_behavior) = OPTIONAL];
  814. // Optional. If set to true, then this sink is disabled and it does not export any log
  815. // entries.
  816. bool disabled = 19 [(google.api.field_behavior) = OPTIONAL];
  817. // Optional. Log entries that match any of these exclusion filters will not be exported.
  818. //
  819. // If a log entry is matched by both `filter` and one of `exclusion_filters`
  820. // it will not be exported.
  821. repeated LogExclusion exclusions = 16 [(google.api.field_behavior) = OPTIONAL];
  822. // Deprecated. This field is unused.
  823. VersionFormat output_version_format = 6 [deprecated = true];
  824. // Output only. An IAM identity—a service account or group—under which Cloud
  825. // Logging writes the exported log entries to the sink's destination. This
  826. // field is set by
  827. // [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and
  828. // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the
  829. // value of `unique_writer_identity` in those methods.
  830. //
  831. // Until you grant this identity write-access to the destination, log entry
  832. // exports from this sink will fail. For more information, see [Granting
  833. // Access for a
  834. // Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
  835. // Consult the destination service's documentation to determine the
  836. // appropriate IAM roles to assign to the identity.
  837. //
  838. // Sinks that have a destination that is a log bucket in the same project as
  839. // the sink do not have a writer_identity and no additional permissions are
  840. // required.
  841. string writer_identity = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  842. // Optional. This field applies only to sinks owned by organizations and folders. If the
  843. // field is false, the default, only the logs owned by the sink's parent
  844. // resource are available for export. If the field is true, then log entries
  845. // from all the projects, folders, and billing accounts contained in the
  846. // sink's parent resource are also available for export. Whether a particular
  847. // log entry from the children is exported depends on the sink's filter
  848. // expression.
  849. //
  850. // For example, if this field is true, then the filter
  851. // `resource.type=gce_instance` would export all Compute Engine VM instance
  852. // log entries from all projects in the sink's parent.
  853. //
  854. // To only export entries from certain child projects, filter on the project
  855. // part of the log name:
  856. //
  857. // logName:("projects/test-project1/" OR "projects/test-project2/") AND
  858. // resource.type=gce_instance
  859. bool include_children = 9 [(google.api.field_behavior) = OPTIONAL];
  860. // Destination dependent options.
  861. oneof options {
  862. // Optional. Options that affect sinks exporting data to BigQuery.
  863. BigQueryOptions bigquery_options = 12 [(google.api.field_behavior) = OPTIONAL];
  864. }
  865. // Output only. The creation timestamp of the sink.
  866. //
  867. // This field may not be present for older sinks.
  868. google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  869. // Output only. The last update timestamp of the sink.
  870. //
  871. // This field may not be present for older sinks.
  872. google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
  873. }
  874. // Options that change functionality of a sink exporting data to BigQuery.
  875. message BigQueryOptions {
  876. // Optional. Whether to use [BigQuery's partition
  877. // tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By
  878. // default, Cloud Logging creates dated tables based on the log entries'
  879. // timestamps, e.g. syslog_20170523. With partitioned tables the date suffix
  880. // is no longer present and [special query
  881. // syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables)
  882. // has to be used instead. In both cases, tables are sharded based on UTC
  883. // timezone.
  884. bool use_partitioned_tables = 1 [(google.api.field_behavior) = OPTIONAL];
  885. // Output only. True if new timestamp column based partitioning is in use, false if legacy
  886. // ingestion-time partitioning is in use.
  887. //
  888. // All new sinks will have this field set true and will use timestamp column
  889. // based partitioning. If use_partitioned_tables is false, this value has no
  890. // meaning and will be false. Legacy sinks using partitioned tables will have
  891. // this field set to false.
  892. bool uses_timestamp_column_partitioning = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  893. }
  894. // The parameters to `ListBuckets`.
  895. message ListBucketsRequest {
  896. // Required. The parent resource whose buckets are to be listed:
  897. //
  898. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
  899. // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
  900. // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
  901. // "folders/[FOLDER_ID]/locations/[LOCATION_ID]"
  902. //
  903. // Note: The locations portion of the resource must be specified, but
  904. // supplying the character `-` in place of [LOCATION_ID] will return all
  905. // buckets.
  906. string parent = 1 [
  907. (google.api.field_behavior) = REQUIRED,
  908. (google.api.resource_reference) = {
  909. child_type: "logging.googleapis.com/LogBucket"
  910. }
  911. ];
  912. // Optional. If present, then retrieve the next batch of results from the preceding call
  913. // to this method. `pageToken` must be the value of `nextPageToken` from the
  914. // previous response. The values of other method parameters should be
  915. // identical to those in the previous call.
  916. string page_token = 2 [(google.api.field_behavior) = OPTIONAL];
  917. // Optional. The maximum number of results to return from this request. Non-positive
  918. // values are ignored. The presence of `nextPageToken` in the response
  919. // indicates that more results might be available.
  920. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
  921. }
  922. // The response from ListBuckets.
  923. message ListBucketsResponse {
  924. // A list of buckets.
  925. repeated LogBucket buckets = 1;
  926. // If there might be more results than appear in this response, then
  927. // `nextPageToken` is included. To get the next set of results, call the same
  928. // method again using the value of `nextPageToken` as `pageToken`.
  929. string next_page_token = 2;
  930. }
  931. // The parameters to `CreateBucket`.
  932. message CreateBucketRequest {
  933. // Required. The resource in which to create the log bucket:
  934. //
  935. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
  936. //
  937. // For example:
  938. //
  939. // `"projects/my-project/locations/global"`
  940. string parent = 1 [
  941. (google.api.field_behavior) = REQUIRED,
  942. (google.api.resource_reference) = {
  943. child_type: "logging.googleapis.com/LogBucket"
  944. }
  945. ];
  946. // Required. A client-assigned identifier such as `"my-bucket"`. Identifiers are limited
  947. // to 100 characters and can include only letters, digits, underscores,
  948. // hyphens, and periods.
  949. string bucket_id = 2 [(google.api.field_behavior) = REQUIRED];
  950. // Required. The new bucket. The region specified in the new bucket must be compliant
  951. // with any Location Restriction Org Policy. The name field in the bucket is
  952. // ignored.
  953. LogBucket bucket = 3 [(google.api.field_behavior) = REQUIRED];
  954. }
  955. // The parameters to `UpdateBucket`.
  956. message UpdateBucketRequest {
  957. // Required. The full resource name of the bucket to update.
  958. //
  959. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  960. // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  961. // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  962. // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  963. //
  964. // For example:
  965. //
  966. // `"projects/my-project/locations/global/buckets/my-bucket"`
  967. string name = 1 [
  968. (google.api.field_behavior) = REQUIRED,
  969. (google.api.resource_reference) = {
  970. type: "logging.googleapis.com/LogBucket"
  971. }
  972. ];
  973. // Required. The updated bucket.
  974. LogBucket bucket = 2 [(google.api.field_behavior) = REQUIRED];
  975. // Required. Field mask that specifies the fields in `bucket` that need an update. A
  976. // bucket field will be overwritten if, and only if, it is in the update mask.
  977. // `name` and output only fields cannot be updated.
  978. //
  979. // For a detailed `FieldMask` definition, see:
  980. // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
  981. //
  982. // For example: `updateMask=retention_days`
  983. google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED];
  984. }
  985. // The parameters to `GetBucket`.
  986. message GetBucketRequest {
  987. // Required. The resource name of the bucket:
  988. //
  989. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  990. // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  991. // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  992. // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  993. //
  994. // For example:
  995. //
  996. // `"projects/my-project/locations/global/buckets/my-bucket"`
  997. string name = 1 [
  998. (google.api.field_behavior) = REQUIRED,
  999. (google.api.resource_reference) = {
  1000. type: "logging.googleapis.com/LogBucket"
  1001. }
  1002. ];
  1003. }
  1004. // The parameters to `DeleteBucket`.
  1005. message DeleteBucketRequest {
  1006. // Required. The full resource name of the bucket to delete.
  1007. //
  1008. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  1009. // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  1010. // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  1011. // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  1012. //
  1013. // For example:
  1014. //
  1015. // `"projects/my-project/locations/global/buckets/my-bucket"`
  1016. string name = 1 [
  1017. (google.api.field_behavior) = REQUIRED,
  1018. (google.api.resource_reference) = {
  1019. type: "logging.googleapis.com/LogBucket"
  1020. }
  1021. ];
  1022. }
  1023. // The parameters to `UndeleteBucket`.
  1024. message UndeleteBucketRequest {
  1025. // Required. The full resource name of the bucket to undelete.
  1026. //
  1027. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  1028. // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  1029. // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  1030. // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  1031. //
  1032. // For example:
  1033. //
  1034. // `"projects/my-project/locations/global/buckets/my-bucket"`
  1035. string name = 1 [
  1036. (google.api.field_behavior) = REQUIRED,
  1037. (google.api.resource_reference) = {
  1038. type: "logging.googleapis.com/LogBucket"
  1039. }
  1040. ];
  1041. }
  1042. // The parameters to `ListViews`.
  1043. message ListViewsRequest {
  1044. // Required. The bucket whose views are to be listed:
  1045. //
  1046. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
  1047. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  1048. // Optional. If present, then retrieve the next batch of results from the preceding call
  1049. // to this method. `pageToken` must be the value of `nextPageToken` from the
  1050. // previous response. The values of other method parameters should be
  1051. // identical to those in the previous call.
  1052. string page_token = 2 [(google.api.field_behavior) = OPTIONAL];
  1053. // Optional. The maximum number of results to return from this request.
  1054. //
  1055. // Non-positive values are ignored. The presence of `nextPageToken` in the
  1056. // response indicates that more results might be available.
  1057. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
  1058. }
  1059. // The response from ListViews.
  1060. message ListViewsResponse {
  1061. // A list of views.
  1062. repeated LogView views = 1;
  1063. // If there might be more results than appear in this response, then
  1064. // `nextPageToken` is included. To get the next set of results, call the same
  1065. // method again using the value of `nextPageToken` as `pageToken`.
  1066. string next_page_token = 2;
  1067. }
  1068. // The parameters to `CreateView`.
  1069. message CreateViewRequest {
  1070. // Required. The bucket in which to create the view
  1071. //
  1072. // `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"`
  1073. //
  1074. // For example:
  1075. //
  1076. // `"projects/my-project/locations/global/buckets/my-bucket"`
  1077. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  1078. // Required. The id to use for this view.
  1079. string view_id = 2 [(google.api.field_behavior) = REQUIRED];
  1080. // Required. The new view.
  1081. LogView view = 3 [(google.api.field_behavior) = REQUIRED];
  1082. }
  1083. // The parameters to `UpdateView`.
  1084. message UpdateViewRequest {
  1085. // Required. The full resource name of the view to update
  1086. //
  1087. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
  1088. //
  1089. // For example:
  1090. //
  1091. // `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"`
  1092. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1093. // Required. The updated view.
  1094. LogView view = 2 [(google.api.field_behavior) = REQUIRED];
  1095. // Optional. Field mask that specifies the fields in `view` that need
  1096. // an update. A field will be overwritten if, and only if, it is
  1097. // in the update mask. `name` and output only fields cannot be updated.
  1098. //
  1099. // For a detailed `FieldMask` definition, see
  1100. // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
  1101. //
  1102. // For example: `updateMask=filter`
  1103. google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL];
  1104. }
  1105. // The parameters to `GetView`.
  1106. message GetViewRequest {
  1107. // Required. The resource name of the policy:
  1108. //
  1109. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
  1110. //
  1111. // For example:
  1112. //
  1113. // `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"`
  1114. string name = 1 [
  1115. (google.api.field_behavior) = REQUIRED,
  1116. (google.api.resource_reference) = {
  1117. type: "logging.googleapis.com/LogView"
  1118. }
  1119. ];
  1120. }
  1121. // The parameters to `DeleteView`.
  1122. message DeleteViewRequest {
  1123. // Required. The full resource name of the view to delete:
  1124. //
  1125. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
  1126. //
  1127. // For example:
  1128. //
  1129. // `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"`
  1130. string name = 1 [
  1131. (google.api.field_behavior) = REQUIRED,
  1132. (google.api.resource_reference) = {
  1133. type: "logging.googleapis.com/LogView"
  1134. }
  1135. ];
  1136. }
  1137. // The parameters to `ListSinks`.
  1138. message ListSinksRequest {
  1139. // Required. The parent resource whose sinks are to be listed:
  1140. //
  1141. // "projects/[PROJECT_ID]"
  1142. // "organizations/[ORGANIZATION_ID]"
  1143. // "billingAccounts/[BILLING_ACCOUNT_ID]"
  1144. // "folders/[FOLDER_ID]"
  1145. string parent = 1 [
  1146. (google.api.field_behavior) = REQUIRED,
  1147. (google.api.resource_reference) = {
  1148. child_type: "logging.googleapis.com/LogSink"
  1149. }
  1150. ];
  1151. // Optional. If present, then retrieve the next batch of results from the
  1152. // preceding call to this method. `pageToken` must be the value of
  1153. // `nextPageToken` from the previous response. The values of other method
  1154. // parameters should be identical to those in the previous call.
  1155. string page_token = 2 [(google.api.field_behavior) = OPTIONAL];
  1156. // Optional. The maximum number of results to return from this request.
  1157. // Non-positive values are ignored. The presence of `nextPageToken` in the
  1158. // response indicates that more results might be available.
  1159. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
  1160. }
  1161. // Result returned from `ListSinks`.
  1162. message ListSinksResponse {
  1163. // A list of sinks.
  1164. repeated LogSink sinks = 1;
  1165. // If there might be more results than appear in this response, then
  1166. // `nextPageToken` is included. To get the next set of results, call the same
  1167. // method again using the value of `nextPageToken` as `pageToken`.
  1168. string next_page_token = 2;
  1169. }
  1170. // The parameters to `GetSink`.
  1171. message GetSinkRequest {
  1172. // Required. The resource name of the sink:
  1173. //
  1174. // "projects/[PROJECT_ID]/sinks/[SINK_ID]"
  1175. // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
  1176. // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
  1177. // "folders/[FOLDER_ID]/sinks/[SINK_ID]"
  1178. //
  1179. // For example:
  1180. //
  1181. // `"projects/my-project/sinks/my-sink"`
  1182. string sink_name = 1 [
  1183. (google.api.field_behavior) = REQUIRED,
  1184. (google.api.resource_reference) = {
  1185. type: "logging.googleapis.com/LogSink"
  1186. }
  1187. ];
  1188. }
  1189. // The parameters to `CreateSink`.
  1190. message CreateSinkRequest {
  1191. // Required. The resource in which to create the sink:
  1192. //
  1193. // "projects/[PROJECT_ID]"
  1194. // "organizations/[ORGANIZATION_ID]"
  1195. // "billingAccounts/[BILLING_ACCOUNT_ID]"
  1196. // "folders/[FOLDER_ID]"
  1197. //
  1198. // For examples:
  1199. //
  1200. // `"projects/my-project"`
  1201. // `"organizations/123456789"`
  1202. string parent = 1 [
  1203. (google.api.field_behavior) = REQUIRED,
  1204. (google.api.resource_reference) = {
  1205. child_type: "logging.googleapis.com/LogSink"
  1206. }
  1207. ];
  1208. // Required. The new sink, whose `name` parameter is a sink identifier that
  1209. // is not already in use.
  1210. LogSink sink = 2 [(google.api.field_behavior) = REQUIRED];
  1211. // Optional. Determines the kind of IAM identity returned as `writer_identity`
  1212. // in the new sink. If this value is omitted or set to false, and if the
  1213. // sink's parent is a project, then the value returned as `writer_identity` is
  1214. // the same group or service account used by Cloud Logging before the addition
  1215. // of writer identities to this API. The sink's destination must be in the
  1216. // same project as the sink itself.
  1217. //
  1218. // If this field is set to true, or if the sink is owned by a non-project
  1219. // resource such as an organization, then the value of `writer_identity` will
  1220. // be a unique service account used only for exports from the new sink. For
  1221. // more information, see `writer_identity` in [LogSink][google.logging.v2.LogSink].
  1222. bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL];
  1223. }
  1224. // The parameters to `UpdateSink`.
  1225. message UpdateSinkRequest {
  1226. // Required. The full resource name of the sink to update, including the parent
  1227. // resource and the sink identifier:
  1228. //
  1229. // "projects/[PROJECT_ID]/sinks/[SINK_ID]"
  1230. // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
  1231. // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
  1232. // "folders/[FOLDER_ID]/sinks/[SINK_ID]"
  1233. //
  1234. // For example:
  1235. //
  1236. // `"projects/my-project/sinks/my-sink"`
  1237. string sink_name = 1 [
  1238. (google.api.field_behavior) = REQUIRED,
  1239. (google.api.resource_reference) = {
  1240. type: "logging.googleapis.com/LogSink"
  1241. }
  1242. ];
  1243. // Required. The updated sink, whose name is the same identifier that appears as part
  1244. // of `sink_name`.
  1245. LogSink sink = 2 [(google.api.field_behavior) = REQUIRED];
  1246. // Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
  1247. // for a description of this field. When updating a sink, the effect of this
  1248. // field on the value of `writer_identity` in the updated sink depends on both
  1249. // the old and new values of this field:
  1250. //
  1251. // + If the old and new values of this field are both false or both true,
  1252. // then there is no change to the sink's `writer_identity`.
  1253. // + If the old value is false and the new value is true, then
  1254. // `writer_identity` is changed to a unique service account.
  1255. // + It is an error if the old value is true and the new value is
  1256. // set to false or defaulted to false.
  1257. bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL];
  1258. // Optional. Field mask that specifies the fields in `sink` that need
  1259. // an update. A sink field will be overwritten if, and only if, it is
  1260. // in the update mask. `name` and output only fields cannot be updated.
  1261. //
  1262. // An empty `updateMask` is temporarily treated as using the following mask
  1263. // for backwards compatibility purposes:
  1264. //
  1265. // `destination,filter,includeChildren`
  1266. //
  1267. // At some point in the future, behavior will be removed and specifying an
  1268. // empty `updateMask` will be an error.
  1269. //
  1270. // For a detailed `FieldMask` definition, see
  1271. // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
  1272. //
  1273. // For example: `updateMask=filter`
  1274. google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL];
  1275. }
  1276. // The parameters to `DeleteSink`.
  1277. message DeleteSinkRequest {
  1278. // Required. The full resource name of the sink to delete, including the parent
  1279. // resource and the sink identifier:
  1280. //
  1281. // "projects/[PROJECT_ID]/sinks/[SINK_ID]"
  1282. // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
  1283. // "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
  1284. // "folders/[FOLDER_ID]/sinks/[SINK_ID]"
  1285. //
  1286. // For example:
  1287. //
  1288. // `"projects/my-project/sinks/my-sink"`
  1289. string sink_name = 1 [
  1290. (google.api.field_behavior) = REQUIRED,
  1291. (google.api.resource_reference) = {
  1292. type: "logging.googleapis.com/LogSink"
  1293. }
  1294. ];
  1295. }
  1296. // Specifies a set of log entries that are filtered out by a sink. If
  1297. // your Google Cloud resource receives a large volume of log entries, you can
  1298. // use exclusions to reduce your chargeable logs. Note that exclusions on
  1299. // organization-level and folder-level sinks don't apply to child resources.
  1300. // Note also that you cannot modify the _Required sink or exclude logs from it.
  1301. message LogExclusion {
  1302. option (google.api.resource) = {
  1303. type: "logging.googleapis.com/LogExclusion"
  1304. pattern: "projects/{project}/exclusions/{exclusion}"
  1305. pattern: "organizations/{organization}/exclusions/{exclusion}"
  1306. pattern: "folders/{folder}/exclusions/{exclusion}"
  1307. pattern: "billingAccounts/{billing_account}/exclusions/{exclusion}"
  1308. };
  1309. // Required. A client-assigned identifier, such as `"load-balancer-exclusion"`.
  1310. // Identifiers are limited to 100 characters and can include only letters,
  1311. // digits, underscores, hyphens, and periods. First character has to be
  1312. // alphanumeric.
  1313. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1314. // Optional. A description of this exclusion.
  1315. string description = 2 [(google.api.field_behavior) = OPTIONAL];
  1316. // Required. An [advanced logs
  1317. // filter](https://cloud.google.com/logging/docs/view/advanced-queries) that
  1318. // matches the log entries to be excluded. By using the [sample
  1319. // function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
  1320. // you can exclude less than 100% of the matching log entries.
  1321. //
  1322. // For example, the following query matches 99% of low-severity log entries
  1323. // from Google Cloud Storage buckets:
  1324. //
  1325. // `resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)`
  1326. string filter = 3 [(google.api.field_behavior) = REQUIRED];
  1327. // Optional. If set to True, then this exclusion is disabled and it does not
  1328. // exclude any log entries. You can [update an
  1329. // exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] to change the
  1330. // value of this field.
  1331. bool disabled = 4 [(google.api.field_behavior) = OPTIONAL];
  1332. // Output only. The creation timestamp of the exclusion.
  1333. //
  1334. // This field may not be present for older exclusions.
  1335. google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  1336. // Output only. The last update timestamp of the exclusion.
  1337. //
  1338. // This field may not be present for older exclusions.
  1339. google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  1340. }
  1341. // The parameters to `ListExclusions`.
  1342. message ListExclusionsRequest {
  1343. // Required. The parent resource whose exclusions are to be listed.
  1344. //
  1345. // "projects/[PROJECT_ID]"
  1346. // "organizations/[ORGANIZATION_ID]"
  1347. // "billingAccounts/[BILLING_ACCOUNT_ID]"
  1348. // "folders/[FOLDER_ID]"
  1349. string parent = 1 [
  1350. (google.api.field_behavior) = REQUIRED,
  1351. (google.api.resource_reference) = {
  1352. child_type: "logging.googleapis.com/LogExclusion"
  1353. }
  1354. ];
  1355. // Optional. If present, then retrieve the next batch of results from the
  1356. // preceding call to this method. `pageToken` must be the value of
  1357. // `nextPageToken` from the previous response. The values of other method
  1358. // parameters should be identical to those in the previous call.
  1359. string page_token = 2 [(google.api.field_behavior) = OPTIONAL];
  1360. // Optional. The maximum number of results to return from this request.
  1361. // Non-positive values are ignored. The presence of `nextPageToken` in the
  1362. // response indicates that more results might be available.
  1363. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
  1364. }
  1365. // Result returned from `ListExclusions`.
  1366. message ListExclusionsResponse {
  1367. // A list of exclusions.
  1368. repeated LogExclusion exclusions = 1;
  1369. // If there might be more results than appear in this response, then
  1370. // `nextPageToken` is included. To get the next set of results, call the same
  1371. // method again using the value of `nextPageToken` as `pageToken`.
  1372. string next_page_token = 2;
  1373. }
  1374. // The parameters to `GetExclusion`.
  1375. message GetExclusionRequest {
  1376. // Required. The resource name of an existing exclusion:
  1377. //
  1378. // "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
  1379. // "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
  1380. // "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
  1381. // "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
  1382. //
  1383. // For example:
  1384. //
  1385. // `"projects/my-project/exclusions/my-exclusion"`
  1386. string name = 1 [
  1387. (google.api.field_behavior) = REQUIRED,
  1388. (google.api.resource_reference) = {
  1389. type: "logging.googleapis.com/LogExclusion"
  1390. }
  1391. ];
  1392. }
  1393. // The parameters to `CreateExclusion`.
  1394. message CreateExclusionRequest {
  1395. // Required. The parent resource in which to create the exclusion:
  1396. //
  1397. // "projects/[PROJECT_ID]"
  1398. // "organizations/[ORGANIZATION_ID]"
  1399. // "billingAccounts/[BILLING_ACCOUNT_ID]"
  1400. // "folders/[FOLDER_ID]"
  1401. //
  1402. // For examples:
  1403. //
  1404. // `"projects/my-logging-project"`
  1405. // `"organizations/123456789"`
  1406. string parent = 1 [
  1407. (google.api.field_behavior) = REQUIRED,
  1408. (google.api.resource_reference) = {
  1409. child_type: "logging.googleapis.com/LogExclusion"
  1410. }
  1411. ];
  1412. // Required. The new exclusion, whose `name` parameter is an exclusion name
  1413. // that is not already used in the parent resource.
  1414. LogExclusion exclusion = 2 [(google.api.field_behavior) = REQUIRED];
  1415. }
  1416. // The parameters to `UpdateExclusion`.
  1417. message UpdateExclusionRequest {
  1418. // Required. The resource name of the exclusion to update:
  1419. //
  1420. // "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
  1421. // "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
  1422. // "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
  1423. // "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
  1424. //
  1425. // For example:
  1426. //
  1427. // `"projects/my-project/exclusions/my-exclusion"`
  1428. string name = 1 [
  1429. (google.api.field_behavior) = REQUIRED,
  1430. (google.api.resource_reference) = {
  1431. type: "logging.googleapis.com/LogExclusion"
  1432. }
  1433. ];
  1434. // Required. New values for the existing exclusion. Only the fields specified in
  1435. // `update_mask` are relevant.
  1436. LogExclusion exclusion = 2 [(google.api.field_behavior) = REQUIRED];
  1437. // Required. A non-empty list of fields to change in the existing exclusion. New values
  1438. // for the fields are taken from the corresponding fields in the
  1439. // [LogExclusion][google.logging.v2.LogExclusion] included in this request. Fields not mentioned in
  1440. // `update_mask` are not changed and are ignored in the request.
  1441. //
  1442. // For example, to change the filter and description of an exclusion,
  1443. // specify an `update_mask` of `"filter,description"`.
  1444. google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED];
  1445. }
  1446. // The parameters to `DeleteExclusion`.
  1447. message DeleteExclusionRequest {
  1448. // Required. The resource name of an existing exclusion to delete:
  1449. //
  1450. // "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
  1451. // "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
  1452. // "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
  1453. // "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
  1454. //
  1455. // For example:
  1456. //
  1457. // `"projects/my-project/exclusions/my-exclusion"`
  1458. string name = 1 [
  1459. (google.api.field_behavior) = REQUIRED,
  1460. (google.api.resource_reference) = {
  1461. type: "logging.googleapis.com/LogExclusion"
  1462. }
  1463. ];
  1464. }
  1465. // The parameters to
  1466. // [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings].
  1467. //
  1468. // See [Enabling CMEK for Log
  1469. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for
  1470. // more information.
  1471. message GetCmekSettingsRequest {
  1472. // Required. The resource for which to retrieve CMEK settings.
  1473. //
  1474. // "projects/[PROJECT_ID]/cmekSettings"
  1475. // "organizations/[ORGANIZATION_ID]/cmekSettings"
  1476. // "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
  1477. // "folders/[FOLDER_ID]/cmekSettings"
  1478. //
  1479. // For example:
  1480. //
  1481. // `"organizations/12345/cmekSettings"`
  1482. //
  1483. // Note: CMEK for the Log Router can be configured for Google Cloud projects,
  1484. // folders, organizations and billing accounts. Once configured for an
  1485. // organization, it applies to all projects and folders in the Google Cloud
  1486. // organization.
  1487. string name = 1 [
  1488. (google.api.field_behavior) = REQUIRED,
  1489. (google.api.resource_reference) = {
  1490. type: "logging.googleapis.com/CmekSettings"
  1491. }
  1492. ];
  1493. }
  1494. // The parameters to
  1495. // [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings].
  1496. //
  1497. // See [Enabling CMEK for Log
  1498. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for
  1499. // more information.
  1500. message UpdateCmekSettingsRequest {
  1501. // Required. The resource name for the CMEK settings to update.
  1502. //
  1503. // "projects/[PROJECT_ID]/cmekSettings"
  1504. // "organizations/[ORGANIZATION_ID]/cmekSettings"
  1505. // "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
  1506. // "folders/[FOLDER_ID]/cmekSettings"
  1507. //
  1508. // For example:
  1509. //
  1510. // `"organizations/12345/cmekSettings"`
  1511. //
  1512. // Note: CMEK for the Log Router can currently only be configured for Google
  1513. // Cloud organizations. Once configured, it applies to all projects and
  1514. // folders in the Google Cloud organization.
  1515. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1516. // Required. The CMEK settings to update.
  1517. //
  1518. // See [Enabling CMEK for Log
  1519. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  1520. // for more information.
  1521. CmekSettings cmek_settings = 2 [(google.api.field_behavior) = REQUIRED];
  1522. // Optional. Field mask identifying which fields from `cmek_settings` should
  1523. // be updated. A field will be overwritten if and only if it is in the update
  1524. // mask. Output only fields cannot be updated.
  1525. //
  1526. // See [FieldMask][google.protobuf.FieldMask] for more information.
  1527. //
  1528. // For example: `"updateMask=kmsKeyName"`
  1529. google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL];
  1530. }
  1531. // Describes the customer-managed encryption key (CMEK) settings associated with
  1532. // a project, folder, organization, billing account, or flexible resource.
  1533. //
  1534. // Note: CMEK for the Log Router can currently only be configured for Google
  1535. // Cloud organizations. Once configured, it applies to all projects and folders
  1536. // in the Google Cloud organization.
  1537. //
  1538. // See [Enabling CMEK for Log
  1539. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for
  1540. // more information.
  1541. message CmekSettings {
  1542. option (google.api.resource) = {
  1543. type: "logging.googleapis.com/CmekSettings"
  1544. pattern: "projects/{project}/cmekSettings"
  1545. pattern: "organizations/{organization}/cmekSettings"
  1546. pattern: "folders/{folder}/cmekSettings"
  1547. pattern: "billingAccounts/{billing_account}/cmekSettings"
  1548. };
  1549. // Output only. The resource name of the CMEK settings.
  1550. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  1551. // The resource name for the configured Cloud KMS key.
  1552. //
  1553. // KMS key name format:
  1554. //
  1555. // "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
  1556. //
  1557. // For example:
  1558. //
  1559. // `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`
  1560. //
  1561. //
  1562. //
  1563. // To enable CMEK for the Log Router, set this field to a valid
  1564. // `kms_key_name` for which the associated service account has the required
  1565. // cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key.
  1566. //
  1567. // The Cloud KMS key used by the Log Router can be updated by changing the
  1568. // `kms_key_name` to a new valid key name or disabled by setting the key name
  1569. // to an empty string. Encryption operations that are in progress will be
  1570. // completed with the key that was in use when they started. Decryption
  1571. // operations will be completed using the key that was used at the time of
  1572. // encryption unless access to that key has been revoked.
  1573. //
  1574. // To disable CMEK for the Log Router, set this field to an empty string.
  1575. //
  1576. // See [Enabling CMEK for Log
  1577. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  1578. // for more information.
  1579. string kms_key_name = 2;
  1580. // Output only. The service account that will be used by the Log Router to access your
  1581. // Cloud KMS key.
  1582. //
  1583. // Before enabling CMEK for Log Router, you must first assign the
  1584. // cloudkms.cryptoKeyEncrypterDecrypter role to the service account that
  1585. // the Log Router will use to access your Cloud KMS key. Use
  1586. // [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to
  1587. // obtain the service account ID.
  1588. //
  1589. // See [Enabling CMEK for Log
  1590. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  1591. // for more information.
  1592. string service_account_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  1593. }
  1594. // The parameters to
  1595. // [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings].
  1596. //
  1597. // See [Enabling CMEK for Log
  1598. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for
  1599. // more information.
  1600. message GetSettingsRequest {
  1601. // Required. The resource for which to retrieve settings.
  1602. //
  1603. // "projects/[PROJECT_ID]/settings"
  1604. // "organizations/[ORGANIZATION_ID]/settings"
  1605. // "billingAccounts/[BILLING_ACCOUNT_ID]/settings"
  1606. // "folders/[FOLDER_ID]/settings"
  1607. //
  1608. // For example:
  1609. //
  1610. // `"organizations/12345/settings"`
  1611. //
  1612. // Note: Settings for the Log Router can be get for Google Cloud projects,
  1613. // folders, organizations and billing accounts. Currently it can only be
  1614. // configured for organizations. Once configured for an organization, it
  1615. // applies to all projects and folders in the Google Cloud organization.
  1616. string name = 1 [
  1617. (google.api.field_behavior) = REQUIRED,
  1618. (google.api.resource_reference) = {
  1619. type: "logging.googleapis.com/Settings"
  1620. }
  1621. ];
  1622. }
  1623. // The parameters to
  1624. // [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings].
  1625. //
  1626. // See [Enabling CMEK for Log
  1627. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for
  1628. // more information.
  1629. message UpdateSettingsRequest {
  1630. // Required. The resource name for the settings to update.
  1631. //
  1632. // "organizations/[ORGANIZATION_ID]/settings"
  1633. //
  1634. // For example:
  1635. //
  1636. // `"organizations/12345/settings"`
  1637. //
  1638. // Note: Settings for the Log Router can currently only be configured for
  1639. // Google Cloud organizations. Once configured, it applies to all projects and
  1640. // folders in the Google Cloud organization.
  1641. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1642. // Required. The settings to update.
  1643. //
  1644. // See [Enabling CMEK for Log
  1645. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  1646. // for more information.
  1647. Settings settings = 2 [(google.api.field_behavior) = REQUIRED];
  1648. // Optional. Field mask identifying which fields from `settings` should
  1649. // be updated. A field will be overwritten if and only if it is in the update
  1650. // mask. Output only fields cannot be updated.
  1651. //
  1652. // See [FieldMask][google.protobuf.FieldMask] for more information.
  1653. //
  1654. // For example: `"updateMask=kmsKeyName"`
  1655. google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL];
  1656. }
  1657. // Describes the settings associated with a project, folder, organization,
  1658. // billing account, or flexible resource.
  1659. message Settings {
  1660. option (google.api.resource) = {
  1661. type: "logging.googleapis.com/Settings"
  1662. pattern: "projects/{project}/settings"
  1663. pattern: "organizations/{organization}/settings"
  1664. pattern: "folders/{folder}/settings"
  1665. pattern: "billingAccounts/{billing_account}/settings"
  1666. };
  1667. // Output only. The resource name of the settings.
  1668. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  1669. // Optional. The resource name for the configured Cloud KMS key.
  1670. //
  1671. // KMS key name format:
  1672. //
  1673. // "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
  1674. //
  1675. // For example:
  1676. //
  1677. // `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`
  1678. //
  1679. //
  1680. //
  1681. // To enable CMEK for the Log Router, set this field to a valid
  1682. // `kms_key_name` for which the associated service account has the required
  1683. // `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key.
  1684. //
  1685. // The Cloud KMS key used by the Log Router can be updated by changing the
  1686. // `kms_key_name` to a new valid key name. Encryption operations that are in
  1687. // progress will be completed with the key that was in use when they started.
  1688. // Decryption operations will be completed using the key that was used at the
  1689. // time of encryption unless access to that key has been revoked.
  1690. //
  1691. // To disable CMEK for the Log Router, set this field to an empty string.
  1692. //
  1693. // See [Enabling CMEK for Log
  1694. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  1695. // for more information.
  1696. string kms_key_name = 2 [(google.api.field_behavior) = OPTIONAL];
  1697. // Output only. The service account that will be used by the Log Router to access your
  1698. // Cloud KMS key.
  1699. //
  1700. // Before enabling CMEK for Log Router, you must first assign the role
  1701. // `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
  1702. // the Log Router will use to access your Cloud KMS key. Use
  1703. // [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to
  1704. // obtain the service account ID.
  1705. //
  1706. // See [Enabling CMEK for Log
  1707. // Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
  1708. // for more information.
  1709. string kms_service_account_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  1710. // Optional. The Cloud region that will be used for _Default and _Required log buckets
  1711. // for newly created projects and folders. For example `europe-west1`.
  1712. // This setting does not affect the location of custom log buckets.
  1713. string storage_location = 4 [(google.api.field_behavior) = OPTIONAL];
  1714. // Optional. If set to true, the _Default sink in newly created projects and folders
  1715. // will created in a disabled state. This can be used to automatically disable
  1716. // log ingestion if there is already an aggregated sink configured in the
  1717. // hierarchy. The _Default sink can be re-enabled manually if needed.
  1718. bool disable_default_sink = 5 [(google.api.field_behavior) = OPTIONAL];
  1719. }
  1720. // The parameters to CopyLogEntries.
  1721. message CopyLogEntriesRequest {
  1722. // Required. Log bucket from which to copy log entries.
  1723. //
  1724. // For example:
  1725. //
  1726. // `"projects/my-project/locations/global/buckets/my-source-bucket"`
  1727. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1728. // Optional. A filter specifying which log entries to copy. The filter must be no more
  1729. // than 20k characters. An empty filter matches all log entries.
  1730. string filter = 3 [(google.api.field_behavior) = OPTIONAL];
  1731. // Required. Destination to which to copy log entries.
  1732. string destination = 4 [(google.api.field_behavior) = REQUIRED];
  1733. }
  1734. // Metadata for CopyLogEntries long running operations.
  1735. message CopyLogEntriesMetadata {
  1736. // The create time of an operation.
  1737. google.protobuf.Timestamp start_time = 1;
  1738. // The end time of an operation.
  1739. google.protobuf.Timestamp end_time = 2;
  1740. // State of an operation.
  1741. OperationState state = 3;
  1742. // Identifies whether the user has requested cancellation of the operation.
  1743. bool cancellation_requested = 4;
  1744. // CopyLogEntries RPC request.
  1745. CopyLogEntriesRequest request = 5;
  1746. // Estimated progress of the operation (0 - 100%).
  1747. int32 progress = 6;
  1748. // The IAM identity of a service account that must be granted access to the
  1749. // destination.
  1750. //
  1751. // If the service account is not granted permission to the destination within
  1752. // an hour, the operation will be cancelled.
  1753. //
  1754. // For example: `"serviceAccount:foo@bar.com"`
  1755. string writer_identity = 7;
  1756. }
  1757. // Response type for CopyLogEntries long running operations.
  1758. message CopyLogEntriesResponse {
  1759. // Number of log entries copied.
  1760. int64 log_entries_copied_count = 1;
  1761. }
  1762. // LogBucket lifecycle states.
  1763. enum LifecycleState {
  1764. // Unspecified state. This is only used/useful for distinguishing unset
  1765. // values.
  1766. LIFECYCLE_STATE_UNSPECIFIED = 0;
  1767. // The normal and active state.
  1768. ACTIVE = 1;
  1769. // The resource has been marked for deletion by the user. For some resources
  1770. // (e.g. buckets), this can be reversed by an un-delete operation.
  1771. DELETE_REQUESTED = 2;
  1772. }
  1773. // List of different operation states.
  1774. // High level state of the operation. This is used to report the job's
  1775. // current state to the user. Once a long running operation is created,
  1776. // the current state of the operation can be queried even before the
  1777. // operation is finished and the final result is available.
  1778. enum OperationState {
  1779. // Should not be used.
  1780. OPERATION_STATE_UNSPECIFIED = 0;
  1781. // The operation is scheduled.
  1782. OPERATION_STATE_SCHEDULED = 1;
  1783. // Waiting for necessary permissions.
  1784. OPERATION_STATE_WAITING_FOR_PERMISSIONS = 2;
  1785. // The operation is running.
  1786. OPERATION_STATE_RUNNING = 3;
  1787. // The operation was completed successfully.
  1788. OPERATION_STATE_SUCCEEDED = 4;
  1789. // The operation failed.
  1790. OPERATION_STATE_FAILED = 5;
  1791. // The operation was cancelled by the user.
  1792. OPERATION_STATE_CANCELLED = 6;
  1793. }