google-cloud-security_center-v1p1beta1 0.11.2 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,6 +32,9 @@ module Google
32
32
  # V1p1Beta1 APIs for Security Center service.
33
33
  #
34
34
  class Client
35
+ # @private
36
+ DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$"
37
+
35
38
  include Paths
36
39
 
37
40
  # @private
@@ -171,6 +174,15 @@ module Google
171
174
  @config
172
175
  end
173
176
 
177
+ ##
178
+ # The effective universe domain
179
+ #
180
+ # @return [String]
181
+ #
182
+ def universe_domain
183
+ @security_center_stub.universe_domain
184
+ end
185
+
174
186
  ##
175
187
  # Create a new SecurityCenter REST client object.
176
188
  #
@@ -198,8 +210,9 @@ module Google
198
210
  credentials = @config.credentials
199
211
  # Use self-signed JWT if the endpoint is unchanged from default,
200
212
  # but only if the default endpoint does not have a region prefix.
201
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
202
- !@config.endpoint.split(".").first.include?("-")
213
+ enable_self_signed_jwt = @config.endpoint.nil? ||
214
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
215
+ !@config.endpoint.split(".").first.include?("-"))
203
216
  credentials ||= Credentials.default scope: @config.scope,
204
217
  enable_self_signed_jwt: enable_self_signed_jwt
205
218
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -213,9 +226,15 @@ module Google
213
226
  config.credentials = credentials
214
227
  config.quota_project = @quota_project_id
215
228
  config.endpoint = @config.endpoint
229
+ config.universe_domain = @config.universe_domain
216
230
  end
217
231
 
218
- @security_center_stub = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
232
+ @security_center_stub = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.new(
233
+ endpoint: @config.endpoint,
234
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
235
+ universe_domain: @config.universe_domain,
236
+ credentials: credentials
237
+ )
219
238
  end
220
239
 
221
240
  ##
@@ -258,6 +277,22 @@ module Google
258
277
  # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source]
259
278
  #
260
279
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
280
+ #
281
+ # @example Basic example
282
+ # require "google/cloud/security_center/v1p1beta1"
283
+ #
284
+ # # Create a client object. The client can be reused for multiple calls.
285
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
286
+ #
287
+ # # Create a request. To set request fields, pass in keyword arguments.
288
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new
289
+ #
290
+ # # Call the create_source method.
291
+ # result = client.create_source request
292
+ #
293
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source.
294
+ # p result
295
+ #
261
296
  def create_source request, options = nil
262
297
  raise ::ArgumentError, "request must be provided" if request.nil?
263
298
 
@@ -327,6 +362,22 @@ module Google
327
362
  # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding]
328
363
  #
329
364
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
365
+ #
366
+ # @example Basic example
367
+ # require "google/cloud/security_center/v1p1beta1"
368
+ #
369
+ # # Create a client object. The client can be reused for multiple calls.
370
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
371
+ #
372
+ # # Create a request. To set request fields, pass in keyword arguments.
373
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest.new
374
+ #
375
+ # # Call the create_finding method.
376
+ # result = client.create_finding request
377
+ #
378
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding.
379
+ # p result
380
+ #
330
381
  def create_finding request, options = nil
331
382
  raise ::ArgumentError, "request must be provided" if request.nil?
332
383
 
@@ -397,6 +448,22 @@ module Google
397
448
  # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig]
398
449
  #
399
450
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
451
+ #
452
+ # @example Basic example
453
+ # require "google/cloud/security_center/v1p1beta1"
454
+ #
455
+ # # Create a client object. The client can be reused for multiple calls.
456
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
457
+ #
458
+ # # Create a request. To set request fields, pass in keyword arguments.
459
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest.new
460
+ #
461
+ # # Call the create_notification_config method.
462
+ # result = client.create_notification_config request
463
+ #
464
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.
465
+ # p result
466
+ #
400
467
  def create_notification_config request, options = nil
401
468
  raise ::ArgumentError, "request must be provided" if request.nil?
402
469
 
@@ -460,6 +527,22 @@ module Google
460
527
  # @return [::Google::Protobuf::Empty]
461
528
  #
462
529
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
530
+ #
531
+ # @example Basic example
532
+ # require "google/cloud/security_center/v1p1beta1"
533
+ #
534
+ # # Create a client object. The client can be reused for multiple calls.
535
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
536
+ #
537
+ # # Create a request. To set request fields, pass in keyword arguments.
538
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest.new
539
+ #
540
+ # # Call the delete_notification_config method.
541
+ # result = client.delete_notification_config request
542
+ #
543
+ # # The returned object is of type Google::Protobuf::Empty.
544
+ # p result
545
+ #
463
546
  def delete_notification_config request, options = nil
