google-cloud-security_center 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,20 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/security_center/v1/notification_message.proto
3
+
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/annotations_pb'
8
+ require 'google/cloud/security_center/v1/finding_pb'
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_message "google.cloud.securitycenter.v1.NotificationMessage" do
11
+ optional :notification_config_name, :string, 1
12
+ oneof :event do
13
+ optional :finding, :message, 2, "google.cloud.securitycenter.v1.Finding"
14
+ end
15
+ end
16
+ end
17
+
18
+ module Google::Cloud::SecurityCenter::V1
19
+ NotificationMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.NotificationMessage").msgclass
20
+ end
@@ -4,8 +4,8 @@
4
4
 
5
5
  require 'google/protobuf'
6
6
 
7
- require 'google/api/resource_pb'
8
7
  require 'google/api/annotations_pb'
8
+ require 'google/api/resource_pb'
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_message "google.cloud.securitycenter.v1.OrganizationSettings" do
11
11
  optional :name, :string, 1
@@ -4,8 +4,8 @@
4
4
 
5
5
  require 'google/protobuf'
6
6
 
7
- require 'google/protobuf/duration_pb'
8
7
  require 'google/api/annotations_pb'
8
+ require 'google/protobuf/duration_pb'
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_message "google.cloud.securitycenter.v1.RunAssetDiscoveryResponse" do
11
11
  optional :state, :enum, 1, "google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State"
@@ -72,6 +72,10 @@ module Google
72
72
  "page_token",
73
73
  "next_page_token",
74
74
  "list_findings_results"),
75
+ "list_notification_configs" => Google::Gax::PageDescriptor.new(
76
+ "page_token",
77
+ "next_page_token",
78
+ "notification_configs"),
75
79
  "list_sources" => Google::Gax::PageDescriptor.new(
76
80
  "page_token",
77
81
  "next_page_token",
@@ -109,6 +113,12 @@ module Google
109
113
 
110
114
  private_constant :FINDING_SECURITY_MARKS_PATH_TEMPLATE
111
115
 
116
+ NOTIFICATION_CONFIG_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
117
+ "organizations/{organization}/notificationConfigs/{notification_config}"
118
+ )
119
+
120
+ private_constant :NOTIFICATION_CONFIG_PATH_TEMPLATE
121
+
112
122
  ORGANIZATION_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
113
123
  "organizations/{organization}"
114
124
  )
@@ -127,6 +137,12 @@ module Google
127
137
 
128
138
  private_constant :SOURCE_PATH_TEMPLATE
129
139
 
140
+ TOPIC_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
141
+ "projects/{project}/topics/{topic}"
142
+ )
143
+
144
+ private_constant :TOPIC_PATH_TEMPLATE
145
+
130
146
  # Returns a fully-qualified asset_security_marks resource name string.
131
147
  # @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
132
148
  # This helper function will be deleted in the next major version.
@@ -168,6 +184,17 @@ module Google
168
184
  )
169
185
  end
170
186
 
187
+ # Returns a fully-qualified notification_config resource name string.
188
+ # @param organization [String]
189
+ # @param notification_config [String]
190
+ # @return [String]
191
+ def self.notification_config_path organization, notification_config
192
+ NOTIFICATION_CONFIG_PATH_TEMPLATE.render(
193
+ :"organization" => organization,
194
+ :"notification_config" => notification_config
195
+ )
196
+ end
197
+
171
198
  # Returns a fully-qualified organization resource name string.
172
199
  # @param organization [String]
173
200
  # @return [String]
@@ -197,6 +224,17 @@ module Google
197
224
  )
198
225
  end
199
226
 
227
+ # Returns a fully-qualified topic resource name string.
228
+ # @param project [String]
229
+ # @param topic [String]
230
+ # @return [String]
231
+ def self.topic_path project, topic
232
+ TOPIC_PATH_TEMPLATE.render(
233
+ :"project" => project,
234
+ :"topic" => topic
235
+ )
236
+ end
237
+
200
238
  # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
201
239
  # Provides the means for authenticating requests made by the client. This parameter can
202
240
  # be many types.
@@ -366,6 +404,30 @@ module Google
366
404
  {'parent' => request.parent}
367
405
  end
368
406
  )
