google-cloud-os_config-v1alpha 0.4.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +3 -3
  4. data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/client.rb +42 -52
  5. data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/operations.rb +17 -17
  6. data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/rest/client.rb +1446 -0
  7. data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/rest/operations.rb +795 -0
  8. data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/rest/service_stub.rb +876 -0
  9. data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/rest.rb +56 -0
  10. data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service.rb +7 -1
  11. data/lib/google/cloud/os_config/v1alpha/rest.rb +37 -0
  12. data/lib/google/cloud/os_config/v1alpha/version.rb +1 -1
  13. data/lib/google/cloud/os_config/v1alpha.rb +7 -2
  14. data/lib/google/cloud/osconfig/v1alpha/config_common_pb.rb +23 -37
  15. data/lib/google/cloud/osconfig/v1alpha/instance_os_policies_compliance_pb.rb +26 -31
  16. data/lib/google/cloud/osconfig/v1alpha/inventory_pb.rb +26 -110
  17. data/lib/google/cloud/osconfig/v1alpha/os_policy_assignment_reports_pb.rb +25 -62
  18. data/lib/google/cloud/osconfig/v1alpha/os_policy_assignments_pb.rb +29 -95
  19. data/lib/google/cloud/osconfig/v1alpha/os_policy_pb.rb +24 -164
  20. data/lib/google/cloud/osconfig/v1alpha/osconfig_common_pb.rb +23 -8
  21. data/lib/google/cloud/osconfig/v1alpha/osconfig_zonal_service_pb.rb +25 -2
  22. data/lib/google/cloud/osconfig/v1alpha/vulnerability_pb.rb +25 -93
  23. data/proto_docs/google/api/client.rb +381 -0
  24. data/proto_docs/google/api/launch_stage.rb +71 -0
  25. data/proto_docs/google/protobuf/any.rb +7 -4
  26. data/proto_docs/google/protobuf/empty.rb +0 -2
  27. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  28. data/proto_docs/google/rpc/status.rb +4 -2
  29. metadata +16 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46c2758b34fb24bc3371682c68371b80adfa2875f99e5f05cd11765a5b124921
4
- data.tar.gz: 2caeda7b2ecee0e0c42b8bb0bdfb94710cbb727b44dd22de31ca058b0aa84fea
3
+ metadata.gz: 2267179ebff003f3dbd4ad72a7f0f99fe7fc292897d1a8cbe9748c9b6a0a58a2
4
+ data.tar.gz: ffdd3389c1c4ca0bf0f86ebd8699db4de939a02a6544adfb08c007a0b21c30b1
5
5
  SHA512:
6
- metadata.gz: 4c8fe8d402e40fc72cbe8a98a292b3e5d604f9e19f4a37ef3c835f4a69220e4f5b33c57c7f3de0db2540d7744737503c740a7c7989e343ca04568397135f33b8
7
- data.tar.gz: fdc16ec58035150656f2c337683dbc31c1642fa1ea2a2f2de91f0c54fc1b69754d2aaf0183fd449853c0bc60282230d486a4876458360b69b057c5fa2b753857
6
+ metadata.gz: df49cdacad6f3708e058b0caf864ca5cf705a9f10bd6a5bc4a4c0f6daada991c68907051e209956b6c53815deeb8586bebdd6c2d485f6062f3d6526ea3acad14
7
+ data.tar.gz: 1d0cc61ea52c6bff0bb138e9ea57bb2eadfb3ba5b95279fda8a91a7ce35a04a18927ee47f854bac20570fdd125203c40baecb7df9a3d1c4cfffa1eafae594009
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Cloud OS Config V1alpha API
2
2
 
3
- API Client library for the Cloud OS Config V1alpha API
3
+ OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.
4
4
 
5
5
  Cloud OS Config provides OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.
6
6
 
@@ -46,8 +46,8 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
+ or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
53
 
@@ -131,7 +131,7 @@ module Google
131
131
  credentials = @config.credentials
132
132
  # Use self-signed JWT if the endpoint is unchanged from default,
133
133
  # but only if the default endpoint does not have a region prefix.
134
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
134
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
135
135
  !@config.endpoint.split(".").first.include?("-")
136
136
  credentials ||= Credentials.default scope: @config.scope,
137
137
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -226,14 +226,14 @@ module Google
226
226
  # # Call the create_os_policy_assignment method.
227
227
  # result = client.create_os_policy_assignment request
228
228
  #
