google-cloud-gke_multi_cloud 1.2.1 → 1.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b25cf5b2518e113ba21963524b2cc1a8d1afa8f489c51763de1ac0b9d89dc0a2
4
- data.tar.gz: 9e146750de833a287ff450ece6bd0d6ef21b40261cb2eee5b325cbfd3ad7f7d0
3
+ metadata.gz: 7a367f280ab3dfbf1162eec6af329df1a362b38abd34f09f5a0635b8a713e0ee
4
+ data.tar.gz: 2900bc95d6b3980b03730620b409a11f569a2ff14b7636942100eaead5a85e90
5
5
  SHA512:
6
- metadata.gz: d0869978a975731e2c5288dbd35b1ca3f55a8e411c40f4a40c52acbf09d95f4419da1aae92c792975055b671489b022d9e63bac4be70abbe616362143ef42118
7
- data.tar.gz: ebca071fadc2ef978ae61213f1f38e40bf1e4c966d5b84fdefd3d1aff0d39f1f2286f22d62e6db2cf83b31e00d04e30050629420222840860b2f1d560f5113cb
6
+ metadata.gz: '0825280a8d2ebc78c3271e5f36c55c6ff1a8f401c120756bd974d91b2fa4f90fe2121df11831985656ec2d1315a2b4f9a9c7c0f7de643a467822378cfce68fa8'
7
+ data.tar.gz: 21ea380a0f250a1e55715b57b237f3511c6645c403fa3bfb1cc40c25e2f43431278d9f26eef39111bc29e9cac081dc038a258c5c2b7e2cd6b1debf7f096bc7fd
data/README.md CHANGED
@@ -7,7 +7,7 @@ Anthos Multi-Cloud provides a way to manage Kubernetes clusters that run on AWS
7
7
  Actual client classes for the various versions of this API are defined in
8
8
  _versioned_ client gems, with names of the form `google-cloud-gke_multi_cloud-v*`.
9
9
  The gem `google-cloud-gke_multi_cloud` is the main client library that brings the
10
- verisoned gems in as dependencies, and provides high-level methods for
10
+ versioned gems in as dependencies, and provides high-level methods for
11
11
  constructing clients. More information on versioned clients can be found below
12
12
  in the section titled *Which client should I use?*.
13
13
 
@@ -34,35 +34,39 @@ In order to use this library, you first need to go through the following steps:
34
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/gkemulticloud.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
- ## Enabling Logging
38
-
39
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
40
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
41
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
42
- 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)
43
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
44
-
45
- Configuring a Ruby stdlib logger:
46
-
47
- ```ruby
48
- require "logger"
49
-
50
- module MyLogger
51
- LOGGER = Logger.new $stderr, level: Logger::WARN
52
- def logger
53
- LOGGER
54
- end
55
- end
56
-
57
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
58
- module GRPC
59
- extend MyLogger
60
- end
61
- ```
37
+ ## Debug Logging
38
+
39
+ This library comes with opt-in Debug Logging that can help you troubleshoot
40
+ your application's integration with the API. When logging is activated, key
41
+ events such as requests and responses, along with data payloads and metadata
42
+ such as headers and client configuration, are logged to the standard error
43
+ stream.
44
+
45
+ **WARNING:** Client Library Debug Logging includes your data payloads in
46
+ plaintext, which could include sensitive data such as PII for yourself or your
47
+ customers, private keys, or other security data that could be compromising if
48
+ leaked. Always practice good data hygiene with your application logs, and follow
49
+ the principle of least access. Google also recommends that Client Library Debug
50
+ Logging be enabled only temporarily during active debugging, and not used
51
+ permanently in production.
52
+
53
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
54
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
55
+ list of client library gem names. This will select the default logging behavior,
56
+ which writes logs to the standard error stream. On a local workstation, this may
57
+ result in logs appearing on the console. When running on a Google Cloud hosting
58
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
59
+ results in logs appearing alongside your application logs in the
60
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
61
+
62
+ Debug logging also requires that the versioned clients for this service be
63
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
64
+ working, try updating the versioned clients in your bundle or installed gems:
65
+ [google-cloud-gke_multi_cloud-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-gke_multi_cloud-v1/latest).
62
66
 
63
67
  ## Supported Ruby Versions
64
68
 
65
- This library is supported on Ruby 2.7+.
69
+ This library is supported on Ruby 3.0+.
66
70
 
67
71
  Google provides official support for Ruby versions that are actively supported
68
72
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module GkeMultiCloud
23
- VERSION = "1.2.1"
23
+ VERSION = "1.3.1"
24
24
  end
25
25
  end
26
26
  end
@@ -56,6 +56,11 @@ module Google
56
56
  # supported by that API version, and the corresponding gem is available, the
57
57
  # appropriate versioned client will be returned.
58
58
  #
59
+ # Raises an exception if the currently installed versioned client gem for the
60
+ # given API version does not support the AttachedClusters service.
61
+ # You can determine whether the method will succeed by calling
62
+ # {Google::Cloud::GkeMultiCloud.attached_clusters_available?}.
63
+ #
59
64
  # ## About AttachedClusters
60
65
  #
61
66
  # The AttachedClusters API provides a single centrally managed service
@@ -77,6 +82,32 @@ module Google
77
82
  service_module.const_get(:Client).new(&block)
78
83
  end
79
84
 
