google-cloud-app_engine-v1 0.2.0 → 0.3.3
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/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/appengine/v1/instance_pb.rb +15 -0
- data/lib/google/appengine/v1/location_pb.rb +2 -0
- data/lib/google/appengine/v1/network_settings_pb.rb +11 -0
- data/lib/google/appengine/v1/operation_pb.rb +1 -0
- data/lib/google/appengine/v1/service_pb.rb +2 -0
- data/lib/google/appengine/v1/version_pb.rb +4 -0
- data/lib/google/cloud/app_engine/v1/applications/client.rb +42 -41
- data/lib/google/cloud/app_engine/v1/applications/operations.rb +34 -25
- data/lib/google/cloud/app_engine/v1/authorized_certificates/client.rb +45 -42
- data/lib/google/cloud/app_engine/v1/authorized_domains/client.rb +33 -38
- data/lib/google/cloud/app_engine/v1/domain_mappings/client.rb +45 -42
- data/lib/google/cloud/app_engine/v1/domain_mappings/operations.rb +34 -25
- data/lib/google/cloud/app_engine/v1/firewall/client.rb +48 -43
- data/lib/google/cloud/app_engine/v1/instances/client.rb +42 -41
- data/lib/google/cloud/app_engine/v1/instances/operations.rb +34 -25
- data/lib/google/cloud/app_engine/v1/services/client.rb +42 -41
- data/lib/google/cloud/app_engine/v1/services/operations.rb +34 -25
- data/lib/google/cloud/app_engine/v1/version.rb +1 -1
- data/lib/google/cloud/app_engine/v1/versions/client.rb +45 -42
- data/lib/google/cloud/app_engine/v1/versions/operations.rb +34 -25
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/appengine/v1/instance.rb +71 -32
- data/proto_docs/google/appengine/v1/location.rb +4 -0
- data/proto_docs/google/appengine/v1/network_settings.rb +51 -0
- data/proto_docs/google/appengine/v1/service.rb +3 -0
- data/proto_docs/google/appengine/v1/version.rb +26 -1
- metadata +15 -7
@@ -48,13 +48,12 @@ module Google
|
|
48
48
|
# See {::Google::Cloud::AppEngine::V1::Firewall::Client::Configuration}
|
49
49
|
# for a description of the configuration fields.
|
50
50
|
#
|
51
|
-
#
|
51
|
+
# @example
|
52
52
|
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
# end
|
53
|
+
# # Modify the configuration for all Firewall clients
|
54
|
+
# ::Google::Cloud::AppEngine::V1::Firewall::Client.configure do |config|
|
55
|
+
# config.timeout = 10.0
|
56
|
+
# end
|
58
57
|
#
|
59
58
|
# @yield [config] Configure the Client client.
|
60
59
|
# @yieldparam config [Client::Configuration]
|
@@ -101,19 +100,15 @@ module Google
|
|
101
100
|
##
|
102
101
|
# Create a new Firewall client object.
|
103
102
|
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
# To create a new Firewall client with the default
|
107
|
-
# configuration:
|
103
|
+
# @example
|
108
104
|
#
|
109
|
-
#
|
105
|
+
# # Create a client using the default configuration
|
106
|
+
# client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new
|
110
107
|
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
# config.timeout = 10.0
|
116
|
-
# end
|
108
|
+
# # Create a client using a custom configuration
|
109
|
+
# client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config|
|
110
|
+
# config.timeout = 10.0
|
111
|
+
# end
|
117
112
|
#
|
118
113
|
# @yield [config] Configure the Firewall client.
|
119
114
|
# @yieldparam config [Client::Configuration]
|
@@ -133,14 +128,13 @@ module Google
|
|
133
128
|
|
134
129
|
# Create credentials
|
135
130
|
credentials = @config.credentials
|
136
|
-
# Use self-signed JWT if the
|
131
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
137
132
|
# but only if the default endpoint does not have a region prefix.
|
138
|
-
enable_self_signed_jwt = @config.
|
139
|
-
@config.endpoint == Client.configure.endpoint &&
|
133
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
140
134
|
!@config.endpoint.split(".").first.include?("-")
|
141
135
|
credentials ||= Credentials.default scope: @config.scope,
|
142
136
|
enable_self_signed_jwt: enable_self_signed_jwt
|
143
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
137
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
144
138
|
credentials = Credentials.new credentials, scope: @config.scope
|
145
139
|
end
|
146
140
|
@quota_project_id = @config.quota_project
|
@@ -221,7 +215,9 @@ module Google
|
|
221
215
|
options.apply_defaults timeout: @config.rpcs.list_ingress_rules.timeout,
|
222
216
|
metadata: metadata,
|
223
217
|
retry_policy: @config.rpcs.list_ingress_rules.retry_policy
|
224
|
-
|
218
|
+
|
219
|
+
options.apply_defaults timeout: @config.timeout,
|
220
|
+
metadata: @config.metadata,
|
225
221
|
retry_policy: @config.retry_policy
|
226
222
|
|
227
223
|
@firewall_stub.call_rpc :list_ingress_rules, request, options: options do |response, operation|
|
@@ -295,7 +291,9 @@ module Google
|
|
295
291
|
options.apply_defaults timeout: @config.rpcs.batch_update_ingress_rules.timeout,
|
296
292
|
metadata: metadata,
|
297
293
|
retry_policy: @config.rpcs.batch_update_ingress_rules.retry_policy
|
298
|
-
|
294
|
+
|
295
|
+
options.apply_defaults timeout: @config.timeout,
|
296
|
+
metadata: @config.metadata,
|
299
297
|
retry_policy: @config.retry_policy
|
300
298
|
|
301
299
|
@firewall_stub.call_rpc :batch_update_ingress_rules, request, options: options do |response, operation|
|
@@ -373,7 +371,9 @@ module Google
|
|
373
371
|
options.apply_defaults timeout: @config.rpcs.create_ingress_rule.timeout,
|
374
372
|
metadata: metadata,
|
375
373
|
retry_policy: @config.rpcs.create_ingress_rule.retry_policy
|
376
|
-
|
374
|
+
|
375
|
+
options.apply_defaults timeout: @config.timeout,
|
376
|
+
metadata: @config.metadata,
|
377
377
|
retry_policy: @config.retry_policy
|
378
378
|
|
379
379
|
@firewall_stub.call_rpc :create_ingress_rule, request, options: options do |response, operation|
|
@@ -440,7 +440,9 @@ module Google
|
|
440
440
|
options.apply_defaults timeout: @config.rpcs.get_ingress_rule.timeout,
|
441
441
|
metadata: metadata,
|
442
442
|
retry_policy: @config.rpcs.get_ingress_rule.retry_policy
|
443
|
-
|
443
|
+
|
444
|
+
options.apply_defaults timeout: @config.timeout,
|
445
|
+
metadata: @config.metadata,
|
444
446
|
retry_policy: @config.retry_policy
|
445
447
|
|
446
448
|
@firewall_stub.call_rpc :get_ingress_rule, request, options: options do |response, operation|
|
@@ -511,7 +513,9 @@ module Google
|
|
511
513
|
options.apply_defaults timeout: @config.rpcs.update_ingress_rule.timeout,
|
512
514
|
metadata: metadata,
|
513
515
|
retry_policy: @config.rpcs.update_ingress_rule.retry_policy
|
514
|
-
|
516
|
+
|
517
|
+
options.apply_defaults timeout: @config.timeout,
|
518
|
+
metadata: @config.metadata,
|
515
519
|
retry_policy: @config.retry_policy
|
516
520
|
|
517
521
|
@firewall_stub.call_rpc :update_ingress_rule, request, options: options do |response, operation|
|
@@ -578,7 +582,9 @@ module Google
|
|
578
582
|
options.apply_defaults timeout: @config.rpcs.delete_ingress_rule.timeout,
|
579
583
|
metadata: metadata,
|
580
584
|
retry_policy: @config.rpcs.delete_ingress_rule.retry_policy
|
581
|
-
|
585
|
+
|
586
|
+
options.apply_defaults timeout: @config.timeout,
|
587
|
+
metadata: @config.metadata,
|
582
588
|
retry_policy: @config.retry_policy
|
583
589
|
|
584
590
|
@firewall_stub.call_rpc :delete_ingress_rule, request, options: options do |response, operation|
|
@@ -602,22 +608,21 @@ module Google
|
|
602
608
|
# Configuration can be applied globally to all clients, or to a single client
|
603
609
|
# on construction.
|
604
610
|
#
|
605
|
-
#
|
606
|
-
#
|
607
|
-
#
|
608
|
-
# to 20 seconds,
|
609
|
-
#
|
610
|
-
#
|
611
|
-
#
|
612
|
-
#
|
613
|
-
#
|
614
|
-
#
|
615
|
-
#
|
616
|
-
#
|
617
|
-
#
|
618
|
-
#
|
619
|
-
#
|
620
|
-
# end
|
611
|
+
# @example
|
612
|
+
#
|
613
|
+
# # Modify the global config, setting the timeout for
|
614
|
+
# # list_ingress_rules to 20 seconds,
|
615
|
+
# # and all remaining timeouts to 10 seconds.
|
616
|
+
# ::Google::Cloud::AppEngine::V1::Firewall::Client.configure do |config|
|
617
|
+
# config.timeout = 10.0
|
618
|
+
# config.rpcs.list_ingress_rules.timeout = 20.0
|
619
|
+
# end
|
620
|
+
#
|
621
|
+
# # Apply the above configuration only to a new client.
|
622
|
+
# client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config|
|
623
|
+
# config.timeout = 10.0
|
624
|
+
# config.rpcs.list_ingress_rules.timeout = 20.0
|
625
|
+
# end
|
621
626
|
#
|
622
627
|
# @!attribute [rw] endpoint
|
623
628
|
# The hostname or hostname:port of the service endpoint.
|
@@ -39,13 +39,12 @@ module Google
|
|
39
39
|
# See {::Google::Cloud::AppEngine::V1::Instances::Client::Configuration}
|
40
40
|
# for a description of the configuration fields.
|
41
41
|
#
|
42
|
-
#
|
42
|
+
# @example
|
43
43
|
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
# end
|
44
|
+
# # Modify the configuration for all Instances clients
|
45
|
+
# ::Google::Cloud::AppEngine::V1::Instances::Client.configure do |config|
|
46
|
+
# config.timeout = 10.0
|
47
|
+
# end
|
49
48
|
#
|
50
49
|
# @yield [config] Configure the Client client.
|
51
50
|
# @yieldparam config [Client::Configuration]
|
@@ -92,19 +91,15 @@ module Google
|
|
92
91
|
##
|
93
92
|
# Create a new Instances client object.
|
94
93
|
#
|
95
|
-
#
|
96
|
-
#
|
97
|
-
# To create a new Instances client with the default
|
98
|
-
# configuration:
|
99
|
-
#
|
100
|
-
# client = ::Google::Cloud::AppEngine::V1::Instances::Client.new
|
94
|
+
# @example
|
101
95
|
#
|
102
|
-
#
|
103
|
-
#
|
96
|
+
# # Create a client using the default configuration
|
97
|
+
# client = ::Google::Cloud::AppEngine::V1::Instances::Client.new
|
104
98
|
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
99
|
+
# # Create a client using a custom configuration
|
100
|
+
# client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config|
|
101
|
+
# config.timeout = 10.0
|
102
|
+
# end
|
108
103
|
#
|
109
104
|
# @yield [config] Configure the Instances client.
|
110
105
|
# @yieldparam config [Client::Configuration]
|
@@ -124,14 +119,13 @@ module Google
|
|
124
119
|
|
125
120
|
# Create credentials
|
126
121
|
credentials = @config.credentials
|
127
|
-
# Use self-signed JWT if the
|
122
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
128
123
|
# but only if the default endpoint does not have a region prefix.
|
129
|
-
enable_self_signed_jwt = @config.
|
130
|
-
@config.endpoint == Client.configure.endpoint &&
|
124
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
131
125
|
!@config.endpoint.split(".").first.include?("-")
|
132
126
|
credentials ||= Credentials.default scope: @config.scope,
|
133
127
|
enable_self_signed_jwt: enable_self_signed_jwt
|
134
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
128
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
135
129
|
credentials = Credentials.new credentials, scope: @config.scope
|
136
130
|
end
|
137
131
|
@quota_project_id = @config.quota_project
|
@@ -223,7 +217,9 @@ module Google
|
|
223
217
|
options.apply_defaults timeout: @config.rpcs.list_instances.timeout,
|
224
218
|
metadata: metadata,
|
225
219
|
retry_policy: @config.rpcs.list_instances.retry_policy
|
226
|
-
|
220
|
+
|
221
|
+
options.apply_defaults timeout: @config.timeout,
|
222
|
+
metadata: @config.metadata,
|
227
223
|
retry_policy: @config.retry_policy
|
228
224
|
|
229
225
|
@instances_stub.call_rpc :list_instances, request, options: options do |response, operation|
|
@@ -291,7 +287,9 @@ module Google
|
|
291
287
|
options.apply_defaults timeout: @config.rpcs.get_instance.timeout,
|
292
288
|
metadata: metadata,
|
293
289
|
retry_policy: @config.rpcs.get_instance.retry_policy
|
294
|
-
|
290
|
+
|
291
|
+
options.apply_defaults timeout: @config.timeout,
|
292
|
+
metadata: @config.metadata,
|
295
293
|
retry_policy: @config.retry_policy
|
296
294
|
|
297
295
|
@instances_stub.call_rpc :get_instance, request, options: options do |response, operation|
|
@@ -369,7 +367,9 @@ module Google
|
|
369
367
|
options.apply_defaults timeout: @config.rpcs.delete_instance.timeout,
|
370
368
|
metadata: metadata,
|
371
369
|
retry_policy: @config.rpcs.delete_instance.retry_policy
|
372
|
-
|
370
|
+
|
371
|
+
options.apply_defaults timeout: @config.timeout,
|
372
|
+
metadata: @config.metadata,
|
373
373
|
retry_policy: @config.retry_policy
|
374
374
|
|
375
375
|
@instances_stub.call_rpc :delete_instance, request, options: options do |response, operation|
|
@@ -452,7 +452,9 @@ module Google
|
|
452
452
|
options.apply_defaults timeout: @config.rpcs.debug_instance.timeout,
|
453
453
|
metadata: metadata,
|
454
454
|
retry_policy: @config.rpcs.debug_instance.retry_policy
|
455
|
-
|
455
|
+
|
456
|
+
options.apply_defaults timeout: @config.timeout,
|
457
|
+
metadata: @config.metadata,
|
456
458
|
retry_policy: @config.retry_policy
|
457
459
|
|
458
460
|
@instances_stub.call_rpc :debug_instance, request, options: options do |response, operation|
|
@@ -477,22 +479,21 @@ module Google
|
|
477
479
|
# Configuration can be applied globally to all clients, or to a single client
|
478
480
|
# on construction.
|
479
481
|
#
|
480
|
-
#
|
481
|
-
#
|
482
|
-
#
|
483
|
-
# to 20 seconds,
|
484
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
#
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
# end
|
482
|
+
# @example
|
483
|
+
#
|
484
|
+
# # Modify the global config, setting the timeout for
|
485
|
+
# # list_instances to 20 seconds,
|
486
|
+
# # and all remaining timeouts to 10 seconds.
|
487
|
+
# ::Google::Cloud::AppEngine::V1::Instances::Client.configure do |config|
|
488
|
+
# config.timeout = 10.0
|
489
|
+
# config.rpcs.list_instances.timeout = 20.0
|
490
|
+
# end
|
491
|
+
#
|
492
|
+
# # Apply the above configuration only to a new client.
|
493
|
+
# client = ::Google::Cloud::AppEngine::V1::Instances::Client.new do |config|
|
494
|
+
# config.timeout = 10.0
|
495
|
+
# config.rpcs.list_instances.timeout = 20.0
|
496
|
+
# end
|
496
497
|
#
|
497
498
|
# @!attribute [rw] endpoint
|
498
499
|
# The hostname or hostname:port of the service endpoint.
|
@@ -82,7 +82,7 @@ module Google
|
|
82
82
|
# Create credentials
|
83
83
|
credentials = @config.credentials
|
84
84
|
credentials ||= Credentials.default scope: @config.scope
|
85
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
85
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
88
|
@quota_project_id = @config.quota_project
|
@@ -169,7 +169,9 @@ module Google
|
|
169
169
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
170
170
|
metadata: metadata,
|
171
171
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
172
|
-
|
172
|
+
|
173
|
+
options.apply_defaults timeout: @config.timeout,
|
174
|
+
metadata: @config.metadata,
|
173
175
|
retry_policy: @config.retry_policy
|
174
176
|
|
175
177
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
@@ -239,7 +241,9 @@ module Google
|
|
239
241
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
240
242
|
metadata: metadata,
|
241
243
|
retry_policy: @config.rpcs.get_operation.retry_policy
|
242
|
-
|
244
|
+
|
245
|
+
options.apply_defaults timeout: @config.timeout,
|
246
|
+
metadata: @config.metadata,
|
243
247
|
retry_policy: @config.retry_policy
|
244
248
|
|
245
249
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
@@ -309,7 +313,9 @@ module Google
|
|
309
313
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
310
314
|
metadata: metadata,
|
311
315
|
retry_policy: @config.rpcs.delete_operation.retry_policy
|
312
|
-
|
316
|
+
|
317
|
+
options.apply_defaults timeout: @config.timeout,
|
318
|
+
metadata: @config.metadata,
|
313
319
|
retry_policy: @config.retry_policy
|
314
320
|
|
315
321
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
@@ -384,7 +390,9 @@ module Google
|
|
384
390
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
385
391
|
metadata: metadata,
|
386
392
|
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
387
|
-
|
393
|
+
|
394
|
+
options.apply_defaults timeout: @config.timeout,
|
395
|
+
metadata: @config.metadata,
|
388
396
|
retry_policy: @config.retry_policy
|
389
397
|
|
390
398
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
@@ -396,9 +404,9 @@ module Google
|
|
396
404
|
end
|
397
405
|
|
398
406
|
##
|
399
|
-
# Waits
|
400
|
-
#
|
401
|
-
#
|
407
|
+
# Waits until the specified long-running operation is done or reaches at most
|
408
|
+
# a specified timeout, returning the latest state. If the operation is
|
409
|
+
# already done, the latest state is immediately returned. If the timeout
|
402
410
|
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
403
411
|
# timeout is used. If the server does not support this method, it returns
|
404
412
|
# `google.rpc.Code.UNIMPLEMENTED`.
|
@@ -456,7 +464,9 @@ module Google
|
|
456
464
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
457
465
|
metadata: metadata,
|
458
466
|
retry_policy: @config.rpcs.wait_operation.retry_policy
|
459
|
-
|
467
|
+
|
468
|
+
options.apply_defaults timeout: @config.timeout,
|
469
|
+
metadata: @config.metadata,
|
460
470
|
retry_policy: @config.retry_policy
|
461
471
|
|
462
472
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
@@ -481,22 +491,21 @@ module Google
|
|
481
491
|
# Configuration can be applied globally to all clients, or to a single client
|
482
492
|
# on construction.
|
483
493
|
#
|
484
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
# to 20 seconds,
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
# end
|
494
|
+
# @example
|
495
|
+
#
|
496
|
+
# # Modify the global config, setting the timeout for
|
497
|
+
# # list_operations to 20 seconds,
|
498
|
+
# # and all remaining timeouts to 10 seconds.
|
499
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
500
|
+
# config.timeout = 10.0
|
501
|
+
# config.rpcs.list_operations.timeout = 20.0
|
502
|
+
# end
|
503
|
+
#
|
504
|
+
# # Apply the above configuration only to a new client.
|
505
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
506
|
+
# config.timeout = 10.0
|
507
|
+
# config.rpcs.list_operations.timeout = 20.0
|
508
|
+
# end
|
500
509
|
#
|
501
510
|
# @!attribute [rw] endpoint
|
502
511
|
# The hostname or hostname:port of the service endpoint.
|
@@ -39,13 +39,12 @@ module Google
|
|
39
39
|
# See {::Google::Cloud::AppEngine::V1::Services::Client::Configuration}
|
40
40
|
# for a description of the configuration fields.
|
41
41
|
#
|
42
|
-
#
|
42
|
+
# @example
|
43
43
|
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
# end
|
44
|
+
# # Modify the configuration for all Services clients
|
45
|
+
# ::Google::Cloud::AppEngine::V1::Services::Client.configure do |config|
|
46
|
+
# config.timeout = 10.0
|
47
|
+
# end
|
49
48
|
#
|
50
49
|
# @yield [config] Configure the Client client.
|
51
50
|
# @yieldparam config [Client::Configuration]
|
@@ -92,19 +91,15 @@ module Google
|
|
92
91
|
##
|
93
92
|
# Create a new Services client object.
|
94
93
|
#
|
95
|
-
#
|
96
|
-
#
|
97
|
-
# To create a new Services client with the default
|
98
|
-
# configuration:
|
99
|
-
#
|
100
|
-
# client = ::Google::Cloud::AppEngine::V1::Services::Client.new
|
94
|
+
# @example
|
101
95
|
#
|
102
|
-
#
|
103
|
-
#
|
96
|
+
# # Create a client using the default configuration
|
97
|
+
# client = ::Google::Cloud::AppEngine::V1::Services::Client.new
|
104
98
|
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
99
|
+
# # Create a client using a custom configuration
|
100
|
+
# client = ::Google::Cloud::AppEngine::V1::Services::Client.new do |config|
|
101
|
+
# config.timeout = 10.0
|
102
|
+
# end
|
108
103
|
#
|
109
104
|
# @yield [config] Configure the Services client.
|
110
105
|
# @yieldparam config [Client::Configuration]
|
@@ -124,14 +119,13 @@ module Google
|
|
124
119
|
|
125
120
|
# Create credentials
|
126
121
|
credentials = @config.credentials
|
127
|
-
# Use self-signed JWT if the
|
122
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
128
123
|
# but only if the default endpoint does not have a region prefix.
|
129
|
-
enable_self_signed_jwt = @config.
|
130
|
-
@config.endpoint == Client.configure.endpoint &&
|
124
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
131
125
|
!@config.endpoint.split(".").first.include?("-")
|
132
126
|
credentials ||= Credentials.default scope: @config.scope,
|
133
127
|
enable_self_signed_jwt: enable_self_signed_jwt
|
134
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
128
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
135
129
|
credentials = Credentials.new credentials, scope: @config.scope
|
136
130
|
end
|
137
131
|
@quota_project_id = @config.quota_project
|
@@ -219,7 +213,9 @@ module Google
|
|
219
213
|
options.apply_defaults timeout: @config.rpcs.list_services.timeout,
|
220
214
|
metadata: metadata,
|
221
215
|
retry_policy: @config.rpcs.list_services.retry_policy
|
222
|
-
|
216
|
+
|
217
|
+
options.apply_defaults timeout: @config.timeout,
|
218
|
+
metadata: @config.metadata,
|
223
219
|
retry_policy: @config.retry_policy
|
224
220
|
|
225
221
|
@services_stub.call_rpc :list_services, request, options: options do |response, operation|
|
@@ -286,7 +282,9 @@ module Google
|
|
286
282
|
options.apply_defaults timeout: @config.rpcs.get_service.timeout,
|
287
283
|
metadata: metadata,
|
288
284
|
retry_policy: @config.rpcs.get_service.retry_policy
|
289
|
-
|
285
|
+
|
286
|
+
options.apply_defaults timeout: @config.timeout,
|
287
|
+
metadata: @config.metadata,
|
290
288
|
retry_policy: @config.retry_policy
|
291
289
|
|
292
290
|
@services_stub.call_rpc :get_service, request, options: options do |response, operation|
|
@@ -370,7 +368,9 @@ module Google
|
|
370
368
|
options.apply_defaults timeout: @config.rpcs.update_service.timeout,
|
371
369
|
metadata: metadata,
|
372
370
|
retry_policy: @config.rpcs.update_service.retry_policy
|
373
|
-
|
371
|
+
|
372
|
+
options.apply_defaults timeout: @config.timeout,
|
373
|
+
metadata: @config.metadata,
|
374
374
|
retry_policy: @config.retry_policy
|
375
375
|
|
376
376
|
@services_stub.call_rpc :update_service, request, options: options do |response, operation|
|
@@ -437,7 +437,9 @@ module Google
|
|
437
437
|
options.apply_defaults timeout: @config.rpcs.delete_service.timeout,
|
438
438
|
metadata: metadata,
|
439
439
|
retry_policy: @config.rpcs.delete_service.retry_policy
|
440
|
-
|
440
|
+
|
441
|
+
options.apply_defaults timeout: @config.timeout,
|
442
|
+
metadata: @config.metadata,
|
441
443
|
retry_policy: @config.retry_policy
|
442
444
|
|
443
445
|
@services_stub.call_rpc :delete_service, request, options: options do |response, operation|
|
@@ -462,22 +464,21 @@ module Google
|
|
462
464
|
# Configuration can be applied globally to all clients, or to a single client
|
463
465
|
# on construction.
|
464
466
|
#
|
465
|
-
#
|
466
|
-
#
|
467
|
-
#
|
468
|
-
# to 20 seconds,
|
469
|
-
#
|
470
|
-
#
|
471
|
-
#
|
472
|
-
#
|
473
|
-
#
|
474
|
-
#
|
475
|
-
#
|
476
|
-
#
|
477
|
-
#
|
478
|
-
#
|
479
|
-
#
|
480
|
-
# end
|
467
|
+
# @example
|
468
|
+
#
|
469
|
+
# # Modify the global config, setting the timeout for
|
470
|
+
# # list_services to 20 seconds,
|
471
|
+
# # and all remaining timeouts to 10 seconds.
|
472
|
+
# ::Google::Cloud::AppEngine::V1::Services::Client.configure do |config|
|
473
|
+
# config.timeout = 10.0
|
474
|
+
# config.rpcs.list_services.timeout = 20.0
|
475
|
+
# end
|
476
|
+
#
|
477
|
+
# # Apply the above configuration only to a new client.
|
478
|
+
# client = ::Google::Cloud::AppEngine::V1::Services::Client.new do |config|
|
479
|
+
# config.timeout = 10.0
|
480
|
+
# config.rpcs.list_services.timeout = 20.0
|
481
|
+
# end
|
481
482
|
#
|
482
483
|
# @!attribute [rw] endpoint
|
483
484
|
# The hostname or hostname:port of the service endpoint.
|