google-cloud-security_center-v1 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f13b0297efb3fee913255351e082c5c11fad87adcda13c90a84e45401db96b0b
4
- data.tar.gz: 504b2ca3c237b00b032935e74d9effdb85bc702ef9ae61ca0b99e14dbb4b7432
3
+ metadata.gz: bc7b3192e218f96cd469ca396931c34e407c3e14505eda024e920b5b3897aa7d
4
+ data.tar.gz: 0e5ac1115ef7b81145b042c7d5d788c3fe04c5fd5a7dd18d193113fe95d0812c
5
5
  SHA512:
6
- metadata.gz: 4a1a7317a533c567e5ff404be91a480179f8b5d45e0fcb57ed03d54cffa1c7add2c51821db3724cee40db8523d123ebebe1b48b97258c3b380be446177b6d456
7
- data.tar.gz: cbb8059fe743a15451bd248c70ca6a0b007067ae56e7e80875516eea61969a59fce9eaa747d40becc26fe290381791cca27b51b106b9d1aa60b7bbfbe14db44e
6
+ metadata.gz: 6150b78c3a621d1f9d2e1dc3a05d2b954e7b4d7de4785d6fbb4cceaf6ae6cf00925e1f830e7949e11af4637790f7423575bfa1502232dfd23a8033270d2f2ab0
7
+ data.tar.gz: ba82fafbbea350e30e109ecc2ca449802b04a9d032f4637348b0820a86095e2ca86a215a7033e063399fd8c8165e28d93c902c9ea41ae01af4738c1e457bfdc6
@@ -257,8 +257,8 @@ module Google
257
257
  # the default parameter values, pass an empty Hash as a request object (see above).
258
258
  #
259
259
  # @param parent [::String]
260
- # Required. The parent, at which bulk action needs to be applied. Its format is
261
- # "organizations/[organization_id]", "folders/[folder_id]",
260
+ # Required. The parent, at which bulk action needs to be applied. Its format
261
+ # is "organizations/[organization_id]", "folders/[folder_id]",
262
262
  # "projects/[project_id]".
263
263
  # @param filter [::String]
264
264
  # Expression that identifies findings that should be updated.
@@ -379,8 +379,8 @@ module Google
379
379
  # Required. Resource name of the new source's parent. Its format should be
380
380
  # "organizations/[organization_id]".
381
381
  # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash]
382
- # Required. The Source being created, only the display_name and description will be
383
- # used. All other fields will be ignored.
382
+ # Required. The Source being created, only the display_name and description
383
+ # will be used. All other fields will be ignored.
384
384
  #
385
385
  # @yield [response, operation] Access the result along with the RPC operation
386
386
  # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Source]
@@ -473,8 +473,8 @@ module Google
473
473
  # It must be alphanumeric and less than or equal to 32 characters and
474
474
  # greater than 0 characters in length.
475
475
  # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash]
476
- # Required. The Finding being created. The name and security_marks will be ignored as
477
- # they are both output only fields on this resource.
476
+ # Required. The Finding being created. The name and security_marks will be
477
+ # ignored as they are both output only fields on this resource.
478
478
  #
479
479
  # @yield [response, operation] Access the result along with the RPC operation
480
480
  # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding]
@@ -653,16 +653,18 @@ module Google
653
653
  # the default parameter values, pass an empty Hash as a request object (see above).
654
654
  #
655
655
  # @param parent [::String]
656
- # Required. Resource name of the new notification config's parent. Its format is
657
- # "organizations/[organization_id]".
656
+ # Required. Resource name of the new notification config's parent. Its format
657
+ # is "organizations/[organization_id]", "folders/[folder_id]", or
658
+ # "projects/[project_id]".
658
659
  # @param config_id [::String]
659
660
  # Required.
660
661
  # Unique identifier provided by the client within the parent scope.
661
662
  # It must be between 1 and 128 characters, and contains alphanumeric
662
663
  # characters, underscores or hyphens only.
663
664
  # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash]
664
- # Required. The notification config being created. The name and the service account
665
- # will be ignored as they are both output only fields on this resource.
665
+ # Required. The notification config being created. The name and the service
666
+ # account will be ignored as they are both output only fields on this
667
+ # resource.
666
668
  #
667
669
  # @yield [response, operation] Access the result along with the RPC operation
