securitycenter_service.proto 70 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880
  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.cloud.securitycenter.v1;
  16. import public "google/cloud/securitycenter/v1/run_asset_discovery_response.proto";
  17. import "google/api/annotations.proto";
  18. import "google/api/client.proto";
  19. import "google/api/field_behavior.proto";
  20. import "google/api/resource.proto";
  21. import "google/cloud/securitycenter/v1/asset.proto";
  22. import "google/cloud/securitycenter/v1/bigquery_export.proto";
  23. import "google/cloud/securitycenter/v1/external_system.proto";
  24. import "google/cloud/securitycenter/v1/finding.proto";
  25. import "google/cloud/securitycenter/v1/folder.proto";
  26. import "google/cloud/securitycenter/v1/mute_config.proto";
  27. import "google/cloud/securitycenter/v1/notification_config.proto";
  28. import "google/cloud/securitycenter/v1/organization_settings.proto";
  29. import "google/cloud/securitycenter/v1/security_marks.proto";
  30. import "google/cloud/securitycenter/v1/source.proto";
  31. import "google/iam/v1/iam_policy.proto";
  32. import "google/iam/v1/policy.proto";
  33. import "google/longrunning/operations.proto";
  34. import "google/protobuf/duration.proto";
  35. import "google/protobuf/empty.proto";
  36. import "google/protobuf/field_mask.proto";
  37. import "google/protobuf/struct.proto";
  38. import "google/protobuf/timestamp.proto";
  39. option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
  40. option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
  41. option java_multiple_files = true;
  42. option java_package = "com.google.cloud.securitycenter.v1";
  43. option php_namespace = "Google\\Cloud\\SecurityCenter\\V1";
  44. option ruby_package = "Google::Cloud::SecurityCenter::V1";
  45. // V1 APIs for Security Center service.
  46. service SecurityCenter {
  47. option (google.api.default_host) = "securitycenter.googleapis.com";
  48. option (google.api.oauth_scopes) =
  49. "https://www.googleapis.com/auth/cloud-platform";
  50. // Kicks off an LRO to bulk mute findings for a parent based on a filter. The
  51. // parent can be either an organization, folder or project. The findings
  52. // matched by the filter will be muted after the LRO is done.
  53. rpc BulkMuteFindings(BulkMuteFindingsRequest)
  54. returns (google.longrunning.Operation) {
  55. option (google.api.http) = {
  56. post: "/v1/{parent=organizations/*}/findings:bulkMute"
  57. body: "*"
  58. additional_bindings {
  59. post: "/v1/{parent=folders/*}/findings:bulkMute"
  60. body: "*"
  61. }
  62. additional_bindings {
  63. post: "/v1/{parent=projects/*}/findings:bulkMute"
  64. body: "*"
  65. }
  66. };
  67. option (google.api.method_signature) = "parent";
  68. option (google.longrunning.operation_info) = {
  69. response_type: "google.cloud.securitycenter.v1.BulkMuteFindingsResponse"
  70. metadata_type: "google.protobuf.Empty"
  71. };
  72. }
  73. // Creates a source.
  74. rpc CreateSource(CreateSourceRequest) returns (Source) {
  75. option (google.api.http) = {
  76. post: "/v1/{parent=organizations/*}/sources"
  77. body: "source"
  78. };
  79. option (google.api.method_signature) = "parent,source";
  80. }
  81. // Creates a finding. The corresponding source must exist for finding creation
  82. // to succeed.
  83. rpc CreateFinding(CreateFindingRequest) returns (Finding) {
  84. option (google.api.http) = {
  85. post: "/v1/{parent=organizations/*/sources/*}/findings"
  86. body: "finding"
  87. };
  88. option (google.api.method_signature) = "parent,finding_id,finding";
  89. }
  90. // Creates a mute config.
  91. rpc CreateMuteConfig(CreateMuteConfigRequest) returns (MuteConfig) {
  92. option (google.api.http) = {
  93. post: "/v1/{parent=organizations/*}/muteConfigs"
  94. body: "mute_config"
  95. additional_bindings {
  96. post: "/v1/{parent=folders/*}/muteConfigs"
  97. body: "mute_config"
  98. }
  99. additional_bindings {
  100. post: "/v1/{parent=projects/*}/muteConfigs"
  101. body: "mute_config"
  102. }
  103. };
  104. option (google.api.method_signature) = "parent,mute_config";
  105. option (google.api.method_signature) = "parent,mute_config,mute_config_id";
  106. }
  107. // Creates a notification config.
  108. rpc CreateNotificationConfig(CreateNotificationConfigRequest)
  109. returns (NotificationConfig) {
  110. option (google.api.http) = {
  111. post: "/v1/{parent=organizations/*}/notificationConfigs"
  112. body: "notification_config"
  113. additional_bindings {
  114. post: "/v1/{parent=folders/*}/notificationConfigs"
  115. body: "notification_config"
  116. }
  117. additional_bindings {
  118. post: "/v1/{parent=projects/*}/notificationConfigs"
  119. body: "notification_config"
  120. }
  121. };
  122. option (google.api.method_signature) =
  123. "parent,config_id,notification_config";
  124. option (google.api.method_signature) = "parent,notification_config";
  125. }
  126. // Deletes an existing mute config.
  127. rpc DeleteMuteConfig(DeleteMuteConfigRequest)
  128. returns (google.protobuf.Empty) {
  129. option (google.api.http) = {
  130. delete: "/v1/{name=organizations/*/muteConfigs/*}"
  131. additional_bindings { delete: "/v1/{name=folders/*/muteConfigs/*}" }
  132. additional_bindings { delete: "/v1/{name=projects/*/muteConfigs/*}" }
  133. };
  134. option (google.api.method_signature) = "name";
  135. }
  136. // Deletes a notification config.
  137. rpc DeleteNotificationConfig(DeleteNotificationConfigRequest)
  138. returns (google.protobuf.Empty) {
  139. option (google.api.http) = {
  140. delete: "/v1/{name=organizations/*/notificationConfigs/*}"
  141. additional_bindings {
  142. delete: "/v1/{name=folders/*/notificationConfigs/*}"
  143. }
  144. additional_bindings {
  145. delete: "/v1/{name=projects/*/notificationConfigs/*}"
  146. }
  147. };
  148. option (google.api.method_signature) = "name";
  149. }
  150. // Gets a big query export.
  151. rpc GetBigQueryExport(GetBigQueryExportRequest) returns (BigQueryExport) {
  152. option (google.api.http) = {
  153. get: "/v1/{name=organizations/*/bigQueryExports/*}"
  154. additional_bindings { get: "/v1/{name=folders/*/bigQueryExports/*}" }
  155. additional_bindings { get: "/v1/{name=projects/*/bigQueryExports/*}" }
  156. };
  157. option (google.api.method_signature) = "name";
  158. }
  159. // Gets the access control policy on the specified Source.
  160. rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
  161. returns (google.iam.v1.Policy) {
  162. option (google.api.http) = {
  163. post: "/v1/{resource=organizations/*/sources/*}:getIamPolicy"
  164. body: "*"
  165. };
  166. option (google.api.method_signature) = "resource";
  167. }
  168. // Gets a mute config.
  169. rpc GetMuteConfig(GetMuteConfigRequest) returns (MuteConfig) {
  170. option (google.api.http) = {
  171. get: "/v1/{name=organizations/*/muteConfigs/*}"
  172. additional_bindings { get: "/v1/{name=folders/*/muteConfigs/*}" }
  173. additional_bindings { get: "/v1/{name=projects/*/muteConfigs/*}" }
  174. };
  175. option (google.api.method_signature) = "name";
  176. }
  177. // Gets a notification config.
  178. rpc GetNotificationConfig(GetNotificationConfigRequest)
  179. returns (NotificationConfig) {
  180. option (google.api.http) = {
  181. get: "/v1/{name=organizations/*/notificationConfigs/*}"
  182. additional_bindings { get: "/v1/{name=folders/*/notificationConfigs/*}" }
  183. additional_bindings { get: "/v1/{name=projects/*/notificationConfigs/*}" }
  184. };
  185. option (google.api.method_signature) = "name";
  186. }
  187. // Gets the settings for an organization.
  188. rpc GetOrganizationSettings(GetOrganizationSettingsRequest)
  189. returns (OrganizationSettings) {
  190. option (google.api.http) = {
  191. get: "/v1/{name=organizations/*/organizationSettings}"
  192. };
  193. option (google.api.method_signature) = "name";
  194. }
  195. // Gets a source.
  196. rpc GetSource(GetSourceRequest) returns (Source) {
  197. option (google.api.http) = {
  198. get: "/v1/{name=organizations/*/sources/*}"
  199. };
  200. option (google.api.method_signature) = "name";
  201. }
  202. // Filters an organization's assets and groups them by their specified
  203. // properties.
  204. rpc GroupAssets(GroupAssetsRequest) returns (GroupAssetsResponse) {
  205. option (google.api.http) = {
  206. post: "/v1/{parent=organizations/*}/assets:group"
  207. body: "*"
  208. additional_bindings {
  209. post: "/v1/{parent=folders/*}/assets:group"
  210. body: "*"
  211. }
  212. additional_bindings {
  213. post: "/v1/{parent=projects/*}/assets:group"
  214. body: "*"
  215. }
  216. };
  217. }
  218. // Filters an organization or source's findings and groups them by their
  219. // specified properties.
  220. //
  221. // To group across all sources provide a `-` as the source id.
  222. // Example: /v1/organizations/{organization_id}/sources/-/findings,
  223. // /v1/folders/{folder_id}/sources/-/findings,
  224. // /v1/projects/{project_id}/sources/-/findings
  225. rpc GroupFindings(GroupFindingsRequest) returns (GroupFindingsResponse) {
  226. option (google.api.http) = {
  227. post: "/v1/{parent=organizations/*/sources/*}/findings:group"
  228. body: "*"
  229. additional_bindings {
  230. post: "/v1/{parent=folders/*/sources/*}/findings:group"
  231. body: "*"
  232. }
  233. additional_bindings {
  234. post: "/v1/{parent=projects/*/sources/*}/findings:group"
  235. body: "*"
  236. }
  237. };
  238. option (google.api.method_signature) = "parent,group_by";
  239. }
  240. // Lists an organization's assets.
  241. rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) {
  242. option (google.api.http) = {
  243. get: "/v1/{parent=organizations/*}/assets"
  244. additional_bindings { get: "/v1/{parent=folders/*}/assets" }
  245. additional_bindings { get: "/v1/{parent=projects/*}/assets" }
  246. };
  247. }
  248. // Lists an organization or source's findings.
  249. //
  250. // To list across all sources provide a `-` as the source id.
  251. // Example: /v1/organizations/{organization_id}/sources/-/findings
  252. rpc ListFindings(ListFindingsRequest) returns (ListFindingsResponse) {
  253. option (google.api.http) = {
  254. get: "/v1/{parent=organizations/*/sources/*}/findings"
  255. additional_bindings { get: "/v1/{parent=folders/*/sources/*}/findings" }
  256. additional_bindings { get: "/v1/{parent=projects/*/sources/*}/findings" }
  257. };
  258. }
  259. // Lists mute configs.
  260. rpc ListMuteConfigs(ListMuteConfigsRequest)
  261. returns (ListMuteConfigsResponse) {
  262. option (google.api.http) = {
  263. get: "/v1/{parent=organizations/*}/muteConfigs"
  264. additional_bindings { get: "/v1/{parent=folders/*}/muteConfigs" }
  265. additional_bindings { get: "/v1/{parent=projects/*}/muteConfigs" }
  266. };
  267. option (google.api.method_signature) = "parent";
  268. }
  269. // Lists notification configs.
  270. rpc ListNotificationConfigs(ListNotificationConfigsRequest)
  271. returns (ListNotificationConfigsResponse) {
  272. option (google.api.http) = {
  273. get: "/v1/{parent=organizations/*}/notificationConfigs"
  274. additional_bindings { get: "/v1/{parent=folders/*}/notificationConfigs" }
  275. additional_bindings { get: "/v1/{parent=projects/*}/notificationConfigs" }
  276. };
  277. option (google.api.method_signature) = "parent";
  278. }
  279. // Lists all sources belonging to an organization.
  280. rpc ListSources(ListSourcesRequest) returns (ListSourcesResponse) {
  281. option (google.api.http) = {
  282. get: "/v1/{parent=organizations/*}/sources"
  283. additional_bindings { get: "/v1/{parent=folders/*}/sources" }
  284. additional_bindings { get: "/v1/{parent=projects/*}/sources" }
  285. };
  286. option (google.api.method_signature) = "parent";
  287. }
  288. // Runs asset discovery. The discovery is tracked with a long-running
  289. // operation.
  290. //
  291. // This API can only be called with limited frequency for an organization. If
  292. // it is called too frequently the caller will receive a TOO_MANY_REQUESTS
  293. // error.
  294. rpc RunAssetDiscovery(RunAssetDiscoveryRequest)
  295. returns (google.longrunning.Operation) {
  296. option (google.api.http) = {
  297. post: "/v1/{parent=organizations/*}/assets:runDiscovery"
  298. body: "*"
  299. };
  300. option (google.api.method_signature) = "parent";
  301. option (google.longrunning.operation_info) = {
  302. response_type: "google.cloud.securitycenter.v1.RunAssetDiscoveryResponse"
  303. metadata_type: "google.protobuf.Empty"
  304. };
  305. }
  306. // Updates the state of a finding.
  307. rpc SetFindingState(SetFindingStateRequest) returns (Finding) {
  308. option (google.api.http) = {
  309. post: "/v1/{name=organizations/*/sources/*/findings/*}:setState"
  310. body: "*"
  311. additional_bindings {
  312. post: "/v1/{name=folders/*/sources/*/findings/*}:setState"
  313. body: "*"
  314. }
  315. additional_bindings {
  316. post: "/v1/{name=projects/*/sources/*/findings/*}:setState"
  317. body: "*"
  318. }
  319. };
  320. option (google.api.method_signature) = "name,state,start_time";
  321. }
  322. // Updates the mute state of a finding.
  323. rpc SetMute(SetMuteRequest) returns (Finding) {
  324. option (google.api.http) = {
  325. post: "/v1/{name=organizations/*/sources/*/findings/*}:setMute"
  326. body: "*"
  327. additional_bindings {
  328. post: "/v1/{name=folders/*/sources/*/findings/*}:setMute"
  329. body: "*"
  330. }
  331. additional_bindings {
  332. post: "/v1/{name=projects/*/sources/*/findings/*}:setMute"
  333. body: "*"
  334. }
  335. };
  336. option (google.api.method_signature) = "name,mute";
  337. }
  338. // Sets the access control policy on the specified Source.
  339. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
  340. returns (google.iam.v1.Policy) {
  341. option (google.api.http) = {
  342. post: "/v1/{resource=organizations/*/sources/*}:setIamPolicy"
  343. body: "*"
  344. };
  345. option (google.api.method_signature) = "resource,policy";
  346. }
  347. // Returns the permissions that a caller has on the specified source.
  348. rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
  349. returns (google.iam.v1.TestIamPermissionsResponse) {
  350. option (google.api.http) = {
  351. post: "/v1/{resource=organizations/*/sources/*}:testIamPermissions"
  352. body: "*"
  353. };
  354. option (google.api.method_signature) = "resource,permissions";
  355. }
  356. // Updates external system. This is for a given finding.
  357. rpc UpdateExternalSystem(UpdateExternalSystemRequest)
  358. returns (ExternalSystem) {
  359. option (google.api.http) = {
  360. patch: "/v1/{external_system.name=organizations/*/sources/*/findings/*/externalSystems/*}"
  361. body: "external_system"
  362. additional_bindings {
  363. patch: "/v1/{external_system.name=folders/*/sources/*/findings/*/externalSystems/*}"
  364. body: "external_system"
  365. }
  366. additional_bindings {
  367. patch: "/v1/{external_system.name=projects/*/sources/*/findings/*/externalSystems/*}"
  368. body: "external_system"
  369. }
  370. };
  371. option (google.api.method_signature) = "external_system,update_mask";
  372. }
  373. // Creates or updates a finding. The corresponding source must exist for a
  374. // finding creation to succeed.
  375. rpc UpdateFinding(UpdateFindingRequest) returns (Finding) {
  376. option (google.api.http) = {
  377. patch: "/v1/{finding.name=organizations/*/sources/*/findings/*}"
  378. body: "finding"
  379. additional_bindings {
  380. patch: "/v1/{finding.name=folders/*/sources/*/findings/*}"
  381. body: "finding"
  382. }
  383. additional_bindings {
  384. patch: "/v1/{finding.name=projects/*/sources/*/findings/*}"
  385. body: "finding"
  386. }
  387. };
  388. option (google.api.method_signature) = "finding";
  389. }
  390. // Updates a mute config.
  391. rpc UpdateMuteConfig(UpdateMuteConfigRequest) returns (MuteConfig) {
  392. option (google.api.http) = {
  393. patch: "/v1/{mute_config.name=organizations/*/muteConfigs/*}"
  394. body: "mute_config"
  395. additional_bindings {
  396. patch: "/v1/{mute_config.name=folders/*/muteConfigs/*}"
  397. body: "mute_config"
  398. }
  399. additional_bindings {
  400. patch: "/v1/{mute_config.name=projects/*/muteConfigs/*}"
  401. body: "mute_config"
  402. }
  403. };
  404. option (google.api.method_signature) = "mute_config,update_mask";
  405. }
  406. //
  407. // Updates a notification config. The following update
  408. // fields are allowed: description, pubsub_topic, streaming_config.filter
  409. rpc UpdateNotificationConfig(UpdateNotificationConfigRequest)
  410. returns (NotificationConfig) {
  411. option (google.api.http) = {
  412. patch: "/v1/{notification_config.name=organizations/*/notificationConfigs/*}"
  413. body: "notification_config"
  414. additional_bindings {
  415. patch: "/v1/{notification_config.name=folders/*/notificationConfigs/*}"
  416. body: "notification_config"
  417. }
  418. additional_bindings {
  419. patch: "/v1/{notification_config.name=projects/*/notificationConfigs/*}"
  420. body: "notification_config"
  421. }
  422. };
  423. option (google.api.method_signature) = "notification_config";
  424. option (google.api.method_signature) = "notification_config,update_mask";
  425. }
  426. // Updates an organization's settings.
  427. rpc UpdateOrganizationSettings(UpdateOrganizationSettingsRequest)
  428. returns (OrganizationSettings) {
  429. option (google.api.http) = {
  430. patch: "/v1/{organization_settings.name=organizations/*/organizationSettings}"
  431. body: "organization_settings"
  432. };
  433. option (google.api.method_signature) = "organization_settings";
  434. }
  435. // Updates a source.
  436. rpc UpdateSource(UpdateSourceRequest) returns (Source) {
  437. option (google.api.http) = {
  438. patch: "/v1/{source.name=organizations/*/sources/*}"
  439. body: "source"
  440. };
  441. option (google.api.method_signature) = "source";
  442. }
  443. // Updates security marks.
  444. rpc UpdateSecurityMarks(UpdateSecurityMarksRequest) returns (SecurityMarks) {
  445. option (google.api.http) = {
  446. patch: "/v1/{security_marks.name=organizations/*/assets/*/securityMarks}"
  447. body: "security_marks"
  448. additional_bindings {
  449. patch: "/v1/{security_marks.name=folders/*/assets/*/securityMarks}"
  450. body: "security_marks"
  451. }
  452. additional_bindings {
  453. patch: "/v1/{security_marks.name=projects/*/assets/*/securityMarks}"
  454. body: "security_marks"
  455. }
  456. additional_bindings {
  457. patch: "/v1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}"
  458. body: "security_marks"
  459. }
  460. additional_bindings {
  461. patch: "/v1/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}"
  462. body: "security_marks"
  463. }
  464. additional_bindings {
  465. patch: "/v1/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}"
  466. body: "security_marks"
  467. }
  468. };
  469. option (google.api.method_signature) = "security_marks";
  470. }
  471. // Creates a big query export.
  472. rpc CreateBigQueryExport(CreateBigQueryExportRequest)
  473. returns (BigQueryExport) {
  474. option (google.api.http) = {
  475. post: "/v1/{parent=organizations/*}/bigQueryExports"
  476. body: "big_query_export"
  477. additional_bindings {
  478. post: "/v1/{parent=folders/*}/bigQueryExports"
  479. body: "big_query_export"
  480. }
  481. additional_bindings {
  482. post: "/v1/{parent=projects/*}/bigQueryExports"
  483. body: "big_query_export"
  484. }
  485. };
  486. option (google.api.method_signature) =
  487. "parent,big_query_export,big_query_export_id";
  488. }
  489. // Deletes an existing big query export.
  490. rpc DeleteBigQueryExport(DeleteBigQueryExportRequest)
  491. returns (google.protobuf.Empty) {
  492. option (google.api.http) = {
  493. delete: "/v1/{name=organizations/*/bigQueryExports/*}"
  494. additional_bindings { delete: "/v1/{name=folders/*/bigQueryExports/*}" }
  495. additional_bindings { delete: "/v1/{name=projects/*/bigQueryExports/*}" }
  496. };
  497. option (google.api.method_signature) = "name";
  498. }
  499. // Updates a BigQuery export.
  500. rpc UpdateBigQueryExport(UpdateBigQueryExportRequest)
  501. returns (BigQueryExport) {
  502. option (google.api.http) = {
  503. patch: "/v1/{big_query_export.name=organizations/*/bigQueryExports/*}"
  504. body: "big_query_export"
  505. additional_bindings {
  506. patch: "/v1/{big_query_export.name=folders/*/bigQueryExports/*}"
  507. body: "big_query_export"
  508. }
  509. additional_bindings {
  510. patch: "/v1/{big_query_export.name=projects/*/bigQueryExports/*}"
  511. body: "big_query_export"
  512. }
  513. };
  514. option (google.api.method_signature) = "big_query_export,update_mask";
  515. }
  516. // Lists BigQuery exports. Note that when requesting BigQuery exports at a
  517. // given level all exports under that level are also returned e.g. if
  518. // requesting BigQuery exports under a folder, then all BigQuery exports
  519. // immediately under the folder plus the ones created under the projects
  520. // within the folder are returned.
  521. rpc ListBigQueryExports(ListBigQueryExportsRequest)
  522. returns (ListBigQueryExportsResponse) {
  523. option (google.api.http) = {
  524. get: "/v1/{parent=organizations/*}/bigQueryExports"
  525. additional_bindings { get: "/v1/{parent=folders/*}/bigQueryExports" }
  526. additional_bindings { get: "/v1/{parent=projects/*}/bigQueryExports" }
  527. };
  528. option (google.api.method_signature) = "parent";
  529. }
  530. }
  531. // Request message for bulk findings update.
  532. //
  533. // Note:
  534. // 1. If multiple bulk update requests match the same resource, the order in
  535. // which they get executed is not defined.
  536. // 2. Once a bulk operation is started, there is no way to stop it.
  537. message BulkMuteFindingsRequest {
  538. // Required. The parent, at which bulk action needs to be applied. Its format
  539. // is "organizations/[organization_id]", "folders/[folder_id]",
  540. // "projects/[project_id]".
  541. string parent = 1 [
  542. (google.api.field_behavior) = REQUIRED,
  543. (google.api.resource_reference) = { type: "*" }
  544. ];
  545. // Expression that identifies findings that should be updated.
  546. // The expression is a list of zero or more restrictions combined
  547. // via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
  548. // has higher precedence than `AND`.
  549. //
  550. // Restrictions have the form `<field> <operator> <value>` and may have a
  551. // `-` character in front of them to indicate negation. The fields map to
  552. // those defined in the corresponding resource.
  553. //
  554. // The supported operators are:
  555. //
  556. // * `=` for all value types.
  557. // * `>`, `<`, `>=`, `<=` for integer values.
  558. // * `:`, meaning substring matching, for strings.
  559. //
  560. // The supported value types are:
  561. //
  562. // * string literals in quotes.
  563. // * integer literals without quotes.
  564. // * boolean literals `true` and `false` without quotes.
  565. string filter = 2;
  566. // This can be a mute configuration name or any identifier for mute/unmute
  567. // of findings based on the filter.
  568. string mute_annotation = 3 [deprecated = true];
  569. }
  570. // The response to a BulkMute request. Contains the LRO information.
  571. message BulkMuteFindingsResponse {}
  572. // Request message for creating a finding.
  573. message CreateFindingRequest {
  574. // Required. Resource name of the new finding's parent. Its format should be
  575. // "organizations/[organization_id]/sources/[source_id]".
  576. string parent = 1 [
  577. (google.api.field_behavior) = REQUIRED,
  578. (google.api.resource_reference) = {
  579. type: "securitycenter.googleapis.com/Source"
  580. }
  581. ];
  582. // Required. Unique identifier provided by the client within the parent scope.
  583. // It must be alphanumeric and less than or equal to 32 characters and
  584. // greater than 0 characters in length.
  585. string finding_id = 2 [(google.api.field_behavior) = REQUIRED];
  586. // Required. The Finding being created. The name and security_marks will be
  587. // ignored as they are both output only fields on this resource.
  588. Finding finding = 3 [(google.api.field_behavior) = REQUIRED];
  589. }
  590. // Request message for creating a mute config.
  591. message CreateMuteConfigRequest {
  592. // Required. Resource name of the new mute configs's parent. Its format is
  593. // "organizations/[organization_id]", "folders/[folder_id]", or
  594. // "projects/[project_id]".
  595. string parent = 1 [
  596. (google.api.field_behavior) = REQUIRED,
  597. (google.api.resource_reference) = {
  598. child_type: "securitycenter.googleapis.com/MuteConfig"
  599. }
  600. ];
  601. // Required. The mute config being created.
  602. MuteConfig mute_config = 2 [(google.api.field_behavior) = REQUIRED];
  603. // Required. Unique identifier provided by the client within the parent scope.
  604. // It must consist of lower case letters, numbers, and hyphen, with the first
  605. // character a letter, the last a letter or a number, and a 63 character
  606. // maximum.
  607. string mute_config_id = 3 [(google.api.field_behavior) = REQUIRED];
  608. }
  609. // Request message for creating a notification config.
  610. message CreateNotificationConfigRequest {
  611. // Required. Resource name of the new notification config's parent. Its format
  612. // is "organizations/[organization_id]", "folders/[folder_id]", or
  613. // "projects/[project_id]".
  614. string parent = 1 [
  615. (google.api.field_behavior) = REQUIRED,
  616. (google.api.resource_reference) = {
  617. child_type: "securitycenter.googleapis.com/NotificationConfig"
  618. }
  619. ];
  620. // Required.
  621. // Unique identifier provided by the client within the parent scope.
  622. // It must be between 1 and 128 characters, and contains alphanumeric
  623. // characters, underscores or hyphens only.
  624. string config_id = 2 [(google.api.field_behavior) = REQUIRED];
  625. // Required. The notification config being created. The name and the service
  626. // account will be ignored as they are both output only fields on this
  627. // resource.
  628. NotificationConfig notification_config = 3
  629. [(google.api.field_behavior) = REQUIRED];
  630. }
  631. // Request message for creating a source.
  632. message CreateSourceRequest {
  633. // Required. Resource name of the new source's parent. Its format should be
  634. // "organizations/[organization_id]".
  635. string parent = 1 [
  636. (google.api.field_behavior) = REQUIRED,
  637. (google.api.resource_reference) = {
  638. type: "cloudresourcemanager.googleapis.com/Organization"
  639. }
  640. ];
  641. // Required. The Source being created, only the display_name and description
  642. // will be used. All other fields will be ignored.
  643. Source source = 2 [(google.api.field_behavior) = REQUIRED];
  644. }
  645. // Request message for deleting a mute config.
  646. message DeleteMuteConfigRequest {
  647. // Required. Name of the mute config to delete. Its format is
  648. // organizations/{organization}/muteConfigs/{config_id},
  649. // folders/{folder}/muteConfigs/{config_id}, or
  650. // projects/{project}/muteConfigs/{config_id}
  651. string name = 1 [
  652. (google.api.field_behavior) = REQUIRED,
  653. (google.api.resource_reference) = {
  654. type: "securitycenter.googleapis.com/MuteConfig"
  655. }
  656. ];
  657. }
  658. // Request message for deleting a notification config.
  659. message DeleteNotificationConfigRequest {
  660. // Required. Name of the notification config to delete. Its format is
  661. // "organizations/[organization_id]/notificationConfigs/[config_id]".
  662. string name = 1 [
  663. (google.api.field_behavior) = REQUIRED,
  664. (google.api.resource_reference) = {
  665. type: "securitycenter.googleapis.com/NotificationConfig"
  666. }
  667. ];
  668. }
  669. // Request message for retrieving a big query export.
  670. message GetBigQueryExportRequest {
  671. // Required. Name of the big query export to retrieve. Its format is
  672. // organizations/{organization}/bigQueryExports/{export_id},
  673. // folders/{folder}/bigQueryExports/{export_id}, or
  674. // projects/{project}/bigQueryExports/{export_id}
  675. string name = 1 [
  676. (google.api.field_behavior) = REQUIRED,
  677. (google.api.resource_reference) = {
  678. type: "securitycenter.googleapis.com/BigQueryExport"
  679. }
  680. ];
  681. }
  682. // Request message for retrieving a mute config.
  683. message GetMuteConfigRequest {
  684. // Required. Name of the mute config to retrieve. Its format is
  685. // organizations/{organization}/muteConfigs/{config_id},
  686. // folders/{folder}/muteConfigs/{config_id}, or
  687. // projects/{project}/muteConfigs/{config_id}
  688. string name = 1 [
  689. (google.api.field_behavior) = REQUIRED,
  690. (google.api.resource_reference) = {
  691. type: "securitycenter.googleapis.com/MuteConfig"
  692. }
  693. ];
  694. }
  695. // Request message for getting a notification config.
  696. message GetNotificationConfigRequest {
  697. // Required. Name of the notification config to get. Its format is
  698. // "organizations/[organization_id]/notificationConfigs/[config_id]".
  699. string name = 1 [
  700. (google.api.field_behavior) = REQUIRED,
  701. (google.api.resource_reference) = {
  702. type: "securitycenter.googleapis.com/NotificationConfig"
  703. }
  704. ];
  705. }
  706. // Request message for getting organization settings.
  707. message GetOrganizationSettingsRequest {
  708. // Required. Name of the organization to get organization settings for. Its
  709. // format is "organizations/[organization_id]/organizationSettings".
  710. string name = 1 [
  711. (google.api.field_behavior) = REQUIRED,
  712. (google.api.resource_reference) = {
  713. type: "securitycenter.googleapis.com/OrganizationSettings"
  714. }
  715. ];
  716. }
  717. // Request message for getting a source.
  718. message GetSourceRequest {
  719. // Required. Relative resource name of the source. Its format is
  720. // "organizations/[organization_id]/source/[source_id]".
  721. string name = 1 [
  722. (google.api.field_behavior) = REQUIRED,
  723. (google.api.resource_reference) = {
  724. type: "securitycenter.googleapis.com/Source"
  725. }
  726. ];
  727. }
  728. // Request message for grouping by assets.
  729. message GroupAssetsRequest {
  730. // Required. Name of the organization to groupBy. Its format is
  731. // "organizations/[organization_id], folders/[folder_id], or
  732. // projects/[project_id]".
  733. string parent = 1 [
  734. (google.api.field_behavior) = REQUIRED,
  735. (google.api.resource_reference) = {
  736. child_type: "securitycenter.googleapis.com/Asset"
  737. }
  738. ];
  739. // Expression that defines the filter to apply across assets.
  740. // The expression is a list of zero or more restrictions combined via logical
  741. // operators `AND` and `OR`.
  742. // Parentheses are supported, and `OR` has higher precedence than `AND`.
  743. //
  744. // Restrictions have the form `<field> <operator> <value>` and may have a `-`
  745. // character in front of them to indicate negation. The fields map to those
  746. // defined in the Asset resource. Examples include:
  747. //
  748. // * name
  749. // * security_center_properties.resource_name
  750. // * resource_properties.a_property
  751. // * security_marks.marks.marka
  752. //
  753. // The supported operators are:
  754. //
  755. // * `=` for all value types.
  756. // * `>`, `<`, `>=`, `<=` for integer values.
  757. // * `:`, meaning substring matching, for strings.
  758. //
  759. // The supported value types are:
  760. //
  761. // * string literals in quotes.
  762. // * integer literals without quotes.
  763. // * boolean literals `true` and `false` without quotes.
  764. //
  765. // The following field and operator combinations are supported:
  766. //
  767. // * name: `=`
  768. // * update_time: `=`, `>`, `<`, `>=`, `<=`
  769. //
  770. // Usage: This should be milliseconds since epoch or an RFC3339 string.
  771. // Examples:
  772. // `update_time = "2019-06-10T16:07:18-07:00"`
  773. // `update_time = 1560208038000`
  774. //
  775. // * create_time: `=`, `>`, `<`, `>=`, `<=`
  776. //
  777. // Usage: This should be milliseconds since epoch or an RFC3339 string.
  778. // Examples:
  779. // `create_time = "2019-06-10T16:07:18-07:00"`
  780. // `create_time = 1560208038000`
  781. //
  782. // * iam_policy.policy_blob: `=`, `:`
  783. // * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
  784. // * security_marks.marks: `=`, `:`
  785. // * security_center_properties.resource_name: `=`, `:`
  786. // * security_center_properties.resource_display_name: `=`, `:`
  787. // * security_center_properties.resource_type: `=`, `:`
  788. // * security_center_properties.resource_parent: `=`, `:`
  789. // * security_center_properties.resource_parent_display_name: `=`, `:`
  790. // * security_center_properties.resource_project: `=`, `:`
  791. // * security_center_properties.resource_project_display_name: `=`, `:`
  792. // * security_center_properties.resource_owners: `=`, `:`
  793. //
  794. // For example, `resource_properties.size = 100` is a valid filter string.
  795. //
  796. // Use a partial match on the empty string to filter based on a property
  797. // existing: `resource_properties.my_property : ""`
  798. //
  799. // Use a negated partial match on the empty string to filter based on a
  800. // property not existing: `-resource_properties.my_property : ""`
  801. string filter = 2;
  802. // Required. Expression that defines what assets fields to use for grouping.
  803. // The string value should follow SQL syntax: comma separated list of fields.
  804. // For example:
  805. // "security_center_properties.resource_project,security_center_properties.project".
  806. //
  807. // The following fields are supported when compare_duration is not set:
  808. //
  809. // * security_center_properties.resource_project
  810. // * security_center_properties.resource_project_display_name
  811. // * security_center_properties.resource_type
  812. // * security_center_properties.resource_parent
  813. // * security_center_properties.resource_parent_display_name
  814. //
  815. // The following fields are supported when compare_duration is set:
  816. //
  817. // * security_center_properties.resource_type
  818. // * security_center_properties.resource_project_display_name
  819. // * security_center_properties.resource_parent_display_name
  820. string group_by = 3 [(google.api.field_behavior) = REQUIRED];
  821. // When compare_duration is set, the GroupResult's "state_change" property is
  822. // updated to indicate whether the asset was added, removed, or remained
  823. // present during the compare_duration period of time that precedes the
  824. // read_time. This is the time between (read_time - compare_duration) and
  825. // read_time.
  826. //
  827. // The state change value is derived based on the presence of the asset at the
  828. // two points in time. Intermediate state changes between the two times don't
  829. // affect the result. For example, the results aren't affected if the asset is
  830. // removed and re-created again.
  831. //
  832. // Possible "state_change" values when compare_duration is specified:
  833. //
  834. // * "ADDED": indicates that the asset was not present at the start of
  835. // compare_duration, but present at reference_time.
  836. // * "REMOVED": indicates that the asset was present at the start of
  837. // compare_duration, but not present at reference_time.
  838. // * "ACTIVE": indicates that the asset was present at both the
  839. // start and the end of the time period defined by
  840. // compare_duration and reference_time.
  841. //
  842. // If compare_duration is not specified, then the only possible state_change
  843. // is "UNUSED", which will be the state_change set for all assets present at
  844. // read_time.
  845. //
  846. // If this field is set then `state_change` must be a specified field in
  847. // `group_by`.
  848. google.protobuf.Duration compare_duration = 4;
  849. // Time used as a reference point when filtering assets. The filter is limited
  850. // to assets existing at the supplied time and their values are those at that
  851. // specific time. Absence of this field will default to the API's version of
  852. // NOW.
  853. google.protobuf.Timestamp read_time = 5;
  854. // The value returned by the last `GroupAssetsResponse`; indicates
  855. // that this is a continuation of a prior `GroupAssets` call, and that the
  856. // system should return the next page of data.
  857. string page_token = 7;
  858. // The maximum number of results to return in a single response. Default is
  859. // 10, minimum is 1, maximum is 1000.
  860. int32 page_size = 8;
  861. }
  862. // Response message for grouping by assets.
  863. message GroupAssetsResponse {
  864. // Group results. There exists an element for each existing unique
  865. // combination of property/values. The element contains a count for the number
  866. // of times those specific property/values appear.
  867. repeated GroupResult group_by_results = 1;
  868. // Time used for executing the groupBy request.
  869. google.protobuf.Timestamp read_time = 2;
  870. // Token to retrieve the next page of results, or empty if there are no more
  871. // results.
  872. string next_page_token = 3;
  873. // The total number of results matching the query.
  874. int32 total_size = 4;
  875. }
  876. // Request message for grouping by findings.
  877. message GroupFindingsRequest {
  878. // Required. Name of the source to groupBy. Its format is
  879. // "organizations/[organization_id]/sources/[source_id]",
  880. // folders/[folder_id]/sources/[source_id], or
  881. // projects/[project_id]/sources/[source_id]. To groupBy across all sources
  882. // provide a source_id of `-`. For example:
  883. // organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-,
  884. // or projects/{project_id}/sources/-
  885. string parent = 1 [
  886. (google.api.field_behavior) = REQUIRED,
  887. (google.api.resource_reference) = {
  888. type: "securitycenter.googleapis.com/Source"
  889. }
  890. ];
  891. // Expression that defines the filter to apply across findings.
  892. // The expression is a list of one or more restrictions combined via logical
  893. // operators `AND` and `OR`.
  894. // Parentheses are supported, and `OR` has higher precedence than `AND`.
  895. //
  896. // Restrictions have the form `<field> <operator> <value>` and may have a `-`
  897. // character in front of them to indicate negation. Examples include:
  898. //
  899. // * name
  900. // * source_properties.a_property
  901. // * security_marks.marks.marka
  902. //
  903. // The supported operators are:
  904. //
  905. // * `=` for all value types.
  906. // * `>`, `<`, `>=`, `<=` for integer values.
  907. // * `:`, meaning substring matching, for strings.
  908. //
  909. // The supported value types are:
  910. //
  911. // * string literals in quotes.
  912. // * integer literals without quotes.
  913. // * boolean literals `true` and `false` without quotes.
  914. //
  915. // The following field and operator combinations are supported:
  916. //
  917. // * name: `=`
  918. // * parent: `=`, `:`
  919. // * resource_name: `=`, `:`
  920. // * state: `=`, `:`
  921. // * category: `=`, `:`
  922. // * external_uri: `=`, `:`
  923. // * event_time: `=`, `>`, `<`, `>=`, `<=`
  924. //
  925. // Usage: This should be milliseconds since epoch or an RFC3339 string.
  926. // Examples:
  927. // `event_time = "2019-06-10T16:07:18-07:00"`
  928. // `event_time = 1560208038000`
  929. //
  930. // * severity: `=`, `:`
  931. // * workflow_state: `=`, `:`
  932. // * security_marks.marks: `=`, `:`
  933. // * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
  934. //
  935. // For example, `source_properties.size = 100` is a valid filter string.
  936. //
  937. // Use a partial match on the empty string to filter based on a property
  938. // existing: `source_properties.my_property : ""`
  939. //
  940. // Use a negated partial match on the empty string to filter based on a
  941. // property not existing: `-source_properties.my_property : ""`
  942. //
  943. // * resource:
  944. // * resource.name: `=`, `:`
  945. // * resource.parent_name: `=`, `:`
  946. // * resource.parent_display_name: `=`, `:`
  947. // * resource.project_name: `=`, `:`
  948. // * resource.project_display_name: `=`, `:`
  949. // * resource.type: `=`, `:`
  950. string filter = 2;
  951. // Required. Expression that defines what assets fields to use for grouping
  952. // (including `state_change`). The string value should follow SQL syntax:
  953. // comma separated list of fields. For example: "parent,resource_name".
  954. //
  955. // The following fields are supported:
  956. //
  957. // * resource_name
  958. // * category
  959. // * state
  960. // * parent
  961. // * severity
  962. //
  963. // The following fields are supported when compare_duration is set:
  964. //
  965. // * state_change
  966. string group_by = 3 [(google.api.field_behavior) = REQUIRED];
  967. // Time used as a reference point when filtering findings. The filter is
  968. // limited to findings existing at the supplied time and their values are
  969. // those at that specific time. Absence of this field will default to the
  970. // API's version of NOW.
  971. google.protobuf.Timestamp read_time = 4;
  972. // When compare_duration is set, the GroupResult's "state_change" attribute is
  973. // updated to indicate whether the finding had its state changed, the
  974. // finding's state remained unchanged, or if the finding was added during the
  975. // compare_duration period of time that precedes the read_time. This is the
  976. // time between (read_time - compare_duration) and read_time.
  977. //
  978. // The state_change value is derived based on the presence and state of the
  979. // finding at the two points in time. Intermediate state changes between the
  980. // two times don't affect the result. For example, the results aren't affected
  981. // if the finding is made inactive and then active again.
  982. //
  983. // Possible "state_change" values when compare_duration is specified:
  984. //
  985. // * "CHANGED": indicates that the finding was present and matched the given
  986. // filter at the start of compare_duration, but changed its
  987. // state at read_time.
  988. // * "UNCHANGED": indicates that the finding was present and matched the given
  989. // filter at the start of compare_duration and did not change
  990. // state at read_time.
  991. // * "ADDED": indicates that the finding did not match the given filter or
  992. // was not present at the start of compare_duration, but was
  993. // present at read_time.
  994. // * "REMOVED": indicates that the finding was present and matched the
  995. // filter at the start of compare_duration, but did not match
  996. // the filter at read_time.
  997. //
  998. // If compare_duration is not specified, then the only possible state_change
  999. // is "UNUSED", which will be the state_change set for all findings present
  1000. // at read_time.
  1001. //
  1002. // If this field is set then `state_change` must be a specified field in
  1003. // `group_by`.
  1004. google.protobuf.Duration compare_duration = 5;
  1005. // The value returned by the last `GroupFindingsResponse`; indicates
  1006. // that this is a continuation of a prior `GroupFindings` call, and
  1007. // that the system should return the next page of data.
  1008. string page_token = 7;
  1009. // The maximum number of results to return in a single response. Default is
  1010. // 10, minimum is 1, maximum is 1000.
  1011. int32 page_size = 8;
  1012. }
  1013. // Response message for group by findings.
  1014. message GroupFindingsResponse {
  1015. // Group results. There exists an element for each existing unique
  1016. // combination of property/values. The element contains a count for the number
  1017. // of times those specific property/values appear.
  1018. repeated GroupResult group_by_results = 1;
  1019. // Time used for executing the groupBy request.
  1020. google.protobuf.Timestamp read_time = 2;
  1021. // Token to retrieve the next page of results, or empty if there are no more
  1022. // results.
  1023. string next_page_token = 3;
  1024. // The total number of results matching the query.
  1025. int32 total_size = 4;
  1026. }
  1027. // Result containing the properties and count of a groupBy request.
  1028. message GroupResult {
  1029. // Properties matching the groupBy fields in the request.
  1030. map<string, google.protobuf.Value> properties = 1;
  1031. // Total count of resources for the given properties.
  1032. int64 count = 2;
  1033. }
  1034. // Request message for listing mute configs at a given scope e.g. organization,
  1035. // folder or project.
  1036. message ListMuteConfigsRequest {
  1037. // Required. The parent, which owns the collection of mute configs. Its format
  1038. // is "organizations/[organization_id]", "folders/[folder_id]",
  1039. // "projects/[project_id]".
  1040. string parent = 1 [
  1041. (google.api.field_behavior) = REQUIRED,
  1042. (google.api.resource_reference) = {
  1043. child_type: "securitycenter.googleapis.com/MuteConfig"
  1044. }
  1045. ];
  1046. // The maximum number of configs to return. The service may return fewer than
  1047. // this value.
  1048. // If unspecified, at most 10 configs will be returned.
  1049. // The maximum value is 1000; values above 1000 will be coerced to 1000.
  1050. int32 page_size = 2;
  1051. // A page token, received from a previous `ListMuteConfigs` call.
  1052. // Provide this to retrieve the subsequent page.
  1053. //
  1054. // When paginating, all other parameters provided to `ListMuteConfigs` must
  1055. // match the call that provided the page token.
  1056. string page_token = 3;
  1057. }
  1058. // Response message for listing mute configs.
  1059. message ListMuteConfigsResponse {
  1060. // The mute configs from the specified parent.
  1061. repeated MuteConfig mute_configs = 1;
  1062. // A token, which can be sent as `page_token` to retrieve the next page.
  1063. // If this field is omitted, there are no subsequent pages.
  1064. string next_page_token = 2;
  1065. }
  1066. // Request message for listing notification configs.
  1067. message ListNotificationConfigsRequest {
  1068. // Required. Name of the organization to list notification configs. Its format
  1069. // is "organizations/[organization_id]", "folders/[folder_id]", or
  1070. // "projects/[project_id]".
  1071. string parent = 1 [
  1072. (google.api.field_behavior) = REQUIRED,
  1073. (google.api.resource_reference) = {
  1074. child_type: "securitycenter.googleapis.com/NotificationConfig"
  1075. }
  1076. ];
  1077. // The value returned by the last `ListNotificationConfigsResponse`; indicates
  1078. // that this is a continuation of a prior `ListNotificationConfigs` call, and
  1079. // that the system should return the next page of data.
  1080. string page_token = 2;
  1081. // The maximum number of results to return in a single response. Default is
  1082. // 10, minimum is 1, maximum is 1000.
  1083. int32 page_size = 3;
  1084. }
  1085. // Response message for listing notification configs.
  1086. message ListNotificationConfigsResponse {
  1087. // Notification configs belonging to the requested parent.
  1088. repeated NotificationConfig notification_configs = 1;
  1089. // Token to retrieve the next page of results, or empty if there are no more
  1090. // results.
  1091. string next_page_token = 2;
  1092. }
  1093. // Request message for listing sources.
  1094. message ListSourcesRequest {
  1095. // Required. Resource name of the parent of sources to list. Its format should
  1096. // be "organizations/[organization_id], folders/[folder_id], or
  1097. // projects/[project_id]".
  1098. string parent = 1 [
  1099. (google.api.field_behavior) = REQUIRED,
  1100. (google.api.resource_reference) = {
  1101. child_type: "securitycenter.googleapis.com/Source"
  1102. }
  1103. ];
  1104. // The value returned by the last `ListSourcesResponse`; indicates
  1105. // that this is a continuation of a prior `ListSources` call, and
  1106. // that the system should return the next page of data.
  1107. string page_token = 2;
  1108. // The maximum number of results to return in a single response. Default is
  1109. // 10, minimum is 1, maximum is 1000.
  1110. int32 page_size = 7;
  1111. }
  1112. // Response message for listing sources.
  1113. message ListSourcesResponse {
  1114. // Sources belonging to the requested parent.
  1115. repeated Source sources = 1;
  1116. // Token to retrieve the next page of results, or empty if there are no more
  1117. // results.
  1118. string next_page_token = 2;
  1119. }
  1120. // Request message for listing assets.
  1121. message ListAssetsRequest {
  1122. // Required. Name of the organization assets should belong to. Its format is
  1123. // "organizations/[organization_id], folders/[folder_id], or
  1124. // projects/[project_id]".
  1125. string parent = 1 [
  1126. (google.api.field_behavior) = REQUIRED,
  1127. (google.api.resource_reference) = {
  1128. child_type: "securitycenter.googleapis.com/Asset"
  1129. }
  1130. ];
  1131. // Expression that defines the filter to apply across assets.
  1132. // The expression is a list of zero or more restrictions combined via logical
  1133. // operators `AND` and `OR`.
  1134. // Parentheses are supported, and `OR` has higher precedence than `AND`.
  1135. //
  1136. // Restrictions have the form `<field> <operator> <value>` and may have a `-`
  1137. // character in front of them to indicate negation. The fields map to those
  1138. // defined in the Asset resource. Examples include:
  1139. //
  1140. // * name
  1141. // * security_center_properties.resource_name
  1142. // * resource_properties.a_property
  1143. // * security_marks.marks.marka
  1144. //
  1145. // The supported operators are:
  1146. //
  1147. // * `=` for all value types.
  1148. // * `>`, `<`, `>=`, `<=` for integer values.
  1149. // * `:`, meaning substring matching, for strings.
  1150. //
  1151. // The supported value types are:
  1152. //
  1153. // * string literals in quotes.
  1154. // * integer literals without quotes.
  1155. // * boolean literals `true` and `false` without quotes.
  1156. //
  1157. // The following are the allowed field and operator combinations:
  1158. //
  1159. // * name: `=`
  1160. // * update_time: `=`, `>`, `<`, `>=`, `<=`
  1161. //
  1162. // Usage: This should be milliseconds since epoch or an RFC3339 string.
  1163. // Examples:
  1164. // `update_time = "2019-06-10T16:07:18-07:00"`
  1165. // `update_time = 1560208038000`
  1166. //
  1167. // * create_time: `=`, `>`, `<`, `>=`, `<=`
  1168. //
  1169. // Usage: This should be milliseconds since epoch or an RFC3339 string.
  1170. // Examples:
  1171. // `create_time = "2019-06-10T16:07:18-07:00"`
  1172. // `create_time = 1560208038000`
  1173. //
  1174. // * iam_policy.policy_blob: `=`, `:`
  1175. // * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
  1176. // * security_marks.marks: `=`, `:`
  1177. // * security_center_properties.resource_name: `=`, `:`
  1178. // * security_center_properties.resource_display_name: `=`, `:`
  1179. // * security_center_properties.resource_type: `=`, `:`
  1180. // * security_center_properties.resource_parent: `=`, `:`
  1181. // * security_center_properties.resource_parent_display_name: `=`, `:`
  1182. // * security_center_properties.resource_project: `=`, `:`
  1183. // * security_center_properties.resource_project_display_name: `=`, `:`
  1184. // * security_center_properties.resource_owners: `=`, `:`
  1185. //
  1186. // For example, `resource_properties.size = 100` is a valid filter string.
  1187. //
  1188. // Use a partial match on the empty string to filter based on a property
  1189. // existing: `resource_properties.my_property : ""`
  1190. //
  1191. // Use a negated partial match on the empty string to filter based on a
  1192. // property not existing: `-resource_properties.my_property : ""`
  1193. string filter = 2;
  1194. // Expression that defines what fields and order to use for sorting. The
  1195. // string value should follow SQL syntax: comma separated list of fields. For
  1196. // example: "name,resource_properties.a_property". The default sorting order
  1197. // is ascending. To specify descending order for a field, a suffix " desc"
  1198. // should be appended to the field name. For example: "name
  1199. // desc,resource_properties.a_property". Redundant space characters in the
  1200. // syntax are insignificant. "name desc,resource_properties.a_property" and "
  1201. // name desc , resource_properties.a_property " are equivalent.
  1202. //
  1203. // The following fields are supported:
  1204. // name
  1205. // update_time
  1206. // resource_properties
  1207. // security_marks.marks
  1208. // security_center_properties.resource_name
  1209. // security_center_properties.resource_display_name
  1210. // security_center_properties.resource_parent
  1211. // security_center_properties.resource_parent_display_name
  1212. // security_center_properties.resource_project
  1213. // security_center_properties.resource_project_display_name
  1214. // security_center_properties.resource_type
  1215. string order_by = 3;
  1216. // Time used as a reference point when filtering assets. The filter is limited
  1217. // to assets existing at the supplied time and their values are those at that
  1218. // specific time. Absence of this field will default to the API's version of
  1219. // NOW.
  1220. google.protobuf.Timestamp read_time = 4;
  1221. // When compare_duration is set, the ListAssetsResult's "state_change"
  1222. // attribute is updated to indicate whether the asset was added, removed, or
  1223. // remained present during the compare_duration period of time that precedes
  1224. // the read_time. This is the time between (read_time - compare_duration) and
  1225. // read_time.
  1226. //
  1227. // The state_change value is derived based on the presence of the asset at the
  1228. // two points in time. Intermediate state changes between the two times don't
  1229. // affect the result. For example, the results aren't affected if the asset is
  1230. // removed and re-created again.
  1231. //
  1232. // Possible "state_change" values when compare_duration is specified:
  1233. //
  1234. // * "ADDED": indicates that the asset was not present at the start of
  1235. // compare_duration, but present at read_time.
  1236. // * "REMOVED": indicates that the asset was present at the start of
  1237. // compare_duration, but not present at read_time.
  1238. // * "ACTIVE": indicates that the asset was present at both the
  1239. // start and the end of the time period defined by
  1240. // compare_duration and read_time.
  1241. //
  1242. // If compare_duration is not specified, then the only possible state_change
  1243. // is "UNUSED", which will be the state_change set for all assets present at
  1244. // read_time.
  1245. google.protobuf.Duration compare_duration = 5;
  1246. // A field mask to specify the ListAssetsResult fields to be listed in the
  1247. // response.
  1248. // An empty field mask will list all fields.
  1249. google.protobuf.FieldMask field_mask = 7;
  1250. // The value returned by the last `ListAssetsResponse`; indicates
  1251. // that this is a continuation of a prior `ListAssets` call, and
  1252. // that the system should return the next page of data.
  1253. string page_token = 8;
  1254. // The maximum number of results to return in a single response. Default is
  1255. // 10, minimum is 1, maximum is 1000.
  1256. int32 page_size = 9;
  1257. }
  1258. // Response message for listing assets.
  1259. message ListAssetsResponse {
  1260. // Result containing the Asset and its State.
  1261. message ListAssetsResult {
  1262. // The change in state of the asset.
  1263. //
  1264. // When querying across two points in time this describes
  1265. // the change between the two points: ADDED, REMOVED, or ACTIVE.
  1266. // If there was no compare_duration supplied in the request the state change
  1267. // will be: UNUSED
  1268. enum StateChange {
  1269. // State change is unused, this is the canonical default for this enum.
  1270. UNUSED = 0;
  1271. // Asset was added between the points in time.
  1272. ADDED = 1;
  1273. // Asset was removed between the points in time.
  1274. REMOVED = 2;
  1275. // Asset was present at both point(s) in time.
  1276. ACTIVE = 3;
  1277. }
  1278. // Asset matching the search request.
  1279. Asset asset = 1;
  1280. // State change of the asset between the points in time.
  1281. StateChange state_change = 2;
  1282. }
  1283. // Assets matching the list request.
  1284. repeated ListAssetsResult list_assets_results = 1;
  1285. // Time used for executing the list request.
  1286. google.protobuf.Timestamp read_time = 2;
  1287. // Token to retrieve the next page of results, or empty if there are no more
  1288. // results.
  1289. string next_page_token = 3;
  1290. // The total number of assets matching the query.
  1291. int32 total_size = 4;
  1292. }
  1293. // Request message for listing findings.
  1294. message ListFindingsRequest {
  1295. // Required. Name of the source the findings belong to. Its format is
  1296. // "organizations/[organization_id]/sources/[source_id],
  1297. // folders/[folder_id]/sources/[source_id], or
  1298. // projects/[project_id]/sources/[source_id]". To list across all sources
  1299. // provide a source_id of `-`. For example:
  1300. // organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or
  1301. // projects/{projects_id}/sources/-
  1302. string parent = 1 [
  1303. (google.api.field_behavior) = REQUIRED,
  1304. (google.api.resource_reference) = {
  1305. type: "securitycenter.googleapis.com/Source"
  1306. }
  1307. ];
  1308. // Expression that defines the filter to apply across findings.
  1309. // The expression is a list of one or more restrictions combined via logical
  1310. // operators `AND` and `OR`.
  1311. // Parentheses are supported, and `OR` has higher precedence than `AND`.
  1312. //
  1313. // Restrictions have the form `<field> <operator> <value>` and may have a `-`
  1314. // character in front of them to indicate negation. Examples include:
  1315. //
  1316. // * name
  1317. // * source_properties.a_property
  1318. // * security_marks.marks.marka
  1319. //
  1320. // The supported operators are:
  1321. //
  1322. // * `=` for all value types.
  1323. // * `>`, `<`, `>=`, `<=` for integer values.
  1324. // * `:`, meaning substring matching, for strings.
  1325. //
  1326. // The supported value types are:
  1327. //
  1328. // * string literals in quotes.
  1329. // * integer literals without quotes.
  1330. // * boolean literals `true` and `false` without quotes.
  1331. //
  1332. // The following field and operator combinations are supported:
  1333. //
  1334. // * name: `=`
  1335. // * parent: `=`, `:`
  1336. // * resource_name: `=`, `:`
  1337. // * state: `=`, `:`
  1338. // * category: `=`, `:`
  1339. // * external_uri: `=`, `:`
  1340. // * event_time: `=`, `>`, `<`, `>=`, `<=`
  1341. //
  1342. // Usage: This should be milliseconds since epoch or an RFC3339 string.
  1343. // Examples:
  1344. // `event_time = "2019-06-10T16:07:18-07:00"`
  1345. // `event_time = 1560208038000`
  1346. //
  1347. // * severity: `=`, `:`
  1348. // * workflow_state: `=`, `:`
  1349. // * security_marks.marks: `=`, `:`
  1350. // * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
  1351. //
  1352. // For example, `source_properties.size = 100` is a valid filter string.
  1353. //
  1354. // Use a partial match on the empty string to filter based on a property
  1355. // existing: `source_properties.my_property : ""`
  1356. //
  1357. // Use a negated partial match on the empty string to filter based on a
  1358. // property not existing: `-source_properties.my_property : ""`
  1359. //
  1360. // * resource:
  1361. // * resource.name: `=`, `:`
  1362. // * resource.parent_name: `=`, `:`
  1363. // * resource.parent_display_name: `=`, `:`
  1364. // * resource.project_name: `=`, `:`
  1365. // * resource.project_display_name: `=`, `:`
  1366. // * resource.type: `=`, `:`
  1367. // * resource.folders.resource_folder: `=`, `:`
  1368. // * resource.display_name: `=`, `:`
  1369. string filter = 2;
  1370. // Expression that defines what fields and order to use for sorting. The
  1371. // string value should follow SQL syntax: comma separated list of fields. For
  1372. // example: "name,resource_properties.a_property". The default sorting order
  1373. // is ascending. To specify descending order for a field, a suffix " desc"
  1374. // should be appended to the field name. For example: "name
  1375. // desc,source_properties.a_property". Redundant space characters in the
  1376. // syntax are insignificant. "name desc,source_properties.a_property" and "
  1377. // name desc , source_properties.a_property " are equivalent.
  1378. //
  1379. // The following fields are supported:
  1380. // name
  1381. // parent
  1382. // state
  1383. // category
  1384. // resource_name
  1385. // event_time
  1386. // source_properties
  1387. // security_marks.marks
  1388. string order_by = 3;
  1389. // Time used as a reference point when filtering findings. The filter is
  1390. // limited to findings existing at the supplied time and their values are
  1391. // those at that specific time. Absence of this field will default to the
  1392. // API's version of NOW.
  1393. google.protobuf.Timestamp read_time = 4;
  1394. // When compare_duration is set, the ListFindingsResult's "state_change"
  1395. // attribute is updated to indicate whether the finding had its state changed,
  1396. // the finding's state remained unchanged, or if the finding was added in any
  1397. // state during the compare_duration period of time that precedes the
  1398. // read_time. This is the time between (read_time - compare_duration) and
  1399. // read_time.
  1400. //
  1401. // The state_change value is derived based on the presence and state of the
  1402. // finding at the two points in time. Intermediate state changes between the
  1403. // two times don't affect the result. For example, the results aren't affected
  1404. // if the finding is made inactive and then active again.
  1405. //
  1406. // Possible "state_change" values when compare_duration is specified:
  1407. //
  1408. // * "CHANGED": indicates that the finding was present and matched the given
  1409. // filter at the start of compare_duration, but changed its
  1410. // state at read_time.
  1411. // * "UNCHANGED": indicates that the finding was present and matched the given
  1412. // filter at the start of compare_duration and did not change
  1413. // state at read_time.
  1414. // * "ADDED": indicates that the finding did not match the given filter or
  1415. // was not present at the start of compare_duration, but was
  1416. // present at read_time.
  1417. // * "REMOVED": indicates that the finding was present and matched the
  1418. // filter at the start of compare_duration, but did not match
  1419. // the filter at read_time.
  1420. //
  1421. // If compare_duration is not specified, then the only possible state_change
  1422. // is "UNUSED", which will be the state_change set for all findings present at
  1423. // read_time.
  1424. google.protobuf.Duration compare_duration = 5;
  1425. // A field mask to specify the Finding fields to be listed in the response.
  1426. // An empty field mask will list all fields.
  1427. google.protobuf.FieldMask field_mask = 7;
  1428. // The value returned by the last `ListFindingsResponse`; indicates
  1429. // that this is a continuation of a prior `ListFindings` call, and
  1430. // that the system should return the next page of data.
  1431. string page_token = 8;
  1432. // The maximum number of results to return in a single response. Default is
  1433. // 10, minimum is 1, maximum is 1000.
  1434. int32 page_size = 9;
  1435. }
  1436. // Response message for listing findings.
  1437. message ListFindingsResponse {
  1438. // Result containing the Finding and its StateChange.
  1439. message ListFindingsResult {
  1440. // The change in state of the finding.
  1441. //
  1442. // When querying across two points in time this describes
  1443. // the change in the finding between the two points: CHANGED, UNCHANGED,
  1444. // ADDED, or REMOVED. Findings can not be deleted, so REMOVED implies that
  1445. // the finding at timestamp does not match the filter specified, but it did
  1446. // at timestamp - compare_duration. If there was no compare_duration
  1447. // supplied in the request the state change will be: UNUSED
  1448. enum StateChange {
  1449. // State change is unused, this is the canonical default for this enum.
  1450. UNUSED = 0;
  1451. // The finding has changed state in some way between the points in time
  1452. // and existed at both points.
  1453. CHANGED = 1;
  1454. // The finding has not changed state between the points in time and
  1455. // existed at both points.
  1456. UNCHANGED = 2;
  1457. // The finding was created between the points in time.
  1458. ADDED = 3;
  1459. // The finding at timestamp does not match the filter specified, but it
  1460. // did at timestamp - compare_duration.
  1461. REMOVED = 4;
  1462. }
  1463. // Information related to the Google Cloud resource that is
  1464. // associated with this finding.
  1465. message Resource {
  1466. // The full resource name of the resource. See:
  1467. // https://cloud.google.com/apis/design/resource_names#full_resource_name
  1468. string name = 1;
  1469. // The human readable name of the resource.
  1470. string display_name = 8;
  1471. // The full resource type of the resource.
  1472. string type = 6;
  1473. // The full resource name of project that the resource belongs to.
  1474. string project_name = 2;
  1475. // The project ID that the resource belongs to.
  1476. string project_display_name = 3;
  1477. // The full resource name of resource's parent.
  1478. string parent_name = 4;
  1479. // The human readable name of resource's parent.
  1480. string parent_display_name = 5;
  1481. // Contains a Folder message for each folder in the assets ancestry.
  1482. // The first folder is the deepest nested folder, and the last folder is
  1483. // the folder directly under the Organization.
  1484. repeated Folder folders = 7;
  1485. }
  1486. // Finding matching the search request.
  1487. Finding finding = 1;
  1488. // State change of the finding between the points in time.
  1489. StateChange state_change = 2;
  1490. // Output only. Resource that is associated with this finding.
  1491. Resource resource = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  1492. }
  1493. // Findings matching the list request.
  1494. repeated ListFindingsResult list_findings_results = 1;
  1495. // Time used for executing the list request.
  1496. google.protobuf.Timestamp read_time = 2;
  1497. // Token to retrieve the next page of results, or empty if there are no more
  1498. // results.
  1499. string next_page_token = 3;
  1500. // The total number of findings matching the query.
  1501. int32 total_size = 4;
  1502. }
  1503. // Request message for updating a finding's state.
  1504. message SetFindingStateRequest {
  1505. // Required. The relative resource name of the finding. See:
  1506. // https://cloud.google.com/apis/design/resource_names#relative_resource_name
  1507. // Example:
  1508. // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}".
  1509. string name = 1 [
  1510. (google.api.field_behavior) = REQUIRED,
  1511. (google.api.resource_reference) = {
  1512. type: "securitycenter.googleapis.com/Finding"
  1513. }
  1514. ];
  1515. // Required. The desired State of the finding.
  1516. Finding.State state = 2 [(google.api.field_behavior) = REQUIRED];
  1517. // Required. The time at which the updated state takes effect.
  1518. google.protobuf.Timestamp start_time = 3
  1519. [(google.api.field_behavior) = REQUIRED];
  1520. }
  1521. // Request message for updating a finding's mute status.
  1522. message SetMuteRequest {
  1523. // Required. The relative resource name of the finding. See:
  1524. // https://cloud.google.com/apis/design/resource_names#relative_resource_name
  1525. // Example:
  1526. // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
  1527. // "folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
  1528. // "projects/{project_id}/sources/{source_id}/findings/{finding_id}".
  1529. string name = 1 [
  1530. (google.api.field_behavior) = REQUIRED,
  1531. (google.api.resource_reference) = {
  1532. type: "securitycenter.googleapis.com/Finding"
  1533. }
  1534. ];
  1535. // Required. The desired state of the Mute.
  1536. Finding.Mute mute = 2 [(google.api.field_behavior) = REQUIRED];
  1537. }
  1538. // Request message for running asset discovery for an organization.
  1539. message RunAssetDiscoveryRequest {
  1540. // Required. Name of the organization to run asset discovery for. Its format
  1541. // is "organizations/[organization_id]".
  1542. string parent = 1 [
  1543. (google.api.field_behavior) = REQUIRED,
  1544. (google.api.resource_reference) = {
  1545. type: "cloudresourcemanager.googleapis.com/Organization"
  1546. }
  1547. ];
  1548. }
  1549. // Request message for updating a ExternalSystem resource.
  1550. message UpdateExternalSystemRequest {
  1551. // Required. The external system resource to update.
  1552. ExternalSystem external_system = 1 [(google.api.field_behavior) = REQUIRED];
  1553. // The FieldMask to use when updating the external system resource.
  1554. //
  1555. // If empty all mutable fields will be updated.
  1556. google.protobuf.FieldMask update_mask = 2;
  1557. }
  1558. // Request message for updating or creating a finding.
  1559. message UpdateFindingRequest {
  1560. // Required. The finding resource to update or create if it does not already
  1561. // exist. parent, security_marks, and update_time will be ignored.
  1562. //
  1563. // In the case of creation, the finding id portion of the name must be
  1564. // alphanumeric and less than or equal to 32 characters and greater than 0
  1565. // characters in length.
  1566. Finding finding = 1 [(google.api.field_behavior) = REQUIRED];
  1567. // The FieldMask to use when updating the finding resource. This field should
  1568. // not be specified when creating a finding.
  1569. //
  1570. // When updating a finding, an empty mask is treated as updating all mutable
  1571. // fields and replacing source_properties. Individual source_properties can
  1572. // be added/updated by using "source_properties.<property key>" in the field
  1573. // mask.
  1574. google.protobuf.FieldMask update_mask = 2;
  1575. }
  1576. // Request message for updating a mute config.
  1577. message UpdateMuteConfigRequest {
  1578. // Required. The mute config being updated.
  1579. MuteConfig mute_config = 1 [(google.api.field_behavior) = REQUIRED];
  1580. // The list of fields to be updated.
  1581. // If empty all mutable fields will be updated.
  1582. google.protobuf.FieldMask update_mask = 2;
  1583. }
  1584. // Request message for updating a notification config.
  1585. message UpdateNotificationConfigRequest {
  1586. // Required. The notification config to update.
  1587. NotificationConfig notification_config = 1
  1588. [(google.api.field_behavior) = REQUIRED];
  1589. // The FieldMask to use when updating the notification config.
  1590. //
  1591. // If empty all mutable fields will be updated.
  1592. google.protobuf.FieldMask update_mask = 2;
  1593. }
  1594. // Request message for updating an organization's settings.
  1595. message UpdateOrganizationSettingsRequest {
  1596. // Required. The organization settings resource to update.
  1597. OrganizationSettings organization_settings = 1
  1598. [(google.api.field_behavior) = REQUIRED];
  1599. // The FieldMask to use when updating the settings resource.
  1600. //
  1601. // If empty all mutable fields will be updated.
  1602. google.protobuf.FieldMask update_mask = 2;
  1603. }
  1604. // Request message for updating a source.
  1605. message UpdateSourceRequest {
  1606. // Required. The source resource to update.
  1607. Source source = 1 [(google.api.field_behavior) = REQUIRED];
  1608. // The FieldMask to use when updating the source resource.
  1609. //
  1610. // If empty all mutable fields will be updated.
  1611. google.protobuf.FieldMask update_mask = 2;
  1612. }
  1613. // Request message for updating a SecurityMarks resource.
  1614. message UpdateSecurityMarksRequest {
  1615. // Required. The security marks resource to update.
  1616. SecurityMarks security_marks = 1 [(google.api.field_behavior) = REQUIRED];
  1617. // The FieldMask to use when updating the security marks resource.
  1618. //
  1619. // The field mask must not contain duplicate fields.
  1620. // If empty or set to "marks", all marks will be replaced. Individual
  1621. // marks can be updated using "marks.<mark_key>".
  1622. google.protobuf.FieldMask update_mask = 2;
  1623. // The time at which the updated SecurityMarks take effect.
  1624. // If not set uses current server time. Updates will be applied to the
  1625. // SecurityMarks that are active immediately preceding this time. Must be
  1626. // earlier or equal to the server time.
  1627. google.protobuf.Timestamp start_time = 3;
  1628. }
  1629. // Request message for creating a big query export.
  1630. message CreateBigQueryExportRequest {
  1631. // Required. Resource name of the new big query export's parent. Its format is
  1632. // "organizations/[organization_id]", "folders/[folder_id]", or
  1633. // "projects/[project_id]".
  1634. string parent = 1 [
  1635. (google.api.field_behavior) = REQUIRED,
  1636. (google.api.resource_reference) = {
  1637. child_type: "securitycenter.googleapis.com/BigQueryExport"
  1638. }
  1639. ];
  1640. // Required. The big query export being created.
  1641. BigQueryExport big_query_export = 2 [(google.api.field_behavior) = REQUIRED];
  1642. // Required. Unique identifier provided by the client within the parent scope.
  1643. // It must consist of lower case letters, numbers, and hyphen, with the first
  1644. // character a letter, the last a letter or a number, and a 63 character
  1645. // maximum.
  1646. string big_query_export_id = 3 [(google.api.field_behavior) = REQUIRED];
  1647. }
  1648. // Request message for updating a BigQuery export.
  1649. message UpdateBigQueryExportRequest {
  1650. // Required. The BigQuery export being updated.
  1651. BigQueryExport big_query_export = 1 [(google.api.field_behavior) = REQUIRED];
  1652. // The list of fields to be updated.
  1653. // If empty all mutable fields will be updated.
  1654. google.protobuf.FieldMask update_mask = 2;
  1655. }
  1656. // Request message for listing BigQuery exports at a given scope e.g.
  1657. // organization, folder or project.
  1658. message ListBigQueryExportsRequest {
  1659. // Required. The parent, which owns the collection of BigQuery exports. Its
  1660. // format is "organizations/[organization_id]", "folders/[folder_id]",
  1661. // "projects/[project_id]".
  1662. string parent = 1 [
  1663. (google.api.field_behavior) = REQUIRED,
  1664. (google.api.resource_reference) = {
  1665. child_type: "securitycenter.googleapis.com/BigQueryExport"
  1666. }
  1667. ];
  1668. // The maximum number of configs to return. The service may return fewer than
  1669. // this value.
  1670. // If unspecified, at most 10 configs will be returned.
  1671. // The maximum value is 1000; values above 1000 will be coerced to 1000.
  1672. int32 page_size = 2;
  1673. // A page token, received from a previous `ListBigQueryExports` call.
  1674. // Provide this to retrieve the subsequent page.
  1675. // When paginating, all other parameters provided to `ListBigQueryExports`
  1676. // must match the call that provided the page token.
  1677. string page_token = 3;
  1678. }
  1679. // Response message for listing BigQuery exports.
  1680. message ListBigQueryExportsResponse {
  1681. // The BigQuery exports from the specified parent.
  1682. repeated BigQueryExport big_query_exports = 1;
  1683. // A token, which can be sent as `page_token` to retrieve the next page.
  1684. // If this field is omitted, there are no subsequent pages.
  1685. string next_page_token = 2;
  1686. }
  1687. // Request message for deleting a big query export.
  1688. message DeleteBigQueryExportRequest {
  1689. // Required. Name of the big query export to delete. Its format is
  1690. // organizations/{organization}/bigQueryExports/{export_id},
  1691. // folders/{folder}/bigQueryExports/{export_id}, or
  1692. // projects/{project}/bigQueryExports/{export_id}
  1693. string name = 1 [
  1694. (google.api.field_behavior) = REQUIRED,
  1695. (google.api.resource_reference) = {
  1696. type: "securitycenter.googleapis.com/BigQueryExport"
  1697. }
  1698. ];
  1699. }