google-identity-access_context_manager-v1 0.5.2 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,6 +42,9 @@ module Google
42
42
  # AccessPolicies
43
43
  #
44
44
  class Client
45
+ # @private
46
+ DEFAULT_ENDPOINT_TEMPLATE = "accesscontextmanager.$UNIVERSE_DOMAIN$"
47
+
45
48
  include Paths
46
49
 
47
50
  # @private
@@ -104,6 +107,15 @@ module Google
104
107
  @config
105
108
  end
106
109
 
110
+ ##
111
+ # The effective universe domain
112
+ #
113
+ # @return [String]
114
+ #
115
+ def universe_domain
116
+ @access_context_manager_stub.universe_domain
117
+ end
118
+
107
119
  ##
108
120
  # Create a new AccessContextManager REST client object.
109
121
  #
@@ -131,8 +143,9 @@ module Google
131
143
  credentials = @config.credentials
132
144
  # Use self-signed JWT if the endpoint is unchanged from default,
133
145
  # but only if the default endpoint does not have a region prefix.
134
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
135
- !@config.endpoint.split(".").first.include?("-")
146
+ enable_self_signed_jwt = @config.endpoint.nil? ||
147
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
148
+ !@config.endpoint.split(".").first.include?("-"))
136
149
  credentials ||= Credentials.default scope: @config.scope,
137
150
  enable_self_signed_jwt: enable_self_signed_jwt
138
151
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -146,9 +159,15 @@ module Google
146
159
  config.credentials = credentials
147
160
  config.quota_project = @quota_project_id
148
161
  config.endpoint = @config.endpoint
162
+ config.universe_domain = @config.universe_domain
149
163
  end
150
164
 
151
- @access_context_manager_stub = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
165
+ @access_context_manager_stub = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::ServiceStub.new(
166
+ endpoint: @config.endpoint,
167
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
168
+ universe_domain: @config.universe_domain,
169
+ credentials: credentials
170
+ )
152
171
  end
153
172
 
154
173
  ##
@@ -198,6 +217,26 @@ module Google
198
217
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>]
199
218
  #
200
219
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
220
+ #
221
+ # @example Basic example
222
+ # require "google/identity/access_context_manager/v1"
223
+ #
224
+ # # Create a client object. The client can be reused for multiple calls.
225
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
226
+ #
227
+ # # Create a request. To set request fields, pass in keyword arguments.
228
+ # request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new
229
+ #
230
+ # # Call the list_access_policies method.
231
+ # result = client.list_access_policies request
232
+ #
233
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
234
+ # # over elements, and API calls will be issued to fetch pages as needed.
235
+ # result.each do |item|
236
+ # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy.
237
+ # p item
238
+ # end
239
+ #
201
240
  def list_access_policies request, options = nil
202
241
  raise ::ArgumentError, "request must be provided" if request.nil?
203
242
 
@@ -264,6 +303,22 @@ module Google
264
303
  # @return [::Google::Identity::AccessContextManager::V1::AccessPolicy]
265
304
  #
266
305
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
306
+ #
307
+ # @example Basic example
308
+ # require "google/identity/access_context_manager/v1"
309
+ #
310
+ # # Create a client object. The client can be reused for multiple calls.
311
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
312
+ #
313
+ # # Create a request. To set request fields, pass in keyword arguments.
314
+ # request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new
315
+ #
316
+ # # Call the get_access_policy method.
317
+ # result = client.get_access_policy request
318
+ #
319
+ # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy.
320
+ # p result
321
+ #
267
322
  def get_access_policy request, options = nil
268
323
  raise ::ArgumentError, "request must be provided" if request.nil?
269
324
 
@@ -361,6 +416,29 @@ module Google
361
416
  # @return [::Gapic::Operation]
362
417
  #
363
418
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
419
+ #
420
+ # @example Basic example
421
+ # require "google/identity/access_context_manager/v1"
422
+ #
423
+ # # Create a client object. The client can be reused for multiple calls.
424
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
425
+ #
426
+ # # Create a request. To set request fields, pass in keyword arguments.
427
+ # request = Google::Identity::AccessContextManager::V1::AccessPolicy.new
428
+ #
429
+ # # Call the create_access_policy method.
430
+ # result = client.create_access_policy request
431
+ #
432
+ # # The returned object is of type Gapic::Operation. You can use it to
433
+ # # check the status of an operation, cancel it, or wait for results.
434
+ # # Here is how to wait for a response.
435
+ # result.wait_until_done! timeout: 60
436
+ # if result.response?
437
+ # p result.response
438
+ # else
439
+ # puts "No response received."
440
+ # end
441
+ #
364
442
  def create_access_policy request, options = nil