668
670
  # @yieldparam response [::Google::Cloud::SecurityCenter::V1::NotificationConfig]
@@ -1272,8 +1274,8 @@ module Google
1272
1274
  # the default parameter values, pass an empty Hash as a request object (see above).
1273
1275
  #
1274
1276
  # @param name [::String]
1275
- # Required. Name of the organization to get organization settings for. Its format is
1276
- # "organizations/[organization_id]/organizationSettings".
1277
+ # Required. Name of the organization to get organization settings for. Its
1278
+ # format is "organizations/[organization_id]/organizationSettings".
1277
1279
  #
1278
1280
  # @yield [response, operation] Access the result along with the RPC operation
1279
1281
  # @yieldparam response [::Google::Cloud::SecurityCenter::V1::OrganizationSettings]
@@ -1512,9 +1514,9 @@ module Google
1512
1514
  # Use a negated partial match on the empty string to filter based on a
1513
1515
  # property not existing: `-resource_properties.my_property : ""`
1514
1516
  # @param group_by [::String]
1515
- # Required. Expression that defines what assets fields to use for grouping. The string
1516
- # value should follow SQL syntax: comma separated list of fields. For
1517
- # example:
1517
+ # Required. Expression that defines what assets fields to use for grouping.
1518
+ # The string value should follow SQL syntax: comma separated list of fields.
1519
+ # For example:
1518
1520
  # "security_center_properties.resource_project,security_center_properties.project".
1519
1521
  #
1520
1522
  # The following fields are supported when compare_duration is not set:
@@ -1735,9 +1737,9 @@ module Google
1735
1737
  # * resource.project_display_name: `=`, `:`
1736
1738
  # * resource.type: `=`, `:`
1737
1739
  # @param group_by [::String]
1738
- # Required. Expression that defines what assets fields to use for grouping (including
1739
- # `state_change`). The string value should follow SQL syntax: comma separated
1740
- # list of fields. For example: "parent,resource_name".
1740
+ # Required. Expression that defines what assets fields to use for grouping
1741
+ # (including `state_change`). The string value should follow SQL syntax:
1742
+ # comma separated list of fields. For example: "parent,resource_name".
1741
1743
  #
1742
1744
  # The following fields are supported:
1743
1745
  #
@@ -2334,8 +2336,8 @@ module Google
2334
2336
  # the default parameter values, pass an empty Hash as a request object (see above).
2335
2337
  #
2336
2338
  # @param parent [::String]
2337
- # Required. The parent, which owns the collection of mute configs. Its format is
2338
- # "organizations/[organization_id]", "folders/[folder_id]",
2339
+ # Required. The parent, which owns the collection of mute configs. Its format
2340
+ # is "organizations/[organization_id]", "folders/[folder_id]",
2339
2341
  # "projects/[project_id]".
2340
2342
  # @param page_size [::Integer]
2341
2343
  # The maximum number of configs to return. The service may return fewer than
@@ -2439,8 +2441,9 @@ module Google
2439
2441
  # the default parameter values, pass an empty Hash as a request object (see above).
2440
2442
  #
2441
2443
  # @param parent [::String]
2442
- # Required. Name of the organization to list notification configs.
2443
- # Its format is "organizations/[organization_id]".
2444
+ # Required. Name of the organization to list notification configs. Its format
2445
+ # is "organizations/[organization_id]", "folders/[folder_id]", or
2446
+ # "projects/[project_id]".
2444
2447
  # @param page_token [::String]
2445
2448
  # The value returned by the last `ListNotificationConfigsResponse`; indicates
2446
2449
  # that this is a continuation of a prior `ListNotificationConfigs` call, and
@@ -2539,8 +2542,8 @@ module Google
2539
2542
  # the default parameter values, pass an empty Hash as a request object (see above).
2540
2543
  #
2541
2544
  # @param parent [::String]
2542
- # Required. Resource name of the parent of sources to list. Its format should be
2543
- # "organizations/[organization_id], folders/[folder_id], or
2545
+ # Required. Resource name of the parent of sources to list. Its format should
2546
+ # be "organizations/[organization_id], folders/[folder_id], or
2544
2547
  # projects/[project_id]".
2545
2548
  # @param page_token [::String]
2546
2549
  # The value returned by the last `ListSourcesResponse`; indicates
