google-cloud-os_config-v1alpha 0.9.1 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -21
- data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/client.rb +43 -15
- data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/operations.rb +19 -15
- data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/rest/client.rb +43 -15
- data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/rest/operations.rb +50 -38
- data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/rest/service_stub.rb +126 -86
- data/lib/google/cloud/os_config/v1alpha/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/cloud/osconfig/v1alpha/inventory.rb +22 -0
- data/proto_docs/google/cloud/osconfig/v1alpha/os_policy.rb +44 -0
- data/proto_docs/google/cloud/osconfig/v1alpha/osconfig_common.rb +4 -0
- data/proto_docs/google/longrunning/operations.rb +23 -14
- metadata +6 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e856eaad55af89232e615b2f2b37a7685b6d11dc64c9123bcc1abedefb2ada14
|
4
|
+
data.tar.gz: c1cc05d390e0cc6eb1550f32677d2418ea9b02ff1a0d9a83d2242e6b69b90810
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 396678bc9fcca161b7bc920fb2bdc1676084fe6830c6abb23acd7ae15e5f2e99f53530ff6072df9d1bff947ac673758dda6825fac0706c2a7e2d21d4420d5217
|
7
|
+
data.tar.gz: 9eeac1bf75c9b708da20ea8f82bece82d29202456a33315bd4552f84acdcf64114787494933beba24dcd39f5218ccc74845e975e5b53356fcfc5d142f5fdd8fa
|
data/README.md
CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/compute/docs/manage-os)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/cloud/os_config/v1alpha"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Cloud::OsConfig::V1alpha::OsConfigZonalService::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
76
86
|
|
77
87
|
## Supported Ruby Versions
|
78
88
|
|
79
|
-
This library is supported on Ruby
|
89
|
+
This library is supported on Ruby 3.0+.
|
80
90
|
|
81
91
|
Google provides official support for Ruby versions that are actively supported
|
82
92
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -172,8 +172,19 @@ module Google
|
|
172
172
|
universe_domain: @config.universe_domain,
|
173
173
|
channel_args: @config.channel_args,
|
174
174
|
interceptors: @config.interceptors,
|
175
|
-
channel_pool_config: @config.channel_pool
|
175
|
+
channel_pool_config: @config.channel_pool,
|
176
|
+
logger: @config.logger
|
176
177
|
)
|
178
|
+
|
179
|
+
@os_config_zonal_service_stub.stub_logger&.info do |entry|
|
180
|
+
entry.set_system_name
|
181
|
+
entry.set_service
|
182
|
+
entry.message = "Created client for #{entry.service}"
|
183
|
+
entry.set_credentials_fields credentials
|
184
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
185
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
186
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
187
|
+
end
|
177
188
|
end
|
178
189
|
|
179
190
|
##
|
@@ -183,6 +194,15 @@ module Google
|
|
183
194
|
#
|
184
195
|
attr_reader :operations_client
|
185
196
|
|
197
|
+
##
|
198
|
+
# The logger used for request/response debug logging.
|
199
|
+
#
|
200
|
+
# @return [Logger]
|
201
|
+
#
|
202
|
+
def logger
|
203
|
+
@os_config_zonal_service_stub.logger
|
204
|
+
end
|
205
|
+
|
186
206
|
# Service calls
|
187
207
|
|
188
208
|
##
|
@@ -293,7 +313,7 @@ module Google
|
|
293
313
|
@os_config_zonal_service_stub.call_rpc :create_os_policy_assignment, request, options: options do |response, operation|
|
294
314
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
295
315
|
yield response, operation if block_given?
|
296
|
-
|
316
|
+
throw :response, response
|
297
317
|
end
|
298
318
|
rescue ::GRPC::BadStatus => e
|
299
319
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -397,7 +417,7 @@ module Google
|
|
397
417
|
@os_config_zonal_service_stub.call_rpc :update_os_policy_assignment, request, options: options do |response, operation|
|
398
418
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
399
419
|
yield response, operation if block_given?
|
400
|
-
|
420
|
+
throw :response, response
|
401
421
|
end
|
402
422
|
rescue ::GRPC::BadStatus => e
|
403
423
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -490,7 +510,6 @@ module Google
|
|
490
510
|
|
491
511
|
@os_config_zonal_service_stub.call_rpc :get_os_policy_assignment, request, options: options do |response, operation|
|
492
512
|
yield response, operation if block_given?
|
493
|
-
return response
|
494
513
|
end
|
495
514
|
rescue ::GRPC::BadStatus => e
|
496
515
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -589,7 +608,7 @@ module Google
|
|
589
608
|
@os_config_zonal_service_stub.call_rpc :list_os_policy_assignments, request, options: options do |response, operation|
|
590
609
|
response = ::Gapic::PagedEnumerable.new @os_config_zonal_service_stub, :list_os_policy_assignments, request, response, operation, options
|
591
610
|
yield response, operation if block_given?
|
592
|
-
|
611
|
+
throw :response, response
|
593
612
|
end
|
594
613
|
rescue ::GRPC::BadStatus => e
|
595
614
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -686,7 +705,7 @@ module Google
|
|
686
705
|
@os_config_zonal_service_stub.call_rpc :list_os_policy_assignment_revisions, request, options: options do |response, operation|
|
687
706
|
response = ::Gapic::PagedEnumerable.new @os_config_zonal_service_stub, :list_os_policy_assignment_revisions, request, response, operation, options
|
688
707
|
yield response, operation if block_given?
|
689
|
-
|
708
|
+
throw :response, response
|
690
709
|
end
|
691
710
|
rescue ::GRPC::BadStatus => e
|
692
711
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -791,7 +810,7 @@ module Google
|
|
791
810
|
@os_config_zonal_service_stub.call_rpc :delete_os_policy_assignment, request, options: options do |response, operation|
|
792
811
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
793
812
|
yield response, operation if block_given?
|
794
|
-
|
813
|
+
throw :response, response
|
795
814
|
end
|
796
815
|
rescue ::GRPC::BadStatus => e
|
797
816
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -888,7 +907,6 @@ module Google
|
|
888
907
|
|
889
908
|
@os_config_zonal_service_stub.call_rpc :get_instance_os_policies_compliance, request, options: options do |response, operation|
|
890
909
|
yield response, operation if block_given?
|
891
|
-
return response
|
892
910
|
end
|
893
911
|
rescue ::GRPC::BadStatus => e
|
894
912
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -996,7 +1014,7 @@ module Google
|
|
996
1014
|
@os_config_zonal_service_stub.call_rpc :list_instance_os_policies_compliances, request, options: options do |response, operation|
|
997
1015
|
response = ::Gapic::PagedEnumerable.new @os_config_zonal_service_stub, :list_instance_os_policies_compliances, request, response, operation, options
|
998
1016
|
yield response, operation if block_given?
|
999
|
-
|
1017
|
+
throw :response, response
|
1000
1018
|
end
|
1001
1019
|
rescue ::GRPC::BadStatus => e
|
1002
1020
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1091,7 +1109,6 @@ module Google
|
|
1091
1109
|
|
1092
1110
|
@os_config_zonal_service_stub.call_rpc :get_os_policy_assignment_report, request, options: options do |response, operation|
|
1093
1111
|
yield response, operation if block_given?
|
1094
|
-
return response
|
1095
1112
|
end
|
1096
1113
|
rescue ::GRPC::BadStatus => e
|
1097
1114
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1212,7 +1229,7 @@ module Google
|
|
1212
1229
|
@os_config_zonal_service_stub.call_rpc :list_os_policy_assignment_reports, request, options: options do |response, operation|
|
1213
1230
|
response = ::Gapic::PagedEnumerable.new @os_config_zonal_service_stub, :list_os_policy_assignment_reports, request, response, operation, options
|
1214
1231
|
yield response, operation if block_given?
|
1215
|
-
|
1232
|
+
throw :response, response
|
1216
1233
|
end
|
1217
1234
|
rescue ::GRPC::BadStatus => e
|
1218
1235
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1309,7 +1326,6 @@ module Google
|
|
1309
1326
|
|
1310
1327
|
@os_config_zonal_service_stub.call_rpc :get_inventory, request, options: options do |response, operation|
|
1311
1328
|
yield response, operation if block_given?
|
1312
|
-
return response
|
1313
1329
|
end
|
1314
1330
|
rescue ::GRPC::BadStatus => e
|
1315
1331
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1416,7 +1432,7 @@ module Google
|
|
1416
1432
|
@os_config_zonal_service_stub.call_rpc :list_inventories, request, options: options do |response, operation|
|
1417
1433
|
response = ::Gapic::PagedEnumerable.new @os_config_zonal_service_stub, :list_inventories, request, response, operation, options
|
1418
1434
|
yield response, operation if block_given?
|
1419
|
-
|
1435
|
+
throw :response, response
|
1420
1436
|
end
|
1421
1437
|
rescue ::GRPC::BadStatus => e
|
1422
1438
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1510,7 +1526,6 @@ module Google
|
|
1510
1526
|
|
1511
1527
|
@os_config_zonal_service_stub.call_rpc :get_vulnerability_report, request, options: options do |response, operation|
|
1512
1528
|
yield response, operation if block_given?
|
1513
|
-
return response
|
1514
1529
|
end
|
1515
1530
|
rescue ::GRPC::BadStatus => e
|
1516
1531
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1614,7 +1629,7 @@ module Google
|
|
1614
1629
|
@os_config_zonal_service_stub.call_rpc :list_vulnerability_reports, request, options: options do |response, operation|
|
1615
1630
|
response = ::Gapic::PagedEnumerable.new @os_config_zonal_service_stub, :list_vulnerability_reports, request, response, operation, options
|
1616
1631
|
yield response, operation if block_given?
|
1617
|
-
|
1632
|
+
throw :response, response
|
1618
1633
|
end
|
1619
1634
|
rescue ::GRPC::BadStatus => e
|
1620
1635
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1664,6 +1679,13 @@ module Google
|
|
1664
1679
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1665
1680
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1666
1681
|
# * (`nil`) indicating no credentials
|
1682
|
+
#
|
1683
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
1684
|
+
# external source for authentication to Google Cloud, you must validate it before
|
1685
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
1686
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
1687
|
+
# For more information, refer to [Validate credential configurations from external
|
1688
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
1667
1689
|
# @return [::Object]
|
1668
1690
|
# @!attribute [rw] scope
|
1669
1691
|
# The OAuth scopes
|
@@ -1703,6 +1725,11 @@ module Google
|
|
1703
1725
|
# default endpoint URL. The default value of nil uses the environment
|
1704
1726
|
# universe (usually the default "googleapis.com" universe).
|
1705
1727
|
# @return [::String,nil]
|
1728
|
+
# @!attribute [rw] logger
|
1729
|
+
# A custom logger to use for request/response debug logging, or the value
|
1730
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1731
|
+
# explicitly disable logging.
|
1732
|
+
# @return [::Logger,:default,nil]
|
1706
1733
|
#
|
1707
1734
|
class Configuration
|
1708
1735
|
extend ::Gapic::Config
|
@@ -1727,6 +1754,7 @@ module Google
|
|
1727
1754
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1728
1755
|
config_attr :quota_project, nil, ::String, nil
|
1729
1756
|
config_attr :universe_domain, nil, ::String, nil
|
1757
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1730
1758
|
|
1731
1759
|
# @private
|
1732
1760
|
def initialize parent_config = nil
|
@@ -124,14 +124,6 @@ module Google
|
|
124
124
|
# Lists operations that match the specified filter in the request. If the
|
125
125
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
126
126
|
#
|
127
|
-
# NOTE: the `name` binding allows API services to override the binding
|
128
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
129
|
-
# override the binding, API services can add a binding such as
|
130
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
131
|
-
# For backwards compatibility, the default name includes the operations
|
132
|
-
# collection id, however overriding users must ensure the name binding
|
133
|
-
# is the parent resource, without the operations collection id.
|
134
|
-
#
|
135
127
|
# @overload list_operations(request, options = nil)
|
136
128
|
# Pass arguments to `list_operations` via a request object, either of type
|
137
129
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -221,7 +213,7 @@ module Google
|
|
221
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
222
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
223
215
|
yield response, operation if block_given?
|
224
|
-
|
216
|
+
throw :response, response
|
225
217
|
end
|
226
218
|
rescue ::GRPC::BadStatus => e
|
227
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -317,7 +309,7 @@ module Google
|
|
317
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
318
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
319
311
|
yield response, operation if block_given?
|
320
|
-
|
312
|
+
throw :response, response
|
321
313
|
end
|
322
314
|
rescue ::GRPC::BadStatus => e
|
323
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -406,7 +398,6 @@ module Google
|
|
406
398
|
|
407
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
408
400
|
yield response, operation if block_given?
|
409
|
-
return response
|
410
401
|
end
|
411
402
|
rescue ::GRPC::BadStatus => e
|
412
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -421,8 +412,9 @@ module Google
|
|
421
412
|
# other methods to check whether the cancellation succeeded or whether the
|
422
413
|
# operation completed despite cancellation. On successful cancellation,
|
423
414
|
# the operation is not deleted; instead, it becomes an operation with
|
424
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
425
|
-
# corresponding to
|
415
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
416
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
417
|
+
# `Code.CANCELLED`.
|
426
418
|
#
|
427
419
|
# @overload cancel_operation(request, options = nil)
|
428
420
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -501,7 +493,6 @@ module Google
|
|
501
493
|
|
502
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
503
495
|
yield response, operation if block_given?
|
504
|
-
return response
|
505
496
|
end
|
506
497
|
rescue ::GRPC::BadStatus => e
|
507
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -599,7 +590,7 @@ module Google
|
|
599
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
600
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
601
592
|
yield response, operation if block_given?
|
602
|
-
|
593
|
+
throw :response, response
|
603
594
|
end
|
604
595
|
rescue ::GRPC::BadStatus => e
|
605
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -649,6 +640,13 @@ module Google
|
|
649
640
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
650
641
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
651
642
|
# * (`nil`) indicating no credentials
|
643
|
+
#
|
644
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
645
|
+
# external source for authentication to Google Cloud, you must validate it before
|
646
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
647
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
648
|
+
# For more information, refer to [Validate credential configurations from external
|
649
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
652
650
|
# @return [::Object]
|
653
651
|
# @!attribute [rw] scope
|
654
652
|
# The OAuth scopes
|
@@ -688,6 +686,11 @@ module Google
|
|
688
686
|
# default endpoint URL. The default value of nil uses the environment
|
689
687
|
# universe (usually the default "googleapis.com" universe).
|
690
688
|
# @return [::String,nil]
|
689
|
+
# @!attribute [rw] logger
|
690
|
+
# A custom logger to use for request/response debug logging, or the value
|
691
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
692
|
+
# explicitly disable logging.
|
693
|
+
# @return [::Logger,:default,nil]
|
691
694
|
#
|
692
695
|
class Configuration
|
693
696
|
extend ::Gapic::Config
|
@@ -712,6 +715,7 @@ module Google
|
|
712
715
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
713
716
|
config_attr :quota_project, nil, ::String, nil
|
714
717
|
config_attr :universe_domain, nil, ::String, nil
|
718
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
715
719
|
|
716
720
|
# @private
|
717
721
|
def initialize parent_config = nil
|
@@ -165,8 +165,19 @@ module Google
|
|
165
165
|
endpoint: @config.endpoint,
|
166
166
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
167
167
|
universe_domain: @config.universe_domain,
|
168
|
-
credentials: credentials
|
168
|
+
credentials: credentials,
|
169
|
+
logger: @config.logger
|
169
170
|
)
|
171
|
+
|
172
|
+
@os_config_zonal_service_stub.logger(stub: true)&.info do |entry|
|
173
|
+
entry.set_system_name
|
174
|
+
entry.set_service
|
175
|
+
entry.message = "Created client for #{entry.service}"
|
176
|
+
entry.set_credentials_fields credentials
|
177
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
178
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
179
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
180
|
+
end
|
170
181
|
end
|
171
182
|
|
172
183
|
##
|
@@ -176,6 +187,15 @@ module Google
|
|
176
187
|
#
|
177
188
|
attr_reader :operations_client
|
178
189
|
|
190
|
+
##
|
191
|
+
# The logger used for request/response debug logging.
|
192
|
+
#
|
193
|
+
# @return [Logger]
|
194
|
+
#
|
195
|
+
def logger
|
196
|
+
@os_config_zonal_service_stub.logger
|
197
|
+
end
|
198
|
+
|
179
199
|
# Service calls
|
180
200
|
|
181
201
|
##
|
@@ -279,7 +299,7 @@ module Google
|
|
279
299
|
@os_config_zonal_service_stub.create_os_policy_assignment request, options do |result, operation|
|
280
300
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
281
301
|
yield result, operation if block_given?
|
282
|
-
|
302
|
+
throw :response, result
|
283
303
|
end
|
284
304
|
rescue ::Gapic::Rest::Error => e
|
285
305
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -376,7 +396,7 @@ module Google
|
|
376
396
|
@os_config_zonal_service_stub.update_os_policy_assignment request, options do |result, operation|
|
377
397
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
378
398
|
yield result, operation if block_given?
|
379
|
-
|
399
|
+
throw :response, result
|
380
400
|
end
|
381
401
|
rescue ::Gapic::Rest::Error => e
|
382
402
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -462,7 +482,6 @@ module Google
|
|
462
482
|
|
463
483
|
@os_config_zonal_service_stub.get_os_policy_assignment request, options do |result, operation|
|
464
484
|
yield result, operation if block_given?
|
465
|
-
return result
|
466
485
|
end
|
467
486
|
rescue ::Gapic::Rest::Error => e
|
468
487
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -554,7 +573,7 @@ module Google
|
|
554
573
|
@os_config_zonal_service_stub.list_os_policy_assignments request, options do |result, operation|
|
555
574
|
result = ::Gapic::Rest::PagedEnumerable.new @os_config_zonal_service_stub, :list_os_policy_assignments, "os_policy_assignments", request, result, options
|
556
575
|
yield result, operation if block_given?
|
557
|
-
|
576
|
+
throw :response, result
|
558
577
|
end
|
559
578
|
rescue ::Gapic::Rest::Error => e
|
560
579
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -644,7 +663,7 @@ module Google
|
|
644
663
|
@os_config_zonal_service_stub.list_os_policy_assignment_revisions request, options do |result, operation|
|
645
664
|
result = ::Gapic::Rest::PagedEnumerable.new @os_config_zonal_service_stub, :list_os_policy_assignment_revisions, "os_policy_assignments", request, result, options
|
646
665
|
yield result, operation if block_given?
|
647
|
-
|
666
|
+
throw :response, result
|
648
667
|
end
|
649
668
|
rescue ::Gapic::Rest::Error => e
|
650
669
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -742,7 +761,7 @@ module Google
|
|
742
761
|
@os_config_zonal_service_stub.delete_os_policy_assignment request, options do |result, operation|
|
743
762
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
744
763
|
yield result, operation if block_given?
|
745
|
-
|
764
|
+
throw :response, result
|
746
765
|
end
|
747
766
|
rescue ::Gapic::Rest::Error => e
|
748
767
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -830,7 +849,6 @@ module Google
|
|
830
849
|
|
831
850
|
@os_config_zonal_service_stub.get_instance_os_policies_compliance request, options do |result, operation|
|
832
851
|
yield result, operation if block_given?
|
833
|
-
return result
|
834
852
|
end
|
835
853
|
rescue ::Gapic::Rest::Error => e
|
836
854
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -929,7 +947,7 @@ module Google
|
|
929
947
|
@os_config_zonal_service_stub.list_instance_os_policies_compliances request, options do |result, operation|
|
930
948
|
result = ::Gapic::Rest::PagedEnumerable.new @os_config_zonal_service_stub, :list_instance_os_policies_compliances, "instance_os_policies_compliances", request, result, options
|
931
949
|
yield result, operation if block_given?
|
932
|
-
|
950
|
+
throw :response, result
|
933
951
|
end
|
934
952
|
rescue ::Gapic::Rest::Error => e
|
935
953
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1017,7 +1035,6 @@ module Google
|
|
1017
1035
|
|
1018
1036
|
@os_config_zonal_service_stub.get_os_policy_assignment_report request, options do |result, operation|
|
1019
1037
|
yield result, operation if block_given?
|
1020
|
-
return result
|
1021
1038
|
end
|
1022
1039
|
rescue ::Gapic::Rest::Error => e
|
1023
1040
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1131,7 +1148,7 @@ module Google
|
|
1131
1148
|
@os_config_zonal_service_stub.list_os_policy_assignment_reports request, options do |result, operation|
|
1132
1149
|
result = ::Gapic::Rest::PagedEnumerable.new @os_config_zonal_service_stub, :list_os_policy_assignment_reports, "os_policy_assignment_reports", request, result, options
|
1133
1150
|
yield result, operation if block_given?
|
1134
|
-
|
1151
|
+
throw :response, result
|
1135
1152
|
end
|
1136
1153
|
rescue ::Gapic::Rest::Error => e
|
1137
1154
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1221,7 +1238,6 @@ module Google
|
|
1221
1238
|
|
1222
1239
|
@os_config_zonal_service_stub.get_inventory request, options do |result, operation|
|
1223
1240
|
yield result, operation if block_given?
|
1224
|
-
return result
|
1225
1241
|
end
|
1226
1242
|
rescue ::Gapic::Rest::Error => e
|
1227
1243
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1321,7 +1337,7 @@ module Google
|
|
1321
1337
|
@os_config_zonal_service_stub.list_inventories request, options do |result, operation|
|
1322
1338
|
result = ::Gapic::Rest::PagedEnumerable.new @os_config_zonal_service_stub, :list_inventories, "inventories", request, result, options
|
1323
1339
|
yield result, operation if block_given?
|
1324
|
-
|
1340
|
+
throw :response, result
|
1325
1341
|
end
|
1326
1342
|
rescue ::Gapic::Rest::Error => e
|
1327
1343
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1408,7 +1424,6 @@ module Google
|
|
1408
1424
|
|
1409
1425
|
@os_config_zonal_service_stub.get_vulnerability_report request, options do |result, operation|
|
1410
1426
|
yield result, operation if block_given?
|
1411
|
-
return result
|
1412
1427
|
end
|
1413
1428
|
rescue ::Gapic::Rest::Error => e
|
1414
1429
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1505,7 +1520,7 @@ module Google
|
|
1505
1520
|
@os_config_zonal_service_stub.list_vulnerability_reports request, options do |result, operation|
|
1506
1521
|
result = ::Gapic::Rest::PagedEnumerable.new @os_config_zonal_service_stub, :list_vulnerability_reports, "vulnerability_reports", request, result, options
|
1507
1522
|
yield result, operation if block_given?
|
1508
|
-
|
1523
|
+
throw :response, result
|
1509
1524
|
end
|
1510
1525
|
rescue ::Gapic::Rest::Error => e
|
1511
1526
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1553,6 +1568,13 @@ module Google
|
|
1553
1568
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1554
1569
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1555
1570
|
# * (`nil`) indicating no credentials
|
1571
|
+
#
|
1572
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
1573
|
+
# external source for authentication to Google Cloud, you must validate it before
|
1574
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
1575
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
1576
|
+
# For more information, refer to [Validate credential configurations from external
|
1577
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
1556
1578
|
# @return [::Object]
|
1557
1579
|
# @!attribute [rw] scope
|
1558
1580
|
# The OAuth scopes
|
@@ -1585,6 +1607,11 @@ module Google
|
|
1585
1607
|
# default endpoint URL. The default value of nil uses the environment
|
1586
1608
|
# universe (usually the default "googleapis.com" universe).
|
1587
1609
|
# @return [::String,nil]
|
1610
|
+
# @!attribute [rw] logger
|
1611
|
+
# A custom logger to use for request/response debug logging, or the value
|
1612
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1613
|
+
# explicitly disable logging.
|
1614
|
+
# @return [::Logger,:default,nil]
|
1588
1615
|
#
|
1589
1616
|
class Configuration
|
1590
1617
|
extend ::Gapic::Config
|
@@ -1606,6 +1633,7 @@ module Google
|
|
1606
1633
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1607
1634
|
config_attr :quota_project, nil, ::String, nil
|
1608
1635
|
config_attr :universe_domain, nil, ::String, nil
|
1636
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1609
1637
|
|
1610
1638
|
# @private
|
1611
1639
|
def initialize parent_config = nil
|