365
443
  raise ::ArgumentError, "request must be provided" if request.nil?
366
444
 
@@ -431,6 +509,29 @@ module Google
431
509
  # @return [::Gapic::Operation]
432
510
  #
433
511
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
512
+ #
513
+ # @example Basic example
514
+ # require "google/identity/access_context_manager/v1"
515
+ #
516
+ # # Create a client object. The client can be reused for multiple calls.
517
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
518
+ #
519
+ # # Create a request. To set request fields, pass in keyword arguments.
520
+ # request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new
521
+ #
522
+ # # Call the update_access_policy method.
523
+ # result = client.update_access_policy request
524
+ #
525
+ # # The returned object is of type Gapic::Operation. You can use it to
526
+ # # check the status of an operation, cancel it, or wait for results.
527
+ # # Here is how to wait for a response.
528
+ # result.wait_until_done! timeout: 60
529
+ # if result.response?
530
+ # p result.response
531
+ # else
532
+ # puts "No response received."
533
+ # end
534
+ #
434
535
  def update_access_policy request, options = nil
435
536
  raise ::ArgumentError, "request must be provided" if request.nil?
436
537
 
@@ -500,6 +601,29 @@ module Google
500
601
  # @return [::Gapic::Operation]
501
602
  #
502
603
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
604
+ #
605
+ # @example Basic example
606
+ # require "google/identity/access_context_manager/v1"
607
+ #
608
+ # # Create a client object. The client can be reused for multiple calls.
609
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
610
+ #
611
+ # # Create a request. To set request fields, pass in keyword arguments.
612
+ # request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new
613
+ #
614
+ # # Call the delete_access_policy method.
615
+ # result = client.delete_access_policy request
616
+ #
617
+ # # The returned object is of type Gapic::Operation. You can use it to
618
+ # # check the status of an operation, cancel it, or wait for results.
619
+ # # Here is how to wait for a response.
620
+ # result.wait_until_done! timeout: 60
621
+ # if result.response?
622
+ # p result.response
623
+ # else
624
+ # puts "No response received."
625
+ # end
626
+ #
503
627
  def delete_access_policy request, options = nil
504
628
  raise ::ArgumentError, "request must be provided" if request.nil?
505
629
 
@@ -581,6 +705,26 @@ module Google
581
705
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>]
582
706
  #
583
707
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
708
+ #
709
+ # @example Basic example
710
+ # require "google/identity/access_context_manager/v1"
711
+ #
712
+ # # Create a client object. The client can be reused for multiple calls.
713
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
714
+ #
715
+ # # Create a request. To set request fields, pass in keyword arguments.
716
+ # request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new
717
+ #
718
+ # # Call the list_access_levels method.
719
+ # result = client.list_access_levels request
720
+ #
721
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
722
+ # # over elements, and API calls will be issued to fetch pages as needed.
723
+ # result.each do |item|
724
+ # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel.
725
+ # p item
726
+ # end
727
+ #
584
728
  def list_access_levels request, options = nil
585
729
  raise ::ArgumentError, "request must be provided" if request.nil?
586
730
 
@@ -659,6 +803,22 @@ module Google
659
803
  # @return [::Google::Identity::AccessContextManager::V1::AccessLevel]
660
804
  #
661
805
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
806
+ #
807
+ # @example Basic example
808
+ # require "google/identity/access_context_manager/v1"
809
+ #
810
+ # # Create a client object. The client can be reused for multiple calls.
811
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
812
+ #
813
+ # # Create a request. To set request fields, pass in keyword arguments.
814
+ # request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new
815
+ #
816
+ # # Call the get_access_level method.
817
+ # result = client.get_access_level request
818
+ #
819
+ # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel.
820
+ # p result
821
+ #
662
822
  def get_access_level request, options = nil
663
823
  raise ::ArgumentError, "request must be provided" if request.nil?
664
824
 
@@ -736,6 +896,29 @@ module Google
736
896
  # @return [::Gapic::Operation]
737
897
  #