407
+ @create_notification_config = Google::Gax.create_api_call(
408
+ @security_center_stub.method(:create_notification_config),
409
+ defaults["create_notification_config"],
410
+ exception_transformer: exception_transformer,
411
+ params_extractor: proc do |request|
412
+ {'parent' => request.parent}
413
+ end
414
+ )
415
+ @delete_notification_config = Google::Gax.create_api_call(
416
+ @security_center_stub.method(:delete_notification_config),
417
+ defaults["delete_notification_config"],
418
+ exception_transformer: exception_transformer,
419
+ params_extractor: proc do |request|
420
+ {'name' => request.name}
421
+ end
422
+ )
423
+ @get_notification_config = Google::Gax.create_api_call(
424
+ @security_center_stub.method(:get_notification_config),
425
+ defaults["get_notification_config"],
426
+ exception_transformer: exception_transformer,
427
+ params_extractor: proc do |request|
428
+ {'name' => request.name}
429
+ end
430
+ )
369
431
  @get_organization_settings = Google::Gax.create_api_call(
370
432
  @security_center_stub.method(:get_organization_settings),
371
433
  defaults["get_organization_settings"],
@@ -398,6 +460,14 @@ module Google
398
460
  {'parent' => request.parent}
399
461
  end
400
462
  )
463
+ @list_notification_configs = Google::Gax.create_api_call(
464
+ @security_center_stub.method(:list_notification_configs),
465
+ defaults["list_notification_configs"],
466
+ exception_transformer: exception_transformer,
467
+ params_extractor: proc do |request|
468
+ {'parent' => request.parent}
469
+ end
470
+ )
401
471
  @list_sources = Google::Gax.create_api_call(
402
472
  @security_center_stub.method(:list_sources),
403
473
  defaults["list_sources"],
@@ -438,6 +508,14 @@ module Google
438
508
  {'finding.name' => request.finding.name}
439
509
  end
440
510
  )