229
- # # The returned object is of type Gapic::Operation. You can use this
230
- # # object to check the status of an operation, cancel it, or wait
231
- # # for results. Here is how to block until completion:
229
+ # # The returned object is of type Gapic::Operation. You can use it to
230
+ # # check the status of an operation, cancel it, or wait for results.
231
+ # # Here is how to wait for a response.
232
232
  # result.wait_until_done! timeout: 60
233
233
  # if result.response?
234
234
  # p result.response
235
235
  # else
236
- # puts "Error!"
236
+ # puts "No response received."
237
237
  # end
238
238
  #
239
239
  def create_os_policy_assignment request, options = nil
@@ -329,14 +329,14 @@ module Google
329
329
  # # Call the update_os_policy_assignment method.
330
330
  # result = client.update_os_policy_assignment request
331
331
  #
332
- # # The returned object is of type Gapic::Operation. You can use this
333
- # # object to check the status of an operation, cancel it, or wait
334
- # # for results. Here is how to block until completion:
332
+ # # The returned object is of type Gapic::Operation. You can use it to
333
+ # # check the status of an operation, cancel it, or wait for results.
334
+ # # Here is how to wait for a response.
335
335
  # result.wait_until_done! timeout: 60
336
336
  # if result.response?
337
337
  # p result.response
338
338
  # else
339
- # puts "Error!"
339
+ # puts "No response received."
340
340
  # end
341
341
  #
342
342
  def update_os_policy_assignment request, options = nil
@@ -522,13 +522,11 @@ module Google
522
522
  # # Call the list_os_policy_assignments method.
523
523
  # result = client.list_os_policy_assignments request
524
524
  #
525
- # # The returned object is of type Gapic::PagedEnumerable. You can
526
- # # iterate over all elements by calling #each, and the enumerable
527
- # # will lazily make API calls to fetch subsequent pages. Other
528
- # # methods are also available for managing paging directly.
529
- # result.each do |response|
525
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
526
+ # # over elements, and API calls will be issued to fetch pages as needed.
527
+ # result.each do |item|
530
528
  # # Each element is of type ::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignment.
531
- # p response
529
+ # p item
532
530
  # end
533
531
  #
534
532
  def list_os_policy_assignments request, options = nil
@@ -620,13 +618,11 @@ module Google
620
618
  # # Call the list_os_policy_assignment_revisions method.
621
619
  # result = client.list_os_policy_assignment_revisions request
622
620
  #
623
- # # The returned object is of type Gapic::PagedEnumerable. You can
624
- # # iterate over all elements by calling #each, and the enumerable
625
- # # will lazily make API calls to fetch subsequent pages. Other
626
- # # methods are also available for managing paging directly.
627
- # result.each do |response|
621
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
622
+ # # over elements, and API calls will be issued to fetch pages as needed.
623
+ # result.each do |item|
628
624
  # # Each element is of type ::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignment.
629
- # p response
625
+ # p item
630
626
  # end
631
627
  #
632
628
  def list_os_policy_assignment_revisions request, options = nil
@@ -723,14 +719,14 @@ module Google
723
719
  # # Call the delete_os_policy_assignment method.
724
720
  # result = client.delete_os_policy_assignment request
725
721
  #
726
- # # The returned object is of type Gapic::Operation. You can use this
727
- # # object to check the status of an operation, cancel it, or wait
728
- # # for results. Here is how to block until completion:
722
+ # # The returned object is of type Gapic::Operation. You can use it to
723
+ # # check the status of an operation, cancel it, or wait for results.
724
+ # # Here is how to wait for a response.
729
725
  # result.wait_until_done! timeout: 60
730
726
  # if result.response?
731
727
  # p result.response
732
728
  # else
733
- # puts "Error!"
729
+ # puts "No response received."
734
730
  # end
735
731
  #
736
732
  def delete_os_policy_assignment request, options = nil
@@ -929,13 +925,11 @@ module Google
929
925
  # # Call the list_instance_os_policies_compliances method.
930
926
  # result = client.list_instance_os_policies_compliances request
931
927
  #
932
- # # The returned object is of type Gapic::PagedEnumerable. You can
933
- # # iterate over all elements by calling #each, and the enumerable
934
- # # will lazily make API calls to fetch subsequent pages. Other
935
- # # methods are also available for managing paging directly.
936
- # result.each do |response|
928
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
929
+ # # over elements, and API calls will be issued to fetch pages as needed.
930
+ # result.each do |item|
937
931
  # # Each element is of type ::Google::Cloud::OsConfig::V1alpha::InstanceOSPoliciesCompliance.