@@ -2645,8 +2648,8 @@ module Google
2645
2648
  # the default parameter values, pass an empty Hash as a request object (see above).
2646
2649
  #
2647
2650
  # @param parent [::String]
2648
- # Required. Name of the organization to run asset discovery for. Its format is
2649
- # "organizations/[organization_id]".
2651
+ # Required. Name of the organization to run asset discovery for. Its format
2652
+ # is "organizations/[organization_id]".
2650
2653
  #
2651
2654
  # @yield [response, operation] Access the result along with the RPC operation
2652
2655
  # @yieldparam response [::Gapic::Operation]
@@ -3201,8 +3204,8 @@ module Google
3201
3204
  # the default parameter values, pass an empty Hash as a request object (see above).
3202
3205
  #
3203
3206
  # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash]
3204
- # Required. The finding resource to update or create if it does not already exist.
3205
- # parent, security_marks, and update_time will be ignored.
3207
+ # Required. The finding resource to update or create if it does not already
3208
+ # exist. parent, security_marks, and update_time will be ignored.
3206
3209
  #
3207
3210
  # In the case of creation, the finding id portion of the name must be
3208
3211
  # alphanumeric and less than or equal to 32 characters and greater than 0
@@ -4025,8 +4028,8 @@ module Google
4025
4028
  # the default parameter values, pass an empty Hash as a request object (see above).
4026
4029
  #
4027
4030
  # @param parent [::String]
4028
- # Required. The parent, which owns the collection of BigQuery exports. Its format is
4029
- # "organizations/[organization_id]", "folders/[folder_id]",
4031
+ # Required. The parent, which owns the collection of BigQuery exports. Its
4032
+ # format is "organizations/[organization_id]", "folders/[folder_id]",
4030
4033
  # "projects/[project_id]".
4031
4034
  # @param page_size [::Integer]
4032
4035
  # The maximum number of configs to return. The service may return fewer than
@@ -267,18 +267,53 @@ module Google
267
267
  ##
268
268
  # Create a fully-qualified NotificationConfig resource string.
269
269
  #
270
- # The resource will be in the following format:
270
+ # @overload notification_config_path(organization:, notification_config:)
271
+ # The resource will be in the following format:
271
272
  #
272
- # `organizations/{organization}/notificationConfigs/{notification_config}`
273
+ # `organizations/{organization}/notificationConfigs/{notification_config}`
273
274
  #
274
- # @param organization [String]
275
- # @param notification_config [String]
275
+ # @param organization [String]
276
+ # @param notification_config [String]
277
+ #
278
+ # @overload notification_config_path(folder:, notification_config:)
279
+ # The resource will be in the following format:
280
+ #
281
+ # `folders/{folder}/notificationConfigs/{notification_config}`
282
+ #
283
+ # @param folder [String]
284
+ # @param notification_config [String]
285
+ #
286
+ # @overload notification_config_path(project:, notification_config:)
287
+ # The resource will be in the following format:
288
+ #
289
+ # `projects/{project}/notificationConfigs/{notification_config}`
290
+ #
291
+ # @param project [String]
292
+ # @param notification_config [String]
276
293
  #
277
294
  # @return [::String]
278
- def notification_config_path organization:, notification_config:
279
- raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
295
+ def notification_config_path **args
296
+ resources = {
297
+ "notification_config:organization" => (proc do |organization:, notification_config:|
298
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
299
+
300
+ "organizations/#{organization}/notificationConfigs/#{notification_config}"
301
+ end),
302
+ "folder:notification_config" => (proc do |folder:, notification_config:|
303
+ raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
304
+
305
+ "folders/#{folder}/notificationConfigs/#{notification_config}"
306
+ end),
307
+ "notification_config:project" => (proc do |project:, notification_config:|
308
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
309
+
310
+ "projects/#{project}/notificationConfigs/#{notification_config}"
311
+ end)
312
+ }
280
313
 
281
- "organizations/#{organization}/notificationConfigs/#{notification_config}"
314
+ resource = resources[args.keys.sort.join(":")]
315
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
316
+ resource.call(**args)
282
317
  end
283
318
 
284
319
  ##
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module SecurityCenter
23
23
  module V1
24
- VERSION = "0.21.0"
24
+ VERSION = "0.22.0"
25
25
  end