464
547
  raise ::ArgumentError, "request must be provided" if request.nil?
465
548
 
@@ -526,6 +609,22 @@ module Google
526
609
  # @return [::Google::Iam::V1::Policy]
527
610
  #
528
611
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
612
+ #
613
+ # @example Basic example
614
+ # require "google/cloud/security_center/v1p1beta1"
615
+ #
616
+ # # Create a client object. The client can be reused for multiple calls.
617
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
618
+ #
619
+ # # Create a request. To set request fields, pass in keyword arguments.
620
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
621
+ #
622
+ # # Call the get_iam_policy method.
623
+ # result = client.get_iam_policy request
624
+ #
625
+ # # The returned object is of type Google::Iam::V1::Policy.
626
+ # p result
627
+ #
529
628
  def get_iam_policy request, options = nil
530
629
  raise ::ArgumentError, "request must be provided" if request.nil?
531
630
 
@@ -589,6 +688,22 @@ module Google
589
688
  # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig]
590
689
  #
591
690
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
691
+ #
692
+ # @example Basic example
693
+ # require "google/cloud/security_center/v1p1beta1"
694
+ #
695
+ # # Create a client object. The client can be reused for multiple calls.
696
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
697
+ #
698
+ # # Create a request. To set request fields, pass in keyword arguments.
699
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest.new
700
+ #
701
+ # # Call the get_notification_config method.
702
+ # result = client.get_notification_config request
703
+ #
704
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.
705
+ # p result
706
+ #
592
707
  def get_notification_config request, options = nil
593
708
  raise ::ArgumentError, "request must be provided" if request.nil?
594
709
 
@@ -652,6 +767,22 @@ module Google
652
767
  # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings]
653
768
  #
654
769
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
770
+ #
771
+ # @example Basic example
772
+ # require "google/cloud/security_center/v1p1beta1"
773
+ #
774
+ # # Create a client object. The client can be reused for multiple calls.
775
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
776
+ #
777
+ # # Create a request. To set request fields, pass in keyword arguments.
778
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest.new
779
+ #
780
+ # # Call the get_organization_settings method.
781
+ # result = client.get_organization_settings request
782
+ #
783
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings.
784
+ # p result
785
+ #
655
786
  def get_organization_settings request, options = nil
656
787
  raise ::ArgumentError, "request must be provided" if request.nil?
657
788
 
@@ -715,6 +846,22 @@ module Google
715
846
  # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source]
716
847
  #
717
848
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
849
+ #
850
+ # @example Basic example
851
+ # require "google/cloud/security_center/v1p1beta1"
852
+ #
853
+ # # Create a client object. The client can be reused for multiple calls.
854
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
855
+ #
856
+ # # Create a request. To set request fields, pass in keyword arguments.
857
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest.new
858
+ #
859
+ # # Call the get_source method.
860
+ # result = client.get_source request
861
+ #
862
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source.
863
+ # p result
864
+ #
718
865
  def get_source request, options = nil
719
866
  raise ::ArgumentError, "request must be provided" if request.nil?
720
867
 
@@ -902,6 +1049,26 @@ module Google
902
1049
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>]
903
1050
  #
904
1051
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1052
+ #
1053
+ # @example Basic example
1054
+ # require "google/cloud/security_center/v1p1beta1"
1055
+ #
1056
+ # # Create a client object. The client can be reused for multiple calls.
1057
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
1058
+ #
1059
+ # # Create a request. To set request fields, pass in keyword arguments.
1060
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest.new
1061
+ #
1062
+ # # Call the group_assets method.
1063
+ # result = client.group_assets request
1064
+ #
1065
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1066
+ # # over elements, and API calls will be issued to fetch pages as needed.
1067
+ # result.each do |item|
1068
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult.
1069
+ # p item
1070
+ # end
1071
+ #
905
1072
  def group_assets request, options = nil
906
1073
  raise ::ArgumentError, "request must be provided" if request.nil?
907
1074
 
@@ -1089,6 +1256,26 @@ module Google
1089
1256
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>]
1090
1257
  #
1091
1258
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1259
+ #
1260
+ # @example Basic example
1261
+ # require "google/cloud/security_center/v1p1beta1"
1262
+ #
1263
+ # # Create a client object. The client can be reused for multiple calls.
1264
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
1265
+ #
1266
+ # # Create a request. To set request fields, pass in keyword arguments.
1267
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest.new
1268
+ #
1269
+ # # Call the group_findings method.
1270
+ # result = client.group_findings request
1271
+ #
1272
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1273
+ # # over elements, and API calls will be issued to fetch pages as needed.
1274
+ # result.each do |item|
1275
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult.
1276
+ # p item
1277
+ # end
1278
+ #
1092
1279
  def group_findings request, options = nil