511
+ @update_notification_config = Google::Gax.create_api_call(
512
+ @security_center_stub.method(:update_notification_config),
513
+ defaults["update_notification_config"],
514
+ exception_transformer: exception_transformer,
515
+ params_extractor: proc do |request|
516
+ {'notification_config.name' => request.notification_config.name}
517
+ end
518
+ )
441
519
  @update_organization_settings = Google::Gax.create_api_call(
442
520
  @security_center_stub.method(:update_organization_settings),
443
521
  defaults["update_organization_settings"],
@@ -513,9 +591,9 @@ module Google
513
591
  # Required. Name of the organization to groupBy. Its format is
514
592
  # "organizations/[organization_id]".
515
593
  # @param group_by [String]
516
- # Required. Expression that defines what assets fields to use for grouping. The string
517
- # value should follow SQL syntax: comma separated list of fields. For
518
- # example:
594
+ # Required. Expression that defines what assets fields to use for grouping.
595
+ # The string value should follow SQL syntax: comma separated list of fields.
596
+ # For example:
519
597
  # "security_center_properties.resource_project,security_center_properties.project".
520
598
  #
521
599
  # The following fields are supported when compare_duration is not set:
@@ -698,9 +776,9 @@ module Google
698
776
  # all sources provide a source_id of `-`. For example:
699
777
  # organizations/{organization_id}/sources/-
700
778
  # @param group_by [String]
701
- # Required. Expression that defines what assets fields to use for grouping (including
702
- # `state_change`). The string value should follow SQL syntax: comma separated
703
- # list of fields. For example: "parent,resource_name".
779
+ # Required. Expression that defines what assets fields to use for grouping
780
+ # (including `state_change`). The string value should follow SQL syntax:
781
+ # comma separated list of fields. For example: "parent,resource_name".
704
782
  #
705
783
  # The following fields are supported:
706
784
  #
@@ -777,12 +855,18 @@ module Google
777
855
  #
778
856
  # Possible "state_change" values when compare_duration is specified:
779
857
  #
780
- # * "CHANGED": indicates that the finding was present at the start of
781
- # compare_duration, but changed its state at read_time.
782
- # * "UNCHANGED": indicates that the finding was present at the start of
783
- # compare_duration and did not change state at read_time.
784
- # * "ADDED": indicates that the finding was not present at the start
785
- # of compare_duration, but was present at read_time.
858
+ # * "CHANGED": indicates that the finding was present and matched the given
859
+ # filter at the start of compare_duration, but changed its
860
+ # state at read_time.
861
+ # * "UNCHANGED": indicates that the finding was present and matched the given
862
+ # filter at the start of compare_duration and did not change
863
+ # state at read_time.
864
+ # * "ADDED": indicates that the finding did not match the given filter or
865
+ # was not present at the start of compare_duration, but was
866
+ # present at read_time.
867
+ # * "REMOVED": indicates that the finding was present and matched the
868
+ # filter at the start of compare_duration, but did not match
869
+ # the filter at read_time.
786
870
  #
787
871
  # If compare_duration is not specified, then the only possible state_change
788
872
  # is "UNUSED", which will be the state_change set for all findings present
@@ -902,8 +986,8 @@ module Google
902
986
  # Required. Resource name of the new source's parent. Its format should be
903
987
  # "organizations/[organization_id]".
904
988
  # @param source [Google::Cloud::SecurityCenter::V1::Source | Hash]
905
- # Required. The Source being created, only the display_name and description will be
906
- # used. All other fields will be ignored.
989
+ # Required. The Source being created, only the display_name and description
990
+ # will be used. All other fields will be ignored.
907
991
  # A hash of the same form as `Google::Cloud::SecurityCenter::V1::Source`
908
992
  # can also be provided.
909
993
  # @param options [Google::Gax::CallOptions]
@@ -948,8 +1032,8 @@ module Google
948
1032
  # It must be alphanumeric and less than or equal to 32 characters and
949
1033
  # greater than 0 characters in length.
950
1034
  # @param finding [Google::Cloud::SecurityCenter::V1::Finding | Hash]
951
- # Required. The Finding being created. The name and security_marks will be ignored as
952
- # they are both output only fields on this resource.
1035
+ # Required. The Finding being created. The name and security_marks will be
1036
+ # ignored as they are both output only fields on this resource.
953
1037
  # A hash of the same form as `Google::Cloud::SecurityCenter::V1::Finding`
954
1038
  # can also be provided.
955
1039
  # @param options [Google::Gax::CallOptions]
@@ -988,11 +1072,125 @@ module Google
988
1072
  @create_finding.call(req, options, &block)
989
1073
  end
990
1074
 
1075
+ # Creates a notification config.
1076
+ #
1077
+ # @param parent [String]
1078
+ # Required. Resource name of the new notification config's parent. Its format
1079
+ # is "organizations/[organization_id]".
1080
+ # @param config_id [String]
1081
+ # Required.
1082
+ # Unique identifier provided by the client within the parent scope.
1083
+ # It must be between 1 and 128 characters, and contains alphanumeric
1084
+ # characters, underscores or hyphens only.
1085
+ # @param notification_config [Google::Cloud::SecurityCenter::V1::NotificationConfig | Hash]
1086
+ # Required. The notification config being created. The name and the service
1087
+ # account will be ignored as they are both output only fields on this
1088
+ # resource.
1089
+ # A hash of the same form as `Google::Cloud::SecurityCenter::V1::NotificationConfig`
1090
+ # can also be provided.
1091
+ # @param options [Google::Gax::CallOptions]
1092
+ # Overrides the default settings for this call, e.g, timeout,
1093
+ # retries, etc.
1094
+ # @yield [result, operation] Access the result along with the RPC operation
1095
+ # @yieldparam result [Google::Cloud::SecurityCenter::V1::NotificationConfig]
1096
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
1097
+ # @return [Google::Cloud::SecurityCenter::V1::NotificationConfig]
1098
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
1099
+ # @example
1100
+ # require "google/cloud/security_center"
1101
+ #
1102
+ # security_center_client = Google::Cloud::SecurityCenter.new(version: :v1)
1103
+ # formatted_parent = Google::Cloud::SecurityCenter::V1::SecurityCenterClient.organization_path("[ORGANIZATION]")
1104
+ #
1105
+ # # TODO: Initialize `config_id`:
1106
+ # config_id = ''
1107
+ #
1108
+ # # TODO: Initialize `notification_config`:
1109
+ # notification_config = {}
1110
+ # response = security_center_client.create_notification_config(formatted_parent, config_id, notification_config)
1111
+
1112
+ def create_notification_config \
1113
+ parent,
1114
+ config_id,
1115
+ notification_config,
1116
+ options: nil,
1117
+ &block
1118
+ req = {
1119
+ parent: parent,
1120
+ config_id: config_id,
1121
+ notification_config: notification_config
1122
+ }.delete_if { |_, v| v.nil? }
1123
+ req = Google::Gax::to_proto(req, Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest)
1124
+ @create_notification_config.call(req, options, &block)
1125
+ end
1126
+
1127
+ # Deletes a notification config.
1128
+ #
1129
+ # @param name [String]
1130
+ # Required. Name of the notification config to delete. Its format is
1131
+ # "organizations/[organization_id]/notificationConfigs/[config_id]".
1132
+ # @param options [Google::Gax::CallOptions]
1133
+ # Overrides the default settings for this call, e.g, timeout,
1134
+ # retries, etc.
1135
+ # @yield [result, operation] Access the result along with the RPC operation
1136
+ # @yieldparam result []
1137
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
1138
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
1139
+ # @example
1140
+ # require "google/cloud/security_center"
1141
+ #
1142
+ # security_center_client = Google::Cloud::SecurityCenter.new(version: :v1)
1143
+ # formatted_name = Google::Cloud::SecurityCenter::V1::SecurityCenterClient.notification_config_path("[ORGANIZATION]", "[NOTIFICATION_CONFIG]")
1144
+ # security_center_client.delete_notification_config(formatted_name)
1145
+
1146
+ def delete_notification_config \
1147
+ name,
1148
+ options: nil,
1149
+ &block
1150
+ req = {
1151
+ name: name
1152
+ }.delete_if { |_, v| v.nil? }
1153
+ req = Google::Gax::to_proto(req, Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest)
1154
+ @delete_notification_config.call(req, options, &block)
1155
+ nil
1156
+ end
1157
+
1158
+ # Gets a notification config.
1159
+ #
1160
+ # @param name [String]
1161
+ # Required. Name of the notification config to get. Its format is
1162
+ # "organizations/[organization_id]/notificationConfigs/[config_id]".
1163
+ # @param options [Google::Gax::CallOptions]
1164
+ # Overrides the default settings for this call, e.g, timeout,
1165
+ # retries, etc.
1166
+ # @yield [result, operation] Access the result along with the RPC operation
1167
+ # @yieldparam result [Google::Cloud::SecurityCenter::V1::NotificationConfig]
1168
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
1169
+ # @return [Google::Cloud::SecurityCenter::V1::NotificationConfig]
1170
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
1171
+ # @example
1172
+ # require "google/cloud/security_center"
1173
+ #
1174
+ # security_center_client = Google::Cloud::SecurityCenter.new(version: :v1)
1175
+ # formatted_name = Google::Cloud::SecurityCenter::V1::SecurityCenterClient.notification_config_path("[ORGANIZATION]", "[NOTIFICATION_CONFIG]")
1176
+ # response = security_center_client.get_notification_config(formatted_name)
1177
+
1178
+ def get_notification_config \
1179
+ name,
1180
+ options: nil,
1181
+ &block
1182
+ req = {
1183
+ name: name
1184
+ }.delete_if { |_, v| v.nil? }
1185
+ req = Google::Gax::to_proto(req, Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest)
1186
+ @get_notification_config.call(req, options, &block)
1187
+ end
1188
+
991
1189
  # Gets the settings for an organization.
992
1190
  #
993
1191
  # @param name [String]
994
- # Required. Name of the organization to get organization settings for. Its format is
995
- # "organizations/[organization_id]/organizationSettings".
1192
+ # Required. Name of the organization to get organization settings for. Its
1193
+ # format is "organizations/[organization_id]/organizationSettings".
996
1194
  # @param options [Google::Gax::CallOptions]
997
1195
  # Overrides the default settings for this call, e.g, timeout,
998
1196
  # retries, etc.
@@ -1169,9 +1367,8 @@ module Google
1169
1367
  # A hash of the same form as `Google::Protobuf::Duration`
1170
1368
  # can also be provided.
1171
1369
  # @param field_mask [Google::Protobuf::FieldMask | Hash]
1172
- # Optional. A field mask to specify the ListAssetsResult fields to be listed in the
1173
- # response.
1174
- # An empty field mask will list all fields.
1370
+ # Optional. A field mask to specify the ListAssetsResult fields to be listed
1371
+ # in the response. An empty field mask will list all fields.
1175
1372
  # A hash of the same form as `Google::Protobuf::FieldMask`
1176
1373
  # can also be provided.
1177
1374
  # @param page_size [Integer]
@@ -1329,12 +1526,18 @@ module Google
1329
1526
  #
1330
1527
  # Possible "state_change" values when compare_duration is specified:
1331
1528
  #
1332
- # * "CHANGED": indicates that the finding was present at the start of
1333
- # compare_duration, but changed its state at read_time.
1334
- # * "UNCHANGED": indicates that the finding was present at the start of
1335
- # compare_duration and did not change state at read_time.
1336
- # * "ADDED": indicates that the finding was not present at the start
1337
- # of compare_duration, but was present at read_time.
1529
+ # * "CHANGED": indicates that the finding was present and matched the given
1530
+ # filter at the start of compare_duration, but changed its
1531
+ # state at read_time.
1532
+ # * "UNCHANGED": indicates that the finding was present and matched the given
1533
+ # filter at the start of compare_duration and did not change
1534
+ # state at read_time.
1535
+ # * "ADDED": indicates that the finding did not match the given filter or
1536
+ # was not present at the start of compare_duration, but was
1537
+ # present at read_time.
1538
+ # * "REMOVED": indicates that the finding was present and matched the
1539
+ # filter at the start of compare_duration, but did not match
1540
+ # the filter at read_time.
1338
1541
  #
1339
1542
  # If compare_duration is not specified, then the only possible state_change
1340
1543
  # is "UNUSED", which will be the state_change set for all findings present at
@@ -1342,8 +1545,8 @@ module Google
1342
1545
  # A hash of the same form as `Google::Protobuf::Duration`
1343
1546
  # can also be provided.
1344
1547
  # @param field_mask [Google::Protobuf::FieldMask | Hash]
1345
- # Optional. A field mask to specify the Finding fields to be listed in the response.
1346
- # An empty field mask will list all fields.
1548
+ # Optional. A field mask to specify the Finding fields to be listed in the
1549
+ # response. An empty field mask will list all fields.
1347
1550
  # A hash of the same form as `Google::Protobuf::FieldMask`
1348
1551
  # can also be provided.
1349
1552
  # @param page_size [Integer]
@@ -1406,11 +1609,66 @@ module Google
1406
1609
  @list_findings.call(req, options, &block)
1407
1610
  end
1408
1611
 
1612
+ # Lists notification configs.
1613
+ #
1614
+ # @param parent [String]
1615
+ # Required. Name of the organization to list notification configs.
1616
+ # Its format is "organizations/[organization_id]".
1617
+ # @param page_size [Integer]
1618
+ # The maximum number of resources contained in the underlying API
1619
+ # response. If page streaming is performed per-resource, this
1620
+ # parameter does not affect the return value. If page streaming is
1621
+ # performed per-page, this determines the maximum number of
1622
+ # resources in a page.
1623
+ # @param options [Google::Gax::CallOptions]
1624
+ # Overrides the default settings for this call, e.g, timeout,
1625
+ # retries, etc.
1626
+ # @yield [result, operation] Access the result along with the RPC operation
1627
+ # @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::SecurityCenter::V1::NotificationConfig>]
1628
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
1629
+ # @return [Google::Gax::PagedEnumerable<Google::Cloud::SecurityCenter::V1::NotificationConfig>]
1630
+ # An enumerable of Google::Cloud::SecurityCenter::V1::NotificationConfig instances.
1631
+ # See Google::Gax::PagedEnumerable documentation for other
1632
+ # operations such as per-page iteration or access to the response
1633
+ # object.
1634
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
1635
+ # @example
1636
+ # require "google/cloud/security_center"
1637
+ #
1638
+ # security_center_client = Google::Cloud::SecurityCenter.new(version: :v1)
1639
+ # formatted_parent = Google::Cloud::SecurityCenter::V1::SecurityCenterClient.organization_path("[ORGANIZATION]")
1640
+ #
1641
+ # # Iterate over all results.
1642
+ # security_center_client.list_notification_configs(formatted_parent).each do |element|
1643
+ # # Process element.
1644
+ # end
1645
+ #
1646
+ # # Or iterate over results one page at a time.
1647
+ # security_center_client.list_notification_configs(formatted_parent).each_page do |page|
1648
+ # # Process each page at a time.
1649
+ # page.each do |element|
1650
+ # # Process element.
1651
+ # end
1652
+ # end
1653
+
1654
+ def list_notification_configs \
1655
+ parent,
1656
+ page_size: nil,
1657
+ options: nil,
1658
+ &block
1659
+ req = {
1660
+ parent: parent,
1661
+ page_size: page_size
1662
+ }.delete_if { |_, v| v.nil? }
1663
+ req = Google::Gax::to_proto(req, Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest)
1664
+ @list_notification_configs.call(req, options, &block)
1665
+ end
1666
+
1409
1667
  # Lists all sources belonging to an organization.
1410
1668
  #
1411
1669
  # @param parent [String]
1412
- # Required. Resource name of the parent of sources to list. Its format should be
1413
- # "organizations/[organization_id]".
1670
+ # Required. Resource name of the parent of sources to list. Its format should
1671
+ # be "organizations/[organization_id]".
1414
1672
  # @param page_size [Integer]
1415
1673
  # The maximum number of resources contained in the underlying API
1416
1674
  # response. If page streaming is performed per-resource, this
@@ -1469,8 +1727,8 @@ module Google
1469
1727
  # error.
1470
1728
  #
1471
1729
  # @param parent [String]
1472
- # Required. Name of the organization to run asset discovery for. Its format is
1473
- # "organizations/[organization_id]".
1730
+ # Required. Name of the organization to run asset discovery for. Its format
1731
+ # is "organizations/[organization_id]".
1474
1732
  # @param options [Google::Gax::CallOptions]
1475
1733
  # Overrides the default settings for this call, e.g, timeout,
1476
1734
  # retries, etc.
@@ -1625,8 +1883,8 @@ module Google
1625
1883
  # finding creation to succeed.
1626
1884
  #
1627
1885
  # @param finding [Google::Cloud::SecurityCenter::V1::Finding | Hash]
1628
- # Required. The finding resource to update or create if it does not already exist.
1629
- # parent, security_marks, and update_time will be ignored.
1886
+ # Required. The finding resource to update or create if it does not already
1887
+ # exist. parent, security_marks, and update_time will be ignored.
1630
1888
  #
1631
1889
  # In the case of creation, the finding id portion of the name must be
1632
1890
  # alphanumeric and less than or equal to 32 characters and greater than 0
@@ -1673,6 +1931,48 @@ module Google
1673
1931
  @update_finding.call(req, options, &block)
1674
1932
  end
1675
1933
 
1934
+ # Updates a notification config.
1935
+ #
1936
+ # @param notification_config [Google::Cloud::SecurityCenter::V1::NotificationConfig | Hash]
1937
+ # Required. The notification config to update.
1938
+ # A hash of the same form as `Google::Cloud::SecurityCenter::V1::NotificationConfig`
1939
+ # can also be provided.
1940
+ # @param update_mask [Google::Protobuf::FieldMask | Hash]
1941
+ # The FieldMask to use when updating the notification config.
1942
+ #
1943
+ # If empty all mutable fields will be updated.
1944
+ # A hash of the same form as `Google::Protobuf::FieldMask`
1945
+ # can also be provided.
1946
+ # @param options [Google::Gax::CallOptions]
1947
+ # Overrides the default settings for this call, e.g, timeout,
1948
+ # retries, etc.
1949
+ # @yield [result, operation] Access the result along with the RPC operation
1950
+ # @yieldparam result [Google::Cloud::SecurityCenter::V1::NotificationConfig]
1951
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
1952
+ # @return [Google::Cloud::SecurityCenter::V1::NotificationConfig]
1953
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
1954
+ # @example
1955
+ # require "google/cloud/security_center"
1956
+ #
1957
+ # security_center_client = Google::Cloud::SecurityCenter.new(version: :v1)
1958
+ #
1959
+ # # TODO: Initialize `notification_config`:
1960
+ # notification_config = {}
1961
+ # response = security_center_client.update_notification_config(notification_config)
1962
+
1963
+ def update_notification_config \
1964
+ notification_config,
1965
+ update_mask: nil,
1966
+ options: nil,
1967
+ &block
1968
+ req = {
1969
+ notification_config: notification_config,
1970
+ update_mask: update_mask
1971
+ }.delete_if { |_, v| v.nil? }
1972
+ req = Google::Gax::to_proto(req, Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest)
1973
+ @update_notification_config.call(req, options, &block)
1974
+ end
1975
+
1676
1976
  # Updates an organization's settings.
1677
1977
  #
1678
1978
  # @param organization_settings [Google::Cloud::SecurityCenter::V1::OrganizationSettings | Hash]