26
26
  end
27
27
  end
@@ -29,8 +29,8 @@ module Google
29
29
  # 2. Once a bulk operation is started, there is no way to stop it.
30
30
  # @!attribute [rw] parent
31
31
  # @return [::String]
32
- # Required. The parent, at which bulk action needs to be applied. Its format is
33
- # "organizations/[organization_id]", "folders/[folder_id]",
32
+ # Required. The parent, at which bulk action needs to be applied. Its format
33
+ # is "organizations/[organization_id]", "folders/[folder_id]",
34
34
  # "projects/[project_id]".
35
35
  # @!attribute [rw] filter
36
36
  # @return [::String]
@@ -81,8 +81,8 @@ module Google
81
81
  # greater than 0 characters in length.
82
82
  # @!attribute [rw] finding
83
83
  # @return [::Google::Cloud::SecurityCenter::V1::Finding]
84
- # Required. The Finding being created. The name and security_marks will be ignored as
85
- # they are both output only fields on this resource.
84
+ # Required. The Finding being created. The name and security_marks will be
85
+ # ignored as they are both output only fields on this resource.
86
86
  class CreateFindingRequest
87
87
  include ::Google::Protobuf::MessageExts
88
88
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -111,8 +111,9 @@ module Google
111
111
  # Request message for creating a notification config.
112
112
  # @!attribute [rw] parent
113
113
  # @return [::String]
114
- # Required. Resource name of the new notification config's parent. Its format is
115
- # "organizations/[organization_id]".
114
+ # Required. Resource name of the new notification config's parent. Its format
115
+ # is "organizations/[organization_id]", "folders/[folder_id]", or
116
+ # "projects/[project_id]".
116
117
  # @!attribute [rw] config_id
117
118
  # @return [::String]
118
119
  # Required.
@@ -121,8 +122,9 @@ module Google
121
122
  # characters, underscores or hyphens only.
122
123
  # @!attribute [rw] notification_config
123
124
  # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig]
124
- # Required. The notification config being created. The name and the service account
125
- # will be ignored as they are both output only fields on this resource.
125
+ # Required. The notification config being created. The name and the service
126
+ # account will be ignored as they are both output only fields on this
127
+ # resource.
126
128
  class CreateNotificationConfigRequest
127
129
  include ::Google::Protobuf::MessageExts
128
130
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -135,8 +137,8 @@ module Google
135
137
  # "organizations/[organization_id]".
136
138
  # @!attribute [rw] source
137
139
  # @return [::Google::Cloud::SecurityCenter::V1::Source]
138
- # Required. The Source being created, only the display_name and description will be
139
- # used. All other fields will be ignored.
140
+ # Required. The Source being created, only the display_name and description
141
+ # will be used. All other fields will be ignored.
140
142
  class CreateSourceRequest
141
143
  include ::Google::Protobuf::MessageExts
142
144
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -201,8 +203,8 @@ module Google
201
203
  # Request message for getting organization settings.
202
204
  # @!attribute [rw] name
203
205
  # @return [::String]
204
- # Required. Name of the organization to get organization settings for. Its format is
205
- # "organizations/[organization_id]/organizationSettings".
206
+ # Required. Name of the organization to get organization settings for. Its
207
+ # format is "organizations/[organization_id]/organizationSettings".
206
208
  class GetOrganizationSettingsRequest
207
209
  include ::Google::Protobuf::MessageExts
208
210
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -290,9 +292,9 @@ module Google
290
292
  # property not existing: `-resource_properties.my_property : ""`
291
293
  # @!attribute [rw] group_by
292
294
  # @return [::String]
293
- # Required. Expression that defines what assets fields to use for grouping. The string
294
- # value should follow SQL syntax: comma separated list of fields. For
295
- # example:
295
+ # Required. Expression that defines what assets fields to use for grouping.
296
+ # The string value should follow SQL syntax: comma separated list of fields.
297
+ # For example:
296
298
  # "security_center_properties.resource_project,security_center_properties.project".
297
299
  #
298
300
  # The following fields are supported when compare_duration is not set:
@@ -451,9 +453,9 @@ module Google
451
453
  # * resource.type: `=`, `:`
452
454
  # @!attribute [rw] group_by
453
455
  # @return [::String]