1093
1280
  raise ::ArgumentError, "request must be provided" if request.nil?
1094
1281
 
@@ -1280,6 +1467,26 @@ module Google
1280
1467
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult>]
1281
1468
  #
1282
1469
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1470
+ #
1471
+ # @example Basic example
1472
+ # require "google/cloud/security_center/v1p1beta1"
1473
+ #
1474
+ # # Create a client object. The client can be reused for multiple calls.
1475
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
1476
+ #
1477
+ # # Create a request. To set request fields, pass in keyword arguments.
1478
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest.new
1479
+ #
1480
+ # # Call the list_assets method.
1481
+ # result = client.list_assets request
1482
+ #
1483
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1484
+ # # over elements, and API calls will be issued to fetch pages as needed.
1485
+ # result.each do |item|
1486
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult.
1487
+ # p item
1488
+ # end
1489
+ #
1283
1490
  def list_assets request, options = nil
1284
1491
  raise ::ArgumentError, "request must be provided" if request.nil?
1285
1492
 
@@ -1468,6 +1675,26 @@ module Google
1468
1675
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult>]
1469
1676
  #
1470
1677
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1678
+ #
1679
+ # @example Basic example
1680
+ # require "google/cloud/security_center/v1p1beta1"
1681
+ #
1682
+ # # Create a client object. The client can be reused for multiple calls.
1683
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
1684
+ #
1685
+ # # Create a request. To set request fields, pass in keyword arguments.
1686
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest.new
1687
+ #
1688
+ # # Call the list_findings method.
1689
+ # result = client.list_findings request
1690
+ #
1691
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1692
+ # # over elements, and API calls will be issued to fetch pages as needed.
1693
+ # result.each do |item|
1694
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult.
1695
+ # p item
1696
+ # end
1697
+ #
1471
1698
  def list_findings request, options = nil
1472
1699
  raise ::ArgumentError, "request must be provided" if request.nil?
1473
1700
 
@@ -1539,6 +1766,26 @@ module Google
1539
1766
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig>]
1540
1767
  #
1541
1768
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1769
+ #
1770
+ # @example Basic example
1771
+ # require "google/cloud/security_center/v1p1beta1"
1772
+ #
1773
+ # # Create a client object. The client can be reused for multiple calls.
1774
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
1775
+ #
1776
+ # # Create a request. To set request fields, pass in keyword arguments.
1777
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest.new
1778
+ #
1779
+ # # Call the list_notification_configs method.
1780
+ # result = client.list_notification_configs request
1781
+ #
1782
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1783
+ # # over elements, and API calls will be issued to fetch pages as needed.
1784
+ # result.each do |item|
1785
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.
1786
+ # p item
1787
+ # end
1788
+ #
1542
1789
  def list_notification_configs request, options = nil
1543
1790
  raise ::ArgumentError, "request must be provided" if request.nil?
1544
1791
 
@@ -1611,6 +1858,26 @@ module Google
1611
1858
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::Source>]
1612
1859
  #
1613
1860
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1861
+ #
1862
+ # @example Basic example
1863
+ # require "google/cloud/security_center/v1p1beta1"
1864
+ #
1865
+ # # Create a client object. The client can be reused for multiple calls.
1866
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
1867
+ #
1868
+ # # Create a request. To set request fields, pass in keyword arguments.
1869
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest.new
1870
+ #
1871
+ # # Call the list_sources method.
1872
+ # result = client.list_sources request
1873
+ #
1874
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1875
+ # # over elements, and API calls will be issued to fetch pages as needed.
1876
+ # result.each do |item|
1877
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::Source.
1878
+ # p item
1879
+ # end
1880
+ #
1614
1881
  def list_sources request, options = nil
1615
1882
  raise ::ArgumentError, "request must be provided" if request.nil?
1616
1883
 
@@ -1680,6 +1947,29 @@ module Google
1680
1947
  # @return [::Gapic::Operation]
1681
1948
  #
