google-cloud-monitoring 1.2.2 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63d5abc4eff35e0c04288ba3753bf7be55cad71769ab3260b3916e553bd1c4e1
4
- data.tar.gz: 5f43c24b936dedb51ea3ea86e57cdacd02c25dbe5772b4fd42f715df7b44b606
3
+ metadata.gz: dba1355ee34e2fec3a9ea9d6f1adf5f0c5bf46eba0a153f38f8f505d5a3f49d0
4
+ data.tar.gz: afc1ecd43f20c2dec7efb4a6f315325c8624fe86ce1ee3d21f8a4401d00dec96
5
5
  SHA512:
6
- metadata.gz: a8d1fe548d638816992f6024fd4f3c782d32bcd3a54bd86aa7dbea67a673ef380ad839aa2a986f2f405a1246b1e325c72261a0c377c355087c3d6647c5d60fa4
7
- data.tar.gz: 2534dc8e91770200ca15a54a592089c4da0892d703e54d0f693cc45d928fc295d352dae1bae60bab0ad944ec2bd495bf6178f638799349d22072c9266cca997b
6
+ metadata.gz: 5cb46182ce9e73a27f0c41dbeffa256ff45c467371ed7e81ae4ebf0580bf62201ad76de2eacd390332effd995409c3e6e650a31d63d5b12c86a5ce0ebf07b523
7
+ data.tar.gz: 16a4dafa1bd6202649af4e8ef18d9c5f73050d30f1cc0c9c4bb969996d219389bf3e8ebdb447ca9dd8c31f3c09f868b18fa1718d1d4d50dec1a35cbe25ef51b3
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Cloud Monitoring API
2
+ --title="Cloud Monitoring API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/MIGRATING.md CHANGED
@@ -299,7 +299,7 @@ end
299
299
  ### Handling Errors
300
300
 
301
301
  The client reports standard