454
- # Required. Expression that defines what assets fields to use for grouping (including
455
- # `state_change`). The string value should follow SQL syntax: comma separated
456
- # list of fields. For example: "parent,resource_name".
456
+ # Required. Expression that defines what assets fields to use for grouping
457
+ # (including `state_change`). The string value should follow SQL syntax:
458
+ # comma separated list of fields. For example: "parent,resource_name".
457
459
  #
458
460
  # The following fields are supported:
459
461
  #
@@ -566,8 +568,8 @@ module Google
566
568
  # folder or project.
567
569
  # @!attribute [rw] parent
568
570
  # @return [::String]
569
- # Required. The parent, which owns the collection of mute configs. Its format is
570
- # "organizations/[organization_id]", "folders/[folder_id]",
571
+ # Required. The parent, which owns the collection of mute configs. Its format
572
+ # is "organizations/[organization_id]", "folders/[folder_id]",
571
573
  # "projects/[project_id]".
572
574
  # @!attribute [rw] page_size
573
575
  # @return [::Integer]
@@ -603,8 +605,9 @@ module Google
603
605
  # Request message for listing notification configs.
604
606
  # @!attribute [rw] parent
605
607
  # @return [::String]
606
- # Required. Name of the organization to list notification configs.
607
- # Its format is "organizations/[organization_id]".
608
+ # Required. Name of the organization to list notification configs. Its format
609
+ # is "organizations/[organization_id]", "folders/[folder_id]", or
610
+ # "projects/[project_id]".
608
611
  # @!attribute [rw] page_token
609
612
  # @return [::String]
610
613
  # The value returned by the last `ListNotificationConfigsResponse`; indicates
@@ -635,8 +638,8 @@ module Google
635
638
  # Request message for listing sources.
636
639
  # @!attribute [rw] parent
637
640
  # @return [::String]
638
- # Required. Resource name of the parent of sources to list. Its format should be
639
- # "organizations/[organization_id], folders/[folder_id], or
641
+ # Required. Resource name of the parent of sources to list. Its format should
642
+ # be "organizations/[organization_id], folders/[folder_id], or
640
643
  # projects/[project_id]".
641
644
  # @!attribute [rw] page_token
642
645
  # @return [::String]
@@ -1143,8 +1146,8 @@ module Google
1143
1146
  # Request message for running asset discovery for an organization.
1144
1147
  # @!attribute [rw] parent
1145
1148
  # @return [::String]
1146
- # Required. Name of the organization to run asset discovery for. Its format is
1147
- # "organizations/[organization_id]".
1149
+ # Required. Name of the organization to run asset discovery for. Its format
1150
+ # is "organizations/[organization_id]".
1148
1151
  class RunAssetDiscoveryRequest
1149
1152
  include ::Google::Protobuf::MessageExts
1150
1153
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -1167,8 +1170,8 @@ module Google
1167
1170
  # Request message for updating or creating a finding.
1168
1171
  # @!attribute [rw] finding
1169
1172
  # @return [::Google::Cloud::SecurityCenter::V1::Finding]
1170
- # Required. The finding resource to update or create if it does not already exist.
1171
- # parent, security_marks, and update_time will be ignored.
1173
+ # Required. The finding resource to update or create if it does not already
1174
+ # exist. parent, security_marks, and update_time will be ignored.
1172
1175
  #
1173
1176
  # In the case of creation, the finding id portion of the name must be
1174
1177
  # alphanumeric and less than or equal to 32 characters and greater than 0
@@ -1301,8 +1304,8 @@ module Google
1301
1304
  # organization, folder or project.
1302
1305
  # @!attribute [rw] parent
1303
1306
  # @return [::String]
1304
- # Required. The parent, which owns the collection of BigQuery exports. Its format is
1305
- # "organizations/[organization_id]", "folders/[folder_id]",
1307
+ # Required. The parent, which owns the collection of BigQuery exports. Its
1308
+ # format is "organizations/[organization_id]", "folders/[folder_id]",
1306
1309
  # "projects/[project_id]".
1307
1310
  # @!attribute [rw] page_size
1308
1311
  # @return [::Integer]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-security_center-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-16 00:00:00.000000000 Z
11
+ date: 2022-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.10'
19
+ version: '0.12'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.10'
29
+ version: '0.12'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a