1682
1949
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1950
+ #
1951
+ # @example Basic example
1952
+ # require "google/cloud/security_center/v1p1beta1"
1953
+ #
1954
+ # # Create a client object. The client can be reused for multiple calls.
1955
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
1956
+ #
1957
+ # # Create a request. To set request fields, pass in keyword arguments.
1958
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest.new
1959
+ #
1960
+ # # Call the run_asset_discovery method.
1961
+ # result = client.run_asset_discovery request
1962
+ #
1963
+ # # The returned object is of type Gapic::Operation. You can use it to
1964
+ # # check the status of an operation, cancel it, or wait for results.
1965
+ # # Here is how to wait for a response.
1966
+ # result.wait_until_done! timeout: 60
1967
+ # if result.response?
1968
+ # p result.response
1969
+ # else
1970
+ # puts "No response received."
1971
+ # end
1972
+ #
1683
1973
  def run_asset_discovery request, options = nil
1684
1974
  raise ::ArgumentError, "request must be provided" if request.nil?
1685
1975
 
@@ -1750,6 +2040,22 @@ module Google
1750
2040
  # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding]
1751
2041
  #
1752
2042
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2043
+ #
2044
+ # @example Basic example
2045
+ # require "google/cloud/security_center/v1p1beta1"
2046
+ #
2047
+ # # Create a client object. The client can be reused for multiple calls.
2048
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
2049
+ #
2050
+ # # Create a request. To set request fields, pass in keyword arguments.
2051
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest.new
2052
+ #
2053
+ # # Call the set_finding_state method.
2054
+ # result = client.set_finding_state request
2055
+ #
2056
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding.
2057
+ # p result
2058
+ #
1753
2059
  def set_finding_state request, options = nil
1754
2060
  raise ::ArgumentError, "request must be provided" if request.nil?
1755
2061
 
@@ -1824,6 +2130,22 @@ module Google
1824
2130
  # @return [::Google::Iam::V1::Policy]
1825
2131
  #
1826
2132
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2133
+ #
2134
+ # @example Basic example
2135
+ # require "google/cloud/security_center/v1p1beta1"
2136
+ #
2137
+ # # Create a client object. The client can be reused for multiple calls.
2138
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
2139
+ #
2140
+ # # Create a request. To set request fields, pass in keyword arguments.
2141
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
2142
+ #
2143
+ # # Call the set_iam_policy method.
2144
+ # result = client.set_iam_policy request
2145
+ #
2146
+ # # The returned object is of type Google::Iam::V1::Policy.
2147
+ # p result
2148
+ #
1827
2149
  def set_iam_policy request, options = nil
1828
2150
  raise ::ArgumentError, "request must be provided" if request.nil?
1829
2151
 
@@ -1892,6 +2214,22 @@ module Google
1892
2214
  # @return [::Google::Iam::V1::TestIamPermissionsResponse]
1893
2215
  #
1894
2216
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2217
+ #
2218
+ # @example Basic example
2219
+ # require "google/cloud/security_center/v1p1beta1"
2220
+ #
2221
+ # # Create a client object. The client can be reused for multiple calls.
2222
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
2223
+ #
2224
+ # # Create a request. To set request fields, pass in keyword arguments.
2225
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
2226
+ #
2227
+ # # Call the test_iam_permissions method.
2228
+ # result = client.test_iam_permissions request
2229
+ #
2230
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
2231
+ # p result
2232
+ #
1895
2233
  def test_iam_permissions request, options = nil
1896
2234
  raise ::ArgumentError, "request must be provided" if request.nil?
1897
2235
 
@@ -1968,6 +2306,22 @@ module Google
1968
2306
  # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding]
1969
2307
  #
1970
2308
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2309
+ #
2310
+ # @example Basic example
2311
+ # require "google/cloud/security_center/v1p1beta1"
2312
+ #
2313
+ # # Create a client object. The client can be reused for multiple calls.
2314
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
2315
+ #
2316
+ # # Create a request. To set request fields, pass in keyword arguments.
2317
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest.new
2318
+ #
2319
+ # # Call the update_finding method.
2320
+ # result = client.update_finding request
2321
+ #
2322
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding.
2323
+ # p result
2324
+ #
1971
2325
  def update_finding request, options = nil
1972
2326
  raise ::ArgumentError, "request must be provided" if request.nil?
1973
2327
 
@@ -2035,6 +2389,22 @@ module Google
2035
2389
  # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig]
2036
2390
  #
2037
2391
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2392
+ #
2393
+ # @example Basic example
2394
+ # require "google/cloud/security_center/v1p1beta1"
2395
+ #
2396
+ # # Create a client object. The client can be reused for multiple calls.
2397
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
2398
+ #
2399
+ # # Create a request. To set request fields, pass in keyword arguments.
2400
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest.new
2401
+ #
2402
+ # # Call the update_notification_config method.
2403
+ # result = client.update_notification_config request
2404
+ #
2405
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.
2406
+ # p result
2407
+ #
2038
2408
  def update_notification_config request, options = nil
