@@ -17,7 +17,6 @@ syntax = "proto3";
1717package google.cloud.securitycenter.v1p1beta1 ;
1818
1919import public "google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto" ;
20-
2120import "google/api/annotations.proto" ;
2221import "google/api/client.proto" ;
2322import "google/api/field_behavior.proto" ;
@@ -47,8 +46,7 @@ option ruby_package = "Google::Cloud::SecurityCenter::V1p1beta1";
4746// V1p1Beta1 APIs for Security Center service.
4847service SecurityCenter {
4948 option (google.api.default_host ) = "securitycenter.googleapis.com" ;
50- option (google.api.oauth_scopes ) =
51- "https://www.googleapis.com/auth/cloud-platform" ;
49+ option (google.api.oauth_scopes ) = "https://www.googleapis.com/auth/cloud-platform" ;
5250
5351 // Creates a source.
5452 rpc CreateSource (CreateSourceRequest ) returns (Source ) {
@@ -59,7 +57,6 @@ service SecurityCenter {
5957 option (google.api.method_signature ) = "parent,source" ;
6058 }
6159
62- //
6360 // Creates a finding. The corresponding source must exist for finding
6461 // creation to succeed.
6562 rpc CreateFinding (CreateFindingRequest ) returns (Finding ) {
@@ -72,29 +69,25 @@ service SecurityCenter {
7269 }
7370
7471 // Creates a notification config.
75- rpc CreateNotificationConfig (CreateNotificationConfigRequest )
76- returns (NotificationConfig ) {
72+ rpc CreateNotificationConfig (CreateNotificationConfigRequest ) returns (NotificationConfig ) {
7773 option (google.api.http ) = {
7874 post : "/v1p1beta1/{parent=organizations/*}/notificationConfigs"
7975 body : "notification_config"
8076 };
81- option (google.api.method_signature ) =
82- "parent,config_id,notification_config" ;
77+ option (google.api.method_signature ) = "parent,config_id,notification_config" ;
8378 option (google.api.method_signature ) = "parent,notification_config" ;
8479 }
8580
8681 // Deletes a notification config.
87- rpc DeleteNotificationConfig (DeleteNotificationConfigRequest )
88- returns (google.protobuf.Empty ) {
82+ rpc DeleteNotificationConfig (DeleteNotificationConfigRequest ) returns (google.protobuf.Empty ) {
8983 option (google.api.http ) = {
9084 delete : "/v1p1beta1/{name=organizations/*/notificationConfigs/*}"
9185 };
9286 option (google.api.method_signature ) = "name" ;
9387 }
9488
9589 // Gets the access control policy on the specified Source.
96- rpc GetIamPolicy (google.iam.v1.GetIamPolicyRequest )
97- returns (google.iam.v1.Policy ) {
90+ rpc GetIamPolicy (google.iam.v1.GetIamPolicyRequest ) returns (google.iam.v1.Policy ) {
9891 option (google.api.http ) = {
9992 post : "/v1p1beta1/{resource=organizations/*/sources/*}:getIamPolicy"
10093 body : "*"
@@ -103,17 +96,15 @@ service SecurityCenter {
10396 }
10497
10598 // Gets a notification config.
106- rpc GetNotificationConfig (GetNotificationConfigRequest )
107- returns (NotificationConfig ) {
99+ rpc GetNotificationConfig (GetNotificationConfigRequest ) returns (NotificationConfig ) {
108100 option (google.api.http ) = {
109101 get : "/v1p1beta1/{name=organizations/*/notificationConfigs/*}"
110102 };
111103 option (google.api.method_signature ) = "name" ;
112104 }
113105
114106 // Gets the settings for an organization.
115- rpc GetOrganizationSettings (GetOrganizationSettingsRequest )
116- returns (OrganizationSettings ) {
107+ rpc GetOrganizationSettings (GetOrganizationSettingsRequest ) returns (OrganizationSettings ) {
117108 option (google.api.http ) = {
118109 get : "/v1p1beta1/{name=organizations/*/organizationSettings}"
119110 };
@@ -170,8 +161,7 @@ service SecurityCenter {
170161 }
171162
172163 // Lists notification configs.
173- rpc ListNotificationConfigs (ListNotificationConfigsRequest )
174- returns (ListNotificationConfigsResponse ) {
164+ rpc ListNotificationConfigs (ListNotificationConfigsRequest ) returns (ListNotificationConfigsResponse ) {
175165 option (google.api.http ) = {
176166 get : "/v1p1beta1/{parent=organizations/*}/notificationConfigs"
177167 };
@@ -192,8 +182,7 @@ service SecurityCenter {
192182 // This API can only be called with limited frequency for an organization. If
193183 // it is called too frequently the caller will receive a TOO_MANY_REQUESTS
194184 // error.
195- rpc RunAssetDiscovery (RunAssetDiscoveryRequest )
196- returns (google.longrunning.Operation ) {
185+ rpc RunAssetDiscovery (RunAssetDiscoveryRequest ) returns (google.longrunning.Operation ) {
197186 option (google.api.http ) = {
198187 post : "/v1p1beta1/{parent=organizations/*}/assets:runDiscovery"
199188 body : "*"
@@ -205,7 +194,6 @@ service SecurityCenter {
205194 };
206195 }
207196
208- //
209197 // Updates the state of a finding.
210198 rpc SetFindingState (SetFindingStateRequest ) returns (Finding ) {
211199 option (google.api.http ) = {
@@ -216,8 +204,7 @@ service SecurityCenter {
216204 }
217205
218206 // Sets the access control policy on the specified Source.
219- rpc SetIamPolicy (google.iam.v1.SetIamPolicyRequest )
220- returns (google.iam.v1.Policy ) {
207+ rpc SetIamPolicy (google.iam.v1.SetIamPolicyRequest ) returns (google.iam.v1.Policy ) {
221208 option (google.api.http ) = {
222209 post : "/v1p1beta1/{resource=organizations/*/sources/*}:setIamPolicy"
223210 body : "*"
@@ -226,8 +213,7 @@ service SecurityCenter {
226213 }
227214
228215 // Returns the permissions that a caller has on the specified source.
229- rpc TestIamPermissions (google.iam.v1.TestIamPermissionsRequest )
230- returns (google.iam.v1.TestIamPermissionsResponse ) {
216+ rpc TestIamPermissions (google.iam.v1.TestIamPermissionsRequest ) returns (google.iam.v1.TestIamPermissionsResponse ) {
231217 option (google.api.http ) = {
232218 post : "/v1p1beta1/{resource=organizations/*/sources/*}:testIamPermissions"
233219 body : "*"
@@ -248,8 +234,7 @@ service SecurityCenter {
248234
249235 // Updates a notification config. The following update
250236 // fields are allowed: description, pubsub_topic, streaming_config.filter
251- rpc UpdateNotificationConfig (UpdateNotificationConfigRequest )
252- returns (NotificationConfig ) {
237+ rpc UpdateNotificationConfig (UpdateNotificationConfigRequest ) returns (NotificationConfig ) {
253238 option (google.api.http ) = {
254239 patch : "/v1p1beta1/{notification_config.name=organizations/*/notificationConfigs/*}"
255240 body : "notification_config"
@@ -259,8 +244,7 @@ service SecurityCenter {
259244 }
260245
261246 // Updates an organization's settings.
262- rpc UpdateOrganizationSettings (UpdateOrganizationSettingsRequest )
263- returns (OrganizationSettings ) {
247+ rpc UpdateOrganizationSettings (UpdateOrganizationSettingsRequest ) returns (OrganizationSettings ) {
264248 option (google.api.http ) = {
265249 patch : "/v1p1beta1/{organization_settings.name=organizations/*/organizationSettings}"
266250 body : "organization_settings"
@@ -305,19 +289,17 @@ message CreateFindingRequest {
305289 ];
306290
307291 // Required. Unique identifier provided by the client within the parent scope.
308- // It must be alphanumeric and less than or equal to 32 characters and
309- // greater than 0 characters in length.
310292 string finding_id = 2 [(google.api.field_behavior ) = REQUIRED ];
311293
312- // Required. The Finding being created. The name and security_marks will be
313- // ignored as they are both output only fields on this resource.
294+ // Required. The Finding being created. The name and security_marks will be ignored as
295+ // they are both output only fields on this resource.
314296 Finding finding = 3 [(google.api.field_behavior ) = REQUIRED ];
315297}
316298
317299// Request message for creating a notification config.
318300message CreateNotificationConfigRequest {
319- // Required. Resource name of the new notification config's parent. Its format
320- // is "organizations/[organization_id]".
301+ // Required. Resource name of the new notification config's parent. Its format is
302+ // "organizations/[organization_id]".
321303 string parent = 1 [
322304 (google.api.field_behavior ) = REQUIRED ,
323305 (google.api.resource_reference ) = {
@@ -331,11 +313,9 @@ message CreateNotificationConfigRequest {
331313 // characters, underscores or hyphens only.
332314 string config_id = 2 [(google.api.field_behavior ) = REQUIRED ];
333315
334- // Required. The notification config being created. The name and the service
335- // account will be ignored as they are both output only fields on this
336- // resource.
337- NotificationConfig notification_config = 3
338- [(google.api.field_behavior ) = REQUIRED ];
316+ // Required. The notification config being created. The name and the service account
317+ // will be ignored as they are both output only fields on this resource.
318+ NotificationConfig notification_config = 3 [(google.api.field_behavior ) = REQUIRED ];
339319}
340320
341321// Request message for creating a source.
@@ -349,8 +329,8 @@ message CreateSourceRequest {
349329 }
350330 ];
351331
352- // Required. The Source being created, only the display_name and description
353- // will be used. All other fields will be ignored.
332+ // Required. The Source being created, only the display_name and description will be
333+ // used. All other fields will be ignored.
354334 Source source = 2 [(google.api.field_behavior ) = REQUIRED ];
355335}
356336
@@ -380,8 +360,8 @@ message GetNotificationConfigRequest {
380360
381361// Request message for getting organization settings.
382362message GetOrganizationSettingsRequest {
383- // Required. Name of the organization to get organization settings for. Its
384- // format is "organizations/[organization_id]/organizationSettings".
363+ // Required. Name of the organization to get organization settings for. Its format is
364+ // "organizations/[organization_id]/organizationSettings".
385365 string name = 1 [
386366 (google.api.field_behavior ) = REQUIRED ,
387367 (google.api.resource_reference ) = {
@@ -477,9 +457,9 @@ message GroupAssetsRequest {
477457 // property not existing: `-resource_properties.my_property : ""`
478458 string filter = 2 ;
479459
480- // Required. Expression that defines what assets fields to use for grouping.
481- // The string value should follow SQL syntax: comma separated list of fields.
482- // For example:
460+ // Required. Expression that defines what assets fields to use for grouping. The string
461+ // value should follow SQL syntax: comma separated list of fields. For
462+ // example:
483463 // "security_center_properties.resource_project,security_center_properties.project".
484464 //
485465 // The following fields are supported when compare_duration is not set:
@@ -624,9 +604,9 @@ message GroupFindingsRequest {
624604 // property not existing: `-source_properties.my_property : ""`
625605 string filter = 2 ;
626606
627- // Required. Expression that defines what assets fields to use for grouping
628- // (including `state_change`). The string value should follow SQL syntax:
629- // comma separated list of fields. For example: "parent,resource_name".
607+ // Required. Expression that defines what assets fields to use for grouping (including
608+ // `state_change`). The string value should follow SQL syntax: comma separated
609+ // list of fields. For example: "parent,resource_name".
630610 //
631611 // The following fields are supported:
632612 //
@@ -750,8 +730,8 @@ message ListNotificationConfigsResponse {
750730
751731// Request message for listing sources.
752732message ListSourcesRequest {
753- // Required. Resource name of the parent of sources to list. Its format should
754- // be "organizations/[organization_id]".
733+ // Required. Resource name of the parent of sources to list. Its format should be
734+ // "organizations/[organization_id]".
755735 string parent = 1 [
756736 (google.api.field_behavior ) = REQUIRED ,
757737 (google.api.resource_reference ) = {
@@ -909,12 +889,10 @@ message ListAssetsRequest {
909889 // read_time.
910890 google.protobuf.Duration compare_duration = 5 ;
911891
912- // Optional.
913892 // A field mask to specify the ListAssetsResult fields to be listed in the
914893 // response.
915894 // An empty field mask will list all fields.
916- google.protobuf.FieldMask field_mask = 7
917- [(google.api.field_behavior ) = OPTIONAL ];
895+ google.protobuf.FieldMask field_mask = 7 ;
918896
919897 // The value returned by the last `ListAssetsResponse`; indicates
920898 // that this is a continuation of a prior `ListAssets` call, and
@@ -1093,11 +1071,9 @@ message ListFindingsRequest {
10931071 // read_time.
10941072 google.protobuf.Duration compare_duration = 5 ;
10951073
1096- // Optional.
10971074 // A field mask to specify the Finding fields to be listed in the response.
10981075 // An empty field mask will list all fields.
1099- google.protobuf.FieldMask field_mask = 7
1100- [(google.api.field_behavior ) = OPTIONAL ];
1076+ google.protobuf.FieldMask field_mask = 7 ;
11011077
11021078 // The value returned by the last `ListFindingsResponse`; indicates
11031079 // that this is a continuation of a prior `ListFindings` call, and
@@ -1168,7 +1144,7 @@ message ListFindingsResponse {
11681144 StateChange state_change = 2 ;
11691145
11701146 // Output only. Resource that is associated with this finding.
1171- Resource resource = 3 ;
1147+ Resource resource = 3 [ (google.api .field_behavior ) = OUTPUT_ONLY ] ;
11721148 }
11731149
11741150 // Findings matching the list request.
@@ -1202,14 +1178,13 @@ message SetFindingStateRequest {
12021178 Finding.State state = 2 [(google.api.field_behavior ) = REQUIRED ];
12031179
12041180 // Required. The time at which the updated state takes effect.
1205- google.protobuf.Timestamp start_time = 3
1206- [(google.api.field_behavior ) = REQUIRED ];
1181+ google.protobuf.Timestamp start_time = 3 [(google.api.field_behavior ) = REQUIRED ];
12071182}
12081183
12091184// Request message for running asset discovery for an organization.
12101185message RunAssetDiscoveryRequest {
1211- // Required. Name of the organization to run asset discovery for. Its format
1212- // is "organizations/[organization_id]".
1186+ // Required. Name of the organization to run asset discovery for. Its format is
1187+ // "organizations/[organization_id]".
12131188 string parent = 1 [
12141189 (google.api.field_behavior ) = REQUIRED ,
12151190 (google.api.resource_reference ) = {
@@ -1220,8 +1195,8 @@ message RunAssetDiscoveryRequest {
12201195
12211196// Request message for updating or creating a finding.
12221197message UpdateFindingRequest {
1223- // Required. The finding resource to update or create if it does not already
1224- // exist. parent, security_marks, and update_time will be ignored.
1198+ // Required. The finding resource to update or create if it does not already exist.
1199+ // parent, security_marks, and update_time will be ignored.
12251200 //
12261201 // In the case of creation, the finding id portion of the name must be
12271202 // alphanumeric and less than or equal to 32 characters and greater than 0
@@ -1241,8 +1216,7 @@ message UpdateFindingRequest {
12411216// Request message for updating a notification config.
12421217message UpdateNotificationConfigRequest {
12431218 // Required. The notification config to update.
1244- NotificationConfig notification_config = 1
1245- [(google.api.field_behavior ) = REQUIRED ];
1219+ NotificationConfig notification_config = 1 [(google.api.field_behavior ) = REQUIRED ];
12461220
12471221 // The FieldMask to use when updating the notification config.
12481222 //
@@ -1253,8 +1227,7 @@ message UpdateNotificationConfigRequest {
12531227// Request message for updating an organization's settings.
12541228message UpdateOrganizationSettingsRequest {
12551229 // Required. The organization settings resource to update.
1256- OrganizationSettings organization_settings = 1
1257- [(google.api.field_behavior ) = REQUIRED ];
1230+ OrganizationSettings organization_settings = 1 [(google.api.field_behavior ) = REQUIRED ];
12581231
12591232 // The FieldMask to use when updating the settings resource.
12601233 //
0 commit comments