738
898
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
899
+ #
900
+ # @example Basic example
901
+ # require "google/identity/access_context_manager/v1"
902
+ #
903
+ # # Create a client object. The client can be reused for multiple calls.
904
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
905
+ #
906
+ # # Create a request. To set request fields, pass in keyword arguments.
907
+ # request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new
908
+ #
909
+ # # Call the create_access_level method.
910
+ # result = client.create_access_level request
911
+ #
912
+ # # The returned object is of type Gapic::Operation. You can use it to
913
+ # # check the status of an operation, cancel it, or wait for results.
914
+ # # Here is how to wait for a response.
915
+ # result.wait_until_done! timeout: 60
916
+ # if result.response?
917
+ # p result.response
918
+ # else
919
+ # puts "No response received."
920
+ # end
921
+ #
739
922
  def create_access_level request, options = nil
740
923
  raise ::ArgumentError, "request must be provided" if request.nil?
741
924
 
@@ -812,6 +995,29 @@ module Google
812
995
  # @return [::Gapic::Operation]
813
996
  #
814
997
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
998
+ #
999
+ # @example Basic example
1000
+ # require "google/identity/access_context_manager/v1"
1001
+ #
1002
+ # # Create a client object. The client can be reused for multiple calls.
1003
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
1004
+ #
1005
+ # # Create a request. To set request fields, pass in keyword arguments.
1006
+ # request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new
1007
+ #
1008
+ # # Call the update_access_level method.
1009
+ # result = client.update_access_level request
1010
+ #
1011
+ # # The returned object is of type Gapic::Operation. You can use it to
1012
+ # # check the status of an operation, cancel it, or wait for results.
1013
+ # # Here is how to wait for a response.
1014
+ # result.wait_until_done! timeout: 60
1015
+ # if result.response?
1016
+ # p result.response
1017
+ # else
1018
+ # puts "No response received."
1019
+ # end
1020
+ #
815
1021
  def update_access_level request, options = nil
816
1022
  raise ::ArgumentError, "request must be provided" if request.nil?
817
1023
 
@@ -884,6 +1090,29 @@ module Google
884
1090
  # @return [::Gapic::Operation]
885
1091
  #
886
1092
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1093
+ #
1094
+ # @example Basic example
1095
+ # require "google/identity/access_context_manager/v1"
1096
+ #
1097
+ # # Create a client object. The client can be reused for multiple calls.
1098
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
1099
+ #
1100
+ # # Create a request. To set request fields, pass in keyword arguments.
1101
+ # request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new
1102
+ #
1103
+ # # Call the delete_access_level method.
1104
+ # result = client.delete_access_level request
1105
+ #
1106
+ # # The returned object is of type Gapic::Operation. You can use it to
1107
+ # # check the status of an operation, cancel it, or wait for results.
1108
+ # # Here is how to wait for a response.
1109
+ # result.wait_until_done! timeout: 60
1110
+ # if result.response?
1111
+ # p result.response
1112
+ # else
1113
+ # puts "No response received."
1114
+ # end
1115
+ #
887
1116
  def delete_access_level request, options = nil
888
1117
  raise ::ArgumentError, "request must be provided" if request.nil?
889
1118
 
@@ -982,6 +1211,29 @@ module Google
982
1211
  # @return [::Gapic::Operation]
983
1212
  #
984
1213
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1214
+ #
1215
+ # @example Basic example
1216
+ # require "google/identity/access_context_manager/v1"
1217
+ #
1218
+ # # Create a client object. The client can be reused for multiple calls.
1219
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
1220
+ #
1221
+ # # Create a request. To set request fields, pass in keyword arguments.
1222
+ # request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new
1223
+ #
1224
+ # # Call the replace_access_levels method.
1225
+ # result = client.replace_access_levels request
1226
+ #
1227
+ # # The returned object is of type Gapic::Operation. You can use it to
1228
+ # # check the status of an operation, cancel it, or wait for results.
1229
+ # # Here is how to wait for a response.
1230
+ # result.wait_until_done! timeout: 60
1231
+ # if result.response?
1232
+ # p result.response
1233
+ # else
1234
+ # puts "No response received."
1235
+ # end
1236
+ #
985
1237
  def replace_access_levels request, options = nil
986
1238
  raise ::ArgumentError, "request must be provided" if request.nil?
987
1239
 
@@ -1059,6 +1311,26 @@ module Google
1059
1311
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>]
1060
1312
  #