2039
2409
  raise ::ArgumentError, "request must be provided" if request.nil?
2040
2410
 
@@ -2101,6 +2471,22 @@ module Google
2101
2471
  # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings]
2102
2472
  #
2103
2473
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2474
+ #
2475
+ # @example Basic example
2476
+ # require "google/cloud/security_center/v1p1beta1"
2477
+ #
2478
+ # # Create a client object. The client can be reused for multiple calls.
2479
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
2480
+ #
2481
+ # # Create a request. To set request fields, pass in keyword arguments.
2482
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest.new
2483
+ #
2484
+ # # Call the update_organization_settings method.
2485
+ # result = client.update_organization_settings request
2486
+ #
2487
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings.
2488
+ # p result
2489
+ #
2104
2490
  def update_organization_settings request, options = nil
2105
2491
  raise ::ArgumentError, "request must be provided" if request.nil?
2106
2492
 
@@ -2167,6 +2553,22 @@ module Google
2167
2553
  # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source]
2168
2554
  #
2169
2555
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2556
+ #
2557
+ # @example Basic example
2558
+ # require "google/cloud/security_center/v1p1beta1"
2559
+ #
2560
+ # # Create a client object. The client can be reused for multiple calls.
2561
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
2562
+ #
2563
+ # # Create a request. To set request fields, pass in keyword arguments.
2564
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest.new
2565
+ #
2566
+ # # Call the update_source method.
2567
+ # result = client.update_source request
2568
+ #
2569
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source.
2570
+ # p result
2571
+ #
2170
2572
  def update_source request, options = nil
2171
2573
  raise ::ArgumentError, "request must be provided" if request.nil?
2172
2574
 
@@ -2239,6 +2641,22 @@ module Google
2239
2641
  # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks]
2240
2642
  #
2241
2643
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2644
+ #
2645
+ # @example Basic example
2646
+ # require "google/cloud/security_center/v1p1beta1"
2647
+ #
2648
+ # # Create a client object. The client can be reused for multiple calls.
2649
+ # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new
2650
+ #
2651
+ # # Create a request. To set request fields, pass in keyword arguments.
2652
+ # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest.new
2653
+ #
2654
+ # # Call the update_security_marks method.
2655
+ # result = client.update_security_marks request
2656
+ #
2657
+ # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks.
2658
+ # p result
2659
+ #
2242
2660
  def update_security_marks request, options = nil
2243
2661
  raise ::ArgumentError, "request must be provided" if request.nil?
2244
2662
 
@@ -2304,9 +2722,9 @@ module Google
2304
2722
  # end
2305
2723
  #
2306
2724
  # @!attribute [rw] endpoint
2307
- # The hostname or hostname:port of the service endpoint.
2308
- # Defaults to `"securitycenter.googleapis.com"`.
2309
- # @return [::String]
2725
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2726
+ # nil, indicating to use the default endpoint in the current universe domain.
2727
+ # @return [::String,nil]
2310
2728
  # @!attribute [rw] credentials
2311
2729
  # Credentials to send with calls. You may provide any of the following types:
2312
2730
  # * (`String`) The path to a service account key file in JSON format
@@ -2343,13 +2761,20 @@ module Google
2343
2761
  # @!attribute [rw] quota_project
2344
2762
  # A separate project against which to charge quota.
2345
2763
  # @return [::String]
2764
+ # @!attribute [rw] universe_domain
2765
+ # The universe domain within which to make requests. This determines the
2766
+ # default endpoint URL. The default value of nil uses the environment
2767
+ # universe (usually the default "googleapis.com" universe).
2768
+ # @return [::String,nil]
2346
2769
  #
2347
2770
  class Configuration
2348
2771
  extend ::Gapic::Config
2349
2772
 
2773
+ # @private
2774
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2350
2775
  DEFAULT_ENDPOINT = "securitycenter.googleapis.com"
2351
2776
 
2352
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2777
+ config_attr :endpoint, nil, ::String, nil
2353
2778
  config_attr :credentials, nil do |value|
2354
2779
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2355
2780
  allowed.any? { |klass| klass === value }
@@ -2361,6 +2786,7 @@ module Google
2361
2786
  config_attr :metadata, nil, ::Hash, nil
2362
2787
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2363
2788
  config_attr :quota_project, nil, ::String, nil
2789
+ config_attr :universe_domain, nil, ::String, nil
2364
2790
 
2365
2791
  # @private
2366
2792
  def initialize parent_config = nil