85
+ ##
86
+ # Determines whether the AttachedClusters service is supported by the current client.
87
+ # If true, you can retrieve a client object by calling {Google::Cloud::GkeMultiCloud.attached_clusters}.
88
+ # If false, that method will raise an exception. This could happen if the given
89
+ # API version does not exist or does not support the AttachedClusters service,
90
+ # or if the versioned client gem needs an update to support the AttachedClusters service.
91
+ #
92
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
93
+ # Defaults to `:v1`.
94
+ # @return [boolean] Whether the service is available.
95
+ #
96
+ def self.attached_clusters_available? version: :v1
97
+ require "google/cloud/gke_multi_cloud/#{version.to_s.downcase}"
98
+ package_name = Google::Cloud::GkeMultiCloud
99
+ .constants
100
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
101
+ .first
102
+ return false unless package_name
103
+ service_module = Google::Cloud::GkeMultiCloud.const_get package_name
104
+ return false unless service_module.const_defined? :AttachedClusters
105
+ service_module = service_module.const_get :AttachedClusters
106
+ service_module.const_defined? :Client
107
+ rescue ::LoadError
108
+ false
109
+ end
110
+
80
111
  ##
81
112
  # Create a new client object for AwsClusters.
82
113
  #
@@ -88,6 +119,11 @@ module Google
88
119
  # supported by that API version, and the corresponding gem is available, the
89
120
  # appropriate versioned client will be returned.
90
121
  #
122
+ # Raises an exception if the currently installed versioned client gem for the
123
+ # given API version does not support the AwsClusters service.
124
+ # You can determine whether the method will succeed by calling
125
+ # {Google::Cloud::GkeMultiCloud.aws_clusters_available?}.
126
+ #
91
127
  # ## About AwsClusters
92
128
  #
93
129
  # The AwsClusters API provides a single centrally managed service
@@ -108,6 +144,32 @@ module Google
108
144
  service_module.const_get(:Client).new(&block)
109
145
  end
110
146
 
147
+ ##
148
+ # Determines whether the AwsClusters service is supported by the current client.
149
+ # If true, you can retrieve a client object by calling {Google::Cloud::GkeMultiCloud.aws_clusters}.
150
+ # If false, that method will raise an exception. This could happen if the given
151
+ # API version does not exist or does not support the AwsClusters service,
152
+ # or if the versioned client gem needs an update to support the AwsClusters service.
153
+ #
154
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
155
+ # Defaults to `:v1`.
156
+ # @return [boolean] Whether the service is available.
157
+ #
158
+ def self.aws_clusters_available? version: :v1
159
+ require "google/cloud/gke_multi_cloud/#{version.to_s.downcase}"
160
+ package_name = Google::Cloud::GkeMultiCloud
161
+ .constants
162
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
163
+ .first
164
+ return false unless package_name
165
+ service_module = Google::Cloud::GkeMultiCloud.const_get package_name
166
+ return false unless service_module.const_defined? :AwsClusters
167
+ service_module = service_module.const_get :AwsClusters
168
+ service_module.const_defined? :Client
169
+ rescue ::LoadError
170
+ false
171
+ end
172
+
111
173
  ##
112
174
  # Create a new client object for AzureClusters.
113
175
  #
@@ -119,6 +181,11 @@ module Google
119
181
  # supported by that API version, and the corresponding gem is available, the
120
182
  # appropriate versioned client will be returned.
121
183
  #
184
+ # Raises an exception if the currently installed versioned client gem for the
185
+ # given API version does not support the AzureClusters service.
186
+ # You can determine whether the method will succeed by calling
187
+ # {Google::Cloud::GkeMultiCloud.azure_clusters_available?}.
188
+ #
122
189
  # ## About AzureClusters
123
190
  #
124
191
  # The AzureClusters API provides a single centrally managed service
@@ -139,6 +206,32 @@ module Google
139
206
  service_module.const_get(:Client).new(&block)
140
207
  end
141
208
 
209
+ ##
210
+ # Determines whether the AzureClusters service is supported by the current client.
211
+ # If true, you can retrieve a client object by calling {Google::Cloud::GkeMultiCloud.azure_clusters}.
212
+ # If false, that method will raise an exception. This could happen if the given
213
+ # API version does not exist or does not support the AzureClusters service,
214
+ # or if the versioned client gem needs an update to support the AzureClusters service.
215
+ #
216
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
217
+ # Defaults to `:v1`.
218
+ # @return [boolean] Whether the service is available.
219
+ #
220
+ def self.azure_clusters_available? version: :v1
221
+ require "google/cloud/gke_multi_cloud/#{version.to_s.downcase}"
222
+ package_name = Google::Cloud::GkeMultiCloud
223
+ .constants
224
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
225
+ .first
226
+ return false unless package_name
227
+ service_module = Google::Cloud::GkeMultiCloud.const_get package_name
228
+ return false unless service_module.const_defined? :AzureClusters
229
+ service_module = service_module.const_get :AzureClusters
230
+ service_module.const_defined? :Client
231
+ rescue ::LoadError
232
+ false
233
+ end
234
+
142
235
  ##
143
236
  # Configure the google-cloud-gke_multi_cloud library.
144
237
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-gke_multi_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-08-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -64,7 +63,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
64
63
  licenses:
65
64
  - Apache-2.0
66
65
  metadata: {}
67
- post_install_message:
68
66
  rdoc_options: []
69
67
  require_paths:
70
68
  - lib
@@ -72,15 +70,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
72
70
  requirements:
73
71
  - - ">="
74
72
  - !ruby/object:Gem::Version
75
- version: '2.7'
73
+ version: '3.0'
76
74
  required_rubygems_version: !ruby/object:Gem::Requirement
77
75
  requirements:
78
76
  - - ">="
79
77
  - !ruby/object:Gem::Version
80
78
  version: '0'
81
79
  requirements: []
82
- rubygems_version: 3.5.6
83
- signing_key:
80
+ rubygems_version: 3.6.8
84
81
  specification_version: 4
85
82
  summary: API Client library for the Anthos Multi-Cloud API
86
83
  test_files: []