google-cloud-os_config-v1 0.13.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +72 -101
- data/lib/google/cloud/os_config/v1/os_config_service/client.rb +41 -9
- data/lib/google/cloud/os_config/v1/os_config_service/rest/client.rb +237 -7
- data/lib/google/cloud/os_config/v1/os_config_service/rest/service_stub.rb +14 -2
- data/lib/google/cloud/os_config/v1/os_config_zonal_service/client.rb +42 -9
- data/lib/google/cloud/os_config/v1/os_config_zonal_service/operations.rb +38 -7
- data/lib/google/cloud/os_config/v1/os_config_zonal_service/rest/client.rb +267 -7
- data/lib/google/cloud/os_config/v1/os_config_zonal_service/rest/operations.rb +108 -8
- data/lib/google/cloud/os_config/v1/os_config_zonal_service/rest/service_stub.rb +14 -2
- data/lib/google/cloud/os_config/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/osconfig/v1/vulnerability.rb +2 -0
- metadata +5 -5
@@ -35,6 +35,9 @@ module Google
|
|
35
35
|
# manage package installations and patch jobs for virtual machine instances.
|
36
36
|
#
|
37
37
|
class Client
|
38
|
+
# @private
|
39
|
+
DEFAULT_ENDPOINT_TEMPLATE = "osconfig.$UNIVERSE_DOMAIN$"
|
40
|
+
|
38
41
|
include Paths
|
39
42
|
|
40
43
|
# @private
|
@@ -100,6 +103,15 @@ module Google
|
|
100
103
|
@config
|
101
104
|
end
|
102
105
|
|
106
|
+
##
|
107
|
+
# The effective universe domain
|
108
|
+
#
|
109
|
+
# @return [String]
|
110
|
+
#
|
111
|
+
def universe_domain
|
112
|
+
@os_config_service_stub.universe_domain
|
113
|
+
end
|
114
|
+
|
103
115
|
##
|
104
116
|
# Create a new OsConfigService REST client object.
|
105
117
|
#
|
@@ -127,8 +139,9 @@ module Google
|
|
127
139
|
credentials = @config.credentials
|
128
140
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
129
141
|
# but only if the default endpoint does not have a region prefix.
|
130
|
-
enable_self_signed_jwt = @config.endpoint
|
131
|
-
|
142
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
143
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
144
|
+
!@config.endpoint.split(".").first.include?("-"))
|
132
145
|
credentials ||= Credentials.default scope: @config.scope,
|
133
146
|
enable_self_signed_jwt: enable_self_signed_jwt
|
134
147
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -138,7 +151,12 @@ module Google
|
|
138
151
|
@quota_project_id = @config.quota_project
|
139
152
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
140
153
|
|
141
|
-
@os_config_service_stub = ::Google::Cloud::OsConfig::V1::OsConfigService::Rest::ServiceStub.new
|
154
|
+
@os_config_service_stub = ::Google::Cloud::OsConfig::V1::OsConfigService::Rest::ServiceStub.new(
|
155
|
+
endpoint: @config.endpoint,
|
156
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
157
|
+
universe_domain: @config.universe_domain,
|
158
|
+
credentials: credentials
|
159
|
+
)
|
142
160
|
end
|
143
161
|
|
144
162
|
# Service calls
|
@@ -189,6 +207,22 @@ module Google
|
|
189
207
|
# @return [::Google::Cloud::OsConfig::V1::PatchJob]
|
190
208
|
#
|
191
209
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
210
|
+
#
|
211
|
+
# @example Basic example
|
212
|
+
# require "google/cloud/os_config/v1"
|
213
|
+
#
|
214
|
+
# # Create a client object. The client can be reused for multiple calls.
|
215
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigService::Rest::Client.new
|
216
|
+
#
|
217
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
218
|
+
# request = Google::Cloud::OsConfig::V1::ExecutePatchJobRequest.new
|
219
|
+
#
|
220
|
+
# # Call the execute_patch_job method.
|
221
|
+
# result = client.execute_patch_job request
|
222
|
+
#
|
223
|
+
# # The returned object is of type Google::Cloud::OsConfig::V1::PatchJob.
|
224
|
+
# p result
|
225
|
+
#
|
192
226
|
def execute_patch_job request, options = nil
|
193
227
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
194
228
|
|
@@ -252,6 +286,22 @@ module Google
|
|
252
286
|
# @return [::Google::Cloud::OsConfig::V1::PatchJob]
|
253
287
|
#
|
254
288
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
289
|
+
#
|
290
|
+
# @example Basic example
|
291
|
+
# require "google/cloud/os_config/v1"
|
292
|
+
#
|
293
|
+
# # Create a client object. The client can be reused for multiple calls.
|
294
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigService::Rest::Client.new
|
295
|
+
#
|
296
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
297
|
+
# request = Google::Cloud::OsConfig::V1::GetPatchJobRequest.new
|
298
|
+
#
|
299
|
+
# # Call the get_patch_job method.
|
300
|
+
# result = client.get_patch_job request
|
301
|
+
#
|
302
|
+
# # The returned object is of type Google::Cloud::OsConfig::V1::PatchJob.
|
303
|
+
# p result
|
304
|
+
#
|
255
305
|
def get_patch_job request, options = nil
|
256
306
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
257
307
|
|
@@ -315,6 +365,22 @@ module Google
|
|
315
365
|
# @return [::Google::Cloud::OsConfig::V1::PatchJob]
|
316
366
|
#
|
317
367
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
368
|
+
#
|
369
|
+
# @example Basic example
|
370
|
+
# require "google/cloud/os_config/v1"
|
371
|
+
#
|
372
|
+
# # Create a client object. The client can be reused for multiple calls.
|
373
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigService::Rest::Client.new
|
374
|
+
#
|
375
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
376
|
+
# request = Google::Cloud::OsConfig::V1::CancelPatchJobRequest.new
|
377
|
+
#
|
378
|
+
# # Call the cancel_patch_job method.
|
379
|
+
# result = client.cancel_patch_job request
|
380
|
+
#
|
381
|
+
# # The returned object is of type Google::Cloud::OsConfig::V1::PatchJob.
|
382
|
+
# p result
|
383
|
+
#
|
318
384
|
def cancel_patch_job request, options = nil
|
319
385
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
320
386
|
|
@@ -386,6 +452,26 @@ module Google
|
|
386
452
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1::PatchJob>]
|
387
453
|
#
|
388
454
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
455
|
+
#
|
456
|
+
# @example Basic example
|
457
|
+
# require "google/cloud/os_config/v1"
|
458
|
+
#
|
459
|
+
# # Create a client object. The client can be reused for multiple calls.
|
460
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigService::Rest::Client.new
|
461
|
+
#
|
462
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
463
|
+
# request = Google::Cloud::OsConfig::V1::ListPatchJobsRequest.new
|
464
|
+
#
|
465
|
+
# # Call the list_patch_jobs method.
|
466
|
+
# result = client.list_patch_jobs request
|
467
|
+
#
|
468
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
469
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
470
|
+
# result.each do |item|
|
471
|
+
# # Each element is of type ::Google::Cloud::OsConfig::V1::PatchJob.
|
472
|
+
# p item
|
473
|
+
# end
|
474
|
+
#
|
389
475
|
def list_patch_jobs request, options = nil
|
390
476
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
391
477
|
|
@@ -459,6 +545,26 @@ module Google
|
|
459
545
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1::PatchJobInstanceDetails>]
|
460
546
|
#
|
461
547
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
548
|
+
#
|
549
|
+
# @example Basic example
|
550
|
+
# require "google/cloud/os_config/v1"
|
551
|
+
#
|
552
|
+
# # Create a client object. The client can be reused for multiple calls.
|
553
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigService::Rest::Client.new
|
554
|
+
#
|
555
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
556
|
+
# request = Google::Cloud::OsConfig::V1::ListPatchJobInstanceDetailsRequest.new
|
557
|
+
#
|
558
|
+
# # Call the list_patch_job_instance_details method.
|
559
|
+
# result = client.list_patch_job_instance_details request
|
560
|
+
#
|
561
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
562
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
563
|
+
# result.each do |item|
|
564
|
+
# # Each element is of type ::Google::Cloud::OsConfig::V1::PatchJobInstanceDetails.
|
565
|
+
# p item
|
566
|
+
# end
|
567
|
+
#
|
462
568
|
def list_patch_job_instance_details request, options = nil
|
463
569
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
464
570
|
|
@@ -533,6 +639,22 @@ module Google
|
|
533
639
|
# @return [::Google::Cloud::OsConfig::V1::PatchDeployment]
|
534
640
|
#
|
535
641
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
642
|
+
#
|
643
|
+
# @example Basic example
|
644
|
+
# require "google/cloud/os_config/v1"
|
645
|
+
#
|
646
|
+
# # Create a client object. The client can be reused for multiple calls.
|
647
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigService::Rest::Client.new
|
648
|
+
#
|
649
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
650
|
+
# request = Google::Cloud::OsConfig::V1::CreatePatchDeploymentRequest.new
|
651
|
+
#
|
652
|
+
# # Call the create_patch_deployment method.
|
653
|
+
# result = client.create_patch_deployment request
|
654
|
+
#
|
655
|
+
# # The returned object is of type Google::Cloud::OsConfig::V1::PatchDeployment.
|
656
|
+
# p result
|
657
|
+
#
|
536
658
|
def create_patch_deployment request, options = nil
|
537
659
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
538
660
|
|
@@ -596,6 +718,22 @@ module Google
|
|
596
718
|
# @return [::Google::Cloud::OsConfig::V1::PatchDeployment]
|
597
719
|
#
|
598
720
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
721
|
+
#
|
722
|
+
# @example Basic example
|
723
|
+
# require "google/cloud/os_config/v1"
|
724
|
+
#
|
725
|
+
# # Create a client object. The client can be reused for multiple calls.
|
726
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigService::Rest::Client.new
|
727
|
+
#
|
728
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
729
|
+
# request = Google::Cloud::OsConfig::V1::GetPatchDeploymentRequest.new
|
730
|
+
#
|
731
|
+
# # Call the get_patch_deployment method.
|
732
|
+
# result = client.get_patch_deployment request
|
733
|
+
#
|
734
|
+
# # The returned object is of type Google::Cloud::OsConfig::V1::PatchDeployment.
|
735
|
+
# p result
|
736
|
+
#
|
599
737
|
def get_patch_deployment request, options = nil
|
600
738
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
601
739
|
|
@@ -665,6 +803,26 @@ module Google
|
|
665
803
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1::PatchDeployment>]
|
666
804
|
#
|
667
805
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
806
|
+
#
|
807
|
+
# @example Basic example
|
808
|
+
# require "google/cloud/os_config/v1"
|
809
|
+
#
|
810
|
+
# # Create a client object. The client can be reused for multiple calls.
|
811
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigService::Rest::Client.new
|
812
|
+
#
|
813
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
814
|
+
# request = Google::Cloud::OsConfig::V1::ListPatchDeploymentsRequest.new
|
815
|
+
#
|
816
|
+
# # Call the list_patch_deployments method.
|
817
|
+
# result = client.list_patch_deployments request
|
818
|
+
#
|
819
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
820
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
821
|
+
# result.each do |item|
|
822
|
+
# # Each element is of type ::Google::Cloud::OsConfig::V1::PatchDeployment.
|
823
|
+
# p item
|
824
|
+
# end
|
825
|
+
#
|
668
826
|
def list_patch_deployments request, options = nil
|
669
827
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
670
828
|
|
@@ -729,6 +887,22 @@ module Google
|
|
729
887
|
# @return [::Google::Protobuf::Empty]
|
730
888
|
#
|
731
889
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
890
|
+
#
|
891
|
+
# @example Basic example
|
892
|
+
# require "google/cloud/os_config/v1"
|
893
|
+
#
|
894
|
+
# # Create a client object. The client can be reused for multiple calls.
|
895
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigService::Rest::Client.new
|
896
|
+
#
|
897
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
898
|
+
# request = Google::Cloud::OsConfig::V1::DeletePatchDeploymentRequest.new
|
899
|
+
#
|
900
|
+
# # Call the delete_patch_deployment method.
|
901
|
+
# result = client.delete_patch_deployment request
|
902
|
+
#
|
903
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
904
|
+
# p result
|
905
|
+
#
|
732
906
|
def delete_patch_deployment request, options = nil
|
733
907
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
734
908
|
|
@@ -794,6 +968,22 @@ module Google
|
|
794
968
|
# @return [::Google::Cloud::OsConfig::V1::PatchDeployment]
|
795
969
|
#
|
796
970
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
971
|
+
#
|
972
|
+
# @example Basic example
|
973
|
+
# require "google/cloud/os_config/v1"
|
974
|
+
#
|
975
|
+
# # Create a client object. The client can be reused for multiple calls.
|
976
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigService::Rest::Client.new
|
977
|
+
#
|
978
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
979
|
+
# request = Google::Cloud::OsConfig::V1::UpdatePatchDeploymentRequest.new
|
980
|
+
#
|
981
|
+
# # Call the update_patch_deployment method.
|
982
|
+
# result = client.update_patch_deployment request
|
983
|
+
#
|
984
|
+
# # The returned object is of type Google::Cloud::OsConfig::V1::PatchDeployment.
|
985
|
+
# p result
|
986
|
+
#
|
797
987
|
def update_patch_deployment request, options = nil
|
798
988
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
799
989
|
|
@@ -858,6 +1048,22 @@ module Google
|
|
858
1048
|
# @return [::Google::Cloud::OsConfig::V1::PatchDeployment]
|
859
1049
|
#
|
860
1050
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1051
|
+
#
|
1052
|
+
# @example Basic example
|
1053
|
+
# require "google/cloud/os_config/v1"
|
1054
|
+
#
|
1055
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1056
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigService::Rest::Client.new
|
1057
|
+
#
|
1058
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1059
|
+
# request = Google::Cloud::OsConfig::V1::PausePatchDeploymentRequest.new
|
1060
|
+
#
|
1061
|
+
# # Call the pause_patch_deployment method.
|
1062
|
+
# result = client.pause_patch_deployment request
|
1063
|
+
#
|
1064
|
+
# # The returned object is of type Google::Cloud::OsConfig::V1::PatchDeployment.
|
1065
|
+
# p result
|
1066
|
+
#
|
861
1067
|
def pause_patch_deployment request, options = nil
|
862
1068
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
863
1069
|
|
@@ -922,6 +1128,22 @@ module Google
|
|
922
1128
|
# @return [::Google::Cloud::OsConfig::V1::PatchDeployment]
|
923
1129
|
#
|
924
1130
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1131
|
+
#
|
1132
|
+
# @example Basic example
|
1133
|
+
# require "google/cloud/os_config/v1"
|
1134
|
+
#
|
1135
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1136
|
+
# client = Google::Cloud::OsConfig::V1::OsConfigService::Rest::Client.new
|
1137
|
+
#
|
1138
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1139
|
+
# request = Google::Cloud::OsConfig::V1::ResumePatchDeploymentRequest.new
|
1140
|
+
#
|
1141
|
+
# # Call the resume_patch_deployment method.
|
1142
|
+
# result = client.resume_patch_deployment request
|
1143
|
+
#
|
1144
|
+
# # The returned object is of type Google::Cloud::OsConfig::V1::PatchDeployment.
|
1145
|
+
# p result
|
1146
|
+
#
|
925
1147
|
def resume_patch_deployment request, options = nil
|
926
1148
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
927
1149
|
|
@@ -987,9 +1209,9 @@ module Google
|
|
987
1209
|
# end
|
988
1210
|
#
|
989
1211
|
# @!attribute [rw] endpoint
|
990
|
-
#
|
991
|
-
#
|
992
|
-
# @return [::String]
|
1212
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
1213
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
1214
|
+
# @return [::String,nil]
|
993
1215
|
# @!attribute [rw] credentials
|
994
1216
|
# Credentials to send with calls. You may provide any of the following types:
|
995
1217
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -1026,13 +1248,20 @@ module Google
|
|
1026
1248
|
# @!attribute [rw] quota_project
|
1027
1249
|
# A separate project against which to charge quota.
|
1028
1250
|
# @return [::String]
|
1251
|
+
# @!attribute [rw] universe_domain
|
1252
|
+
# The universe domain within which to make requests. This determines the
|
1253
|
+
# default endpoint URL. The default value of nil uses the environment
|
1254
|
+
# universe (usually the default "googleapis.com" universe).
|
1255
|
+
# @return [::String,nil]
|
1029
1256
|
#
|
1030
1257
|
class Configuration
|
1031
1258
|
extend ::Gapic::Config
|
1032
1259
|
|
1260
|
+
# @private
|
1261
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
1033
1262
|
DEFAULT_ENDPOINT = "osconfig.googleapis.com"
|
1034
1263
|
|
1035
|
-
config_attr :endpoint,
|
1264
|
+
config_attr :endpoint, nil, ::String, nil
|
1036
1265
|
config_attr :credentials, nil do |value|
|
1037
1266
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1038
1267
|
allowed.any? { |klass| klass === value }
|
@@ -1044,6 +1273,7 @@ module Google
|
|
1044
1273
|
config_attr :metadata, nil, ::Hash, nil
|
1045
1274
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1046
1275
|
config_attr :quota_project, nil, ::String, nil
|
1276
|
+
config_attr :universe_domain, nil, ::String, nil
|
1047
1277
|
|
1048
1278
|
# @private
|
1049
1279
|
def initialize parent_config = nil
|
@@ -30,16 +30,28 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
def initialize endpoint:, credentials:
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
34
34
|
# These require statements are intentionally placed here to initialize
|
35
35
|
# the REST modules only when it's required.
|
36
36
|
require "gapic/rest"
|
37
37
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
39
|
+
endpoint_template: endpoint_template,
|
40
|
+
universe_domain: universe_domain,
|
41
|
+
credentials: credentials,
|
39
42
|
numeric_enums: true,
|
40
43
|
raise_faraday_errors: false
|
41
44
|
end
|
42
45
|
|
46
|
+
##
|
47
|
+
# The effective universe domain
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
def universe_domain
|
52
|
+
@client_stub.universe_domain
|
53
|
+
end
|
54
|
+
|
43
55
|
##
|
44
56
|
# Baseline implementation for the execute_patch_job REST call
|
45
57
|
#
|
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# manage package installations and patch jobs for Compute Engine VM instances.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "osconfig.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
include Paths
|
37
40
|
|
38
41
|
# @private
|
@@ -98,6 +101,15 @@ module Google
|
|
98
101
|
@config
|
99
102
|
end
|
100
103
|
|
104
|
+
##
|
105
|
+
# The effective universe domain
|
106
|
+
#
|
107
|
+
# @return [String]
|
108
|
+
#
|
109
|
+
def universe_domain
|
110
|
+
@os_config_zonal_service_stub.universe_domain
|
111
|
+
end
|
112
|
+
|
101
113
|
##
|
102
114
|
# Create a new OsConfigZonalService client object.
|
103
115
|
#
|
@@ -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
|
135
|
-
|
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)
|
@@ -145,14 +158,18 @@ module Google
|
|
145
158
|
config.credentials = credentials
|
146
159
|
config.quota_project = @quota_project_id
|
147
160
|
config.endpoint = @config.endpoint
|
161
|
+
config.universe_domain = @config.universe_domain
|
148
162
|
end
|
149
163
|
|
150
164
|
@os_config_zonal_service_stub = ::Gapic::ServiceStub.new(
|
151
165
|
::Google::Cloud::OsConfig::V1::OsConfigZonalService::Stub,
|
152
|
-
credentials:
|
153
|
-
endpoint:
|
166
|
+
credentials: credentials,
|
167
|
+
endpoint: @config.endpoint,
|
168
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
169
|
+
universe_domain: @config.universe_domain,
|
154
170
|
channel_args: @config.channel_args,
|
155
|
-
interceptors: @config.interceptors
|
171
|
+
interceptors: @config.interceptors,
|
172
|
+
channel_pool_config: @config.channel_pool
|
156
173
|
)
|
157
174
|
end
|
158
175
|
|
@@ -1414,9 +1431,9 @@ module Google
|
|
1414
1431
|
# end
|
1415
1432
|
#
|
1416
1433
|
# @!attribute [rw] endpoint
|
1417
|
-
#
|
1418
|
-
#
|
1419
|
-
# @return [::String]
|
1434
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
1435
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
1436
|
+
# @return [::String,nil]
|
1420
1437
|
# @!attribute [rw] credentials
|
1421
1438
|
# Credentials to send with calls. You may provide any of the following types:
|
1422
1439
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -1462,13 +1479,20 @@ module Google
|
|
1462
1479
|
# @!attribute [rw] quota_project
|
1463
1480
|
# A separate project against which to charge quota.
|
1464
1481
|
# @return [::String]
|
1482
|
+
# @!attribute [rw] universe_domain
|
1483
|
+
# The universe domain within which to make requests. This determines the
|
1484
|
+
# default endpoint URL. The default value of nil uses the environment
|
1485
|
+
# universe (usually the default "googleapis.com" universe).
|
1486
|
+
# @return [::String,nil]
|
1465
1487
|
#
|
1466
1488
|
class Configuration
|
1467
1489
|
extend ::Gapic::Config
|
1468
1490
|
|
1491
|
+
# @private
|
1492
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
1469
1493
|
DEFAULT_ENDPOINT = "osconfig.googleapis.com"
|
1470
1494
|
|
1471
|
-
config_attr :endpoint,
|
1495
|
+
config_attr :endpoint, nil, ::String, nil
|
1472
1496
|
config_attr :credentials, nil do |value|
|
1473
1497
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1474
1498
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -1483,6 +1507,7 @@ module Google
|
|
1483
1507
|
config_attr :metadata, nil, ::Hash, nil
|
1484
1508
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1485
1509
|
config_attr :quota_project, nil, ::String, nil
|
1510
|
+
config_attr :universe_domain, nil, ::String, nil
|
1486
1511
|
|
1487
1512
|
# @private
|
1488
1513
|
def initialize parent_config = nil
|
@@ -1503,6 +1528,14 @@ module Google
|
|
1503
1528
|
end
|
1504
1529
|
end
|
1505
1530
|
|
1531
|
+
##
|
1532
|
+
# Configuration for the channel pool
|
1533
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
1534
|
+
#
|
1535
|
+
def channel_pool
|
1536
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
1537
|
+
end
|
1538
|
+
|
1506
1539
|
##
|
1507
1540
|
# Configuration RPC class for the OsConfigZonalService API.
|
1508
1541
|
#
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module OsConfigZonalService
|
27
27
|
# Service that implements Longrunning Operations API.
|
28
28
|
class Operations
|
29
|
+
# @private
|
30
|
+
DEFAULT_ENDPOINT_TEMPLATE = "osconfig.$UNIVERSE_DOMAIN$"
|
31
|
+
|
29
32
|
# @private
|
30
33
|
attr_reader :operations_stub
|
31
34
|
|
@@ -60,6 +63,15 @@ module Google
|
|
60
63
|
@config
|
61
64
|
end
|
62
65
|
|
66
|
+
##
|
67
|
+
# The effective universe domain
|
68
|
+
#
|
69
|
+
# @return [String]
|
70
|
+
#
|
71
|
+
def universe_domain
|
72
|
+
@operations_stub.universe_domain
|
73
|
+
end
|
74
|
+
|
63
75
|
##
|
64
76
|
# Create a new Operations client object.
|
65
77
|
#
|
@@ -90,10 +102,13 @@ module Google
|
|
90
102
|
|
91
103
|
@operations_stub = ::Gapic::ServiceStub.new(
|
92
104
|
::Google::Longrunning::Operations::Stub,
|
93
|
-
credentials:
|
94
|
-
endpoint:
|
105
|
+
credentials: credentials,
|
106
|
+
endpoint: @config.endpoint,
|
107
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
108
|
+
universe_domain: @config.universe_domain,
|
95
109
|
channel_args: @config.channel_args,
|
96
|
-
interceptors: @config.interceptors
|
110
|
+
interceptors: @config.interceptors,
|
111
|
+
channel_pool_config: @config.channel_pool
|
97
112
|
)
|
98
113
|
|
99
114
|
# Used by an LRO wrapper for some methods of this service
|
@@ -612,9 +627,9 @@ module Google
|
|
612
627
|
# end
|
613
628
|
#
|
614
629
|
# @!attribute [rw] endpoint
|
615
|
-
#
|
616
|
-
#
|
617
|
-
# @return [::String]
|
630
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
631
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
632
|
+
# @return [::String,nil]
|
618
633
|
# @!attribute [rw] credentials
|
619
634
|
# Credentials to send with calls. You may provide any of the following types:
|
620
635
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -660,13 +675,20 @@ module Google
|
|
660
675
|
# @!attribute [rw] quota_project
|
661
676
|
# A separate project against which to charge quota.
|
662
677
|
# @return [::String]
|
678
|
+
# @!attribute [rw] universe_domain
|
679
|
+
# The universe domain within which to make requests. This determines the
|
680
|
+
# default endpoint URL. The default value of nil uses the environment
|
681
|
+
# universe (usually the default "googleapis.com" universe).
|
682
|
+
# @return [::String,nil]
|
663
683
|
#
|
664
684
|
class Configuration
|
665
685
|
extend ::Gapic::Config
|
666
686
|
|
687
|
+
# @private
|
688
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
667
689
|
DEFAULT_ENDPOINT = "osconfig.googleapis.com"
|
668
690
|
|
669
|
-
config_attr :endpoint,
|
691
|
+
config_attr :endpoint, nil, ::String, nil
|
670
692
|
config_attr :credentials, nil do |value|
|
671
693
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
672
694
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -681,6 +703,7 @@ module Google
|
|
681
703
|
config_attr :metadata, nil, ::Hash, nil
|
682
704
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
683
705
|
config_attr :quota_project, nil, ::String, nil
|
706
|
+
config_attr :universe_domain, nil, ::String, nil
|
684
707
|
|
685
708
|
# @private
|
686
709
|
def initialize parent_config = nil
|
@@ -701,6 +724,14 @@ module Google
|
|
701
724
|
end
|
702
725
|
end
|
703
726
|
|
727
|
+
##
|
728
|
+
# Configuration for the channel pool
|
729
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
730
|
+
#
|
731
|
+
def channel_pool
|
732
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
733
|
+
end
|
734
|
+
|
704
735
|
##
|
705
736
|
# Configuration RPC class for the Operations API.
|
706
737
|
#
|