1061
1313
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1314
+ #
1315
+ # @example Basic example
1316
+ # require "google/identity/access_context_manager/v1"
1317
+ #
1318
+ # # Create a client object. The client can be reused for multiple calls.
1319
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
1320
+ #
1321
+ # # Create a request. To set request fields, pass in keyword arguments.
1322
+ # request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new
1323
+ #
1324
+ # # Call the list_service_perimeters method.
1325
+ # result = client.list_service_perimeters request
1326
+ #
1327
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1328
+ # # over elements, and API calls will be issued to fetch pages as needed.
1329
+ # result.each do |item|
1330
+ # # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter.
1331
+ # p item
1332
+ # end
1333
+ #
1062
1334
  def list_service_perimeters request, options = nil
1063
1335
  raise ::ArgumentError, "request must be provided" if request.nil?
1064
1336
 
@@ -1128,6 +1400,22 @@ module Google
1128
1400
  # @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter]
1129
1401
  #
1130
1402
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1403
+ #
1404
+ # @example Basic example
1405
+ # require "google/identity/access_context_manager/v1"
1406
+ #
1407
+ # # Create a client object. The client can be reused for multiple calls.
1408
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
1409
+ #
1410
+ # # Create a request. To set request fields, pass in keyword arguments.
1411
+ # request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new
1412
+ #
1413
+ # # Call the get_service_perimeter method.
1414
+ # result = client.get_service_perimeter request
1415
+ #
1416
+ # # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter.
1417
+ # p result
1418
+ #
1131
1419
  def get_service_perimeter request, options = nil
1132
1420
  raise ::ArgumentError, "request must be provided" if request.nil?
1133
1421
 
@@ -1206,6 +1494,29 @@ module Google
1206
1494
  # @return [::Gapic::Operation]
1207
1495
  #
1208
1496
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1497
+ #
1498
+ # @example Basic example
1499
+ # require "google/identity/access_context_manager/v1"
1500
+ #
1501
+ # # Create a client object. The client can be reused for multiple calls.
1502
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
1503
+ #
1504
+ # # Create a request. To set request fields, pass in keyword arguments.
1505
+ # request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new
1506
+ #
1507
+ # # Call the create_service_perimeter method.
1508
+ # result = client.create_service_perimeter request
1509
+ #
1510
+ # # The returned object is of type Gapic::Operation. You can use it to
1511
+ # # check the status of an operation, cancel it, or wait for results.
1512
+ # # Here is how to wait for a response.
1513
+ # result.wait_until_done! timeout: 60
1514
+ # if result.response?
1515
+ # p result.response
1516
+ # else
1517
+ # puts "No response received."
1518
+ # end
1519
+ #
1209
1520
  def create_service_perimeter request, options = nil
1210
1521
  raise ::ArgumentError, "request must be provided" if request.nil?
1211
1522
 
@@ -1279,6 +1590,29 @@ module Google
1279
1590
  # @return [::Gapic::Operation]
1280
1591
  #
1281
1592
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1593
+ #
1594
+ # @example Basic example
1595
+ # require "google/identity/access_context_manager/v1"
1596
+ #
1597
+ # # Create a client object. The client can be reused for multiple calls.
1598
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
1599
+ #
1600
+ # # Create a request. To set request fields, pass in keyword arguments.
1601
+ # request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new
1602
+ #
1603
+ # # Call the update_service_perimeter method.
1604
+ # result = client.update_service_perimeter request
1605
+ #
1606
+ # # The returned object is of type Gapic::Operation. You can use it to
1607
+ # # check the status of an operation, cancel it, or wait for results.
1608
+ # # Here is how to wait for a response.
1609
+ # result.wait_until_done! timeout: 60
1610
+ # if result.response?
1611
+ # p result.response
1612
+ # else
1613
+ # puts "No response received."
1614
+ # end
1615
+ #
1282
1616
  def update_service_perimeter request, options = nil
1283
1617
  raise ::ArgumentError, "request must be provided" if request.nil?
1284
1618
 
@@ -1351,6 +1685,29 @@ module Google
1351
1685
  # @return [::Gapic::Operation]
1352
1686
  #
1353
1687
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1688
+ #
1689
+ # @example Basic example
1690
+ # require "google/identity/access_context_manager/v1"
1691
+ #
1692
+ # # Create a client object. The client can be reused for multiple calls.
1693
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
1694
+ #
1695
+ # # Create a request. To set request fields, pass in keyword arguments.
1696
+ # request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new
1697
+ #
1698
+ # # Call the delete_service_perimeter method.
1699
+ # result = client.delete_service_perimeter request
1700
+ #
1701
+ # # The returned object is of type Gapic::Operation. You can use it to
1702
+ # # check the status of an operation, cancel it, or wait for results.
1703
+ # # Here is how to wait for a response.
1704
+ # result.wait_until_done! timeout: 60
1705
+ # if result.response?
1706
+ # p result.response
1707
+ # else
1708
+ # puts "No response received."
1709
+ # end
1710
+ #
1354
1711
  def delete_service_perimeter request, options = nil
1355
1712
  raise ::ArgumentError, "request must be provided" if request.nil?
1356
1713
 
@@ -1445,6 +1802,29 @@ module Google
1445
1802
  # @return [::Gapic::Operation]
1446
1803
  #
1447
1804
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1805
+ #
1806
+ # @example Basic example
1807
+ # require "google/identity/access_context_manager/v1"
1808
+ #
1809
+ # # Create a client object. The client can be reused for multiple calls.
1810
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
1811
+ #
1812
+ # # Create a request. To set request fields, pass in keyword arguments.
1813
+ # request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new
1814
+ #
1815
+ # # Call the replace_service_perimeters method.
1816
+ # result = client.replace_service_perimeters request
1817
+ #
1818
+ # # The returned object is of type Gapic::Operation. You can use it to
1819
+ # # check the status of an operation, cancel it, or wait for results.
1820
+ # # Here is how to wait for a response.
1821
+ # result.wait_until_done! timeout: 60
1822
+ # if result.response?
1823
+ # p result.response
1824
+ # else
1825
+ # puts "No response received."
1826
+ # end
1827
+ #
1448
1828
  def replace_service_perimeters request, options = nil
1449
1829
  raise ::ArgumentError, "request must be provided" if request.nil?
1450
1830
 
@@ -1536,6 +1916,29 @@ module Google
1536
1916
  # @return [::Gapic::Operation]
1537
1917
  #
1538
1918
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1919
+ #
1920
+ # @example Basic example
1921
+ # require "google/identity/access_context_manager/v1"
1922
+ #
1923
+ # # Create a client object. The client can be reused for multiple calls.
1924
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
1925
+ #
1926
+ # # Create a request. To set request fields, pass in keyword arguments.
1927
+ # request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new
1928
+ #
1929
+ # # Call the commit_service_perimeters method.
1930
+ # result = client.commit_service_perimeters request
1931
+ #
1932
+ # # The returned object is of type Gapic::Operation. You can use it to
1933
+ # # check the status of an operation, cancel it, or wait for results.
1934
+ # # Here is how to wait for a response.
1935
+ # result.wait_until_done! timeout: 60
1936
+ # if result.response?
1937
+ # p result.response
1938
+ # else
1939
+ # puts "No response received."
1940
+ # end
1941
+ #
1539
1942
  def commit_service_perimeters request, options = nil
1540
1943
  raise ::ArgumentError, "request must be provided" if request.nil?
1541
1944
 
@@ -1609,6 +2012,26 @@ module Google
1609
2012
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>]
1610
2013
  #
1611
2014
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2015
+ #
2016
+ # @example Basic example
2017
+ # require "google/identity/access_context_manager/v1"
2018
+ #
2019
+ # # Create a client object. The client can be reused for multiple calls.
2020
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
2021
+ #
2022
+ # # Create a request. To set request fields, pass in keyword arguments.
2023
+ # request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new
2024
+ #
2025
+ # # Call the list_gcp_user_access_bindings method.
2026
+ # result = client.list_gcp_user_access_bindings request
2027
+ #
2028
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2029
+ # # over elements, and API calls will be issued to fetch pages as needed.
2030
+ # result.each do |item|
2031
+ # # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.
2032
+ # p item
2033
+ # end
2034
+ #
1612
2035
  def list_gcp_user_access_bindings request, options = nil
1613
2036
  raise ::ArgumentError, "request must be provided" if request.nil?
1614
2037
 
@@ -1674,6 +2097,22 @@ module Google
1674
2097
  # @return [::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding]
1675
2098
  #
