Skip to content

Commit e8ca754

Browse files
docs: update currently supported Finding filter fields (#391)
* docs: update currently supported Finding filter fields. PiperOrigin-RevId: 378264900 Source-Link: googleapis/googleapis@020ba74 Source-Link: googleapis/googleapis-gen@b1413c1 * 🦉 Updates from OwlBot Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 6ca4b8f commit e8ca754

File tree

2 files changed

+235
-151
lines changed

2 files changed

+235
-151
lines changed

packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/securitycenter_service.proto

Lines changed: 97 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ syntax = "proto3";
1717
package google.cloud.securitycenter.v1;
1818

1919
import public "google/cloud/securitycenter/v1/run_asset_discovery_response.proto";
20+
2021
import "google/api/annotations.proto";
2122
import "google/api/client.proto";
2223
import "google/api/field_behavior.proto";
@@ -47,7 +48,8 @@ option ruby_package = "Google::Cloud::SecurityCenter::V1";
4748
// V1 APIs for Security Center service.
4849
service SecurityCenter {
4950
option (google.api.default_host) = "securitycenter.googleapis.com";
50-
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
51+
option (google.api.oauth_scopes) =
52+
"https://www.googleapis.com/auth/cloud-platform";
5153

5254
// Creates a source.
5355
rpc CreateSource(CreateSourceRequest) returns (Source) {
@@ -69,25 +71,29 @@ service SecurityCenter {
6971
}
7072

7173
// Creates a notification config.
72-
rpc CreateNotificationConfig(CreateNotificationConfigRequest) returns (NotificationConfig) {
74+
rpc CreateNotificationConfig(CreateNotificationConfigRequest)
75+
returns (NotificationConfig) {
7376
option (google.api.http) = {
7477
post: "/v1/{parent=organizations/*}/notificationConfigs"
7578
body: "notification_config"
7679
};
77-
option (google.api.method_signature) = "parent,config_id,notification_config";
80+
option (google.api.method_signature) =
81+
"parent,config_id,notification_config";
7882
option (google.api.method_signature) = "parent,notification_config";
7983
}
8084

8185
// Deletes a notification config.
82-
rpc DeleteNotificationConfig(DeleteNotificationConfigRequest) returns (google.protobuf.Empty) {
86+
rpc DeleteNotificationConfig(DeleteNotificationConfigRequest)
87+
returns (google.protobuf.Empty) {
8388
option (google.api.http) = {
8489
delete: "/v1/{name=organizations/*/notificationConfigs/*}"
8590
};
8691
option (google.api.method_signature) = "name";
8792
}
8893

8994
// Gets the access control policy on the specified Source.
90-
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
95+
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
96+
returns (google.iam.v1.Policy) {
9197
option (google.api.http) = {
9298
post: "/v1/{resource=organizations/*/sources/*}:getIamPolicy"
9399
body: "*"
@@ -96,15 +102,17 @@ service SecurityCenter {
96102
}
97103

98104
// Gets a notification config.
99-
rpc GetNotificationConfig(GetNotificationConfigRequest) returns (NotificationConfig) {
105+
rpc GetNotificationConfig(GetNotificationConfigRequest)
106+
returns (NotificationConfig) {
100107
option (google.api.http) = {
101108
get: "/v1/{name=organizations/*/notificationConfigs/*}"
102109
};
103110
option (google.api.method_signature) = "name";
104111
}
105112

106113
// Gets the settings for an organization.
107-
rpc GetOrganizationSettings(GetOrganizationSettingsRequest) returns (OrganizationSettings) {
114+
rpc GetOrganizationSettings(GetOrganizationSettingsRequest)
115+
returns (OrganizationSettings) {
108116
option (google.api.http) = {
109117
get: "/v1/{name=organizations/*/organizationSettings}"
110118
};
@@ -163,12 +171,8 @@ service SecurityCenter {
163171
rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) {
164172
option (google.api.http) = {
165173
get: "/v1/{parent=organizations/*}/assets"
166-
additional_bindings {
167-
get: "/v1/{parent=folders/*}/assets"
168-
}
169-
additional_bindings {
170-
get: "/v1/{parent=projects/*}/assets"
171-
}
174+
additional_bindings { get: "/v1/{parent=folders/*}/assets" }
175+
additional_bindings { get: "/v1/{parent=projects/*}/assets" }
172176
};
173177
}
174178

@@ -179,17 +183,14 @@ service SecurityCenter {
179183
rpc ListFindings(ListFindingsRequest) returns (ListFindingsResponse) {
180184
option (google.api.http) = {
181185
get: "/v1/{parent=organizations/*/sources/*}/findings"
182-
additional_bindings {
183-
get: "/v1/{parent=folders/*/sources/*}/findings"
184-
}
185-
additional_bindings {
186-
get: "/v1/{parent=projects/*/sources/*}/findings"
187-
}
186+
additional_bindings { get: "/v1/{parent=folders/*/sources/*}/findings" }
187+
additional_bindings { get: "/v1/{parent=projects/*/sources/*}/findings" }
188188
};
189189
}
190190

191191
// Lists notification configs.
192-
rpc ListNotificationConfigs(ListNotificationConfigsRequest) returns (ListNotificationConfigsResponse) {
192+
rpc ListNotificationConfigs(ListNotificationConfigsRequest)
193+
returns (ListNotificationConfigsResponse) {
193194
option (google.api.http) = {
194195
get: "/v1/{parent=organizations/*}/notificationConfigs"
195196
};
@@ -200,12 +201,8 @@ service SecurityCenter {
200201
rpc ListSources(ListSourcesRequest) returns (ListSourcesResponse) {
201202
option (google.api.http) = {
202203
get: "/v1/{parent=organizations/*}/sources"
203-
additional_bindings {
204-
get: "/v1/{parent=folders/*}/sources"
205-
}
206-
additional_bindings {
207-
get: "/v1/{parent=projects/*}/sources"
208-
}
204+
additional_bindings { get: "/v1/{parent=folders/*}/sources" }
205+
additional_bindings { get: "/v1/{parent=projects/*}/sources" }
209206
};
210207
option (google.api.method_signature) = "parent";
211208
}
@@ -216,7 +213,8 @@ service SecurityCenter {
216213
// This API can only be called with limited frequency for an organization. If
217214
// it is called too frequently the caller will receive a TOO_MANY_REQUESTS
218215
// error.
219-
rpc RunAssetDiscovery(RunAssetDiscoveryRequest) returns (google.longrunning.Operation) {
216+
rpc RunAssetDiscovery(RunAssetDiscoveryRequest)
217+
returns (google.longrunning.Operation) {
220218
option (google.api.http) = {
221219
post: "/v1/{parent=organizations/*}/assets:runDiscovery"
222220
body: "*"
@@ -246,7 +244,8 @@ service SecurityCenter {
246244
}
247245

248246
// Sets the access control policy on the specified Source.
249-
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
247+
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
248+
returns (google.iam.v1.Policy) {
250249
option (google.api.http) = {
251250
post: "/v1/{resource=organizations/*/sources/*}:setIamPolicy"
252251
body: "*"
@@ -255,7 +254,8 @@ service SecurityCenter {
255254
}
256255

257256
// Returns the permissions that a caller has on the specified source.
258-
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
257+
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
258+
returns (google.iam.v1.TestIamPermissionsResponse) {
259259
option (google.api.http) = {
260260
post: "/v1/{resource=organizations/*/sources/*}:testIamPermissions"
261261
body: "*"
@@ -284,7 +284,8 @@ service SecurityCenter {
284284
//
285285
// Updates a notification config. The following update
286286
// fields are allowed: description, pubsub_topic, streaming_config.filter
287-
rpc UpdateNotificationConfig(UpdateNotificationConfigRequest) returns (NotificationConfig) {
287+
rpc UpdateNotificationConfig(UpdateNotificationConfigRequest)
288+
returns (NotificationConfig) {
288289
option (google.api.http) = {
289290
patch: "/v1/{notification_config.name=organizations/*/notificationConfigs/*}"
290291
body: "notification_config"
@@ -294,7 +295,8 @@ service SecurityCenter {
294295
}
295296

296297
// Updates an organization's settings.
297-
rpc UpdateOrganizationSettings(UpdateOrganizationSettingsRequest) returns (OrganizationSettings) {
298+
rpc UpdateOrganizationSettings(UpdateOrganizationSettingsRequest)
299+
returns (OrganizationSettings) {
298300
option (google.api.http) = {
299301
patch: "/v1/{organization_settings.name=organizations/*/organizationSettings}"
300302
body: "organization_settings"
@@ -357,15 +359,15 @@ message CreateFindingRequest {
357359
// greater than 0 characters in length.
358360
string finding_id = 2 [(google.api.field_behavior) = REQUIRED];
359361

360-
// Required. The Finding being created. The name and security_marks will be ignored as
361-
// they are both output only fields on this resource.
362+
// Required. The Finding being created. The name and security_marks will be
363+
// ignored as they are both output only fields on this resource.
362364
Finding finding = 3 [(google.api.field_behavior) = REQUIRED];
363365
}
364366

365367
// Request message for creating a notification config.
366368
message CreateNotificationConfigRequest {
367-
// Required. Resource name of the new notification config's parent. Its format is
368-
// "organizations/[organization_id]".
369+
// Required. Resource name of the new notification config's parent. Its format
370+
// is "organizations/[organization_id]".
369371
string parent = 1 [
370372
(google.api.field_behavior) = REQUIRED,
371373
(google.api.resource_reference) = {
@@ -379,9 +381,11 @@ message CreateNotificationConfigRequest {
379381
// characters, underscores or hyphens only.
380382
string config_id = 2 [(google.api.field_behavior) = REQUIRED];
381383

382-
// Required. The notification config being created. The name and the service account
383-
// will be ignored as they are both output only fields on this resource.
384-
NotificationConfig notification_config = 3 [(google.api.field_behavior) = REQUIRED];
384+
// Required. The notification config being created. The name and the service
385+
// account will be ignored as they are both output only fields on this
386+
// resource.
387+
NotificationConfig notification_config = 3
388+
[(google.api.field_behavior) = REQUIRED];
385389
}
386390

387391
// Request message for creating a source.
@@ -395,8 +399,8 @@ message CreateSourceRequest {
395399
}
396400
];
397401

398-
// Required. The Source being created, only the display_name and description will be
399-
// used. All other fields will be ignored.
402+
// Required. The Source being created, only the display_name and description
403+
// will be used. All other fields will be ignored.
400404
Source source = 2 [(google.api.field_behavior) = REQUIRED];
401405
}
402406

@@ -426,8 +430,8 @@ message GetNotificationConfigRequest {
426430

427431
// Request message for getting organization settings.
428432
message GetOrganizationSettingsRequest {
429-
// Required. Name of the organization to get organization settings for. Its format is
430-
// "organizations/[organization_id]/organizationSettings".
433+
// Required. Name of the organization to get organization settings for. Its
434+
// format is "organizations/[organization_id]/organizationSettings".
431435
string name = 1 [
432436
(google.api.field_behavior) = REQUIRED,
433437
(google.api.resource_reference) = {
@@ -524,9 +528,9 @@ message GroupAssetsRequest {
524528
// property not existing: `-resource_properties.my_property : ""`
525529
string filter = 2;
526530

527-
// Required. Expression that defines what assets fields to use for grouping. The string
528-
// value should follow SQL syntax: comma separated list of fields. For
529-
// example:
531+
// Required. Expression that defines what assets fields to use for grouping.
532+
// The string value should follow SQL syntax: comma separated list of fields.
533+
// For example:
530534
// "security_center_properties.resource_project,security_center_properties.project".
531535
//
532536
// The following fields are supported when compare_duration is not set:
@@ -656,28 +660,37 @@ message GroupFindingsRequest {
656660
// * category: `=`, `:`
657661
// * external_uri: `=`, `:`
658662
// * event_time: `=`, `>`, `<`, `>=`, `<=`
659-
// * severity: `=`, `:`
660663
//
661664
// Usage: This should be milliseconds since epoch or an RFC3339 string.
662665
// Examples:
663666
// `event_time = "2019-06-10T16:07:18-07:00"`
664667
// `event_time = 1560208038000`
665668
//
669+
// * severity: `=`, `:`
670+
// * workflow_state: `=`, `:`
666671
// * security_marks.marks: `=`, `:`
667672
// * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
668673
//
669-
// For example, `source_properties.size = 100` is a valid filter string.
674+
// For example, `source_properties.size = 100` is a valid filter string.
670675
//
671-
// Use a partial match on the empty string to filter based on a property
672-
// existing: `source_properties.my_property : ""`
676+
// Use a partial match on the empty string to filter based on a property
677+
// existing: `source_properties.my_property : ""`
673678
//
674-
// Use a negated partial match on the empty string to filter based on a
675-
// property not existing: `-source_properties.my_property : ""`
679+
// Use a negated partial match on the empty string to filter based on a
680+
// property not existing: `-source_properties.my_property : ""`
681+
//
682+
// * resource:
683+
// * resource.name: `=`, `:`
684+
// * resource.parent_name: `=`, `:`
685+
// * resource.parent_display_name: `=`, `:`
686+
// * resource.project_name: `=`, `:`
687+
// * resource.project_display_name: `=`, `:`
688+
// * resource.type: `=`, `:`
676689
string filter = 2;
677690

678-
// Required. Expression that defines what assets fields to use for grouping (including
679-
// `state_change`). The string value should follow SQL syntax: comma separated
680-
// list of fields. For example: "parent,resource_name".
691+
// Required. Expression that defines what assets fields to use for grouping
692+
// (including `state_change`). The string value should follow SQL syntax:
693+
// comma separated list of fields. For example: "parent,resource_name".
681694
//
682695
// The following fields are supported:
683696
//
@@ -802,8 +815,8 @@ message ListNotificationConfigsResponse {
802815

803816
// Request message for listing sources.
804817
message ListSourcesRequest {
805-
// Required. Resource name of the parent of sources to list. Its format should be
806-
// "organizations/[organization_id], folders/[folder_id], or
818+
// Required. Resource name of the parent of sources to list. Its format should
819+
// be "organizations/[organization_id], folders/[folder_id], or
807820
// projects/[project_id]".
808821
string parent = 1 [
809822
(google.api.field_behavior) = REQUIRED,
@@ -1072,23 +1085,33 @@ message ListFindingsRequest {
10721085
// * category: `=`, `:`
10731086
// * external_uri: `=`, `:`
10741087
// * event_time: `=`, `>`, `<`, `>=`, `<=`
1075-
// * severity: `=`, `:`
10761088
//
10771089
// Usage: This should be milliseconds since epoch or an RFC3339 string.
10781090
// Examples:
10791091
// `event_time = "2019-06-10T16:07:18-07:00"`
10801092
// `event_time = 1560208038000`
10811093
//
1082-
// security_marks.marks: `=`, `:`
1083-
// source_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
1094+
// * severity: `=`, `:`
1095+
// * workflow_state: `=`, `:`
1096+
// * security_marks.marks: `=`, `:`
1097+
// * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=`
10841098
//
1085-
// For example, `source_properties.size = 100` is a valid filter string.
1099+
// For example, `source_properties.size = 100` is a valid filter string.
10861100
//
1087-
// Use a partial match on the empty string to filter based on a property
1088-
// existing: `source_properties.my_property : ""`
1101+
// Use a partial match on the empty string to filter based on a property
1102+
// existing: `source_properties.my_property : ""`
10891103
//
1090-
// Use a negated partial match on the empty string to filter based on a
1091-
// property not existing: `-source_properties.my_property : ""`
1104+
// Use a negated partial match on the empty string to filter based on a
1105+
// property not existing: `-source_properties.my_property : ""`
1106+
//
1107+
// * resource:
1108+
// * resource.name: `=`, `:`
1109+
// * resource.parent_name: `=`, `:`
1110+
// * resource.parent_display_name: `=`, `:`
1111+
// * resource.project_name: `=`, `:`
1112+
// * resource.project_display_name: `=`, `:`
1113+
// * resource.type: `=`, `:`
1114+
// * resource.folders.resource_folder: `=`, `:`
10921115
string filter = 2;
10931116

10941117
// Expression that defines what fields and order to use for sorting. The
@@ -1261,13 +1284,14 @@ message SetFindingStateRequest {
12611284
Finding.State state = 2 [(google.api.field_behavior) = REQUIRED];
12621285

12631286
// Required. The time at which the updated state takes effect.
1264-
google.protobuf.Timestamp start_time = 3 [(google.api.field_behavior) = REQUIRED];
1287+
google.protobuf.Timestamp start_time = 3
1288+
[(google.api.field_behavior) = REQUIRED];
12651289
}
12661290

12671291
// Request message for running asset discovery for an organization.
12681292
message RunAssetDiscoveryRequest {
1269-
// Required. Name of the organization to run asset discovery for. Its format is
1270-
// "organizations/[organization_id]".
1293+
// Required. Name of the organization to run asset discovery for. Its format
1294+
// is "organizations/[organization_id]".
12711295
string parent = 1 [
12721296
(google.api.field_behavior) = REQUIRED,
12731297
(google.api.resource_reference) = {
@@ -1278,8 +1302,8 @@ message RunAssetDiscoveryRequest {
12781302

12791303
// Request message for updating or creating a finding.
12801304
message UpdateFindingRequest {
1281-
// Required. The finding resource to update or create if it does not already exist.
1282-
// parent, security_marks, and update_time will be ignored.
1305+
// Required. The finding resource to update or create if it does not already
1306+
// exist. parent, security_marks, and update_time will be ignored.
12831307
//
12841308
// In the case of creation, the finding id portion of the name must be
12851309
// alphanumeric and less than or equal to 32 characters and greater than 0
@@ -1299,7 +1323,8 @@ message UpdateFindingRequest {
12991323
// Request message for updating a notification config.
13001324
message UpdateNotificationConfigRequest {
13011325
// Required. The notification config to update.
1302-
NotificationConfig notification_config = 1 [(google.api.field_behavior) = REQUIRED];
1326+
NotificationConfig notification_config = 1
1327+
[(google.api.field_behavior) = REQUIRED];
13031328

13041329
// The FieldMask to use when updating the notification config.
13051330
//
@@ -1310,7 +1335,8 @@ message UpdateNotificationConfigRequest {
13101335
// Request message for updating an organization's settings.
13111336
message UpdateOrganizationSettingsRequest {
13121337
// Required. The organization settings resource to update.
1313-
OrganizationSettings organization_settings = 1 [(google.api.field_behavior) = REQUIRED];
1338+
OrganizationSettings organization_settings = 1
1339+
[(google.api.field_behavior) = REQUIRED];
13141340

13151341
// The FieldMask to use when updating the settings resource.
13161342
//

0 commit comments

Comments
 (0)