302
- {file:https://github.com/grpc/grpc/blob/master/doc/statuscodes.md gRPC error codes}
302
+ [gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
303
303
  by raising exceptions. In older releases, these exceptions were located in the
304
304
  `Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
305
305
  exception class, defined in the `google-gax` gem. However, these classes were
data/README.md CHANGED
@@ -11,7 +11,7 @@ verisoned 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
 
14
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-monitoring/latest)
14
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-monitoring/latest)
15
15
  for this library, google-cloud-monitoring, to see the convenience methods for
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
@@ -70,14 +70,14 @@ end
70
70
 
71
71
  ## Supported Ruby Versions
72
72
 
73
- This library is supported on Ruby 2.5+.
73
+ This library is supported on Ruby 2.6+.
74
74
 
75
75
  Google provides official support for Ruby versions that are actively supported
76
76
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
77
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
78
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
79
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
80
- about the Ruby support schedule.
77
+ in security maintenance, and not end of life. Older versions of Ruby _may_
78
+ still work, but are unsupported and not recommended. See
79
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
80
+ support schedule.
81
81
 
82
82
  ## Which client should I use?
83
83
 
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Monitoring
23
+ module MetricsScope
24
+ # @private
25
+ VERSION = ""
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,118 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ # Require this file early so that the version constant gets defined before
20
+ # requiring "google/cloud". This is because google-cloud-core will load the
21
+ # entrypoint (gem name) file, which in turn re-requires this file (hence
22
+ # causing a require cycle) unless the version constant is already defined.
23
+ require "google/cloud/monitoring/metrics_scope/version"
24
+
25
+ require "googleauth"
26
+ gem "google-cloud-core"
27
+ require "google/cloud" unless defined? ::Google::Cloud.new
28
+ require "google/cloud/config"
29
+
30
+ # Set the default configuration
31
+ ::Google::Cloud.configure.add_config! :monitoring_metrics_scope do |config|
32
+ config.add_field! :endpoint, "monitoring.googleapis.com", match: ::String
33
+ config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials]
34
+ config.add_field! :scope, nil, match: [::Array, ::String]
35
+ config.add_field! :lib_name, nil, match: ::String
36
+ config.add_field! :lib_version, nil, match: ::String
37
+ config.add_field! :interceptors, nil, match: ::Array
38
+ config.add_field! :timeout, nil, match: ::Numeric
39
+ config.add_field! :metadata, nil, match: ::Hash
40
+ config.add_field! :retry_policy, nil, match: [::Hash, ::Proc]
41
+ config.add_field! :quota_project, nil, match: ::String
42
+ end
43
+
44
+ module Google
45
+ module Cloud
46
+ module Monitoring
47
+ module MetricsScope
48
+ ##
49
+ # Create a new client object for MetricsScopes.
50
+ #
51
+ # By default, this returns an instance of
52
+ # [Google::Cloud::Monitoring::MetricsScope::V1::MetricsScopes::Client](https://googleapis.dev/ruby/google-cloud-monitoring-metrics_scope-v1/latest/Google/Cloud/Monitoring/MetricsScope/V1/MetricsScopes/Client.html)
53
+ # for version V1 of the API.
54
+ # However, you can specify specify a different API version by passing it in the
55
+ # `version` parameter. If the MetricsScopes service is
56
+ # supported by that API version, and the corresponding gem is available, the
57
+ # appropriate versioned client will be returned.
58
+ #
59
+ # ## About MetricsScopes
60
+ #
61
+ # Manages Cloud Monitoring Metrics Scopes, and the monitoring of Google Cloud
62
+ # projects and AWS accounts.
63
+ #
64
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
65
+ # Defaults to `:v1`.
66
+ # @return [MetricsScopes::Client] A client object for the specified version.
67
+ #
68
+ def self.metrics_scopes version: :v1, &block
69
+ require "google/cloud/monitoring/metrics_scope/#{version.to_s.downcase}"
70
+
71
+ package_name = Google::Cloud::Monitoring::MetricsScope
72
+ .constants
73
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
74
+ .first
75
+ package_module = Google::Cloud::Monitoring::MetricsScope.const_get package_name
76
+ package_module.const_get(:MetricsScopes).const_get(:Client).new(&block)
77
+ end
78
+
79
+ ##
80
+ # Configure the google-cloud-monitoring-metrics_scope library.
81
+ #
82
+ # The following configuration parameters are supported:
83
+ #
84
+ # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) -
85
+ # The path to the keyfile as a String, the contents of the keyfile as a
86
+ # Hash, or a Google::Auth::Credentials object.
87
+ # * `lib_name` (*type:* `String`) -
88
+ # The library name as recorded in instrumentation and logging.
89
+ # * `lib_version` (*type:* `String`) -
90
+ # The library version as recorded in instrumentation and logging.
91
+ # * `interceptors` (*type:* `Array<GRPC::ClientInterceptor>`) -
92
+ # An array of interceptors that are run before calls are executed.
93
+ # * `timeout` (*type:* `Numeric`) -
94
+ # Default timeout in seconds.
95
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) -
96
+ # Additional gRPC headers to be sent with the call.
97
+ # * `retry_policy` (*type:* `Hash`) -
98
+ # The retry policy. The value is a hash with the following keys:
99
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
100
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
101
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
102
+ # * `:retry_codes` (*type:* `Array<String>`) -
103
+ # The error codes that should trigger a retry.
104
+ #
105
+ # @return [::Google::Cloud::Config] The default configuration used by this library
106
+ #
107
+ def self.configure
108
+ yield ::Google::Cloud.configure.monitoring_metrics_scope if block_given?
109
+
110
+ ::Google::Cloud.configure.monitoring_metrics_scope
111
+ end
112
+ end
113
+ end
114
+ end
115
+ end
116
+
117
+ helper_path = ::File.join __dir__, "metrics_scope", "helpers.rb"
118
+ require "google/cloud/monitoring/metrics_scope/helpers" if ::File.file? helper_path
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Monitoring
23
- VERSION = "1.2.2"
23
+ VERSION = "1.4.0"
24
24
  end
25
25
  end
26
26
  end
@@ -18,3 +18,4 @@
18
18
 
19
19
  require "google/cloud/monitoring" unless defined? Google::Cloud::Monitoring::VERSION
20
20
  require "google/cloud/monitoring/dashboard" unless defined? Google::Cloud::Monitoring::Dashboard::VERSION
21
+ require "google/cloud/monitoring/metrics_scope" unless defined? Google::Cloud::Monitoring::MetricsScope::VERSION
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-monitoring
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-12 00:00:00.000000000 Z
11
+ date: 2022-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -64,34 +64,54 @@ dependencies:
64
64
  - - "<"
65
65
  - !ruby/object:Gem::Version
66
66
  version: 2.a
67
+ - !ruby/object:Gem::Dependency
68
+ name: google-cloud-monitoring-metrics_scope-v1
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0.0'
74
+ - - "<"
75
+ - !ruby/object:Gem::Version
76
+ version: 2.a
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0.0'
84
+ - - "<"
85
+ - !ruby/object:Gem::Version
86
+ version: 2.a
67
87
  - !ruby/object:Gem::Dependency
68
88
  name: google-style
69
89
  requirement: !ruby/object:Gem::Requirement
70
90
  requirements:
71
91
  - - "~>"
72
92
  - !ruby/object:Gem::Version
73
- version: 1.25.1
93
+ version: 1.26.1
74
94
  type: :development
75
95
  prerelease: false
76
96
  version_requirements: !ruby/object:Gem::Requirement
77
97
  requirements:
78
98
  - - "~>"
79
99
  - !ruby/object:Gem::Version
80
- version: 1.25.1
100
+ version: 1.26.1
81
101
  - !ruby/object:Gem::Dependency
82
102
  name: minitest
83
103
  requirement: !ruby/object:Gem::Requirement
84
104
  requirements:
85
105
  - - "~>"
86
106
  - !ruby/object:Gem::Version
87
- version: '5.14'
107
+ version: '5.16'
88
108
  type: :development
89
109
  prerelease: false
90
110
  version_requirements: !ruby/object:Gem::Requirement
91
111
  requirements:
92
112
  - - "~>"
93
113
  - !ruby/object:Gem::Version
94
- version: '5.14'
114
+ version: '5.16'
95
115
  - !ruby/object:Gem::Dependency
96
116
  name: minitest-focus
97
117
  requirement: !ruby/object:Gem::Requirement
@@ -126,14 +146,14 @@ dependencies:
126
146
  requirements:
127
147
  - - ">="
128
148
  - !ruby/object:Gem::Version
129
- version: '12.0'
149
+ version: '13.0'
130
150
  type: :development
131
151
  prerelease: false
132
152
  version_requirements: !ruby/object:Gem::Requirement
133
153
  requirements:
134
154
  - - ">="
135
155
  - !ruby/object:Gem::Version
136
- version: '12.0'
156
+ version: '13.0'
137
157
  - !ruby/object:Gem::Dependency
138
158
  name: redcarpet
139
159
  requirement: !ruby/object:Gem::Requirement
@@ -192,6 +212,8 @@ files:
192
212
  - lib/google/cloud/monitoring.rb
193
213
  - lib/google/cloud/monitoring/dashboard.rb
194
214
  - lib/google/cloud/monitoring/dashboard/version.rb
215
+ - lib/google/cloud/monitoring/metrics_scope.rb
216
+ - lib/google/cloud/monitoring/metrics_scope/version.rb
195
217
  - lib/google/cloud/monitoring/version.rb
196
218
  homepage: https://github.com/googleapis/google-cloud-ruby
197
219
  licenses:
@@ -205,14 +227,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
205
227
  requirements:
206
228
  - - ">="
207
229
  - !ruby/object:Gem::Version
208
- version: '2.5'
230
+ version: '2.6'
209
231
  required_rubygems_version: !ruby/object:Gem::Requirement
210
232
  requirements:
211
233
  - - ">="
212
234
  - !ruby/object:Gem::Version
213
235
  version: '0'
214
236
  requirements: []
215
- rubygems_version: 3.2.17
237
+ rubygems_version: 3.3.14
216
238
  signing_key:
217
239
  specification_version: 4
218
240
  summary: API Client library for the Cloud Monitoring API