1676
2099
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2100
+ #
2101
+ # @example Basic example
2102
+ # require "google/identity/access_context_manager/v1"
2103
+ #
2104
+ # # Create a client object. The client can be reused for multiple calls.
2105
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
2106
+ #
2107
+ # # Create a request. To set request fields, pass in keyword arguments.
2108
+ # request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new
2109
+ #
2110
+ # # Call the get_gcp_user_access_binding method.
2111
+ # result = client.get_gcp_user_access_binding request
2112
+ #
2113
+ # # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.
2114
+ # p result
2115
+ #
1677
2116
  def get_gcp_user_access_binding request, options = nil
1678
2117
  raise ::ArgumentError, "request must be provided" if request.nil?
1679
2118
 
@@ -1748,6 +2187,29 @@ module Google
1748
2187
  # @return [::Gapic::Operation]
1749
2188
  #
1750
2189
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2190
+ #
2191
+ # @example Basic example
2192
+ # require "google/identity/access_context_manager/v1"
2193
+ #
2194
+ # # Create a client object. The client can be reused for multiple calls.
2195
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
2196
+ #
2197
+ # # Create a request. To set request fields, pass in keyword arguments.
2198
+ # request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new
2199
+ #
2200
+ # # Call the create_gcp_user_access_binding method.
2201
+ # result = client.create_gcp_user_access_binding request
2202
+ #
2203
+ # # The returned object is of type Gapic::Operation. You can use it to
2204
+ # # check the status of an operation, cancel it, or wait for results.
2205
+ # # Here is how to wait for a response.
2206
+ # result.wait_until_done! timeout: 60
2207
+ # if result.response?
2208
+ # p result.response
2209
+ # else
2210
+ # puts "No response received."
2211
+ # end
2212
+ #
1751
2213
  def create_gcp_user_access_binding request, options = nil
1752
2214
  raise ::ArgumentError, "request must be provided" if request.nil?
1753
2215
 
@@ -1823,6 +2285,29 @@ module Google
1823
2285
  # @return [::Gapic::Operation]
1824
2286
  #
1825
2287
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2288
+ #
2289
+ # @example Basic example
2290
+ # require "google/identity/access_context_manager/v1"
2291
+ #
2292
+ # # Create a client object. The client can be reused for multiple calls.
2293
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
2294
+ #
2295
+ # # Create a request. To set request fields, pass in keyword arguments.
2296
+ # request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new
2297
+ #
2298
+ # # Call the update_gcp_user_access_binding method.
2299
+ # result = client.update_gcp_user_access_binding request
2300
+ #
2301
+ # # The returned object is of type Gapic::Operation. You can use it to
2302
+ # # check the status of an operation, cancel it, or wait for results.
2303
+ # # Here is how to wait for a response.
2304
+ # result.wait_until_done! timeout: 60
2305
+ # if result.response?
2306
+ # p result.response
2307
+ # else
2308
+ # puts "No response received."
2309
+ # end
2310
+ #
1826
2311
  def update_gcp_user_access_binding request, options = nil
1827
2312
  raise ::ArgumentError, "request must be provided" if request.nil?
1828
2313
 
@@ -1890,6 +2375,29 @@ module Google
1890
2375
  # @return [::Gapic::Operation]
1891
2376
  #
1892
2377
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2378
+ #
2379
+ # @example Basic example
2380
+ # require "google/identity/access_context_manager/v1"
2381
+ #
2382
+ # # Create a client object. The client can be reused for multiple calls.
2383
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
2384
+ #
2385
+ # # Create a request. To set request fields, pass in keyword arguments.
2386
+ # request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new
2387
+ #
2388
+ # # Call the delete_gcp_user_access_binding method.
2389
+ # result = client.delete_gcp_user_access_binding request
2390
+ #
2391
+ # # The returned object is of type Gapic::Operation. You can use it to
2392
+ # # check the status of an operation, cancel it, or wait for results.
2393
+ # # Here is how to wait for a response.
2394
+ # result.wait_until_done! timeout: 60
2395
+ # if result.response?
2396
+ # p result.response
2397
+ # else
2398
+ # puts "No response received."
2399
+ # end
2400
+ #
1893
2401
  def delete_gcp_user_access_binding request, options = nil
1894
2402
  raise ::ArgumentError, "request must be provided" if request.nil?
1895
2403
 
@@ -1970,6 +2478,22 @@ module Google
1970
2478
  # @return [::Google::Iam::V1::Policy]
1971
2479
  #
1972
2480
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2481
+ #
2482
+ # @example Basic example
2483
+ # require "google/identity/access_context_manager/v1"
2484
+ #
2485
+ # # Create a client object. The client can be reused for multiple calls.
2486
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
2487
+ #
2488
+ # # Create a request. To set request fields, pass in keyword arguments.
2489
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
2490
+ #
2491
+ # # Call the set_iam_policy method.
2492
+ # result = client.set_iam_policy request
2493
+ #
2494
+ # # The returned object is of type Google::Iam::V1::Policy.
2495
+ # p result
2496
+ #
1973
2497
  def set_iam_policy request, options = nil
1974
2498
  raise ::ArgumentError, "request must be provided" if request.nil?
1975
2499
 
@@ -2037,6 +2561,22 @@ module Google
2037
2561
  # @return [::Google::Iam::V1::Policy]
2038
2562
  #
2039
2563
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2564
+ #
2565
+ # @example Basic example
2566
+ # require "google/identity/access_context_manager/v1"
2567
+ #
2568
+ # # Create a client object. The client can be reused for multiple calls.
2569
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
2570
+ #
2571
+ # # Create a request. To set request fields, pass in keyword arguments.
2572
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
2573
+ #
2574
+ # # Call the get_iam_policy method.
2575
+ # result = client.get_iam_policy request
2576
+ #
2577
+ # # The returned object is of type Google::Iam::V1::Policy.
2578
+ # p result
2579
+ #
2040
2580
  def get_iam_policy request, options = nil
2041
2581
  raise ::ArgumentError, "request must be provided" if request.nil?
2042
2582
 
@@ -2110,6 +2650,22 @@ module Google
2110
2650
  # @return [::Google::Iam::V1::TestIamPermissionsResponse]
2111
2651
  #
2112
2652
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2653
+ #
2654
+ # @example Basic example
2655
+ # require "google/identity/access_context_manager/v1"
2656
+ #
2657
+ # # Create a client object. The client can be reused for multiple calls.
2658
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Rest::Client.new
2659
+ #
2660
+ # # Create a request. To set request fields, pass in keyword arguments.
2661
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
2662
+ #
2663
+ # # Call the test_iam_permissions method.
2664
+ # result = client.test_iam_permissions request
2665
+ #
2666
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
2667
+ # p result
2668
+ #
2113
2669
  def test_iam_permissions request, options = nil
2114
2670
  raise ::ArgumentError, "request must be provided" if request.nil?
2115
2671
 
@@ -2175,9 +2731,9 @@ module Google
2175
2731
  # end
2176
2732
  #
2177
2733
  # @!attribute [rw] endpoint
2178
- # The hostname or hostname:port of the service endpoint.
2179
- # Defaults to `"accesscontextmanager.googleapis.com"`.
2180
- # @return [::String]
2734
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2735
+ # nil, indicating to use the default endpoint in the current universe domain.
2736
+ # @return [::String,nil]
2181
2737
  # @!attribute [rw] credentials
2182
2738
  # Credentials to send with calls. You may provide any of the following types:
2183
2739
  # * (`String`) The path to a service account key file in JSON format
@@ -2214,13 +2770,20 @@ module Google
2214
2770
  # @!attribute [rw] quota_project
2215
2771
  # A separate project against which to charge quota.
2216
2772
  # @return [::String]
2773
+ # @!attribute [rw] universe_domain
2774
+ # The universe domain within which to make requests. This determines the
2775
+ # default endpoint URL. The default value of nil uses the environment
2776
+ # universe (usually the default "googleapis.com" universe).
2777
+ # @return [::String,nil]
2217
2778
  #
2218
2779
  class Configuration
2219
2780
  extend ::Gapic::Config
2220
2781
 
2782
+ # @private
2783
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2221
2784
  DEFAULT_ENDPOINT = "accesscontextmanager.googleapis.com"
2222
2785
 
2223
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2786
+ config_attr :endpoint, nil, ::String, nil
2224
2787
  config_attr :credentials, nil do |value|
2225
2788
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2226
2789
  allowed.any? { |klass| klass === value }
@@ -2232,6 +2795,7 @@ module Google
2232
2795
  config_attr :metadata, nil, ::Hash, nil
2233
2796
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2234
2797
  config_attr :quota_project, nil, ::String, nil
2798
+ config_attr :universe_domain, nil, ::String, nil
2235
2799
 
2236
2800
  # @private
2237
2801
  def initialize parent_config = nil