google-cloud-os_config-v1 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/os_config/v1/os_config_service/client.rb +16 -5
- data/lib/google/cloud/os_config/v1/os_config_service/rest/client.rb +210 -4
- data/lib/google/cloud/os_config/v1/os_config_service/rest/service_stub.rb +12 -12
- data/lib/google/cloud/os_config/v1/os_config_zonal_service/client.rb +16 -5
- data/lib/google/cloud/os_config/v1/os_config_zonal_service/operations.rb +15 -4
- data/lib/google/cloud/os_config/v1/os_config_zonal_service/rest/client.rb +239 -4
- data/lib/google/cloud/os_config/v1/os_config_zonal_service/rest/operations.rb +84 -7
- data/lib/google/cloud/os_config/v1/os_config_zonal_service/rest/service_stub.rb +12 -12
- data/lib/google/cloud/os_config/v1/version.rb +1 -1
- data/lib/google/cloud/osconfig/v1/inventory_pb.rb +26 -109
- data/lib/google/cloud/osconfig/v1/os_policy_assignment_reports_pb.rb +25 -61
- data/lib/google/cloud/osconfig/v1/os_policy_assignments_pb.rb +29 -93
- data/lib/google/cloud/osconfig/v1/os_policy_pb.rb +24 -158
- data/lib/google/cloud/osconfig/v1/osconfig_common_pb.rb +24 -7
- data/lib/google/cloud/osconfig/v1/osconfig_service_pb.rb +25 -2
- data/lib/google/cloud/osconfig/v1/osconfig_zonal_service_pb.rb +25 -2
- data/lib/google/cloud/osconfig/v1/patch_deployments_pb.rb +30 -88
- data/lib/google/cloud/osconfig/v1/patch_jobs_pb.rb +27 -209
- data/lib/google/cloud/osconfig/v1/vulnerability_pb.rb +25 -92
- data/proto_docs/google/api/client.rb +67 -4
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +5 -5
@@ -127,7 +127,7 @@ module Google
|
|
127
127
|
credentials = @config.credentials
|
128
128
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
129
129
|
# but only if the default endpoint does not have a region prefix.
|
130
|
-
enable_self_signed_jwt = @config.endpoint ==
|
130
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
131
131
|
!@config.endpoint.split(".").first.include?("-")
|
132
132
|
credentials ||= Credentials.default scope: @config.scope,
|
133
133
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -203,6 +203,29 @@ module Google
|
|
203
203
|
# @return [::Gapic::Operation]
|
204
204
|
#
|
205
205
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
206
|
+
#
|
207
|
+
# @example Basic example
|
208
|
+
# require "google/cloud/os_config/v1"
|
209
|
+
#
|
210
|
+
# # Create a client object. The client can be reused for multiple calls.
|
211
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Rest::Client.new
|
212
|
+
#
|
213
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
214
|
+
# request = Google::Cloud::OsConfig::V1::CreateOSPolicyAssignmentRequest.new
|
215
|
+
#
|
216
|
+
# # Call the create_os_policy_assignment method.
|
217
|
+
# result = client.create_os_policy_assignment request
|
218
|
+
#
|
219
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
220
|
+
# # check the status of an operation, cancel it, or wait for results.
|
221
|
+
# # Here is how to wait for a response.
|
222
|
+
# result.wait_until_done! timeout: 60
|
223
|
+
# if result.response?
|
224
|
+
# p result.response
|
225
|
+
# else
|
226
|
+
# puts "No response received."
|
227
|
+
# end
|
228
|
+
#
|
206
229
|
def create_os_policy_assignment request, options = nil
|
207
230
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
208
231
|
|
@@ -277,6 +300,29 @@ module Google
|
|
277
300
|
# @return [::Gapic::Operation]
|
278
301
|
#
|
279
302
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
303
|
+
#
|
304
|
+
# @example Basic example
|
305
|
+
# require "google/cloud/os_config/v1"
|
306
|
+
#
|
307
|
+
# # Create a client object. The client can be reused for multiple calls.
|
308
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Rest::Client.new
|
309
|
+
#
|
310
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
311
|
+
# request = Google::Cloud::OsConfig::V1::UpdateOSPolicyAssignmentRequest.new
|
312
|
+
#
|
313
|
+
# # Call the update_os_policy_assignment method.
|
314
|
+
# result = client.update_os_policy_assignment request
|
315
|
+
#
|
316
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
317
|
+
# # check the status of an operation, cancel it, or wait for results.
|
318
|
+
# # Here is how to wait for a response.
|
319
|
+
# result.wait_until_done! timeout: 60
|
320
|
+
# if result.response?
|
321
|
+
# p result.response
|
322
|
+
# else
|
323
|
+
# puts "No response received."
|
324
|
+
# end
|
325
|
+
#
|
280
326
|
def update_os_policy_assignment request, options = nil
|
281
327
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
282
328
|
|
@@ -347,6 +393,22 @@ module Google
|
|
347
393
|
# @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignment]
|
348
394
|
#
|
349
395
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
396
|
+
#
|
397
|
+
# @example Basic example
|
398
|
+
# require "google/cloud/os_config/v1"
|
399
|
+
#
|
400
|
+
# # Create a client object. The client can be reused for multiple calls.
|
401
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Rest::Client.new
|
402
|
+
#
|
403
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
404
|
+
# request = Google::Cloud::OsConfig::V1::GetOSPolicyAssignmentRequest.new
|
405
|
+
#
|
406
|
+
# # Call the get_os_policy_assignment method.
|
407
|
+
# result = client.get_os_policy_assignment request
|
408
|
+
#
|
409
|
+
# # The returned object is of type Google::Cloud::OsConfig::V1::OSPolicyAssignment.
|
410
|
+
# p result
|
411
|
+
#
|
350
412
|
def get_os_policy_assignment request, options = nil
|
351
413
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
352
414
|
|
@@ -417,6 +479,26 @@ module Google
|
|
417
479
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1::OSPolicyAssignment>]
|
418
480
|
#
|
419
481
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
482
|
+
#
|
483
|
+
# @example Basic example
|
484
|
+
# require "google/cloud/os_config/v1"
|
485
|
+
#
|
486
|
+
# # Create a client object. The client can be reused for multiple calls.
|
487
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Rest::Client.new
|
488
|
+
#
|
489
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
490
|
+
# request = Google::Cloud::OsConfig::V1::ListOSPolicyAssignmentsRequest.new
|
491
|
+
#
|
492
|
+
# # Call the list_os_policy_assignments method.
|
493
|
+
# result = client.list_os_policy_assignments request
|
494
|
+
#
|
495
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
496
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
497
|
+
# result.each do |item|
|
498
|
+
# # Each element is of type ::Google::Cloud::OsConfig::V1::OSPolicyAssignment.
|
499
|
+
# p item
|
500
|
+
# end
|
501
|
+
#
|
420
502
|
def list_os_policy_assignments request, options = nil
|
421
503
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
422
504
|
|
@@ -486,6 +568,26 @@ module Google
|
|
486
568
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1::OSPolicyAssignment>]
|
487
569
|
#
|
488
570
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
571
|
+
#
|
572
|
+
# @example Basic example
|
573
|
+
# require "google/cloud/os_config/v1"
|
574
|
+
#
|
575
|
+
# # Create a client object. The client can be reused for multiple calls.
|
576
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Rest::Client.new
|
577
|
+
#
|
578
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
579
|
+
# request = Google::Cloud::OsConfig::V1::ListOSPolicyAssignmentRevisionsRequest.new
|
580
|
+
#
|
581
|
+
# # Call the list_os_policy_assignment_revisions method.
|
582
|
+
# result = client.list_os_policy_assignment_revisions request
|
583
|
+
#
|
584
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
585
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
586
|
+
# result.each do |item|
|
587
|
+
# # Each element is of type ::Google::Cloud::OsConfig::V1::OSPolicyAssignment.
|
588
|
+
# p item
|
589
|
+
# end
|
590
|
+
#
|
489
591
|
def list_os_policy_assignment_revisions request, options = nil
|
490
592
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
491
593
|
|
@@ -560,6 +662,29 @@ module Google
|
|
560
662
|
# @return [::Gapic::Operation]
|
561
663
|
#
|
562
664
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
665
|
+
#
|
666
|
+
# @example Basic example
|
667
|
+
# require "google/cloud/os_config/v1"
|
668
|
+
#
|
669
|
+
# # Create a client object. The client can be reused for multiple calls.
|
670
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Rest::Client.new
|
671
|
+
#
|
672
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
673
|
+
# request = Google::Cloud::OsConfig::V1::DeleteOSPolicyAssignmentRequest.new
|
674
|
+
#
|
675
|
+
# # Call the delete_os_policy_assignment method.
|
676
|
+
# result = client.delete_os_policy_assignment request
|
677
|
+
#
|
678
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
679
|
+
# # check the status of an operation, cancel it, or wait for results.
|
680
|
+
# # Here is how to wait for a response.
|
681
|
+
# result.wait_until_done! timeout: 60
|
682
|
+
# if result.response?
|
683
|
+
# p result.response
|
684
|
+
# else
|
685
|
+
# puts "No response received."
|
686
|
+
# end
|
687
|
+
#
|
563
688
|
def delete_os_policy_assignment request, options = nil
|
564
689
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
565
690
|
|
@@ -632,6 +757,22 @@ module Google
|
|
632
757
|
# @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport]
|
633
758
|
#
|
634
759
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
760
|
+
#
|
761
|
+
# @example Basic example
|
762
|
+
# require "google/cloud/os_config/v1"
|
763
|
+
#
|
764
|
+
# # Create a client object. The client can be reused for multiple calls.
|
765
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Rest::Client.new
|
766
|
+
#
|
767
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
768
|
+
# request = Google::Cloud::OsConfig::V1::GetOSPolicyAssignmentReportRequest.new
|
769
|
+
#
|
770
|
+
# # Call the get_os_policy_assignment_report method.
|
771
|
+
# result = client.get_os_policy_assignment_report request
|
772
|
+
#
|
773
|
+
# # The returned object is of type Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport.
|
774
|
+
# p result
|
775
|
+
#
|
635
776
|
def get_os_policy_assignment_report request, options = nil
|
636
777
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
637
778
|
|
@@ -724,6 +865,26 @@ module Google
|
|
724
865
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport>]
|
725
866
|
#
|
726
867
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
868
|
+
#
|
869
|
+
# @example Basic example
|
870
|
+
# require "google/cloud/os_config/v1"
|
871
|
+
#
|
872
|
+
# # Create a client object. The client can be reused for multiple calls.
|
873
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Rest::Client.new
|
874
|
+
#
|
875
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
876
|
+
# request = Google::Cloud::OsConfig::V1::ListOSPolicyAssignmentReportsRequest.new
|
877
|
+
#
|
878
|
+
# # Call the list_os_policy_assignment_reports method.
|
879
|
+
# result = client.list_os_policy_assignment_reports request
|
880
|
+
#
|
881
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
882
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
883
|
+
# result.each do |item|
|
884
|
+
# # Each element is of type ::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport.
|
885
|
+
# p item
|
886
|
+
# end
|
887
|
+
#
|
727
888
|
def list_os_policy_assignment_reports request, options = nil
|
728
889
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
729
890
|
|
@@ -798,6 +959,22 @@ module Google
|
|
798
959
|
# @return [::Google::Cloud::OsConfig::V1::Inventory]
|
799
960
|
#
|
800
961
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
962
|
+
#
|
963
|
+
# @example Basic example
|
964
|
+
# require "google/cloud/os_config/v1"
|
965
|
+
#
|
966
|
+
# # Create a client object. The client can be reused for multiple calls.
|
967
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Rest::Client.new
|
968
|
+
#
|
969
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
970
|
+
# request = Google::Cloud::OsConfig::V1::GetInventoryRequest.new
|
971
|
+
#
|
972
|
+
# # Call the get_inventory method.
|
973
|
+
# result = client.get_inventory request
|
974
|
+
#
|
975
|
+
# # The returned object is of type Google::Cloud::OsConfig::V1::Inventory.
|
976
|
+
# p result
|
977
|
+
#
|
801
978
|
def get_inventory request, options = nil
|
802
979
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
803
980
|
|
@@ -876,6 +1053,26 @@ module Google
|
|
876
1053
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1::Inventory>]
|
877
1054
|
#
|
878
1055
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1056
|
+
#
|
1057
|
+
# @example Basic example
|
1058
|
+
# require "google/cloud/os_config/v1"
|
1059
|
+
#
|
1060
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1061
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Rest::Client.new
|
1062
|
+
#
|
1063
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1064
|
+
# request = Google::Cloud::OsConfig::V1::ListInventoriesRequest.new
|
1065
|
+
#
|
1066
|
+
# # Call the list_inventories method.
|
1067
|
+
# result = client.list_inventories request
|
1068
|
+
#
|
1069
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1070
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1071
|
+
# result.each do |item|
|
1072
|
+
# # Each element is of type ::Google::Cloud::OsConfig::V1::Inventory.
|
1073
|
+
# p item
|
1074
|
+
# end
|
1075
|
+
#
|
879
1076
|
def list_inventories request, options = nil
|
880
1077
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
881
1078
|
|
@@ -947,6 +1144,22 @@ module Google
|
|
947
1144
|
# @return [::Google::Cloud::OsConfig::V1::VulnerabilityReport]
|
948
1145
|
#
|
949
1146
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1147
|
+
#
|
1148
|
+
# @example Basic example
|
1149
|
+
# require "google/cloud/os_config/v1"
|
1150
|
+
#
|
1151
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1152
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Rest::Client.new
|
1153
|
+
#
|
1154
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1155
|
+
# request = Google::Cloud::OsConfig::V1::GetVulnerabilityReportRequest.new
|
1156
|
+
#
|
1157
|
+
# # Call the get_vulnerability_report method.
|
1158
|
+
# result = client.get_vulnerability_report request
|
1159
|
+
#
|
1160
|
+
# # The returned object is of type Google::Cloud::OsConfig::V1::VulnerabilityReport.
|
1161
|
+
# p result
|
1162
|
+
#
|
950
1163
|
def get_vulnerability_report request, options = nil
|
951
1164
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
952
1165
|
|
@@ -1022,6 +1235,26 @@ module Google
|
|
1022
1235
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1::VulnerabilityReport>]
|
1023
1236
|
#
|
1024
1237
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1238
|
+
#
|
1239
|
+
# @example Basic example
|
1240
|
+
# require "google/cloud/os_config/v1"
|
1241
|
+
#
|
1242
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1243
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Rest::Client.new
|
1244
|
+
#
|
1245
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1246
|
+
# request = Google::Cloud::OsConfig::V1::ListVulnerabilityReportsRequest.new
|
1247
|
+
#
|
1248
|
+
# # Call the list_vulnerability_reports method.
|
1249
|
+
# result = client.list_vulnerability_reports request
|
1250
|
+
#
|
1251
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1252
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1253
|
+
# result.each do |item|
|
1254
|
+
# # Each element is of type ::Google::Cloud::OsConfig::V1::VulnerabilityReport.
|
1255
|
+
# p item
|
1256
|
+
# end
|
1257
|
+
#
|
1025
1258
|
def list_vulnerability_reports request, options = nil
|
1026
1259
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1027
1260
|
|
@@ -1096,9 +1329,9 @@ module Google
|
|
1096
1329
|
# * (`String`) The path to a service account key file in JSON format
|
1097
1330
|
# * (`Hash`) A service account key as a Hash
|
1098
1331
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1099
|
-
# (see the [googleauth docs](https://
|
1332
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1100
1333
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1101
|
-
# (see the [signet docs](https://
|
1334
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1102
1335
|
# * (`nil`) indicating no credentials
|
1103
1336
|
# @return [::Object]
|
1104
1337
|
# @!attribute [rw] scope
|
@@ -1131,7 +1364,9 @@ module Google
|
|
1131
1364
|
class Configuration
|
1132
1365
|
extend ::Gapic::Config
|
1133
1366
|
|
1134
|
-
|
1367
|
+
DEFAULT_ENDPOINT = "osconfig.googleapis.com"
|
1368
|
+
|
1369
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
1135
1370
|
config_attr :credentials, nil do |value|
|
1136
1371
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1137
1372
|
allowed.any? { |klass| klass === value }
|
@@ -136,6 +136,26 @@ module Google
|
|
136
136
|
# @return [::Gapic::Operation]
|
137
137
|
#
|
138
138
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
139
|
+
#
|
140
|
+
# @example Basic example
|
141
|
+
# require "google/longrunning"
|
142
|
+
#
|
143
|
+
# # Create a client object. The client can be reused for multiple calls.
|
144
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
145
|
+
#
|
146
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
147
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
148
|
+
#
|
149
|
+
# # Call the list_operations method.
|
150
|
+
# result = client.list_operations request
|
151
|
+
#
|
152
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
153
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
154
|
+
# result.each do |item|
|
155
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
156
|
+
# p item
|
157
|
+
# end
|
158
|
+
#
|
139
159
|
def list_operations request, options = nil
|
140
160
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
141
161
|
|
@@ -201,6 +221,29 @@ module Google
|
|
201
221
|
# @return [::Gapic::Operation]
|
202
222
|
#
|
203
223
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
224
|
+
#
|
225
|
+
# @example Basic example
|
226
|
+
# require "google/longrunning"
|
227
|
+
#
|
228
|
+
# # Create a client object. The client can be reused for multiple calls.
|
229
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
230
|
+
#
|
231
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
232
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
233
|
+
#
|
234
|
+
# # Call the get_operation method.
|
235
|
+
# result = client.get_operation request
|
236
|
+
#
|
237
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
238
|
+
# # check the status of an operation, cancel it, or wait for results.
|
239
|
+
# # Here is how to wait for a response.
|
240
|
+
# result.wait_until_done! timeout: 60
|
241
|
+
# if result.response?
|
242
|
+
# p result.response
|
243
|
+
# else
|
244
|
+
# puts "No response received."
|
245
|
+
# end
|
246
|
+
#
|
204
247
|
def get_operation request, options = nil
|
205
248
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
206
249
|
|
@@ -267,6 +310,22 @@ module Google
|
|
267
310
|
# @return [::Google::Protobuf::Empty]
|
268
311
|
#
|
269
312
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
313
|
+
#
|
314
|
+
# @example Basic example
|
315
|
+
# require "google/longrunning"
|
316
|
+
#
|
317
|
+
# # Create a client object. The client can be reused for multiple calls.
|
318
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
319
|
+
#
|
320
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
321
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
322
|
+
#
|
323
|
+
# # Call the delete_operation method.
|
324
|
+
# result = client.delete_operation request
|
325
|
+
#
|
326
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
327
|
+
# p result
|
328
|
+
#
|
270
329
|
def delete_operation request, options = nil
|
271
330
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
272
331
|
|
@@ -338,6 +397,22 @@ module Google
|
|
338
397
|
# @return [::Google::Protobuf::Empty]
|
339
398
|
#
|
340
399
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
400
|
+
#
|
401
|
+
# @example Basic example
|
402
|
+
# require "google/longrunning"
|
403
|
+
#
|
404
|
+
# # Create a client object. The client can be reused for multiple calls.
|
405
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
406
|
+
#
|
407
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
408
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
409
|
+
#
|
410
|
+
# # Call the cancel_operation method.
|
411
|
+
# result = client.cancel_operation request
|
412
|
+
#
|
413
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
414
|
+
# p result
|
415
|
+
#
|
341
416
|
def cancel_operation request, options = nil
|
342
417
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
343
418
|
|
@@ -411,9 +486,9 @@ module Google
|
|
411
486
|
# * (`String`) The path to a service account key file in JSON format
|
412
487
|
# * (`Hash`) A service account key as a Hash
|
413
488
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
414
|
-
# (see the [googleauth docs](https://
|
489
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
415
490
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
416
|
-
# (see the [signet docs](https://
|
491
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
417
492
|
# * (`nil`) indicating no credentials
|
418
493
|
# @return [::Object]
|
419
494
|
# @!attribute [rw] scope
|
@@ -446,7 +521,9 @@ module Google
|
|
446
521
|
class Configuration
|
447
522
|
extend ::Gapic::Config
|
448
523
|
|
449
|
-
|
524
|
+
DEFAULT_ENDPOINT = "osconfig.googleapis.com"
|
525
|
+
|
526
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
450
527
|
config_attr :credentials, nil do |value|
|
451
528
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
452
529
|
allowed.any? { |klass| klass === value }
|
@@ -567,7 +644,7 @@ module Google
|
|
567
644
|
|
568
645
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
|
569
646
|
query_string_params = if query_string_params.any?
|
570
|
-
query_string_params.to_h { |p| p.split
|
647
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
571
648
|
else
|
572
649
|
{}
|
573
650
|
end
|
@@ -605,7 +682,7 @@ module Google
|
|
605
682
|
|
606
683
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
|
607
684
|
query_string_params = if query_string_params.any?
|
608
|
-
query_string_params.to_h { |p| p.split
|
685
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
609
686
|
else
|
610
687
|
{}
|
611
688
|
end
|
@@ -643,7 +720,7 @@ module Google
|
|
643
720
|
|
644
721
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
|
645
722
|
query_string_params = if query_string_params.any?
|
646
|
-
query_string_params.to_h { |p| p.split
|
723
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
647
724
|
else
|
648
725
|
{}
|
649
726
|
end
|
@@ -681,7 +758,7 @@ module Google
|
|
681
758
|
|
682
759
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
|
683
760
|
query_string_params = if query_string_params.any?
|
684
|
-
query_string_params.to_h { |p| p.split
|
761
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
685
762
|
else
|
686
763
|
{}
|
687
764
|
end
|
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
|
60
60
|
verb, uri, query_string_params, body = ServiceStub.transcode_create_os_policy_assignment_request request_pb
|
61
61
|
query_string_params = if query_string_params.any?
|
62
|
-
query_string_params.to_h { |p| p.split
|
62
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
63
63
|
else
|
64
64
|
{}
|
65
65
|
end
|
@@ -97,7 +97,7 @@ module Google
|
|
97
97
|
|
98
98
|
verb, uri, query_string_params, body = ServiceStub.transcode_update_os_policy_assignment_request request_pb
|
99
99
|
query_string_params = if query_string_params.any?
|
100
|
-
query_string_params.to_h { |p| p.split
|
100
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
101
101
|
else
|
102
102
|
{}
|
103
103
|
end
|
@@ -135,7 +135,7 @@ module Google
|
|
135
135
|
|
136
136
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_os_policy_assignment_request request_pb
|
137
137
|
query_string_params = if query_string_params.any?
|
138
|
-
query_string_params.to_h { |p| p.split
|
138
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
139
139
|
else
|
140
140
|
{}
|
141
141
|
end
|
@@ -173,7 +173,7 @@ module Google
|
|
173
173
|
|
174
174
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_os_policy_assignments_request request_pb
|
175
175
|
query_string_params = if query_string_params.any?
|
176
|
-
query_string_params.to_h { |p| p.split
|
176
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
177
177
|
else
|
178
178
|
{}
|
179
179
|
end
|
@@ -211,7 +211,7 @@ module Google
|
|
211
211
|
|
212
212
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_os_policy_assignment_revisions_request request_pb
|
213
213
|
query_string_params = if query_string_params.any?
|
214
|
-
query_string_params.to_h { |p| p.split
|
214
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
215
215
|
else
|
216
216
|
{}
|
217
217
|
end
|
@@ -249,7 +249,7 @@ module Google
|
|
249
249
|
|
250
250
|
verb, uri, query_string_params, body = ServiceStub.transcode_delete_os_policy_assignment_request request_pb
|
251
251
|
query_string_params = if query_string_params.any?
|
252
|
-
query_string_params.to_h { |p| p.split
|
252
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
253
253
|
else
|
254
254
|
{}
|
255
255
|
end
|
@@ -287,7 +287,7 @@ module Google
|
|
287
287
|
|
288
288
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_os_policy_assignment_report_request request_pb
|
289
289
|
query_string_params = if query_string_params.any?
|
290
|
-
query_string_params.to_h { |p| p.split
|
290
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
291
291
|
else
|
292
292
|
{}
|
293
293
|
end
|
@@ -325,7 +325,7 @@ module Google
|
|
325
325
|
|
326
326
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_os_policy_assignment_reports_request request_pb
|
327
327
|
query_string_params = if query_string_params.any?
|
328
|
-
query_string_params.to_h { |p| p.split
|
328
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
329
329
|
else
|
330
330
|
{}
|
331
331
|
end
|
@@ -363,7 +363,7 @@ module Google
|
|
363
363
|
|
364
364
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_inventory_request request_pb
|
365
365
|
query_string_params = if query_string_params.any?
|
366
|
-
query_string_params.to_h { |p| p.split
|
366
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
367
367
|
else
|
368
368
|
{}
|
369
369
|
end
|
@@ -401,7 +401,7 @@ module Google
|
|
401
401
|
|
402
402
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_inventories_request request_pb
|
403
403
|
query_string_params = if query_string_params.any?
|
404
|
-
query_string_params.to_h { |p| p.split
|
404
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
405
405
|
else
|
406
406
|
{}
|
407
407
|
end
|
@@ -439,7 +439,7 @@ module Google
|
|
439
439
|
|
440
440
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_vulnerability_report_request request_pb
|
441
441
|
query_string_params = if query_string_params.any?
|
442
|
-
query_string_params.to_h { |p| p.split
|
442
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
443
443
|
else
|
444
444
|
{}
|
445
445
|
end
|
@@ -477,7 +477,7 @@ module Google
|
|
477
477
|
|
478
478
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_vulnerability_reports_request request_pb
|
479
479
|
query_string_params = if query_string_params.any?
|
480
|
-
query_string_params.to_h { |p| p.split
|
480
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
481
481
|
else
|
482
482
|
{}
|
483
483
|
end
|