938
- # p response
932
+ # p item
939
933
  # end
940
934
  #
941
935
  def list_instance_os_policies_compliances request, options = nil
@@ -1145,13 +1139,11 @@ module Google
1145
1139
  # # Call the list_os_policy_assignment_reports method.
1146
1140
  # result = client.list_os_policy_assignment_reports request
1147
1141
  #
1148
- # # The returned object is of type Gapic::PagedEnumerable. You can
1149
- # # iterate over all elements by calling #each, and the enumerable
1150
- # # will lazily make API calls to fetch subsequent pages. Other
1151
- # # methods are also available for managing paging directly.
1152
- # result.each do |response|
1142
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1143
+ # # over elements, and API calls will be issued to fetch pages as needed.
1144
+ # result.each do |item|
1153
1145
  # # Each element is of type ::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignmentReport.
1154
- # p response
1146
+ # p item
1155
1147
  # end
1156
1148
  #
1157
1149
  def list_os_policy_assignment_reports request, options = nil
@@ -1349,13 +1341,11 @@ module Google
1349
1341
  # # Call the list_inventories method.
1350
1342
  # result = client.list_inventories request
1351
1343
  #
1352
- # # The returned object is of type Gapic::PagedEnumerable. You can
1353
- # # iterate over all elements by calling #each, and the enumerable
1354
- # # will lazily make API calls to fetch subsequent pages. Other
1355
- # # methods are also available for managing paging directly.
1356
- # result.each do |response|
1344
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1345
+ # # over elements, and API calls will be issued to fetch pages as needed.
1346
+ # result.each do |item|
1357
1347
  # # Each element is of type ::Google::Cloud::OsConfig::V1alpha::Inventory.
1358
- # p response
1348
+ # p item
1359
1349
  # end
1360
1350
  #
1361
1351
  def list_inventories request, options = nil
@@ -1547,13 +1537,11 @@ module Google
1547
1537
  # # Call the list_vulnerability_reports method.
1548
1538
  # result = client.list_vulnerability_reports request
1549
1539
  #
1550
- # # The returned object is of type Gapic::PagedEnumerable. You can
1551
- # # iterate over all elements by calling #each, and the enumerable
1552
- # # will lazily make API calls to fetch subsequent pages. Other
1553
- # # methods are also available for managing paging directly.
1554
- # result.each do |response|
1540
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1541
+ # # over elements, and API calls will be issued to fetch pages as needed.
1542
+ # result.each do |item|
1555
1543
  # # Each element is of type ::Google::Cloud::OsConfig::V1alpha::VulnerabilityReport.
1556
- # p response
1544
+ # p item
1557
1545
  # end
1558
1546
  #
1559
1547
  def list_vulnerability_reports request, options = nil
@@ -1636,9 +1624,9 @@ module Google
1636
1624
  # * (`String`) The path to a service account key file in JSON format
1637
1625
  # * (`Hash`) A service account key as a Hash
1638
1626
  # * (`Google::Auth::Credentials`) A googleauth credentials object
1639
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1627
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1640
1628
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1641
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1629
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1642
1630
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1643
1631
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1644
1632
  # * (`nil`) indicating no credentials
@@ -1680,7 +1668,9 @@ module Google
1680
1668
  class Configuration
1681
1669
  extend ::Gapic::Config
1682
1670
 
1683
- config_attr :endpoint, "osconfig.googleapis.com", ::String
1671
+ DEFAULT_ENDPOINT = "osconfig.googleapis.com"
1672
+
1673
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1684
1674
  config_attr :credentials, nil do |value|
1685
1675
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1686
1676
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil
@@ -622,9 +620,9 @@ module Google
622
620
  # * (`String`) The path to a service account key file in JSON format
623
621
  # * (`Hash`) A service account key as a Hash
624
622
  # * (`Google::Auth::Credentials`) A googleauth credentials object
625
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
623
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
626
624
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
627
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
625
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
628
626
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
629
627
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
630
628
  # * (`nil`) indicating no credentials
@@ -666,7 +664,9 @@ module Google
666
664
  class Configuration
667
665
  extend ::Gapic::Config
668
666
 
669
- config_attr :endpoint, "osconfig.googleapis.com", ::String
667
+ DEFAULT_ENDPOINT = "osconfig.googleapis.com"
668
+
669
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
670
670
  config_attr :credentials, nil do |value|
671
671
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
672
672
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC